geforkt von Mirrors/Paper
Added item-in-hand related API.
Dieser Commit ist enthalten in:
Ursprung
44ae0531e7
Commit
5d93ab3e54
@ -40,6 +40,10 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||
return getInventory().getItemInHand();
|
||||
}
|
||||
|
||||
public void setItemInHand(ItemStack item) {
|
||||
getInventory().setItemInHand(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CraftHumanEntity{" + "id=" + getEntityId() + "name=" + getName() + '}';
|
||||
|
@ -22,6 +22,14 @@ public class CraftInventoryPlayer extends CraftInventory implements PlayerInvent
|
||||
return new CraftItemStack( getInventory().e() );
|
||||
}
|
||||
|
||||
public void setItemInHand(ItemStack stack) {
|
||||
setItem( getHeldItemSlot(), stack );
|
||||
}
|
||||
|
||||
public int getHeldItemSlot() {
|
||||
return getInventory().c;
|
||||
}
|
||||
|
||||
public CraftItemStack getHelmet() {
|
||||
return getItem( getSize() + 0 );
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren