diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/WarpInventory.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/WarpInventory.java index e223b508c..33ecc808d 100644 --- a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/WarpInventory.java +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/WarpInventory.java @@ -247,7 +247,7 @@ public void addWarp(Warp warp) { } } - private int getSlot(Translation.WarpSection.WarpInventorySection warpSection) { + private int getSlot(WarpMessages.WarpInventorySection warpSection) { int size = warpSection.items().size(); if (!warpSection.border().enabled()) { return GUI_ITEM_SLOT_WITHOUT_BORDER + size; @@ -279,7 +279,7 @@ public void removeWarp(String warpName) { } } - private void shiftWarpItems(WarpInventoryItem removed, Translation.WarpSection.WarpInventorySection warpSection) { + private void shiftWarpItems(WarpInventoryItem removed, WarpMessages.WarpInventorySection warpSection) { int removedSlot = removed.warpItem.slot; List itemsToShift = warpSection.items().values().stream() .filter(item -> item.warpItem.slot > removedSlot) diff --git a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/messages/WarpMessages.java b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/messages/WarpMessages.java index 55f8fcf29..6c5f9f7f5 100644 --- a/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/messages/WarpMessages.java +++ b/eternalcore-core/src/main/java/com/eternalcode/core/feature/warp/messages/WarpMessages.java @@ -41,32 +41,30 @@ default void addItem(String name, WarpInventoryItem item) { this.setItems(items); } - default void removeItem(String name) { + default WarpInventoryItem removeItem(String name) { Map items = new HashMap<>(this.items()); - items.remove(name); + WarpInventoryItem removed = items.remove(name); this.setItems(items); + return removed; } - WarpInventorySection.BorderSection border(); - WarpInventorySection.DecorationItemsSection decorationItems(); + BorderSection border(); + DecorationItemsSection decorationItems(); interface BorderSection { boolean enabled(); Material material(); - WarpInventorySection.BorderSection.FillType fillType(); + FillType fillType(); String name(); List lore(); enum FillType { - TOP, - BOTTOM, - BORDER, - ALL + TOP, BOTTOM, BORDER, ALL } }