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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.inventory.Inventory
build
(MenuPlayer player, Menu menu, int page) Builds an inventory object from a menu.void
close()
Used to close the player's currently open inventory.void
openInventory
(org.bukkit.inventory.Inventory inventory) Used to open the provided inventory for this player.player()
The player associated with this inventory provider.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.
-
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:
player
in interfacePlayerInventory<org.bukkit.inventory.Inventory>
- Returns:
- The
UUID
for the player for thisPlayerInventory
-
openInventory
public void openInventory(org.bukkit.inventory.Inventory inventory) Used to open the provided inventory for this player.- Specified by:
openInventory
in 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:
updateInventory
in 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:
close
in interfacePlayerInventory<org.bukkit.inventory.Inventory>
-