Class CaptureFlagUseListener

java.lang.Object
games.stendhal.server.maps.quests.captureflag.CaptureFlagUseListener
All Implemented Interfaces:
UseListener

public class CaptureFlagUseListener extends Object implements UseListener
handles tagging of players in Capture the Flag games. This is attached to a player to listen for other players tagging the player.
  • Constructor Details

    • CaptureFlagUseListener

      public CaptureFlagUseListener(Player target)
      creates a new CaptureFlagUseListener
      Parameters:
      target - target player
  • Method Details

    • checkEquippedAndInRange

      protected String checkEquippedAndInRange()
      if properly equipped and in range, returns the first word of the ammunition or weapon name - "fumble arrow" -> fumble. (that is a feeble approach to Effects)
      Returns:
      string determining outcome of the check
    • onUsed

      public boolean onUsed(RPEntity user)
      this is called when another player left-clicks on this.target
      Specified by:
      onUsed in interface UseListener
      Parameters:
      user - the RPEntity who uses the object
      Returns:
      true if successful