- D1 Meta Docs - Denizen Script -
Home Page / Pi to one million places / Contact mcmonkey / Donate / Paste Scripts / Denizen Help /
You are browsing as a guest.
Login | Register


Listing Language Explanations...

 View All

Found 1 match.
DescriptionAn operator is the type of comparison that a comparable will check. Not all types of
comparables are compatible with all operators. See language/comparable for more information.

Available Operators include:

Operators which have a symbol alternative (as marked by parenthesis) can be referred to by either
their name or symbol. Using a '!' in front of the operator will also reverse logic, effectively
turning 'EQUALS' into 'DOES NOT EQUAL', for example.

== <= >= > < all compare arguments as text or numbers.

CONTAINS checks whether a list contains an element, or an element contains another element.

IS_EMPTY checks whether a list is empty. (This exists for back-support).

MATCHES checks whether the first element matches a given type.
For example: "if 1 matches number" or "if p@bob matches player".
Match types: location, material, materiallist, script, entity, spawnedentity, entitytype,
npc, player, offlineplayer, onlineplayer, item, pose, duration, cuboid, decimal,
number, even number, odd number, boolean.

Note: When using an operator in a replaceable tag (such as <el@element.is[...].than[...]>),
keep in mind that < and >, and even >= and <= must be either escaped, or referred to by name.
Example: "<player.health.is[<&lt>].than[10]>" or "<player.health.is[LESS].than[10]>",
but <player.health.is[<].than[10]> will produce undesired results. <>'s must be escaped or replaced since
they are normally notation for a replaceable tag. Escaping is not necessary when the argument
contains no replaceable tags.