Java Code Examples for org.bukkit.entity.HumanEntity#getInventory()
The following examples show how to use
org.bukkit.entity.HumanEntity#getInventory() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CraftContainer.java From Thermos with GNU General Public License v3.0 | 6 votes |
public CraftContainer(final Inventory inventory, final HumanEntity player, int id) { this(new InventoryView() { @Override public Inventory getTopInventory() { return inventory; } @Override public Inventory getBottomInventory() { return player.getInventory(); } @Override public HumanEntity getPlayer() { return player; } @Override public InventoryType getType() { return inventory.getType(); } }, id); }
Example 2
Source File: HumanEntityCache.java From IF with The Unlicense | 5 votes |
/** * Stores this player's inventory in the cache. If the player was already stored, their cache will be overwritten. * Clears the player's inventory afterwards. * * @param humanEntity the human entity to keep in the cache */ public void storeAndClear(@NotNull HumanEntity humanEntity) { store(humanEntity); Inventory inventory = humanEntity.getInventory(); for (int i = 0; i < 36; i++) { inventory.clear(i); } }
Example 3
Source File: Slot.java From PGM with GNU Affero General Public License v3.0 | 4 votes |
@Override public Inventory getInventory(HumanEntity holder) { return holder.getInventory(); }