Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CommandException: Unhandled exception executing 'nbti mod add AttackSpeed 1 16 mainhand' #53

Open
mibby opened this issue Nov 2, 2020 · 3 comments

Comments

@mibby
Copy link

mibby commented Nov 2, 2020

Opening a ticket since the #51 PR was merged before the issue was fixed.

[09:07:19] [Server thread/INFO]: player issued server command: /nbti mod add AttackSpeed 1 16 mainhand
[09:07:19] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing 'nbti mod add AttackSpeed 1 16 mainhand' in com.goncalomb.bukkit.mylib.command.InternalCommand(nbtitem)
	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:169) ~[patched_1.16.3.jar:git-Tuinity-"f7b8e25"]
	at org.bukkit.craftbukkit.v1_16_R2.CraftServer.dispatchCommand(CraftServer.java:802) ~[patched_1.16.3.jar:git-Tuinity-"f7b8e25"]
	at net.minecraft.server.v1_16_R2.PlayerConnection.handleCommand(PlayerConnection.java:1921) ~[patched_1.16.3.jar:git-Tuinity-"f7b8e25"]
	at net.minecraft.server.v1_16_R2.PlayerConnection.a(PlayerConnection.java:1732) ~[patched_1.16.3.jar:git-Tuinity-"f7b8e25"]
	at xuan.cat.xuancatapi.code.paper.v1_16_R2.nms.entity.CodeExtendPlayerConnection.packetIn(CodeExtendPlayerConnection.java:753) ~[?:?]
	at xuan.cat.xuancatapi.code.paper.v1_16_R2.nms.entity.CodeExtendPlayerConnection.packetIn(CodeExtendPlayerConnection.java:604) ~[?:?]
	at xuan.cat.xuancatapi.code.paper.v1_16_R2.nms.entity.CodeExtendPlayerConnection.a(CodeExtendPlayerConnection.java:82) ~[?:?]
	at net.minecraft.server.v1_16_R2.PacketPlayInChat.a(PacketPlayInChat.java:47) ~[patched_1.16.3.jar:git-Tuinity-"f7b8e25"]
	at net.minecraft.server.v1_16_R2.PacketPlayInChat.a(PacketPlayInChat.java:5) ~[patched_1.16.3.jar:git-Tuinity-"f7b8e25"]
	at net.minecraft.server.v1_16_R2.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:43) ~[patched_1.16.3.jar:git-Tuinity-"f7b8e25"]
	at net.minecraft.server.v1_16_R2.TickTask.run(SourceFile:18) ~[patched_1.16.3.jar:git-Tuinity-"f7b8e25"]
	at net.minecraft.server.v1_16_R2.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.3.jar:git-Tuinity-"f7b8e25"]
	at net.minecraft.server.v1_16_R2.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.3.jar:git-Tuinity-"f7b8e25"]
	at net.minecraft.server.v1_16_R2.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.3.jar:git-Tuinity-"f7b8e25"]
	at net.minecraft.server.v1_16_R2.MinecraftServer.ba(MinecraftServer.java:1192) ~[patched_1.16.3.jar:git-Tuinity-"f7b8e25"]
	at net.minecraft.server.v1_16_R2.MinecraftServer.executeNext(MinecraftServer.java:1185) ~[patched_1.16.3.jar:git-Tuinity-"f7b8e25"]
	at net.minecraft.server.v1_16_R2.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.16.3.jar:git-Tuinity-"f7b8e25"]
	at net.minecraft.server.v1_16_R2.MinecraftServer.sleepForTick(MinecraftServer.java:1161) ~[patched_1.16.3.jar:git-Tuinity-"f7b8e25"]
	at net.minecraft.server.v1_16_R2.MinecraftServer.w(MinecraftServer.java:1005) ~[patched_1.16.3.jar:git-Tuinity-"f7b8e25"]
	at net.minecraft.server.v1_16_R2.MinecraftServer.lambda$a$0(MinecraftServer.java:178) ~[patched_1.16.3.jar:git-Tuinity-"f7b8e25"]
	at java.lang.Thread.run(Thread.java:832) [?:?]
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
	at com.goncalomb.bukkit.mylib.command.MySubCommand.invokeExeMethod(MySubCommand.java:203) ~[?:?]
	at com.goncalomb.bukkit.mylib.command.MySubCommand.execute(MySubCommand.java:122) ~[?:?]
	at com.goncalomb.bukkit.mylib.command.MySubCommand.execute(MySubCommand.java:112) ~[?:?]
	at com.goncalomb.bukkit.mylib.command.MySubCommand.execute(MySubCommand.java:112) ~[?:?]
	at com.goncalomb.bukkit.mylib.command.InternalCommand.execute(InternalCommand.java:43) ~[?:?]
	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[patched_1.16.3.jar:git-Tuinity-"f7b8e25"]
	... 20 more
Caused by: java.lang.NullPointerException
	at com.goncalomb.bukkit.nbteditor.nbt.attributes.ItemModifier.toNBT(ItemModifier.java:90) ~[?:?]
	at com.goncalomb.bukkit.nbteditor.nbt.attributes.ItemModifier.setItemStackModifiers(ItemModifier.java:64) ~[?:?]
	at com.goncalomb.bukkit.nbteditor.commands.CommandNBTItem.mod_add(CommandNBTItem.java:96) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:564) ~[?:?]
	at com.goncalomb.bukkit.mylib.command.MySubCommand.invokeExeMethod(MySubCommand.java:197) ~[?:?]
	at com.goncalomb.bukkit.mylib.command.MySubCommand.execute(MySubCommand.java:122) ~[?:?]
	at com.goncalomb.bukkit.mylib.command.MySubCommand.execute(MySubCommand.java:112) ~[?:?]
	at com.goncalomb.bukkit.mylib.command.MySubCommand.execute(MySubCommand.java:112) ~[?:?]
	at com.goncalomb.bukkit.mylib.command.InternalCommand.execute(InternalCommand.java:43) ~[?:?]
	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[patched_1.16.3.jar:git-Tuinity-"f7b8e25"]
	... 20 more
@goncalomb
Copy link
Owner

I'm having difficulty replicating this, you said on #51 that it is related to CustomModelData... Can you give me a copy of your item with/nbi tocommand? Are you on 1.16.3?

@goncalomb
Copy link
Owner

Let me know if you are still experiencing this problem with the latest build. It might have been fixed on #54.

@mibby
Copy link
Author

mibby commented Dec 19, 2020

@goncalomb I don't seem to be getting this error anymore but I am receiving this one instead.

NBTEditor compiled as of f8012cc on 1.16.4 Spigot.

https://paste.gg/p/anonymous/f1a8f76381a143c3956a950c1f0f20ed/files/df39d44142ea4dc3ba61b6209bba6f6f/raw

org.bukkit.command.CommandException: Unhandled exception executing tab-completer for 'bos attr del ' in com.goncalomb.bukkit.mylib.command.InternalCommand(bookofsouls)
	at org.bukkit.command.SimpleCommandMap.tabComplete(SimpleCommandMap.java:250) ~[patched_1.16.4.jar:git-Yatopia-"2b78178"]
	at org.bukkit.craftbukkit.v1_16_R3.CraftServer.tabCompleteCommand(CraftServer.java:1922) ~[patched_1.16.4.jar:git-Yatopia-"2b78178"]
	at org.bukkit.craftbukkit.v1_16_R3.CraftServer.tabComplete(CraftServer.java:1894) ~[patched_1.16.4.jar:git-Yatopia-"2b78178"]
	at org.bukkit.craftbukkit.v1_16_R3.command.BukkitCommandWrapper.getSuggestions(BukkitCommandWrapper.java:58) ~[patched_1.16.4.jar:git-Yatopia-"2b78178"]
	at com.mojang.brigadier.tree.ArgumentCommandNode.listSuggestions(ArgumentCommandNode.java:71) ~[patched_1.16.4.jar:git-Yatopia-"2b78178"]
	at com.mojang.brigadier.CommandDispatcher.getCompletionSuggestions(CommandDispatcher.java:597) ~[patched_1.16.4.jar:git-Yatopia-"2b78178"]
	at com.mojang.brigadier.CommandDispatcher.getCompletionSuggestions(CommandDispatcher.java:579) ~[patched_1.16.4.jar:git-Yatopia-"2b78178"]
	at net.minecraft.server.v1_16_R3.PlayerConnection.lambda$a$7(PlayerConnection.java:654) ~[patched_1.16.4.jar:git-Yatopia-"2b78178"]
	at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[patched_1.16.4.jar:git-Yatopia-"2b78178"]
	at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:151) ~[patched_1.16.4.jar:git-Yatopia-"2b78178"]
	at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.4.jar:git-Yatopia-"2b78178"]
	at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:114) ~[patched_1.16.4.jar:git-Yatopia-"2b78178"]
	at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1203) ~[patched_1.16.4.jar:git-Yatopia-"2b78178"]
	at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1196) ~[patched_1.16.4.jar:git-Yatopia-"2b78178"]
	at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:125) ~[patched_1.16.4.jar:git-Yatopia-"2b78178"]
	at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1172) ~[patched_1.16.4.jar:git-Yatopia-"2b78178"]
	at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1016) ~[patched_1.16.4.jar:git-Yatopia-"2b78178"]
	at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:180) ~[patched_1.16.4.jar:git-Yatopia-"2b78178"]
	at java.lang.Thread.run(Thread.java:832) [?:?]
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at com.goncalomb.bukkit.mylib.command.MySubCommand.invokeTabMethod(MySubCommand.java:215) ~[?:?]
	at com.goncalomb.bukkit.mylib.command.MySubCommand.tabComplete(MySubCommand.java:175) ~[?:?]
	at com.goncalomb.bukkit.mylib.command.MySubCommand.tabComplete(MySubCommand.java:168) ~[?:?]
	at com.goncalomb.bukkit.mylib.command.MySubCommand.tabComplete(MySubCommand.java:168) ~[?:?]
	at com.goncalomb.bukkit.mylib.command.InternalCommand.tabComplete(InternalCommand.java:53) ~[?:?]
	at org.bukkit.command.Command.tabComplete(Command.java:93) ~[patched_1.16.4.jar:git-Yatopia-"2b78178"]
	at org.bukkit.command.SimpleCommandMap.tabComplete(SimpleCommandMap.java:244) ~[patched_1.16.4.jar:git-Yatopia-"2b78178"]
	... 18 more
Caused by: java.lang.reflect.InvocationTargetException
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:564) ~[?:?]
	at com.goncalomb.bukkit.mylib.command.MySubCommand.invokeTabMethod(MySubCommand.java:213) ~[?:?]
	at com.goncalomb.bukkit.mylib.command.MySubCommand.tabComplete(MySubCommand.java:175) ~[?:?]
	at com.goncalomb.bukkit.mylib.command.MySubCommand.tabComplete(MySubCommand.java:168) ~[?:?]
	at com.goncalomb.bukkit.mylib.command.MySubCommand.tabComplete(MySubCommand.java:168) ~[?:?]
	at com.goncalomb.bukkit.mylib.command.InternalCommand.tabComplete(InternalCommand.java:53) ~[?:?]
	at org.bukkit.command.Command.tabComplete(Command.java:93) ~[patched_1.16.4.jar:git-Yatopia-"2b78178"]
	at org.bukkit.command.SimpleCommandMap.tabComplete(SimpleCommandMap.java:244) ~[patched_1.16.4.jar:git-Yatopia-"2b78178"]
	... 18 more
Caused by: java.lang.NullPointerException
	at com.goncalomb.bukkit.nbteditor.nbt.attributes.Attribute.getMax(Attribute.java:60) ~[?:?]
	at com.goncalomb.bukkit.nbteditor.nbt.attributes.Attribute.setBase(Attribute.java:68) ~[?:?]
	at com.goncalomb.bukkit.nbteditor.nbt.attributes.Attribute.<init>(Attribute.java:48) ~[?:?]
	at com.goncalomb.bukkit.nbteditor.nbt.attributes.Attribute.fromNBT(Attribute.java:35) ~[?:?]
	at com.goncalomb.bukkit.nbteditor.nbt.attributes.AttributeContainer.fromNBT(AttributeContainer.java:36) ~[?:?]
	at com.goncalomb.bukkit.nbteditor.nbt.MobNBT.getAttributes(MobNBT.java:34) ~[?:?]
	at com.goncalomb.bukkit.nbteditor.commands.CommandBOS.tab_del_add(CommandBOS.java:198) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:564) ~[?:?]
	at com.goncalomb.bukkit.mylib.command.MySubCommand.invokeTabMethod(MySubCommand.java:213) ~[?:?]
	at com.goncalomb.bukkit.mylib.command.MySubCommand.tabComplete(MySubCommand.java:175) ~[?:?]
	at com.goncalomb.bukkit.mylib.command.MySubCommand.tabComplete(MySubCommand.java:168) ~[?:?]
	at com.goncalomb.bukkit.mylib.command.MySubCommand.tabComplete(MySubCommand.java:168) ~[?:?]
	at com.goncalomb.bukkit.mylib.command.InternalCommand.tabComplete(InternalCommand.java:53) ~[?:?]
	at org.bukkit.command.Command.tabComplete(Command.java:93) ~[patched_1.16.4.jar:git-Yatopia-"2b78178"]
	at org.bukkit.command.SimpleCommandMap.tabComplete(SimpleCommandMap.java:244) ~[patched_1.16.4.jar:git-Yatopia-"2b78178"]
	... 18 more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants