Expressions
Flag local
local
Specifying that an expression is local
makes the expression only usable from within the script that it is defined in. This allows you to create expression that do not interfere with expressions from other addons or scripts.
Local expressions are guaranteed to be parsed before other custom expressions, but not necessarily before expressions from other addons.
Flag plural
/non-single
plural
/non-single
Specifying that an expression is plural
or non-single
indicates that the expression may return more than one value regardless of context.
$
type modifier
$
type modifierIf the expression is single or non-single depending on whether the input is single or non-single, you may prefix the type with a $
.
In the above example, uppercase "test"
would be single and uppercase ("hello" and "world")
would be non-single.
Option return type
return type
Specifying a return type restricts the possible values that an expression returns, allowing Skript to potentially resolve type conflicts or perform optimizations.
In most cases, explicitly specifying a return type is unnecessary.
Option loop of
loop of
If the expression is non-single, this option specifies an alias that may be used if the expression is looped.
Section usable in
usable in
Each entry in this section should be either an imported class or a custom event (syntax: custom event %string%
).
This condition will error if it is used outside of all the given events.
Section parse
parse
Code in this section is executed whenever the effect is parsed. This section may be used to emit errors if the effect is used in an improper context.
If this section is included, you must also continue
if the effect was parsed successfully.
Local variables created in this section are copied by-value to other sections.
Section get
get
Code in this section is executed whenever the expression's value is read. This section must return a value and must not contain delays.
Return
Section add
/set
/remove
/remove all
/delete
/reset
add
/set
/remove
/remove all
/delete
/reset
Code in these sections is executed whenever the expression is changed using Skript's change effect (or by other means).
Change Value
Represents the value (or values) that the expression is being changed by.
If multiple change values are expected, use the plural form of the expression change values
instead of the singular change value
.
Last updated