|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface HumanEntity
Represents a human entity, such as an NPC or a player
| Method Summary | |
|---|---|
void |
closeInventory()
Force-closes the currently open inventory view for this player, if any. |
Inventory |
getEnderChest()
Get the player's EnderChest inventory |
int |
getExpToLevel()
Get the total amount of experience required for the player to level |
GameMode |
getGameMode()
Gets this humans current GameMode |
PlayerInventory |
getInventory()
Get the player's inventory. |
ItemStack |
getItemInHand()
Returns the ItemStack currently in your hand, can be empty. |
ItemStack |
getItemOnCursor()
Returns the ItemStack currently on your cursor, can be empty. |
String |
getName()
Returns the name of this player |
InventoryView |
getOpenInventory()
Gets the inventory view the player is currently viewing. |
int |
getSleepTicks()
Get the sleep ticks of the player. |
boolean |
isBlocking()
Check if the player is currently blocking (ie with a sword). |
boolean |
isSleeping()
Returns whether this player is slumbering. |
InventoryView |
openEnchanting(Location location,
boolean force)
Opens an empty enchanting inventory window with the player's inventory on the bottom. |
InventoryView |
openInventory(Inventory inventory)
Opens an inventory window with the specified inventory on the top and the player's inventory on the bottom. |
void |
openInventory(InventoryView inventory)
Opens an inventory window to the specified inventory view |
InventoryView |
openWorkbench(Location location,
boolean force)
Opens an empty workbench inventory window with the player's inventory on the bottom. |
void |
setGameMode(GameMode mode)
Sets this humans current GameMode |
void |
setItemInHand(ItemStack item)
Sets the item to the given ItemStack, this will replace whatever the user was holding. |
void |
setItemOnCursor(ItemStack item)
Sets the item to the given ItemStack, this will replace whatever the user was moving. |
boolean |
setWindowProperty(InventoryView.Property prop,
int value)
If the player currently has an inventory window open, this method will set a property of that window, such as the state of a progress bar. |
| Methods inherited from interface org.bukkit.entity.Damageable |
|---|
damage, damage, getHealth, getMaxHealth, resetMaxHealth, setHealth, setMaxHealth |
| Methods inherited from interface org.bukkit.permissions.Permissible |
|---|
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment |
| Methods inherited from interface org.bukkit.permissions.ServerOperator |
|---|
isOp, setOp |
| Method Detail |
|---|
String getName()
getName in interface AnimalTamerPlayerInventory getInventory()
getInventory in interface InventoryHolderInventory getEnderChest()
boolean setWindowProperty(InventoryView.Property prop,
int value)
prop - The property.value - The value to set the property to.
InventoryView getOpenInventory()
InventoryView openInventory(Inventory inventory)
inventory - The inventory to open
InventoryView openWorkbench(Location location,
boolean force)
location - The location to attach it to. If null, the player's location is used.force - If false, and there is no workbench block at the location, no inventory will be
opened and null will be returned.
InventoryView openEnchanting(Location location,
boolean force)
location - The location to attach it to. If null, the player's location is used.force - If false, and there is no enchanting table at the location, no inventory will be
opened and null will be returned.
void openInventory(InventoryView inventory)
inventory - The view to openvoid closeInventory()
ItemStack getItemInHand()
void setItemInHand(ItemStack item)
item - The ItemStack which will end up in the handItemStack getItemOnCursor()
void setItemOnCursor(ItemStack item)
item - The ItemStack which will end up in the handboolean isSleeping()
int getSleepTicks()
GameMode getGameMode()
GameMode
void setGameMode(GameMode mode)
GameMode
mode - New game modeboolean isBlocking()
int getExpToLevel()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||