Minepacks API not working on Tuinity servers
mfnalex opened this issue ยท 9 comments
Information
Environment information
Plugin + server version info:
[00:47:29 INFO]: ##### Start Minepacks version info #####
[00:47:29 INFO]: Minepacks: 2.3.11-Release
[00:47:29 INFO]: Server: git-Tuinity-"a608f71" (MC: 1.16.1)
[00:47:29 INFO]: Java: 13.0.1
[00:47:29 INFO]: ##### End Minepacks version info #####
Online mode: yes
BungeeCord: no
Server/crash log
[00:48:22 ERROR]: Could not pass event PlayerDeathEvent to AngelChest v2.15.1
java.lang.ClassCastException: class at.pcgamingfreaks.Minepacks.Bukkit.MinepacksBadRabbit cannot be cast to class at.pcgamingfreaks.Minepacks.Bukkit.API.MinepacksPlugin (at.pcgamingfreaks.Minepacks.Bukkit.MinepacksBadRabbit and at.pcgamingfreaks.Minepacks.Bukkit.API.MinepacksPlugin are in unnamed module of loader org.bukkit.plugin.java.PluginClassLoader @75bf0d10)
at de.jeff_media.AngelChest.MinepacksHook.isMinepacksBackpack(MinepacksHook.java:22) ~[?:?]
at de.jeff_media.AngelChest.AngelChest.toBeRemoved(AngelChest.java:205) ~[?:?]
at de.jeff_media.AngelChest.AngelChest.<init>(AngelChest.java:162) ~[?:?]
at de.jeff_media.AngelChest.PlayerListener.spawnAngelChest(PlayerListener.java:133) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor65.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at org.bukkit.craftbukkit.v1_16_R1.event.CraftEventFactory.callPlayerDeathEvent(CraftEventFactory.java:819) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.EntityPlayer.die(EntityPlayer.java:664) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.EntityLiving.damageEntity(EntityLiving.java:1261) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.EntityHuman.damageEntity(EntityHuman.java:761) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.EntityPlayer.damageEntity(EntityPlayer.java:833) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.EntityLiving.killEntity(EntityLiving.java:196) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.CommandKill.a(SourceFile:32) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.CommandKill.a(SourceFile:25) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:262) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:176) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.CommandDispatcher.a(CommandDispatcher.java:180) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at org.bukkit.craftbukkit.v1_16_R1.command.VanillaCommandWrapper.execute(VanillaCommandWrapper.java:45) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at org.bukkit.craftbukkit.v1_16_R1.CraftServer.dispatchCommand(CraftServer.java:794) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.PlayerConnection.handleCommand(PlayerConnection.java:1921) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.PlayerConnection.a(PlayerConnection.java:1732) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.PacketPlayInChat.a(PacketPlayInChat.java:47) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.PacketPlayInChat.a(PacketPlayInChat.java:5) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:43) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.TickTask.run(SourceFile:18) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.MinecraftServer.aZ(MinecraftServer.java:1191) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.MinecraftServer.executeNext(MinecraftServer.java:1184) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.MinecraftServer.sleepForTick(MinecraftServer.java:1160) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:1004) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$a$0(MinecraftServer.java:177) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at java.lang.Thread.run(Thread.java:830) [?:?]
Details
Description
Happens when trying to access the API by casting the JavaPlugin to MinepacksPlugin
Steps to reproduce
if(!(Bukkit.getPluginManager().getPlugin("Minepacks") != null)) {
return false;
}
MinepacksPlugin minepacks = (MinepacksPlugin) Bukkit.getPluginManager().getPlugin("Minepacks");
Expected behavior
Getting instance of MinepacksPlugin instead of something with BadRabbits
Other information (e.g. detailed explanation, related issues, suggestions how to fix, links for us to have context, screenshots, etc.)
AFAIK it worked fine using Minepacks 2.3.8
I can confirm, the Minepacks API currently does not work on Tuinity server with the release builds of the plugin.
Also, you probably should not use the lowest event priority to create your chest. This will force your plugin to run first and thus prevent other plugins from changing the drop list or cancel the event all together. If your plugin would run with highest priority (runs last, only monitor runs after it, but you aren't supposed to change the event there anymore) you would not have to hook into Minepacks (and maybe other plugins) because Minepacks already has removed the item form the drop list.
Actually setting the prio to highest will not work for so many plugins because they somehow want to set setKeepInventory to true. It's easier for me to scan for certain items and remove those myself
Still the same problem
[16:00:56 ERROR]: Could not pass event PlayerDeathEvent to AngelChest v2.15.2
java.lang.ClassCastException: class at.pcgamingfreaks.Minepacks.Bukkit.MinepacksBadRabbit cannot be cast to class at.pcgamingfreaks.Minepacks.Bukkit.API.MinepacksPlugin (at.pcgamingfreaks.Minepacks.Bukkit.MinepacksBadRabbit and at.pcgamingfreaks.Minepacks.Bukkit.API.MinepacksPlugin are in unnamed module of loader org.bukkit.plugin.java.PluginClassLoader @3c568651)
at de.jeff_media.AngelChest.hooks.MinepacksHook.isMinepacksBackpack(MinepacksHook.java:30) ~[?:?]
at de.jeff_media.AngelChest.AngelChest.toBeRemoved(AngelChest.java:206) ~[?:?]
at de.jeff_media.AngelChest.AngelChest.<init>(AngelChest.java:163) ~[?:?]
at de.jeff_media.AngelChest.PlayerListener.spawnAngelChest(PlayerListener.java:133) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor76.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at org.bukkit.craftbukkit.v1_16_R1.event.CraftEventFactory.callPlayerDeathEvent(CraftEventFactory.java:819) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.EntityPlayer.die(EntityPlayer.java:664) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.EntityLiving.damageEntity(EntityLiving.java:1261) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.EntityHuman.damageEntity(EntityHuman.java:761) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.EntityPlayer.damageEntity(EntityPlayer.java:833) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.EntityLiving.killEntity(EntityLiving.java:196) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.CommandKill.a(SourceFile:32) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.CommandKill.a(SourceFile:25) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:262) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:176) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.CommandDispatcher.a(CommandDispatcher.java:180) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at org.bukkit.craftbukkit.v1_16_R1.command.VanillaCommandWrapper.execute(VanillaCommandWrapper.java:45) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at org.bukkit.craftbukkit.v1_16_R1.CraftServer.dispatchCommand(CraftServer.java:794) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.PlayerConnection.handleCommand(PlayerConnection.java:1921) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.PlayerConnection.a(PlayerConnection.java:1732) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.PacketPlayInChat.a(PacketPlayInChat.java:47) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.PacketPlayInChat.a(PacketPlayInChat.java:5) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:43) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.TickTask.run(SourceFile:18) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.MinecraftServer.aZ(MinecraftServer.java:1191) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.MinecraftServer.executeNext(MinecraftServer.java:1184) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.IAsyncTaskHandler.executeAll(IAsyncTaskHandler.java:95) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.MinecraftServer.a(MinecraftServer.java:1315) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:1000) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$a$0(MinecraftServer.java:177) ~[patched_1.16.1.jar:git-Tuinity-"a608f71"]
at java.lang.Thread.run(Thread.java:830) [?:?]
Works fine on Spigot though. I have used the latest Minepacks 2.3.13, both plugin and API in the pom.xml
It should be fixed in v2.3.14.
Oh I thought the auto updater would automatically use that version. Can you roughly say when that's the case?
Bukkit has not yet approved the update. Based on past experience I would say it should be available for auto updates in roughly 6-8 hours.