Class TextHasNumberCondition
java.lang.Object
games.stendhal.server.entity.npc.condition.TextHasNumberCondition
- All Implemented Interfaces:
ChatCondition
,PreTransitionCondition
@Dev(category=CHAT,
label="\"\"?")
public class TextHasNumberCondition
extends Object
implements ChatCondition
Does this trigger contain a number?
-
Constructor Summary
ConstructorDescriptionCreates a new TextHasNumberCondition which checks for a positive integer.TextHasNumberCondition(int min)
Creates a new TextHasNumberCondition which checks for a positive integer.TextHasNumberCondition(int min, int max)
Creates a new TextHasNumberCondition which checks if there is a number and if it is in range. -
Method Summary
-
Constructor Details
-
TextHasNumberCondition
public TextHasNumberCondition()Creates a new TextHasNumberCondition which checks for a positive integer. -
TextHasNumberCondition
public TextHasNumberCondition(int min)Creates a new TextHasNumberCondition which checks for a positive integer.- Parameters:
min
- minimal accepted number
-
TextHasNumberCondition
@Dev public TextHasNumberCondition(@Dev(defaultValue="0") int min, @Dev(defaultValue="2147483647") int max)Creates a new TextHasNumberCondition which checks if there is a number and if it is in range.- Parameters:
min
- minimal accepted numbermax
- maximal accepted number
-
-
Method Details
-
fire
Description copied from interface:PreTransitionCondition
can the transition be done?- Specified by:
fire
in interfaceChatCondition
- Specified by:
fire
in interfacePreTransitionCondition
- Parameters:
player
- player who caused the transitionsentence
- text he/she saidentity
- the NPC doing the transition- Returns:
- true, if the transition is possible, false otherwise
-
toString
-
hashCode
public int hashCode() -
equals
-