Package net.tnemc.menu.paper
Class PaperInventory
java.lang.Object
net.tnemc.menu.paper.PaperInventory
- All Implemented Interfaces:
PlayerInventory<org.bukkit.inventory.Inventory>
- Direct Known Subclasses:
FoliaInventory
public class PaperInventory
extends Object
implements PlayerInventory<org.bukkit.inventory.Inventory>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.inventory.Inventorybuild(MenuPlayer player, Menu menu, int page) Builds an inventory object from a menu.voidclose()Used to close the player's currently open inventory.voidopenInventory(org.bukkit.inventory.Inventory inventory) Used to open the provided inventory for this player.player()The player associated with this inventory provider.voidupdateInventory(int slot, net.tnemc.item.AbstractItemStack<?> item) Used to update the inventory the player is in with a new item for a specific slot.
-
Field Details
-
id
-
plugin
protected final org.bukkit.plugin.java.JavaPlugin plugin
-
-
Constructor Details
-
PaperInventory
-
-
Method Details
-
player
The player associated with this inventory provider.- Specified by:
playerin interfacePlayerInventory<org.bukkit.inventory.Inventory>- Returns:
- The
UUIDfor the player for thisPlayerInventory
-
openInventory
public void openInventory(org.bukkit.inventory.Inventory inventory) Used to open the provided inventory for this player.- Specified by:
openInventoryin interfacePlayerInventory<org.bukkit.inventory.Inventory>- Parameters:
inventory- The inventory to open.
-
updateInventory
public void updateInventory(int slot, net.tnemc.item.AbstractItemStack<?> item) Used to update the inventory the player is in with a new item for a specific slot.- Specified by:
updateInventoryin interfacePlayerInventory<org.bukkit.inventory.Inventory>- Parameters:
slot- The slot to update.item- The item to update the specified slot with.
-
close
public void close()Used to close the player's currently open inventory.- Specified by:
closein interfacePlayerInventory<org.bukkit.inventory.Inventory>
-