MagicPlugin: Error creating item - NullPointerException: null
Magic dev 3522
I have a custom GUI from the plugin BossShopPro that when you interact with an item, it runs the command /mgive <name> to give the player the item. Recent dev builds of Magic seem to break this and now output an error.
[05:13:09] [Server thread/INFO]: mibby issued server command: /hats
[05:13:11] [Server thread/INFO]: Gave 1 Test Hat to mibby
[05:13:11] [Server thread/WARN]: [Magic] Error creating item: hat_test
java.lang.NullPointerException: null
at com.elmakers.mine.bukkit.wand.Wand.doShowBoundInstructions(Wand.java:926) ~[?:?]
at com.elmakers.mine.bukkit.wand.Wand.takeOwnership(Wand.java:1009) ~[?:?]
at com.elmakers.mine.bukkit.wand.Wand.tryToOwn(Wand.java:899) ~[?:?]
at com.elmakers.mine.bukkit.magic.Mage.tryGiveItem(Mage.java:3823) ~[?:?]
at com.elmakers.mine.bukkit.magic.Mage.tryGiveItem(Mage.java:3771) ~[?:?]
at com.elmakers.mine.bukkit.magic.Mage.giveItem(Mage.java:3746) ~[?:?]
at com.elmakers.mine.bukkit.magic.Mage.giveItem(Mage.java:3765) ~[?:?]
at com.elmakers.mine.bukkit.magic.command.MagicGiveCommandExecutor$1.updated(MagicGiveCommandExecutor.java:136) ~[?:?]
at com.elmakers.mine.bukkit.magic.MagicController.createItem(MagicController.java:5832) ~[?:?]
at com.elmakers.mine.bukkit.magic.command.MagicGiveCommandExecutor.onCommand(MagicGiveCommandExecutor.java:126) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[1.16.5-patched.jar:git-Yatopia-dev/threaded-worldgen-"9b84e5e"]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:172) ~[1.16.5-patched.jar:git-Yatopia-dev/threaded-worldgen-"9b84e5e"]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchCommand(CraftServer.java:806) ~[1.16.5-patched.jar:git-Yatopia-dev/threaded-worldgen-"9b84e5e"]
at org.bukkit.Bukkit.dispatchCommand(Bukkit.java:758) ~[1.16.5-patched.jar:git-Yatopia-dev/threaded-worldgen-"9b84e5e"]
at org.black_ixx.bossshop.core.rewards.BSRewardTypeCommand.giveReward(BSRewardTypeCommand.java:43) ~[?:?]
at org.black_ixx.bossshop.core.BSBuy.purchase(BSBuy.java:507) ~[?:?]
at org.black_ixx.bossshop.core.BSBuy.purchaseTask(BSBuy.java:449) ~[?:?]
at org.black_ixx.bossshop.core.BSBuy.purchaseTry(BSBuy.java:423) ~[?:?]
at org.black_ixx.bossshop.core.BSBuy.click(BSBuy.java:392) ~[?:?]
at org.black_ixx.bossshop.listeners.InventoryListener.purchase(InventoryListener.java:189) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor791.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[1.16.5-patched.jar:git-Yatopia-dev/threaded-worldgen-"9b84e5e"]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[1.16.5-patched.jar:git-Yatopia-dev/threaded-worldgen-"9b84e5e"]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[1.16.5-patched.jar:git-Yatopia-dev/threaded-worldgen-"9b84e5e"]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:611) ~[1.16.5-patched.jar:git-Yatopia-dev/threaded-worldgen-"9b84e5e"]
at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:2643) ~[1.16.5-patched.jar:git-Yatopia-dev/threaded-worldgen-"9b84e5e"]
at net.minecraft.server.v1_16_R3.PacketPlayInWindowClick.a(SourceFile:32) ~[1.16.5-patched.jar:git-Yatopia-dev/threaded-worldgen-"9b84e5e"]
at net.minecraft.server.v1_16_R3.PacketPlayInWindowClick.a(SourceFile:10) ~[1.16.5-patched.jar:git-Yatopia-dev/threaded-worldgen-"9b84e5e"]
at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:43) ~[1.16.5-patched.jar:git-Yatopia-dev/threaded-worldgen-"9b84e5e"]
at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[1.16.5-patched.jar:git-Yatopia-dev/threaded-worldgen-"9b84e5e"]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[1.16.5-patched.jar:git-Yatopia-dev/threaded-worldgen-"9b84e5e"]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[1.16.5-patched.jar:git-Yatopia-dev/threaded-worldgen-"9b84e5e"]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[1.16.5-patched.jar:git-Yatopia-dev/threaded-worldgen-"9b84e5e"]
at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1220) ~[1.16.5-patched.jar:git-Yatopia-dev/threaded-worldgen-"9b84e5e"]
at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1213) ~[1.16.5-patched.jar:git-Yatopia-dev/threaded-worldgen-"9b84e5e"]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[1.16.5-patched.jar:git-Yatopia-dev/threaded-worldgen-"9b84e5e"]
at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1189) ~[1.16.5-patched.jar:git-Yatopia-dev/threaded-worldgen-"9b84e5e"]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1029) ~[1.16.5-patched.jar:git-Yatopia-dev/threaded-worldgen-"9b84e5e"]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:176) ~[1.16.5-patched.jar:git-Yatopia-dev/threaded-worldgen-"9b84e5e"]
at java.lang.Thread.run(Thread.java:832) [?:?]
[05:13:11] [Server thread/INFO]: Unknown item type hat_test
Edit: Magic dev 3521 works fine.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 21 (12 by maintainers)
You can do
target: selfto target yourself. That does sound odd though- I’ll play with it a bit in the default configs, maybe there’s some case there were targeting goes weird.Well some quick testing shows that something is in fact broken and probably has been for a while… players can no longer target themselves if they can’t pvp. I’ll fix that for the next dev build too.
I do have it fixed already, just polishing up some other things before I push, but the next dev build will fix it up.
One thing I noticed though (that I think is not new), giving items that way won’t show most of the wand instructions if you’re using class wands, since the wand won’t have any spells or mana configured when it is bound. Not sure I can fix that, but maybe you’re not using class wands?