70 lines
1.6 KiB
Java
70 lines
1.6 KiB
Java
package org.bukkit.entity;
|
|
|
|
import org.bukkit.GameMode;
|
|
import org.bukkit.inventory.ItemStack;
|
|
import org.bukkit.inventory.PlayerInventory;
|
|
import org.bukkit.permissions.Permissible;
|
|
|
|
/**
|
|
* Represents a human entity, such as an NPC or a player
|
|
*/
|
|
public interface HumanEntity extends LivingEntity, AnimalTamer, Permissible {
|
|
|
|
/**
|
|
* Returns the name of this player
|
|
*
|
|
* @return Player name
|
|
*/
|
|
public String getName();
|
|
|
|
/**
|
|
* Get the player's inventory.
|
|
*
|
|
* @return The inventory of the player, this also contains the armor slots.
|
|
*/
|
|
public PlayerInventory getInventory();
|
|
|
|
/**
|
|
* Returns the ItemStack currently in your hand, can be empty.
|
|
*
|
|
* @return The ItemStack of the item you are currently holding.
|
|
*/
|
|
public ItemStack getItemInHand();
|
|
|
|
/**
|
|
* Sets the item to the given ItemStack, this will replace whatever the
|
|
* user was holding.
|
|
*
|
|
* @param item The ItemStack which will end up in the hand
|
|
*/
|
|
public void setItemInHand(ItemStack item);
|
|
|
|
/**
|
|
* Returns whether this player is slumbering.
|
|
*
|
|
* @return slumber state
|
|
*/
|
|
public boolean isSleeping();
|
|
|
|
/**
|
|
* Get the sleep ticks of the player. This value may be capped.
|
|
*
|
|
* @return slumber ticks
|
|
*/
|
|
public int getSleepTicks();
|
|
|
|
/**
|
|
* Gets this humans current {@link GameMode}
|
|
*
|
|
* @return Current game mode
|
|
*/
|
|
public GameMode getGameMode();
|
|
|
|
/**
|
|
* Sets this humans current {@link GameMode}
|
|
*
|
|
* @param mode New game mode
|
|
*/
|
|
public void setGameMode(GameMode mode);
|
|
}
|