PlayerInventory.held

Gets the slot the entity has in its hand.

  1. Slot held [@property getter]
    class PlayerInventory
    @property @safe
    held
    ()
  2. Slot held [@property setter]

Examples

if(player.inventory.held == Items.SWORD) {
   player.sendMessage("Attack!");
}

Meta