public abstract class FakeInventory
extends cn.nukkit.inventory.ContainerInventory
| Modifier and Type | Field and Description |
|---|---|
protected Map<cn.nukkit.Player,List<cn.nukkit.math.BlockVector3>> |
blockPositions |
| Constructor and Description |
|---|
FakeInventory(cn.nukkit.inventory.InventoryType type) |
FakeInventory(cn.nukkit.inventory.InventoryType type,
cn.nukkit.inventory.InventoryHolder holder) |
FakeInventory(cn.nukkit.inventory.InventoryType type,
cn.nukkit.inventory.InventoryHolder holder,
String title) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(FakeInventoryListener listener) |
List<cn.nukkit.math.BlockVector3> |
getPosition(cn.nukkit.Player player) |
String |
getTitle() |
void |
onClose(cn.nukkit.Player who) |
protected void |
onFakeOpen(cn.nukkit.Player who,
List<cn.nukkit.math.BlockVector3> blocks) |
void |
onOpen(cn.nukkit.Player who) |
protected abstract List<cn.nukkit.math.BlockVector3> |
onOpenBlock(cn.nukkit.Player who) |
boolean |
onSlotChange(cn.nukkit.Player source,
cn.nukkit.inventory.transaction.action.SlotChangeAction action) |
void |
removeListener(FakeInventoryListener listener) |
void |
setTitle(String title) |
addItem, all, canAddItem, clear, clearAll, close, contains, decreaseCount, first, firstEmpty, getContents, getFreeSpace, getHolder, getItem, getMaxStackSize, getName, getSize, getType, getViewers, isEmpty, isFull, onSlotChange, open, remove, removeItem, sendContents, sendContents, sendContents, sendSlot, sendSlot, sendSlot, setContents, setItem, setMaxStackSize, setSizepublic FakeInventory(cn.nukkit.inventory.InventoryType type)
public FakeInventory(cn.nukkit.inventory.InventoryType type,
cn.nukkit.inventory.InventoryHolder holder)
public FakeInventory(cn.nukkit.inventory.InventoryType type,
cn.nukkit.inventory.InventoryHolder holder,
String title)
public void onOpen(cn.nukkit.Player who)
onOpen in interface cn.nukkit.inventory.InventoryonOpen in class cn.nukkit.inventory.ContainerInventoryprotected void onFakeOpen(cn.nukkit.Player who,
List<cn.nukkit.math.BlockVector3> blocks)
protected abstract List<cn.nukkit.math.BlockVector3> onOpenBlock(cn.nukkit.Player who)
public void onClose(cn.nukkit.Player who)
onClose in interface cn.nukkit.inventory.InventoryonClose in class cn.nukkit.inventory.ContainerInventorypublic List<cn.nukkit.math.BlockVector3> getPosition(cn.nukkit.Player player)
public void addListener(FakeInventoryListener listener)
public void removeListener(FakeInventoryListener listener)
public boolean onSlotChange(cn.nukkit.Player source,
cn.nukkit.inventory.transaction.action.SlotChangeAction action)
public String getTitle()
getTitle in interface cn.nukkit.inventory.InventorygetTitle in class cn.nukkit.inventory.BaseInventorypublic void setTitle(String title)
Copyright © 2019 NukkitX. All rights reserved.