Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-7918

IllegalArgumentException on player.getInventory().getItem(EquipmentSlot.BODY)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • Windows 11, running java version:
      java 23.0.1 2024-10-15
      Java(TM) SE Runtime Environment (build 23.0.1+11-39)
      Java HotSpot(TM) 64-Bit Server VM (build 23.0.1+11-39, mixed mode, sharing)

    •  This server is running CraftBukkit version 4343-Spigot-a759b62-0a7bd6c (MC: 1.21.1) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
    • Yes

      When getting an item from a player inventory of the BODY EquipmentSlot there is a crash:// code [12:28:04] [Server thread/INFO]: _Timtou issued server command: /test

      [12:28:04] [Server thread/ERROR]: null
      org.bukkit.command.CommandException: Unhandled exception executing command 'test' in plugin CustomEnchants2 v2.0-SNAPSHOT
              at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[spigot-api-1.21.1-R0.1-SNAPSHOT.jar:?]
              at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:150) ~[spigot-api-1.21.1-R0.1-SNAPSHOT.jar:?]
              at org.bukkit.craftbukkit.v1_21_R1.CraftServer.dispatchCommand(CraftServer.java:922) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at org.bukkit.craftbukkit.v1_21_R1.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:50) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.2.9.jar:?]
              at net.minecraft.commands.execution.tasks.ExecuteCommand.a(SourceFile:29) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(SourceFile:13) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at net.minecraft.commands.execution.UnboundEntryAction.a(SourceFile:8) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at net.minecraft.commands.execution.CommandQueueEntry.a(SourceFile:8) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at net.minecraft.commands.execution.ExecutionContext.a(SourceFile:107) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at net.minecraft.commands.CommandDispatcher.a(CommandDispatcher.java:414) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at net.minecraft.commands.CommandDispatcher.performCommand(CommandDispatcher.java:336) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at net.minecraft.commands.CommandDispatcher.a(CommandDispatcher.java:323) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at net.minecraft.server.network.PlayerConnection.b(PlayerConnection.java:1842) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at net.minecraft.server.network.PlayerConnection.lambda$handleChatCommand$7(PlayerConnection.java:1818) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at net.minecraft.server.TickTask.run(SourceFile:18) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at net.minecraft.util.thread.IAsyncTaskHandler.d(SourceFile:162) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(SourceFile:23) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1270) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:203) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at net.minecraft.util.thread.IAsyncTaskHandler.B(SourceFile:136) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at net.minecraft.server.MinecraftServer.bv(MinecraftServer.java:1249) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at net.minecraft.server.MinecraftServer.B(MinecraftServer.java:1242) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at net.minecraft.util.thread.IAsyncTaskHandler.bB(SourceFile:121) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at net.minecraft.server.MinecraftServer.v_(MinecraftServer.java:1213) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at net.minecraft.server.MinecraftServer.y(MinecraftServer.java:1078) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at java.base/java.lang.Thread.run(Thread.java:1575) [?:?]
      Caused by: java.lang.IllegalArgumentException: Not implemented. This is a bug
              at org.bukkit.craftbukkit.v1_21_R1.inventory.CraftInventoryPlayer.getItem(CraftInventoryPlayer.java:166) ~[spigot-1.21.1-R0.1-SNAPSHOT.jar:4343-Spigot-a759b62-0a7bd6c]
              at com.lgdtimtou.customenchants2.TestCommand.onCommand(TestCommand.java:14) ~[?:?]
              at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[spigot-api-1.21.1-R0.1-SNAPSHOT.jar:?]
              ... 27 more 
      
      
      @Override public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) { 
      Player player = (Player) commandSender; 
      ItemStack item = player.getInventory().getItem(EquipmentSlot.BODY); System.out.println(item); 
      return false; 
      }
      

            Unassigned Unassigned
            timtou Timon Coucke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: