ImageOnMap

ImageOnMap

148k Downloads

maptool list throw an error

Vlammar opened this issue ยท 1 comments

commented

When doing /maptool list it throw an error in console
[13:27:07] [Server thread/WARN]: [ImageOnMap] NMS Exception while parsing ItemStack to JSON String
fr.moribus.imageonmap.tools.reflection.NMSException: Unable to retrieve Minecraft ID for an ItemStack
at fr.moribus.imageonmap.tools.items.ItemUtils.getMinecraftId(ItemUtils.java:589) ~[?:?]
at fr.moribus.imageonmap.components.rawtext.RawText.toJSONString(RawText.java:217) ~[?:?]
at fr.moribus.imageonmap.components.rawtext.RawTextPart.hover(RawTextPart.java:349) ~[?:?]
at fr.moribus.imageonmap.commands.maptool.ListCommand.addMap(ListCommand.java:95) ~[?:?]
at fr.moribus.imageonmap.commands.maptool.ListCommand.run(ListCommand.java:76) ~[?:?]
at fr.moribus.imageonmap.components.commands.Command.execute(Command.java:167) ~[?:?]
at fr.moribus.imageonmap.components.commands.CommandGroup.executeMatchingCommand(CommandGroup.java:171) ~[?:?]
at fr.moribus.imageonmap.components.commands.CommandGroup.executeMatchingCommand(CommandGroup.java:163) ~[?:?]
at fr.moribus.imageonmap.components.commands.CommandGroup.onCommand(CommandGroup.java:189) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.dispatchCommand(CraftServer.java:711) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.PlayerConnection.handleCommand(PlayerConnection.java:1657) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1497) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:47) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:1) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:19) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(SourceFile:144) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(SourceFile:118) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.MinecraftServer.ba(MinecraftServer.java:918) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:911) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.awaitTasks(SourceFile:127) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.MinecraftServer.sleepForTick(MinecraftServer.java:895) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:828) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_191]
Caused by: java.lang.NoSuchFieldException: REGISTRY
at java.lang.Class.getDeclaredField(Unknown Source) ~[?:1.8.0_191]
at fr.moribus.imageonmap.tools.reflection.Reflection.getField(Reflection.java:170) ~[?:?]
at fr.moribus.imageonmap.tools.reflection.Reflection.getFieldValue(Reflection.java:134) ~[?:?]
at fr.moribus.imageonmap.tools.items.ItemUtils.getMinecraftId(ItemUtils.java:581) ~[?:?]
... 26 more
[13:27:07] [Server thread/ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing command 'maptool' in plugin ImageOnMap v4.0
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at org.bukkit.craftbukkit.v1_15_R1.CraftServer.dispatchCommand(CraftServer.java:711) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.PlayerConnection.handleCommand(PlayerConnection.java:1657) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1497) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:47) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.PacketPlayInChat.a(PacketPlayInChat.java:1) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:19) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(SourceFile:144) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(SourceFile:118) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.MinecraftServer.ba(MinecraftServer.java:918) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:911) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.awaitTasks(SourceFile:127) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.MinecraftServer.sleepForTick(MinecraftServer.java:895) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:828) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_191]
Caused by: java.lang.IllegalArgumentException: Cannot get ID of Modern Material
at org.apache.commons.lang.Validate.isTrue(Validate.java:136) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at org.bukkit.Material.getId(Material.java:3316) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
at fr.moribus.imageonmap.components.rawtext.RawText.toJSONString(RawText.java:224) ~[?:?]
at fr.moribus.imageonmap.components.rawtext.RawTextPart.hover(RawTextPart.java:349) ~[?:?]
at fr.moribus.imageonmap.commands.maptool.ListCommand.addMap(ListCommand.java:95) ~[?:?]
at fr.moribus.imageonmap.commands.maptool.ListCommand.run(ListCommand.java:76) ~[?:?]
at fr.moribus.imageonmap.components.commands.Command.execute(Command.java:167) ~[?:?]
at fr.moribus.imageonmap.components.commands.CommandGroup.executeMatchingCommand(CommandGroup.java:171) ~[?:?]
at fr.moribus.imageonmap.components.commands.CommandGroup.executeMatchingCommand(CommandGroup.java:163) ~[?:?]
at fr.moribus.imageonmap.components.commands.CommandGroup.onCommand(CommandGroup.java:189) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
... 17 more

commented

Fixed