mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 20:00:46 +00:00
Don't hardcode inv length
This commit is contained in:
parent
f6cbda0e04
commit
cf1f2f8f03
1 changed files with 1 additions and 1 deletions
|
@ -39,7 +39,7 @@ public final class InventoryWorkaround {
|
|||
try {
|
||||
fakeInventory.setContents(contents);
|
||||
} catch (IllegalArgumentException e) {
|
||||
ItemStack[] truncatedContents = new ItemStack[36];
|
||||
ItemStack[] truncatedContents = new ItemStack[fakeInventory.getSize()];
|
||||
System.arraycopy(contents, 0, truncatedContents, 0, truncatedContents.length);
|
||||
fakeInventory.setContents(truncatedContents);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue