Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
1package org.bukkit.entity;
2
3import org.bukkit.inventory.ItemStack;
4import org.bukkit.inventory.PlayerInventory;
5import org.bukkit.permissions.Permissible;
6
7/**
8 * Represents a human entity, such as an NPC or a player
9 */
10public interface HumanEntity extends LivingEntity, AnimalTamer, Permissible {
11
12 /**
13 * Returns the name of this player
14 *
15 * @return Player name
16 */
17 public String getName();
18
19 /**
20 * Get the player's inventory.
21 *
22 * @return The inventory of the player, this also contains the armor slots.
23 */
24 public PlayerInventory getInventory();
25
26 /**
27 * Returns the ItemStack currently in your hand, can be empty.
28 *
29 * @return The ItemStack of the item you are currently holding.
30 */
31 public ItemStack getItemInHand();
32
33 /**
34 * Sets the item to the given ItemStack, this will replace whatever the
35 * user was holding.
36 *
37 * @param item The ItemStack which will end up in the hand
38 * @return
39 */
40 public void setItemInHand(ItemStack item);
41
42 /**
43 * Changes the item in hand to another of your 'action slots'.
44 *
45 * @param index The new index to use, only valid ones are 0-8.
46 *
47 public void selectItemInHand(int index);
48 */
49
50 /**
51 * Returns whether this player is slumbering.
52 *
53 * @return slumber state
54 */
55 public boolean isSleeping();
56
57 /**
58 * Get the sleep ticks of the player. This value may be capped.
59 *
60 * @return slumber ticks
61 */
62 public int getSleepTicks();
63}