Skip to content

/attachcommand doesn't work in newer versions #93

Description

@wanghaowei6666

server version is paper 1.21.4. when adding a new line using /attachcommand, the server warns

[22:18:04 WARN]: java.lang.IllegalArgumentException: argument type mismatch
[22:18:04 WARN]: at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:107)
[22:18:04 WARN]: at java.base/java.lang.reflect.Method.invoke(Method.java:580)
[22:18:04 WARN]: at CMILib1.5.9.0.jar//net.Zrips.CMILib.NBT.CMINBTLegacy.asBukkitCopy(CMINBTLegacy.java:1844)
[22:18:04 WARN]: at CMILib1.5.9.0.jar//net.Zrips.CMILib.NBT.CMINBTLegacy.setTag(CMINBTLegacy.java:1619)
[22:18:04 WARN]: at CMILib1.5.9.0.jar//net.Zrips.CMILib.NBT.CMINBTLegacy.setInt(CMINBTLegacy.java:1153)
[22:18:04 WARN]: at CMILib1.5.9.0.jar//net.Zrips.CMILib.NBT.CMINBT.setInt(CMINBT.java:138)
[22:18:04 WARN]: at CMI-9.8.5.0.jar//com.Zrips.CMI.Modules.AttachedCommands.CustomNBTManager.clear(CustomNBTManager.java:80)
[22:18:04 WARN]: at CMI-9.8.5.0.jar//com.Zrips.CMI.commands.list.attachcommand$1.onUpdate(attachcommand.java:166)
[22:18:04 WARN]: at CMILib1.5.9.0.jar//net.Zrips.CMILib.Chat.ChatMessageListEdit$5$1.run(ChatMessageListEdit.java:253)
[22:18:04 WARN]: at CMILib1.5.9.0.jar//net.Zrips.CMILib.Chat.ChatEditorManager.perform(ChatEditorManager.java:39)
[22:18:04 WARN]: at CMILib1.5.9.0.jar//net.Zrips.CMILib.Chat.ChatEditorListener.lambda$AsyncPlayerChatEvent$0(ChatEditorListener.java:32)
[22:18:04 WARN]: at CMILib1.5.9.0.jar//net.Zrips.CMILib.Version.Schedulers.CMIBukkitImpl.lambda$runTask$0(CMIBukkitImpl.java:33)
[22:18:04 WARN]: at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:78)
[22:18:04 WARN]: at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:474)
[22:18:04 WARN]: at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1659)
[22:18:04 WARN]: at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1529)
[22:18:04 WARN]: at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1251)
[22:18:04 WARN]: at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:310)
[22:18:04 WARN]: at java.base/java.lang.Thread.run(Thread.java:1583)
[22:18:04 WARN]: [CMILib] Task #20119836 for CMILib v1.5.9.0 generated an exception
java.lang.NullPointerException: Cannot invoke "net.Zrips.CMILib.PersistentData.CMIPersistentDataContainer.remove(String)" because the return value of "net.Zrips.CMILib.PersistentData.CMIPersistentDataContainer.get(Object)" is null
at CMILib1.5.9.0.jar/net.Zrips.CMILib.NBT.CMINBTLegacy.setInt(CMINBTLegacy.java:1143) ~[CMILib1.5.9.0.jar:?]
at CMILib1.5.9.0.jar/net.Zrips.CMILib.NBT.CMINBT.setInt(CMINBT.java:138) ~[CMILib1.5.9.0.jar:?]
at CMI-9.8.5.0.jar/com.Zrips.CMI.Modules.AttachedCommands.CustomNBTManager.clear(CustomNBTManager.java:81) ~[CMI-9.8.5.0.jar:?]
at CMI-9.8.5.0.jar/com.Zrips.CMI.commands.list.attachcommand$1.onUpdate(attachcommand.java:166) ~[CMI-9.8.5.0.jar:?]
at CMILib1.5.9.0.jar/net.Zrips.CMILib.Chat.ChatMessageListEdit$5$1.run(ChatMessageListEdit.java:253) ~[CMILib1.5.9.0.jar:?]
at CMILib1.5.9.0.jar/net.Zrips.CMILib.Chat.ChatEditorManager.perform(ChatEditorManager.java:39) ~[CMILib1.5.9.0.jar:?]
at CMILib1.5.9.0.jar/net.Zrips.CMILib.Chat.ChatEditorListener.lambda$AsyncPlayerChatEvent$0(ChatEditorListener.java:32) ~[CMILib1.5.9.0.jar:?]
at CMILib1.5.9.0.jar/net.Zrips.CMILib.Version.Schedulers.CMIBukkitImpl.lambda$runTask$0(CMIBukkitImpl.java:33) ~[CMILib1.5.9.0.jar:?]
at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:78) ~[paper-1.21.4.jar:1.21.4-232-12d8fe0]
at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:474) ~[paper-1.21.4.jar:1.21.4-232-12d8fe0]
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1659) ~[paper-1.21.4.jar:1.21.4-232-12d8fe0]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1529) ~[paper-1.21.4.jar:1.21.4-232-12d8fe0]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1251) ~[paper-1.21.4.jar:1.21.4-232-12d8fe0]
at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:310) ~[paper-1.21.4.jar:1.21.4-232-12d8fe0]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions