3.0.0 throws error when enchantment books are retrieved from a chest.
Closed this issue · 4 comments
Kenaestic commented
As the title says, I get this error when retrieving enchantment books from a chest:
java.lang.ClassCastException: class org.bukkit.block.DoubleChest cannot be cast to class com.loohp.bookshelf.objectholders.BookshelfHolder (org.bukkit.block.DoubleChest is in unnamed module of loader 'app'; com.loohp.bookshelf.objectholders.BookshelfHolder is in unnamed module of loader org.bukkit.plugin.java.PluginClassLoader @445d734c)
at com.loohp.bookshelf.listeners.BookshelfEvents.onUse(BookshelfEvents.java:362) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor1329.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.5.jar:git-Paper-601]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.5.jar:git-Paper-601]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.5.jar:git-Paper-601]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.16.5.jar:git-Paper-601]
at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:2700) ~[patched_1.16.5.jar:git-Paper-601]
at net.minecraft.server.v1_16_R3.PacketPlayInWindowClick.a(SourceFile:32) ~[patched_1.16.5.jar:git-Paper-601]
at net.minecraft.server.v1_16_R3.PacketPlayInWindowClick.a(SourceFile:10) ~[patched_1.16.5.jar:git-Paper-601]
at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:35) ~[patched_1.16.5.jar:git-Paper-601]
at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[patched_1.16.5.jar:git-Paper-601]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.5.jar:git-Paper-601]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.5.jar:git-Paper-601]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.5.jar:git-Paper-601]
at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1262) ~[patched_1.16.5.jar:git-Paper-601]
at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1255) ~[patched_1.16.5.jar:git-Paper-601]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.16.5.jar:git-Paper-601]
at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1216) ~[patched_1.16.5.jar:git-Paper-601]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1130) ~[patched_1.16.5.jar:git-Paper-601]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:289) ~[patched_1.16.5.jar:git-Paper-601]
Probably cause could be a custom enchantment plugin I use called EcoEnchants, though this also happens with vanilla enchantments.
Server version: Paper 1.16.5 newest build
Java version: Java 11 hotspot
Kenaestic commented
Config.yml for what it's worth:
# For information on what each option does. Please refer to https://github.com/LOOHP/Bookshelf/blob/master/src/main/resources/config.yml
Options:
Title: Bookshelf
BookShelfRows: 2
UseWhitelist: true
Whitelist:
- BOOK
- WRITABLE_BOOK
- WRITTEN_BOOK
- ENCHANTED_BOOK
- KNOWLEDGE_BOOK
NoPermissionToReloadMessage: '&cYou do not have permission use this command!'
NoPermissionToUpdateMessage: '&cYou do not have permission use this command!'
ParticlesWhenOpened: true
EnableHopperSupport: false
EnableDropperSupport: false
EnableEnchantmentTableBoosting: true
EnchantmentTableBoostingMaxPercentage: 120
Updater: true
Kenaestic commented
Upon further testing it seems that the error is not only limited to books, but a variety of items except for music discs for some reason.
LOOHP commented
Should be fixed in 3.0.0.1
Kenaestic commented
Confirmed. Thanks :)