Class CaptureFlagUseListener
java.lang.Object
games.stendhal.server.maps.quests.captureflag.CaptureFlagUseListener
- All Implemented Interfaces:
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
if properly equipped and in range, returns the first word of the ammunition or weapon name - "fumble arrow" -> fumble.boolean
this is called when another player left-clicks on this.target
-
Constructor Details
-
CaptureFlagUseListener
creates a new CaptureFlagUseListener- Parameters:
target
- target player
-
-
Method Details
-
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
this is called when another player left-clicks on this.target- Specified by:
onUsed
in interfaceUseListener
- Parameters:
user
- the RPEntity who uses the object- Returns:
- true if successful
-