diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitInventoryUtil.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitInventoryUtil.java index b50e370cd..dd312fe51 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitInventoryUtil.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/BukkitInventoryUtil.java @@ -51,10 +51,10 @@ import java.util.stream.IntStream; @Override public void open(PlotInventory inv) { BukkitPlayer bp = (BukkitPlayer) inv.getPlayer(); - Inventory inventory = Bukkit.createInventory(null, inv.getSize() * 9, + Inventory inventory = Bukkit.createInventory(null, inv.getLines() * 9, ChatColor.translateAlternateColorCodes('&', inv.getTitle())); PlotItemStack[] items = inv.getItems(); - for (int i = 0; i < inv.getSize() * 9; i++) { + for (int i = 0; i < inv.getLines() * 9; i++) { PlotItemStack item = items[i]; if (item != null) { inventory.setItem(i, getItem(item)); diff --git a/Core/src/main/java/com/plotsquared/core/plot/PlotInventory.java b/Core/src/main/java/com/plotsquared/core/plot/PlotInventory.java index 2b7132c7b..368b6922a 100644 --- a/Core/src/main/java/com/plotsquared/core/plot/PlotInventory.java +++ b/Core/src/main/java/com/plotsquared/core/plot/PlotInventory.java @@ -39,18 +39,18 @@ public class PlotInventory { private static final Logger logger = LoggerFactory.getLogger("P2/" + PlotInventory.class.getSimpleName()); private final PlotPlayer player; - private final int size; + private final int lines; private final PlotItemStack[] items; private String title; private boolean open = false; private final InventoryUtil inventoryUtil; public PlotInventory(@Nonnull final InventoryUtil inventoryUtil, - PlotPlayer player, int size, String name) { - this.size = size; + PlotPlayer player, int lines, String name) { + this.lines = lines; this.title = name == null ? "" : name; this.player = player; - this.items = new PlotItemStack[size * 9]; + this.items = new PlotItemStack[lines * 9]; this.inventoryUtil = inventoryUtil; } @@ -144,7 +144,7 @@ public class PlotInventory { return player; } - public int getSize() { - return size; + public int getLines() { + return lines; } }