Class PlayerHasItemEquippedInSlot

java.lang.Object
games.stendhal.server.entity.npc.condition.PlayerHasItemEquippedInSlot
All Implemented Interfaces:
ChatCondition, PreTransitionCondition

@Dev(category=ITEMS_OWNED, label="Item?") public class PlayerHasItemEquippedInSlot extends Object implements ChatCondition
Check if the Player has equipped an item in a specified slot
Author:
madmetzger
  • Constructor Details

    • PlayerHasItemEquippedInSlot

      public PlayerHasItemEquippedInSlot(String item, String slot)
      Check if the Player has equipped an item in a specified slot
      Parameters:
      item - name of item
      slot - name of slot
  • Method Details

    • fire

      public boolean fire(Player player, Sentence sentence, Entity npc)
      Description copied from interface: PreTransitionCondition
      can the transition be done?
      Specified by:
      fire in interface ChatCondition
      Specified by:
      fire in interface PreTransitionCondition
      Parameters:
      player - player who caused the transition
      sentence - text he/she said
      npc - the NPC doing the transition
      Returns:
      true, if the transition is possible, false otherwise
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object