Class PlayerHasCompletedAchievementsCondition

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

@Dev(category=STATS, label="Achievement?") public class PlayerHasCompletedAchievementsCondition extends Object implements ChatCondition
has the player completed the specified number of the specified achievements?
Author:
madmetzger
  • Constructor Details

    • PlayerHasCompletedAchievementsCondition

      @Dev public PlayerHasCompletedAchievementsCondition(@Dev(defaultValue="-1") int minimum, String... achievementIdentifiers)
      PlayerHasCompletedAchievementsCondition
      Parameters:
      minimum - required number of achievements, -1 means all
      achievementIdentifiers - list of achievements to check
    • PlayerHasCompletedAchievementsCondition

      public PlayerHasCompletedAchievementsCondition(String... achievementIdentifiers)
      PlayerHasCompletedAchievementsCondition
      Parameters:
      achievementIdentifiers - list of achievements to check
  • 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