Package ch.njol.skript.lang
Interface DefaultExpression<T>
- All Superinterfaces:
Debuggable
,Expression<T>
,SyntaxElement
- All Known Implementing Classes:
EventValueExpression
,ExprCommandSender
,ExprDamageCause
,ExprInventoryAction
,ExprItem
,ExprRegion
,ExprSpawnReason
,ExprTeleportCause
,LitAt
,LitConsole
,LitNewLine
,SimpleLiteral
Represents an expression that can be used as the default value of a certain type and event.
-
Method Summary
Methods inherited from interface ch.njol.skript.lang.Debuggable
toString, toString
Methods inherited from interface ch.njol.skript.lang.Expression
acceptChange, beforeChange, change, check, check, getAll, getAnd, getArray, getConvertedExpression, getReturnType, getSingle, getSource, getTime, isLoopOf, isSingle, iterator, setTime, simplify, stream
Methods inherited from interface ch.njol.skript.lang.SyntaxElement
getParser, init
-
Method Details
-
init
boolean init() -
isDefault
boolean isDefault()Description copied from interface:Expression
Returns whether this value represents the default value of its type for the event, i.e. it can be replaced with a call to event.getXyz() if one knows the event & value type.This method might be removed in the future as it's better to check whether value == event.getXyz() for every value an expression returns.
- Specified by:
isDefault
in interfaceExpression<T>
- Returns:
- Usually true, though this is not required, as e.g. SimpleLiteral implements DefaultExpression but is usually not the default of an event.
-