-
Bug
-
Resolution: Fixed
-
Major
-
None
-
None
-
Built at [65310d01a355a2ff4088e8bafc24020752ad8c63|httphttps://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/65310d01a355a2ff4088e8bafc24020752ad8c63] - CraftBukkit version git-Spigot-283de8b-4316a8c (MC: 1.11.2) (Implementing API version 1.11.2-R0.1-SNAPSHOT)
macOS 10.12.3 (16D32)
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)Built at [65310d01a355a2ff4088e8bafc24020752ad8c63|httphttps://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/65310d01a355a2ff4088e8bafc24020752ad8c63] - CraftBukkit version git-Spigot-283de8b-4316a8c (MC: 1.11.2) (Implementing API version 1.11.2-R0.1-SNAPSHOT) macOS 10.12.3 (16D32) java version "1.8.0_101" Java(TM) SE Runtime Environment (build 1.8.0_101-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
The inventory opens, with the title. However no items were added. Clicking the empty spaces throws this error:
[00:55:09 FATAL]: Error executing task java.util.concurrent.ExecutionException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_101] at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_101] at net.minecraft.server.v1_11_R1.SystemUtils.a(SourceFile:47) [spigot-1.11.2.jar:git-Spigot-283de8b-4316a8c] at net.minecraft.server.v1_11_R1.MinecraftServer.D(MinecraftServer.java:747) [spigot-1.11.2.jar:git-Spigot-283de8b-4316a8c] at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:399) [spigot-1.11.2.jar:git-Spigot-283de8b-4316a8c] at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:678) [spigot-1.11.2.jar:git-Spigot-283de8b-4316a8c] at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:576) [spigot-1.11.2.jar:git-Spigot-283de8b-4316a8c] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101] Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:653) ~[?:1.8.0_101] at java.util.ArrayList.get(ArrayList.java:429) ~[?:1.8.0_101] at net.minecraft.server.v1_11_R1.Container.getSlot(Container.java:110) ~[spigot-1.11.2.jar:git-Spigot-283de8b-4316a8c] at net.minecraft.server.v1_11_R1.PlayerConnection.a(PlayerConnection.java:1669) ~[spigot-1.11.2.jar:git-Spigot-283de8b-4316a8c] at net.minecraft.server.v1_11_R1.PacketPlayInWindowClick.a(SourceFile:33) ~[spigot-1.11.2.jar:git-Spigot-283de8b-4316a8c] at net.minecraft.server.v1_11_R1.PacketPlayInWindowClick.a(SourceFile:10) ~[spigot-1.11.2.jar:git-Spigot-283de8b-4316a8c] at net.minecraft.server.v1_11_R1.PlayerConnectionUtils$1.run(SourceFile:13) ~[spigot-1.11.2.jar:git-Spigot-283de8b-4316a8c] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_101] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_101] at net.minecraft.server.v1_11_R1.SystemUtils.a(SourceFile:46) ~[spigot-1.11.2.jar:git-Spigot-283de8b-4316a8c] ... 5 more
Use case:
public static void show(Player player, int page) { // maven repo not up to date, but server compiled with build tools Inventory inventoryShulker = Bukkit.createInventory(null, InventoryType.valueOf("SHULKER_BOX"), "Test Please"); ItemStack icon = new ItemStack(Material.RECORD_3); ItemMeta iconMeta = icon.getItemMeta(); iconMeta.setDisplayName(ChatColor.RED + "Close"); icon.setItemMeta(iconMeta); inventoryShulker.setItem(1, icon); player.openInventory(inventoryShulker); }