public abstract class PlayerInventory extends Inventory
ADMIN_ALERT, ADMIN_MENU, BAN_MANAGER_MENU, BAN_PROCESSOR_MANAGER_MENU, CHEAT_MANAGER, DYE_GRAY, DYE_GREEN, EMPTY, EMPTY_RED, NAME_ACTIVED_CHEAT_MENU, NAME_ALERT_MENU, NAME_CHECK_MENU, NAME_FORGE_MOD_MENU, NAME_FREEZE_MENU, NAME_MOD_MENU, SPECIAL_MANAGER
Constructor and Description |
---|
PlayerInventory() |
Modifier and Type | Method and Description |
---|---|
abstract ItemStack[] |
getArmorContent()
Get the armor of the player
0: helmet
1: chestplate
2: legging
3: boot
Each index can be null if the player doesn't have any armor
|
abstract Optional<ItemStack> |
getBoots()
Get current boot.
|
abstract @Nullable Optional<ItemStack> |
getChestplate()
Get current chestplate.
|
abstract int |
getHeldItemSlot()
Get slot of the hold item by the player
|
abstract @Nullable Optional<ItemStack> |
getHelmet()
Get current helmet.
|
abstract @Nullable Optional<ItemStack> |
getLegging()
Get current legging.
|
abstract void |
setArmorContent(ItemStack[] items)
Set a new armor of the player
0: helmet
1: chestplate
2: legging
3: boot
Each index can be null if the player doesn't have any armor
|
abstract void |
setBoot(@Nullable ItemStack item)
Edit the boot armor.
|
abstract void |
setChestplate(@Nullable ItemStack item)
Edit the chestplate armor.
|
abstract void |
setHelmet(@Nullable ItemStack item)
Edit the helmet armor.
|
abstract void |
setLegging(@Nullable ItemStack item)
Edit the legging armor.
|
addItem, clear, contains, createInventory, get, getBackItem, getCloseItem, getHolder, getInventoryName, getSize, getType, remove, set
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDefault
public abstract ItemStack[] getArmorContent()
public abstract void setArmorContent(ItemStack[] items)
items
- have to contains 4 items for all armor slotpublic abstract void setHelmet(@Nullable ItemStack item)
item
- the new helmetpublic abstract void setChestplate(@Nullable ItemStack item)
item
- the new chestplatepublic abstract void setLegging(@Nullable ItemStack item)
item
- the new leggingpublic abstract void setBoot(@Nullable ItemStack item)
item
- the new bootpublic abstract @Nullable Optional<ItemStack> getHelmet()
public abstract @Nullable Optional<ItemStack> getChestplate()
public abstract @Nullable Optional<ItemStack> getLegging()
public abstract int getHeldItemSlot()