All inventories should implement InventoryClickHandler

Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
TheMode 2021-04-04 03:37:57 +02:00
parent 51d290cae9
commit 6218d2a78e
3 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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();

View File

@ -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;