use of org.bukkit.inventory.Inventory in project Essentials by drtshock.
the class InventoryWorkaround method makeTruncatedPlayerInventory.
private static Inventory makeTruncatedPlayerInventory(PlayerInventory playerInventory) {
Inventory fakeInventory = Bukkit.getServer().createInventory(null, USABLE_PLAYER_INV_SIZE);
fakeInventory.setContents(Arrays.copyOf(playerInventory.getContents(), fakeInventory.getSize()));
return fakeInventory;
}
Aggregations