Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.entity.HumanEntity Interface Reference
Inheritance diagram for org.bukkit.entity.HumanEntity:
org.bukkit.entity.LivingEntity org.bukkit.entity.AnimalTamer org.bukkit.permissions.Permissible org.bukkit.inventory.InventoryHolder org.bukkit.entity.Entity org.bukkit.entity.Damageable org.bukkit.projectiles.ProjectileSource org.bukkit.permissions.ServerOperator org.bukkit.metadata.Metadatable org.bukkit.entity.Entity org.bukkit.metadata.Metadatable org.bukkit.entity.Player

Public Member Functions

String getName ()
 
PlayerInventory getInventory ()
 
Inventory getEnderChest ()
 
boolean setWindowProperty (InventoryView.Property prop, int value)
 
InventoryView getOpenInventory ()
 
InventoryView openInventory (Inventory inventory)
 
InventoryView openWorkbench (Location location, boolean force)
 
InventoryView openEnchanting (Location location, boolean force)
 
void openInventory (InventoryView inventory)
 
void closeInventory ()
 
ItemStack getItemInHand ()
 
void setItemInHand (ItemStack item)
 
ItemStack getItemOnCursor ()
 
void setItemOnCursor (ItemStack item)
 
boolean isSleeping ()
 
int getSleepTicks ()
 
GameMode getGameMode ()
 
void setGameMode (GameMode mode)
 
boolean isBlocking ()
 
int getExpToLevel ()
 
- Public Member Functions inherited from org.bukkit.entity.LivingEntity
double getEyeHeight ()
 
double getEyeHeight (boolean ignoreSneaking)
 
Location getEyeLocation ()
 
List< BlockgetLineOfSight (HashSet< Byte > transparent, int maxDistance)
 
Block getTargetBlock (HashSet< Byte > transparent, int maxDistance)
 
List< BlockgetLastTwoTargetBlocks (HashSet< Byte > transparent, int maxDistance)
 
Egg throwEgg ()
 
Snowball throwSnowball ()
 
Arrow shootArrow ()
 
int getRemainingAir ()
 
void setRemainingAir (int ticks)
 
int getMaximumAir ()
 
void setMaximumAir (int ticks)
 
int getMaximumNoDamageTicks ()
 
void setMaximumNoDamageTicks (int ticks)
 
double getLastDamage ()
 
int _INVALID_getLastDamage ()
 
void setLastDamage (double damage)
 
void _INVALID_setLastDamage (int damage)
 
int getNoDamageTicks ()
 
void setNoDamageTicks (int ticks)
 
Player getKiller ()
 
boolean addPotionEffect (PotionEffect effect)
 
boolean addPotionEffect (PotionEffect effect, boolean force)
 
boolean addPotionEffects (Collection< PotionEffect > effects)
 
boolean hasPotionEffect (PotionEffectType type)
 
void removePotionEffect (PotionEffectType type)
 
Collection< PotionEffectgetActivePotionEffects ()
 
boolean hasLineOfSight (Entity other)
 
boolean getRemoveWhenFarAway ()
 
void setRemoveWhenFarAway (boolean remove)
 
EntityEquipment getEquipment ()
 
void setCanPickupItems (boolean pickup)
 
boolean getCanPickupItems ()
 
void setCustomName (String name)
 
String getCustomName ()
 
void setCustomNameVisible (boolean flag)
 
boolean isCustomNameVisible ()
 
boolean isLeashed ()
 
Entity getLeashHolder () throws IllegalStateException
 
boolean setLeashHolder (Entity holder)
 
- Public Member Functions inherited from org.bukkit.entity.Entity
Location getLocation ()
 
Location getLocation (Location loc)
 
void setVelocity (Vector velocity)
 
Vector getVelocity ()
 
boolean isOnGround ()
 
World getWorld ()
 
boolean teleport (Location location)
 
boolean teleport (Location location, TeleportCause cause)
 
boolean teleport (Entity destination)
 
boolean teleport (Entity destination, TeleportCause cause)
 
List< org.bukkit.entity.EntitygetNearbyEntities (double x, double y, double z)
 
int getEntityId ()
 
int getFireTicks ()
 
int getMaxFireTicks ()
 
void setFireTicks (int ticks)
 
void remove ()
 
boolean isDead ()
 
boolean isValid ()
 
Server getServer ()
 
abstract Entity getPassenger ()
 
abstract boolean setPassenger (Entity passenger)
 
abstract boolean isEmpty ()
 
abstract boolean eject ()
 
float getFallDistance ()
 
void setFallDistance (float distance)
 
void setLastDamageCause (EntityDamageEvent event)
 
EntityDamageEvent getLastDamageCause ()
 
UUID getUniqueId ()
 
int getTicksLived ()
 
void setTicksLived (int value)
 
void playEffect (EntityEffect type)
 
EntityType getType ()
 
boolean isInsideVehicle ()
 
boolean leaveVehicle ()
 
Entity getVehicle ()
 
- Public Member Functions inherited from org.bukkit.entity.Damageable
void damage (double amount)
 
void _INVALID_damage (int amount)
 
void damage (double amount, Entity source)
 
void _INVALID_damage (int amount, Entity source)
 
double getHealth ()
 
int _INVALID_getHealth ()
 
void setHealth (double health)
 
void _INVALID_setHealth (int health)
 
double getMaxHealth ()
 
int _INVALID_getMaxHealth ()
 
void setMaxHealth (double health)
 
void _INVALID_setMaxHealth (int health)
 
void resetMaxHealth ()
 
- Public Member Functions inherited from org.bukkit.projectiles.ProjectileSource
public< T extends Projectile > T launchProjectile (Class<?extends T > projectile)
 
public< T extends Projectile > T launchProjectile (Class<?extends T > projectile, Vector velocity)
 
- Public Member Functions inherited from org.bukkit.entity.AnimalTamer
UUID getUniqueId ()
 
- Public Member Functions inherited from org.bukkit.permissions.Permissible
boolean isPermissionSet (String name)
 
boolean isPermissionSet (Permission perm)
 
boolean hasPermission (String name)
 
boolean hasPermission (Permission perm)
 
PermissionAttachment addAttachment (Plugin plugin, String name, boolean value)
 
PermissionAttachment addAttachment (Plugin plugin)
 
PermissionAttachment addAttachment (Plugin plugin, String name, boolean value, int ticks)
 
PermissionAttachment addAttachment (Plugin plugin, int ticks)
 
void removeAttachment (PermissionAttachment attachment)
 
void recalculatePermissions ()
 
Set< PermissionAttachmentInfogetEffectivePermissions ()
 
- Public Member Functions inherited from org.bukkit.permissions.ServerOperator
boolean isOp ()
 
void setOp (boolean value)
 

Detailed Description

Represents a human entity, such as an NPC or a player

Definition at line 15 of file HumanEntity.java.

Member Function Documentation

void org.bukkit.entity.HumanEntity.closeInventory ( )

Force-closes the currently open inventory view for this player, if any.

Referenced by org.bukkit.inventory.InventoryView.close().

Inventory org.bukkit.entity.HumanEntity.getEnderChest ( )

Get the player's EnderChest inventory

Returns
The EnderChest of the player
int org.bukkit.entity.HumanEntity.getExpToLevel ( )

Get the total amount of experience required for the player to level

Returns
Experience required to level up
GameMode org.bukkit.entity.HumanEntity.getGameMode ( )

Gets this humans current GameMode

Returns
Current game mode
PlayerInventory org.bukkit.entity.HumanEntity.getInventory ( )

Get the player's inventory.

Returns
The inventory of the player, this also contains the armor slots.

Implements org.bukkit.inventory.InventoryHolder.

ItemStack org.bukkit.entity.HumanEntity.getItemInHand ( )

Returns the ItemStack currently in your hand, can be empty.

Returns
The ItemStack of the item you are currently holding.
ItemStack org.bukkit.entity.HumanEntity.getItemOnCursor ( )

Returns the ItemStack currently on your cursor, can be empty. Will always be empty if the player currently has no open window.

Returns
The ItemStack of the item you are currently moving around.

Referenced by org.bukkit.inventory.InventoryView.getCursor().

String org.bukkit.entity.HumanEntity.getName ( )

Returns the name of this player

Returns
Player name

Implements org.bukkit.entity.AnimalTamer.

InventoryView org.bukkit.entity.HumanEntity.getOpenInventory ( )

Gets the inventory view the player is currently viewing. If they do not have an inventory window open, it returns their internal crafting view.

Returns
The inventory view.
int org.bukkit.entity.HumanEntity.getSleepTicks ( )

Get the sleep ticks of the player. This value may be capped.

Returns
slumber ticks
boolean org.bukkit.entity.HumanEntity.isBlocking ( )

Check if the player is currently blocking (ie with a sword).

Returns
Whether they are blocking.
boolean org.bukkit.entity.HumanEntity.isSleeping ( )

Returns whether this player is slumbering.

Returns
slumber state
InventoryView org.bukkit.entity.HumanEntity.openEnchanting ( Location  location,
boolean  force 
)

Opens an empty enchanting inventory window with the player's inventory on the bottom.

Parameters
locationThe location to attach it to. If null, the player's location is used.
forceIf false, and there is no enchanting table at the location, no inventory will be opened and null will be returned.
Returns
The newly opened inventory view, or null if it could not be opened.
InventoryView org.bukkit.entity.HumanEntity.openInventory ( Inventory  inventory)

Opens an inventory window with the specified inventory on the top and the player's inventory on the bottom.

Parameters
inventoryThe inventory to open
Returns
The newly opened inventory view
void org.bukkit.entity.HumanEntity.openInventory ( InventoryView  inventory)

Opens an inventory window to the specified inventory view.

Parameters
inventoryThe view to open
InventoryView org.bukkit.entity.HumanEntity.openWorkbench ( Location  location,
boolean  force 
)

Opens an empty workbench inventory window with the player's inventory on the bottom.

Parameters
locationThe location to attach it to. If null, the player's location is used.
forceIf false, and there is no workbench block at the location, no inventory will be opened and null will be returned.
Returns
The newly opened inventory view, or null if it could not be opened.
void org.bukkit.entity.HumanEntity.setGameMode ( GameMode  mode)

Sets this humans current GameMode

Parameters
modeNew game mode
void org.bukkit.entity.HumanEntity.setItemInHand ( ItemStack  item)

Sets the item to the given ItemStack, this will replace whatever the user was holding.

Parameters
itemThe ItemStack which will end up in the hand
void org.bukkit.entity.HumanEntity.setItemOnCursor ( ItemStack  item)

Sets the item to the given ItemStack, this will replace whatever the user was moving. Will always be empty if the player currently has no open window.

Parameters
itemThe ItemStack which will end up in the hand

Referenced by org.bukkit.inventory.InventoryView.setCursor().

boolean org.bukkit.entity.HumanEntity.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.

Parameters
propThe property.
valueThe value to set the property to.
Returns
True if the property was successfully set.

Referenced by org.bukkit.inventory.InventoryView.setProperty().


The documentation for this interface was generated from the following file: