mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-22 17:18:37 +01:00
Fix inventory size for 1.8.8 servers (#5212)
This commit is contained in:
parent
b7a4bea52e
commit
b3238605cc
@ -20,6 +20,7 @@ public final class Inventories {
|
||||
private static final int LEG_SLOT = 37;
|
||||
private static final int BOOT_SLOT = 36;
|
||||
private static final boolean HAS_OFFHAND = VersionUtil.getServerBukkitVersion().isHigherThanOrEqualTo(VersionUtil.v1_9_R01);
|
||||
private static final int INVENTORY_SIZE = HAS_OFFHAND ? 41 : 40;
|
||||
|
||||
private Inventories() {
|
||||
}
|
||||
@ -198,7 +199,7 @@ public final class Inventories {
|
||||
}
|
||||
|
||||
public static ItemStack[] getInventory(final Player player, final boolean includeArmor) {
|
||||
final ItemStack[] items = new ItemStack[41];
|
||||
final ItemStack[] items = new ItemStack[INVENTORY_SIZE];
|
||||
for (int i = 0; i < items.length; i++) {
|
||||
if (!includeArmor && isArmorSlot(i)) {
|
||||
items[i] = null;
|
||||
|
Loading…
Reference in New Issue
Block a user