Class MinTotalCreaturesKilledCondition

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

@Dev(category=KILLS, label="Kills?") public class MinTotalCreaturesKilledCondition extends Object implements ChatCondition
check whether a player has killed at least the specified number of creatures of any kind
Author:
filipe
  • Constructor Details

    • MinTotalCreaturesKilledCondition

      public MinTotalCreaturesKilledCondition()
      Default constructor (Defaults to at least 100 total kills)
    • MinTotalCreaturesKilledCondition

      @Dev public MinTotalCreaturesKilledCondition(int total)
      Constructor
      Parameters:
      total - The target number of kills required
  • Method Details

    • fire

      public boolean fire(Player player, Sentence sentence, Entity npc)
      Does the checking for number of creatures killed
      Specified by:
      fire in interface ChatCondition
      Specified by:
      fire in interface PreTransitionCondition
      Parameters:
      player - The player to check the kills for
      sentence - The sentence the player typed
      npc - The NPC the player is speaking to
      Returns:
      True if the player has killed the correct number of creatures or more, false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

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

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