diff --git a/src/main/java/ch/njol/skript/aliases/ItemType.java b/src/main/java/ch/njol/skript/aliases/ItemType.java index e567b5c0b3c..a85d7c60da2 100644 --- a/src/main/java/ch/njol/skript/aliases/ItemType.java +++ b/src/main/java/ch/njol/skript/aliases/ItemType.java @@ -879,6 +879,7 @@ public boolean addTo(final Inventory invi) { ItemStack[] buf = invi.getContents(); if (buf == null) return false; + Skript.info("buf is " + Arrays.toString(buf)); if (invSizeWorkaround) { // MC < 1.9 if (buf.length > 36) { @@ -888,6 +889,14 @@ public boolean addTo(final Inventory invi) { buf[i] = tBuf[i]; } } + } else { + if (invi instanceof PlayerInventory) { + ItemStack[] tBuf = buf.clone(); + buf = new ItemStack[36]; + for(int i = 0; i < 36; ++i) { + buf[i] = tBuf[i]; + } + } } final boolean b = addTo(buf);