From 6218d2a78ed65d2bcad24ac1e98a2808026fc7d7 Mon Sep 17 00:00:00 2001 From: TheMode Date: Sun, 4 Apr 2021 03:37:57 +0200 Subject: [PATCH] All inventories should implement InventoryClickHandler Signed-off-by: TheMode --- .../java/net/minestom/server/inventory/AbstractInventory.java | 2 +- src/main/java/net/minestom/server/inventory/Inventory.java | 2 +- .../java/net/minestom/server/inventory/PlayerInventory.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/minestom/server/inventory/AbstractInventory.java b/src/main/java/net/minestom/server/inventory/AbstractInventory.java index f0d1c1b34..26e0028a5 100644 --- a/src/main/java/net/minestom/server/inventory/AbstractInventory.java +++ b/src/main/java/net/minestom/server/inventory/AbstractInventory.java @@ -21,7 +21,7 @@ import java.util.function.UnaryOperator; /** * Represents an inventory where items can be modified/retrieved. */ -public abstract class AbstractInventory implements DataContainer { +public abstract class AbstractInventory implements InventoryClickHandler, DataContainer { private final int size; protected final ItemStack[] itemStacks; diff --git a/src/main/java/net/minestom/server/inventory/Inventory.java b/src/main/java/net/minestom/server/inventory/Inventory.java index c66dae445..77db21870 100644 --- a/src/main/java/net/minestom/server/inventory/Inventory.java +++ b/src/main/java/net/minestom/server/inventory/Inventory.java @@ -28,7 +28,7 @@ import java.util.concurrent.atomic.AtomicInteger; * You can create one with {@link Inventory#Inventory(InventoryType, String)} or by making your own subclass. * It can then be opened using {@link Player#openInventory(Inventory)}. */ -public class Inventory extends AbstractInventory implements InventoryClickHandler, Viewable { +public class Inventory extends AbstractInventory implements Viewable { // incremented each time an inventory is created (used in the window packets) private static final AtomicInteger LAST_INVENTORY_ID = new AtomicInteger(); diff --git a/src/main/java/net/minestom/server/inventory/PlayerInventory.java b/src/main/java/net/minestom/server/inventory/PlayerInventory.java index 7586d7a6e..1cfc7aa37 100644 --- a/src/main/java/net/minestom/server/inventory/PlayerInventory.java +++ b/src/main/java/net/minestom/server/inventory/PlayerInventory.java @@ -21,7 +21,7 @@ import static net.minestom.server.utils.inventory.PlayerInventoryUtils.*; /** * Represents the inventory of a {@link Player}, retrieved with {@link Player#getInventory()}. */ -public class PlayerInventory extends AbstractInventory implements InventoryClickHandler, EquipmentHandler { +public class PlayerInventory extends AbstractInventory implements EquipmentHandler { public static final int INVENTORY_SIZE = 46; public static final int INNER_INVENTORY_SIZE = 36;