-
成员变量 修饰符和类 成员变量描述 protected InventoryHolder
holder
protected int
maxStackSize
protected String
name
protected int
size
Map<Integer,Item>
slots
protected String
title
protected InventoryType
type
protected Set<Player>
viewers
-
构造函数 构造函数描述 BaseInventory(InventoryHolder holder, InventoryType type)
BaseInventory(InventoryHolder holder, InventoryType type, Map<Integer,Item> items)
BaseInventory(InventoryHolder holder, InventoryType type, Map<Integer,Item> items, Integer overrideSize)
BaseInventory(InventoryHolder holder, InventoryType type, Map<Integer,Item> items, Integer overrideSize, String overrideTitle)
-
All Methods Instance Methods Concrete Methods 修饰符和类 成员函数描述 Item[]
addItem(Item... slots)
Map<Integer,Item>
all(Item item)
boolean
canAddItem(Item item)
boolean
clear(int index, boolean send)
void
clearAll()
void
close(Player who)
boolean
contains(Item item)
void
decreaseCount(int slot)
int
first(Item item, boolean exact)
int
firstEmpty(Item item)
Map<Integer,Item>
getContents()
int
getFreeSpace(Item item)
InventoryHolder
getHolder()
Item
getItem(int index)
int
getMaxStackSize()
String
getName()
int
getSize()
String
getTitle()
InventoryType
getType()
Set<Player>
getViewers()
boolean
isEmpty()
boolean
isFull()
void
onClose(Player who)
void
onOpen(Player who)
void
onSlotChange(int index, Item before, boolean send)
boolean
open(Player who)
void
remove(Item item)
Item[]
removeItem(Item... slots)
void
sendContents(Collection<Player> players)
void
sendContents(Player... players)
void
sendContents(Player player)
void
sendSlot(int index, Collection<Player> players)
void
sendSlot(int index, Player... players)
void
sendSlot(int index, Player player)
void
setContents(Map<Integer,Item> items)
boolean
setItem(int index, Item item, boolean send)
void
setMaxStackSize(int maxStackSize)
void
setSize(int size)