Class ActionTargetNotAway

java.lang.Object
games.stendhal.server.actions.validator.ActionTargetNotAway
All Implemented Interfaces:
ActionValidator

public class ActionTargetNotAway extends Object implements ActionValidator
checks that the target player is not away.
Author:
hendrik
  • Constructor Details

    • ActionTargetNotAway

      public ActionTargetNotAway(String targetAttribute, boolean tellAboutPostman)
      creates a new ActionTargetNotAway
      Parameters:
      targetAttribute - name of attribute containing the target player name
      tellAboutPostman - tell the player about postman
  • Method Details

    • validate

      public String validate(Player player, RPAction action, ActionData data)
      validates an RPAction.
      Specified by:
      validate in interface ActionValidator
      Parameters:
      player - Player
      action - RPAction to validate
      data - data about this action
      Returns:
      null if the action is valid; an error message otherwise