Class VillagerInventory
java.lang.Object
net.minestom.server.inventory.AbstractInventory
net.minestom.server.inventory.Inventory
net.minestom.server.inventory.type.VillagerInventory
- All Implemented Interfaces:
InventoryClickHandler
,Taggable
,TagReadable
,TagWritable
,Viewable
-
Field Summary
Fields inherited from class net.minestom.server.inventory.AbstractInventory
clickProcessor, inventoryConditions, itemStacks
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addTrade
(TradeListPacket.Trade trade) boolean
This will not open the inventory forplayer
, usePlayer.openInventory(Inventory)
.boolean
int
int
boolean
void
removeTrade
(int index) void
setCanRestock
(boolean canRestock) void
setExperience
(int experience) void
setRegularVillager
(boolean regularVillager) void
setVillagerLevel
(int level) void
update()
Refreshes the inventory for all viewers.Methods inherited from class net.minestom.server.inventory.Inventory
changeHeld, clear, doubleClick, dragging, drop, getCursorItem, getInventoryType, getTitle, getViewers, getWindowId, leftClick, middleClick, removeViewer, rightClick, sendProperty, setCursorItem, setTitle, shiftClick, UNSAFE_itemInsert, update
Methods inherited from class net.minestom.server.inventory.AbstractInventory
addInventoryCondition, addItemStack, addItemStack, addItemStacks, copyContents, getInnerSize, getInventoryConditions, getItemStack, getItemStacks, getSize, processItemStack, processItemStacks, replaceItemStack, safeItemInsert, safeItemInsert, setItemStack, tagHandler, takeItemStack, takeItemStacks
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minestom.server.inventory.InventoryClickHandler
callClickEvent
Methods inherited from interface net.minestom.server.Viewable
getViewersAsAudience, getViewersAsAudiences, isViewer, sendPacketsToViewers, sendPacketsToViewers, sendPacketToViewers, sendPacketToViewersAndSelf
-
Constructor Details
-
VillagerInventory
-
-
Method Details
-
getTrades
-
addTrade
-
removeTrade
public void removeTrade(int index) -
getVillagerLevel
public int getVillagerLevel() -
setVillagerLevel
public void setVillagerLevel(int level) -
getExperience
public int getExperience() -
setExperience
public void setExperience(int experience) -
isRegularVillager
public boolean isRegularVillager() -
setRegularVillager
public void setRegularVillager(boolean regularVillager) -
canRestock
public boolean canRestock() -
setCanRestock
public void setCanRestock(boolean canRestock) -
update
public void update()Description copied from class:Inventory
Refreshes the inventory for all viewers. -
addViewer
Description copied from class:Inventory
This will not open the inventory forplayer
, usePlayer.openInventory(Inventory)
.
-