mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-19 09:06:21 +01:00
All inventories should implement InventoryClickHandler
Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
parent
51d290cae9
commit
6218d2a78e
@ -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;
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user