DRE2N / ItemsXL

An implementation of the CaliburnAPI.
https://www.spigotmc.org/resources/itemsxl.14472/
GNU General Public License v3.0
4 stars 3 forks source link

ixl registeritem doesn't work with custom playerheads #20

Closed robjwa20 closed 3 years ago

robjwa20 commented 3 years ago

Hello!

Thanks for the plugins! Enjoying both DungeonsXL and trying to learn ItemsXL!.

This was the error I got. It's when I try to register a playerhead as a custom item.

[18:47:13 INFO]: oHobbit issued server command: /ixl registeritem Golden

org.bukkit.command.CommandException: Unhandled exception executing command 'ixl' in plugin ItemsXL v0.6.7 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[patched_1.16.5.jar:git-Paper-588] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159) ~[patched_1.16.5.jar:git-Paper-588] at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchCommand(CraftServer.java:810) ~[patched_1.16.5.jar:git-Paper-588] at net.minecraft.server.v1_16_R3.PlayerConnection.handleCommand(PlayerConnection.java:2168) ~[patched_1.16.5.jar:git-Paper-588] at net.minecraft.server.v1_16_R3.PlayerConnection.c(PlayerConnection.java:1983) ~[patched_1.16.5.jar:git-Paper-588] at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:1936) ~[patched_1.16.5.jar:git-Paper-588] at net.minecraft.server.v1_16_R3.PacketPlayInChat.a(PacketPlayInChat.java:50) ~[patched_1.16.5.jar:git-Paper-588] at net.minecraft.server.v1_16_R3.PacketPlayInChat.a(PacketPlayInChat.java:8) ~[patched_1.16.5.jar:git-Paper-588] at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:35) ~[patched_1.16.5.jar:git-Paper-588] at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[patched_1.16.5.jar:git-Paper-588] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.5.jar:git-Paper-588] at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.5.jar:git-Paper-588] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.5.jar:git-Paper-588] at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1252) ~[patched_1.16.5.jar:git-Paper-588] at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1245) ~[patched_1.16.5.jar:git-Paper-588] at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.16.5.jar:git-Paper-588] at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1206) ~[patched_1.16.5.jar:git-Paper-588] at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1120) ~[patched_1.16.5.jar:git-Paper-588] at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:289) ~[patched_1.16.5.jar:git-Paper-588] at java.lang.Thread.run(Thread.java:834) [?:?] Caused by: java.lang.NullPointerException at de.erethon.caliburn.item.CustomItem.(CustomItem.java:78) ~[?:?] at de.erethon.itemsxl.command.RegisterItemCommand.onExecute(RegisterItemCommand.java:97) ~[?:?] at de.erethon.itemsxl.util.commons.command.DRECommandExecutor.onCommand(DRECommandExecutor.java:67) ~[?:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[patched_1.16.5.jar:git-Paper-588] ... 19 more

I ended up writing a script instead and I have what I want (a custom player head to be used a currency). It worked. Plugin seems to not like registering custom playerheads in game.

I just have one more question... if anyone places the custom playerhead and picks it up it's renamed to a normal player head again. Do you have any suggestions to avoid this? I guess another plugin could make it unplaceable?

Many thanks, Rob

Sataniel98 commented 3 years ago

Thank you for the report. Fixed.