libraryaddict / LibsDisguises

Minecraft disguise plugin
https://www.spigotmc.org/resources/libs-disguises.32453/
Other
262 stars 129 forks source link

CatWatcher issues on 1.20.6 #763

Closed andrewkm closed 2 months ago

andrewkm commented 4 months ago

CatWatcher issues on 1.20.6 Haven't tested on 1.21 yet.

https://pastebin.com/raw/vpyQrpgv Paper 1.20.6 Build 148 Libsdisguises compiled against https://github.com/libraryaddict/LibsDisguises/commit/adc9c7a6d0fc06da3127c9cc0761c6149b21f63a

libraryaddict commented 4 months ago

I'd put money on that this is caused by you compiling against #762, which references the new spigot changes and breaks backwards compatibility.

Honestly, I'm not sure how to address the issue. From my basic level of understanding, if you compile against the latest spigot then the bytecode will seek an interface but breaks older versions of MC. If you compile against older versions, you got this issue! - Probably fine if you compile against older versions actually, but it means you can't update plugins. This might be because I compile down to java 8, but it feels like this might not have been tested for backwards compatibility.

andrewkm commented 4 months ago

This is also a problem on Paper 1.21 Build 49 and /dis cat does not work.

[16:58:47] [Server thread/INFO]: This server is running Paper version 1.21-48-master@70b0e84 (2024-07-08T19:27:11Z) (Implementing API version 1.21-R0.1-SNAPSHOT)

[16:59:11] [Server thread/INFO]: [LibsDisguises] Enabling LibsDisguises v10.0.44-SNAPSHOT
[16:59:11] [Server thread/INFO]: [LibsDisguises] File Name: LibsDisguises.jar
[16:59:11] [Server thread/INFO]: [LibsDisguises] Discovered nms version: (Package: {Not package relocated}) (LD: v1_21_R1) (MC: 1.21)
[16:59:11] [Server thread/INFO]: [LibsDisguises] Jenkins Build: unknown
[16:59:11] [Server thread/INFO]: [LibsDisguises] Build Date: 09/07/2024 15:44
[16:59:11] [Server thread/INFO]: [LibsDisguises] Found a premium Lib's Disguises jar (v10.0.44, build #1314, created 10/04/2024 02:12)
[16:59:11] [Server thread/INFO]: [LibsDisguises] Registered to: 2 (2)
[16:59:11] [Server thread/INFO]: [LibsDisguises] Premium enabled, thank you for supporting Lib's Disguises!
[16:59:12] [Server thread/INFO]: [LibsDisguises] DEBUG: Skipped method using java.util.List, don't need it in experimental builds
[16:59:12] [Server thread/INFO]: [LibsDisguises] DEBUG: Skipped method using me.libraryaddict.disguise.disguisetypes.TargetedDisguise, don't need it in experimental builds
[16:59:12] [Server thread/INFO]: [LibsDisguises] DEBUG: Skipped method using org.bukkit.inventory.EntityEquipment, don't need it in experimental builds
[16:59:12] [Server thread/INFO]: [LibsDisguises] DEBUG: Skipped method using boolean[], don't need it in experimental builds
[16:59:12] [Server thread/INFO]: [LibsDisguises] DEBUG: Skipped method using org.bukkit.potion.PotionEffectType[], don't need it in experimental builds
[16:59:12] [Server thread/INFO]: [LibsDisguises] DEBUG: Skipped method using org.bukkit.entity.Entity, don't need it in experimental builds
[16:59:12] [Server thread/INFO]: [LibsDisguises] DEBUG: Skipped method using com.github.retrooper.packetevents.protocol.entity.villager.VillagerData, don't need it in experimental builds
[16:59:12] [Server thread/INFO]: [LibsDisguises] DEBUG: Skipped method using org.bukkit.block.data.BlockData, don't need it in experimental builds
[16:59:12] [Server thread/INFO]: [LibsDisguises] DEBUG: Skipped method using java.util.UUID, don't need it in experimental builds
[16:59:12] [Server thread/INFO]: [LibsDisguises] DEBUG: Skipped method using java.util.Optional, don't need it in experimental builds
[16:59:12] [Server thread/INFO]: [LibsDisguises] DEBUG: Skipped method using org.bukkit.entity.Spellcaster$Spell, don't need it in experimental builds
[16:59:12] [Server thread/INFO]: [LibsDisguises] DEBUG: Skipped method using int[], don't need it in experimental builds
[16:59:12] [Server thread/WARN]: java.lang.reflect.InvocationTargetException
[16:59:12] [Server thread/WARN]:    at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:74)
[16:59:12] [Server thread/WARN]:    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
[16:59:12] [Server thread/WARN]:    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
[16:59:12] [Server thread/WARN]:    at LibsDisguises.jar//me.libraryaddict.disguise.disguisetypes.Disguise.createDisguise(Disguise.java:323)
[16:59:12] [Server thread/WARN]:    at LibsDisguises.jar//me.libraryaddict.disguise.disguisetypes.MobDisguise.<init>(MobDisguise.java:33)
[16:59:12] [Server thread/WARN]:    at LibsDisguises.jar//me.libraryaddict.disguise.disguisetypes.MobDisguise.<init>(MobDisguise.java:18)
[16:59:12] [Server thread/WARN]:    at LibsDisguises.jar//me.libraryaddict.disguise.utilities.parser.DisguiseParser.createDefaultMethods(DisguiseParser.java:125)
[16:59:12] [Server thread/WARN]:    at LibsDisguises.jar//me.libraryaddict.disguise.LibsDisguises.runBackendStuff(LibsDisguises.java:257)
[16:59:12] [Server thread/WARN]:    at LibsDisguises.jar//me.libraryaddict.disguise.LibsDisguises.onEnable(LibsDisguises.java:221)
[16:59:12] [Server thread/WARN]:    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:288)
[16:59:12] [Server thread/WARN]:    at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202)
[16:59:12] [Server thread/WARN]:    at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109)
[16:59:12] [Server thread/WARN]:    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520)
[16:59:12] [Server thread/WARN]:    at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:629)
[16:59:12] [Server thread/WARN]:    at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:578)
[16:59:12] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:752)
[16:59:12] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:514)
[16:59:12] [Server thread/WARN]:    at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:327)
[16:59:12] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1219)
[16:59:12] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329)
[16:59:12] [Server thread/WARN]:    at java.base/java.lang.Thread.run(Thread.java:1570)
[16:59:12] [Server thread/WARN]: Caused by: java.lang.IncompatibleClassChangeError: Method 'org.bukkit.entity.Cat$Type[] org.bukkit.entity.Cat$Type.values()' must be Methodref constant
[16:59:12] [Server thread/WARN]:    at LibsDisguises.jar//me.libraryaddict.disguise.disguisetypes.watchers.CatWatcher.<init>(CatWatcher.java:24)
[16:59:12] [Server thread/WARN]:    at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
[16:59:12] [Server thread/WARN]:    ... 20 more
[16:59:12] [Server thread/WARN]: java.lang.reflect.InvocationTargetException
[16:59:12] [Server thread/WARN]:    at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:74)
[16:59:12] [Server thread/WARN]:    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
[16:59:12] [Server thread/WARN]:    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
[16:59:12] [Server thread/WARN]:    at LibsDisguises.jar//me.libraryaddict.disguise.utilities.parser.DisguiseParser.createDefaultMethods(DisguiseParser.java:132)
[16:59:12] [Server thread/WARN]:    at LibsDisguises.jar//me.libraryaddict.disguise.LibsDisguises.runBackendStuff(LibsDisguises.java:257)
[16:59:12] [Server thread/WARN]:    at LibsDisguises.jar//me.libraryaddict.disguise.LibsDisguises.onEnable(LibsDisguises.java:221)
[16:59:12] [Server thread/WARN]:    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:288)
[16:59:12] [Server thread/WARN]:    at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202)
[16:59:12] [Server thread/WARN]:    at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109)
[16:59:12] [Server thread/WARN]:    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520)
[16:59:12] [Server thread/WARN]:    at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:629)
[16:59:12] [Server thread/WARN]:    at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:578)
[16:59:12] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:752)
[16:59:12] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:514)
[16:59:12] [Server thread/WARN]:    at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:327)
[16:59:12] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1219)
[16:59:12] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329)
[16:59:12] [Server thread/WARN]:    at java.base/java.lang.Thread.run(Thread.java:1570)
[16:59:12] [Server thread/WARN]: Caused by: java.lang.IncompatibleClassChangeError: Method 'org.bukkit.entity.Cat$Type[] org.bukkit.entity.Cat$Type.values()' must be Methodref constant
[16:59:12] [Server thread/WARN]:    at LibsDisguises.jar//me.libraryaddict.disguise.disguisetypes.watchers.CatWatcher.<init>(CatWatcher.java:24)
[16:59:12] [Server thread/WARN]:    at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
[16:59:12] [Server thread/WARN]:    ... 17 more
[16:59:12] [Server thread/INFO]: [LibsDisguises] Loaded custom disguise libraryaddict
[16:59:12] [Server thread/INFO]: [LibsDisguises] Loaded 1 custom disguise
[16:59:12] [Server thread/INFO]: [LibsDisguises] Config is up to date!
[16:59:12] [Server thread/INFO]: [LibsDisguises] The author sees Metrics disabled, the author is sad

As well as using /dis cat

[17:00:02] [Server thread/INFO]: valese issued server command: /dis cat
[17:00:02] [Server thread/WARN]: java.lang.reflect.InvocationTargetException
[17:00:02] [Server thread/WARN]:    at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:74)
[17:00:02] [Server thread/WARN]:    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
[17:00:02] [Server thread/WARN]:    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
[17:00:02] [Server thread/WARN]:    at LibsDisguises.jar//me.libraryaddict.disguise.disguisetypes.Disguise.createDisguise(Disguise.java:323)
[17:00:02] [Server thread/WARN]:    at LibsDisguises.jar//me.libraryaddict.disguise.disguisetypes.MobDisguise.<init>(MobDisguise.java:33)
[17:00:02] [Server thread/WARN]:    at LibsDisguises.jar//me.libraryaddict.disguise.disguisetypes.MobDisguise.<init>(MobDisguise.java:18)
[17:00:02] [Server thread/WARN]:    at LibsDisguises.jar//me.libraryaddict.disguise.utilities.parser.DisguiseParser.parseDisguise(DisguiseParser.java:1016)
[17:00:02] [Server thread/WARN]:    at LibsDisguises.jar//me.libraryaddict.disguise.commands.disguise.DisguiseCommand.onCommand(DisguiseCommand.java:51)
[17:00:02] [Server thread/WARN]:    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[17:00:02] [Server thread/WARN]:    at io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(BukkitCommandNode.java:91)
[17:00:02] [Server thread/WARN]:    at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73)
[17:00:02] [Server thread/WARN]:    at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:31)
[17:00:02] [Server thread/WARN]:    at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:19)
[17:00:02] [Server thread/WARN]:    at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8)
[17:00:02] [Server thread/WARN]:    at net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5)
[17:00:02] [Server thread/WARN]:    at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:103)
[17:00:02] [Server thread/WARN]:    at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:443)
[17:00:02] [Server thread/WARN]:    at net.minecraft.commands.Commands.performCommand(Commands.java:350)
[17:00:02] [Server thread/WARN]:    at net.minecraft.commands.Commands.performCommand(Commands.java:337)
[17:00:02] [Server thread/WARN]:    at net.minecraft.commands.Commands.performCommand(Commands.java:332)
[17:00:02] [Server thread/WARN]:    at net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2147)
[17:00:02] [Server thread/WARN]:    at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$11(ServerGamePacketListenerImpl.java:2121)
[17:00:02] [Server thread/WARN]:    at net.minecraft.server.TickTask.run(TickTask.java:18)
[17:00:02] [Server thread/WARN]:    at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151)
[17:00:02] [Server thread/WARN]:    at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24)
[17:00:02] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1541)
[17:00:02] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201)
[17:00:02] [Server thread/WARN]:    at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125)
[17:00:02] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1518)
[17:00:02] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1511)
[17:00:02] [Server thread/WARN]:    at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135)
[17:00:02] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1470)
[17:00:02] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1477)
[17:00:02] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1322)
[17:00:02] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329)
[17:00:02] [Server thread/WARN]:    at java.base/java.lang.Thread.run(Thread.java:1570)
[17:00:02] [Server thread/WARN]: Caused by: java.lang.IncompatibleClassChangeError: Method 'org.bukkit.entity.Cat$Type[] org.bukkit.entity.Cat$Type.values()' must be Methodref constant
[17:00:02] [Server thread/WARN]:    at LibsDisguises.jar//me.libraryaddict.disguise.disguisetypes.watchers.CatWatcher.<init>(CatWatcher.java:24)
[17:00:02] [Server thread/WARN]:    at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
[17:00:02] [Server thread/WARN]:    ... 35 more
[17:00:02] [Server thread/WARN]: java.lang.NullPointerException: Cannot invoke "Object.getClass()" because the return value of "me.libraryaddict.disguise.disguisetypes.Disguise.getWatcher()" is null
[17:00:02] [Server thread/WARN]:    at LibsDisguises.jar//me.libraryaddict.disguise.utilities.parser.DisguiseParser.callMethods(DisguiseParser.java:1081)
[17:00:02] [Server thread/WARN]:    at LibsDisguises.jar//me.libraryaddict.disguise.utilities.parser.DisguiseParser.parseDisguise(DisguiseParser.java:1066)
[17:00:02] [Server thread/WARN]:    at LibsDisguises.jar//me.libraryaddict.disguise.commands.disguise.DisguiseCommand.onCommand(DisguiseCommand.java:51)
[17:00:02] [Server thread/WARN]:    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[17:00:02] [Server thread/WARN]:    at io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(BukkitCommandNode.java:91)
[17:00:02] [Server thread/WARN]:    at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73)
[17:00:02] [Server thread/WARN]:    at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:31)
[17:00:02] [Server thread/WARN]:    at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:19)
[17:00:02] [Server thread/WARN]:    at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8)
[17:00:02] [Server thread/WARN]:    at net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5)
[17:00:02] [Server thread/WARN]:    at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:103)
[17:00:02] [Server thread/WARN]:    at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:443)
[17:00:02] [Server thread/WARN]:    at net.minecraft.commands.Commands.performCommand(Commands.java:350)
[17:00:02] [Server thread/WARN]:    at net.minecraft.commands.Commands.performCommand(Commands.java:337)
[17:00:02] [Server thread/WARN]:    at net.minecraft.commands.Commands.performCommand(Commands.java:332)
[17:00:02] [Server thread/WARN]:    at net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2147)
[17:00:02] [Server thread/WARN]:    at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$11(ServerGamePacketListenerImpl.java:2121)
[17:00:02] [Server thread/WARN]:    at net.minecraft.server.TickTask.run(TickTask.java:18)
[17:00:02] [Server thread/WARN]:    at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151)
[17:00:02] [Server thread/WARN]:    at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24)
[17:00:02] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1541)
[17:00:02] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201)
[17:00:02] [Server thread/WARN]:    at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125)
[17:00:02] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1518)
[17:00:02] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1511)
[17:00:02] [Server thread/WARN]:    at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135)
[17:00:02] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1470)
[17:00:02] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1477)
[17:00:02] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1322)
[17:00:02] [Server thread/WARN]:    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329)
[17:00:02] [Server thread/WARN]:    at java.base/java.lang.Thread.run(Thread.java:1570)
[17:00:07] [Server thread/INFO]: valese issued server command: /seedis
[17:00:09] [Server thread/INFO]: valese issued server command: /seedis
[17:00:12] [Server thread/INFO]: valese issued server command: /dis wolf
[17:00:14] [Server thread/INFO]: valese issued server command: /undis