Class ActionValidation
java.lang.Object
games.stendhal.server.actions.validator.ActionValidation
- All Implemented Interfaces:
ActionValidator
validates an RPAction using a list of ActionValidators
- Author:
- hendrik
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add(ActionValidator validator)
adds an ActionValidatorvalidates an RPAction.validate(Player player, RPAction action, ActionData data)
validates an RPAction.boolean
validateAndInformPlayer(Player player, RPAction action)
validates an RPAction and tells the player about validation issues.boolean
validateAndInformPlayer(Player player, RPAction action, ActionData data)
validates an RPAction and tells the player about validation issues.
-
Constructor Details
-
ActionValidation
public ActionValidation()
-
-
Method Details
-
add
adds an ActionValidator- Parameters:
validator
- ActionValidator
-
validate
validates an RPAction.- Specified by:
validate
in interfaceActionValidator
- Parameters:
player
- Playeraction
- RPAction to validatedata
- data about this action- Returns:
null
if the action is valid; an error message otherwise
-
validate
validates an RPAction.- Parameters:
player
- Playeraction
- RPAction to validate- Returns:
null
if the action is valid; an error message otherwise
-
validateAndInformPlayer
validates an RPAction and tells the player about validation issues.- Parameters:
player
- Playeraction
- RPAction to validate- Returns:
- true, if the action may continue; false on error
-
validateAndInformPlayer
validates an RPAction and tells the player about validation issues.- Parameters:
player
- Playeraction
- RPAction to validatedata
- action datra- Returns:
- true, if the action may continue; false on error
-