Package net.tnemc.menu.sponge8
Class SpongeInventory
java.lang.Object
net.tnemc.menu.sponge8.SpongeInventory
- All Implemented Interfaces:
PlayerInventory<org.spongepowered.api.item.inventory.Inventory>
public class SpongeInventory
extends Object
implements PlayerInventory<org.spongepowered.api.item.inventory.Inventory>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSpongeInventory(UUID id, org.spongepowered.plugin.PluginContainer container) -
Method Summary
Modifier and TypeMethodDescriptionorg.spongepowered.api.item.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.spongepowered.api.item.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 menu the player is in with a new item for a specific slot.
-
Field Details
-
id
-
container
protected final org.spongepowered.plugin.PluginContainer container
-
-
Constructor Details
-
SpongeInventory
-
-
Method Details
-
player
The player associated with this inventory provider.- Specified by:
playerin interfacePlayerInventory<org.spongepowered.api.item.inventory.Inventory>- Returns:
- The
UUIDfor the player for thisPlayerInventory
-
openInventory
public void openInventory(org.spongepowered.api.item.inventory.Inventory inventory) Used to open the provided inventory for this player.- Specified by:
openInventoryin interfacePlayerInventory<org.spongepowered.api.item.inventory.Inventory>- Parameters:
inventory- The inventory to open.
-
updateInventory
public void updateInventory(int slot, net.tnemc.item.AbstractItemStack<?> item) Used to update the menu the player is in with a new item for a specific slot.- Specified by:
updateInventoryin interfacePlayerInventory<org.spongepowered.api.item.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.spongepowered.api.item.inventory.Inventory>
-