spartacus04 / jext-reborn

Level up your server with custom music discs - "Just like vanilla jukebox, but better!". I mantain this in my free time.
https://spartacus04.github.io/jext-reborn/
Other
34 stars 7 forks source link

[Bug]: When you use the jukebox to play a record you hear record 11 and the server console displays an error in the plugin #409

Open Munalex opened 3 months ago

Munalex commented 3 months ago

Describe the bug

Howdy!

I am trying to use version 2.0.8 of the plugin, and when I use the disc to listen to the custom disc in the game, disc 11 from the game itself plays instead, and the plugin crashes on the server console. I created the resource pack through the website, and everything works fine: the disc texture, the song title, the description, and the author. The issue occurs when using it on the jukebox. If I use the command jext play disc directly on a player, the song plays perfectly.

Steps to reproduce

Load the world, use a give command to give a jukebox, use jext give disc to give custom disc to the player and use the disc in the jukebox

Expected behaviour

[02:15:28] [Server thread/ERROR]: Could not pass event PlayerInteractEvent to JukeboxExtendedReborn v2.0.8 java.lang.ExceptionInInitializerError: null at JEXT-Reborn_2.0.8.jar/me.spartacus04.jext.discs.Disc$Companion.stop(Unknown Source) ~[JEXT-Reborn_2.0.8.jar:?] at JEXT-Reborn_2.0.8.jar/me.spartacus04.jext.discs.Disc.play(Unknown Source) ~[JEXT-Reborn_2.0.8.jar:?] at JEXT-Reborn_2.0.8.jar/me.spartacus04.jext.discs.Disc.play$default(Unknown Source) ~[JEXT-Reborn_2.0.8.jar:?] at JEXT-Reborn_2.0.8.jar/me.spartacus04.jext.listeners.JukeboxClickEvent.defaultBehaviour(Unknown Source) ~[JEXT-Reborn_2.0.8.jar:?] at JEXT-Reborn_2.0.8.jar/me.spartacus04.jext.listeners.JukeboxClickEvent.onJukeboxInteract(Unknown Source) ~[JEXT-Reborn_2.0.8.jar:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor10.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:1.20.6-147-e41d44f] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:593) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.server.level.ServerPlayerGameMode.useItemOn(ServerPlayerGameMode.java:531) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.server.network.ServerGamePacketListenerImpl.handleUseItemOn(ServerGamePacketListenerImpl.java:1931) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.handle(ServerboundUseItemOnPacket.java:44) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.handle(ServerboundUseItemOnPacket.java:11) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:55) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1511) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:195) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1488) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1411) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1377) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1238) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?] Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 3 out of bounds for length 3 at JEXT-Reborn_2.0.8.jar/me.spartacus04.jext.dependencies.jext-reborn.nbteditor.NBTEditor.(Unknown Source) ~[JEXT-Reborn_2.0.8.jar:?] ... 31 more [02:15:33] [Server thread/ERROR]: Could not pass event PlayerInteractEvent to JukeboxExtendedReborn v2.0.8 java.lang.NoClassDefFoundError: Could not initialize class me.spartacus04.jext.dependencies.jext-reborn.nbteditor.NBTEditor at JEXT-Reborn_2.0.8.jar/me.spartacus04.jext.discs.Disc$Companion.stop(Unknown Source) ~[JEXT-Reborn_2.0.8.jar:?] at JEXT-Reborn_2.0.8.jar/me.spartacus04.jext.listeners.JukeboxClickEvent.defaultBehaviour(Unknown Source) ~[JEXT-Reborn_2.0.8.jar:?] at JEXT-Reborn_2.0.8.jar/me.spartacus04.jext.listeners.JukeboxClickEvent.onJukeboxInteract(Unknown Source) ~[JEXT-Reborn_2.0.8.jar:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor10.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:1.20.6-147-e41d44f] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:593) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.server.level.ServerPlayerGameMode.useItemOn(ServerPlayerGameMode.java:531) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.server.network.ServerGamePacketListenerImpl.handleUseItemOn(ServerGamePacketListenerImpl.java:1931) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.handle(ServerboundUseItemOnPacket.java:44) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.handle(ServerboundUseItemOnPacket.java:11) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:55) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1511) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:195) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1488) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1411) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1377) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1238) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323) ~[paper-1.20.6.jar:1.20.6-147-e41d44f] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?] Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.ArrayIndexOutOfBoundsException: Index 3 out of bounds for length 3 [in thread "Server thread"] at JEXT-Reborn_2.0.8.jar/me.spartacus04.jext.dependencies.jext-reborn.nbteditor.NBTEditor.(Unknown Source) ~[JEXT-Reborn_2.0.8.jar:?] at JEXT-Reborn_2.0.8.jar/me.spartacus04.jext.discs.Disc$Companion.stop(Unknown Source) ~[JEXT-Reborn_2.0.8.jar:?] at JEXT-Reborn_2.0.8.jar/me.spartacus04.jext.discs.Disc.play(Unknown Source) ~[JEXT-Reborn_2.0.8.jar:?] at JEXT-Reborn_2.0.8.jar/me.spartacus04.jext.discs.Disc.play$default(Unknown Source) ~[JEXT-Reborn_2.0.8.jar:?] ... 28 more [02:16:04] [Server thread/INFO]: Server Plugins (2): [02:16:04] [Server thread/INFO]: Bukkit Plugins: [02:16:04] [Server thread/INFO]: - JukeboxExtendedReborn, ProtocolLib [02:16:07] [Server thread/INFO]: Stopping the server [02:16:07] [Server thread/INFO]: Stopping server [02:16:07] [Server thread/INFO]: [JEXT] Disabling JukeboxExtendedReborn v2.0.8 [02:16:07] [Server thread/INFO]: [JEXT] Webserver stopped [02:16:07] [Server thread/INFO]: [JEXT] Disabled Jukebox Extended Reborn, Mi Re Do! [02:16:07] [Server thread/INFO]: [ProtocolLib] Disabling ProtocolLib v5.3.0-SNAPSHOT-721 [02:16:07] [Server thread/INFO]: Saving players [02:16:07] [Server thread/INFO]: LordOfTheTopacio lost connection: Server closed [02:16:07] [Server thread/INFO]: LordOfTheTopacio left the game [02:16:07] [Server thread/INFO]: Saving worlds [02:16:07] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld [02:16:07] [Server thread/INFO]: [ChunkHolderManager] Waiting 60s for chunk system to halt for world 'world' [02:16:07] [Server thread/INFO]: [ChunkHolderManager] Halted chunk system for world 'world' [02:16:07] [Server thread/INFO]: [ChunkHolderManager] Saving all chunkholders for world 'world' [02:16:08] [Server thread/INFO]: [ChunkHolderManager] Saved 675 block chunks, 675 entity chunks, 0 poi chunks in world 'world' in 1,38s [02:16:08] [Server thread/INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved [02:16:08] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world_nether]'/minecraft:the_nether [02:16:08] [Server thread/INFO]: [ChunkHolderManager] Waiting 60s for chunk system to halt for world 'world_nether' [02:16:08] [Server thread/INFO]: [ChunkHolderManager] Halted chunk system for world 'world_nether' [02:16:08] [Server thread/INFO]: [ChunkHolderManager] Saving all chunkholders for world 'world_nether' [02:16:08] [Server thread/INFO]: [ChunkHolderManager] Saved 49 block chunks, 49 entity chunks, 0 poi chunks in world 'world_nether' in 0,06s [02:16:08] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved [02:16:08] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world_the_end]'/minecraft:the_end [02:16:08] [Server thread/INFO]: [ChunkHolderManager] Waiting 60s for chunk system to halt for world 'world_the_end' [02:16:08] [Server thread/INFO]: [ChunkHolderManager] Halted chunk system for world 'world_the_end' [02:16:08] [Server thread/INFO]: [ChunkHolderManager] Saving all chunkholders for world 'world_the_end' [02:16:08] [Server thread/INFO]: [ChunkHolderManager] Saved 49 block chunks, 49 entity chunks, 0 poi chunks in world 'world_the_end' in 0,04s [02:16:08] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved [02:16:08] [Server thread/INFO]: ThreadedAnvilChunkStorage: All dimensions are saved [02:16:08] [Server thread/INFO]: Flushing Chunk IO [02:16:08] [Server thread/INFO]: Closing Thread Pool [02:16:08] [Server thread/INFO]: Closing Server

Logs

No response

Server Version

1.20.6

Server Type

Paper

Discs.json

{
  "gtavigtavione": {
    "sounds": [
      {
        "name": "records/gtavigtavione",
        "stream": true
      }
    ]
  }
}

Resource pack

No response

Jukebox Behaviour

Vanilla

Before submitting the issue

jack1888x commented 2 months ago

I have the same problem....

LeonMT1 commented 2 months ago

i have the same problem but in 1.21

spartacus04 commented 2 months ago

1.21 is not currently supported, I'm working on it and will release an update when ready

IIIvanov22 commented 2 months ago

Have you fixed this?