Skript

Skript

743k Downloads

Exception in play sound in skript v2.9.0

nlaocs opened this issue ยท 5 comments

commented

Skript/Server Version

[22:38:53 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[22:38:53 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[22:38:53 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[22:38:53 INFO]: [Skript] Server Version: git-Paper-411 (MC: 1.17.1)
[22:38:53 INFO]: [Skript] Skript Version: 2.9.0 (skriptlang-github)
[22:38:53 INFO]: [Skript] Installed Skript Addons:
[22:38:53 INFO]: [Skript]  - skript-reflect v2.4 (https://github.com/SkriptLang/skript-reflect)
[22:38:53 INFO]: [Skript]  - SkQuery v4.1.10
[22:38:53 INFO]: [Skript]  - SkBee v2.11.0 (https://github.com/ShaneBeee/SkBee)
[22:38:53 INFO]: [Skript] Installed dependencies:
[22:38:53 INFO]: [Skript]  - WorldGuard v7.0.7+216b061

Bug Description

When migrating from skript 2.8.6 to skript 2.9.0, the playsound syntax, which worked fine before, no longer works.

Expected Behavior

The sound was originally supposed to sound, but an internal error occurs

Steps to Reproduce

command /playsoundtest:
    trigger:
        play sound "entity.experience_orb.pickup" with volume 1 to all players

Errors or Screenshots

[22:39:09 WARN]: [Skript] Task #18 for Skript v2.9.0 generated an exception
java.lang.NoSuchMethodError: 'void org.bukkit.entity.Player.playSound(org.bukkit.entity.Entity, java.lang.String, org.bukkit.SoundCategory, float, float)'
        at ch.njol.skript.effects.EffPlaySound.execute(EffPlaySound.java:151) ~[Skript-2.9.0.jar:?]
        at ch.njol.skript.lang.Effect.run(Effect.java:49) ~[Skript-2.9.0.jar:?]
        at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61) ~[Skript-2.9.0.jar:?]
        at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:88) ~[Skript-2.9.0.jar:?]
        at ch.njol.skript.lang.Trigger.execute(Trigger.java:52) ~[Skript-2.9.0.jar:?]
        at ch.njol.skript.lang.function.ScriptFunction.execute(ScriptFunction.java:78) ~[Skript-2.9.0.jar:?]
        at ch.njol.skript.lang.function.Function.execute(Function.java:129) ~[Skript-2.9.0.jar:?]
        at ch.njol.skript.lang.function.FunctionReference.execute(FunctionReference.java:323) ~[Skript-2.9.0.jar:?]                                                                                         at ch.njol.skript.lang.function.EffFunctionCall.execute(EffFunctionCall.java:52) ~[Skript-2.9.0.jar:?]                                                                                              at ch.njol.skript.lang.Effect.run(Effect.java:49) ~[Skript-2.9.0.jar:?]                                                                                                                             at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61) ~[Skript-2.9.0.jar:?]                                                                                                                  at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:88) ~[Skript-2.9.0.jar:?]                                                                                                                  at ch.njol.skript.lang.Trigger.execute(Trigger.java:52) ~[Skript-2.9.0.jar:?]                                                                                                                       at ch.njol.skript.events.EvtPeriodical.execute(EvtPeriodical.java:121) ~[Skript-2.9.0.jar:?]                                                                                                        at ch.njol.skript.events.EvtPeriodical.lambda$postLoad$0(EvtPeriodical.java:80) ~[Skript-2.9.0.jar:?]                                                                                               at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[patched_1.17.1.jar:git-Paper-411]
        at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[patched_1.17.1.jar:git-Paper-411]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1567) ~[patched_1.17.1.jar:git-Paper-411]
        at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:490) ~[patched_1.17.1.jar:git-Paper-411]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1483) ~[patched_1.17.1.jar:git-Paper-411]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1282) ~[patched_1.17.1.jar:git-Paper-411]                                                                                    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[patched_1.17.1.jar:git-Paper-411]
        at java.lang.Thread.run(Thread.java:831) ~[?:?]

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
commented

I can replicate

commented

Have you tried updating your skript-reflect?

commented

I had not updated it, and the error has changed as a result of the update.

[22:57:33 INFO]: nlaocs issued server command: /playsoundtest
[22:57:33 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'playsoundtest' in plugin Skript v2.9.0                                                      at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[patched_1.17.1.jar:git-Paper-411]                                                          at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[patched_1.17.1.jar:git-Paper-411]                                                  at org.bukkit.craftbukkit.v1_17_R1.CraftServer.dispatchCommand(CraftServer.java:869) ~[patched_1.17.1.jar:git-Paper-411]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handleCommand(ServerGamePacketListenerImpl.java:2262) ~[app:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2073) ~[app:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2054) ~[app:?]
        at net.minecraft.network.protocol.game.ServerboundChatPacket.handle(ServerboundChatPacket.java:46) ~[app:?]
        at net.minecraft.network.protocol.game.ServerboundChatPacket.a(ServerboundChatPacket.java:6) ~[app:?]
        at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:56) ~[app:?]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[patched_1.17.1.jar:git-Paper-411]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:149) ~[app:?]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:23) ~[app:?]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1426) ~[patched_1.17.1.jar:git-Paper-411]
        at net.minecraft.server.MinecraftServer.executeTask(MinecraftServer.java:192) ~[patched_1.17.1.jar:git-Paper-411]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:122) ~[app:?]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1404) ~[patched_1.17.1.jar:git-Paper-411]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1397) ~[patched_1.17.1.jar:git-Paper-411]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:132) ~[app:?]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1375) ~[patched_1.17.1.jar:git-Paper-411]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1286) ~[patched_1.17.1.jar:git-Paper-411]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[patched_1.17.1.jar:git-Paper-411]
        at java.lang.Thread.run(Thread.java:831) ~[?:?]
Caused by: java.lang.NoSuchMethodError: 'void org.bukkit.entity.Player.playSound(org.bukkit.entity.Entity, java.lang.String, org.bukkit.SoundCategory, float, float)'
        at ch.njol.skript.effects.EffPlaySound.execute(EffPlaySound.java:151) ~[Skript-2.9.0.jar:?]
        at ch.njol.skript.lang.Effect.run(Effect.java:49) ~[Skript-2.9.0.jar:?]
        at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61) ~[Skript-2.9.0.jar:?]
        at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:88) ~[Skript-2.9.0.jar:?]
        at ch.njol.skript.lang.Trigger.execute(Trigger.java:52) ~[Skript-2.9.0.jar:?]
        at ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:345) ~[Skript-2.9.0.jar:?]
        at ch.njol.skript.command.ScriptCommand.lambda$execute$0(ScriptCommand.java:304) ~[Skript-2.9.0.jar:?]
        at ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:315) ~[Skript-2.9.0.jar:?]
        at ch.njol.skript.command.ScriptCommand.onCommand(ScriptCommand.java:250) ~[Skript-2.9.0.jar:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[patched_1.17.1.jar:git-Paper-411]
        ... 21 more
commented

Can you test with https://github.com/SkriptLang/Skript/actions/runs/9962223751 to see if it's functional again?

commented

The code works fine!