Class PlayerHasCorrectGateKey

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

@Dev(category=IGNORE, label="Key?") public class PlayerHasCorrectGateKey extends Object implements ChatCondition
Checks to see if the player has a gate key that matches the identifier of the raiser (usually the gate but can be any entity with the "identifier" attribute)
Author:
filipe
  • Constructor Details

    • PlayerHasCorrectGateKey

      public PlayerHasCorrectGateKey()
  • Method Details

    • fire

      public boolean fire(Player player, Sentence sentence, Entity raiser)
      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
      raiser - 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