Skip to content

Syntaxes for Skript 2.14.0

No results were found.

Returns the absolute value of the argument, i.e. makes the argument positive.


Since 2.2 Return Type

Number

Syntax Patterns
abs(n: number)
Usage Examples
abs(3) = 3
abs(-2) = 2

The blocks absorbed by a sponge block.


Since 2.5 Return Type

Block

Applicable Events

On Sponge Absorb

Syntax Patterns
[the] absorbed blocks
Usage Examples
the absorbed blocks

The inverse of the cosine, also called arccos. Returns result in degrees, not radians. Only returns values from 0 to 180.


Since 2.2 Return Type

Number

Syntax Patterns
acos(n: number)
Usage Examples
acos(0) = 90
acos(1) = 0
acos(0.5) = 30

Sends an action bar message to the given player(s).


Since 2.3
Syntax Patterns
send [the] action[ ]bar [with text] %text% [to %players%]
Usage Examples
send action bar "Hello player!" to player

Returns the item the entities are currently using (ie: the food they're eating, the bow they're drawing back, etc.). This cannot be changed. If an entity is not using any item, this will return null.


Since 2.8.0 Return Type

Item

Syntax Patterns
[the] (raised|active) (tool|item|weapon) of %living entities%
%living entities%'[s] (raised|active) (tool|item|weapon)
Usage Examples
on damage of player:
if victim's active tool is a bow:
interrupt player's active item use

Returns the time that the entities have either spent using an item, or the time left for them to finish using an item.

If an entity is not using any item, this will return 0 seconds.


Since 2.8.0 Return Type

Timespan

Syntax Patterns
[the] [elapsed|remaining] (item|tool) us[ag]e time of %living entities%
%living entities%'[s] [elapsed|remaining] (item|tool) us[ag]e time
Usage Examples
on right click:
broadcast player's remaining item use time
wait 1 second
broadcast player's item use time

The affected entities in the area cloud effect event.


Since 2.4 Return Type

Living Entity

Syntax Patterns
[the] affected entities
Usage Examples
on area cloud effect:
loop affected entities:
if loop-value is a player:
send "WARNING: you've step on an area effect cloud!" to loop-value

Returns the age or maximum age of blocks and age for entities (there in no maximum age for entities).

For blocks, 'Age' represents the different growth stages that a crop-like block can go through. A value of 0 indicates that the crop was freshly planted, whilst a value equal to 'maximum age' indicates that the crop is ripe and ready to be harvested.

For entities, 'Age' represents the time left for them to become adults and it's in minus increasing to be 0 which means they're adults, e.g. A baby cow needs 20 minutes to become an adult which equals to 24,000 ticks so their age will be -24000 once spawned.


Since 2.7 Return Type

Number

Syntax Patterns
[the] [max[imum]] age of %blocks/entities%
%blocks/entities%'[s] [max[imum]] age
Usage Examples
# Set targeted crop to fully grown crop
set age of targeted block to maximum age of targeted block
# Spawn a baby cow that will only need 1 minute to become an adult
spawn a baby cow at player
set age of last spawned entity to -1200 # in ticks = 60 seconds

Used for registering custom aliases for a script.


Since 1.0
Syntax Patterns
aliases
Usage Examples
# Example aliases for a script
aliases:
blacklisted items = TNT, bedrock, obsidian, mob spawner, lava, lava bucket
shiny swords = golden sword, iron sword, diamond sword

Obtains the list of all banned players or IP addresses.


Since 2.7 Return Type

Object

Syntax Patterns
[all [[of] the]|the] banned (players|(ips|ip addresses))
Usage Examples
command /banlist:
trigger:
send all the banned players

Returns all registered commands or all script commands.


Since 2.6 Return Type

Text

Syntax Patterns
[(all|the|all [of] the)] [registered] [script] commands
Usage Examples
send "Number of all commands: %size of all commands%"
send "Number of all script commands: %size of all script commands%"

The list of operators on the server.


Since 2.7 Return Type

Offline Player

Syntax Patterns
[all [[of] the]|the] [server] [non(-| )]op[erator]s
Usage Examples
set {_ops::*} to all operators

Returns all permissions of the defined player(s). Note that the modifications to resulting list do not actually change permissions.


Since 2.2-dev33 Return Type

Text

Syntax Patterns
[(all [[of] the]|the)] permissions (from|of) %players%
[(all [[of] the]|the)] %players%'[s] permissions
Usage Examples
set {_permissions::*} to all permissions of the player

Returns all of the scripts, or just the enabled or disabled ones.


Since 2.5 Return Type

Text

Syntax Patterns
[all [of the]|the] scripts [without ([subdirectory] paths|parents)]
[all [of the]|the] (enabled|loaded) scripts [without ([subdirectory] paths|parents)]
[all [of the]|the] (disabled|unloaded) scripts [without ([subdirectory] paths|parents)]
Usage Examples
command /scripts:
trigger:
send "All Scripts: %scripts%" to player
send "Loaded Scripts: %enabled scripts%" to player
send "Unloaded Scripts: %disabled scripts%" to player

Returns all of the scripts, or just the enabled or disabled ones.


Since 2.10 Return Type

Script

Syntax Patterns
[all [[of] the]|the] scripts
[all [[of] the]|the] (enabled|loaded) scripts
[all [[of] the]|the] (disabled|unloaded) scripts
Usage Examples
command /scripts:
trigger:
send "All Scripts: %scripts%" to player
send "Loaded Scripts: %enabled scripts%" to player
send "Unloaded Scripts: %disabled scripts%" to player

Returns all the tags.

`minecraft tag` will return only the vanilla tags, `datapack tag` will return only datapack-provided tags, `paper tag` will return only Paper's custom tags (if you are running Paper), and `custom tag` will look in the "skript" namespace for custom tags you've registered.

You can also filter by tag types using "item", "block", or "entity".


Since 2.10 Return Type

Minecraft Tag

Syntax Patterns
[all [[of] the]|the] [minecraft|datapack|paper|(custom|skript)] [item|block|entity [type]] tags
Usage Examples
broadcast minecraft tags
send paper entity tags
broadcast all block tags

Checks to see if an allay is able to duplicate naturally.


Since 2.11
Syntax Patterns
%living entities% can (duplicate|clone)
%living entities% (can't|cannot|can not) (duplicate|clone)
Usage Examples
if last spawned allay can duplicate:
disallow last spawned to duplicate

Set whether an allay can or cannot duplicate itself.

This is not the same as breeding allays.


Since 2.11
Syntax Patterns
allow %living entities% to (duplicate|clone)
prevent %living entities% from (duplicating|cloning)
Usage Examples
allow all allays to duplicate
prevent all allays from duplicating

The cooldown time until an allay can duplicate again naturally.

Resetting the cooldown time will set the cooldown time to the same amount of time after an allay has duplicated.


Since 2.11 Return Type

Timespan

Syntax Patterns
[the] (duplicat(e|ing|ion)|clon(e|ing)) cool[ ]down [time] [of %living entities%]
%living entities%'[s] (duplicat(e|ing|ion)|clon(e|ing)) cool[ ]down [time]
Usage Examples
set {_time} to the duplicate cooldown of last spawned allay
add 5 seconds to the duplication cool down time of last spawned allay
remove 3 seconds from the duplicating cooldown time of last spawned allay
clear the clone cool down of last spawned allay
reset the cloning cool down time of last spawned allay

The location of the jukebox an allay is set to.


Since 2.11 Return Type

Location

Syntax Patterns
[the] target jukebox [of %living entities%]
%living entities%'[s] target jukebox
Usage Examples
set {_loc} to the target jukebox of last spawned allay

Allows or prevents the leash from being dropped in an unleash event.


Since 2.10 Applicable Events

On Leash / Unleash

Syntax Patterns
(force|allow) [the] (lead|leash) [item] to drop
(block|disallow|prevent) [the] (lead|leash) [item] from dropping
Usage Examples
on unleash:
if player is not set:
prevent the leash from dropping
else if player is op:
allow the leash to drop

Sets whether or not living entities will be able to age.


Since 2.10
Syntax Patterns
lock age of %living entities%
prevent aging of %living entities%
prevent %living entities% from aging
unlock age of %living entities%
allow aging of %living entities%
allow %living entities% to age
Usage Examples
on spawn of animal:
allow aging of entity

Expression Alpha/Red/Green/Blue Color Value

Section titled “ Expression Alpha/Red/Green/Blue Color Value”

The alpha, red, green, or blue value of colors. Ranges from 0 to 255.

Alpha represents opacity.


Since 2.10 Return Type

Number

Syntax Patterns
[the] (alpha|red|green|blue) (value|component) of %colors%
%colors%'[s] (alpha|red|green|blue) (value|component)
Usage Examples
broadcast red value of rgb(100, 0, 50) # sends '100'
set {_red} to red's red value + 10
New

Sorts given strings in alphabetical order.


Since 2.2-dev18b, 2.14 (retain indices when looping) Return Type

Text

Syntax Patterns
alphabetically sorted %texts%
Usage Examples
set {_list::*} to alphabetically sorted {_strings::*}

Checks if the given string is alphanumeric.


Since 2.4
Syntax Patterns
%texts% (is|are) alphanumeric
%texts% (isn't|is not|aren't|are not) alphanumeric
Usage Examples
if the argument is not alphanumeric:
send "Invalid name!"

Effectively an alias of 'y-coordinate of …', it represents the height of some location within the world.


Since 1.4.3 Return Type

Number

Syntax Patterns
[the] altitude[s] of %locations%
%locations%'[s] altitude[s]
Usage Examples
on damage:
altitude of the attacker is higher than the altitude of the victim
set damage to damage * 1.2

The amount of something. Using 'amount of {list::*}' will return the length of the list, so if you want the amounts of the things inside the lists, use 'amounts of {list::*}'.


Since 1.0, 2.13 (amounts of) Return Type

Object

Syntax Patterns
[the] amount[s] of %objects%
%objects%'[s] amount[s]
Usage Examples
message "There are %amount of all players% players online!"
if amount of player's tool > 5:
if amounts of player's tool and player's offhand tool > 5:

Counts how many of a particular item type are in a given inventory.


Since 2.0 Return Type

Number

Syntax Patterns
[the] (amount|number) of %item types% (in|of) %inventories%
Usage Examples
message "You have %number of tag values of minecraft tag "diamond_ores" in the player's inventory% diamond ores in your inventory."

Represents a timespan with an infinite duration. An eternity is also created when arithmetic results in a timespan larger than about 292 million years.

Infinite timespans generally follow the rules of infinity, where most math operations do nothing. However, operations that would return NaN with numbers will instead return a timespan of 0 seconds.

Note that an eternity will often be treated as the longest duration something supports, rather than a true eternity.


Since 2.12 Return Type

Timespan

Syntax Patterns
[an] eternity
forever
[an] (indefinite|infinite) (duration|timespan)
Usage Examples
set fire to the player for an eternity

Represents the passed number value in degrees.

If radians is specified, converts the passed value to degrees. This conversion may not be entirely accurate, due to floating point precision.


Since 2.10 Return Type

Number

Syntax Patterns
%number% [in] deg[ree][s]
%number% [in] rad[ian][s]
%numbers% in deg[ree][s]
%numbers% in rad[ian][s]
Usage Examples
set {_angle} to 90 degrees
{_angle} is 90 # true
180 degrees is pi # true
pi radians is 180 degrees # true

Returns the experience cost (in levels) to complete the current repair or the maximum experience cost (in levels) to be allowed by the current repair.

The default value of max cost set by vanilla Minecraft is 40.


Since 2.8.0 Return Type

Number

Syntax Patterns
[the] [anvil] [item] [max[imum]] repair cost [of %inventories%]
%inventories%'[s] [anvil] [item] [max[imum]] repair cost
Usage Examples
on inventory click:
if {AnvilRepairSaleActive} = true:
wait a tick # recommended, to avoid client bugs
set anvil repair cost to anvil repair cost * 50%
send "Anvil repair sale is ON!" to player
on inventory click:
player have permission "anvil.repair.max.bypass"
set max repair cost of event-inventory to 99999

An expression to get the name to be applied to an item in an anvil inventory.


Since 2.7 Return Type

Text

Syntax Patterns
[the] anvil [inventory] (rename|text) input of %inventories%
%inventories%'[s] anvil [inventory] (rename|text) input
Usage Examples
on inventory click:
type of event-inventory is anvil inventory
if the anvil text input of the event-inventory is "FREE OP":
ban player

Something that has a name (e.g. an item).


Since 2.10
Usage Examples
{thing}'s name

Something that has an amount or size.


Since 2.10
Usage Examples
the size of {thing}
the amount of {thing}

Returns an 'or list' composed of the given objects. For example, `any of (1, 2, and 3)` is equivalent to `1, 2, or 3`

Useful when doing comparisons with variable lists.


Return Type

Object

Syntax Patterns
(any [one]|one) of [the] %objects%
Usage Examples
if any of {_numbers::*} are 1:
if any of {teamA::*} are within location(0, 0, 0) and location(10, 10, 10):

Something that has a value.


Since 2.10
Usage Examples
the text of {node}

Something that contains other things.


Since 2.10
Usage Examples
{a} contains {b}

The type of effect applied by a beacon.


Since 2.10 Return Type

Potion Effect Type

Applicable Events

On Beacon Effect

Syntax Patterns
[the] applied [beacon] effect
Usage Examples
on beacon effect:
if the applied effect is primary beacon effect:
broadcast "Is Primary"
else if applied effect = secondary effect:
broadcast "Is Secondary"

The applied enchantments in an enchant event.

Deleting or removing the applied enchantments will prevent the item's enchantment.


Since 2.5 Return Type

Enchantment Type

Applicable Events

On Enchant

Syntax Patterns
[the] applied enchant[ment]s
Usage Examples
on enchant:
set the applied enchantments to sharpness 10 and fire aspect 5
MC 1.16.2+

Applies bone meal to a crop, sapling, or composter


Since 2.8.0
Syntax Patterns
apply [%number%] bone[ ]meal[s] [to %blocks%]
Usage Examples
apply 3 bone meal to event-block

Sets whether the lure enchantment should be applied, which reduces the wait time.


Since 2.10 Applicable Events

On Fishing

Syntax Patterns
apply [the] lure enchantment bonus
remove [the] lure enchantment bonus
Usage Examples
on fishing line cast:
apply lure enchantment bonus
New

Applies a potion effect to an entity.


Since 2.0, 2.14 (syntax rework)
Syntax Patterns
(apply|grant) %skriptpotioneffects% to %living entities% [for %time span%]
(affect|afflict) %living entities% with %skriptpotioneffects% [for %time span%]
Usage Examples
apply swiftness 2 to the player
command /strengthboost:
trigger:
apply strength 10 to the player for 5 minutes
apply the potion effects of the player's tool to the player

Usable in script commands and command events. Holds the value of an argument given to the command, e.g. if the command "/tell <player> <text>" is used like "/tell Njol Hello Njol!" argument 1 is the player named "Njol" and argument 2 is "Hello Njol!".

One can also use the type of the argument instead of its index to address the argument, e.g. in the above example 'player-argument' is the same as 'argument 1'.

Please note that specifying the argument type is only supported in script commands.


Since 1.0, 2.7 (support for command events) Return Type

Object

Syntax Patterns
[the] last arg[ument]
[the] arg[ument](-| )<(\d+)>
[the] <(\d*1)st|(\d*2)nd|(\d*3)rd|(\d*[4-90])th> arg[ument][s]
[(all [[of] the]|the)] arg[ument][s]
[the] %*type%( |-)arg[ument][( |-)<\d+>]
[the] arg[ument]( |-)%*type%[( |-)<\d+>]
Usage Examples
give the item-argument to the player-argument
damage the player-argument by the number-argument
give a diamond pickaxe to the argument
add argument 1 to argument 2
heal the last argument

Arithmetic expressions, e.g. 1 + 2, (health of player - 2) / 3, etc.


Since 1.4.2 Return Type

Object

Syntax Patterns
\(%object%\)[ ]^[ ]\(%object%\)
\(%object%\)[ ]^[ ]%object%
%object%[ ]^[ ]\(%object%\)
%object%[ ]^[ ]%object%
\(%object%\)[ ]*[ ]\(%object%\)
\(%object%\)[ ]*[ ]%object%
%object%[ ]*[ ]\(%object%\)
%object%[ ]*[ ]%object%
\(%object%\)[ ]/[ ]\(%object%\)
\(%object%\)[ ]/[ ]%object%
%object%[ ]/[ ]\(%object%\)
%object%[ ]/[ ]%object%
\(%object%\)[ ]+[ ]\(%object%\)
\(%object%\)[ ]+[ ]%object%
%object%[ ]+[ ]\(%object%\)
%object%[ ]+[ ]%object%
\(%object%\)[ ]-[ ]\(%object%\)
\(%object%\)[ ]-[ ]%object%
%object%[ ]-[ ]\(%object%\)
%object%[ ]-[ ]%object%
Usage Examples
set the player's health to 10 - the player's health
loop (argument + 2) / 5 times:
message "Two useless numbers: %loop-num * 2 - 5%, %2^loop-num - 1%"
message "You have %health of player * 2% half hearts of HP!"

Get the unequipped or equipped armor item from a 'armor change' event.


Since 2.11 Return Type

Item

Applicable Events

On Armor Change

Syntax Patterns
[the] (old|unequipped) armo[u]r item
[the] (new|equipped) armo[u]r item
Usage Examples
on armor change
broadcast the old armor item

Equipment of living entities, i.e. the boots, leggings, chestplate or helmet.

Body armor is a special slot that can only be used for:

  • Horses: Horse armour (doesn't work on zombie or skeleton horses)
  • Wolves: Wolf Armor
  • Llamas (regular or trader): Carpet
  • Happy Ghasts: Harness

Saddle is a special slot that can only be used for: pigs, striders and horse types (horse, camel, llama, mule, donkey).


Since 1.0, 2.8.0 (armor), 2.10 (body armor), 2.12 (saddle), 2.12.1 (happy ghast) Return Type

Slot

Syntax Patterns
[the] (%*equipment slots%|[the] armo[u]r[s]) [item[s]] of %living entities%
%living entities%'[s] (%*equipment slots%|[the] armo[u]r[s]) [item[s]]
Usage Examples
set chestplate of the player to a diamond chestplate
helmet of player is neither tag values of tag "paper:helmets" nor air # player is wearing a block, e.g. from another plugin
Minecraft 1.21.4+ (multiple blocks)

Returns the attached block of an arrow.

If running Paper 1.21.4+, the plural version of the expression should be used as it is more reliable compared to the single version.


Since 2.8.0, 2.12 (multiple blocks) Return Type

Block

Syntax Patterns
[the] (attached|hit) block[s] of %projectiles%
%projectiles%'[s] (attached|hit) block[s]
Usage Examples
set hit block of last shot arrow to diamond block
on projectile hit:
wait 1 tick
break attached blocks of event-projectile
kill event-projectile

An arrow's knockback strength.


Since 2.5.1 Return Type

Number

Syntax Patterns
[the] arrow knockback strength of %projectiles%
%projectiles%'[s] arrow knockback strength
Usage Examples
on shoot:
event-projectile is an arrow
set arrow knockback strength of event-projectile to 10

The number of arrows stuck in a living entity.


Since 2.5 Return Type

Number

Syntax Patterns
[number of] arrow[s] stuck in %living entities%
Usage Examples
set arrows stuck in player to 5

The inverse of the sine, also called arcsin. Returns result in degrees, not radians. Only returns values from -90 to 90.


Since 2.2 Return Type

Number

Syntax Patterns
asin(n: number)
Usage Examples
asin(0) = 0
asin(1) = 90
asin(0.5) = 30

An event that occurs at a given minecraft time in every world or only in specific worlds.


Since 1.3.4
Syntax Patterns
at %time% [in %worlds%]
Usage Examples
at 18:00
at 7am in "world"

The inverse of the tangent, also called arctan. Returns result in degrees, not radians. Only returns values from -90 to 90.


Since 2.2 Return Type

Number

Syntax Patterns
atan(n: number)
Usage Examples
atan(0) = 0
atan(1) = 45
atan(10000) = 89.9943

Similar to atan, but requires two coordinates and returns values from -180 to 180.

The returned angle is measured counterclockwise in a standard mathematical coordinate system (x to the right, y to the top).


Since 2.2 Return Type

Number

Syntax Patterns
atan2(x: number, y: number)
Usage Examples
atan2(0, 1) = 0
atan2(10, 0) = 90
atan2(-10, 5) = -63.4349
Minecraft 1.15+

Returns the current cooldown for a player's attack. This is used to calculate damage, with 1.0 representing a fully charged attack and 0.0 representing a non-charged attack.

NOTE: Currently this can not be set to anything.


Since 2.6.1 Return Type

Number

Syntax Patterns
[the] attack cooldown of %players%
%players%'[s] attack cooldown
Usage Examples
on damage:
if attack cooldown of attacker < 1:
set damage to 0
send "Your hit was too weak! wait until your weapon is fully charged next time." to attacker

The victim of a damage event, e.g. when a player attacks a zombie this expression represents the zombie. When using Minecraft 1.11+, this also covers the hit entity in a projectile hit event.


Since 1.3, 2.6.1 (projectile hit event) Return Type

Entity

Applicable Events

On Damage

On Death

On Projectile Hit

Syntax Patterns
[the] (attacked|damaged|victim) [<(.+)>]
Usage Examples
on damage:
victim is a creeper
damage the attacked by 1 heart

The attacker of a damage event, e.g. when a player attacks a zombie this expression represents the player.

Please note that the attacker can also be a block, e.g. a cactus or lava, but this expression will not be set in these cases.


Since 1.3 Return Type

Entity

Applicable Events

On Damage

On Death

On Vehicle Destroy

Syntax Patterns
[the] (attacker|damager)
Usage Examples
on damage:
attacker is a player
health of attacker is less than or equal to 2
damage victim by 1 heart

Represents the type of an attribute. Note that this type does not contain any numerical values.See attribute types for more info.

NOTE: Minecraft namespaces are supported, ex: 'minecraft:generic.attack_damage'.


Since 2.5
Syntax Patterns
armor, armor toughness, armour, armour toughness, attack damage, attack knockback, attack speed, block break speed, block interaction range, burning time, camera distance, entity interaction range, explosion knockback resistance, fall damage multiplier, flying speed, follow range, generic armor, generic armor toughness, generic armour, generic armour toughness, generic attack damage, generic attack knockback, generic attack speed, generic burning time, generic explosion knockback resistance, generic fall damage multiplier, generic flying speed, generic follow range, generic gravity, generic jump strength, generic knockback resistance, generic luck, generic max absorption, generic max health, generic movement efficiency, generic movement speed, generic oxygen bonus, generic safe fall distance, generic scale, generic step height, generic tempt range, generic water movement efficiency, gravity, horse jump strength, jump strength, knockback resistance, luck, max absorption, max health, mining efficiency, movement efficiency, movement speed, oxygen bonus, player block break speed, player block interaction range, player entity interaction range, player mining efficiency, player sneaking speed, player submerged mining speed, player sweeping damage ratio, safe fall distance, scale, sneaking speed, spawn reinforcements, step height, submerged mining speed, sweeping damage ratio, tempt range, water movement efficiency, waypoint receive range, waypoint transmit range, zombie spawn reinforcements

Place at the top of a script file to enable and configure automatic reloading of the script. When the script is saved, Skript will automatically reload the script. The config.sk node 'script loader thread size' must be set to a positive number (async or parallel loading) for this to be enabled. available optional nodes: recipients: The players to send reload messages to. Defaults to console. permission: The permission required to receive reload messages. 'recipients' will override this node.


Since 2.13
Syntax Patterns
auto[matically] reload [(this|the) script]
Usage Examples
auto reload
auto reload:
recipients: "SkriptDev", "61699b2e-d327-4a01-9f1e-0ea8c3f06bc6" and "Njol"
permission: "skript.reloadnotify"

Returns a quaternion from the given angle (in degrees) and axis (as a vector). This represents a rotation around the given axis by the given angle.


Since 2.10 Return Type

Quaternion

Syntax Patterns
axisAngle(angle: number, axis: vector)
Usage Examples
axisangle(90, (vector from player's facing))

Bans or unbans a player or an IP address.

If a reason is given, it will be shown to the player when they try to join the server while banned.

A length of ban may also be given to apply a temporary ban. If it is absent for any reason, a permanent ban will be used instead.

We recommend that you test your scripts so that no accidental permanent bans are applied.

Note that banning people does not kick them from the server.

You can optionally use 'and kick' or consider using the kick effect after applying a ban.


Since 1.4, 2.1.1 (ban reason), 2.5 (timespan), 2.9.0 (kick)
Syntax Patterns
ban [and kick] %texts/offline players% [(by reason of|because [of]|on account of|due to) %text%] [for %time span%]
unban %texts/offline players%
ban [and kick] %players% by IP [(by reason of|because [of]|on account of|due to) %text%] [for %time span%]
unban %players% by IP
IP(-| )ban [and kick] %players% [(by reason of|because [of]|on account of|due to) %text%] [for %time span%]
(IP(-| )unban|un[-]IP[-]ban) %players%
Usage Examples
unban player
ban "127.0.0.1"
IP-ban the player because "he is an idiot"
ban player due to "inappropriate language" for 2 days
ban and kick player due to "inappropriate language" for 2 days

Represents a banner pattern.


Since 2.10

Creates a new banner pattern.


Since 2.10 Return Type

Banner Pattern

Syntax Patterns
[a] %banner pattern type% colo[u]red %color%
Usage Examples
set {_pattern} to a creeper banner pattern colored red
add {_pattern} to banner patterns of {_banneritem}
remove {_pattern} from banner patterns of {_banneritem}
set the 1st banner pattern of block at location(0,0,0) to {_pattern}
clear the 1st banner pattern of block at location(0,0,0)

Gets the item from a banner pattern type.

Note that not all banner pattern types have an item.


Since 2.10 Return Type

Item Type

Syntax Patterns
[a[n]] %*banner pattern types% item[s]
Usage Examples
set {_item} to creeper charged banner pattern item
set {_item} to snout banner pattern item
set {_item} to thing banner pattern item

Represents the various banner patterns that can be applied to a banner.


Since 2.10
Syntax Patterns
base, base banner pattern, border, border banner pattern, bordure banner pattern, bordure indented banner pattern, bottom left square banner pattern, bottom right square banner pattern, bottom stripe banner pattern, bottom triangle banner pattern, bricks, bricks banner pattern, center stripe banner pattern, circle, circle banner pattern, creeper, creeper banner pattern, creeper charged banner pattern, cross, cross banner pattern, curly border, curly border banner pattern, diagonal left, diagonal right, diagonal up left, diagonal up left banner pattern, diagonal up right, diagonal up right banner pattern, down left stripe banner pattern, down right stripe banner pattern, field masoned banner pattern, flow, flow banner pattern, flower, flower banner pattern, globe, globe banner pattern, gradient, gradient banner pattern, gradient up, gradient up banner pattern, guster, guster banner pattern, half horizontal, half horizontal bottom, half vertical, half vertical right, horizontal bottom half banner pattern, horizontal half banner pattern, left diagonal banner pattern, left stripe banner pattern, middle stripe banner pattern, mojang, mojang banner pattern, piglin, piglin banner pattern, rhombus, rhombus banner pattern, right diagonal banner pattern, right stripe banner pattern, right vertical half banner pattern, skull, skull banner pattern, small stripes, small stripes banner pattern, snout banner pattern, square bottom left, square bottom right, square top left, square top right, straight cross, straight cross banner pattern, stripe bottom, stripe center, stripe downleft, stripe downright, stripe left, stripe middle, stripe right, stripe top, tbottom triangles banner pattern, thing banner pattern, top left square banner pattern, top right square banner pattern, top stripe banner pattern, top triangle banner pattern, top triangles banner pattern, triangle bottom, triangle top, triangles bottom, triangles top, vertical half banner pattern

Gets or sets the banner patterns of a banner.

In order to set a specific position of a banner, there needs to be that many patterns already on the banner.

This expression will add filler patterns to the banner to allow the specified position to be set.

For Example, setting the 3rd banner pattern of a banner that has no patterns on it, will internally add 3 base patterns, allowing the 3rd banner pattern to be set.


Since 2.10 Return Type

Banner Pattern

Syntax Patterns
[all [[of] the]|the] banner pattern[s] of %item stacks/item types/slots/blocks%
%item stacks/item types/slots/blocks%'[s] banner pattern[s]
[the] %integer%[st|nd|rd|th] [banner] pattern of %item stacks/item types/slots/blocks%
%item stacks/item types/slots/blocks%'[s] %integer%[st|nd|rd|th] [banner] pattern
Usage Examples
broadcast banner patterns of {_banneritem}
broadcast 1st banner pattern of block at location(0,0,0)
clear banner patterns of {_banneritem}

The items dropped by the piglin in a piglin bartering event.


Since 2.10 Return Type

Item Type

Syntax Patterns
[the] [piglin] barter[ing] drops
Usage Examples
on piglin barter:
if the bartering drops contain a jack o lantern:
remove jack o lantern from bartering output
broadcast "it's not halloween yet!"

The item picked up by the piglin in a piglin bartering event.


Since 2.10 Return Type

Item Type

Syntax Patterns
[the] [piglin] barter[ing] input
Usage Examples
on piglin barter:
if the bartering input is a gold ingot:
broadcast "my precious..."

The active effects of a beacon.

The secondary effect can be set to anything, but the icon in the GUI will not display correctly.

The secondary effect can only be set when the beacon is at max tier.

The primary and secondary effect can not be the same, primary will always retain the potion type and secondary will be cleared.


Since 2.10 Return Type

Potion Effect Type

Applicable Events

On Beacon Effect

On Beacon Toggle

On Beacon Change Effect

Syntax Patterns
[the] (primary|secondary) [beacon] effect [of %blocks%]
%blocks%'[s] (primary|secondary) [beacon] effect
Usage Examples
set primary beacon effect of {_block} to haste
set secondary effect of {_block} to resistance

The range of a beacon's effects, in blocks.


Since 2.10 Return Type

Number

Syntax Patterns
[the] beacon [effect] range of %blocks%
%blocks%'[s] beacon [effect] range
Usage Examples
if the beacon tier of the clicked block is 4:
set the beacon effect range of the clicked block to 100

The tier of a beacon. Ranges from 0 to 4.


Since 2.10 Return Type

Number

Syntax Patterns
[the] beacon tier of %blocks%
%blocks%'[s] beacon tier
Usage Examples
if the beacon tier of the clicked block is 4:
send "This is a max tier beacon!"

Returns the bed location of a player, i.e. the spawn point of a player if they ever slept in a bed and the bed still exists and is unobstructed however, you can set the unsafe bed location of players and they will respawn there even if it has been obstructed or doesn't exist anymore and that's the default behavior of this expression otherwise you will need to be specific i.e. safe bed location.

NOTE: Offline players can not have their bed location changed, only online players.


Since 2.0, 2.7 (offlineplayers, safe bed) Return Type

Location

Syntax Patterns
[the] [((safe|valid)|(unsafe|invalid))] bed[s] [location[s]] of %offline players%
%offline players%'[s] [((safe|valid)|(unsafe|invalid))] bed[s] [location[s]]
Usage Examples
if bed of player exists:
teleport player the the player's bed
else:
teleport the player to the world's spawn point
set the bed location of player to spawn location of world("world") # unsafe/invalid bed location
set the safe bed location of player to spawn location of world("world") # safe/valid bed location

The current or max honey level of a beehive.

The max level is 5, which cannot be changed.


Since 2.11 Return Type

Number

Syntax Patterns
[the] [max[imum]] honey level [of %blocks%]
%blocks%'[s] [max[imum]] honey level
Usage Examples
set the honey level of {_beehive} to the max honey level of {_beehive}

Checks if a beehive is sedated from a nearby campfire.


Since 2.11
Syntax Patterns
%blocks% (is|are) sedated
%blocks% (isn't|is not|aren't|are not) sedated
Usage Examples
if {_beehive} is sedated:

The flower a beehive has selected to pollinate from.


Since 2.11 Return Type

Location

Syntax Patterns
[the] target flower [of %blocks%]
%blocks%'[s] target flower
Usage Examples
set the target flower of {_beehive} to location(0, 0, 0)
clear the target flower of {_beehive}

Checks to see if a bell is currently resonating.

A bell will start resonating five game ticks after being rung, and will continue to resonate for 40 game ticks.


Since 2.9.0
Syntax Patterns
%blocks% (is|are) resonating
%blocks% (isn't|is not|aren't|are not) resonating
Usage Examples
target block is resonating

Checks to see if a bell is currently ringing. A bell typically rings for 50 game ticks.


Since 2.9.0
Syntax Patterns
%blocks% (is|are) ringing
%blocks% (isn't|is not|aren't|are not) ringing
Usage Examples
target block is ringing

All possible biomes Minecraft uses to generate a world.

NOTE: Minecraft namespaces are supported, ex: 'minecraft:basalt_deltas'.


Since 1.4.4
Syntax Patterns
badlands, badlands forest, bamboo jungle, basalt deltas, beach, birch forest, black forest, cherry grove, cold beach, cold ocean, cold taiga, crimson forest, dark forest, deep cold ocean, deep dark, deep frozen ocean, deep lukewarm ocean, deep ocean, desert, dripstone caves, end barrens, end highlands, end midlands, eroded badlands, eroded mesa, flower forest, forest, frozen ocean, frozen peaks, frozen river, giant spruce taiga, giant tree taiga, gravelly mountains, grove, hell, ice plains spikes, ice plains with spikes, ice spikes, jagged peaks, jungle, jungle edge, lukewarm ocean, lush caves, mangrove swamp, marsh, meadow, mesa, mesa forest, mountains, mushroom fields, mushroom island, nether, nether wastes, ocean, old growth birch forest, old growth pine taiga, old growth spruce taiga, pale garden, plains, river, roofed forest, savanna, savanna plateau, sea, shattered savanna, sky, small end islands, snowy beach, snowy plains, snowy slopes, snowy taiga, snowy tundra, soul sand valley, sparse jungle, spiked ice plains, stone shore, stony peaks, stony shore, sunflower plains, swamp, swampland, taiga, tall birch forest, the end, the void, void, warm ocean, warped forest, windswept forest, windswept gravelly hills, windswept hills, windswept savanna, wooded badlands, wooded mesa, wooded mountains
Usage Examples
biome at the player is desert

The biome at a certain location. Please note that biomes are only defined for x/z-columns

(i.e. the altitude (y-coordinate) doesn't matter), up until Minecraft 1.15.x.

As of Minecraft 1.16, biomes are now 3D (per block vs column).


Since 1.4.4, 2.6.1 (3D biomes) Return Type

Biome

Syntax Patterns
[the] biome [(of|%direction%) %locations%]
%locations%'[s] biome
Usage Examples
# damage player in deserts constantly
every real minute:
loop all players:
biome at loop-player is desert
damage the loop-player by 1
Minecraft 1.21.2+

Gets a blank equippable component. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.


Since 2.13 Return Type

Equippable Components

Syntax Patterns
a (blank|empty) equippable component
Usage Examples
set {_component} to a blank equippable component:
set the camera overlay to "custom_overlay"
set the allowed entities to a zombie and a skeleton
set the equip sound to "block.note_block.pling"
set the equipped model id to "custom_model"
set the shear sound to "ui.toast.in"
set the equipment slot to chest slot
allow event-equippable component to be damage when hurt
allow event-equippable component to be dispensed
allow event-equippable component to be equipped onto entities
allow event-equippable component to be sheared off
allow event-equippable component to swap equipment
set the equippable component of {_item} to {_component}

A block in a world. It has a location and a type, and can also have a direction (mostly a facing), an inventory, or other special properties.


Since 1.0
Usage Examples

The block involved in the event, e.g. the clicked block or the placed block.

Can optionally include a direction as well, e.g. 'block above' or 'block in front of the player'.


Since 1.0 Return Type

Block

Syntax Patterns
[the] [event-]block
Usage Examples
block is iron ore
set block below to air
spawn a creeper above the block
loop blocks in radius 4:
loop-block is obsidian
set loop-block to water
block is a chest:
clear the inventory of the block

The block involved in the event, e.g. the clicked block or the placed block.

Can optionally include a direction as well, e.g. 'block above' or 'block in front of the player'.


Since 1.0 Return Type

Block

Syntax Patterns
[the] block %direction% [%location%]
Usage Examples
block is iron ore
set block below to air
spawn a creeper above the block
loop blocks in radius 4:
loop-block is obsidian
set loop-block to water
block is a chest:
clear the inventory of the block
1.17+

Gets the speed at which the given player would break this block, taking into account tools, potion effects, whether or not the player is in water, enchantments, etc. The returned value is the amount of progress made in breaking the block each tick. When the total breaking progress reaches 1.0, the block is broken. Note that the break speed can change in the course of breaking a block, e.g. if a potion effect is applied or expires, or the player jumps/enters water.


Since 2.7 Return Type

Number

Syntax Patterns
[the] break speed[s] [of %blocks%] [for %players%]
%block%'[s] break speed[s] [for %players%]
Usage Examples
on left click using diamond pickaxe:
event-block is set
send "Break Speed: %break speed for player%" to player

Block data is the detailed information about a block, referred to in Minecraft as BlockStates, allowing for the manipulation of different aspects of the block, including shape, waterlogging, direction the block is facing, and so much more. Information regarding each block's optional data can be found on Minecraft's Wiki. Find the block you're looking for and scroll down to 'Block States'. Different states must be separated by a semicolon (see examples). The 'minecraft:' namespace is optional, as well as are underscores.


Since 2.5
Usage Examples
set block at player to campfire[lit=false]
set target block of player to oak stairs[facing=north;waterlogged=true]
set block at player to grass_block[snowy=true]
set loop-block to minecraft:chest[facing=north]
set block above player to oak_log[axis=y]
set target block of player to minecraft:oak_leaves[distance=2;persistent=false]

Get the block data associated with a block.

This data can also be used to set blocks.


Since 2.5, 2.5.2 (set), 2.10 (block displays) Return Type

Block Data

Syntax Patterns
[the] block[ ]data of %blocks/displays/entities%
%blocks/displays/entities%'[s] block[ ]data
Usage Examples
set {_data} to block data of target block
set block at player to {_data}
set block data of target block to oak_stairs[facing=south;waterlogged=true]
Minecraft 1.13+

Obtains the block's hardness level (also known as "strength"). This number is used to calculate the time required to break each block.


Since 2.6 Return Type

Number

Syntax Patterns
[the] [block] hardness of %item types%
%item types%'[s] [block] hardness
Usage Examples
set {_hard} to block hardness of target block
if block hardness of target block > 5:

Gets the sound that a given block, blockdata, or itemtype will use in a specific scenario.

This will return a string in the form of "SOUND_EXAMPLE", which can be used in the play sound syntax.

Check out this website for a list of sounds in Minecraft, or this one to go to the Sounds wiki page.


Since 2.10 Return Type

Text

Syntax Patterns
[the] (break|fall|hit|place|step) sound[s] of %blocks/block datas/item types%
%blocks/block datas/item types%'[s] (break|fall|hit|place|step) sound[s]
Usage Examples
play sound (break sound of dirt) at all players
set {_sounds::*} to place sounds of dirt, grass block, blue wool and stone

All blocks in a sphere around a center, mostly useful for looping.


Since 1.0 Return Type

Block

Syntax Patterns
[(all [[of] the]|the)] blocks in radius %number% [(of|around) %location%]
[(all [[of] the]|the)] blocks around %location% in radius %number%
Usage Examples
loop blocks in radius 5 around the player:
set loop-block to air

Blocks relative to other blocks or between other blocks.

Can be used to get blocks relative to other blocks or for looping.

Blocks from/to and between will return a straight line whereas blocks within will return a cuboid.


Since 1.0, 2.5.1 (within/cuboid/chunk) Return Type

Block

Syntax Patterns
[(all [[of] the]|the)] blocks %direction% [%locations%]
[(all [[of] the]|the)] blocks from %location% [on] %direction%
[(all [[of] the]|the)] blocks from %location% to %location%
[(all [[of] the]|the)] blocks between %location% and %location%
[(all [[of] the]|the)] blocks within %location% and %location%
[(all [[of] the]|the)] blocks (in|within) %chunk%
Usage Examples
loop blocks above the player:
loop blocks between the block below the player and the targeted block:
set the blocks below the player, the victim and the targeted block to air
set all blocks within {loc1} and {loc2} to stone
set all blocks within chunk at player to air

The author of a book.


Since 2.2-dev31 Return Type

Text

Syntax Patterns
[the] [book] (author|writer|publisher) of %item types%
%item types%'[s] [book] (author|writer|publisher)
Usage Examples
on book sign:
message "Book Title: %author of event-item%"

The pages of a book (Supports Skript's chat format)

Note: In order to modify the pages of a new written book, you must have the title and author

of the book set. Skript will do this for you, but if you want your own, please set those values.


Since 2.2-dev31, 2.7 (changers) Return Type

Text

Syntax Patterns
[all [[of] the]|the] [book] (pages|content) of %item types/item stacks%
%item types/item stacks%'[s] [book] (pages|content)
[book] page %number% of %item types/item stacks%
%item types/item stacks%'[s] [book] page %number%
Usage Examples
on book sign:
message "Book Pages: %pages of event-item%"
message "Book Page 1: %page 1 of event-item%"
set page 1 of player's held item to "Book writing"

The title of a book.


Since 2.2-dev31 Return Type

Text

Syntax Patterns
[the] book (name|title) of %item types%
%item types%'[s] book (name|title)
Usage Examples
on book sign:
message "Book Title: %title of event-item%"

A boolean is a value that is either true or false. Other accepted names are 'on' and 'yes' for true, and 'off' and 'no' for false.


Since 1.0
Syntax Patterns
true/yes/on or false/no/off
Usage Examples
set {config.%player%.use mod} to false

Breaks the block and spawns items as if a player had mined it

You can add a tool, which will spawn items based on how that tool would break the block

(ie: When using a hand to break stone, it drops nothing, whereas with a pickaxe it drops cobblestone)


Since 2.4
Syntax Patterns
break %blocks% [naturally] [using %item type%]
Usage Examples
on right click:
break clicked block naturally
loop blocks in radius 10 around player:
break loop-block using player's tool
loop blocks in radius 10 around player:
break loop-block naturally using diamond pickaxe

Represents family members within a breeding event.


Since 2.10 Return Type

Living Entity

Syntax Patterns
[the] breeding mother
[the] breeding father
[the] [bred] (offspring|child)
[the] breeder
Usage Examples
on breeding:
send "When a %breeding mother% and %breeding father% love each other very much, they make a %bred offspring%" to breeder

The resulting items in an 'on brew complete' event.


Since 2.13 Return Type

Item

Applicable Events

On Brewing Complete

Syntax Patterns
[the] brewing results
Usage Examples
on brew complete:
set {_results::*} to the brewing results

The fuel level of a brewing stand. The fuel level is decreased by one at the start of brewing each potion.


Since 2.13 Return Type

Number

Syntax Patterns
[the] brewing [stand] fuel (level|amount) [of %blocks%]
%blocks%'[s] brewing [stand] fuel (level|amount)
Usage Examples
set the brewing stand fuel level of {_block} to 10
clear the brewing stand fuel level of {_block}

A slot of a brewing stand, i.e. the first, second, or third bottle slot, the fuel slot or the ingredient slot.


Since 2.13 Return Type

Slot

Syntax Patterns
[the] [brewing stand['s]] (first|1st) bottle slot[s] [of %blocks%]
%blocks%'[s] [brewing stand['s]] (first|1st) bottle slot[s]
[the] [brewing stand['s]] (second|2nd) bottle slot[s] [of %blocks%]
%blocks%'[s] [brewing stand['s]] (second|2nd) bottle slot[s]
[the] [brewing stand['s]] (third|3rd) bottle slot[s] [of %blocks%]
%blocks%'[s] [brewing stand['s]] (third|3rd) bottle slot[s]
[the] brewing [stand] ingredient slot[s] [of %blocks%]
%blocks%'[s] brewing [stand] ingredient slot[s]
[the] brewing [stand] fuel slot[s] [of %blocks%]
%blocks%'[s] brewing [stand] fuel slot[s]
Usage Examples
set the 1st bottle slot of {_block} to potion of water
clear the brewing stand second bottle slot of {_block}

The remaining brewing time of a brewing stand.


Since 2.13 Return Type

Timespan

Syntax Patterns
[the] [current|remaining] brewing time [of %blocks%]
%blocks%'[s] [current|remaining] brewing time
Usage Examples
set the brewing time of {_block} to 10 seconds
clear the remaining brewing time of {_block}

Checks if the 'brewing fuel' event will consume fuel. Preventing the fuel from being consumed will keep the fuel item and still add to the fuel level of the brewing stand.


Since 2.13 Applicable Events

On Brewing Fuel

Syntax Patterns
[the] brewing stand will consume [the] fuel
[the] brewing stand (will not|won't) consume [the] fuel
Usage Examples
on brewing fuel:
if the brewing stand will consume the fuel:
prevent the brewing stand from consuming the fuel

Broadcasts a message to the server.


Since 1.0, 2.6 (broadcasting objects), 2.6.1 (using advanced formatting)
Syntax Patterns
broadcast %objects% [(to|in) %worlds%]
Usage Examples
broadcast "Welcome %player% to the server!"
broadcast "Woah! It's a message!"
Minecraft 1.20+

Represents the item that is uncovered when dusting.

The only blocks that can currently be "dusted" are Suspicious Gravel and Suspicious Sand.


Since 2.12 Return Type

Item

Syntax Patterns
[the] (brushable|buried) item of %blocks%
%blocks%'[s] (brushable|buried) item
Usage Examples
send target block's brushable item
set {_gravel}'s brushable item to emerald

Calculates the total amount of experience needed to achieve given level from scratch in Minecraft.


Since 2.2-dev32 Return Type

Syntax Patterns
calcExperience(level: long)

Checks whether a camel is currently using its dash ability.


Since 2.11
Syntax Patterns
%living entities% (is|are) dashing
%living entities% (isn't|is not|aren't|are not) dashing
Usage Examples
if last spawned camel is dashing:
kill last spawned camel

Checks whether or not an entity will be able to age/grow up.


Since 2.10
Syntax Patterns
%living entities% can (age|grow (up|old[er]))
%living entities% (can't|cannot|can not) (age|grow (up|old[er]))
Usage Examples
on breeding:
entity can't age
broadcast "An immortal has been born!" to player

Checks whether or not a living entity can be bred.


Since 2.10
Syntax Patterns
%living entities% can (breed|be bred)
%living entities% (can't|cannot|can not) (breed|be bred)
Usage Examples
on right click on living entity:
event-entity can't breed
send "Turns out %event-entity% is not breedable. Must be a Skript user!" to player

Check if an entity can despawn when the chunk they're located at is unloaded.

More information on what and when entities despawn can be found at reference.


Since 2.11
Syntax Patterns
%living entities% can despawn (on chunk unload|when far away)
%living entities% (can't|cannot|can not) despawn (on chunk unload|when far away)
Usage Examples
if last spawned entity can despawn on chunk unload:
make last spawned entity not despawn on chunk unload

Whether a player is allowed to fly.


Since 2.3
Syntax Patterns
%players% can fly
%players% (can't|cannot|can not) fly
Usage Examples
player can fly

Tests whether a player or a chest can hold the given item.


Since 1.0
Syntax Patterns
%inventories% (can hold|ha(s|ve) [enough] space (for|to hold)) %item types%
%inventories% (can(no|')t hold|(ha(s|ve) not|ha(s|ve)n't|do[es]n't have) [enough] space (for|to hold)) %item types%
Usage Examples
block can hold 200 cobblestone
player has enough space for 64 feathers

Whether living entities are able to pick up items off the ground or not.


Since 2.8.0
Syntax Patterns
%living entities% can pick([ ]up items| items up)
%living entities% (can't|cannot|can not) pick([ ]up items| items up)
Usage Examples
if player can pick items up:
send "You can pick up items!" to player
on drop:
if player can't pick up items:
send "Be careful, you won't be able to pick that up!" to player
Minecraft 1.19+ (entities)

Checks whether the given players can see the provided entities.


Since 2.3, 2.10 (entities)
Syntax Patterns
%entities% (is|are) [visible|invisible] for %players%
%players% can see %entities%
%entities% (is|are)(n't| not) [visible|invisible] for %players%
%players% can('t| not) see %entities%
Usage Examples
if sender can't see the player-argument:
message "who dat?"
if the player can see the last spawned entity:
message "hello there!"

Checks whether a player can see chat colors.


Since 2.10
Syntax Patterns
%players% can see chat colo[u]r[s|ing]
%players% (can't|cannot|can not) see chat colo[u]r[s|ing]
Usage Examples
if player can see chat colors:
send "Find the red word in <red>this<reset> message."
else:
send "You cannot partake in finding the colored word."

Checks whether a player can see specific message types in chat.


Since 2.10
Syntax Patterns
%player% can see all messages [in chat]
%player% can only see (commands|system messages) [in chat]
%player% can('t|[ ]not) see any (command[s]|message[s]) [in chat]
%player% can('t|[ ]not) see all messages [in chat]
%player% can('t|[ ]not) only see (commands|system messages) [in chat]
Usage Examples
if player can see all messages:
send "You can see all messages."
if player can only see commands:
send "This game doesn't work with commands-only chat."
if player can't see any messages:
send action bar "Server shutting down in 5 minutes!"

Interrupts the action entities may be trying to complete.

For example, interrupting eating, or drawing back a bow.


Since 2.8.0
Syntax Patterns
(cancel|interrupt) [the] us[ag]e of %living entities%'[s] [active|current] item
Usage Examples
on damage of player:
if the victim's active tool is a bow:
interrupt the usage of the player's active item

Only usable in commands. Makes it so the current command usage isn't counted towards the cooldown.


Since 2.2-dev34
Syntax Patterns
(cancel|ignore) [the] [current] [command] cooldown
un(cancel|ignore) [the] [current] [command] cooldown
Usage Examples
command /nick <text>:
executable by: players
cooldown: 10 seconds
trigger:
if length of arg-1 is more than 16:
# Makes it so that invalid arguments don't make you wait for the cooldown again
cancel the cooldown
send "Your nickname may be at most 16 characters."
stop
set the player's display name to arg-1
1.12.2 or newer (cancelling item drops of blocks)

Cancels drops of items in a death, block break, block drop, and block harvest events.

The dropped experience can be cancelled in a death and block break events.

Please note that using this in a death event doesn't keep items or experience of a dead player. If you want to do that, use the Keep Inventory / Experience effect.


Since 2.4, 2.12 (harvest event) Applicable Events

On Death

On Break / Mine

On Block Drop

On Harvest Block

Syntax Patterns
(cancel|clear|delete) [the] drops [of (items|[e]xp[erience][s])]
(cancel|clear|delete) [the] (item|[e]xp[erience]) drops
Usage Examples
on death of a zombie:
if name of the entity is "&cSpecial":
cancel drops of items
on break of a coal ore:
cancel the experience drops
on player block harvest:
cancel the item drops

Cancels the event (e.g. prevent blocks from being placed, or damage being taken).


Since 1.0
Syntax Patterns
cancel [the] event
uncancel [the] event
Usage Examples
on damage:
victim is a player
victim has the permission "skript.god"
cancel the event

Copy of given text in Lowercase, Uppercase, Proper Case, camelCase, PascalCase, Snake_Case, and Kebab-Case


Since 2.2-dev16 (lowercase and uppercase), 2.5 (advanced cases) Return Type

Text

Syntax Patterns
%texts% in (upper|lower)[ ]case
(upper|lower)[ ]case %texts%
capitali(s|z)ed %texts%
%texts% in [(lenient|strict) ](proper|title)[ ]case
[(lenient|strict) ](proper|title)[ ]case %texts%
%texts% in [(lenient|strict) ]camel[ ]case
[(lenient|strict) ]camel[ ]case %texts%
%texts% in [(lenient|strict) ]pascal[ ]case
[(lenient|strict) ]pascal[ ]case %texts%
%texts% in [(lower|upper|capital|screaming)[ ]]snake[ ]case
[(lower|upper|capital|screaming)[ ]]snake[ ]case %texts%
%texts% in [(lower|upper|capital)[ ]]kebab[ ]case
[(lower|upper|capital)[ ]]kebab[ ]case %texts%
Usage Examples
"Oops!" in lowercase # oops!
"oops!" in uppercase # OOPS!
"hellO i'm steve!" in proper case # HellO I'm Steve!
"hellO i'm steve!" in strict proper case # Hello I'm Steve!
"spAwn neW boSs ()" in camel case # spAwnNeWBoSs()
"spAwn neW boSs ()" in strict camel case # spawnNewBoss()
"geneRate ranDom numBer ()" in pascal case # GeneRateRanDomNumBer()
"geneRate ranDom numBer ()" in strict pascal case # GenerateRandomNumber()
"Hello Player!" in snake case # Hello_Player!
"Hello Player!" in lower snake case # hello_player!
"Hello Player!" in upper snake case # HELLO_PLAYER!
"What is your name?" in kebab case # What-is-your-name?
"What is your name?" in lower kebab case # what-is-your-name?
"What is your name?" in upper kebab case # WHAT-IS-YOUR-NAME?
Minecraft 1.14 or newer

Represents the race/type of a cat entity.

NOTE: Minecraft namespaces are supported, ex: 'minecraft:british_shorthair'.


Since 2.4
Syntax Patterns
all black, black, british shorthair, calico, jellie, persian, ragdoll, red, siamese, tabby, white

Catch any runtime errors produced by code within the section. This is an in progress feature.


Since 2.12
Syntax Patterns
catch [run[ ]time] error[s]
Usage Examples
catch runtime errors:
set worldborder center of {_border} to location(0, 0, NaN value)
if last caught runtime errors contains "Your location can't have a NaN value as one of its components":
set worldborder center of {_border} to location(0, 0, 0)

Rounds a number up, i.e. returns the closest integer larger than or equal to the argument.


Since 2.2 Return Type

Syntax Patterns
ceil(n: number)
Usage Examples
ceil(2.34) = 3
ceil(2) = 2
ceil(2.99) = 3

Alias of ceil.


Since 2.2 Return Type

Syntax Patterns
ceiling(n: number)
Usage Examples
ceiling(2.34) = 3
ceiling(2) = 2
ceiling(2.99) = 3

The center of a world border.


Since 2.11 Return Type

Location

Syntax Patterns
[the] world[ ]border (center|middle) [of %worldborders%]
%worldborders%'[s] world[ ]border (center|middle)
Usage Examples
set world border center of {_worldborder} to location(10, 0, 20)
New

A condition that randomly succeeds or fails. Valid values are between 0% and 100%, or if the percent sign is omitted, between 0 and 1.


Since 1.0, 2.14 (chance fails)
Syntax Patterns
chance of %number%[(\%)] [(fails|failed)]
Usage Examples
chance of 50%:
drop a diamond at location(100, 100, 100, "world')
chance of {chance}% # {chance} between 0 and 100
chance of {chance} # {chance} between 0 and 1
if chance of 99% fails:
broadcast "Haha loser! *points and laughs*"

Effect Change: Set/Add/Remove/Remove All/Delete/Reset

Section titled “ Effect Change: Set/Add/Remove/Remove All/Delete/Reset”

A general effect that can be used for changing many expressions.

Some expressions can only be set and/or deleted, while others can also have things added to or removed from them.


Since 1.0 (set, add, remove, delete), 2.0 (remove all)
Syntax Patterns
(add|give) %objects% to %~objects%
increase %~objects% by %objects%
give %~objects% %objects%
set %~objects% to %objects%
remove (all|every) %objects% from %~objects%
(remove|subtract) %objects% from %~objects%
(reduce|decrease) %~objects% by %objects%
(delete|clear) %~objects%
reset %~objects%
Usage Examples
set the player's display name to "<red>%name of player%"
set the block above the victim to lava
add 2 to the player's health # preferably use '<a href='#EffHealth'>heal</a>' for this
add argument to {blacklist::*}
give a diamond pickaxe of efficiency 5 to the player
increase the data value of the clicked block by 1
remove 2 pickaxes from the victim
subtract 2.5 from {points::%uuid of player%}
remove every iron tool from the player
remove all minecarts from {entitylist::*}
delete the block below the player
clear drops
delete {variable}
reset walk speed of player
reset chunk at the targeted block

Returns the Unicode codepoint of a character


Since 2.9.0 Return Type

Number

Syntax Patterns
[the] [unicode|character] code([ ]point| position) of %texts%
%texts%'[s] [unicode|character] code([ ]point| position)
Usage Examples
function is_in_order(letters: strings) :: boolean:
loop {_letters::*}:
set {_codepoint} to codepoint of lowercase loop-value
return false if {_codepoint} is not set # 'loop-value is not a single character'
if:
{_previous-codepoint} is set
# if the codepoint of the current character is not
# 1 more than the codepoint of the previous character
# then the letters are not in order
{_codepoint} - {_previous-codepoint} is not 1
then:
return false
set {_previous-codepoint} to {_codepoint}
return true

Returns the character at the specified codepoint


Since 2.9.0 Return Type

Text

Syntax Patterns
character (from|at|with) code([ ]point| position) %integer%
Usage Examples
function chars_between(lower: string, upper: string) :: strings:
set {_lower} to codepoint of {_lower}
return {_none} if {_lower} is not set
set {_upper} to codepoint of {_upper}
return {_none} if {_upper} is not set
loop integers between {_lower} and {_upper}:
add character from codepoint loop-value to {_chars::*}
return {_chars::*}

All characters between two given characters, useful for generating random strings. This expression uses the Unicode numerical code of a character to determine which characters are between the two given characters. The ASCII table linked here shows this ordering for the first 256 characters.

If you would like only alphanumeric characters you can use the 'alphanumeric' option in the expression.

If strings of more than one character are given, only the first character of each is used.


Since 2.8.0 Return Type

Text

Syntax Patterns
[(all [[of] the]|the)] [alphanumeric] characters (between|from) %text% (and|to) %text%
Usage Examples
loop characters from "a" to "f":
broadcast "%loop-value%"
# 0123456789:;<=>?@ABC... ...uvwxyz
send characters between "0" and "z"
# 0123456789ABC... ...uvwxyz
send alphanumeric characters between "0" and "z"

Charges or uncharges a creeper or wither skull. A creeper is charged when it has been struck by lightning.


Since 2.5, 2.10 (wither skulls)
Syntax Patterns
make %entities% [(un|not |non[-| ])](charged|powered)
[un](charge|power) %entities%
Usage Examples
on spawn of creeper:
charge the event-entity

Can be used to get/retrieve the chat format. The sender of a message is represented by [player] or [sender], and the message by [message] or [msg].


Since 2.2-dev31 Return Type

Text

Syntax Patterns
[the] (message|chat) format[ting]
Usage Examples
set the chat format to "&lt;yellow&gt;[player]&lt;light gray&gt;: &lt;green&gt;[message]"

Recipients of chat events where this is called.


Since 2.2-Fixes-v7, 2.2-dev35 (clearing recipients) Return Type

Player

Syntax Patterns
[chat][( |-)]recipients
Usage Examples
chat recipients
Minecraft 1.21.5+

Represents the variant of a chicken entity.

NOTE: Minecraft namespaces are supported, ex: 'minecraft:warm'.


Since 2.12
Syntax Patterns
cold, temperate, warm

A chunk is a cuboid of 16×16×128 (x×z×y) blocks. Chunks are spread on a fixed rectangular grid in their world.


Since 2.0
Usage Examples

Returns the chunk of a block, location or entity is in, or a list of the loaded chunks of a world.


Since 2.0, 2.8.0 (loaded chunks) Return Type

Chunk

Syntax Patterns
[(all [[of] the]|the)] chunk[s] (of|%directions%) %locations%
%locations%'[s] chunk[s]
[(all [[of] the]|the)] loaded chunks (of|in) %worlds%
Usage Examples
add the chunk at the player to {protected chunks::*}
set {_chunks::*} to the loaded chunks of the player's world

Clamps one or more values between two numbers.

This function retains indices


Since 2.8.0 Return Type

Number

Syntax Patterns
clamp(values: numbers, min: number, max: number)
Usage Examples
clamp(5, 0, 10) = 5
clamp(5.5, 0, 5) = 5
clamp(0.25, 0, 0.5) = 0.25
clamp(5, 7, 10) = 7
clamp((5, 0, 10, 9, 13), 7, 10) = (7, 7, 10, 9, 10)
set {_clamped::*} to clamp({_values::*}, 0, 10)

Clear the stored entities of an entity block storage (i.e. beehive).


Since 2.11
Syntax Patterns
(clear|empty) the (stored entities|entity storage) of %blocks%
Usage Examples
clear the stored entities of {_beehive}

Click type, mostly for inventory events. Tells exactly which keys/buttons player pressed, assuming that default keybindings are used in client side.


Since 2.2-dev16b, 2.2-dev35 (renamed to click type)
Syntax Patterns
lmb, number key, mmb, rmb, drop item, drop key, window border using left mouse button, unknown, window border using right mouse, shift+rmb, unsupported, shift+lmb, ctrl+q, swap shield, left mouse button, left mouse with shift, left mouse, 0-9, double click, double click using mouse, border using rmb, right mouse button, right mouse button with shift, border using lmb, middle mouse, drop key with control, window border using right mouse button, swap offhand, custom, q, right mouse with shift, middle mouse button, drop stack, left mouse button with shift, right mouse, creative action
Usage Examples

Expression Clicked Block/Entity/Inventory/Slot

Section titled “ Expression Clicked Block/Entity/Inventory/Slot”

The clicked block, entity, inventory, inventory slot, inventory click type or inventory action.


Since 1.0, 2.2-dev35 (more clickable things) Return Type

Object

Applicable Events

On Click

On Inventory Click

Syntax Patterns
[the] (clicked [enchant[ment]] (button|option)|clicked (block|%*item type/entity type%)|clicked slot|clicked inventory|click (type|action)|inventory action)
Usage Examples
message "You clicked on a %type of clicked entity%!"
if the clicked block is a chest:
show the inventory of the clicked block to the player

Wool, dye and chat colors.


Syntax Patterns
black, dark grey/dark gray, grey/light grey/gray/light gray/silver, white, blue/dark blue, cyan/aqua/dark cyan/dark aqua, light blue/light cyan/light aqua, green/dark green, light green/lime/lime green, yellow/light yellow, orange/gold/dark yellow, red/dark red, pink/light red, purple/dark purple, magenta/light purple, brown/indigo
Usage Examples
color of the sheep is red or black
set the color of the block to green
message "You're holding a <%color of tool%>%color of tool%<reset> wool block"
New

Returns a proper argb color from a hex code string. The hex code must contain RRGGBB values, but can also contain a leading # or AARRGGBB format. Invalid codes will cause runtime errors.


Since 2.14 Return Type

Color

Syntax Patterns
[the] colo[u]r[s] (from|of) hex[adecimal] code[s] %texts%
Usage Examples
send color from hex code "#FFBBA7"
send color from hex code "FFBBA7"
send color from hex code "#AAFFBBA7"

Colors items in a given color. You can also use RGB codes if you feel limited with the 16 default colors. RGB codes are three numbers from 0 to 255 in the order (red, green, blue), where (0,0,0) is black and (255,255,255) is white. Armor is colorable for all Minecraft versions. With Minecraft 1.11 or newer you can also color potions and maps. Note that the colors might not look exactly how you'd expect.


Since 2.0, 2.2-dev26 (maps and potions)
Syntax Patterns
(dye|colo[u]r|paint) %item types% %color%
(dye|colo[u]r|paint) %item types% \(%number%, %number%, %number%\)
Usage Examples
dye player's helmet blue
color the player's tool red

The color of an item, entity, block, firework effect, or text display.

This can also be used to color chat messages with "<%color of ...%>this text is colored!".

Do note that firework effects support setting, adding, removing, resetting, and deleting; text displays support setting and resetting; and items, entities, and blocks only support setting, and only for very few items/blocks.


Since 1.2, 2.10 (displays) Return Type

Color

Syntax Patterns
[the] colo[u]r[s] of %blocks/item types/entities/firework effects/potion effect types/displays%
%blocks/item types/entities/firework effects/potion effect types/displays%'[s] colo[u]r[s]
Usage Examples
on click on wool:
if event-block is tagged with minecraft tag "wool":
message "This wool block is <%color of block%>%color of block%<reset>!"
set the color of the block to black

Parses <color>s and, optionally, chat styles in a message or removes

any colors and chat styles from the message. Parsing all

chat styles requires this expression to be used in same line with

the send effect.


Since 2.0 Return Type

Text

Syntax Patterns
(colo[u]r-|colo[u]red )%texts%
(format-|formatted )%texts%
(un|non)[-](colo[u]r-|colo[u]red |format-|formatted )%texts%
Usage Examples
on chat:
set message to colored message # Safe; only colors get parsed
command /fade <player>:
trigger:
set display name of the player-argument to uncolored display name of the player-argument
command /format <text>:
trigger:
message formatted text-argument # Safe, because we're sending to whoever used this command

Get the number of possible sets from 1 to 'options' with each set having a size equal to 'selected'

For example, a combination with 3 options and a set size of 1, returns 3: (1), (2), (3)

A combination of 3 options with a set size of 2 returns 3: (1, 2), (1, 3), (2, 3)

Note that the bigger the 'options' and lower the 'selected' may result in approximations or even infinity values.

Combinations differ from permutations in that combinations focus on unique sets, ignoring the order of elements, whereas permutations account for the arrangement of elements within the set.

Example: (1, 2) and (2, 1) represent a single combination since order doesn't matter in combinations, but they are two distinct permutations because permutations consider the order.


Since 2.11 Return Type

Number

Syntax Patterns
combinations(options: number, selected: number)
Usage Examples
combinations(10, 8) = 45
combinations(5, 3) = 10
combinations(size of {some list::*}, 2)

Used for registering custom commands.


Since 1.0
Syntax Patterns
command <.+>
Usage Examples
command /broadcast <string>:
usage: A command for broadcasting a message to all players.
permission: skript.command.broadcast
permission message: You don't have permission to broadcast messages
aliases: /bc
executable by: players and console
cooldown: 15 seconds
cooldown message: You last broadcast a message %elapsed time% ago. You can broadcast another message in %remaining time%.
cooldown bypass: skript.command.broadcast.admin
cooldown storage: {cooldown::%player%}
trigger:
broadcast the argument

Executes a command. This can be useful to use other plugins in triggers.

If the command is a bungeecord side command, you can use the [bungeecord] option to execute command on the proxy.


Since 1.0, 2.8.0 (bungeecord command)
Syntax Patterns
[execute] [the] [bungee[cord]] command[s] %texts% [by %command senders%]
[execute] [the] %command senders% [bungee[cord]] command[s] %texts%
(let|make) %command senders% execute [[the] [bungee[cord]] command[s]] %texts%
Usage Examples
make player execute command "/home"
execute console command "/say Hello everyone!"
execute player bungeecord command "/alert &6Testing Announcement!"

The command that caused an 'on command' event (excluding the leading slash and all arguments)


Since 2.0, 2.7 (support for script commands) Return Type

Text

Applicable Events

On Command

Syntax Patterns
[the] (full|complete|whole) command
[the] command [(label|alias)]
Usage Examples
# prevent any commands except for the /exit command during some game
on command:
if {game::%player%::playing} is true:
if the command is not "exit":
message "You're not allowed to use commands during the game"
cancel the event

Gets or sets the command associated with a command block or minecart with command block.


Since 2.10 Return Type

Text

Syntax Patterns
[the] [command[ ]block] command of %blocks/entities%
%blocks/entities%'[s] [command[ ]block] command
Usage Examples
send command of {_block}
set command of {_cmdMinecart} to "say asdf"

Get information about a command.


Since 2.6 Return Type

Text

Syntax Patterns
[the] main command [label|name] [of [[the] command[s] %texts%]]
command[s] %texts%'[s] main command [label|name]
[the] description [of [[the] command[s] %texts%]]
command[s] %texts%'[s] description
[the] label [of [[the] command[s] %texts%]]
command[s] %texts%'[s] label
[the] usage [of [[the] command[s] %texts%]]
command[s] %texts%'[s] usage
[(all|the|all [of] the)] aliases [of [[the] command[s] %texts%]]
command[s] %texts%'[s] aliases
[the] permission [of [[the] command[s] %texts%]]
command[s] %texts%'[s] permission
[the] permission message [of [[the] command[s] %texts%]]
command[s] %texts%'[s] permission message
[the] plugin [owner] [of [[the] command[s] %texts%]]
command[s] %texts%'[s] plugin [owner]
Usage Examples
main command label of command "skript"
description of command "help"
label of command "pl"
usage of command "help"
aliases of command "bukkit:help"
permission of command "/op"
command "op"'s permission message
command "sk"'s plugin owner
command /greet <player>:
usage: /greet <target>
trigger:
if arg-1 is sender:
send "&cYou can't greet yourself! Usage: %the usage%"
stop
send "%sender% greets you!" to arg-1
send "You greeted %arg-1%!"

A player or the console.


Since 1.0
Syntax Patterns
use <a href='#LitConsole'>the console</a> for the console
see <a href='#player'>player</a> for players.
Usage Examples
command /push [<player>]:
trigger:
if arg-1 is not set:
if command sender is console:
send "You can't push yourself as a console :\" to sender
stop
push sender upwards with force 2
send "Yay!"
else:
push arg-1 upwards with force 2
send "Yay!" to sender and arg-1

The player or the console who sent a command. Mostly useful in commands and command events.

If the command sender is a command block, its location can be retrieved by using %block's location%


Since 2.0 Return Type

Command Sender

Applicable Events

On Command

Syntax Patterns
[the] [command['s]] (sender|executor)
Usage Examples
make the command sender execute "/say hi!"
on command:
log "%executor% used command /%command% %arguments%" to "commands.log"

A very general condition, it simply compares two values. Usually you can only compare for equality (e.g. block is/isn't of <type>), but some values can also be compared using greater than/less than. In that case you can also test for whether an object is between two others.

Note: This is the only element where not all patterns are shown. It has actually another two sets of similar patters, but with (was|were) or will be instead of (is|are) respectively, which check different time states of the first expression.


Since 1.0
Syntax Patterns
[(neither)] %objects% ((is|are)[(n't| not| neither)] ((greater|more|higher|bigger|larger) than|above)|>) %objects%
[(neither)] %objects% ((is|are)[(n't| not| neither)] (greater|more|higher|bigger|larger|above) [than] or (equal to|the same as)|>=) %objects%
[(neither)] %objects% ((is|are)[(n't| not| neither)] ((less|smaller|lower) than|below)|<) %objects%
[(neither)] %objects% ((is|are)[(n't| not| neither)] (less|smaller|lower|below) [than] or (equal to|the same as)|<=) %objects%
[(neither)] %objects% ((is|are) (not|neither)|isn't|aren't|!=) [equal to] %objects%
[(neither)] %objects% (is|are|=) [(equal to|the same as)] %objects%
[(neither)] %objects% (is|are) between %objects% and %objects%
[(neither)] %objects% (is not|are not|isn't|aren't) between %objects% and %objects%
[(neither)] %objects% (was|were)[(n't| not| neither)] ((greater|more|higher|bigger|larger) than|above) %objects%
[(neither)] %objects% (was|were)[(n't| not| neither)] (greater|more|higher|bigger|larger|above) [than] or (equal to|the same as) %objects%
[(neither)] %objects% (was|were)[(n't| not| neither)] ((less|smaller|lower) than|below) %objects%
[(neither)] %objects% (was|were)[(n't| not| neither)] (less|smaller|lower|below) [than] or (equal to|the same as) %objects%
[(neither)] %objects% ((was|were) (not|neither)|wasn't|weren't) [equal to] %objects%
[(neither)] %objects% (was|were) [(equal to|the same as)] %objects%
[(neither)] %objects% (was|were) between %objects% and %objects%
[(neither)] %objects% (was not|were not|wasn't|weren't) between %objects% and %objects%
[(neither)] %objects% (will be|(will (not|neither) be|won't be)) ((greater|more|higher|bigger|larger) than|above) %objects%
[(neither)] %objects% (will be|(will (not|neither) be|won't be)) (greater|more|higher|bigger|larger|above) [than] or (equal to|the same as) %objects%
[(neither)] %objects% (will be|(will (not|neither) be|won't be)) ((less|smaller|lower) than|below) %objects%
[(neither)] %objects% (will be|(will (not|neither) be|won't be)) (less|smaller|lower|below) [than] or (equal to|the same as) %objects%
[(neither)] %objects% ((will (not|neither) be|won't be)|(isn't|aren't|is not|are not) (turning|changing) [in]to) [equal to] %objects%
[(neither)] %objects% (will be [(equal to|the same as)]|(is|are) (turning|changing) [in]to) %objects%
[(neither)] %objects% will be between %objects% and %objects%
[(neither)] %objects% (will not be|won't be) between %objects% and %objects%
Usage Examples
the clicked block is a stone slab or a double stone slab
time in the player's world is greater than 8:00
the creature is not an enderman or an ender dragon

The location a player's compass is pointing at.

As of Minecraft 1.21.4, the compass is controlled by the resource pack and by default will not point to this compass target when used outside of the overworld dimension.


Since 2.0 Return Type

Location

Syntax Patterns
[the] compass target of %players%
%players%'[s] compass target
Usage Examples
# make all player's compasses target a player stored in {compass::target::%player%}
every 5 seconds:
loop all players:
set the loop-player's compass target to location of {compass::target::%%loop-player%}

Joins the provided texts (and other things) into a single text.


Since 2.9.0 Return Type

Text

Syntax Patterns
concat(texts: objects)
Usage Examples
concat("hello ", "there") # hello there
concat("foo ", 100, " bar") # foo 100 bar

Sets whether the provided command blocks are conditional or not.


Since 2.10
Syntax Patterns
make command block[s] %blocks% [(un|not )]conditional
Usage Examples
make command block {_block} conditional
make command block {_block} unconditional if {_block} is conditional

Conditional sections

if: executed when its condition is true

else if: executed if all previous chained conditionals weren't executed, and its condition is true

else: executed if all previous chained conditionals weren't executed

parse if: a special case of 'if' condition that its code will not be parsed if the condition is not true

else parse if: another special case of 'else if' condition that its code will not be parsed if all previous chained conditionals weren't executed, and its condition is true


Since 1.0
Syntax Patterns
else
else [parse] if <.+>
else [parse] if (any|at least one [of])
else [parse] if [all]
[parse] if (any|at least one [of])
[parse] if [all]
[parse] if <.+>
then [run]
implicit:<.+>
Usage Examples
if player's health is greater than or equal to 4:
send "Your health is okay so far but be careful!"
else if player's health is greater than 2:
send "You need to heal ASAP, your health is very low!"
else: # Less than 2 hearts
send "You are about to DIE if you don't heal NOW. You have only %player's health% heart(s)!"
parse if plugin "SomePluginName" is enabled: # parse if %condition%
# This code will only be executed if the condition used is met otherwise Skript will not parse this section therefore will not give any errors/info about this section

A configuration (or code) loaded by Skript, such as the config.sk or aliases.

Configs can be reloaded or navigated to find options.


Since 2.10
Usage Examples
the skript config

The Skript config.

This can be reloaded, or navigated to retrieve options.


Since 2.10 Return Type

Config

Syntax Patterns
[the] [skript] config
Usage Examples
set {_node} to node "language" in the skript config
if text value of {_node} is "french":
broadcast "Bonjour!"

Connect a player to a server running on your proxy, or any server supporting transfers. Read below for more information.

If the server is running Minecraft 1.20.5 or above, you may specify an IP and Port to transfer a player over to that server.

When transferring players using an IP, the transfer will not complete if the `accepts-transfers` option isn't enabled in `server.properties` for the server specified.

If the port is not provided, it will default to `25565`.


Since 2.3, 2.10 (transfer)
Syntax Patterns
connect %players% to [proxy|bungeecord] [server] %text%
send %players% to [proxy|bungeecord] server %text%
transfer %players% to server %text% [on port %number%]
Usage Examples
connect all players to proxy server "hub"
transfer player to server "my.server.com"
transfer player to server "localhost" on port 25566

Represents the server's console which can receive messages and execute commands


Since 1.3.1 Return Type

Command Sender

Syntax Patterns
[the] (console|server)
Usage Examples
execute console command "/stop"
send "message to console" to the console

Prevent the firework used in an 'elytra boost' event to be consumed.


Since 2.10
Syntax Patterns
(prevent|disallow) [the] (boosting|used) firework from being consumed
allow [the] (boosting|used) firework to be consumed
Usage Examples
on elytra boost:
if the used firework will be consumed:
prevent the used firework from being consume

Makes the brewing stand in a brewing fuel event consume its fuel. Preventing the fuel from being consumed will keep the fuel item and still add to the fuel level of the brewing stand.


Since 2.13 Applicable Events

On Brewing Fuel

Syntax Patterns
make [the] brewing stand consume [its|the] fuel
prevent [the] brewing stand from consuming [its|the] fuel
Usage Examples
on brewing fuel consumption:
prevent the brewing stand from consuming the fuel

Represents the item consumed within an entity shoot bow and item consume event.


Since 2.11 Return Type

Item

Syntax Patterns
[the] consumed item
Usage Examples
on player or skeleton shoot projectile:
if the consumed item is an arrow:
cancel event
send "You're now allowed to shoot your arrows." to shooter
on player consume:
if the consumed item is cooked porkchop:
send "Well aren't you just a little piggy wiggly!" to player
if player has scoreboard tag "vegetarian":
set the consumed item to a carrot

Checks whether a type or list contains certain elements. When checking if a list contains a specific element, use '{list::*} contains {x}'. When checking if a single type contains something, use `player's inventory contains {x}`. When checking if many types contain something, use '{inventories::*} contain {x}` or `contents of {inventories::*} contain {x}`.


Syntax Patterns
%objects% contain[s] %objects%
%objects% (doesn't|does not|do not|don't) contain %objects%
contents of %objects% contain %objects%
contents of %objects% (do not|don't) contain %objects%
%inventories% (has|have) %item types% [in [(the[ir]|his|her|its)] inventory]
%inventories% (doesn't|does not|do not|don't) have %item types% [in [(the[ir]|his|her|its)] inventory]
Usage Examples
block contains 20 cobblestone
player has 4 flint and 2 iron ingots
{list::*} contains 5
names of {list::*} contain "prefix"
contents of the inventories of all players contain 1 stick

Moves the loop to the next iteration. You may also continue an outer loop from an inner one. The loops are labelled from 1 until the current loop, starting with the outermost one.


Since 2.2-dev37, 2.7 (while loops), 2.8.0 (outer loops)
Syntax Patterns
continue [this loop|[the] [current] loop]
continue [the] <-?\d+(_\d+)*>(st|nd|rd|th) loop
Usage Examples
# Broadcast online moderators
loop all players:
if loop-value does not have permission "moderator":
continue # filter out non moderators
broadcast "%loop-player% is a moderator!" # Only moderators get broadcast
# Game starting counter
set {_counter} to 11
while {_counter} > 0:
remove 1 from {_counter}
wait a second
if {_counter} != 1, 2, 3, 5 or 10:
continue # only print when counter is 1, 2, 3, 5 or 10
broadcast "Game starting in %{_counter}% second(s)"
New

A particle effect where particles converge towards a point.


Since 2.14

Expression Cooldown Time/Remaining Time/Elapsed Time/Last Usage/Bypass Permission

Section titled “ Expression Cooldown Time/Remaining Time/Elapsed Time/Last Usage/Bypass Permission”

Only usable in command events. Represents the cooldown time, the remaining time, the elapsed time,

the last usage date, or the cooldown bypass permission.


Since 2.2-dev33 Return Type

Object

Syntax Patterns
[the] remaining [time] [of [the] (cooldown|wait) [(of|for) [the] [current] command]]
[the] elapsed [time] [of [the] (cooldown|wait) [(of|for) [the] [current] command]]
[the] ((cooldown|wait) time|[wait] time of [the] (cooldown|wait) [(of|for) [the] [current] command])
[the] last usage [date] [of [the] (cooldown|wait) [(of|for) [the] [current] command]]
[the] [cooldown] bypass perm[ission] [of [the] (cooldown|wait) [(of|for) [the] [current] command]]
Usage Examples
command /home:
cooldown: 10 seconds
cooldown message: You last teleported home %elapsed time% ago, you may teleport home again in %remaining time%.
trigger:
teleport player to {home::%player%}

Copies objects into a variable. When copying a list over to another list, the source list and its sublists are also copied over.

Note: Copying a value into a variable/list will overwrite the existing data.


Since 2.8.0
Syntax Patterns
copy %~objects% [in]to %~objects%
Usage Examples
set {_foo::bar} to 1
set {_foo::sublist::foobar} to "hey"
copy {_foo::*} to {_copy::*}
broadcast indices of {_copy::*} # bar, sublist
broadcast {_copy::bar} # 1
broadcast {_copy::sublist::foobar} # "hey!"

The cosine function. This is basically the sine shifted by 90°, i.e. cos(a) = sin(a + 90°), for any number a. Uses degrees, not radians.


Since 2.2 Return Type

Number

Syntax Patterns
cos(n: number)
Usage Examples
cos(0) = 1
cos(90) = 0
Minecraft 1.21.5+

Represents the variant of a cow entity.

NOTE: Minecraft namespaces are supported, ex: 'minecraft:warm'.


Since 2.12
Syntax Patterns
cold, temperate, warm

Create a loot context.


Since 2.10 Return Type

Loot Context

Syntax Patterns
[a] loot context %direction% %location%
Usage Examples
set {_player} to player
set {_context} to a loot context at player:
set loot luck value to 10
set looter to {_player}
set looted entity to last spawned pig
give player loot items of loot table "minecraft:entities/iron_golem" with loot context {_context}

Creates a new, unused world border. World borders can be assigned to either worlds or specific players.

Borders assigned to worlds apply to all players in that world.

Borders assigned to players apply only to those players, and different players can have different borders.


Since 2.11 Return Type

World Border

Syntax Patterns
a [virtual] world[ ]border
Usage Examples
on join:
set {_location} to location of player
set worldborder of player to a virtual worldborder:
set worldborder radius to 25
set world border center of event-worldborder to {_location}
on load:
set worldborder of world "world" to a worldborder:
set worldborder radius of event-worldborder to 200
set worldborder center of event-worldborder to location(0, 64, 0)
set worldborder warning distance of event-worldborder to 5
Minecraft 1.20.4+

Get the created damage source being created/modified in a 'custom damage source' section.


Since 2.12 Return Type

Damage Source

Syntax Patterns
[the] created damage source
Usage Examples
set {_source} to a custom damage source:
set the damage type of the created damage source to magic
New

An expression to obtain the potion effect being made in a potion effect creation section.


Since 2.14 Return Type

Object

Syntax Patterns
[the] [created] [potion] effect
Usage Examples
set {_potion} to a potion effect of speed 2 for 10 minutes:
hide the effect's icon
hide the effect's particles

Expression Creature/Entity/Player/Projectile/Villager/Powered Creeper/etc.

Section titled “ Expression Creature/Entity/Player/Projectile/Villager/Powered Creeper/etc.”

The entity involved in an event (an entity is a player, a creature or an inanimate object like ignited TNT, a dropped item or an arrow).

You can use the specific type of the entity that's involved in the event, e.g. in a 'death of a creeper' event you can use 'the creeper' instead of 'the entity'.


Since 1.0 Return Type

Entity

Syntax Patterns
[the] [event-]<.+>
Usage Examples
give a diamond sword of sharpness 3 to the player
kill the creeper
kill all powered creepers in the wolf's world
projectile is an arrow

The item which the player has on their inventory cursor. This slot is always empty if player has no inventory open.


Since 2.2-dev17 Return Type

Slot

Syntax Patterns
[the] cursor slot of %players%
%players%'[s] cursor slot
Usage Examples
cursor slot of player is dirt
set cursor slot of player to 64 diamonds

Returns a chest inventory with the given amount of rows and the name. Use the open inventory effect to open it.


Since 2.2-dev34, 2.8.0 (chat format) Return Type

Inventory

Syntax Patterns
[a] [new] chest inventory (named|with name) %text% [with %number% row[s]]
[a] [new] chest inventory with %number% row[s] [(named|with name) %text%]
Usage Examples
open chest inventory with 1 row named "test" to player
set {_inventory} to a chest inventory with 1 row
set slot 4 of {_inventory} to a diamond named "example"
open {_inventory} to player
open chest inventory named "<#00ff00>hex coloured title!" with 6 rows to player
Minecraft 1.21.4+ (floats/flags/strings/colours/full model data)

Get/set the custom model data of an item. Using just `custom model data` will return an integer. Items without model data will return 0.

Since 1.21.4, custom model data instead consists of a list of numbers (floats), a list of booleans (flags), a list of strings, and a list of colours. Accessing and modifying these lists can be done type-by-type, or all at once with `complete custom model data`. This is the more accurate and recommended method of using custom model data.


Since 2.5, 2.12 (floats/flags/strings/colours/full model data) Return Type

Object

Syntax Patterns
[the] [custom] model data of %item types%
%item types%'[s] [custom] model data
[the] [custom] model data (floats|flags|strings|colo[u]rs) of %item type%
%item type%'[s] [custom] model data (floats|flags|strings|colo[u]rs)
[the] ((complete|full)) [custom] model data of %item type%
%item type%'[s] ((complete|full)) [custom] model data
Usage Examples
set custom model data of player's tool to 3
set {_model} to custom model data of player's tool
set custom model data colours of {_flag} to red, white, and blue
add 10.5 to the model data floats of {_flag}
set the full custom model data of {_item} to 10, "sword", and rgb(100, 200, 30)

How much damage is done in a entity/vehicle/item damage events.

For entity damage events, possibly ignoring armour, criticals and/or enchantments (remember that in Skript '1' is one full heart, not half a heart).

For items, it's the amount of durability damage the item will be taking.


Since 1.3.5, 2.8.0 (item damage event) Return Type

Number

Applicable Events

On Damage

On Vehicle Damage

On Item Damage

Syntax Patterns
[the] damage
Usage Examples
on item damage:
event-item is any tool
clear damage # unbreakable tools as the damage will be 0
on damage:
increase the damage by 2

The amount of damage a player takes per second for each block they are outside the border plus the border buffer.

Players only take damage when outside of the world's world border, and the damage value cannot be less than 0.


Since 2.11 Return Type

Number

Syntax Patterns
[the] world[ ]border damage amount [of %worldborders%]
%worldborders%'[s] world[ ]border damage amount
Usage Examples
set world border damage amount of {_worldborder} to 1

The amount of blocks a player may safely be outside the border before taking damage.

Players only take damage when outside of the world's world border, and the damage buffer distance cannot be less than 0.


Since 2.11 Return Type

Number

Syntax Patterns
[the] world[ ]border damage buffer [of %worldborders%]
%worldborders%'[s] world[ ]border damage buffer
Usage Examples
set world border damage buffer of {_worldborder} to 10

The cause/type of a damage event, e.g. lava, fall, fire, drowning, explosion, poison, etc.

Please note that support for this type is very rudimentary, e.g. lava, fire and burning, as well as projectile and attack are considered different types.


Since 2.0
Syntax Patterns
sweep attack, thorns, the void, magma, a lightning, drowning, dragonfire, an attack, drown, an entity attack, melt, freeze, falling block, contact, fire, campfire, an entity explosion, lightning, a fall, entity explosion, void, a lightning strike, suffocation, suicide, wither effect, a plugin, lightning strike, entity attack, a potion, a wither, sweeping, melting, a falling block, unknown, starvation, lava, fall, hot floor, attack, a block explosion, dryout, burn, hitting wall while flying, potion, world border, flying into a wall, cramming, poison, sonic boom, suffocate, custom, kill, killed, a fire, burning, a projectile, plugin, wither potion effect, block explosion, projectile, wither, dragon's breath
Usage Examples

Tests what kind of damage caused a damage event. Refer to the Damage Cause type for a list of all possible causes.


Since 2.0
Syntax Patterns
[the] damage (was|is|has)[n('|o)t] [been] (caused|done|made) by %damage cause%
Usage Examples
# make players use their potions of fire resistance whenever they take any kind of fire damage
on damage:
damage was caused by lava, fire or burning
victim is a player
victim has a potion of fire resistance
cancel event
apply fire resistance to the victim for 30 seconds
remove 1 potion of fire resistance from the victim
# prevent mobs from dropping items under certain circumstances
on death:
entity is not a player
damage wasn't caused by a block explosion, an attack, a projectile, a potion, fire, burning, thorns or poison
clear drops

The damage cause of a damage event. Please click on the link for more information.


Since 2.0 Return Type

Damage Cause

Syntax Patterns
[the] damage cause
Usage Examples
damage cause is lava, fire or burning
Minecraft 1.20.4+

Represents the source from which an entity was damaged.

Cannot change any attributes of the damage source from an 'on damage' or 'on death' event.


Since 2.12
Minecraft 1.20.4+

Create a custom damage source and change the attributes.

When setting a 'causing entity' you must also set a 'direct entity'.

Attributes of a damage source cannot be changed once created, only while within the 'custom damage source' section.


Since 2.12 Return Type

Damage Source

Syntax Patterns
[a] custom damage source [(with|using) [the|a] [damage type [of]] %damage type%]
Usage Examples
set {_source} to a custom damage source:
set the damage type to magic
set the causing entity to {_player}
set the direct entity to {_arrow}
set the damage location to location(0, 0, 10)
damage all players by 5 using {_source}
on damage:
if the damage type of event-damage source is magic:
set the damage to damage * 2

Expression Damage Source - Causing Entity

Section titled “ Expression Damage Source - Causing Entity”
Minecraft 1.20.4+

The causing entity of a damage source.

The causing entity is the entity that ultimately caused the damage. (e.g. the entity that shot an arrow)

When setting a 'causing entity' you must also set a 'direct entity'.

Attributes of a damage source cannot be changed once created, only while within the 'custom damage source' section.


Since 2.12 Return Type

Entity

Syntax Patterns
[the] (causing|responsible) entity [of %damage sources%]
%damage sources%'[s] (causing|responsible) entity
Usage Examples
set {_source} to a custom damage source:
set the damage type to magic
set the causing entity to {_player}
set the direct entity to {_arrow}
set the damage location to location(0, 0, 10)
on damage:
set {_causing} to the causing entity of event-damage source

Expression Damage Source - Damage Location

Section titled “ Expression Damage Source - Damage Location”
Minecraft 1.20.4+

The location where the damage was originated from.

The 'damage location' on vanilla damage sources will be set if an entity did not cause the damage.

Attributes of a damage source cannot be changed once created, only while within the 'custom damage source' section.


Since 2.12 Return Type

Location

Syntax Patterns
[the] damage location [of %damage sources%]
%damage sources%'[s] damage location
Usage Examples
damage all players by 5 using a custom damage source:
set the damage type to magic
set the causing entity to {_player}
set the direct entity to {_arrow}
set the damage location to location(0, 0, 10)
on death:
set {_location} to the damage location of event-damage source
Minecraft 1.20.4+

The type of damage of a damage source.

Attributes of a damage source cannot be changed once created, only while within the 'custom damage source' section.


Since 2.12 Return Type

Damage Type

Syntax Patterns
[the] damage type [of %damage sources%]
%damage sources%'[s] damage type
Usage Examples
set {_source} to a custom damage source:
set the damage type to magic
set the causing entity to {_player}
set the direct entity to {_arrow}
set the damage location to location(0, 0, 10)
damage all players by 5 using {_source}
on death:
set {_type} to the damage type of event-damage source
Minecraft 1.20.4+

The direct entity of a damage source.

The direct entity is the entity that directly caused the damage. (e.g. the arrow that was shot)

Attributes of a damage source cannot be changed once created, only while within the 'custom damage source' section.


Since 2.12 Return Type

Entity

Syntax Patterns
[the] direct entity [of %damage sources%]
%damage sources%'[s] direct entity
Usage Examples
set {_source} to a custom damage source:
set the damage type to magic
set the causing entity to {_player}
set the direct entity to {_arrow}
set the damage location to location(0, 0, 10)
damage all players by 5 using {_source}
on death:
set {_direct} to the direct entity of event-damage source

Condition Damage Source - Does Scale With Difficulty

Section titled “ Condition Damage Source - Does Scale With Difficulty”
Minecraft 1.20.4+

Whether the damage from a damage source scales with the difficulty of the server.


Since 2.12
Syntax Patterns
%damage sources% ((does|do) scale|scales) damage with difficulty
%damage sources% (do not|don't|does not|doesn't) scale damage with difficulty
%damage sources%'[s] damage ((does|do) scale|scales) with difficulty
%damage sources%'[s] damage (do not|don't|does not|doesn't) scale with difficulty
Usage Examples
on death:
if event-damage source scales damage with difficulty:

Expression Damage Source - Food Exhaustion

Section titled “ Expression Damage Source - Food Exhaustion”
Minecraft 1.20.4+

The amount of hunger exhaustion caused by a damage source.


Since 2.12 Return Type

Number

Syntax Patterns
[the] food exhaustion [of %damage sources%]
%damage sources%'[s] food exhaustion
Usage Examples
on damage:
if the food exhaustion of event-damage source is 10:

Expression Damage Source - Source Location

Section titled “ Expression Damage Source - Source Location”
Minecraft 1.20.4+

The final location where the damage was originated from.

The 'source location' for vanilla damage sources will retrieve the 'damage location' if set. If 'damage location' is not set, will attempt to grab the location of the 'causing entity', otherwise, null.


Since 2.12 Return Type

Location

Syntax Patterns
[the] source location [of %damage sources%]
%damage sources%'[s] source location
Usage Examples
on death:
set {_location} to the source location of event-damage source

Condition Damage Source - Was Indirectly Caused

Section titled “ Condition Damage Source - Was Indirectly Caused”
Minecraft 1.20.4+

Whether the damage from a damage source was indirectly caused.

Vanilla damage sources are considered indirect if the 'causing entity' and the 'direct entity' are not the same. For example, taking damage from an arrow that was shot by an entity.


Since 2.12
Syntax Patterns
%damage sources% (was|were) ([in]directly caused|caused [in]directly)
%damage sources% (was not|wasn't|were not|weren't) ([in]directly caused|caused [in]directly)
Usage Examples
on damage:
if event-damage source was indirectly caused:
Minecraft 1.20.4+

References a damage type of a damage source.


Since 2.12
Syntax Patterns
arrow, bad respawn point, cactus, campfire, cramming, dragon breath, drown, drowning, dry out, ender pearl, entity cramming, explosion, fall, falling anvil, falling block, falling stalactite, fireball, fireworks, fly into wall, freeze, generic, generic kill, hot floor, in fire, in wall, indirect magic, lava, lightning, lightning bolt, llama spit, mace smash, magic, mob attack, mob attack no aggro, mob projectile, on fire, out of world, outside border, player attack, player explosion, sonic boom, spear, spit, stalagmite, starve, sting, suffocation, sweet berry bush, thorns, thrown, trident, unattributed fireball, void, wind charge, wither, wither skull

The damage value/durability of an item.


Since 1.2, 2.7 (durability reversed) Return Type

Number

Syntax Patterns
[the] (damage[s] [value[s]]|durabilit(y|ies)) of %item types/item stacks/slots%
%item types/item stacks/slots%'[s] (damage[s] [value[s]]|durabilit(y|ies))
Usage Examples
set damage value of player's tool to 10
reset the durability of {_item}
set durability of player's held item to 0
Spigot 1.20.4+ (for damage cause)

Damage, heal, or repair an entity or item.

Servers running Spigot 1.20.4+ can optionally choose to specify a fake damage cause.


Since 1.0, 2.10 (damage cause)
Syntax Patterns
damage %living entities/item types/slots% by %number% [heart[s]]
damage %living entities% by %number% [heart[s]] with [fake] [damage] cause %damage cause%
damage %living entities% by %number% [heart[s]] (using|with) %damage source% [as the source]
heal %living entities% [by %number% [heart[s]]]
repair %item types/slots% [by %number%]
Usage Examples
damage player by 5 hearts
damage player by 3 hearts with fake cause fall
heal the player
repair tool of player

Directly damages an item. In MC versions 1.12.2 and lower, this can be used to apply data values to items/blocks


Since 2.4 Return Type

Item Type

Syntax Patterns
%item type% with (damage|data) [value] %number%
%item type% damaged by %number%
Usage Examples
give player diamond sword with damage value 100
set player's tool to diamond hoe damaged by 250
give player diamond sword with damage 700 named "BROKEN SWORD"
set {_item} to diamond hoe with damage value 50 named "SAD HOE"

Make an allay or piglin start or stop dancing.

Providing a location only applies to allays. They will check to see if the the block at the location is a jukebox and playing music. If it isn't, they will stop dancing. If no location is provided, the allay will dance indefinitely.

Providing a timespan only applies for piglins. It determines the length of time they will dance for. If no timespan is provided, they will dance indefinitely.


Since 2.11
Syntax Patterns
make %living entities% (start dancing|dance) [%direction% %location%] [for %time span%]
make %living entities% (stop dancing|not dance)
Usage Examples
if last spawned allay is not dancing:
make last spawned allay start dancing
if block at location(0, 0, 0) is a jukebox:
make all allays dance at location(0, 0, 0)
make last spawned piglin start dancing
make all piglins dance for 5 hours

Creates a date from a year, month, and day, and optionally also from hour, minute, second and millisecond.

A time zone and DST offset can be specified as well (in minutes), if they are left out the server's time zone and DST offset are used (the created date will not retain this information).


Since 2.2 Return Type

Date

Syntax Patterns
date(year: number, month: number, day: number, hour: number = 0, minute: number = 0, second: number = 0, millisecond: number = 0, zone_offset: number = NaN, dst_offset: number = NaN)
Usage Examples
date(2014, 10, 1) # 0:00, 1st October 2014
date(1990, 3, 5, 14, 30) # 14:30, 5th May 1990
date(1999, 12, 31, 23, 59, 59, 999, -3*60, 0) # almost year 2000 in parts of Brazil (-3 hours offset, no DST)

A date is a certain point in the real world's time which can be obtained with now expression, unix date expression and date function.

See time and timespan for the other time types of Skript.


Since 1.4
Usage Examples
set {_yesterday} to now
subtract a day from {_yesterday}
# now {_yesterday} represents the date 24 hours before now

A date the specified timespan before/after another date.


Since 2.2-dev33 Return Type

Date

Syntax Patterns
%time span% (ago|in the past|before [the] [date] %date%)
%time span% (later|(from|after) [the] [date] %date%)
Usage Examples
set {_yesterday} to 1 day ago
set {_hourAfter} to 1 hour after {someOtherDate}
set {_hoursBefore} to 5 hours before {someOtherDate}

Requires the using queues experimental feature flag to be enabled. Unrolls a queue into a regular list of values, which can be stored in a list variable. The order of the list will be the same as the order of the elements in the queue. If a list variable is set to this, it will use numerical indices. The original queue will not be changed.


Since 2.10 (experimental) Return Type

Object

Syntax Patterns
(de|un)queued %queue%
unrolled %queue%
Usage Examples
set {queue} to a new queue
add "hello" and "there" to {queue}
set {list::*} to dequeued {queue}

Returns a string version of the given objects, but with their type attached: debug info of 1, "a", 0.5 -> 1 (long), "a" (string), 0.5 (double) This is intended to make debugging easier, not as a reliable method of getting the type of a value.


Since 2.13 Return Type

Text

Syntax Patterns
[the] debug info[rmation] of %objects%
%objects%'[s] debug info[rmation]
Usage Examples
broadcast debug info of {list::*}

A shorthand expression for giving things a default value. If the first thing isn't set, the second thing will be returned.


Since 2.2-dev36 Return Type

Object

Syntax Patterns
%objects% (otherwise|?) %objects%
Usage Examples
broadcast {score::%player's uuid%} otherwise "%player% has no score!"

Delays the script's execution by a given timespan. Please note that delays are not persistent, e.g. trying to create a tempban script with ban player → wait 7 days → unban player will not work if you restart your server anytime within these 7 days. You also have to be careful even when using small delays!


Since 1.4
Syntax Patterns
(wait|halt) [for] %time span%
Usage Examples
wait 2 minutes
halt for 5 minecraft hours
wait a tick

Immediately detonates an entity. Accepted entities are fireworks, TNT minecarts, primed TNT, wind charges and creepers.


Since 2.10
Syntax Patterns
detonate %entities%
Usage Examples
detonate last launched firework

The difference between two values

Supported types include numbers, dates and times.


Since 1.4 Return Type

Object

Syntax Patterns
difference (between|of) %object% and %object%
Usage Examples
if difference between {command::%player%::lastuse} and now is smaller than a minute:
message "You have to wait a minute before using this command again!"

The difficulty of a world.


Since 2.3
Syntax Patterns
normal, medium, hard, easy, peaceful

The difficulty of a world.


Since 2.3 Return Type

Difficulty

Syntax Patterns
[the] difficult(y|ies) of %worlds%
%worlds%'[s] difficult(y|ies)
Usage Examples
set the difficulty of "world" to hard

A direction, e.g. north, east, behind, 5 south east, 1.3 meters to the right, etc.

Locations and some blocks also have a direction, but without a length.

Please note that directions have changed extensively in the betas and might not work perfectly. They can also not be used as command arguments.


Since 2.0
Syntax Patterns
see <a href='#ExprDirection'>direction (expression)</a>
Usage Examples
set the block below the victim to a chest
loop blocks from the block infront of the player to the block 10 below the player:
set the block behind the loop-block to water

A helper expression for the direction type.


Since 1.0 (basic), 2.0 (extended) Return Type

Direction

Syntax Patterns
[%number% [(block|met(er|re))[s]] [to the]] (north[[(-| )](east|west)][(ward[(s|ly)]|er[(n|ly)])] [of]|south[[(-| )](east|west)][(ward[(s|ly)]|er[(n|ly)])] [of]|(east|west)[(ward[(s|ly)]|er[(n|ly)])] [of]|above|over|(up|down)[ward[(s|ly)]]|below|under[neath]|beneath) [%direction%]
[%number% [(block|met(er|re))[s]]] in [the] (direction|horizontal direction|facing|horizontal facing) of %entity/block% [(of|from)]
[%number% [(block|met(er|re))[s]]] in %entity/block%'[s] (direction|horizontal direction|facing|horizontal facing) [(of|from)]
[%number% [(block|met(er|re))[s]]] (in[ ]front [of]|forward[s]|behind|backwards|[to the] (right|left) [of])
[%number% [(block|met(er|re))[s]]] horizontal[ly] (in[ ]front [of]|forward[s]|behind|backwards|to the (right|left) [of])
Usage Examples
thrust the player upwards
set the block behind the player to water
loop blocks above the player:
set {_rand} to a random integer between 1 and 10
set the block {_rand} meters south east of the loop-block to stone
block in horizontal facing of the clicked entity from the player is air
spawn a creeper 1.5 meters horizontally behind the player
spawn a TNT 5 meters above and 2 meters horizontally behind the player
thrust the last spawned TNT in the horizontal direction of the player with speed 0.2
push the player upwards and horizontally forward at speed 0.5
push the clicked entity in in the direction of the player at speed -0.5
open the inventory of the block 2 blocks below the player to the player
teleport the clicked entity behind the player
grow a regular tree 2 meters horizontally behind the player
New

A particle effect which can be given a directional velocity.


Since 2.14

Represents the billboard setting of a display.


Since 2.10
Syntax Patterns
vertical pivot, horizontal, middle, horizontal pivot, center pivot, center, fixed, vertical

Returns or changes the billboard setting of displays.

This describes the axes/points around which the display can pivot.

Displays spawn with the 'fixed' billboard by default. Resetting this expression will also set it to 'fixed'.


Since 2.10 Return Type

Display Billboard

Syntax Patterns
[the] bill[ |-]board[ing] [setting] [of %displays%]
%displays%'[s] bill[ |-]board[ing] [setting]
Usage Examples
set billboard of the last spawned text display to center

Returns or changes the brightness override of displays.

Unmodified displays will not have a brightness override value set. Resetting or deleting this value will remove the override.

Use the 'block' or 'sky' options to get/change specific values or get both values as a list by using neither option.

NOTE: setting only one of the sky/block light overrides of a display without an existing override will set both sky and block light to the given value. Make sure to set both block and sky levels to your desired values for the best results. Likewise, you can only clear the brightness override, you cannot clear/reset the sky/block values individually.


Since 2.10 Return Type

Number

Syntax Patterns
[the] [block|sky] (light [level]|brightness) override[s] of %displays%
%displays%'[s] [block|sky] (light [level]|brightness) override[s]
Usage Examples
set sky light override of the last spawned text display to 7
subtract 3 from the block light level override of the last spawned text display
if sky light level override of {_display} is 5:
clear brightness override of {_display}

A text, block or item display entity.


Since 2.10

Returns or changes the glowing color override of displays.

This overrides whatever color is already set for the scoreboard team of the displays.


Since 2.10 Return Type

Color

Syntax Patterns
[the] glow[ing] colo[u]r[s] override[s] [of %displays%]
%displays%'[s] glow[ing] colo[u]r[s] override[s]
Usage Examples
set glow color override of the last spawned text display to blue

Returns or changes the height or width of displays.

The rendering culling bounding box spans horizontally width/2 from entity position, which determines the point at which the display will be frustum culled (no longer rendered because the game determines you are no longer able to see it).

If set to 0, no culling will occur on both the vertical and horizontal directions. Default is 0.0.


Since 2.10 Return Type

Number

Syntax Patterns
[the] display (height|width) [of %displays%]
%displays%'[s] display (height|width)
Usage Examples
set display height of the last spawned text display to 2.5

Expression Display Interpolation Delay/Duration

Section titled “ Expression Display Interpolation Delay/Duration”

Returns or changes the interpolation delay/duration of displays.

Interpolation duration is the amount of time a display will take to interpolate, or shift, between its current state and a new state.

Interpolation delay is the amount of ticks before client-side interpolation will commence.Setting to 0 seconds will make it immediate.

Resetting either value will return that value to 0.


Since 2.10 Return Type

Timespan

Syntax Patterns
[the] interpolation (delay|duration)[s] [of %displays%]
%displays%'[s] interpolation (delay|duration)[s]
Usage Examples
set interpolation delay of the last spawned text display to 2 ticks

Represents the display name of a player, or the custom name of an item, entity, block, or inventory.

Players: The name of the player that is displayed in messages. This name can be changed freely and can include color codes, and is shared among all plugins (e.g. chat plugins will use the display name).

Entities: The custom name of the entity. Can be changed, which will also enable custom name visibility of the entity so name tag of the entity will be visible always.

Items: The custom name of the item (not the Minecraft locale name). Can be changed.

Inventories: The name/title of the inventory. Changing name of an inventory means opening the same inventory with the same contents but with a different name to its current viewers.


Since before 2.1, 2.2-dev20 (inventory name), 2.4 (non-living entity support, changeable inventory name) Return Type

Object

Syntax Patterns
[the] (display|nick|chat|custom)[ ]name[s] of %objects%
%objects%'[s] (display|nick|chat|custom)[ ]name[s]
Usage Examples
on join:
player has permission "name.red"
set the player's display name to "&lt;red&gt;[admin] &lt;gold&gt;%name of player%"

Expression Display Shadow Radius/Strength

Section titled “ Expression Display Shadow Radius/Strength”

Returns or changes the shadow radius/strength of displays.


Since 2.10 Return Type

Number

Syntax Patterns
[the] shadow (radius|strength) [of %displays%]
%displays%'[s] shadow (radius|strength)
Usage Examples
set shadow radius of the last spawned text display to 1.75
Spigot 1.20.4+

The teleport duration of displays is the amount of time it takes to get between locations.

0 means that updates are applied immediately.

1 means that the display entity will move from current position to the updated one over one tick.

Higher values spread the movement over multiple ticks. Max of 59 ticks.


Since 2.10 Return Type

Timespan

Syntax Patterns
[the] teleport[ation] duration[s] [of %displays%]
%displays%'[s] teleport[ation] duration[s]
Usage Examples
set teleport duration of the last spawned text display to 2 ticks
teleport last spawned text display to {_location}
wait 2 ticks
message "display entity has arrived at %{_location}%"

Represents the text alignment setting of a text display.


Since 2.10
Syntax Patterns
middle aligned, centered, right aligned, center aligned, left aligned

Expression Display Transformation Rotation

Section titled “ Expression Display Transformation Rotation”

Returns or changes the transformation rotation of displays.

The left rotation is applied first, with the right rotation then being applied based on the rotated axis.


Since 2.10 Return Type

Quaternion

Syntax Patterns
[the] (left|right) [transformation] rotation [of %displays%]
%displays%'[s] (left|right) [transformation] rotation
Usage Examples
set left transformation rotation of last spawned block display to quaternion(1, 0, 0, 0) # reset block display

Expression Display Transformation Scale/Translation

Section titled “ Expression Display Transformation Scale/Translation”

Returns or changes the transformation scale or translation of displays.


Since 2.10 Return Type

Vector

Syntax Patterns
[the] (display|[display] transformation) (scale|translation) of %displays%
%displays%'[s] (display|[display] transformation) (scale|translation)
Usage Examples
set transformation translation of display to vector from -0.5, -0.5, -0.5 # Center the display in the same position as a block

Returns or changes the view range of displays.

Default value is 1.0. This value is then multiplied by 64 and the player's entity view distance setting to determine the actual range.

For example, a player with 150% entity view distance will see a block display with a view range of 1.2 at 1.2 * 64 * 150% = 115.2 blocks away.


Since 2.10 Return Type

Number

Syntax Patterns
[the] [display] view (range|radius) [of %displays%]
%displays%'[s] [display] view (range|radius)
Usage Examples
set view range of the last spawned text display to 2.9

The distance between two points.


Since 1.0 Return Type

Number

Syntax Patterns
[the] distance between %location% and %location%
Usage Examples
if the distance between the player and {home::%uuid of player%} is smaller than 20:
message "You're very close to your home!"

Execute an effect if a condition is true.


Since 2.3
Syntax Patterns
<.+> if <.+>
Usage Examples
on join:
give a diamond to the player if the player has permission "rank.vip"
Minecraft 1.16+

Checks whether or not respawn anchors work in a world.


Since 2.7
Syntax Patterns
respawn anchors [do[(n't| not)]] work in %worlds%
Usage Examples
respawn anchors work in world "world_nether"

Drops one or more items.


Since 1.0
Syntax Patterns
drop %item types/experience points% [%directions% %locations%] [without velocity]
Usage Examples
on death of creeper:
drop 1 TNT

The uuid of the owner of the dropped item. Setting the owner of a dropped item means only that entity or player can pick it up. Dropping an item does not automatically make the entity or player the owner.


Since 2.11 Return Type

UUID

Syntax Patterns
[the] uuid of [the] [dropped] item owner [of %itementities%]
[the] [dropped] item owner's uuid [of %itementities%]
Usage Examples
set the uuid of the dropped item owner of last dropped item to player
if the uuid of the dropped item owner of last dropped item is uuid of player:

The uuid of the entity or player that threw/dropped the dropped item.


Since 2.11 Return Type

UUID

Syntax Patterns
[the] uuid of [the] [dropped] item thrower [of %itementities%]
[the] [dropped] item thrower's uuid [of %itementities%]
Usage Examples
set the uuid of the dropped item thrower of {_dropped item} to player
if the uuid of the dropped item thrower of {_dropped item} is uuid of player:
clear the item thrower of {_dropped item}

This expression only works in death and harvest events.

In a death event, will hold the drops of the dying creature.

Drops can be prevented by removing them with "remove ... from drops", e.g. "remove all pickaxes from the drops", or "clear drops" if you don't want any drops at all.


Since 1.0 Return Type

Item Type

Applicable Events

On Death

Syntax Patterns
[the] drops
Usage Examples
clear drops
remove 4 planks from the drops
Minecraft 1.15+ ('as %entity%')

A list of the items that will drop when a block is broken.


Since 2.5.1 Return Type

Item Type

Syntax Patterns
[(all|the|all [of] the)] drops of %blocks% [(using|with) %item type% [(as %entity%)]]
%blocks%'s drops [(using|with) %item type% [(as %entity%)]]
Usage Examples
on break of block:
give drops of block using player's tool to player
Minecraft 1.20+

Represents how far the block has been uncovered.

The only blocks that can currently be "dusted" are Suspicious Gravel and Suspicious Sand.


Since 2.12 Return Type

Number

Syntax Patterns
[the] [max[imum]] dust[ed|ing] (value|stage|progress[ion]) of %blocks/block datas%
%blocks/block datas%'[s] [max[imum]] dust[ed|ing] (value|stage|progress[ion])
Usage Examples
send target block's maximum dusted stage
set {_sand}'s dusted stage to 2

Whether the egg will hatch in a Player Egg Throw event.


Since 2.7 Applicable Events

On Egg Throw

Syntax Patterns
[the] egg (will|will not|won't) hatch
Usage Examples
on player egg throw:
if an entity won't hatch:
send "Better luck next time!" to the player

The first, last, range or a random element of a set, e.g. a list variable, or a queue.

Asking for elements from a queue will also remove them from the queue, see the new queue expression for more information.

See also: random expression


Since 2.0, 2.7 (relative to last element), 2.8.0 (range of elements) Return Type

Object

Syntax Patterns
[the] (first|last) element [out] of %objects%
[the] (first|last) %integer% elements [out] of %objects%
[a] random element [out] of %objects%
[the] %integer%(st|nd|rd|th) [[to] last] element [out] of %objects%
[the] elements (from|between) %integer% (to|and) %integer% [out] of %objects%
[the] (first|next|last) element (of|in) %queue%
[the] (first|last) %integer% elements (of|in) %queue%
[a] random element (of|in) %queue%
[the] %integer%(st|nd|rd|th) [[to] last] element (of|in) %queue%
[the] elements (from|between) %integer% (to|and) %integer% (of|in) %queue%
Usage Examples
broadcast the first 3 elements of {top players::*}
set {_last} to last element of {top players::*}
set {_random player} to random element out of all players
send 2nd last element of {top players::*} to player
set {page2::*} to elements from 11 to 20 of {top players::*}
broadcast the 1st element in {queue}
broadcast the first 3 elements in {queue}

Effect Enable/Disable/Unload/Reload Script

Section titled “ Effect Enable/Disable/Unload/Reload Script”

Enables, disables, unloads, or reloads a script. Disabling a script unloads it and prepends - to its name so it will not be loaded the next time the server restarts. If the script reflection experiment is enabled: unloading a script terminates it and removes it from memory, but does not alter the file.


Since 2.4, 2.10 (unloading)
Syntax Patterns
((enable|load)|reload|disable|unload) script [file|named] %text% [with errors]
((enable|load)|reload|disable|unload) skript file %text% [with errors]
((enable|load)|reload|disable|unload) %scripts% [with errors]
Usage Examples
reload script "test"
enable script file "testing"
unload script file "script.sk"
set {_script} to the script "MyScript.sk"
reload {_script}

The enchant item in an enchant prepare event or enchant event.

It can be modified, but enchantments will still be applied in the enchant event.


Since 2.5 Return Type

Item Type

Applicable Events

On Enchant Prepare

On Enchant

Syntax Patterns
[the] enchant[ed] item
Usage Examples
on enchant:
set the enchanted item to a diamond chestplate
on enchant prepare:
set the enchant item to a wooden sword

Enchant or disenchant an existing item. Enchanting at a specific level will act as if an enchanting table was used, and will apply the enchantments randomly chosen at that level. Treasure enchantments, like mending, can optionally be allowed. Note that enchanting a book at a specific level will turn it into an enchanted book, rather than a book with enchantments.


Since 2.0, 2.13 (at level)
Syntax Patterns
enchant %~item types% with %enchantment types%
[naturally|randomly] enchant %~item types% at level %number%[[,] allowing treasure enchant[ment]s]
disenchant %~item types%
Usage Examples
enchant the player's tool with sharpness 5
enchant the player's tool at level 30
disenchant the player's tool

The cost of enchanting in an enchant event.

This is number that was displayed in the enchantment table, not the actual number of levels removed.


Since 2.5 Return Type

Number

Applicable Events

On Enchant

Syntax Patterns
[the] [displayed] ([e]xp[erience]|enchanting) cost
Usage Examples
on enchant:
send "Cost: %the displayed enchanting cost%" to player

An enchantment, e.g. 'sharpness' or 'fortune'. Unlike enchantment type this type has no level, but you usually don't need to use this type anyway.

NOTE: Minecraft namespaces are supported, ex: 'minecraft:basalt_deltas'.

As of Minecraft 1.21 this will also support custom enchantments using namespaces, ex: 'myenchants:explosive'.


Since 1.4.6
Syntax Patterns
aqua affinity, bane of arthropods, binding curse, blast protection, breach, channeling, channelling, curse of binding, curse of vanishing, density, depth strider, efficiency, feather falling, fire aspect, fire protection, flame, fortune, frost walker, impaling, infinity, knockback, looting, loyalty, luck of the sea, lunge, lure, mending, multi-shot, multishot, piercing, power, projectile protection, protection, punch, quick charge, respiration, riptide, sharpness, silk touch, smite, soul speed, sweeping edge, swift sneak, thorns, unbreaking, vanishing curse, wind burst
Usage Examples

The enchantment bonus in an enchant prepare event. This represents the number of bookshelves affecting/surrounding the enchantment table.


Since 2.5 Return Type

Number

Applicable Events

On Enchant Prepare

Syntax Patterns
[the] enchantment bonus
Usage Examples
on enchant:
send "There are %enchantment bonus% bookshelves surrounding this enchantment table!" to player

The level of a particular enchantment on an item.


Since 2.0 Return Type

Number

Syntax Patterns
[the] [enchant[ment]] level[s] of %enchantments% (on|of) %item types%
[the] %enchantments% [enchant[ment]] level[s] (on|of) %item types%
%item types%'[s] %enchantments% [enchant[ment]] level[s]
%item types%'[s] [enchant[ment]] level[s] of %enchantments%
Usage Examples
player's tool is a sword of sharpness:
message "You have a sword of sharpness %level of sharpness of the player's tool% equipped"

The enchantmentoffer in an enchant prepare event.


Since 2.5
Usage Examples
on enchant prepare:
set enchant offer 1 to sharpness 1
set the cost of enchant offer 1 to 10 levels
1.11 or newer

The enchantment offer in enchant prepare events.


Since 2.5 Return Type

Enchantment Offer

Applicable Events

On Enchant Prepare

Syntax Patterns
[all [of]] [the] enchant[ment] offers
enchant[ment] offer[s] %numbers%
[the] %number%(st|nd|rd|th) enchant[ment] offer
Usage Examples
on enchant prepare:
send "Your enchantment offers are: %the enchantment offers%" to player
1.11 or newer

The cost of an enchantment offer. This is displayed to the right of an enchantment offer.

If the cost is changed, it will always be at least 1.

This changes how many levels are required to enchant, but does not change the number of levels removed.

To change the number of levels removed, use the enchant event.


Since 2.5 Return Type

Number

Syntax Patterns
[the] [enchant[ment]] cost of %enchantment offers%
%enchantment offers%'[s] [enchant[ment]] cost
Usage Examples
set cost of enchantment offer 1 to 50

An enchantment with an optional level, e.g. 'sharpness 2' or 'fortune'.


Since 1.4.6
Syntax Patterns
<enchantment> [<level>]
Usage Examples
enchant the player's tool with sharpness 5
helmet is enchanted with waterbreathing

The ender chest of a player.


Since 2.0 Return Type

Inventory

Syntax Patterns
[the] ender[ ]chest[s] of %players%
%players%'[s] ender[ ]chest[s]
Usage Examples
open the player's ender chest to the player

The block data an enderman is carrying.

Custom attributes such as NBT or names do not transfer over.

Blocks, blockdatas and items are acceptable objects to change the carrying block.


Since 2.11 Return Type

Block Data

Syntax Patterns
[the] carr(ied|ying) block[[ ]data] of %living entities%
%living entities%'[s] carr(ied|ying) block[[ ]data]
Usage Examples
broadcast the carrying blockdata of last spawned enderman
set the carried block of last spawned enderman to an oak log
set the carrying block data of {_enderman} to oak stairs[facing=north]
set the carried blockdata of {_enderman} to {_item}
clear the carried blockdata of {_enderman}

Checks to see if an enderman has been stared at.

This will return true as long as the entity that stared at the enderman is still alive.


Since 2.11
Syntax Patterns
%living entities% (has|have) been stared at
%living entities% (doesn't|does not|do not|don't) have been stared at
Usage Examples
if last spawned enderman has been stared at:
Minecraft 1.20.1+

Make an enderman teleport randomly or towards an entity.

Teleporting towards an entity teleports in the direction to the entity and not to them.


Since 2.11
Syntax Patterns
make %living entities% (randomly teleport|teleport randomly)
force %living entities% to (randomly teleport|teleport randomly)
make %living entities% teleport [randomly] towards %entity%
force %living entities% to teleport [randomly] towards %entity%
Usage Examples
make last spawned enderman teleport randomly
loop 10 times:
make all endermen teleport towards player
MC 1.17+

Enforces or un-enforce a server's whitelist.

All non-whitelisted players will be kicked upon enforcing the whitelist.


Since 2.9.0
Syntax Patterns
[un]enforce [the] [server] white[ ]list
Usage Examples
enforce the whitelist
unenforce the whitelist

All entities in all worlds, in a specific world, in a chunk, in a radius around a certain location or within two locations. e.g. all players, all creepers in the player's world, or players in radius 100 of the player.


Since 1.2.1, 2.5 (chunks), 2.10 (within) Return Type

Entity

Syntax Patterns
[(all [[of] the]|the)] %*entity types% [(in|of) (world[s] %worlds%|%worlds/chunks%)]
[(all [[of] the]|the)] entities of type[s] %entity types% [(in|of) (world[s] %worlds%|%worlds/chunks%)]
[(all [[of] the]|the)] %*entity types% (within|[with]in radius) %number% [(block[s]|met(er|re)[s])] (of|around) %location%
[(all [[of] the]|the)] entities of type[s] %entity types% in radius %number% (of|around) %location%
[(all [[of] the]|the)] %*entity types% within %location% and %location%
[(all [[of] the]|the)] entities of type[s] %entity types% within %location% and %location%
Usage Examples
kill all creepers in the player's world
send "Psst!" to all players within 100 meters of the player
give a diamond to all ops
heal all tamed wolves in radius 2000 around {town center}
delete all monsters in chunk at player
size of all players within {_corner::1} and {_corner::2}}

An entity is something in a world that's not a block, e.g. a player, a skeleton, or a zombie, but also projectiles like arrows, fireballs or thrown potions, or special entities like dropped items, falling blocks or paintings.


Since 1.0
Syntax Patterns
player, op, wolf, tamed ocelot, powered creeper, zombie, unsaddled pig, fireball, arrow, dropped item, item frame, etc.
Usage Examples
entity is a zombie or creeper
player is an op
projectile is an arrow
shoot a fireball from the player

Returns whether an entity has AI.


Since 2.5 Return Type

Boolean

Syntax Patterns
[the] (ai|artificial intelligence) of %living entities%
%living entities%'[s] (ai|artificial intelligence)
Usage Examples
set artificial intelligence of target entity to false

The numerical value of an entity's particular attribute.

Note that the movement speed attribute cannot be reliably used for players. For that purpose, use the speed expression instead.

Resetting an entity's attribute is only available in Minecraft 1.11 and above.


Since 2.5, 2.6.1 (final attribute value) Return Type

Number

Syntax Patterns
[the] %attribute type% [((total|final|modified))] attribute [value] of %entities%
%entities%'[s] %attribute type% [((total|final|modified))] attribute [value]
Usage Examples
on damage of player:
send "You are wounded!" to victim
set victim's attack speed attribute to 2

Make a living entity despawn when the chunk they're located at is unloaded.

Setting a custom name on a living entity automatically makes it not despawnable.

More information on what and when entities despawn can be found at reference.


Since 2.11
Syntax Patterns
make %living entities% despawn[able] (on chunk unload|when far away)
force %living entities% to despawn (on chunk unload|when far away)
prevent %living entities% from despawning [on chunk unload|when far away]
Usage Examples
make all entities not despawnable on chunk unload
spawn zombie at location(0, 0, 0):
force event-entity to not despawn when far away
New

Various entity effects that can be played for entities, like wolf howling, or villager happy.


Since 2.14
Syntax Patterns
hit entity effect, drown damage effect, break chestplate effect, villager angry effect, ravager attack animation, squid rotation reset, firework explode animation, break boots effect, love hearts effect, ocelot distrust effect, reset spawner minecart delay effect, break saddle effect, protected from death effect, ignite tnt minecart animation, hurt berry bush effect (non-functional), fed dolphin effect, zoglin attack animation, iron golem rose animation, cat tame fail effect (non-functional), player bad omen raid effect, sheep eating grass animation, hoglin attack animation, taming succeeded effect, zombie transform sound effect, wolf shake animation, rabbit jump animation, ocelot trust effect, drowning damage effect, ravager roared effect, egg break effect, iron golem attack animation, break body armour effect, ender teleport effect, tipped arrow particles effect, break helmet effect, iron golem sheath animation, honey block fall effect, villager happy effect, snowball break effect, cat tame success effect (non-functional), evoker fang attack animation, fox chew effect, death animation, stop wolf shake animation, witch magic effect, warden sonic attack animation, break body armor effect, honey block slide effect, break main hand effect, damage animation (non-functional), shield break sound effect, armadillo peek animation, projectile crack effect, sniffer dig sound effect, goat lowering head animation, villager sweat effect, break off hand effect, entity attack animation, swap hands effect, entity poof effect, explosion damage effect (non-functional), guardian target sound effect (non-functional), thorns hurt effect (non-functional), warden attack animation, armor stand hit effect, break leggings effect, shield block sound effect, goat raising head animation, spawn in smoke effect, warden tendril shake animation, taming failed effect, stunned ravager effect, creaking shake animation, villager heart effect

How much time an entity will be burning for.


Since 2.7, 2.10 (maximum) Return Type

Timespan

Syntax Patterns
[the] [max[imum]] (burn[ing]|fire) (time|duration) of %entities%
%entities%'[s] [max[imum]] (burn[ing]|fire) (time|duration)
Usage Examples
send "You will stop burning in %fire time of player%"
send the max burn time of target

Checks whether an entity is in rain, lava, water or a bubble column.


Since 2.6.1
Syntax Patterns
%entities% (is|are) in (water|lava|[a] bubble[ ]column|rain)
%entities% (isn't|is not|aren't|are not) in (water|lava|[a] bubble[ ]column|rain)
Usage Examples
if player is in rain:
if player is in water:
player is in lava:
player is in bubble column

Checks whether entities are sheared.


Since 2.8.0
Syntax Patterns
%living entities% (is|are) (sheared|shorn)
%living entities% (isn't|is not|aren't|are not) (sheared|shorn)
Usage Examples
if targeted entity of player is sheared:
send "This entity has nothing left to shear!" to player

Checks whether an entity is wet or not (in water, rain or a bubble column).


Since 2.6.1
Syntax Patterns
%entities% (is|are) wet
%entities% (isn't|is not|aren't|are not) wet
Usage Examples
if player is wet:

The owner of a tameable entity (i.e. horse or wolf).


Since 2.5 Return Type

Offline Player

Syntax Patterns
[the] (owner|tamer) of %living entities%
%living entities%'[s] (owner|tamer)
Usage Examples
set owner of last spawned wolf to player
if the owner of last spawned wolf is player:

Changes the entity size of slimes and phantoms. This is not the same as changing the scale attribute of an entity.

When changing the size of a slime, its health is fully resorted and will have changes done to its max health, movement speed and attack damage.

The default minecraft size of a slime is anywhere between 0 and 2, with a maximum of 126.

The default minecraft size of a phantom is 0 with a maximum size of 64.


Since 2.11 Return Type

Number

Syntax Patterns
[the] entity size of %living entities%
%living entities%'[s] entity size
Usage Examples
spawn a slime at player:
set entity size of event-entity to 5
set name of event-entity to "King Slime Jorg"

Represents a snapshot of an entity's data.

This includes all of the data associated with an entity (its name, health, attributes, etc.), at the time this expression is used. Essentially, these are a way to create templates for entities.

Individual attributes of a snapshot cannot be modified or retrieved.


Since 2.10
Minecraft 1.20.2+

Returns the entity snapshot of a provided entity, which includes all the data associated with it (name, health, attributes, etc.) at the time this expression is used.

Individual attributes of a snapshot cannot be modified or retrieved.


Since 2.10 Return Type

Entity Snapshot

Syntax Patterns
[the] entity snapshot of %entities/entity types%
%entities/entity types%'[s] entity snapshot
Usage Examples
spawn a pig at location(0, 0, 0):
set the max health of entity to 20
set the health of entity to 20
set {_snapshot} to the entity snapshot of entity
clear entity
spawn {_snapshot} at location(0, 0, 0)
Spigot 1.19.2+

Gets the sound that a given entity will make in a specific scenario.


Since 2.10 Return Type

Text

Syntax Patterns
[the] (damage|hurt) sound[s] of %living entities%
%living entities%'[s] (damage|hurt) sound[s]
[the] death sound[s] of %living entities%
%living entities%'[s] death sound[s]
[the] [(tall|high)|(low|normal)] fall damage sound[s] [from [[a] height [of]] %number%] of %living entities%
%living entities%'[s] [(tall|high)|(low|normal)] fall [damage] sound[s] [from [[a] height [of]] %number%]
[the] swim[ming] sound[s] of %living entities%
%living entities%'[s] swim[ming] sound[s]
[the] [(fast|speedy)] splash sound[s] of %living entities%
%living entities%'[s] [(fast|speedy)] splash sound[s]
[the] eat[ing] sound[s] of %living entities% [(with|using|[while] eating [a]) %item type%]
%living entities%'[s] eat[ing] sound[s]
[the] drink[ing] sound[s] of %living entities% [(with|using|[while] drinking [a]) %item type%]
%living entities%'[s] drink[ing] sound[s]
[the] ambient sound[s] of %living entities%
%living entities%'[s] ambient sound[s]
Usage Examples
play sound (hurt sound of player) at player
set {_sounds::*} to death sounds of (all mobs in radius 10 of player)

The current number of entities stored inside an entity block storage (i.e. beehive).

The maximum amount of entities an entity block storage can hold.


Since 2.11 Return Type

Number

Syntax Patterns
[the] [max[imum]] [stored] entity count [of %blocks%]
%blocks%'[s] [max[imum]] [stored] entity count
Usage Examples
broadcast the stored entity count of {_beehive}
set the maximum entity count of {_beehive} to 20

Checks to see if the an entity block storage (i.e beehive) is full.


Since 2.11
Syntax Patterns
[the] entity storage of %blocks% (is|are) full
%blocks%'[s] entity storage (is|are) full
[the] entity storage of %blocks% (isn't|is not|aren't|are not) full
%blocks%'[s] entity storage (isn't|is not|aren't|are not) full
Usage Examples
if the entity storage of {_beehive} is full:
release the entity storage of {_beehive}

The type of an entity, e.g. player, wolf, powered creeper, etc.


Since 1.3
Syntax Patterns
<i>Detailed usage will be added eventually</i>
Usage Examples
victim is a cow
spawn a creeper

An entity type with an amount, e.g. '2 zombies'. I might remove this type in the future and make a more general 'type' type, i.e. a type that has a number and a type.


Since 1.3
Syntax Patterns
&lt;<a href='#number'>number</a>&gt; &lt;entity type&gt;
Usage Examples
spawn 5 creepers behind the player
Minecraft 1.19+ (entities)

Change visibility of the given entities for the given players.

If no players are given, will hide the entities from all online players.

When reveal is used in combination of the hidden players expression and the viewers are not specified, this will default it to the given player in the hidden players expression.

Note: all previously hidden entities (including players) will be visible when a player leaves and rejoins.


Since 2.3, 2.10 (entities)
Syntax Patterns
hide %entities% [(from|for) %players%]
reveal %entities% [(to|for|from) %players%]
Usage Examples
on spawn:
if event-entity is a chicken:
hide event-entity
reveal hidden players of players

Get an entity, player, offline player or world from a UUID.

Unloaded entities or players that are offline (when using 'player from %uuid%') will return nothing.


Since 2.11 Return Type

Object

Syntax Patterns
[offline[ ]]player[s] from %uuids%
entit(y|ies) from %uuids%
world[s] from %uuids%
Usage Examples
set {_player} to player from "a0789aeb-7b46-43f6-86fb-cb671fed5775" parsed as uuid
set {_offline player} to offline player from {_some uuid}
set {_entity} to entity from {_some uuid}
set {_world} to world from {_some uuid}

Equips or unequips an entity with the given itemtypes (usually armor).

This effect will replace any armor that the entity is already wearing.


Since 1.0, 2.7 (multiple entities, unequip), 2.10 (wolves), 2.12.1 (happy ghasts)
Syntax Patterns
equip [%living entities%] with %item types%
make %living entities% wear %item types%
unequip %item types% [from %living entities%]
unequip %living entities%'[s] (armo[u]r|equipment)
Usage Examples
equip player with diamond helmet
equip player with diamond leggings, diamond chestplate, and diamond boots
unequip diamond chestplate from player
unequip player's armor

Represents an equipment slot of an entity.


Since 2.11
Syntax Patterns
feet, chestplate slot, saddle slot, body slots, body armors, boots slot, body slot, leggings slots, off hand slot, helmet slots, legs slot, legs, body armour slots, body armor slot, body armor slots, leggings, helmets, chestplates, hand slot, body armour slot, helmet slot, boots slots, chest slots, tool slot, main hand slots, off hand slots, main hands, head slot, saddle slots, head slots, feet slots, shoes slot, hand slots, chestplate slots, helmet, body armours, boots, legs slots, off haands, chest slot, off hand, main hand slot, feet slot, leggings slot, shoes, chestplate, tool slots, body armor, main hand, body armour
Minecraft 1.21.2+

The equippable component of an item. Any changes made to the equippable component will be present on the item. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.


Since 2.13 Return Type

Equippable Components

Syntax Patterns
[the] equippable component[s] of %slots/item types%
%slots/item types%'[s] equippable component[s]
Usage Examples
set {_component} to the equippable component of {_item}
set the equipment slot of {_component} to helmet slot
clear the equippable component of {_item}
reset the equippable component of {_item}

Expression Equippable Component - Allowed Entities

Section titled “ Expression Equippable Component - Allowed Entities”
Minecraft 1.21.2+

The entities allowed to wear the item. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.


Since 2.13 Return Type

Entity Type

Syntax Patterns
[the] allowed entities [of %equippable components%]
%equippable components%'[s] allowed entities
Usage Examples
set the allowed entities of {_item} to a zombie and a skeleton
set {_component} to the equippable component of {_item}
clear the allowed entities of {_component}

Expression Equippable Component - Camera Overlay

Section titled “ Expression Equippable Component - Camera Overlay”
Minecraft 1.21.2+

The camera overlay for the player when the item is equipped. Example: The jack-o'-lantern view when having a jack-o'-lantern equipped as a helmet. The camera overlay is represented as a namespaced key. A namespaced key can be formatted as 'namespace:id' or 'id'. It can only contain one ':' to separate the namespace and the id. Only alphanumeric characters, periods, underscores, and dashes can be used. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.


Since 2.13 Return Type

Text

Syntax Patterns
[the] camera overlay [of %equippable components%]
%equippable components%'[s] camera overlay
Usage Examples
set the camera overlay of {_item} to "custom_overlay"
set {_component} to the equippable component of {_item}
set the camera overlay of {_component} to "custom_overlay"

Condition Equippable Component - Can Be Dispensed

Section titled “ Condition Equippable Component - Can Be Dispensed”
Minecraft 1.21.2+

Whether an item can be dispensed by a dispenser. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.


Since 2.13
Syntax Patterns
%equippable components% can be dispensed
%equippable components% (can't|cannot|can not) be dispensed
%equippable components% (is|are) (able to be dispensed|dispensable)
%equippable components% (isn't|is not|aren't|are not) (able to be dispensed|dispensable)
Usage Examples
if {_item} can be dispensed:
add "Dispensable" to lore of {_item}
set {_component} to the equippable component of {_item}
if {_component} is not able to be dispensed:
allow {_component} to be dispensed

Condition Equippable Component - Can Be Sheared Off

Section titled “ Condition Equippable Component - Can Be Sheared Off”
Minecraft 1.21.6+

Whether an item can be sheared off of an entity. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.


Since 2.13
Syntax Patterns
%equippable components% can be sheared off [of entities]
%equippable components% (can't|cannot|can not) be sheared off [of entities]
Usage Examples
if {_item} can be sheared off:
add "Shearable" to lore of {_item}
set {_component} to the equippable component of {_item}
if {_component} can not be sheared off:
allow {_component} to be sheared off

Condition Equippable Component - Can Equip On Entities

Section titled “ Condition Equippable Component - Can Equip On Entities”
Minecraft 1.21.5+

Whether an entity should equip the item when right clicking on the entity with the item. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.


Since 2.13
Syntax Patterns
%equippable components% can be (equipped|put) on[to] entities
%equippable components% (can't|cannot|can not) be (equipped|put) on[to] entities
Usage Examples
if {_item} can be equipped on entities:

Condition Equippable Component - Can Swap Equipment

Section titled “ Condition Equippable Component - Can Swap Equipment”
Minecraft 1.21.2+

Whether an item can swap equipment by right clicking with it in your hand. The item will swap places of the set 'equipment slot' of the item. If an equipment slot is not set, defaults to helmet. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work aas intended.


Since 2.13
Syntax Patterns
%equippable components% can swap equipment [on right click|when right clicked]
%equippable components% (can't|cannot|can not) swap equipment [on right click|when right clicked]
Usage Examples
if {_item} can swap equipment:
add "Swappable" to lore of {_item}
set {_component} to the equippable component of {_item}
if {_component} can not be equipped when right clicked:
make {_component} swappable
Minecraft 1.21.2+

Whether the item can be dispensed by a dispenser. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.


Since 2.13
Syntax Patterns
allow %equippable components% to be dispensed
make %equippable components% dispensable
let %equippable components% be dispensed
(block|prevent|disallow) %equippable components% from being dispensed
make %equippable components% not dispensable
Usage Examples
allow {_item} to be dispensed
set {_component} to the equippable component of {_item}
prevent {_component} from being dispensed

Effect Equippable Component - Equip On Entities

Section titled “ Effect Equippable Component - Equip On Entities”
Minecraft 1.21.5+

Whether an entity should equip the item when right clicking on the entity with the item. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.


Since 2.13
Syntax Patterns
allow %equippable components% to be equipped on[to] entities
make %equippable components% equippable on[to] entities
let %equippable components% be equipped on[to] entities
(block|prevent|disallow) %equippable components% from being equipped on[to] entities
make %equippable components% not equippable on[to] entities
Usage Examples
allow {_item} to be equipped onto entities

Expression Equippable Component - Equip Sound

Section titled “ Expression Equippable Component - Equip Sound”
Minecraft 1.21.2+

The sound to be played when the item is equipped. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.


Since 2.13 Return Type

Text

Syntax Patterns
[the] equip sound [of %equippable components%]
%equippable components%'[s] equip sound
Usage Examples
set the equip sound of {_item} to "entity.experience_orb.pickup"
set {_component} to the equippable component of {_item}
set the equip sound of {_component} to "block.note_block.pling"

Expression Equippable Component - Equipment Slot

Section titled “ Expression Equippable Component - Equipment Slot”
Minecraft 1.21.2+

The equipment slot an item can be equipped to. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.


Since 2.13 Return Type

Equipment Slot

Syntax Patterns
[the] equipment slot [of %equippable components%]
%equippable components%'[s] equipment slot
Usage Examples
set the equipment slot of {_item} to chest slot
set {_component} to the equippable component of {_item}
set the equipment slot of {_component} to boots slot

Effect Equippable Component - Lose Durability

Section titled “ Effect Equippable Component - Lose Durability”
Minecraft 1.21.2+

Whether the item should take damage when the wearer gets injured. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.


Since 2.13
Syntax Patterns
(make|let) %equippable components% (lose durability|be damaged) (on [wearer['s]] injury|when [[the] wearer [is]] (hurt|injured|damaged))
(allow|force) %equippable components% to (lose durability|be damaged) (on [wearer['s]] injury|when [[the] wearer [is]] (hurt|injured|damaged))
make %equippable components% not (lose durability|be damaged) (on [wearer['s]] injury|when [[the] wearer [is]] (hurt|injured|damaged))
(disallow|prevent) %equippable components% from (lose durability|being damaged) (on [wearer['s]] injury|when [[the] wearer [is]] (hurt|injured|damaged))
Usage Examples
make {_item} lose durability when hurt
set {_component} to the equippable component of {_item}
if {_component} will lose durability when injured:
make {_component} lose durability on injury
Minecraft 1.21.2+

The model of the item when equipped. The model key is represented as a namespaced key. A namespaced key can be formatted as 'namespace:id' or 'id'. It can only contain one ':' to separate the namespace and the id. Only alphanumeric characters, periods, underscores, and dashes can be used. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.


Since 2.13 Return Type

Text

Syntax Patterns
[the] equipped (model|asset) (key|id) [of %equippable components%]
%equippable components%'[s] equipped (model|asset) (key|id)
Usage Examples
set the equipped model key of {_item} to "custom_model"
set {_component} to the equippable component of {_item}
set the equipped model id of {_component} to "custom_model"
Minecraft 1.21.6+

Whether the item can be sheared off of entities. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.


Since 2.13
Syntax Patterns
allow %equippable components% to be sheared off [of entities]
(disallow|prevent) %equippable components% from being sheared off [of entities]
Usage Examples
allow {_item} to be sheared off
set {_component} to the equippable component of {_item}
if {_component} can be sheared off of entities:
prevent {_component} from being sheared off of entities

Expression Equippable Component - Shear Sound

Section titled “ Expression Equippable Component - Shear Sound”
Minecraft 1.21.6+

The sound to be played when the item is sheared off of an entity. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.


Since 2.13 Return Type

Text

Syntax Patterns
[the] shear[ed [off]] sound [of %equippable components%]
%equippable components%'[s] shear[ed [off]] sound
Usage Examples
set the shear sound of {_item} to "entity.experience_orb.pickup"
set {_component} to the equippable component of {_item}
set the shear sound of {_component} to "block.note_block.pling"

Effect Equippable Component - Swap Equipment

Section titled “ Effect Equippable Component - Swap Equipment”
Minecraft 1.21.2+

Whether the item can be swapped by right clicking with it in your hand. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.


Since 2.13
Syntax Patterns
(allow|force) %equippable components% to swap equipment [on right click|when right clicked]
(make|let) %equippable components% swap equipment [on right click|when right clicked]
(block|prevent|disallow) %equippable components% from swapping equipment [on right click|when right clicked]
make %equippable components% not swap equipment [on right click|when right clicked]
Usage Examples
allow {_item} to swap equipment
set {_component} to the equippable component of {_item}
prevent {_component} from swapping equipment on right click

Condition Equippable Component - Will Lose Durability

Section titled “ Condition Equippable Component - Will Lose Durability”
Minecraft 1.21.2+

Whether an item will be damaged when the wearer gets injured. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.


Since 2.13
Syntax Patterns
%equippable components% will (lose durability|be damaged) (on [wearer['s]] injury|when [[the] wearer [is]] (hurt|injured|damaged))
%equippable components% (will not|won't) (lose durability|be damaged) (on [wearer['s]] injury|when [[the] wearer [is]] (hurt|injured|damaged))
Usage Examples
if {_item} will lose durability when hurt:
add "Damageable on injury" to lore of {_item}
set {_component} to the equippable component of {_item}
if {_component} won't lose durability on injury:
make {_component} lose durability when injured
Minecraft 1.21.2+

Represents an equippable component used for items. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.


Since 2.13

The structure used for listening to events. Optionally allows specifying whether to listen to events that have been cancelled, and allows specifying with which priority to listen to events. Events are called in the following order of priorities. ``` lowest -> low -> normal -> high -> highest -> monitor ``` Modifying event-values or cancelling events is not supported when using the 'monitor' priority. It should only be used for monitoring the outcome of an event.


Since 1.0, 2.6 (per-event priority), 2.9 (listening to cancellable events)
Syntax Patterns
[on] [uncancelled|cancelled|(any|all)] <.+> [with priority ((lowest|low|normal|high|highest|monitor))]
Usage Examples
on load:
broadcast "loading!"
on join:
if {first-join::%player's uuid%} is not set:
set {first-join::%player's uuid%} to now
cancelled block break:
send "<red>You can't break that here" to player
on join with priority lowest:
# called first
on join:
# called second
on join with priority highest:
# called last

Checks whether or not the event is cancelled.


Since 2.2-dev36
Syntax Patterns
[the] event is cancel[l]ed
[the] event (is not|isn't) cancel[l]ed
Usage Examples
on click:
if event is cancelled:
broadcast "no clicks allowed!"

Get an exact item representation of a block, carrying over any data. For example, using this expression on a chest block with items stored inside will return a chest item with the exact same items in its inventory as the chest block.


Since 2.12 Return Type

Item

Syntax Patterns
[the] exact item[s] of %blocks%
%blocks%'[s] exact item[s]
Usage Examples
set {_item} to exact item of block at location(0, 0, 0)

Filter a list by providing objects to be excluded.


Since 2.12 Return Type

Object

Syntax Patterns
%objects% (except|excluding|not including) %objects%
Usage Examples
spawn zombie at location(0, 0, 0):
hide entity from all players except {_player}
set {_items::*} to a copper ingot, an iron ingot and a gold ingot
set {_except::*} to {_items::*} excluding copper ingot

Something that can be executed (run) and may accept arguments, e.g. a function.

This may also return a result.


Since 2.10
Usage Examples
run {_function} with arguments 1 and true

The exhaustion of a player. This is mainly used to determine the rate of hunger depletion.


Since 2.2-dev35 Return Type

Number

Syntax Patterns
[the] exhaustion of %players%
%players%'[s] exhaustion
Usage Examples
set exhaustion of all players to 1

Checks whether a given expression or variable is set.


Since 1.2
Syntax Patterns
%~objects% (exist[s]|(is|are) set)
%~objects% (do[es](n't| not) exist|(is|are)(n't| not) set)
Usage Examples
{teams::%player's uuid%::preferred-team} is not set
on damage:
projectile exists
broadcast "%attacker% used a %projectile% to attack %victim%!"

Exits a given amount of loops and conditionals, or the entire trigger.


Since unknown (before 2.1)
Syntax Patterns
(exit|stop) [trigger]
(exit|stop) [1|a|the|this] (section|loop|conditional)
(exit|stop) <-?\d+(_\d+)*> (section|loop|conditional)s
(exit|stop) all (section|loop|conditional)s
Usage Examples
loop blocks above the player:
loop-block is not air:
exit 2 sections
set loop-block to water

The exponential function. You probably don't need this if you don't know what this is.


Since 2.2 Return Type

Number

Syntax Patterns
exp(n: number)
Usage Examples
exp(0) = 1
exp(1) = 2.7183

Expand or shrink the size of a world border.

Using `by` adds/subtracts from the current size of the world border.

Using `to` sets to the specified size.


Since 2.11
Syntax Patterns
(expand|grow) [[the] (diameter|radius) of] %worldborders% (by|to) %number% [over [a period of] %time span%]
(expand|grow) %worldborders%['s (diameter|radius)] (by|to) %number% [over [a period of] %time span%]
(contract|shrink) [[the] (diameter|radius) of] %worldborders% (by|to) %number% [over [a period of] %time span%]
(contract|shrink) %worldborders%['s (diameter|radius)] (by|to) %number% [over [a period of] %time span%]
Usage Examples
expand world border of player by 100 over 5 seconds
shrink world border of world "world" to 100 over 10 seconds

Experience points. Please note that Bukkit only allows to give XP, but not remove XP from players. You can however change a player's level and level progress freely.


Since 2.0
Syntax Patterns
[<number>] ([e]xp|experience [point[s]])
Usage Examples
give 10 xp to the player

How much experience was spawned in an experience spawn or block break event. Can be changed.


Since 2.1, 2.5.3 (block break event), 2.7 (experience change event), 2.10 (breeding, fishing) Return Type

Experience

Applicable Events

On Experience Spawn

On Break / Mine

On Experience Change

On Entity Breed

Syntax Patterns
[the] [(spawned|dropped)] [e]xp[erience] [orb[s]]
Usage Examples
on experience spawn:
add 5 to the spawned experience
on break of coal ore:
clear dropped experience
on break of diamond ore:
if tool of player = diamond pickaxe:
add 100 to dropped experience
on breed:
breeding father is a cow
set dropped experience to 10
on fish catch:
add 70 to dropped experience

Represents a change reason of an experience cooldown change event.


Since 2.10
Syntax Patterns
plugin, pickup orb, orb pickup

Expression Experience Cooldown Change Reason

Section titled “ Expression Experience Cooldown Change Reason”

The experience change reason within an experience cooldown change event.


Since 2.10 Return Type

Experience Cooldown Change Reason

Syntax Patterns
[the] (experience|[e]xp) cooldown change (reason|cause|type)
Usage Examples
on player experience cooldown change:
if xp cooldown change reason is plugin:
#Changed by a plugin
else if xp cooldown change reason is orb pickup:
#Changed by picking up xp orb

The experience cooldown of a player.

Experience cooldown is how long until a player can pick up another orb of experience.

The cooldown of a player must be 0 to pick up another orb of experience.


Since 2.10 Return Type

Timespan

Syntax Patterns
[the] (experience|[e]xp) [pickup|collection] cooldown of %players%
%players%'[s] (experience|[e]xp) [pickup|collection] cooldown
Usage Examples
send experience cooldown of player
set the xp pickup cooldown of player to 1 hour
if exp collection cooldown of player >= 10 minutes:
clear the experience pickup cooldown of player

Starts the explosion process of a creeper or instantly explodes it.


Since 2.5
Syntax Patterns
instantly explode [creeper[s]] %living entities%
explode [creeper[s]] %living entities% instantly
ignite creeper[s] %living entities%
start (ignition|explosion) [process] of [creeper[s]] %living entities%
stop (ignition|explosion) [process] of [creeper[s]] %living entities%
Usage Examples
start explosion of the last spawned creeper
stop ignition of the last spawned creeper

Get all the blocks that were destroyed in an explode event. Supports add/remove/set/clear/delete blocks.


Since 2.5, 2.8.6 (modify blocks) Return Type

Block

Applicable Events

On Explode

Syntax Patterns
[the] exploded blocks
Usage Examples
on explode:
loop exploded blocks:
add loop-block to {exploded::blocks::*}
on explode:
loop exploded blocks:
if loop-block is grass:
remove loop-block from exploded blocks
on explode:
clear exploded blocks
on explode:
set exploded blocks to blocks in radius 10 around event-entity
on explode:
add blocks above event-entity to exploded blocks

Creates an explosion of a given force. The Minecraft Wiki has an article on explosions which lists the explosion forces of TNT, creepers, etc.

Hint: use a force of 0 to create a fake explosion that does no damage whatsoever, or use the explosion effect introduced in Skript 2.0.

Starting with Bukkit 1.4.5 and Skript 2.0 you can use safe explosions which will damage entities but won't destroy any blocks.


Since 1.0
Syntax Patterns
[(create|make)] [an] explosion (of|with) (force|strength|power) %number% [%directions% %locations%] [with fire]
[(create|make)] [a] safe explosion (of|with) (force|strength|power) %number% [%directions% %locations%]
[(create|make)] [a] fake explosion [%directions% %locations%]
[(create|make)] [an] explosion[ ]effect [%directions% %locations%]
Usage Examples
create an explosion of force 10 at the player
create an explosion of force 0 at the victim

The percentage of exploded blocks dropped in an explosion event.

When changing the yield, a value greater than 1 will function the same as using 1.

Attempting to change the yield to a value less than 0 will have no effect.


Since 2.5 Return Type

Number

Applicable Events

On Explode

Syntax Patterns
[the] [explosion['s]] block (yield|amount)
[the] percentage of blocks dropped
Usage Examples
on explode:
set the explosion's block yield to 10%

The yield of the explosion in an explosion prime event. This is how big the explosion is.

When changing the yield, values less than 0 will be ignored.

Read this wiki page for more information


Since 2.5 Return Type

Number

Applicable Events

On Explosion Prime

Syntax Patterns
[the] explosion (yield|radius|size)
[the] (yield|radius|size) of [the] explosion
Usage Examples
on explosion prime:
set the yield of the explosion to 10

The yield of an explosive (creeper, ghast, primed tnt, fireball, etc.). This is how big of an explosion is caused by the entity.

Read this wiki page for more information.

The yield of ghasts can only be set to between 0 and 127.


Since 2.5, 2.11 (ghasts) Return Type

Number

Syntax Patterns
[the] explosive (yield|radius|size|power) of %entities%
%entities%'[s] explosive (yield|radius|size|power)
Usage Examples
on spawn of a creeper:
set the explosive yield of the event-entity to 10

The facing of an entity or block, i.e. exactly north, south, east, west, up or down (unlike direction which is the exact direction, e.g. '0.5 south and 0.7 east')


Since 1.4 Return Type

Direction

Syntax Patterns
[the] [(horizontal)] facing of %living entities/blocks%
%living entities/blocks%'[s] [(horizontal)] facing
Usage Examples
# makes a bridge
loop blocks from the block below the player in the horizontal facing of the player:
set loop-block to cobblestone

Get the factorial of a number.

Getting the factorial of any number above 21 will return an approximation, not an exact value.

Any number after 170 will always return Infinity.

Should not be used to calculate permutations or combinations manually.


Since 2.11 Return Type

Number

Syntax Patterns
factorial(number: number)
Usage Examples
factorial(0) = 1
factorial(3) = 3*2*1 = 6
factorial(5) = 5*4*3*2*1 = 120
factorial(171) = Infinity

The distance an entity has fallen for.


Since 2.5 Return Type

Number

Syntax Patterns
[the] fall[en] (distance|height) of %entities%
%entities%'[s] fall[en] (distance|height)
Usage Examples
set all entities' fall distance to 10
on damage:
send "%victim's fall distance%" to victim

Feeds the specified players.


Since 2.2-dev34
Syntax Patterns
feed [the] %players% [by %number% [beef[s]]]
Usage Examples
feed all players
feed the player by 5 beefs
Minecraft 1.13 or newer

The blocks fertilized in block fertilize events.


Since 2.5 Return Type

Block

Applicable Events

On Block Fertilize

Syntax Patterns
[all] [the] fertilized blocks
Usage Examples
the fertilized blocks

Filters a variable list based on the supplied conditions. Unlike the filter expression, this effect maintains the indices of the filtered list.

It also supports filtering based on meeting any of the given criteria, rather than all, like multi-line if statements.


Since 2.10
Syntax Patterns
filter %~objects% to match [any|all]
Usage Examples
set {_a::*} to integers between -10 and 10
filter {_a::*} to match:
input is a number
mod(input, 2) = 0
input > 0
send {_a::*} # sends 2, 4, 6, 8, and 10

Filters a list based on a condition.

For example, if you ran 'broadcast "something" and "something else" where [string input is "something"]',

only "something" would be broadcast as it is the only string that matched the condition.


Since 2.2-dev36, 2.10 (parenthesis pattern) Return Type

Object

Syntax Patterns
%objects% (where|that match) \[<.+>\]
%objects% (where|that match) \(<.+>\)
Usage Examples
send "congrats on being staff!" to all players where [player input has permission "staff"]
loop (all blocks in radius 5 of player) where [block input is not air]:

How much damage is done in a damage event, considering all types of damage reduction. Can NOT be changed.


Since 2.2-dev19 Return Type

Number

Applicable Events

On Damage

Syntax Patterns
[the] final damage
Usage Examples
send "%final damage%" to victim

A configuration of effects that defines the firework when exploded

which can be used in the launch firework effect.

See the firework effect expression for detailed patterns.


Since 2.4
Syntax Patterns
See <a href='/#FireworkType'>Firework Types</a>
Usage Examples
launch flickering trailing burst firework colored blue and green at player
launch trailing flickering star colored purple, yellow, blue, green and red fading to pink at target entity
launch ball large colored red, purple and white fading to light green and black at player's location with duration 1

Represents a 'firework effect' which can be used in the launch firework effect.


Since 2.4 Return Type

Firework Effect

Syntax Patterns
[(flickering|trailing|flickering trailing|trailing flickering)] %firework type% [firework [effect]] colo[u]red %colors%
[(flickering|trailing|flickering trailing|trailing flickering)] %firework type% [firework [effect]] colo[u]red %colors% fad(e|ing) [to] %colors%
Usage Examples
launch flickering trailing burst firework colored blue and green at player
launch trailing flickering star colored purple, yellow, blue, green and red fading to pink at target entity
launch ball large colored red, purple and white fading to light green and black at player's location with duration 1

The type of a fireworkeffect.


Since 2.4
Syntax Patterns
small, ball, star shaped, large, star, creeper face, small ball, large ball, burst, ball large, creeper

Returns the first empty slot in an inventory. If no empty slot is found, it returns nothing.


Since 2.12 Return Type

Slot

Syntax Patterns
[the] first empty slot[s] of %inventories%
%inventories%'[s] first empty slot[s]
[the] first empty slot[s] in %inventories%
Usage Examples
set the first empty slot in player's inventory to 5 diamonds
if the first empty slot in player's inventory is not set:
message "No empty slot available in your inventory!" to player

Returns the angle at which the fish will approach the fishing hook, after the wait time.

The angle is in degrees, with 0 being positive Z, 90 being negative X, 180 being negative Z, and 270 being positive X.

By default, returns a value between 0 and 360 degrees.


Since 2.10 Return Type

Number

Applicable Events

On Fishing

Syntax Patterns
(min[imum]|max[imum]) fish[ing] approach[ing] angle
Usage Examples
on fish approach:
if any:
maximum fishing approach angle is bigger than 300.5 degrees
min fishing approach angle is smaller than 59.5 degrees
then:
cancel event
Minecraft 1.20.6

Returns the time it takes a fish to bite the fishing hook, after it started approaching the hook.

May return a timespan of 0 seconds. If modifying the value, it should be at least 1 tick.


Since 2.10 Return Type

Timespan

Applicable Events

On Fishing

Syntax Patterns
fish[ing] bit(e|ing) [wait] time
Usage Examples
on fish approach:
set fishing bite time to 5 seconds

The fishing hook in a fishing event.


Since 2.10 Return Type

Entity

Applicable Events

On Fishing

Syntax Patterns
[the] fish[ing] (hook|bobber)
Usage Examples
on fish line cast:
wait a second
teleport player to fishing hook

Returns the hooked entity in the hooked event.


Since 2.10 Return Type

Entity

Applicable Events

On Fishing

Syntax Patterns
hook[ed] entity
Usage Examples
on entity hooked:
if hooked entity is a player:
teleport hooked entity to player

Checks if the lure enchantment is applied to the current fishing event.


Since 2.10 Applicable Events

On Fishing

Syntax Patterns
lure enchantment bonus is (applied|active)
lure enchantment bonus is(n't| not) (applied|active)
Usage Examples
on fishing line cast:
if lure enchantment bonus is applied:
cancel event

Represents the different states of a fishing event.


Since 2.11
Syntax Patterns
lured, bobber in ground, fish escaped, entity caught, fishing, fish lured, fishing rod cast, reel in, caught fish, caught entity, fishing line cast, fish escape, fish bite, bite, rod cast, in ground, failed attempt, fish caught

Returns the minimum and/or maximum waiting time of the fishing hook.

Default minimum value is 5 seconds and maximum is 30 seconds, before lure is applied.


Since 2.10 Return Type

Timespan

Applicable Events

On Fishing

Syntax Patterns
(min[imum]|max[imum]) fish[ing] wait[ing] time
Usage Examples
on fishing line cast:
set min fish waiting time to 10 seconds
set max fishing waiting time to 20 seconds

Whether the player(s) are allowed to fly. Use Make Fly effect to force player(s) to fly.


Since 2.2-dev34 Return Type

Boolean

Syntax Patterns
[the] fl(y[ing]|ight) (mode|state) of %players%
%players%'[s] fl(y[ing]|ight) (mode|state)
Usage Examples
set flight mode of player to true
send "%flying state of all players%"

Rounds a number down, i.e. returns the closest integer smaller than or equal to the argument.


Since 2.2 Return Type

Syntax Patterns
floor(n: number)
Usage Examples
floor(2.34) = 2
floor(2) = 2
floor(2.99) = 2

The food level of a player from 0 to 10. Has several aliases: food/hunger level/meter/bar.


Since 1.0 Return Type

Number

Syntax Patterns
[the] (food|hunger)[[ ](level|met(er|re)|bar)] [of %players%]
%players%'[s] (food|hunger)[[ ](level|met(er|re)|bar)]
Usage Examples
set the player's food level to 10
New

A specialised loop section run for each element in a list. Unlike the basic loop, this is designed for extracting the key & value from pairs. The loop element's key/index and value can be stored in a variable for convenience. When looping a simple (non-indexed) set of values, e.g. all players, the index will be the loop counter number.


Since 2.10, 2.14 (stable release)
Syntax Patterns
(for [each]|loop) [value] %~object% in %objects%
(for [each]|loop) (key|index) %~object% in %objects%
(for [each]|loop) [key|index] %~object%(,| and) [value] %~object% in %objects%
Usage Examples
for each {_player} in players:
send "Hello %{_player}%!" to {_player}
loop {_item} in {list of items::*}:
broadcast {_item}'s name
for each key {_index} in {list of items::*}:
broadcast {_index}
loop key {_index} and value {_value} in {list of items::*}:
broadcast "%{_index}% = %{_value}%"
for each {_index}, {_value} in {my list::*}:
broadcast "%{_index}% = %{_value}%"
Minecraft 1.15.2+

Makes a living entity attack an entity with a melee attack.

Using 'attack' will make the attacker use the item in their main hand and will apply extra data from the item, including enchantments and attributes.

Using 'damage' with a number of hearts will not account for the item in the main hand and will always be the number provided.


Since 2.5.1, 2.13 (multiple, amount)
Syntax Patterns
make %living entities% attack %entities%
force %living entities% to attack %entities%
make %living entities% damage %entities% by %number% [heart[s]]
force %living entities% to damage %entities% by %number% [heart[s]]
Usage Examples
spawn a wolf at location(0, 0, 0)
make last spawned wolf attack all players
spawn a zombie at location(0, 0, 0)
make player damage last spawned zombie by 2

Make a panda or horse type (horse, camel, donkey, llama, mule) start/stop eating.


Since 2.11
Syntax Patterns
make %living entities% (start|stop) eating
force %living entities% to (start|stop) eating
Usage Examples
if last spawned panda is eating:
make last spawned panda stop eating
Spigot 1.20.5+

Forces the items to glint or not, or removes its existing enchantment glint enforcement.


Since 2.10
Syntax Patterns
(force|make) %item types% [to] [start] glint[ing]
(force|make) %item types% [to] (not|stop) glint[ing]
(clear|delete|reset) [the] enchantment glint override of %item types%
(clear|delete|reset) %item types%'s enchantment glint override
Usage Examples
force {_items::*} to glint
force the player's tool to stop glinting

Make a panda get on/off its back.


Since 2.11
Syntax Patterns
make %living entities% get (on|off) (its|their) back[s]
force %living entities% to get (on|off) (its|their) back[s]
Usage Examples
if last spawned panda is on its back:
make last spawned panda get off its back

Forces player(s) to respawn if they are dead. If this is called without delay from death event, one tick is waited before respawn attempt.


Since 2.2-dev21
Syntax Patterns
force %players% to respawn
Usage Examples
on death of player:
force event-player to respawn

Converts numbers to human-readable format. By default, '###,###' (e.g. '123,456,789') will be used for whole numbers and '###,###.##' (e.g. '123,456,789.00) will be used for decimal numbers. A hashtag '#' represents a digit, a comma ',' is used to separate numbers, and a period '.' is used for decimals.

Will return none if the format is invalid.

For further reference, see this article.


Since 2.10 Return Type

Text

Syntax Patterns
formatNumber(number: number, format: string = )
Usage Examples
command /balance:
aliases: bal
executable by: players
trigger:
set {_money} to formatNumber({money::%sender's uuid%})
send "Your balance: %{_money}%" to sender

Converts date to human-readable text format. By default, 'yyyy-MM-dd HH:mm:ss z' (e.g. '2018-03-30 16:03:12 +01') will be used. For reference, see this Wikipedia article.


Since 2.2-dev31, 2.7 (support variables in format) Return Type

Text

Syntax Patterns
%dates% formatted [human-readable] [(with|as) %text%]
[human-readable] formatted %dates% [(with|as) %text%]
Usage Examples
command /date:
trigger:
send "Full date: %now formatted human-readable%" to sender
send "Short date: %now formatted as "yyyy-MM-dd"%" to sender

Represents the value of an expression before an event happened or the value it will have directly after the event, e.g. the old or new level respectively in a level change event.

Note: The past, future and present states of an expression are sometimes called 'time states' of an expression.

Note 2: If you don't specify whether to use the past or future state of an expression that has different values, its default value will be used which is usually the value after the event.


Since 1.1 Return Type

Object

Syntax Patterns
[the] (former|past|old) [state] [of] %~objects%
%~objects% before [the event]
[the] (future|to-be|new) [state] [of] %~objects%
%~objects%(-to-be| after[(wards| the event)])
Usage Examples
on teleport:
former world was "world_nether" # or 'world was'
world will be "world" # or 'world after the event is'
on tool change:
past tool is an axe
the tool after the event will be air
on weather change:
set {weather::%world%::old} to past weather
set {weather::%world%::current} to the new weather

The free, max or total memory of the server in Megabytes.


Since 2.8.0 Return Type

Number

Syntax Patterns
[the] [server] (free|max[imum]|total) (memory|ram)
Usage Examples
while player is online:
send action bar "Memory left: %free memory%/%max memory%MB" to player
wait 5 ticks

How much time an entity has been in powdered snow for.


Since 2.7 Return Type

Timespan

Syntax Patterns
[the] freeze time of %entities%
%entities%'[s] freeze time
Usage Examples
player's freeze time is less than 3 seconds:
send "you're about to freeze!" to the player

Represents the variant of a frog entity.

NOTE: Minecraft namespaces are supported, ex: 'minecraft:warm'.


Since 2.13
Syntax Patterns
cold, temperate, warm
New

Turns a text version of a number in a specific base (decimal, hexadecimal, octal) into an actual number. For example, converting "20" in hexadecimal (base 16) would be 'fromBase("20", 16)', which would return 32. You can use any base between 2 and 36.


Since 2.14 Return Type

Syntax Patterns
fromBase(string value: objects, base: integer between 2 and 36)
Usage Examples
# /binaryText 01110011 01101011 01110010 01101001 01110000 01110100 00100001
# sends "skript!"
command binaryText <text>:
trigger:
set {_characters::*} to argument split at " " without trailing empty string
transform {_characters::*} with fromBase(input, 2) # convert to codepoints
transform {_characters::*} with character from codepoint input # convert to characters
send join {_characters::*}

A function loaded by Skript.

This can be executed (with arguments) and may return a result.


Since 2.10
Usage Examples
run {_function} with arguments 1 and true
set {_result} to the result of {_function}

Functions are structures that can be executed with arguments/parameters to run code.

They can also return a value to the trigger that is executing the function.

Note that local functions come before global functions execution


Since 2.2, 2.7 (local functions)
Syntax Patterns
[local] function <.+>
Usage Examples
function sayMessage(message: text):
broadcast {_message} # our message argument is available in '{_message}'
local function giveApple(amount: number) :: item:
return {_amount} of apple
function getPoints(p: player) returns number:
return {points::%{_p}%}

Obtain a function by name, which can be executed.


Since 2.10 Return Type

Function

Syntax Patterns
[the|a] function [named] %text% [(in|from) %script%]
[the] functions [named] %texts% [(in|from) %script%]
[all [[of] the]|the] functions (in|from) %script%
Usage Examples
set {_function} to the function named "myFunction"
run {_function} with arguments 13 and true

Represents the different items in furnace events.

Only 'smelting item' can be changed.


Since 2.10 Return Type

Item

Applicable Events

On Smelt

On Fuel Burn

On Start Smelt

On Furnace Item Extract

Syntax Patterns
[the] (smelted item|result[ item])
[the] extracted item[s]
[the] smelting item
[the] burned (fuel|item)
Usage Examples
on furnace smelt:
broadcast smelted item
# Or 'result'
on furnace extract:
broadcast extracted item
on fuel burn:
broadcast burned fuel
on smelting start:
broadcast smelting item
clear smelting item

A slot of a furnace, i.e. either the ore, fuel or result slot.


Since 1.0, 2.8.0 (syntax rework) Return Type

Slot

Applicable Events

On Smelt

On Fuel Burn

Syntax Patterns
[the] (ore|input) slot[s] [of %blocks%]
%blocks%'[s] (ore|input) slot[s]
[the] fuel slot[s] [of %blocks%]
%blocks%'[s] fuel slot[s]
[the] (result|output) slot[s] [of %blocks%]
%blocks%'[s] (result|output) slot[s]
Usage Examples
set the fuel slot of the clicked block to a lava bucket
set the block's ore slot to 64 iron ore
clear the result slot of the block
on smelt:
if the fuel slot is charcoal:
add 5 seconds to the burn time

The cook time, total cook time, and burn time of a furnace. Can be changed.

  • cook time: The amount of time an item has been smelting for.
  • total cook time: The amount of time required to finish smelting an item.
  • burn time: The amount of time left for the current fuel until consumption of another fuel item.


Since 2.10 Return Type

Timespan

Syntax Patterns
[the] [furnace] cook[ing] time [of %blocks%]
%blocks%'[s]cook[ing] time
[the] [furnace] total cook[ing] time [of %blocks%]
%blocks%'[s]total cook[ing] time
[the] [furnace] fuel burn[ing] time [of %blocks%]
%blocks%'[s]fuel burn[ing] time
Usage Examples
set the cooking time of {_block} to 10
set the total cooking time of {_block} to 50
set the fuel burning time of {_block} to 100
on smelt:
if the fuel slot is charcoal:
add 5 seconds to the fuel burn time
New

Various game effects that can be played for players, like record disc songs, splash potions breaking, or fake bone meal effects.


Since 2.14
Syntax Patterns
CLICK2
CLICK1
BOW_FIRE
DOOR_TOGGLE
IRON_DOOR_TOGGLE
TRAPDOOR_TOGGLE
IRON_TRAPDOOR_TOGGLE
FENCE_GATE_TOGGLE
DOOR_CLOSE
IRON_DOOR_CLOSE
TRAPDOOR_CLOSE
IRON_TRAPDOOR_CLOSE
FENCE_GATE_CLOSE
EXTINGUISH
GHAST_SHRIEK
GHAST_SHOOT
BLAZE_SHOOT
ZOMBIE_CHEW_WOODEN_DOOR
ZOMBIE_CHEW_IRON_DOOR
ZOMBIE_DESTROY_DOOR
ENDER_SIGNAL
MOBSPAWNER_FLAMES
BREWING_STAND_BREW
CHORUS_FLOWER_GROW
CHORUS_FLOWER_DEATH
PORTAL_TRAVEL
ENDEREYE_LAUNCH
FIREWORK_SHOOT
DRAGON_BREATH
ANVIL_BREAK
ANVIL_USE
ANVIL_LAND
ENDERDRAGON_SHOOT
WITHER_BREAK_BLOCK
WITHER_SHOOT
ZOMBIE_INFECT
ZOMBIE_CONVERTED_VILLAGER
BAT_TAKEOFF
END_GATEWAY_SPAWN
ENDERDRAGON_GROWL
PHANTOM_BITE
ZOMBIE_CONVERTED_TO_DROWNED
HUSK_CONVERTED_TO_ZOMBIE
GRINDSTONE_USE
BOOK_PAGE_TURN
SMITHING_TABLE_USE
POINTED_DRIPSTONE_LAND
POINTED_DRIPSTONE_DRIP_LAVA_INTO_CAULDRON
POINTED_DRIPSTONE_DRIP_WATER_INTO_CAULDRON
SKELETON_CONVERTED_TO_STRAY
LAVA_INTERACT
REDSTONE_TORCH_BURNOUT
END_PORTAL_FRAME_FILL
DRIPPING_DRIPSTONE
ENDER_DRAGON_DESTROY_BLOCK
SPONGE_DRY
COPPER_WAX_ON
COPPER_WAX_OFF
OXIDISED_COPPER_SCRAPE
WITHER_SPAWNED
ENDER_DRAGON_DEATH
END_PORTAL_CREATED_IN_OVERWORLD
SOUND_STOP_JUKEBOX_SONG
CRAFTER_CRAFT
CRAFTER_FAIL
PARTICLES_SCULK_SHRIEK
PARTICLES_EGG_CRACK
GUST_DUST
TRIAL_SPAWNER_EJECT_ITEM
VAULT_EJECT_ITEM
SPAWN_COBWEB
SOUND_WITH_CHARGE_SHOT
New

Creates game effects that require some extra information, such as colors, particle counts, or block data. Game effects consist of combinations particles and/or sounds that are used in Minecraft, such as the bone meal particles, the sound of footsteps on a specific block, or the particles and sound of breaking a splash potion. Game effects not present here do not require data and can be found in the Game Effect type. Data requirements vary from version to version, so these docs are only accurate for the most recent Minecraft version at time of release.


Since 2.14 Return Type

Game Effect

Syntax Patterns
[record] song (of|using) %item type%
[dispenser] black smoke effect [(in|with|using) [the] direction] %direction%
[dispenser] white smoke effect [(in|with|using) [the] direction] %direction%
%item type/block data% [foot]step[s] sound [effect]
%color% [splash] potion break effect
%color% instant [splash] potion break effect
compost[er] [fill[ing]] (succe(ss|ed)|fail[ure|ed]) sound [effect]
villager plant grow[th] effect [(with|using) %number% particles]
[fake] bone meal effect [(with|using) %number% particles]
(electric|lightning[ rod]|copper) spark effect [(in|using|along) the (x|y|z) axis]
sculk (charge|spread) effect [(with|using) data %integer%]
[finish] brush[ing] %item type/block data% effect
trial spawner detect[ing|s] [%number%] player[s] effect
ominous trial spawner detect[ing|s] [%number%] player[s] effect
[ominous] trial spawner spawn[ing] [mob] effect
[ominous] trial spawner spawn[ing] [mob] effect with sound
bee growth effect [(with|using) %number% particles]
[ominous] [trial] vault activate effect
[ominous] [trial] vault deactivate effect
trial spawner become[ing] [not] ominous effect
[ominous] trial spawner spawn[ing] item effect
place turtle egg effect [(with|using) %number% particles]
[mace] smash attack effect [(with|using) %number% particles]
Usage Examples
play compost success sound effect to player

The game modes survival, creative, adventure and spectator.


Since 1.0
Syntax Patterns
adventure, survival, spectator, creative
Usage Examples
player's gamemode is survival
set the player argument's game mode to creative

The gamemode of a player. (Gamemodes)


Since 1.0 Return Type

Game Mode

Syntax Patterns
[the] game[ ]mode of %players%
%players%'[s] game[ ]mode
Usage Examples
player's gamemode is survival
set the player's gamemode to creative
Minecraft 1.13 or newer

A gamerule


Since 2.5
Syntax Patterns
minecraft:entity_drops, universal_anger, spawn_patrols, log_admin_commands, keep_inventory, raids, fire_damage, respawn_radius, advance_time, immediate_respawn, block_drops, projectiles_can_break_blocks, elytra_movement_check, block_explosion_drop_decay, command_blocks_work, spawn_phantoms, natural_health_regeneration, pvp, mob_explosion_drop_decay, player_movement_check, fire_spread_radius_around_player, max_command_sequence_length, random_tick_speed, spread_vines, lava_source_conversion, spawn_mobs, fall_damage, limited_crafting, max_command_forks, drowning_damage, spawn_wardens, send_command_feedback, forgive_dead_players, freeze_damage, ender_pearls_vanish_on_death, max_snow_accumulation_height, players_sleeping_percentage, mob_drops, mob_griefing, tnt_explosion_drop_decay, water_source_conversion, global_sound_events, spectators_generate_chunks, advance_weather, show_death_messages, allow_entering_nether_using_portals, spawn_monsters, spawner_blocks_work, max_block_modifications, show_advancement_messages, command_block_output, locator_bar, players_nether_portal_creative_delay, players_nether_portal_default_delay, max_entity_cramming, reduced_debug_info, spawn_wandering_traders, tnt_explodes, max_minecart_speed

A wrapper for the value of a gamerule for a world.


Since 2.5
Usage Examples

The gamerule value of a world.


Since 2.5 Return Type

Gamerule Value

Syntax Patterns
[the] gamerule %gamerule% of %worlds%
Usage Examples
set the gamerule commandBlockOutput of world "world" to false
Minecraft 1.14 or newer

Represents a Panda's main or hidden gene. See genetics for more info.


Since 2.4
Syntax Patterns
normal, lazy, happy, worried, worrisome, aggressive, brown, brownish, savage, playful, wild, weak

Generates the loot in the specified inventories from a loot table using a loot context. Not specifying a loot context will use a loot context with a location at the world's origin.

Note that if the inventory is full, it will cause warnings in the console due to over-filling the inventory.


Since 2.10
Syntax Patterns
generate [the] loot (of|using) %loot table% [(with|using) %loot context%] in %inventories%
Usage Examples
generate loot of loot table "minecraft:chests/simple_dungeon" using loot context at player in {_inventory}
generate loot using "minecraft:chests/shipwreck_supply" in {_inventory}

Sets of gets gliding state of player. It allows you to set gliding state of entity even if they do not have an Elytra equipped.


Since 2.2-dev21 Return Type

Boolean

Syntax Patterns
[the] (gliding|glider) [state] of %living entities%
%living entities%'[s] (gliding|glider) [state]
Usage Examples
set gliding of player to off

Indicates if targeted entity is glowing (new 1.9 effect) or not. Glowing entities can be seen through walls.


Since 2.2-dev18 Return Type

Boolean

Syntax Patterns
[the] glowing of %entities%
%entities%'[s] glowing
Usage Examples
set glowing of player to true

Checks to see if a goat has or does not have a left, right, or both horns.


Since 2.11
Syntax Patterns
%living entities% (has|have) ((any|a) horn|[a] left horn[s]|[a] right horn[s]|both horns)
%living entities% (doesn't|does not|do not|don't) have ((any|a) horn|[a] left horn[s]|[a] right horn[s]|both horns)
Usage Examples
if last spawned goat does not have both horns:
make last spawned goat have both horns
if {_goat} has a right horn:
force {_goat} to not have a right horn

Make a goat have or not have a left, right, or both horns.


Since 2.11
Syntax Patterns
remove [the] (left horn[s]|right horn[s]|both horns) of %living entities%
remove %living entities%'[s] (left horn[s]|right horn[s]|horns)
(regrow|replace) [the] (left horn[s]|right horn[s]|both horns) of %living entities%
(regrow|replace) %living entities%'[s] (left horn[s]|right horn[s]|horns)
Usage Examples
remove the left horn of last spawned goat
regrow {_goat}'s horns
remove both horns of all goats

If entity is affected by gravity or not, i.e. if it has Minecraft 1.10+ NoGravity flag.


Since 2.2-dev21 Return Type

Boolean

Syntax Patterns
[the] gravity of %entities%
%entities%'[s] gravity
Usage Examples
set gravity of player off

Make mobs left or right-handed. This does not affect players.


Since 2.8.0
Syntax Patterns
make %living entities% (left|right)( |-)handed
Usage Examples
spawn skeleton at spawn of world "world":
make entity left handed
make all zombies in radius 10 of player right handed

Returns the hanging entity or remover in hanging break and place events.


Since 2.6.2 Return Type

Entity

Syntax Patterns
[the] hanging (entity|remover)
Usage Examples
on break of item frame:
if item of hanging entity is diamond pickaxe:
cancel event
if hanging remover is a player:
send "You can't break that item frame!" to hanging remover

Checks whether an entity has AI.


Since 2.5
Syntax Patterns
%living entities% (has|have) (ai|artificial intelligence)
%living entities% (doesn't|does not|do not|don't) have (ai|artificial intelligence)
Usage Examples
target entity has ai

Checks whether a player has chat filtering enabled.


Since 2.10
Syntax Patterns
%players% (has|have) (chat|text) filtering (on|enabled)
%players% (doesn't|does not|do not|don't) have (chat|text) filtering (on|enabled)
Usage Examples
if player doesn't have chat filtering enabled:
send "<gray>This server may contain mature chat messages. You have been warned!" to player

Checks whether the given players have a custom client weather


Since 2.3
Syntax Patterns
%players% (has|have) [a] (client|custom) weather [set]
%players% (doesn't|does not|do not|don't) have [a] (client|custom) weather [set]
Usage Examples
if the player has custom weather:
message "Your custom weather is %player's weather%"
Minecraft 1.21.4+ (floats/flags/strings/colours)

Check if an item has a custom model data tag


Since 2.5, 2.12 (expanded data types)
Syntax Patterns
%item types% (has|have) [custom] model data [floats|flags|strings|colo[u]rs]
%item types% (doesn't|does not|do not|don't) have [custom] model data [floats|flags|strings|colo[u]rs]
Usage Examples
player's tool has custom model data
if player's tool has custom model data flags:
loop custom model data flags of player's tool:
send "Flag %loop-index%: %loop-value%"
set {_coloured} to whether player's tool has model data colours

Checks whether a sign (either a block or an item) has glowing text


Since 2.8.0
Syntax Patterns
%blocks/item types% (has|have) glowing text
%blocks/item types% (doesn't|does not|do not|don't) have glowing text
Usage Examples
if target block has glowing text
MC 1.21.2 (cooldown group)

Checks whether a cooldown is active on the specified item for a specific player. If the provided item has a cooldown group component specified, the cooldown group will take priority. Otherwise, the cooldown of the item material will be used.


Since 2.8.0, 2.12 (cooldown group)
Syntax Patterns
%players% (has|have) [([an] item|a)] cooldown (on|for) %item types%
%players% (has|have) %item types% on [(item|a)] cooldown
%players% (doesn't|does not|do not|don't) have [([an] item|a)] cooldown (on|for) %item types%
%players% (doesn't|does not|do not|don't) have %item types% on [(item|a)] cooldown
Usage Examples
if player has player's tool on cooldown:
send "You can't use this item right now. Wait %item cooldown of player's tool for player%"
Spigot 1.20.5+

Whether the entire or additional tooltip of an item is shown or hidden.

The 'entire tooltip' is what shows to the player when they hover an item (i.e. name, lore, etc.).

The 'additional tooltip' hides certain information from certain items (potions, maps, books, fireworks, and banners).


Since 2.9.0
Syntax Patterns
[the] [entire|additional] tool[ ]tip[s] of %item types% (is|are) (shown|hidden)
[the] [entire|additional] tool[ ]tip[s] of %item types% (isn't|is not|aren't|are not) (shown|hidden)
%item types%'[s] [entire|additional] tool[ ]tip[s] (is|are) (shown|hidden)
%item types%'[s] [entire|additional] tool[ ]tip[s] (isn't|is not|aren't|are not) (shown|hidden)
Usage Examples
send true if entire tooltip of player's tool is shown
if additional tooltip of {_item} is hidden:

Checks whether living entities have an unobstructed line of sight to other entities or locations.


Since 2.8.0
Syntax Patterns
%living entities% (has|have) [a] [direct] line of sight to %entities/locations%
%living entities% does(n't| not) have [a] [direct] line of sight to %entities/locations%
%living entities% (has|have) no [direct] line of sight to %entities/locations%
Usage Examples
player has direct line of sight to location 5 blocks to the right of player
victim has line of sight to attacker
player has no line of sight to location 100 blocks in front of player

Checks whether an entity or block has a loot table. The loot tables of chests will be deleted when the chest is opened or broken.


Since 2.10
Syntax Patterns
%blocks/entities% (has|have) [a] loot[ ]table
%blocks/entities% (doesn't|does not|do not|don't) have [a] loot[ ]table
Usage Examples
set event-block to chest
if event-block has a loot table:
# this will never happen, because it doesn't have a loot table.
set loot table of event-block to "minecraft:chests/simple_dungeon"
if event-block has a loot table:
# this will happen, because it now has a loot table.

Checks whether a metadata holder has a metadata tag.


Since 2.2-dev36
Syntax Patterns
%metadata holders% (has|have) metadata [(value|tag)[s]] %texts%
%metadata holders% (doesn't|does not|do not|don't) have metadata [(value|tag)[s]] %texts%
Usage Examples
if player has metadata value "healer":

Test whether a player has a certain permission.


Since 1.0
Syntax Patterns
%command senders% (has|have) [the] permission[s] %texts%
%command senders% (doesn't|does not|do not|don't) have [the] permission[s] %texts%
Usage Examples
player has permission "skript.tree"
victim has the permission "admin":
send "You're attacking an admin!" to attacker

Checks whether a player has played on this server before. You can also use on first join if you want to make triggers for new players.


Since 1.4, 2.7 (multiple players)
Syntax Patterns
%offline players% [(has|have|did)] [already] play[ed] [on (this|the) server] (before|already)
%offline players% (has not|hasn't|have not|haven't|did not|didn't) [(already|yet)] play[ed] [on (this|the) server] (before|already|yet)
Usage Examples
player has played on this server before
player hasn't played before
New

Checks whether an entity has a potion effect with certain properties.

An entity is considered having a potion effect if it has a potion effect with at least the specified properties.

For example, if an entity has an 'ambient speed 5' effect, they would be considered as having 'speed 5'.

For exact comparisons, consider using the Potion Effect of Entity/Item expression in an 'is' comparison.


Since 2.6.1, 2.14 (support for potion effects)
Syntax Patterns
%living entities% (has|have) ([any|a[n]] [active] potion effect[s]|[any|a] potion effect[s] active)
%living entities% (doesn't|does not|do not|don't) have ([any|a[n]] [active] potion effect[s]|[any|a] potion effect[s] active)
%living entities% (has|have) %skriptpotioneffects% [active]
%living entities% (doesn't|does not|do not|don't) have %skriptpotioneffects% [active]
Usage Examples
if the player has a potion effect of speed:
message "You are sonic!"
if all players have speed and haste active:
broadcast "This server is ready to mine!"

Checks whether the given players have a server resource pack loaded. Please note that this can't detect player's own resource pack, only the resource pack that sent by the server.


Since 2.4
Syntax Patterns
%players% (has|have) [a] resource pack [(loaded|installed)]
%players% (doesn't|does not|do not|don't) have [a] resource pack [(loaded|installed)]
Usage Examples
if the player has a resource pack loaded:

Checks whether the given entities has the given scoreboard tags.


Since 2.3
Syntax Patterns
%entities% (has|have) [the] score[ ]board tag[s] %texts%
%entities% (doesn't|does not|do not|don't) have [the] score[ ]board tag[s] %texts%
Usage Examples
if the targeted armor stand has the scoreboard tag "test tag":

Hashes the given text using the MD5 or SHA algorithms. Each algorithm is suitable for different use cases.

These hashing algorithms are not suitable for hashing passwords.

If handling passwords, use a hashing algorithm specifically designed for passwords.

MD5 is deprecated and may be removed in a future release. It is provided mostly for backwards compatibility, as it is outdated and not secure.

SHA is more secure, but is not suitable for hashing passwords (even with salting).

When hashing data, you must specify algorithms that will be used for security reasons!

Please note that a hash cannot be reversed under normal circumstances. You will not be able to get original value from a hash with Skript.


Since 2.0, 2.2-dev32 (SHA-256 algorithm), 2.12 (SHA-384, SHA-512) Return Type

Text

Syntax Patterns
%texts% hash[ed] with ((MD5|SHA-256|SHA-384|SHA-512))
Usage Examples
set {_hash} to "hello world" hashed with SHA-256

The type of the entity that will be hatched in a Player Egg Throw event.


Since 2.7 Return Type

Entity Type

Applicable Events

On Egg Throw

Syntax Patterns
[the] hatching entity [type]
Usage Examples
on player egg throw:
set the hatching entity type to a primed tnt

The number of entities that will be hatched in a Player Egg Throw event.

Please note that no more than 127 entities can be hatched at once.


Since 2.7 Return Type

Number

Applicable Events

On Egg Throw

Syntax Patterns
[the] hatching number
Usage Examples
on player egg throw:
set the hatching number to 10

The location of an entity's head, mostly useful for players and e.g. looping blocks in the player's line of sight.

Please note that this location is only accurate for entities whose head is exactly above their center, i.e. players, endermen, zombies, skeletons, etc., but not sheep, pigs or cows.


Since 2.0 Return Type

Location

Syntax Patterns
[the] (head|eye[s]) [location[s]] of %living entities%
%living entities%'[s] (head|eye[s]) [location[s]]
Usage Examples
set the block at the player's head to air
set the block in front of the player's eyes to glass
loop blocks in front of the player's head:

The amount of health healed in a heal event.


Since 2.5.1 Return Type

Number

Applicable Events

On Heal

Syntax Patterns
[the] heal[ing] amount
Usage Examples
on player healing:
increase the heal amount by 2
remove 0.5 from the healing amount

The health regain reason in a heal event.


Since 2.5
Syntax Patterns
an ender crystal, magic, a magic regeneration, magic regeneration, fed, sated, a magic regen, regen potion, a wither spawn, peaceful, unknown, a regeneration potion, consuming, a wither effect, peaceful regeneration, wither summoning, healing potion, wither potion, an end crystal, satiated, regeneration potion, potion, satisfied, ingesting, withered, custom, a wither spawning, end crystal, eating, wither spawning, a wither summoning, wither effect, a plugin, a regen potion, plugin, withering, a potion, wither spawn, a healing potion, ender crystal, magic regen, wither, peaceful regen

The heal reason of a heal event.


Since 2.5 Return Type

Heal Reason

Applicable Events

On Heal

Syntax Patterns
[the] (regen|health regain|heal[ing]) (reason|cause)
Usage Examples
on heal:
heal reason is satiated
send "You ate enough food and gained full health back!"

The health of a creature, e.g. a player, mob, villager, etc. The minimum value is 0, and the maximum is the creature's max health (e.g. 10 for players).


Since 1.0 Return Type

Number

Applicable Events

On Damage

Syntax Patterns
[the] health of %living entities%
%living entities%'[s] health
Usage Examples
message "You have %health% HP left."
New

Returns the hexadecimal value representing the given color(s). The hex value of a colour does not contain a leading #, just the RRGGBB value. For those looking for hex values of numbers, see the asBase and fromBase functions.


Since 2.14 Return Type

Text

Syntax Patterns
[the] hex[adecimal] code of %colors%
%colors%'[s] hex[adecimal] code
Usage Examples
send formatted "<#%hex code of rgb(100, 10, 10)%>darker red" to all players

The players hidden from a player that were hidden using the entity visibility effect.


Since 2.3 Return Type

Player

Syntax Patterns
[(all [[of] the]|the)] hidden players (of|for) %players%
[(all [[of] the]|the)] players hidden (from|for|by) %players%
Usage Examples
message "&lt;light red&gt;You are currently hiding: &lt;light gray&gt;%hidden players of the player%"

Hides a player from the hover list and decreases the online players count (only if the player count wasn't changed before).


Since 2.3
Syntax Patterns
hide %players% (in|on|from) [the] server list
hide %players%'[s] info[rmation] (in|on|from) [the] server list
Usage Examples
on server list ping:
hide {vanished::*} from the server list

Gets and/or sets the (max) domestication of a horse.

The domestication of a horse is how close a horse is to becoming tame - the higher the domestication, the closer they are to becoming tame (must be between 1 and the max domestication level of the horse).

The max domestication of a horse is how long it will take for a horse to become tame (must be greater than 0).


Since 2.10 Return Type

Number

Syntax Patterns
[the] [max[imum]] domestication level of %living entities%
%living entities%'[s] [max[imum]] domestication level
Usage Examples
function domesticateAndTame(horse: entity, p: offline player, i: int = 10):
add {_i} to domestication level of {_horse}
if domestication level of {_horse} >= max domestication level of {_horse}:
tame {_horse}
set tamer of {_horse} to {_p}

The hostname used by the connecting player to connect to the server in a connect event.


Since 2.6.1 Return Type

Text

Syntax Patterns
[the] (host|domain)[ ][name]
Usage Examples
on connect:
hostname is "testers.example.com"
send "Welcome back tester!"

The hotbar button clicked in an inventory click event.


Since 2.5 Return Type

Number

Syntax Patterns
[the] hotbar button
Usage Examples
on inventory click:
send "You clicked the hotbar button %hotbar button%!"

The currently selected hotbar slot.

To retrieve its number use Slot Index expression.

Use future and past tense to grab the previous slot in an item change event, see example.


Since 2.2-dev36 Return Type

Slot

Syntax Patterns
[the] [([currently] selected|current)] hotbar slot[s] [of %players%]
%players%'[s] [([currently] selected|current)] hotbar slot[s]
Usage Examples
message "%player's current hotbar slot%"
set player's selected hotbar slot to slot 4 of player
send "index of player's current hotbar slot = 1" # second slot from the left
on item held change:
if the selected hotbar slot was a diamond:
set the currently selected hotbar slot to slot 5 of player

The list when you hover on the player counts of the server in the server list.

This can be changed using texts or players in a server list ping event only. Adding players to the list means adding the name of the players.

And note that, for example if there are 5 online players (includes fake online count) in the server and the hover list is set to 3 values, Minecraft will show "... and 2 more ..." at end of the list.


Since 2.3 Return Type

Text

Applicable Events

On Server List Ping

Syntax Patterns
[the] [custom] [player|server] (hover|sample) ([message] list|message)
[the] [custom] player [hover|sample] list
Usage Examples
on server list ping:
clear the hover list
add "&aWelcome to the &6Minecraft &aserver!" to the hover list
add "" to the hover list # A blank line
add "&cThere are &6%online players count% &conline players!" to the hover list

Humidity of given blocks.


Since 2.2-dev35 Return Type

Number

Syntax Patterns
[the] humidit(y|ies) of %blocks%
%blocks%'[s] humidit(y|ies)
Usage Examples
set {_humidity} to event-block's humidity

Lights entities on fire or extinguishes them.


Since 1.4
Syntax Patterns
(ignite|set fire to) %entities% [for %time span%]
(set|light) %entities% on fire [for %time span%]
extinguish %entities%
Usage Examples
ignite the player
extinguish the player

Checks if a creeper is going to explode.


Since 2.5
Syntax Patterns
[creeper[s]] %living entities% ((is|are)|(isn't|is not|aren't|are not)) going to explode
[creeper[s]] %living entities% ((is|are)|(isn't|is not|aren't|are not)) in the (ignition|explosion) process
creeper[s] %living entities% ((is|are)|(isn't|is not|aren't|are not)) ignited
Usage Examples
if the last spawned creeper is going to explode:
loop all players in radius 3 of the last spawned creeper
send "RUN!!!" to the loop-player

Checks whether a date is in the past or future.

Note that using the 'now' expression will not be in the past or future when used directly in the condition.


Since 2.10
Syntax Patterns
%dates% (is|are)[(n't| not)] in the (past|future)
%dates% ha(s|ve)[(n't| not)] passed
Usage Examples
set {_date} to now
wait 5 seconds
if {_date} is in the past:
# this will be true
if now is in the future:
# this will be false
set {_dates::*} to 1 day from now, 12 days from now, and 1 year from now
if {_dates::*} are in the future:
# this will be true
if {_dates::*} have passed:
# this will be false

Returns all the indices of a list variable, optionally sorted by their values.

To sort the indices, all objects in the list must be comparable;

Otherwise, this expression will just return the unsorted indices.


Since 2.4 (indices), 2.6.1 (sorting) Return Type

Text

Syntax Patterns
[(the|all [[of] the])] (indexes|indices) of %~objects%
%~objects%'[s] (indexes|indices)
[sorted] (indices|indexes) of %~objects% in (ascending|descending) order
[sorted] %~objects%'[s] (indices|indexes) in (ascending|descending) order
Usage Examples
set {l::*} to "some", "cool" and "values"
broadcast "%indices of {l::*}%" # result is 1, 2 and 3", "
set {_leader-board::first} to 17
set {_leader-board::third} to 30
set {_leader-board::second} to 25
set {_leader-board::fourth} to 42
set {_ascending-indices::*} to sorted indices of {_leader-board::*} in ascending order
broadcast "%{_ascending-indices::*}%" #result is first, second, third, fourth
set {_descending-indices::*} to sorted indices of {_leader-board::*} in descending order
broadcast "%{_descending-indices::*}%" #result is fourth, third, second, first

Get the first, last or all positions of a character (or text) in another text using 'positions of %texts% in %text%'. Nothing is returned when the value does not occur in the text. Positions range from 1 to the length of the text (inclusive).

Using 'indices/positions of %objects% in %objects%', you can get the indices or positions of a list where the value at that index is the provided value. Indices are only supported for keyed expressions (e.g. variable lists) and will return the string indices of the given value. Positions can be used with any list and will return the numerical position of the value in the list, counting up from 1. Additionally, nothing is returned if the value is not found in the list.

Whether string comparison is case-sensitive or not can be configured in Skript's config file.


Since 2.1, 2.12 (indices, positions of list) Return Type

Object

Syntax Patterns
[the] [first|last|all] (position[s]|indices|index[es]) of [[the] value] %texts% in %text%
[the] [first|last|all] position[s] of [[the] value] %objects% in %~objects%
[the] [first|last|all] (indices|index[es]) of [[the] value] %objects% in %~objects%
Usage Examples
set {_first} to the first position of "@" in the text argument
if {_s} contains "abc":
set {_s} to the first (position of "abc" in {_s} + 3) characters of {_s}
# removes everything after the first "abc" from {_s}
set {_list::*} to 1, 2, 3, 1, 2, 3
set {_indices::*} to indices of the value 1 in {_list::*}
# {_indices::*} is now "1" and "4"
set {_indices::*} to all indices of the value 2 in {_list::*}
# {_indices::*} is now "2" and "5"
set {_positions::*} to all positions of the value 3 in {_list::*}
# {_positions::*} is now 3 and 6
set {_otherlist::bar} to 100
set {_otherlist::hello} to "hi"
set {_otherlist::burb} to 100
set {_otherlist::tud} to "hi"
set {_otherlist::foo} to 100
set {_indices::*} to the first index of the value 100 in {_otherlist::*}
# {_indices::*} is now "bar"
set {_indices::*} to the last index of the value 100 in {_otherlist::*}
# {_indices::*} is now "foo"
set {_positions::*} to all positions of the value 100 in {_otherlist::*}
# {_positions::*} is now 1, 3 and 5
set {_positions::*} to all positions of the value "hi" in {_otherlist::*}
# {_positions::*} is now 2 and 4

A number representing positive infinity.


Since 2.2-dev32d Return Type

Number

Syntax Patterns
positive (infinity|∞) [value]
∞ [value]
infinity value
value of [positive] (infinity|∞)
Usage Examples
if {_number} is infinity:

Returns the initiator inventory in an on inventory item move event.


Since 2.8.0 Return Type

Inventory

Applicable Events

On Inventory Item Move

Syntax Patterns
[the] [event-]initiator[( |-)inventory]
Usage Examples
on inventory item move:
holder of event-initiator-inventory is a chest
broadcast "Item transport happening at %location at holder of event-initiator-inventory%!"

Represents the input in a filter expression or sort effect.

For example, if you ran 'broadcast "something" and "something else" where [input is "something"]

the condition would be checked twice, using "something" and "something else" as the inputs.

The 'input index' pattern can be used when acting on a variable to access the index of the input.


Since 2.2-dev36, 2.9.0 (input index) Return Type

Object

Syntax Patterns
input
%*type% input
input index
Usage Examples
send "congrats on being staff!" to all players where [input has permission "staff"]
sort {_list::*} based on length of input index
Minecraft 1.21.3+

Represents a movement input key that is pressed by a player.


Since 2.10
Syntax Patterns
left movement key, forward movement key, right movement key, backward key, left key, sprint key, forward key, right key, jumping key, sneaking key, jump key, sneak key, sprinting key, backward movement key
Minecraft 1.21+

Add an entity into the entity storage of a block (e.g. beehive).

The entity must be of the right type for the block (e.g. bee for beehive).

Due to unstable behavior on older versions, adding entities to an entity storage requires Minecraft version 1.21+.


Since 2.11
Syntax Patterns
(add|insert) %living entities% [in[ ]]to [the] (stored entities|entity storage) of %block%
Usage Examples
add last spawned bee into the entity storage of {_beehive}
New

Returns the height or width of an interaction entity's hitbox. Both default to 1. The width of the hitbox determines the x/z widths


Since 2.14 Return Type

Number

Syntax Patterns
[the] interaction (height|width)[s] [of %entities%]
%entities%'[s] interaction (height|width)[s]
Usage Examples
set interaction height of last spawned interaction to 5.3
set interaction width of last spawned interaction to 2

An inventory of a player or block. Inventories have many effects and conditions regarding the items contained.

An inventory has a fixed amount of slots which represent a specific place in the inventory, e.g. the helmet slot for players (Please note that slot support is still very limited but will be improved eventually).


Since 1.0
Usage Examples

The inventory of a block or player. You can usually omit this expression and can directly add or remove items to/from blocks or players.


Since 1.0 Return Type

Object

Syntax Patterns
[the] inventor(y|ies) of %inventoryholders/item types%
%inventoryholders/item types%'[s] inventor(y|ies)
Usage Examples
add a plank to the player's inventory
clear the player's inventory
remove 5 wool from the inventory of the clicked block

What player just did in inventory event. Note that when in creative game mode, most actions do not work correctly.


Since 2.2-dev16
Syntax Patterns
drop stack from slot, swap items with hotbar, pickup all into bundle, place items from bundle, swap cursor stack, pickup single item, pickup some, drop all from cursor, move to other inventory, drop cursor stack, pickup all items into bundle, pickup from bundle, pickup all, place some into bundle, swap with hotbar, nothing, drop all from slot, swap cursor, drop cursor, place from bundle, pickup all items, drop slot item, place all, drop cursor item, drop slot stack, drop single item from slot, swap with cursor, place some, pickup one item, drop single item from cursor, pickup some items into bundle, collect items to cursor, unknown, clone stack, drop stack from cursor, drop one item from slot, pickup some into bundle, drop one item from cursor, unsupported, do nothing, place some items into bundle, drop one from cursor, pickup half, drop items from slot, swap stack with cursor, place all items, place all items into bundle, collect to cursor, pickup some items, drop slot, drop items from cursor, hotbar move and readd, shift move, custom, place all into bundle, pickup single, pickup items from bundle, place one item, hotbar swap items, drop one from slot, place some items, place one, pickup half stack, instant move, hotbar swap
Usage Examples

The inventory action of an inventory event. Please click on the link for more information.


Since 2.2-dev16 Return Type

Inventory Action

Syntax Patterns
[the] inventory action
Usage Examples
inventory action is pickup all

The inventory close reason of an inventory close event.


Since 2.8.0 Return Type

Inventory Close Reasons

Applicable Events

On Inventory Close

Syntax Patterns
[the] inventory clos(e|ing) (reason|cause)
Usage Examples
on inventory close:
inventory close reason is teleport
send "Your inventory closed due to teleporting!" to player

The inventory close reason in an inventory close event.


Since 2.8.0
Syntax Patterns
disconnect, death, teleport, cannot use, new opened, unknown, can't use, unloaded, disconnected, plugin, can not use, open new, player

Expression Inventory Holder/Viewers/Rows/Slots

Section titled “ Expression Inventory Holder/Viewers/Rows/Slots”

Gets the amount of rows/slots, viewers and holder of an inventory.

NOTE: 'Viewers' expression returns a list of players viewing the inventory. Note that a player is considered to be viewing their own inventory and internal crafting screen even when said inventory is not open.


Since 2.2-dev34, 2.5 (slots) Return Type

Object

Syntax Patterns
(holder[s]|viewers|[amount of] rows|[amount of] slots) of %inventories%
%inventories%'[s] (holder[s]|viewers|[amount of] rows|[amount of] slots)
Usage Examples
event-inventory's amount of rows
holder of player's top inventory
{_inventory}'s viewers

Represents a slot in an inventory. It can be used to change the item in an inventory too.


Since 2.2-dev24 Return Type

Slot

Syntax Patterns
[the] slot[s] %numbers% of %inventory%
%inventory%'[s] slot[s] %numbers%
Usage Examples
if slot 0 of player is air:
set slot 0 of player to 2 stones
remove 1 stone from slot 0 of player
add 2 stones to slot 0 of player
clear slot 1 of player

Minecraft has several different inventory types with their own use cases.


Since 2.2-dev32
Syntax Patterns
barrel inventory, a loom inventory, a blast furnace inventory, workbench inventory, ender chest inventory, loom inventory, bookshelf inventory, a workbench inventory, hopper inventory, decorated pot inventory, a merchant inventory, a hopper inventory, an ender chest inventory, new smithing table, a jukebox, beacon inventory, shulker box inventory, a barrel inventory, a shulker box inventory, lectern inventory, chest inventory, a villager inventory, a smoker inventory, a brewing stand inventory, a smithing inventory, chiseled bookshelf inventory, grindstone inventory, a crafter inventory, a crafting table inventory, a player inventory, furnace inventory, a creative inventory, blast furnace inventory, upgrade gear, a composter inventory, an enchanting table inventory, jukebox, shelf inventory, a dropper inventory, a cartography table inventory, a upgrade gear, smoker inventory, composter inventory, a chest inventory, upgrade gear table, a upgrade gear table, dispenser inventory, player inventory, stonecutter inventory, a stonecutter inventory, a lectern inventory, merchant inventory, cartography table inventory, a new smithing table, a chiseled bookshelf inventory, a furnace inventory, anvil inventory, a shelf inventory, a bookshelf inventory, a dispenser inventory, a grindstone inventory, a decorated pot inventory, smithing inventory, dropper inventory, brewing stand inventory, villager inventory, enchanting table inventory, a beacon inventory, crafter inventory, creative inventory, crafting table inventory, an anvil inventory
Usage Examples

An expression to obtain the inverse value of a boolean


Since 2.12 Return Type

Boolean

Syntax Patterns
[the] (inverse|opposite)[s] of %booleans (yes/no)%
Usage Examples
set {_gravity} to inverse of player's flight mode

The IP address of a player, or the connected player in a connect event, or the pinger in a server list ping event.


Since 1.4, 2.2-dev26 (when used in connect event), 2.3 (when used in server list ping event) Return Type

Text

Syntax Patterns
IP[s][( |-)address[es]] of %players%
%players%'[s] IP[s][( |-)address[es]]
IP[( |-)address]
Usage Examples
ban the IP address of the player")
broadcast "Banned the IP %IP of player%"
on connect:
log "[%now%] %player% (%ip%) is connected to the server."
on server list ping:
send "%IP-address%" to the console

Checks whether a command/string is a custom Skript command.


Since 2.6
Syntax Patterns
%text% (is|are) [a] s(k|c)ript (command|cmd)
%text% (isn't|is not|aren't|are not) [a] s(k|c)ript (command|cmd)
Usage Examples
on command:
command is a skript command

Checks whether or not a living entity is an adult.


Since 2.10
Syntax Patterns
%living entities% (is|are) [an] adult
%living entities% (isn't|is not|aren't|are not) [an] adult
Usage Examples
on drink:
event-entity is not an adult
kill event-entity

Checks whether an entity is alive. Works for non-living entities too.


Since 2.0, 2.4-alpha4 (non-living entity support)
Syntax Patterns
%entities% (is|are) (alive|dead)
%entities% (isn't|is not|aren't|are not) (alive|dead)
Usage Examples
if {villager-buddy::%player's uuid%} is not dead:
on shoot:
while the projectile is alive:

Checks whether or not a living entity is a baby.


Since 2.10
Syntax Patterns
%living entities% (is|are) a (child|baby)
%living entities% (isn't|is not|aren't|are not) a (child|baby)
Usage Examples
on drink:
event-entity is a baby
kill event-entity

Checks whether a player or IP is banned.


Since 1.4
Syntax Patterns
%offline players/texts% (is|are) banned
%players/texts% (is|are) IP[(-| )]banned
%offline players/texts% (isn't|is not|aren't|are not) banned
%players/texts% (isn't|is not|aren't|are not) IP[(-| )]banned
Usage Examples
player is banned
victim is not IP-banned
"127.0.0.1" is banned
Minecraft 1.16+

Checks what the respawn location of a player in the respawn event is.


Since 2.7 Applicable Events

On Respawn

Syntax Patterns
[the] respawn location (was|is)[(n'| no)t] [a] (bed|respawn anchor)
Usage Examples
on respawn:
the respawn location is a bed
broadcast "%player% is respawning in their bed! So cozy!"

Checks whether an item is a block.


Since 2.4
Syntax Patterns
%item types% (is|are) ([a] block|blocks)
%item types% (isn't|is not|aren't|are not) ([a] block|blocks)
Usage Examples
player's held item is a block
{list::*} are blocks

Checks if a block is indirectly or directly powered by redstone


Since 2.5
Syntax Patterns
%blocks% (is|are) redstone powered
%blocks% (is|are) indirectly redstone powered
%blocks% (is|are)(n't| not) redstone powered
%blocks% (is|are)(n't| not) indirectly redstone powered
Usage Examples
if clicked block is redstone powered:
send "This block is well-powered by redstone!"
if clicked block is indirectly redstone powered:
send "This block is indirectly redstone powered."

Checks whether a player is blocking with their shield.


Since unknown (before 2.1)
Syntax Patterns
%players% (is|are) (blocking|defending) [with [a] shield]
%players% (isn't|is not|aren't|are not) (blocking|defending) [with [a] shield]
Usage Examples
on damage of player:
victim is blocking
damage attacker by 0.5 hearts

Checks whether an entity is on fire, e.g. a zombie due to being in sunlight, or any entity after falling into lava.


Since 1.4.4
Syntax Patterns
%entities% (is|are) (burning|ignited|on fire)
%entities% (isn't|is not|aren't|are not) (burning|ignited|on fire)
Usage Examples
# increased attack against burning targets
victim is burning:
increase damage by 2

Checks if a creeper, wither, or wither skull is charged (powered).


Since 2.5, 2.10 (withers, wither skulls)
Syntax Patterns
%entities% (is|are) (charged|powered)
%entities% (isn't|is not|aren't|are not) (charged|powered)
Usage Examples
if the last spawned creeper is charged:
broadcast "A charged creeper is at %location of last spawned creeper%"

Check whether a ghast is charging a fireball.


Since 2.11
Syntax Patterns
%living entities% (is|are) charging [a] fireball
%living entities% (isn't|is not|aren't|are not) charging [a] fireball
Usage Examples
if last spawned ghast is charging fireball:
kill last spawned ghast
Minecraft 1.17+

Whether a living entity is climbing, such as a spider up a wall or a player on a ladder.


Since 2.8.0
Syntax Patterns
%living entities% (is|are) climbing
%living entities% (isn't|is not|aren't|are not) climbing
Usage Examples
spawn a spider at location of spawn
wait a second
if the last spawned spider is climbing:
message "The spider is now climbing!"

Checks whether a command block is conditional or not.


Since 2.10
Syntax Patterns
%blocks% (is|are) [un]conditional
%blocks% (isn't|is not|aren't|are not) [un]conditional
Usage Examples
if {_block} is conditional:
make {_block} unconditional

Checks if an entity's custom name is visible.


Since 2.10
Syntax Patterns
%entities%'[s] custom name[s] (is|are) visible
%entities%'[s] custom name[s] (isn't|is not|are not|aren't) visible
custom name of %entities% (is|are) visible
custom name of %entities% (isn't|is not|are not|aren't) visible
Usage Examples
send true if target's custom name is visible

Checks to see if an entity is dancing, such as allays, parrots, or piglins.


Since 2.11
Syntax Patterns
%living entities% (is|are) dancing
%living entities% (isn't|is not|aren't|are not) dancing
Usage Examples
if last spawned allay is dancing:
broadcast "Dance Party!"

Whether a panda or horse type (horse, camel, donkey, llama, mule) is eating.


Since 2.11
Syntax Patterns
%living entities% (is|are) eating
%living entities% (isn't|is not|aren't|are not) eating
Usage Examples
if last spawned panda is eating:
force last spawned panda to stop eating

Checks whether an item is edible.


Since 2.2-dev36
Syntax Patterns
%item types% (is|are) edible
%item types% (isn't|is not|aren't|are not) edible
Usage Examples
cooked beef is edible
player's tool is edible

Checks whether something is empty.


Since unknown (before 2.1)
Syntax Patterns
%objects% (is|are) empty
%objects% (isn't|is not|aren't|are not) empty
Usage Examples
player's inventory is empty

Checks whether an item is enchanted. Enchants must match the exact level by default, unless 'or better' or 'or worse' are used.


Since 1.4.6, 2.12 ('or better')
Syntax Patterns
%item types% (is|are) enchanted [with %enchantment types% [or ((better|greater|higher|above)|(worse|lesser|lower|below))]]
%item types% (isn't|is not|aren't|are not) enchanted [with %enchantment types% [or ((better|greater|higher|above)|(worse|lesser|lower|below))]]
Usage Examples
tool of the player is enchanted with efficiency 2
if player's helmet or player's boots are enchanted with protection 3 or better:
if player's chestplate is enchanted with protection

Checks if a number is evenly divisible by another number. An optional tolerance can be provided to counteract floating point error. The default tolerance is 1e-10. Any input smaller than the tolerance is considered to be 0. This means divisors that are too small will always return false, and dividends that are too small will always return true.


Since 2.10, 2.12 (tolerance)
Syntax Patterns
%numbers% (is|are) evenly divisible by %number% [with [a] tolerance [of] %number%]
%numbers% (isn't|is not|aren't|are not) evenly divisible by %number% [with [a] tolerance [of] %number%]
%numbers% can be evenly divided by %number% [with [a] tolerance [of] %number%]
%numbers% (can't|can[ ]not) be evenly divided by %number% [with [a] tolerance [of] %number%]
Usage Examples
if 5 is evenly divisible by 5:
if 11 cannot be evenly divided by 10:
if 0.3 can be evenly divided by 0.1 with a tolerance of 0.0000001:
Spigot 1.20.5+

Checks whether an item is fire resistant.


Since 2.9.0
Syntax Patterns
%item types% (is|are) (fire resistant|resistant to fire)
%item types% (isn't|is not|aren't|are not) (fire resistant|resistant to fire)
Usage Examples
if player's tool is fire resistant:
if {_items::*} aren't resistant to fire:

Checks whether the fish hook is in open water.

Open water is defined by a 5x4x5 area of water, air and lily pads. If in open water, treasure items may be caught.


Since 2.10 Applicable Events

On Fishing

Syntax Patterns
%entities% (is|are) in open water[s]
%entities% (isn't|is not|aren't|are not) in open water[s]
Usage Examples
on fish catch:
if fish hook is in open water:
send "You will catch a shark soon!"

Checks whether an item is flammable.


Since 2.2-dev36
Syntax Patterns
%item types% (is|are) flammable
%item types% (isn't|is not|aren't|are not) flammable
Usage Examples
send whether the tag contents of minecraft tag "planks" are flammable
player's tool is flammable

Checks whether a player is flying.


Since 1.4.4
Syntax Patterns
%players% (is|are) flying
%players% (isn't|is not|aren't|are not) flying
Usage Examples
player is not flying

Checks if an entity was spawned from a mob spawner.


Since 2.10
Syntax Patterns
%entities% (is|are) from a [mob] spawner
%entities% (isn't|aren't|is not|are not) from a [mob] spawner
%entities% (was|were) spawned (from|by) a [mob] spawner
%entities% (wasn't|weren't|was not|were not) spawned (from|by) a [mob] spawner
Usage Examples
send whether target is from a mob spawner

Checks whether an entity is frozen.


Since 2.7
Syntax Patterns
%entities% (is|are) frozen
%entities% (isn't|is not|aren't|are not) frozen
Usage Examples
if player is frozen:
kill player

Checks whether an item can be used as fuel in a furnace.


Since 2.5.1
Syntax Patterns
%item types% (is|are) [furnace] fuel
%item types% (isn't|is not|aren't|are not) [furnace] fuel
Usage Examples
on right click on furnace:
if player's tool is not fuel:
send "Please hold a valid fuel item in your hand"
cancel event

Checks whether a living entity is gliding.


Since 2.7
Syntax Patterns
%living entities% (is|are) gliding
%living entities% (isn't|is not|aren't|are not) gliding
Usage Examples
if player is gliding

Checks whether an entity has one or both of their hands raised.

Hands are raised when an entity is using an item (eg: blocking, drawing a bow, eating).


Since 2.8.0
Syntax Patterns
%living entities%'[s] [main] hand[s] (is|are) raised
%living entities%'[s] [main] hand[s] (isn't|is not|aren't|are not) raised
[main] hand[s] of %living entities% (is|are) raised
[main] hand[s] of %living entities% (isn't|is not|aren't|are not) raised
%living entities%'[s] off[ |-]hand[s] (is|are) raised
%living entities%'[s] off[ |-]hand[s] (isn't|is not|aren't|are not) raised
off[ |-]hand[s] of %living entities% (is|are) raised
off[ |-]hand[s] of %living entities% (isn't|is not|aren't|are not) raised
Usage Examples
on damage of player:
if victim's main hand is raised:
drop player's tool at player
set player's tool to air

Checks whether a player is holding a specific item. Cannot be used with endermen, use 'entity is [not] an enderman holding <item type>' instead.


Since 1.0
Syntax Patterns
[%living entities%] ha(s|ve) %item types% in [main] hand
[%living entities%] (is|are) holding %item types% [in main hand]
[%living entities%] ha(s|ve) %item types% in off[(-| )]hand
[%living entities%] (is|are) holding %item types% in off[(-| )]hand
[%living entities%] (ha(s|ve) not|do[es]n't have) %item types% in [main] hand
[%living entities%] (is not|isn't) holding %item types% [in main hand]
[%living entities%] (ha(s|ve) not|do[es]n't have) %item types% in off[(-| )]hand
[%living entities%] (is not|isn't) holding %item types% in off[(-| )]hand
Usage Examples
player is holding a stick
victim isn't holding a diamond sword of sharpness

Checks whether or not a living entity is in love.


Since 2.10
Syntax Patterns
%living entities% (is|are) in lov(e|ing) [state|mode]
%living entities% (isn't|is not|aren't|are not) in lov(e|ing) [state|mode]
Usage Examples
on spawn of living entity:
if entity is in love:
broadcast "That was quick!"

Checks if an entity will create fire when it explodes. This condition is also usable in an explosion prime event.


Since 2.5
Syntax Patterns
%entities% ((is|are) incendiary|cause[s] a[n] (incendiary|fiery) explosion)
%entities% ((is not|are not|isn't|aren't) incendiary|(does not|do not|doesn't|don't) cause[s] a[n] (incendiary|fiery) explosion)
the [event(-| )]explosion (is|(is not|isn't)) (incendiary|fiery)
Usage Examples
on explosion prime:
if the explosion is fiery:
broadcast "A fiery explosive has been ignited!"

Checks whether potion effects or timespans are infinite.


Since 2.7
Syntax Patterns
%potion effects/time spans% (is|are) infinite
%potion effects/time spans% (isn't|is not|aren't|are not) infinite
Usage Examples
all of the active potion effects of the player are infinite
if timespan argument is infinite:

Checks wether or not a block is interactable.


Since 2.5.2
Syntax Patterns
%item types% (is|are) interactable
%item types% (isn't|is not|aren't|are not) interactable
Usage Examples
on block break:
if event-block is interactable:
cancel event
send "You cannot break interactable blocks!"

Checks whether a living entity is invisible.


Since 2.7
Syntax Patterns
%living entities% (is|are) (invisible|visible)
%living entities% (isn't|is not|aren't|are not) (invisible|visible)
Usage Examples
target entity is invisible

Checks whether an entity or a gamemode is invulnerable. For gamemodes, Paper and Minecraft 1.20.6 are required


Since 2.5, 2.10 (gamemode)
Syntax Patterns
%entities/gamemodes% (is|are) (invulnerable|invincible)
%entities/gamemodes% (isn't|is not|aren't|are not) (invulnerable|invincible)
Usage Examples
target entity is invulnerable
loop all gamemodes:
if loop-value is not invulnerable:
broadcast "the gamemode %loop-value% is vulnerable!"

Checks whether a living entity is jumping. This condition does not work on players.


Since 2.8.0
Syntax Patterns
%living entities% (is|are) jumping
%living entities% (isn't|is not|aren't|are not) jumping
Usage Examples
on spawn of zombie:
while event-entity is not jumping:
wait 5 ticks
push event-entity upwards

Checks to see if an entity is currently leashed.


Since 2.5
Syntax Patterns
%living entities% (is|are) leashed
%living entities% (isn't|is not|aren't|are not) leashed
Usage Examples
target entity is leashed

Checks whether a world, chunk or script is loaded.

'chunk at 1, 1' uses chunk coordinates, which are location coords divided by 16.


Since 2.3, 2.5 (revamp with chunk at location/coords), 2.10 (Scripts)
Syntax Patterns
chunk[s] %directions% [%locations%] (is|are)[((n't| not))] loaded
chunk [at] %number%, %number% (in|of) [world] %world% is[((n't| not))] loaded
%scripts/worlds% (is|are)[(n't| not)] loaded
script[s] %scripts% (is|are)[(n't| not)] loaded
world[s] %worlds% (is|are)[(n't| not)] loaded
Usage Examples
if chunk at {home::%player's uuid%} is loaded:
if chunk 1, 10 in world "world" is loaded:
if world("lobby") is loaded:
if script named "MyScript.sk" is loaded:

Checks whether an entity or block is lootable. Lootables are entities or blocks that can have a loot table.


Since 2.10
Syntax Patterns
%blocks/entities% (is|are) lootable
%blocks/entities% (isn't|is not|aren't|are not) lootable
Usage Examples
spawn a pig at event-location
set {_pig} to last spawned entity
if {_pig} is lootable:
set loot table of {_pig} to "minecraft:entities/cow"
# the pig will now drop the loot of a cow when killed, because it is indeed a lootable entity.
set block at event-location to chest
if block at event-location is lootable:
set loot table of block at event-location to "minecraft:chests/simple_dungeon"
# the chest will now generate the loot of a simple dungeon when opened, because it is indeed a lootable block.
set block at event-location to white wool
if block at event-location is lootable:
# uh oh, nothing will happen because a wool is not a lootable block.

Checks whether a vector is normalized i.e. length of 1


Since 2.5.1
Syntax Patterns
%vectors% (is|are) normalized
%vectors% (isn't|is not|aren't|are not) normalized
Usage Examples
vector of player's location is normalized

Checks whether an item is a block and completely blocks vision.


Since 2.5.1
Syntax Patterns
%item types% (is|are) occluding
%item types% (isn't|is not|aren't|are not) occluding
Usage Examples
player's tool is occluding

Checks whether an item or an entity is of the given type. This is mostly useful for variables, as you can use the general 'is' condition otherwise (e.g. 'victim is a creeper').


Since 1.4
Syntax Patterns
%item stacks/entities% (is|are) of type[s] %item types/entity types%
%item stacks/entities% (isn't|is not|aren't|are not) of type[s] %item types/entity types%
Usage Examples
tool is of type {selected type}
victim is of type {villager type}

Checks whether an entity is on ground.


Since 2.2-dev26
Syntax Patterns
%entities% (is|are) on [the] ground
%entities% (isn't|is not|aren't|are not) on [the] ground
Usage Examples
player is not on ground

Checks whether a player is online. The 'connected' pattern will return false once this player leaves the server, even if they rejoin. Be aware that using the 'connected' pattern with a variable will not have this special behavior. Use the direct event-player or other non-variable expression for best results.


Since 1.4
Syntax Patterns
%offline players% (is|are) (online|offline|connected)
%offline players% (isn't|is not|aren't|are not) (online|offline|connected)
Usage Examples
player is online
player-argument is offline
while player is connected:
wait 60 seconds
send "hello!" to player
# The following will act like `{_player} is online`.
# Using variables with `is connected` will not behave the same as with non-variables.
while {_player} is connected:
broadcast "online!"
wait 1 tick

Checks whether a player is a server operator.


Since 2.7
Syntax Patterns
%offline players% (is|are) [[a] server|an] op[erator][s]
%offline players% (isn't|is not|aren't|are not) [[a] server|an] op[erator][s]
Usage Examples
player is an operator

Checks whether a block is passable.

A block is passable if it has no colliding parts that would prevent players from moving through it.

Blocks like tall grass, flowers, signs, etc. are passable, but open doors, fence gates, trap doors, etc. are not because they still have parts that can be collided with.


Since 2.5.1
Syntax Patterns
%blocks% (is|are) passable
%blocks% (isn't|is not|aren't|are not) passable
Usage Examples
if player's targeted block is passable

Checks whether living entities are pathfinding.

Can only be a living entity that is a Mob.


Since 2.9.0
Syntax Patterns
%living entities% (is|are) pathfinding [to[wards] %living entity/location%]
%living entities% (isn't|is not|aren't|are not) pathfinding [to[wards] %living entity/location%]
Usage Examples
make {_entity} pathfind to {_location} at speed 2
while {_entity} is pathfinding
wait a second
launch flickering trailing burst firework colored red at location of {_entity}
subtract 10 from {defence::tower::health}
clear entity within {_entity}

Whether entities, players, or leaves are persistent.

Persistence of entities is whether they are retained through server restarts.

Persistence of leaves is whether they should decay when not connected to a log block within 6 meters.

Persistence of players is if the player's playerdata should be saved when they leave the server. Players' persistence is reset back to 'true' when they join the server.

Passengers inherit the persistence of their vehicle, meaning a persistent zombie put on a non-persistent chicken will become non-persistent. This does not apply to players.

By default, all entities are persistent.


Since 2.11
Syntax Patterns
%entities/blocks% (is|are) persistent
%entities/blocks% (isn't|is not|aren't|are not) persistent
Usage Examples
on spawn:
if event-entity is persistent:
make event-entity not persistent

Checks to see if an axolotl is playing dead.


Since 2.11
Syntax Patterns
%living entities% (is|are) playing dead
%living entities% (isn't|is not|aren't|are not) playing dead
Usage Examples
if last spawned axolotl is playing dead:
make last spawned axolotl stop playing dead

Check if a plugin is enabled/disabled on the server.

Plugin names can be found in the plugin's 'plugin.yml' file or by using the '/plugins' command, they are NOT the name of the plugin's jar file.

When checking if a plugin is not enabled, this will return true if the plugin is either disabled or not on the server.

When checking if a plugin is disabled, this will return true if the plugin is on the server and is disabled.


Since 2.6
Syntax Patterns
plugin[s] %texts% (is|are) enabled
plugin[s] %texts% (is|are)(n't| not) enabled
plugin[s] %texts% (is|are) disabled
Usage Examples
if plugin "Vault" is enabled:
if plugin "WorldGuard" is not enabled:
if plugins "Essentials" and "Vault" are enabled:
if plugin "MyBrokenPlugin" is disabled:

Checks whether an entity is poisoned.


Since 1.4.4
Syntax Patterns
%living entities% (is|are) poisoned
%living entities% (isn't|is not|aren't|are not) poisoned
Usage Examples
if the player is poisoned:
cure the player from poison
message "You have been cured!" to the player
1.16.5+, Paper 1.19.2+ (blockdata)

Checks whether an item is the preferred tool for a block. A preferred tool is one that will drop the block's item when used. For example, a wooden pickaxe is a preferred tool for grass and stone blocks, but not for iron ore.


Since 2.7
Syntax Patterns
%item types% (is|are) %blocks/block datas%'s preferred tool[s]
%item types% (is|are) [the|a] preferred tool[s] (for|of) %blocks/block datas%
%item types% (is|are)(n't| not) %blocks/block datas%'s preferred tool[s]
%item types% (is|are)(n't| not) [the|a] preferred tool[s] (for|of) %blocks/block datas%
Usage Examples
on left click:
event-block is set
if player's tool is the preferred tool for event-block:
break event-block naturally using player's tool
else:
cancel event
Minecraft 1.21.2+

Checks if a player is pressing a certain input key.


Since 2.10
Syntax Patterns
%players% (is|are) pressing %input keys%
%players% (isn't|is not|aren't|are not) pressing %input keys%
%players% (was|were) pressing %input keys%
%players% (wasn't|was not|weren't|were not) pressing %input keys%
Usage Examples
on player input:
if player is pressing forward movement key:
send "You are moving forward!"
New

Checks whether an interaction is responsive or not. Responsiveness determines whether clicking the entity will cause the clicker's arm to swing.


Since 2.14
Syntax Patterns
%entities% (is|are) (responsive|unresponsive)
%entities% (isn't|is not|aren't|are not) (responsive|unresponsive)
Usage Examples
if last spawned interaction is responsive:
if last spawned interaction is unresponsive:

Tests whether an entity is riding any entity, a specific entity type, or a specific entity.


Since 2.0, 2.11 (entities)
Syntax Patterns
%entities% (is|are) riding [%entity types/entities%]
%entities% (isn't|is not|aren't|are not) riding [%entity types/entities%]
Usage Examples
if player is riding:
if player is riding an entity:
if player is riding a saddled pig:
if player is riding last spawned horse:

Checks to see if an entity is currently using the Riptide enchantment.


Since 2.5
Syntax Patterns
%living entities% (is|are) riptiding
%living entities% (isn't|is not|aren't|are not) riptiding
Usage Examples
target entity is riptiding

Checks whether a given entity (horse or steerable) is saddled.

If 'properly' is used, this will only return true if the entity is wearing specifically a saddle item.


Since 2.10
Syntax Patterns
%living entities% (is|are) [properly] saddled
%living entities% (isn't|is not|aren't|are not) [properly] saddled
Usage Examples
send whether {_horse} is saddled

Check whether a goat or enderman is screaming.


Since 2.11
Syntax Patterns
%living entities% (is|are) screaming
%living entities% (isn't|is not|aren't|are not) screaming
Usage Examples
if last spawned goat is not screaming:
make last spawned goat scream
if {_enderman} is screaming:
force {_enderman} to stop screaming

Check if the current script, or another script, is currently loaded.


Since 2.2-dev31
Syntax Patterns
script[s] [%texts%] (is|are) loaded
script[s] [%texts%] (isn't|is not|aren't|are not) loaded
Usage Examples
script is loaded
script "example.sk" is loaded

Checks whether an entity is silent i.e. its sounds are disabled.


Since 2.5
Syntax Patterns
%entities% (is|are) silent
%entities% (isn't|is not|aren't|are not) silent
Usage Examples
target entity is silent

Checks whether an entity is sleeping.


Since 1.4.4, 2.11 (living entities)
Syntax Patterns
%living entities% (is|are) sleeping
%living entities% (isn't|is not|aren't|are not) sleeping
Usage Examples
if player is sleeping:
make player wake up without spawn location update
if last spawned fox is sleeping:
make last spawned fox stop sleeping

Tests whether a chunk is a so-called slime chunk.

Slimes can generally spawn in the swamp biome and in slime chunks.

For more info, see the Minecraft wiki.


Since 2.3
Syntax Patterns
%chunk% (is|are) ([a] slime chunk|slime chunks|slimey)
%chunk% (isn't|is not|aren't|are not) ([a] slime chunk|slime chunks|slimey)
Usage Examples
command /slimey:
trigger:
if chunk at player is a slime chunk:
send "Yeah, it is!"
else:
send "Nope, it isn't"

Checks whether a player is sneaking.


Since 1.4.4
Syntax Patterns
%players% (is|are) sneaking
%players% (isn't|is not|aren't|are not) sneaking
Usage Examples
# prevent mobs from seeing sneaking players if they are at least 4 meters apart
on target:
target is sneaking
distance of target and the entity is bigger than 4
cancel the event

Checks whether an item is solid.


Since 2.2-dev36
Syntax Patterns
%item types% (is|are) solid
%item types% (isn't|is not|aren't|are not) solid
Usage Examples
grass block is solid
player's tool isn't solid

Whether an entity type can be spawned in a world. Any general types such as 'monster, mob, entity, living entity' etc. will never be spawnable.


Since 2.13
Syntax Patterns
%entity types% is spawnable [in [the [world]] %world%]
%entity types% can be spawned [in [the [world]] %world%]
%entity types% (isn't|is not) spawnable [in [the [world]] %world%]
%entity types% (can't|can not) be spawned [in [the [world]] %world%]
Usage Examples
if a pig is spawnable in world "world": # true
if a monster can be spawned in {_world}: # false

Checks whether a player is sprinting.


Since 1.4.4
Syntax Patterns
%players% (is|are) sprinting
%players% (isn't|is not|aren't|are not) sprinting
Usage Examples
player is not sprinting

Checks whether an item is stackable.


Since 2.7
Syntax Patterns
%item stacks% (is|are) stackable
%item stacks% (isn't|is not|aren't|are not) stackable
Usage Examples
diamond axe is stackable
birch wood is stackable
torch is stackable

Checks whether a living entity is swimming.


Since 2.3
Syntax Patterns
%living entities% (is|are) swimming
%living entities% (isn't|is not|aren't|are not) swimming
Usage Examples
player is swimming

Checks whether an item, block, entity, or entitydata is tagged with the given tag.


Since 2.10
Syntax Patterns
%item types/entities/entity types% (is|are) tagged (as|with) %minecraft tags%
%item types/entities/entity types% (isn't|is not|aren't|are not) tagged (as|with) %minecraft tags%
Usage Examples
if player's tool is tagged with minecraft tag "enchantable/sharp_weapon":
enchant player's tool with sharpness 1
if all logs are tagged with tag "minecraft:logs"

Check if an entity is tameable.


Since 2.5
Syntax Patterns
%living entities% (is|are) tameable
%living entities% (isn't|is not|aren't|are not) tameable
Usage Examples
on damage:
if victim is tameable:
cancel event

Check if a tameable entity is tamed (horse, parrot, cat, etc.).


Since 2.10
Syntax Patterns
%entities% (is|are) (tamed|domesticated)
%entities% (isn't|is not|aren't|are not) (tamed|domesticated)
Usage Examples
send true if {_horse} is tamed
tame {_horse} if {_horse} is untamed

Checks if an entity is ticking.


Since 2.10
Syntax Patterns
%entities% (is|are) ticking
%entities% (isn't|is not|aren't|are not) ticking
Usage Examples
send true if target is ticking

Checks whether an item is transparent. Note that this condition may not work for all blocks, due to the transparency list used by Spigot not being completely accurate.


Since 2.2-dev36
Syntax Patterns
%item types% (is|are) transparent
%item types% (isn't|is not|aren't|are not) transparent
Usage Examples
player's tool is transparent.

Checks whether an item is unbreakable.


Since 2.5.1, 2.9.0 (breakable)
Syntax Patterns
%item types% (is|are) [un]breakable
%item types% (isn't|is not|aren't|are not) [un]breakable
Usage Examples
if event-item is unbreakable:
send "This item is unbreakable!" to player
if tool of {_p} is breakable:
send "Your tool is breakable!" to {_p}

Checks whether a script is using an experimental feature by name.


Since 2.9.0
Syntax Patterns
%script% is using %texts%
%scripts% are using %texts%
%script% is(n't| not) using %texts%
%scripts% are(n't| not) using %texts%
Usage Examples
the script is using "example feature"
on load:
if the script is using "example feature":
broadcast "You're using an experimental feature!"

Checks whether something (an entity, a script, a config, etc.) is valid.

An invalid entity may have died or de-spawned for some other reason.

An invalid script reference may have been reloaded, moved or disabled since.


Since 2.7, 2.10 (Scripts & Configs)
Syntax Patterns
%entities/scripts% (is|are) valid
%entities/scripts% (isn't|is not|aren't|are not) valid
Usage Examples
if event-entity is valid

Checks whether an entity is wearing some items (usually armor).


Since 1.0
Syntax Patterns
%living entities% (is|are) wearing %item types%
%living entities% (isn't|is not|aren't|are not) wearing %item types%
Usage Examples
player is wearing an iron chestplate and iron leggings
target is wearing wolf armor
MC 1.17+ (enforce)

Whether or not the server or a player is whitelisted, or the server is whitelist enforced.


Since 2.5.2, 2.9.0 (enforce, offline players)
Syntax Patterns
[the] server (is|(isn't|is not)) (in white[ ]list mode|white[ ]listed)
%offline players% (is|are|(isn't|is not|aren't|are not)) white[ ]listed
[the] server white[ ]list (is|(isn't|is not)) enforced
Usage Examples
if the player is whitelisted:
if the server is whitelisted:
if the server whitelist is enforced:
MC 1.17+ (within block)

Whether a location is within something else. The "something" can be a block, an entity, a chunk, a world, or a cuboid formed by two other locations.

Note that using the is between condition will refer to a straight line between locations, while this condition will refer to the cuboid between locations.


Since 2.7, 2.11 (world borders)
Syntax Patterns
%locations% (is|are) within %location% and %location%
%locations% (isn't|is not|aren't|are not) within %location% and %location%
%locations% (is|are) (within|in[side [of]]) %entities/chunks/worlds/worldborders/blocks%
%locations% (isn't|is not|aren't|are not) (within|in[side [of]]) %entities/chunks/worlds/worldborders/blocks%
Usage Examples
if player's location is within {_loc1} and {_loc2}:
send "You are in a PvP zone!" to player
if player is in world("world"):
send "You are in the overworld!" to player
if attacker's location is inside of victim:
cancel event
send "Back up!" to attacker and victim
if player is in world "world1" or world "world2":
kill player
if player is in world "world" and chunk at location(0, 0, 0):
give player 1 diamond

Checks whether a location is within a certain radius of another location.


Since 2.7
Syntax Patterns
%locations% (is|are) within %number% (block|metre|meter)[s] (around|of) %locations%
%locations% (isn't|is not|aren't|are not) within %number% (block|metre|meter)[s] (around|of) %locations%
Usage Examples
on damage:
if attacker's location is within 10 blocks around {_spawn}:
cancel event
send "You can't PVP in spawn."

Returns true if the input is NaN (not a number).


Since 2.8.0 Return Type

Boolean

Syntax Patterns
isNaN(n: number)
Usage Examples
isNaN(0) # false
isNaN(0/0) # true
isNaN(sqrt(-1)) # true

An item, e.g. a stack of torches, a furnace, or a wooden sword of sharpness 2. Unlike item type an item can only represent exactly one item (e.g. an upside-down cobblestone stair facing west), while an item type can represent a whole range of items (e.g. any cobble stone stairs regardless of direction).

You don't usually need this type except when you want to make a command that only accepts an exact item.

Please note that currently 'material' is exactly the same as 'item', i.e. can have an amount & enchantments.


Since 1.0
Syntax Patterns
<code>[<number> [of]] <alias> [of <enchantment> <level>]</code>, Where <alias> must be an alias that represents exactly one item (i.e cannot be a general alias like 'sword' or 'plant')
Usage Examples
set {_item} to type of the targeted block
{_item} is a torch

The item involved in an event, e.g. in a drop, dispense, pickup or craft event.


Since unknown (before 2.1) Return Type

Item

Syntax Patterns
[the] item
Usage Examples
on dispense:
item is a clock
set the time to 6:00

The amount of an item stack.


Since 2.2-dev24 Return Type

Number

Syntax Patterns
[the] item[[ ]stack] (amount|size|number) of %slots/item types/item stacks%
%slots/item types/item stacks%'[s] item[[ ]stack] (amount|size|number)
Usage Examples
send "You have got %item amount of player's tool% %player's tool% in your hand!" to player
Minecraft 1.21.2+

Represents an item component for items. i.e. equippable components.


Since 2.13
Minecraft 1.21.2+

Grab a copy of an item component of an item. Any changes made to the copy will not be present on the item.


Since 2.13 Return Type

Item Component

Syntax Patterns
[the|a[n]] [item] component copy of %item components%
[the] [item] component copies of %item components%
Usage Examples
set {_component} to the item component copy of (the equippable component of {_item})
MC 1.21.2 (cooldown group)

Gets the current cooldown of a provided item for a player. If the provided item has a cooldown group component specified the cooldown of the group will be prioritized. Otherwise the cooldown of the item material will be used.


Since 2.8.0, 2.12 (cooldown group) Return Type

Timespan

Syntax Patterns
[the] [item] cooldown of %item types% for %players%
%players%'[s] [item] cooldown for %item types%
Usage Examples
on right click using stick:
set item cooldown of player's tool for player to 1 minute
set item cooldown of stone and grass for all players to 20 seconds
reset item cooldown of cobblestone and dirt for all players

Prevent a dropped item from naturally despawning through Minecraft's timer.


Since 2.11
Syntax Patterns
(prevent|disallow) %itementities% from (naturally despawning|despawning naturally)
allow natural despawning of %itementities%
allow %itementities% to (naturally despawn|despawn naturally)
Usage Examples
prevent all dropped items from naturally despawning
allow all dropped items to naturally despawn

Returns or changes the item display transform of item displays.


Since 2.10 Return Type

Item Display Transforms

Syntax Patterns
[the] item [display] transform [of %displays%]
%displays%'[s] item [display] transform
Usage Examples
set the item transform of the last spawned item display to first person left handed
set the item transform of the last spawned item display to no transform # Reset to default

Represents the transform setting of an item display.


Since 2.10
Syntax Patterns
first person left handed, left handed in first person, right handed in third person, first person left hand, no transform, the ground, third person right hand, third person right handed, right handed in first person, menu, head, third person left hand, first person right handed, first person right hand, fixed position, left handed in third person, gui, ground, fixed, third person left handed

All the enchantments an item type has.


Since 2.2-dev36 Return Type

Enchantment Type

Syntax Patterns
[the] enchantments of %item types%
%item types%'[s] enchantments
Usage Examples
clear enchantments of event-item

Represents flags that may be applied to hide certain attributes of an item.


Since 2.10
Syntax Patterns
hide unbreakable, hide unbreakable status, hide destroys, hide additional tooltip, destroys hidden, hide enchants, stored enchantments hidden, hidden destroys, hidden stored enchants, dye hidden, stored enchants hidden, hidden enchants, hidden unbreakable status, hide armour trim, hidden stored enchantments, hide stored enchants, hide stored enchantments, hide attributes, hidden additional tooltip, hidden armor trim, hidden placed on, additional tooltip hidden, enchants hidden, enchantments hidden, attributes hidden, unbreakable status hidden, hidden dye color, hidden armour trim, unbreakable hidden, dye color hidden, hide enchantments, armour trim hidden, hidden unbreakable, hide dye color, hidden attributes, armor trim hidden, hide destroyable blocks, hide placed on, hidden dye, hide armor trim, hide breakable blocks, placed on hidden, hide dye

The item flags of an item. Can be modified.


Since 2.10 Return Type

Item Flag

Syntax Patterns
[the] item flags of %item types%
%item types%'[s] item flags
Usage Examples
set item flags of player's tool to hide enchants and hide attributes
add hide potion effects to item flags of player's held item
remove hide enchants from item flags of {legendary sword}

Condition Item Has Enchantment Glint Override

Section titled “ Condition Item Has Enchantment Glint Override”
Spigot 1.20.5+

Checks whether an item has the enchantment glint overridden, or is forced to glint or not.


Since 2.10
Syntax Patterns
%item types% (is|are) forced to [not] glint
%item types% (isn't|is not|aren't|are not) forced to [not] glint
Usage Examples
if the player's tool has the enchantment glint override
send "Your tool has the enchantment glint override." to player
if {_item} is forced to glint:
send "This item is forced to glint." to player
else if {_item} is forced to not glint:
send "This item is forced to not glint." to player
else:
send "This item does not have any glint override." to player

Condition Item Has Enchantment Glint Override

Section titled “ Condition Item Has Enchantment Glint Override”
Spigot 1.20.5+

Checks whether an item has the enchantment glint overridden, or is forced to glint or not.


Since 2.10
Syntax Patterns
%item types% (has|have) enchantment glint overrid(den|e)
%item types% (doesn't|does not|do not|don't) have enchantment glint overrid(den|e)
Usage Examples
if the player's tool has the enchantment glint override
send "Your tool has the enchantment glint override." to player
if {_item} is forced to glint:
send "This item is forced to glint." to player
else if {_item} is forced to not glint:
send "This item is forced to not glint." to player
else:
send "This item does not have any glint override." to player

An item associated with an entity. For dropped item entities, it gets the item that was dropped.

For item frames, the item inside the frame is returned.

For throwable projectiles (snowballs, enderpearls etc.) or item displays, it gets the displayed item.

Other entities do not have items associated with them.


Since 2.2-dev35, 2.2-dev36 (improved), 2.5.2 (throwable projectiles), 2.10 (item displays) Return Type

Slot

Syntax Patterns
[the] item [inside] of %entities%
%entities%'[s] item [inside]
Usage Examples
item of event-entity
set the item inside of event-entity to a diamond sword named "Example"
Spigot 1.20.5+

Show or hide the tooltip of an item.

If changing the 'entire' tooltip of an item, nothing will show up when a player hovers over it.

If changing the 'additional' tooltip, only specific parts (which change per item) will be hidden.


Since 2.9.0
Syntax Patterns
(show|reveal|hide) %item types%'[s] [entire|additional] tool[ ]tip
(show|reveal|hide) [the] [entire|additional] tool[ ]tip of %item types%
Usage Examples
hide the entire tooltip of player's tool
hide {_item}'s additional tool tip

An item type is an alias that can result in different items when added to an inventory, and unlike items they are well suited for checking whether an inventory contains a certain item or whether a certain item is of a certain type.

An item type can also have one or more enchantments with or without a specific level defined, and can optionally start with 'all' or 'every' to make this item type represent all types that the alias represents, including data ranges.


Since 1.0
Syntax Patterns
[<number> [of]] [all/every] <alias> [of <enchantment> [<level>] [,/and <more enchantments...>]]
Usage Examples
give 4 torches to the player
add oak slab to the inventory of the block
player's tool is a diamond sword of sharpness
block is dirt or farmland
Minecraft 1.21.4+ (boolean/string/color support)

Get an item with custom model data.


Since 2.5, 2.12 (boolean/string/color support) Return Type

Item Type

Syntax Patterns
%item type% with [custom] model data %numbers/booleans (yes/no)/texts/colors%
Usage Examples
give player a diamond sword with custom model data 2
set slot 1 of inventory of player to wooden hoe with custom model data 357
give player a diamond hoe with custom model data 2, true, true, "scythe", and rgb(0,0,100)
Spigot 1.20.5+

Get an item with or without enchantment glint.


Since 2.10 Return Type

Item Type

Syntax Patterns
%item types% with[out] [enchant[ment]] glint
Usage Examples
set {_item with glint} to diamond with enchantment glint
set {_item without glint} to diamond without enchantment glint

Creates a new item with the specified item flags.


Since 2.10, 2.11 (all itemflags) Return Type

Item Type

Syntax Patterns
%item types% with [the] item flag[s] %item flags%
%item types% with [the] %item flags% item flag[s]
%item types% with all [the] item flags
Usage Examples
give player diamond sword with item flags hide enchants and hide attributes
set {_item} to player's tool with item flag hide additional tooltip
give player torch with hide placed on item flag
set {_item} to diamond sword with all item flags

Returns the given item type with the specified lore added to it.

If multiple strings are passed, each of them will be a separate line in the lore.


Since 2.3 Return Type

Item Type

Syntax Patterns
%item type% with [(a|the)] lore %texts%
Usage Examples
set {_test} to stone with lore "line 1" and "line 2"
give {_test} to player
Minecraft 1.20.5+

Get an item with or without entire/additional tooltip.

If changing the 'entire' tooltip of an item, nothing will show up when a player hovers over it.

If changing the 'additional' tooltip, only specific parts (which change per item) will be hidden.


Since 2.11 Return Type

Item Type

Syntax Patterns
%item types% with[out] [entire|additional] tool[ ]tip[s]
Usage Examples
set {_item with additional tooltip} to diamond with additional tooltip
set {_item without entire tooltip} to diamond without entire tooltip

Items or blocks of a specific type, useful for looping.


Since 1.0 pre-5 Return Type

Item Type

Syntax Patterns
[all [[of] the]|the] block[[ ]type]s
every block[[ ]type]
[all [[of] the]|the|every] block[s] of type[s] %item types%
[all [[of] the]|the|every] item[s] of type[s] %item types%
Usage Examples
loop tag values of tag "diamond_ores" and tag values of tag "oak_logs":
block contains loop-item
message "Theres at least one %loop-item% in this block"
drop all blocks at the player # drops one of every block at the player

All items or specific type(s) of items in an inventory. Useful for looping or storing in a list variable.

Please note that the positions of the items in the inventory are not saved, only their order is preserved.


Since 2.0, 2.8.0 (specific types of items) Return Type

Slot

Syntax Patterns
[all [[of] the]] items ([with]in|of|contained in|out of) [inventor(y|ies)] %inventories%
all [[of] the] %item types% ([with]in|of|contained in|out of) [inventor(y|ies)] %inventories%
Usage Examples
loop all items in the player's inventory:
loop-item is enchanted
remove loop-item from the player
set {inventory::%uuid of player%::*} to items in the player's inventory

Joins several texts with a common delimiter (e.g. ", "), or splits a text into multiple texts at a given delimiter.


Since 2.1, 2.5.2 (regex support), 2.7 (case sensitivity), 2.10 (without trailing string) Return Type

Text

Syntax Patterns
(concat[enate]|join) %texts% [(with|using|by) [[the] delimiter] %text%]
split %text% (at|using|by) [[the] delimiter] %text% [with case sensitivity] [without [the] trailing [empty] (string|text)]
%text% split (at|using|by) [[the] delimiter] %text% [with case sensitivity] [without [the] trailing [empty] (string|text)]
regex split %text% (at|using|by) [[the] delimiter] %text% [without [the] trailing [empty] (string|text)]
regex %text% split (at|using|by) [[the] delimiter] %text% [without [the] trailing [empty] (string|text)]
Usage Examples
message "Online players: %join all players' names with "" | ""%" # %all players% would use the default "x, y, and z"
set {_s::*} to the string argument split at ","

Keeps the inventory or/and experiences of the dead player in a death event.


Since 2.4 Applicable Events

On Death

Syntax Patterns
keep [the] (inventory|items) [(and [e]xp[erience][s] [point[s]])]
keep [the] [e]xp[erience][s] [point[s]] [(and (inventory|items))]
Usage Examples
on death of a player:
if the victim is an op:
keep the inventory and experiences

This expression is used to explicitly pass the keys of an expression alongside its values.

For example, when setting a list variable or passing an expression to a function.


Since 2.12 Return Type

Object

Syntax Patterns
(keyed|indexed) %~objects%
Usage Examples
set {_first::foo} to "value1"
set {_first::bar} to "value2"
set {_second::*} to keyed {_first::*}
# {_second::foo} is "value1" and {_second::bar} is "value2"
function indices(objects: objects) returns strings:
return indices of {_objects::*}
on load:
set {_list::foo} to "value1"
set {_list::bar} to "value2"
set {_list::baz} to "value3"
broadcast indices({_list::*}) # "1", "2", "3"
broadcast indices(keyed {_list::*}) # "foo", "bar", "baz"
function plusOne(numbers: numbers) returns numbers:
loop {_numbers::*}:
set {_numbers::%loop-index%} to loop-value + 1
return {_numbers::*}
on load:
set {_numbers::foo} to 1
set {_numbers::bar} to 2
set {_numbers::baz} to 3
set {_result::*} to keyed plusOne(keyed {_numbers::*})
# {_result::foo} is 2, {_result::bar} is 3, {_result::baz} is 4

Kicks a player from the server.


Since 1.0
Syntax Patterns
kick %players% [(by reason of|because [of]|on account of|due to) %text%]
Usage Examples
on place of TNT, lava, or obsidian:
kick the player due to "You may not place %block%!"
cancel the event

Kills an entity.


Since 1.0, 2.10 (ignoring totem of undying)
Syntax Patterns
kill %entities%
Usage Examples
kill the player
kill all creepers in the player's world
kill all endermen, witches and bats

Apply the same velocity as a knockback to living entities in a direction. Mechanics such as knockback resistance will be factored in.


Since 2.7
Syntax Patterns
(apply knockback to|knock[back]) %living entities% [%direction%] [with (strength|force) %number%]
Usage Examples
knockback player north
knock victim (vector from attacker to victim) with strength 10

Currently selected game language of a player. The value of the language is not defined properly.

The vanilla Minecraft client will use lowercase language / country pairs separated by an underscore, but custom resource packs may use any format they wish.


Since 2.3 Return Type

Text

Syntax Patterns
[the] [([currently] selected|current)] [game] (language|locale) [setting] of %players%
%players%'[s] [([currently] selected|current)] [game] (language|locale) [setting]
Usage Examples
message player's current language

The last block or entity that attacked an entity.


Since 2.5.1 Return Type

Entity

Syntax Patterns
[the] last attacker of %entity%
%entity%'[s] last attacker
Usage Examples
send "%last attacker of event-entity%"

Gets the last caught runtime errors from a 'catch runtime errors' section.


Since 2.12 Return Type

Text

Syntax Patterns
[the] last caught [run[ ]time] errors
Usage Examples
catch runtime errors:
set worldborder center of {_border} to location(0, 0, NaN value)
if last caught runtime errors contains "Your location can't have a NaN value as one of its components":
set worldborder center of {_border} to location(0, 0, 0)

The last damage that was done to an entity. Note that changing it doesn't deal more/less damage.


Since 2.5.1 Return Type

Number

Syntax Patterns
[the] last damage of %living entities%
%living entities%'[s] last damage
Usage Examples
set last damage of event-entity to 2

Cause of last damage done to an entity


Since 2.2-Fixes-V10 Return Type

Damage Cause

Syntax Patterns
[the] last damage (cause|reason|type) of %living entities%
%living entities%'[s] last damage (cause|reason|type)
Usage Examples
set last damage cause of event-entity to fire tick

Gets the last death location of a player, or offline player, if available.

Can also be set, reset, and deleted if the player is online.


Since 2.10 Return Type

Location

Syntax Patterns
[the] [last] death location[s] of %offline players%
%offline players%'[s] [last] death location[s]
Usage Examples
set {_loc} to the last death location of player
teleport player to last death location of (random element out of all players)
New

Returns the date of the last attack (left click), or interaction (right click) on an interaction entity Using 'clicked on' will return the latest attack or interaction, whichever was more recent.


Since 2.14 Return Type

Date

Syntax Patterns
[the] last (date|time)[s] [that|when] %entities% (were|was) (attacked|interacted with|clicked [on])
Usage Examples
if the last time {_interaction} was clicked < 5 seconds ago
New

Returns the last player to attack (left click), or interact (right click) with an interaction entity. If 'click on' or 'clicked on' are used, this will return the last player to either attack or interact with the entity whichever was most recent.


Since 2.14 Return Type

Offline Player

Syntax Patterns
[the] last player[s] to (attack|interact with|click [on]) %entities%
[the] last player[s] (who|that) (attacked|interacted with|clicked [on]) %entities%
Usage Examples
kill the last player that attacked the last spawned interaction
feed the last player who interacted with {_i}

Returns the last loaded server icon with the load server icon effect.


Since 2.3 Return Type

Server Icon

Syntax Patterns
[the] [last[ly]] loaded server icon
Usage Examples
set {server-icon} to the last loaded server icon

Returns the last resource pack response received from a player.


Since 2.4 Return Type

Resource Pack State

Syntax Patterns
[the] [last] resource pack response[s] of %players%
%players%'[s] [last] resource pack response[s]
Usage Examples
if player's last resource pack response is deny or download fail:

Holds the entity that was spawned most recently with the spawn effect (section), dropped with the drop effect, shot with the shoot effect or created with the lightning effect. Please note that even though you can spawn multiple mobs simultaneously (e.g. with 'spawn 5 creepers'), only the last spawned mob is saved and can be used. If you spawn an entity, shoot a projectile and drop an item you can however access all them together.


Since 1.3 (spawned entity), 2.0 (shot entity), 2.2-dev26 (dropped item), 2.7 (struck lightning, firework) Return Type

Entity

Syntax Patterns
[the] [last[ly]] (spawned|shot) %*entity type%
[the] [last[ly]] dropped (item)
[the] [last[ly]] (created|struck) (lightning)
[the] [last[ly]] (launched|deployed) (firework)
Usage Examples
spawn a priest
set {healer::%spawned priest%} to true
shoot an arrow from the last spawned entity
ignite the shot projectile
drop a diamond sword
push last dropped item upwards
teleport player to last struck lightning
delete last launched firework

When a player last/first logged in the server. 'last login' requires paper to get the last login, otherwise it will get the last time they were seen on the server.


Since 2.5 Return Type

Date

Syntax Patterns
[the] (last|first) login of %offline players%
%offline players%'[s] (last|first) login
Usage Examples
command /onlinefor:
trigger:
send "You have been online for %difference between player's last login and now%."
send "You first joined the server %difference between player's first login and now% ago."

Launch firework effects at the given location(s).


Since 2.4
Syntax Patterns
(launch|deploy) [[a] firework [with effect[s]]] %firework effects% at %locations% [([with] (duration|power)|timed) %number%]
Usage Examples
launch ball large colored red, purple and white fading to light green and black at player's location with duration 1

Leash living entities to other entities. When trying to leash an Ender Dragon, Wither, Player, or a Bat, this effect will not work.

See Spigot's Javadocs for more info.


Since 2.3
Syntax Patterns
(leash|lead) %living entities% to %entity%
make %entity% (leash|lead) %living entities%
un(leash|lead) [holder of] %living entities%
Usage Examples
on right click:
leash event-entity to player
send "&aYou leashed &2%event-entity%!" to player

The leash holder of a living entity.


Since 2.3 Return Type

Entity

Syntax Patterns
[the] leash holder[s] of %living entities%
%living entities%'[s] leash holder[s]
Usage Examples
set {_example} to the leash holder of the target mob

Checks whether the leash item will drop during the leash detaching in an unleash event.


Since 2.10 Applicable Events

On Leash / Unleash

Syntax Patterns
[the] (lead|leash) [item] (will|(won't|will not)) (drop|be dropped)
Usage Examples
on unleash:
if the leash will drop:
prevent the leash from dropping
else:
allow the leash to drop

Checks if living entities or players are left or right-handed. Armor stands are neither right nor left-handed.


Since 2.8.0
Syntax Patterns
%living entities% (is|are) (left|right)( |-)handed
%living entities% (isn't|is not|aren't|are not) (left|right)( |-)handed
Usage Examples
on damage of player:
if victim is left handed:
cancel event

The length of a text, in number of characters.


Since 2.1 Return Type

Number

Syntax Patterns
[the] length of %texts%
%texts%'[s] length
Usage Examples
set {_l} to length of the string argument

The experience level of a player.


Since unknown (before 2.1), 2.13.2 (allow player default) Return Type

Number

Applicable Events

On Level Change

Syntax Patterns
[the] [xp|exp[erience]] level [of %players%]
%players%'[s] [xp|exp[erience]] level
Usage Examples
reduce the victim's level by 1
set the player's level to 0
on level change:
set {_diff} to future xp level - past exp level
broadcast "%player%'s level changed by %{_diff}%!"

The player's progress in reaching the next level, this represents the experience bar in the game. Please note that this value is between 0 and 1 (e.g. 0.5 = half experience bar).

Changing this value can cause the player's level to change if the resulting level progess is negative or larger than 1, e.g. increase the player's level progress by 0.5 will make the player gain a level if their progress was more than 50%.


Since 2.0 Return Type

Number

Applicable Events

On Level Change

Syntax Patterns
[the] level progress of %players%
%players%'[s] level progress
Usage Examples
# use the exp bar as mana
on rightclick with a blaze rod:
player's level progress is larger than 0.2
shoot a fireball from the player
reduce the player's level progress by 0.2
every 2 seconds:
loop all players:
level progress of loop-player is smaller than 0.9:
increase level progress of the loop-player by 0.1
else:
set level progress of the loop-player to 0.99
on xp spawn:
cancel event

Check to see whether lidded blocks (chests, shulkers, etc.) are open or closed.


Since 2.10
Syntax Patterns
[the] lid[s] of %blocks% (is|are) (open[ed]|close[d])
[the] lid[s] of %blocks% (isn't|is not|aren't|are not) (open[ed]|close[d])
%blocks%'[s] lid[s] (is|are) (open[ed]|close[d])
%blocks%'[s] lid[s] (isn't|is not|aren't|are not) (open[ed]|close[d])
Usage Examples
if the lid of {_chest} is closed:
open the lid of {_block}

Gets the light level at a certain location which ranges from 0 to 15.

It can be separated into sunlight (15 = direct sunlight, 1-14 = indirect) and block light (torches, glowstone, etc.). The total light level of a block is the maximum of the two different light types.


Since 1.3.4 Return Type

Number

Syntax Patterns
[(sky|sun|block)[ ]]light[ ]level [(of|%direction%) %location%]
Usage Examples
# set vampire players standing in bright sunlight on fire
every 5 seconds:
loop all players:
{vampire::%uuid of loop-player%} is true
sunlight level at the loop-player is greater than 10
ignite the loop-player for 5 seconds

Strike lightning at a given location. Can use 'lightning effect' to create a lightning that does not harm entities or start fires.


Since 1.4
Syntax Patterns
(create|strike) lightning[([ ]effect)] %directions% %locations%
Usage Examples
strike lightning at the player
strike lightning effect at the victim

A living entity, i.e. a mob or player, not inanimate entities like projectiles or dropped items.


Since 1.0
Syntax Patterns
see <a href='#entity'>entity</a>, but ignore inanimate objects
Usage Examples
spawn 5 powered creepers
shoot a zombie from the creeper

The natural logarithm. You probably don't need this if you don't know what this is.

Returns NaN (not a number) if the argument is negative.


Since 2.2 Return Type

Number

Syntax Patterns
ln(n: number)
Usage Examples
ln(1) = 0
ln(exp(5)) = 5
ln(2) = 0.6931

Loads server icons from the given files. You can get the loaded icon using the

last loaded server icon expression.

Please note that the image must be 64x64 and the file path starts from the server folder.


Since 2.3
Syntax Patterns
load [the] server icon (from|of) [the] [image] [file] %text%
Usage Examples
on load:
clear {server-icons::*}
loop 5 times:
load server icon from file "icons/%loop-number%.png"
add the last loaded server icon to {server-icons::*}
on server list ping:
set the icon to a random server icon out of {server-icons::*}

Load your worlds or unload your worlds

The load effect will create a new world if world doesn't already exist.

When attempting to load a normal vanilla world you must define it's environment i.e "world_nether" must be loaded with nether environment


Since 2.8.0
Syntax Patterns
load [the] world[s] %texts% [with environment %environment%]
unload [[the] world[s]] %worlds% [without saving]
Usage Examples
load world "world_nether" with environment nether
load the world "myCustomWorld"
unload "world_nether"
unload "world_the_end" without saving
unload all worlds

An expression to obtain a list of the names of the server's loaded plugins.


Since 2.7 Return Type

Text

Syntax Patterns
[(all [[of] the]|the)] [loaded] plugins
Usage Examples
if the loaded plugins contains "Vault":
broadcast "This server uses Vault plugin!"
send "Plugins (%size of loaded plugins%): %plugins%" to player

Suppresses target warnings from the current script.


Since 2.3
Syntax Patterns
[local[ly]] suppress [the] (conflict|variable save|[missing] conjunction|starting [with] expression[s]|deprecated syntax|unreachable code|constant condition[s]) warning[s]
Usage Examples
locally suppress missing conjunction warnings
suppress the variable save warnings

Creates a location from a world and 3 coordinates, with an optional yaw and pitch.

If for whatever reason the world is not found, it will fallback to the server's main world.


Since 2.2 Return Type

Location

Syntax Patterns
location(x: number, y: number, z: number, world: optional world, yaw: optional number, pitch: optional number)
Usage Examples
# TELEPORTING
teleport player to location(1,1,1, world "world")
teleport player to location(1,1,1, world "world", 100, 0)
teleport player to location(1,1,1, world "world", yaw of player, pitch of player)
teleport player to location(1,1,1, world of player)
teleport player to location(1,1,1, world("world"))
teleport player to location({_x}, {_y}, {_z}, {_w}, {_yaw}, {_pitch})
# SETTING BLOCKS
set block at location(1,1,1, world "world") to stone
set block at location(1,1,1, world "world", 100, 0) to stone
set block at location(1,1,1, world of player) to stone
set block at location(1,1,1, world("world")) to stone
set block at location({_x}, {_y}, {_z}, {_w}) to stone
# USING VARIABLES
set {_l1} to location(1,1,1)
set {_l2} to location(10,10,10)
set blocks within {_l1} and {_l2} to stone
if player is within {_l1} and {_l2}:
# OTHER
kill all entities in radius 50 around location(1,65,1, world "world")
delete all entities in radius 25 around location(50,50,50, world "world_nether")
ignite all entities in radius 25 around location(1,1,1, world of player)

A location in a world. Locations are world-specific and even store a direction, e.g. if you save a location and later teleport to it you will face the exact same direction you did when you saved the location.


Since 1.0
Usage Examples
teleport player to location at 0, 69, 0
set {home::%uuid of player%} to location of the player

The location where an event happened (e.g. at an entity or block), or a location relative to another (e.g. 1 meter above another location).


Since 2.0 Return Type

Location

Syntax Patterns
[the] [event-](location|position)
Usage Examples
drop 5 apples at the event-location # exactly the same as writing 'drop 5 apples'
set {_loc} to the location 1 meter above the player

The location where an event happened (e.g. at an entity or block), or a location relative to another (e.g. 1 meter above another location).


Since 2.0 Return Type

Location

Syntax Patterns
[the] (location|position) %directions% [%location%]
Usage Examples
drop 5 apples at the event-location # exactly the same as writing 'drop 5 apples'
set {_loc} to the location 1 meter above the player

The location of a block or entity. This not only represents the x, y and z coordinates of the location but also includes the world and the direction an entity is looking (e.g. teleporting to a saved location will make the teleported entity face the same saved direction every time).

Please note that the location of an entity is at it's feet, use head location to get the location of the head.


Since Return Type

Location

Syntax Patterns
(location|position) of %location%
%location%'[s] (location|position)
Usage Examples
set {home::%uuid of player%} to the location of the player
message "You home was set to %player's location% in %player's world%."

Allows to create a location from three coordinates and a world.


Since 2.0 Return Type

Location

Syntax Patterns
[the] (location|position) [at] [\(][x[ ][=[ ]]]%number%, [y[ ][=[ ]]]%number%, [and] [z[ ][=[ ]]]%number%[\)] [[(in|of) [[the] world]] %world%]
Usage Examples
set {_loc} to the location at arg-1, arg-2, arg-3 of the world arg-4
distance between the player and the location (0, 0, 0) is less than 200

A logarithm, with base 10 if none is specified. This is the inverse operation to exponentiation (for positive bases only), i.e. log(base ^ exponent, base) = exponent for any positive number 'base' and any number 'exponent'.

Another useful equation is base ^ log(a, base) = a for any numbers 'base' and 'a'.

Please note that due to how numbers are represented in computers, these equations do not hold for all numbers, as the computed values may slightly differ from the correct value.

Returns NaN (not a number) if any of the arguments are negative.


Since 2.2 Return Type

Number

Syntax Patterns
log(n: number, base: number = 10)
Usage Examples
log(100) = 2 # 10^2 = 100
log(16, 2) = 4 # 2^4 = 16

Writes text into a .log file. Skript will write these files to /plugins/Skript/logs.

NB: Using 'server.log' as the log file will write to the default server log. Omitting the log file altogether will log the message as '[Skript] [<script>.sk] <message>' in the server log.


Since 2.0, 2.9.0 (severities)
Syntax Patterns
log %texts% [(to|in) [file[s]] %texts%] [with [the|a] severity [of] (warning|severe)]
Usage Examples
on join:
log "%player% has just joined the server!"
on world change:
log "Someone just went to %event-world%!" to file "worldlog/worlds.log"
on command:
log "%player% just executed %full command%!" to file "server/commands.log" with a severity of warning

Forces the mob(s) or player(s) to look at an entity, vector or location. Vanilla max head pitches range from 10 to 50.


Since 2.7
Syntax Patterns
(force|make) %living entities% [to] (face [towards]|look [(at|towards)]) %entity%'s (feet|eyes) [(at|with) [head] [rotation] speed %number%] [[and] max[imum] [head] pitch %number%]
(force|make) %living entities% [to] (face [towards]|look [(at|towards)]) [the] (feet|eyes) of %entity% [(at|with) [head] [rotation] speed %number%] [[and] max[imum] [head] pitch %number%]
(force|make) %living entities% [to] (face [towards]|look [(at|towards)]) %vector/location/entity% [(at|with) [head] [rotation] speed %number%] [[and] max[imum] [head] pitch %number%]
Usage Examples
force the player to look towards event-entity's feet
on entity explosion:
set {_player} to the nearest player
{_player} is set
distance between {_player} and the event-location is less than 15
make {_player} look towards vector from the {_player} to location of the event-entity
force {_enderman} to face the block 3 meters above {_location} at head rotation speed 100.5 and max head pitch -40

Loop sections repeat their code with multiple values.

A loop will loop through all elements of the given expression, e.g. all players, worlds, items, etc. The conditions & effects inside the loop will be executed for every of those elements, which can be accessed with ‘loop-’, e.g. send "hello" to loop-player. When a condition inside a loop is not fulfilled the loop will start over with the next element of the loop. You can however use stop loop to exit the loop completely and resume code execution after the end of the loop.

Loopable Values

All expressions that represent more than one value, e.g. ‘all players’, ‘worlds’, etc., as well as list variables, can be looped. You can also use a list of expressions, e.g. loop the victim and the attacker, to execute the same code for only a few values.

List Variables

When looping list variables, you can also use loop-index in addition to loop-value inside the loop. loop-value is the value of the currently looped variable, and loop-index is the last part of the variable's name (the part where the list variable has its asterisk *).


Since 1.0
Syntax Patterns
loop %objects%
Usage Examples
loop all players:
send "Hello %loop-player%!" to loop-player
loop items in player's inventory:
if loop-item is dirt:
set loop-item to air
loop 10 times:
send title "%11 - loop-value%" and subtitle "seconds left until the game begins" to player for 1 second # 10, 9, 8 etc.
wait 1 second
loop {Coins::*}:
set {Coins::%loop-index%} to loop-value + 5 # Same as "add 5 to {Coins::%loop-index%}" where loop-index is the uuid of " +
"the player and loop-value is the number of coins for the player
loop shuffled (integers between 0 and 8):
if all:
previous loop-value = 1
loop-value = 4
next loop-value = 8
then:
kill all players

Returns the loop's current iteration count (for both normal and while loops).


Since 2.8.0 Return Type

Number

Syntax Patterns
[the] loop(-| )(counter|iteration)[-%*number%]
Usage Examples
while player is online:
give player 1 stone
wait 5 ticks
if loop-counter > 30:
stop loop
loop {top-balances::*}:
if loop-iteration <= 10:
broadcast "#%loop-iteration% %loop-index% has $%loop-value%"

Returns the previous, current, or next looped value.


Since 1.0, 2.8.0 (loop-counter), 2.10 (previous, next) Return Type

Object

Syntax Patterns
[the] [current] loop-<.+>
[the] next loop-<.+>
[the] previous loop-<.+>
Usage Examples
# Countdown
loop 10 times:
message "%11 - loop-number%"
wait a second
# Generate a 10x10 floor made of randomly colored wool below the player
loop blocks from the block below the player to the block 10 east of the block below the player:
loop blocks from the loop-block to the block 10 north of the loop-block:
set loop-block-2 to any wool
loop {top-balances::*}:
loop-iteration <= 10
send "#%loop-iteration% %loop-index% has $%loop-value%"
loop shuffled (integers between 0 and 8):
if all:
previous loop-value = 1
loop-value = 4
next loop-value = 8
then:
kill all players
MC 1.16+

The loot that will be generated in a 'loot generate' event.


Since 2.7 Return Type

Item

Syntax Patterns
[the] loot
Usage Examples
on loot generate:
chance of %10
add 64 diamonds to loot
send "You hit the jackpot!!"

Represents additional information a loot table can use to modify its generated loot.

Some loot tables will require some values (i.e. looter, location, looted entity) in a loot context when generating loot whereas others may not.

For example, the loot table of a simple dungeon chest will only require a location, whereas the loot table of a cow will require a looting player, looted entity, and location.

You can find more information about this in https://minecraft.wiki/w/Loot_context


Since 2.10

The loot context involved in the context create section.


Since 2.10 Return Type

Loot Context

Syntax Patterns
[the] loot[ ]context
Usage Examples
set {_context} to a new loot context at {_location}:
broadcast loot context

Returns the loot location of a loot context.


Since 2.10 Return Type

Location

Syntax Patterns
[the] loot[ing] [context] location [of %loot contexts%]
%loot contexts%'[s] loot[ing] [context] location
Usage Examples
set {_player} to player
set {_context} to a loot context at player:
if {_player} is in "world_nether":
set loot location to location of last spawned pig
send loot location of {_context} to player

Returns the items of a loot table using a loot context. Not specifying a loot context will use a loot context with a location at the world's origin.


Since 2.10 Return Type

Item

Syntax Patterns
[the] loot of %loot tables% [(with|using) %loot context%]
%loot tables%'[s] loot [(with|using) %loot context%]
Usage Examples
set {_items::*} to loot items of the loot table "minecraft:chests/simple_dungeon" with loot context {_context}
# this will set {_items::*} to the items that would be dropped from the simple dungeon loot table with the given loot context
give player loot items of entity's loot table with loot context {_context}
# this will give the player the items that the entity would drop with the given loot context

Loot tables represent what items should be in naturally generated containers, what items should be dropped when killing a mob, or what items can be fished.

You can find more information about this in https://minecraft.wiki/w/Loot_table


Since 2.10

Returns the loot table of an entity or block.

Setting the loot table of a block will update the block state, and once opened will generate loot of the specified loot table. Please note that doing so may cause warnings in the console due to over-filling the chest.

Please note that resetting/deleting the loot table of an ENTITY will reset the entity's loot table to its default.


Since 2.10 Return Type

Loot Table

Syntax Patterns
[the] loot[ ]table[s] of %entities/blocks%
%entities/blocks%'[s] loot[ ]table[s]
Usage Examples
set loot table of event-entity to "minecraft:entities/ghast"
# this will set the loot table of the entity to a ghast's loot table, thus dropping ghast tears and gunpowder
set loot table of event-block to "minecraft:chests/simple_dungeon"

Returns the loot table from a namespaced key.


Since 2.10 Return Type

Loot Table

Syntax Patterns
[the] loot[ ]table[s] %texts%
Usage Examples
set {_table} to loot table "minecraft:chests/simple_dungeon"

Returns the looted entity of a loot context.


Since 2.10 Return Type

Entity

Syntax Patterns
[the] looted entity [of %loot contexts%]
%loot contexts%'[s] looted entity
Usage Examples
set {_entity} to looted entity of {_context}
set {_context} to a loot context at player:
set loot luck value to 10
set looter to player
set looted entity to last spawned pig

Returns the looter of a loot context. Note that setting the looter will read the looter's tool enchantments (e.g. looting) when generating loot.


Since 2.10 Return Type

Player

Syntax Patterns
[the] (looter|looting player) [of %loot contexts%]
%loot contexts%'[s] (looter|looting player)
Usage Examples
set {_killer} to looter of {_context}
set {_context} to a loot context at player:
set loot luck value to 10
set looter to player
set looted entity to last spawned pig

An item's lore.


Since 2.1 Return Type

Text

Syntax Patterns
[the] lore of %item stack/item type%
%item stack/item type%'[s] lore
[the] line %number% of [the] lore of %item stack/item type%
[the] line %number% of %item stack/item type%'[s] lore
[the] %number%(st|nd|rd|th) line of [the] lore of %item stack/item type%
[the] %number%(st|nd|rd|th) line of %item stack/item type%'[s] lore
Usage Examples
set the 1st line of the item's lore to "&lt;orange&gt;Excalibur 2.0"

The amount of time the animals have been in love for. Using a value of 30 seconds is equivalent to using an item to breed them.

Only works on animals that can be bred and returns '0 seconds' for animals that can't be bred.


Since 2.10 Return Type

Timespan

Syntax Patterns
[the] love[d] time of %living entities%
%living entities%'[s] love[d] time
Usage Examples
on right click:
send "%event-entity% has been in love for %love time of event-entity% more than you!" to player

An expression to obtain the lowest or highest solid (impassable) block at a location.

Note that the y-coordinate of the location is not taken into account for this expression.


Since 2.2-dev34, 2.9.0 (lowest solid block, 'non-air' option removed, additional syntax option) Return Type

Block

Syntax Patterns
[the] (highest|lowest) [solid] block (at|of) %locations%
%locations%'[s] (highest|lowest) [solid] block
Usage Examples
teleport the player to the block above the highest block at the player
set the highest solid block at the player's location to the lowest solid block at the player's location

Returns the luck of a loot context as a float. This represents the luck potion effect that an entity can have.


Since 2.10 Return Type

Number

Syntax Patterns
[the] loot[ing] [context] luck [value|factor] [of %loot contexts%]
%loot contexts%'[s] loot[ing] [context] luck [value|factor]
Usage Examples
set {_luck} to loot luck value of {_context}
set {_context} to a loot context at player:
set loot luck value to 10
set looter to player
set looted entity to last spawned pig

Force a animal to become an adult or baby.


Since 2.10
Syntax Patterns
make %living entities% [a[n]] (adult|baby|child)
force %living entities% to be[come] a[n] (adult|baby|child)
Usage Examples
on spawn of mob:
entity is not an adult
make entity an adult

Make an allay duplicate itself.

This effect will always make an allay duplicate regardless of whether the duplicate attribute is disabled.


Since 2.11
Syntax Patterns
make %living entities% (duplicate|clone)
Usage Examples
make all allays duplicate

Sets whether or not entities will be able to breed. Only works on animals.


Since 2.10
Syntax Patterns
make %living entities% breedable
unsterilize %living entities%
make %living entities% (not |non(-| )|un)breedable
sterilize %living entities%
Usage Examples
on spawn of animal:
make entity unbreedable

Make a warden sense a disturbance at a location, causing the warden to investigate that area.

The warden will not investigate if the warden is aggressive towards an entity.

This effect does not add anger to the warden.


Since 2.11
Syntax Patterns
make %living entities% sense [a] disturbance %direction% %location%
Usage Examples
make last spawned warden sense a disturbance at location(0, 0, 0)

Makes the egg hatch in a Player Egg Throw event.


Since 2.7 Applicable Events

On Egg Throw

Syntax Patterns
make [the] egg [not] hatch
Usage Examples
on player egg throw:
# EGGS FOR DAYZ!
make the egg hatch

Make a goat or enderman start or stop screaming.


Since 2.11
Syntax Patterns
make %living entities% (start screaming|scream)
force %living entities% to (start screaming|scream)
make %living entities% stop screaming
force %living entities% to stop screaming
Usage Examples
make last spawned goat start screaming
force last spawned goat to stop screaming
make {_enderman} scream
force {_enderman} to stop screaming
Spigot 1.20.5+

Makes items fire resistant.


Since 2.9.0
Syntax Patterns
make %item types% [not] (fire resistant|resistant to fire)
Usage Examples
make player's tool fire resistant
make {_items::*} not resistant to fire

Forces a player to start/stop flying.


Since 2.2-dev34
Syntax Patterns
force %players% to [(start|stop)] fly[ing]
make %players% (start|stop) flying
make %players% fly
Usage Examples
make player fly
force all players to stop flying

Make a goat ram an entity.

Ramming does have a cooldown and currently no way to change it.


Since 2.11
Syntax Patterns
make %living entities% ram %living entity%
force %living entities% to ram %living entity%
Usage Examples
make all goats ram player

Sets if an entity's explosion will leave behind fire. This effect is also usable in an explosion prime event.


Since 2.5
Syntax Patterns
make %entities% [not] incendiary
make %entities%'[s] explosion [not] (incendiary|fiery)
make [the] [event(-| )]explosion [not] (incendiary|fiery)
Usage Examples
on explosion prime:
make the explosion fiery
New

Makes an interaction either responsive or unresponsive. This determines whether clicking the entity will cause the clicker's arm to swing. Interactions default to unresponsive.


Since 2.14
Syntax Patterns
make %entities% responsive
make %entities% (not |un)responsive
Usage Examples
make last spawned interaction responsive

Makes a living entity visible/invisible. This is not a potion and therefore does not have features such as a time limit or particles.

When setting an entity to invisible while using an invisibility potion on it, the potion will be overridden and when it runs out the entity keeps its invisibility.


Since 2.7
Syntax Patterns
make %living entities% (invisible|not visible)
make %living entities% (visible|not invisible)
Usage Examples
make target entity invisible

Makes an entity invulnerable/not invulnerable.


Since 2.5
Syntax Patterns
make %entities% (invulnerable|invincible)
make %entities% (not (invulnerable|invincible)|vulnerable|vincible)
Usage Examples
make target entity invulnerable

Make a panda start/stop rolling.


Since 2.11
Syntax Patterns
make %living entities% ((start rolling|roll)|stop rolling)
force %living entities% to (start|stop) rolling
Usage Examples
if last spawned panda is not rolling:
make last spawned panda start rolling

Make a panda start/stop sneezing.


Since 2.11
Syntax Patterns
make %living entities% ((start sneezing|sneeze)|stop sneezing)
force %living entities% to (start|stop) sneezing
Usage Examples
if last spawned panda is not sneezing:
make last spawned panda start sneezing

Forces a player to send a message to the chat. If the message starts with a slash it will force the player to use command.


Since 2.3
Syntax Patterns
make %players% (say|send [the] message[s]) %texts%
force %players% to (say|send [the] message[s]) %texts%
Usage Examples
make the player say "Hello."
force all players to send the message "I love this server"

Makes a sign (either a block or item) have glowing text or normal text


Since 2.8.0
Syntax Patterns
make %blocks/item types% have glowing text
make %blocks/item types% have (normal|non[-| ]glowing) text
Usage Examples
make target block of player have glowing text

Checks whether the defined strings match the input regexes (Regular expressions).


Since 2.5.2
Syntax Patterns
%texts% (match[es]|do[es](n't| not) match) %texts%
%texts% (partially match[es]|do[es](n't| not) partially match) %texts%
Usage Examples
on chat:
if message partially matches "\d":
send "Message contains a digit!"
if message doesn't match "[A-Za-z]+":
send "Message doesn't only contain letters!"

Returns the maximum number from a list of numbers.


Since 2.2 Return Type

Number

Syntax Patterns
max(ns: numbers)
Usage Examples
max(1) = 1
max(1, 2, 3, 4) = 4
max({some list variable::*})
Minecraft 1.20.5+ (custom amount)

The maximum durability of an item. Changing requires Minecraft 1.20.5+

Note: 'delete' will remove the max durability from the item (making it a non-damageable item). Delete requires Paper 1.21+


Since 2.5, 2.9.0 (change) Return Type

Number

Syntax Patterns
[the] max[imum] (durabilit(y|ies)|damage) of %item types/item stacks/slots%
%item types/item stacks/slots%'[s] max[imum] (durabilit(y|ies)|damage)
Usage Examples
maximum durability of diamond sword
if max durability of player's tool is not 0: # Item is damageable
set max durability of player's tool to 5000
add 5 to max durability of player's tool
reset max durability of player's tool
delete max durability of player's tool

The maximum health of an entity, e.g. 10 for a player.


Since 2.0 Return Type

Number

Applicable Events

On Damage

On Death

Syntax Patterns
[the] max[imum] health of %living entities%
%living entities%'[s] max[imum] health
Usage Examples
on join:
set the maximum health of the player to 100
spawn a giant
set the last spawned entity's max health to 1000

Returns the max duration an item can be used for before the action completes. E.g. it takes 1.6 seconds to drink a potion, or 1.4 seconds to load an unenchanted crossbow.

Some items, like bows and shields, do not have a limit to their use. They will return 1 hour.


Since 2.8.0 Return Type

Timespan

Syntax Patterns
[the] max[imum] [item] us(e|age) (time|duration) of %item stacks%
%item stacks%'[s] max[imum] [item] us(e|age) (time|duration)
Usage Examples
on right click:
broadcast max usage duration of player's tool

The maximum speed of a minecart.


Since 2.5.1 Return Type

Number

Syntax Patterns
[the] max[imum] minecart (speed|velocity) of %entities%
%entities%'[s] max[imum] minecart (speed|velocity)
Usage Examples
on right click on minecart:
set max minecart speed of event-entity to 1

The count of max players. This can be changed in a server list ping event only.

'real max players' returns the real count of max players of the server and can be modified on Paper 1.16 or later.


Since 2.3, 2.7 (modify max real players) Return Type

Number

Syntax Patterns
[the] [(real|default)|(fake|shown|displayed)] max[imum] player[s] [count|amount|number|size]
[the] [(real|default)|(fake|shown|displayed)] max[imum] (count|amount|number|size) of players
Usage Examples
on server list ping:
set the max players count to (online players count + 1)

A number representing the maximum value of a double number type.


Since 2.13 Return Type

Number

Syntax Patterns
[the] max[imum] double value
Usage Examples
if {_number} >= maximum double value:

A number representing the maximum value of a float number type.


Since 2.13 Return Type

Number

Syntax Patterns
[the] max[imum] float value
Usage Examples
if {_number} >= maximum float value:

The maximum amount of time an entity can spend in powdered snow before taking damage.


Since 2.7 Return Type

Timespan

Syntax Patterns
[the] max[imum] freeze time of %entities%
%entities%'[s] max[imum] freeze time
Usage Examples
difference between player's freeze time and player's max freeze time is less than 1 second:
send "you're about to freeze!" to the player

A number representing the maximum value of an integer number type.


Since 2.13 Return Type

Number

Syntax Patterns
[the] max[imum] integer value
Usage Examples
if {_number} >= maximum integer value:

A number representing the maximum value of a long number type.


Since 2.13 Return Type

Number

Syntax Patterns
[the] max[imum] long value
Usage Examples
if {_number} >= maximum long value:
Spigot 1.20.5+ (changeable)

The maximum stack size of an item (e.g. 64 for torches, 16 for buckets, 1 for swords, etc.) or inventory.

In 1.20.5+, the maximum stack size of items can be changed to any integer from 1 to 99, and stacked up to the maximum stack size of the inventory they're in.


Since 2.1, 2.10 (changeable, inventories) Return Type

Number

Syntax Patterns
[the] max[imum] stack[[ ]size] of %item types/inventories%
%item types/inventories%'[s] max[imum] stack[[ ]size]
Usage Examples
send "You can hold %max stack size of player's tool% of %type of player's tool% in a slot." to player
set the maximum stack size of inventory of all players to 16
add 8 to the maximum stack size of player's tool
reset the maximum stack size of {_gui}

A 'me' expression that can be used in players' effect commands only.


Since 2.1.1 Return Type

Player

Syntax Patterns
me
my[self]
Usage Examples
!heal me
!kick myself
!give a diamond axe to me

Get the mean (average) of a list of numbers.

You cannot get the mean of a set of numbers that includes infinity or NaN.


Since 2.11 Return Type

Number

Syntax Patterns
mean(numbers: numbers)
Usage Examples
mean(1, 2, 3) = 2
mean(0, 5, 10) = 5
mean(13, 97, 376, 709) = 298.75

Get the middle value of a sorted list of numbers. If the list has an even number of values, the median is the average of the two middle numbers.

You cannot get the median of a set of numbers that includes NaN.


Since 2.11 Return Type

Number

Syntax Patterns
median(numbers: numbers)
Usage Examples
median(1, 2, 3, 4, 5) = 3
median(1, 2, 3, 4, 5, 6) = 3.5
median(0, 123, 456, 789) = 289.5

The number of durability points an item is to be repaired in a mending event.

Modifying the repair amount will affect how much experience is given to the player after mending.


Since 2.5.1 Return Type

Number

Syntax Patterns
[the] [mending] repair amount
Usage Examples
on item mend:
set the mending repair amount to 100
Minecraft 1.16.4+ for optional sender

Sends a message to the given player. Only styles written

in given string or in formatted expressions will be parsed.

Adding an optional sender allows the messages to be sent as if a specific player sent them.

This is useful with Minecraft 1.16.4's new chat ignore system, in which players can choose to ignore other players,

but for this to work, the message needs to be sent from a player.


Since 1.0, 2.2-dev26 (advanced features), 2.5.2 (optional sender), 2.6 (sending objects)
Syntax Patterns
(message|send [message[s]]) %objects% [to %command senders%] [from %player%]
Usage Examples
message "A wild %player% appeared!"
message "This message is a distraction. Mwahaha!"
send "Your kill streak is %{kill streak::%uuid of player%}%" to player
if the targeted entity exists:
message "You're currently looking at a %type of the targeted entity%!"
on chat:
cancel event
send "[%player%] >> %message%" to all players from player

The (chat) message of a chat event, the join message of a join event, the quit message of a quit event, the death message of a death event or the broadcasted message in a broadcast event. This expression is mostly useful for being changed.


Since 1.4.6 (chat message), 1.4.9 (join & quit messages), 2.0 (death message), 2.9.0 (clear message), 2.10 (broadcasted message) Return Type

Text

Applicable Events

On Chat

On Join

On Quit

On Death

On Broadcast

Syntax Patterns
[the] [chat( |-)]message
[the] (join|log[ ]in)( |-)message
[the] (quit|leave|log[ ]out|kick)( |-)message
[the] death( |-)message
[the] broadcast(-|[ed] )message
Usage Examples
on chat:
player has permission "admin"
set message to "&c%message%"
on first join:
set join message to "Welcome %player% to our awesome server!"
on join:
player has played before
set join message to "Welcome back, %player%!"
on quit:
if {vanish::%player's uuid%} is set:
clear quit message
else:
set quit message to "%player% left this awesome server!"
on death:
set the death message to "%player% died!"
on broadcast:
set broadcast message to "&a[BROADCAST] %broadcast message%"

Metadata is a way to store temporary data on entities, blocks and more that disappears after a server restart.


Since 2.2-dev36, 2.10 (add, remove) Return Type

Object

Syntax Patterns
metadata [(value|tag)[s]] %texts% of %metadata holders%
%metadata holders%'[s] metadata [(value|tag)[s]] %text%
Usage Examples
set metadata value "healer" of player to true
broadcast "%metadata value "healer" of player%"
clear metadata value "healer" of player

Something that can hold metadata (e.g. an entity or block)


Since 2.2-dev36
Usage Examples
set metadata value "super cool" of player to true

Returns the middle/center of a location. In other words, returns the middle of the X, Z coordinates and the floor value of the Y coordinate of a location.


Since 2.6.1 Return Type

Location

Syntax Patterns
[the] (middle|center) [point] of %location%
%location%'[s] (middle|center) [point]
Usage Examples
command /stuck:
executable by: players
trigger:
teleport player to the center of player's location
send "You're no longer stuck."

Get the midpoint between two vectors or two locations in the same world.


Since 2.13 Return Type

Object

Syntax Patterns
[the] mid[-]point (of|between) %object% and %object%
Usage Examples
set {_center} to the midpoint between location(0, 0, 0) and location(10, 10, 10)
set {_centerBlock} to the block at {_center}
set {_midpoint} to the mid-point of vector(20, 10, 5) and vector(3, 6, 9)

Returns the minimum number from a list of numbers.


Since 2.2 Return Type

Number

Syntax Patterns
min(ns: numbers)
Usage Examples
min(1) = 1
min(1, 2, 3, 4) = 1
min({some list variable::*})

Expression Minecart Derailed / Flying Velocity

Section titled “ Expression Minecart Derailed / Flying Velocity”

The velocity of a minecart as soon as it has been derailed or as soon as it starts flying.


Since 2.5.1 Return Type

Vector

Syntax Patterns
[the] [minecart] (derailed|flying) velocity of %entities%
%entities%'[s] [minecart] (derailed|flying) velocity
Usage Examples
on right click on minecart:
set derailed velocity of event-entity to vector 2, 10, 2

A tag that classifies a material, or entity.


Since 2.10

A number representing the minimum value of a double number type.


Since 2.13 Return Type

Number

Syntax Patterns
[the] min[imum] double value
Usage Examples
if {_number} <= minimum double value:

A number representing the minimum value of a float number type.


Since 2.13 Return Type

Number

Syntax Patterns
[the] min[imum] float value
Usage Examples
if {_number} <= minimum float value:

A number representing the minimum value of an integer number type.


Since 2.13 Return Type

Number

Syntax Patterns
[the] min[imum] integer value
Usage Examples
if {_number} <= minimum integer value:

A number representing the minimum value of a long number type.


Since 2.13 Return Type

Number

Syntax Patterns
[the] min[imum] long value
Usage Examples
if {_number} <= minimum long value:

Returns the modulo of the given arguments, i.e. the remainder of the division d/m, where d and m are the arguments of this function.

The returned value is always positive. Returns NaN (not a number) if the second argument is zero.


Since 2.2 Return Type

Number

Syntax Patterns
mod(d: number, m: number)
Usage Examples
mod(3, 2) = 1
mod(256436, 100) = 36
mod(-1, 10) = 9

Represents the phase of a moon.


Since 2.7
Syntax Patterns
last quarter, waning crescent, waxing gibbous, full moon, waning gibbous, waxing crescent, new moon, first quarter

The current moon phase of a world.


Since 2.7 Return Type

Moon Phase

Syntax Patterns
[the] (lunar|moon) phase[s] of %worlds%
%worlds%'[s] (lunar|moon) phase[s]
Usage Examples
if moon phase of player's world is full moon:
send "Watch for the wolves!"

The message of the day in the server list. This can be changed in a server list ping event only.

'default MOTD' returns the default MOTD always and can't be changed.


Since 2.3 Return Type

Text

Syntax Patterns
[the] [(default)|(shown|displayed)] (MOTD|message of [the] day)
Usage Examples
on server list ping:
set the motd to "Join now!"

Blocks which are moved in a piston event. Cannot be used outside of piston events.


Since 2.2-dev27 Return Type

Block

Syntax Patterns
[the] moved blocks
Usage Examples
the moved blocks

Represents the Minecraft account name of a player, or the custom name of an item, entity, block, inventory, gamerule, world, script or function.

Players: The Minecraft account name of the player. Can't be changed.

Entities: The custom name of the entity. Can be changed. But for living entities, the players will have to target the entity to see its name tag. For non-living entities, the name will not be visible at all. To prevent this, use 'display name'.

Items: The custom name of the item (not the Minecraft locale name). Can be changed.

Inventories: The name/title of the inventory. Changing name of an inventory means opening the same inventory with the same contents but with a different name to its current viewers.

Gamerules: The name of the gamerule. Cannot be changed.

Worlds: The name of the world. Cannot be changed.

Scripts: The name of a script, excluding its file extension.


Since before 2.1, 2.2-dev20 (inventory name), 2.4 (non-living entity support, changeable inventory name), 2.7 (worlds) Return Type

Object

Syntax Patterns
[the] name[s] of %objects%
%objects%'[s] name[s]
Usage Examples
on join:
player has permission "name.red"
set the player's display name to "&lt;red&gt;[admin] &lt;gold&gt;%name of player%"
set the name of the player's tool to "Legendary Sword of Awesomeness"

A variety of Bukkit types that can have names, such as entities and some blocks.


Since 2.13

Directly names an item/inventory, useful for defining a named item/inventory in a script. If you want to (re)name existing items/inventories you can either use this expression or use set name of <item/inventory> to <text>.


Since 2.0, 2.2-dev34 (inventories) Return Type

Object

Syntax Patterns
%item type/inventory type% (named|with name[s]) %text%
Usage Examples
give a diamond sword of sharpness 100 named "<gold>Excalibur" to the player
set tool of player to the player's tool named "<gold>Wand"
set the name of the player's tool to "<gold>Wand"
open hopper inventory named "Magic Hopper" to player

A number representing an undefined value. NaN occurs as a result of illegal math, like dividing 0 by 0.

NaN is deliberately not equal to any other number, including itself.


Since 2.2-dev32d Return Type

Number

Syntax Patterns
NaN [value]
value of NaN
Usage Examples
if {_number} is not {_number}:
if isNaN({_number}) is true:

Gets the entity nearest to a location or another entity.


Since 2.7 Return Type

Entity

Syntax Patterns
[the] (nearest|closest) %*entity types% [[relative] to %entity/location%]
[the] %*entity types% (nearest|closest) [to %entity/location%]
Usage Examples
kill the nearest pig and cow relative to player
teleport player to the nearest cow relative to player
teleport player to the nearest entity relative to player
on click:
kill nearest pig

A number representing negative infinity.


Since 2.2-dev32d Return Type

Number

Syntax Patterns
(-|minus |negative )(infinity|∞) [value]
value of (-|minus |negative )(infinity|∞)
Usage Examples
if {_number} is -infinity:

Returns a line break separator.


Since 2.5 Return Type

Text

Syntax Patterns
nl
new[ ]line
line[ ]break
Usage Examples
send "Hello%nl%Goodbye!" to player
New

Create a new potion effect that can be applied to an entity or item type.


Since 2.5.2, 2.14 (syntax changes, infinite duration support) Return Type

Object

Syntax Patterns
[a[n]] [ambient] potion effect of %potion effect type% [[of tier] %number%] [for %time span%]
[an] (infinite|permanent) [ambient] potion effect of %potion effect type% [[of tier] %number%]
[an] (infinite|permanent) [ambient] %potion effect type% [[of tier] %number%] [potion [effect]]
[a] potion effect [of %potion effect type%] (from|using|based on) %potion effect%
Usage Examples
set {_potion} to a potion effect of speed 2 for 10 minutes:
hide the effect's icon
hide the effect's particles
add strength 5 to the potion effects of the player's tool
apply invisibility to the player for 5 minutes:
hide the effect's particles
add a potion effect of speed 1 to the potion effects of the player
# creates a potion effect with the properties of an existing potion effect
set {_potion} to a potion effect of slowness based on the player's speed effect
New

Create a new potion effect that can be applied to an entity or item type.


Since 2.5.2, 2.14 (syntax changes, infinite duration support) Return Type

Object

Syntax Patterns
%*potion effect type% %*number%
Usage Examples
set {_potion} to a potion effect of speed 2 for 10 minutes:
hide the effect's icon
hide the effect's particles
add strength 5 to the potion effects of the player's tool
apply invisibility to the player for 5 minutes:
hide the effect's particles
add a potion effect of speed 1 to the potion effects of the player
# creates a potion effect with the properties of an existing potion effect
set {_potion} to a potion effect of slowness based on the player's speed effect
Deprecated

The number of ticks that an entity is invulnerable to damage for.


Since 2.5, 2.11 (deprecated) Return Type

Number

Syntax Patterns
[the] (invulnerability|invincibility|no damage) tick[s] [of %living entities%]
%living entities%'[s] (invulnerability|invincibility|no damage) tick[s]
Usage Examples
on damage:
set victim's invulnerability ticks to 20 #Victim will not take damage for the next second

The amount of time an entity is invulnerable to any damage.


Since 2.11 Return Type

Timespan

Syntax Patterns
[the] (invulnerability|invincibility|no damage) time[[ ]span] [of %living entities%]
%living entities%'[s] (invulnerability|invincibility|no damage) time[[ ]span]
Usage Examples
on damage:
set victim's invulnerability time to 20 ticks #Victim will not take damage for the next second
if the no damage timespan of {_entity} is 0 seconds:
set the invincibility time span of {_entity} to 1 minute

A node (entry) from a script config file.

This may have navigable children.


Since 2.10
Usage Examples
the current script

Returns a node inside a config (or another section-node).

Nodes in Skript configs are written in the format `key: value`.

Section nodes can contain other nodes.


Since 2.10 Return Type

Node

Syntax Patterns
[the] node %text% (of|in) %node%
%node%'[s] node %text%
[the] nodes (of|in) %nodes%
%node%'[s] nodes
Usage Examples
set {_node} to node "language" in the skript config
if text value of {_node} is "french":
broadcast "Bonjour!"
set {_script} to the current script
loop nodes of the current script:
broadcast name of loop-value

The current system time of the server. Use time to get the Minecraft time of a world.


Since 1.4 Return Type

Date

Syntax Patterns
now
Usage Examples
broadcast "Current server time: %now%"

A number, e.g. 2.5, 3, -9812454, 30 degrees or 3.14 radians.

Please note that many expressions only need integers, i.e. will discard any fractional parts of any numbers without producing an error.

Radians will be converted to degrees.


Since 1.0
Syntax Patterns
[-]###[.###] [e[+|-]###] [[in ](rad[ian][s]|deg[ree][s])]
Usage Examples
set the player's health to 5.5
set {_temp} to 2*{_temp} - 2.5
set {_angle} to 3.14 in radians # will be converted to degrees

The number of something. Using 'number of {list::*}' will return the length of the list, so if you want the numbers of the things inside the lists, use 'numbers of {list::*}'.


Since 1.0, 2.13 (numbers of) Return Type

Object

Syntax Patterns
[the] number[s] of %objects%
%objects%'[s] number[s]
Usage Examples
message "There are %number of all players% players online!"

The number of uppercase, lowercase, or digit characters in a string.


Since 2.5 Return Type

Number

Syntax Patterns
number of upper[ ]case char(acters|s) in %text%
number of lower[ ]case char(acters|s) in %text%
number of digit char(acters|s) in %text%
Usage Examples
#Simple Chat Filter
on chat:
if number of uppercase chars in message / length of message > 0.5
cancel event
send "&lt;red&gt;Your message has to many caps!" to player

All numbers between two given numbers, useful for looping.

Use 'numbers' if your start is not an integer and you want to keep the fractional part of the start number constant, or use 'integers' if you only want to loop integers.

You may also use 'decimals' if you want to use the decimal precision of the start number.

You may want to use the 'times' expression instead, for instance 'loop 5 times:'


Since 1.4.6 (integers & numbers), 2.5.1 (decimals) Return Type

Number

Syntax Patterns
[(all [[of] the]|the)] (numbers|integers|decimals) (between|from) %number% (and|to) %number%
Usage Examples
loop numbers from 2.5 to 5.5: # loops 2.5, 3.5, 4.5, 5.5
loop integers from 2.9 to 5.1: # same as '3 to 5', i.e. loops 3, 4, 5
loop decimals from 3.94 to 4: # loops 3.94, 3.95, 3.96, 3.97, 3.98, 3.99, 4

The supertype of all types, meaning that if %object% is used in e.g. a condition it will accept all kinds of expressions.


Since 1.0
Usage Examples

A player that is possibly offline. See player for more information. Please note that while all effects and conditions that require a player can be used with an offline player as well, they will not work if the player is not actually online.


Since 2.0 beta 8
Syntax Patterns
Parsing an offline player as a player (online) will return nothing (none), for that case you would need to parse as offlineplayer which only returns nothing (none) if player doesn't exist in Minecraft databases (name not taken) otherwise it will return the player regardless of their online status.
Usage Examples
set {_p} to "Notch" parsed as an offlineplayer # returns Notch even if they're offline

All players that have ever joined the server. This includes the players currently online.


Since 2.2-dev35 Return Type

Offline Player

Syntax Patterns
[(all [[of] the]|the)] offline[ ]players
Usage Examples
send "Size of all players who have joined the server: %size of all offline players%"

Returns a offline player from their name or UUID. This function will still return the player if they're online. If Paper 1.16.5+ is used, the 'allowLookup' parameter can be set to false to prevent this function from doing a web lookup for players who have not joined before. Lookups can cause lag spikes of up to multiple seconds, so use offline players with caution.


Since 2.8.0, 2.9.0 (prevent lookups) Return Type

Offline Player

Syntax Patterns
offlineplayer(nameOrUUID: string, allowLookups: boolean = true)
Usage Examples
set {_p} to offlineplayer("Notch")
set {_p} to offlineplayer("069a79f4-44e9-4726-a5be-fca90e38aaf5")
set {_p} to offlineplayer("Notch", false)

Called when an anvil is damaged/broken from being used to repair/rename items.

Note: this does not include anvil damage from falling.


Since 2.7
Syntax Patterns
anvil damag(e|ing)
Usage Examples
on anvil damage:
cancel the event

Called when an item is put in a slot for repair by an anvil. Please note that this event is called multiple times in a single item slot move.


Since 2.7
Syntax Patterns
anvil prepar(e|ing)
Usage Examples
on anvil prepare:
event-item is set # result item
chance of 5%:
set repair cost to repair cost * 50%
send "You're LUCKY! You got 50% discount." to player

Called when area effect cloud applies its potion effect. This happens every 5 ticks by default.


Since 2.2-dev21
Syntax Patterns
(area|AoE) [cloud] effect
Usage Examples
on area cloud effect:

Called when a player swings their arm.


Since 2.5.1
Syntax Patterns
[player] arm swing
Usage Examples
on arm swing:
send "You swung your arm!"

Called when armor pieces of a player are changed.


Since 2.5, 2.11 (equipment slots)
Syntax Patterns
[player] armo[u]r change[d]
[player] %equipment slot% change[d]
Usage Examples
on armor change:
broadcast the old armor item
on helmet change:

Called when a bat attempts to go to sleep or wakes up.


Since 2.11
Syntax Patterns
bat toggle sleep
Usage Examples
on bat toggle sleep:

Called when a player changes the effects of a beacon.


Since 2.10
Syntax Patterns
beacon change effect
beacon effect change
player chang(e[s]|ing) [of] beacon effect
Usage Examples
on beacon effect change:
broadcast event-player
broadcast event-block
broadcast primary beacon effect
broadcast secondary beacon effect
on beacon change effect:
on player change beacon effect:

Called when a player gets an effect from a beacon.


Since 2.10
Syntax Patterns
[primary|secondary] beacon effect [of %potion effect types%]
application of [primary|secondary] beacon effect [of %potion effect types%]
[primary|secondary] beacon effect apply [of %potion effect types%]
Usage Examples
on beacon effect:
broadcast applied effect
broadcast event-player
broadcast event-block
on primary beacon effect apply of haste:
on application of secondary beacon effect:
on beacon effect of speed:

Called when a beacon is activated or deactivated.


Since 2.10
Syntax Patterns
beacon toggle
beacon activat(e|ion)
beacon deactivat(e|ion)
Usage Examples
on beacon toggle:
on beacon activate:
on beacon deactivate:

Called when a player starts sleeping.


Since 1.0
Syntax Patterns
bed enter[ing]
[player] enter[ing] [a] bed
Usage Examples
on bed enter:

Called when a player leaves a bed.


Since 1.0
Syntax Patterns
bed leav(e|ing)
[player] leav(e|ing) [a] bed
Usage Examples
on player leaving a bed:

Called when a bell resonates, highlighting nearby raiders.


Since 2.9.0
Syntax Patterns
bell resonat(e|ing)
Usage Examples
on bell resonate:
send "<red>Raiders are nearby!" to all players in radius 32 around event-block

Called when a bell is rung.


Since 2.9.0
Syntax Patterns
bell ring[ing]
Usage Examples
on bell ring:
send "<gold>Ding-dong!<reset>" to all players in radius 10 of event-block

Called when a player starts to break a block. You can usually just use the leftclick event for this.


Since 1.0
Syntax Patterns
block damag(ing|e)
Usage Examples
on block damaging:
if block is tagged with minecraft tag "logs":
send "You can't break the holy log!"

Called when a block broken by a player drops something.

  • event-player: The player that broke the block
  • past event-block: The block that was broken
  • event-block: The block after being broken
  • event-items (or drops): The drops of the block
  • event-entities: The entities of the dropped items

If the breaking of the block leads to others being broken, such as torches, they will appearin "event-items" and "event-entities".


Since 2.10
Syntax Patterns
block drop[ping] [[of] %item types/block datas%]
Usage Examples
on block drop:
broadcast event-player
broadcast past event-block
broadcast event-block
broadcast event-items
broadcast event-entities
on block drop of oak log:
Minecraft 1.13 or newer

Called when a player fertilizes blocks.


Since 2.5
Syntax Patterns
[block] fertilize
Usage Examples
on block fertilize:
send "Fertilized %size of fertilized blocks% blocks got fertilized."

Called when a crop grows. Alternative to new form of generic grow event.


Since 2.2-Fixes-V10
Syntax Patterns
(plant|crop|block) grow[(th|ing)] [[of] %item types%]
Usage Examples
on crop growth:

Called when a player edits a book.


Since 2.2-dev31
Syntax Patterns
book (edit|change|write)
Usage Examples
on book edit:

Called when a player signs a book.


Since 2.2-dev31
Syntax Patterns
book sign[ing]
Usage Examples
on book sign:

Called when a block is broken by a player. If you use 'on mine', only events where the broken block dropped something will call the trigger.


Since 1.0 (break), unknown (mine), 2.6 (BlockData support)
Syntax Patterns
[block] (break[ing]|min(e|ing)) [[of] %item types/block datas%]
Usage Examples
on mine:
on break of stone:
on break of chest[facing=north]:
on break of potatoes[age=7]:

Called when a brewing stand finishes brewing an ingredient and changes the potions.


Since 2.13
Syntax Patterns
brew[ing] [complet(e[d]|ion)|finish[ed]] [(of|for) %item types/potion effect types%]
Usage Examples
on brew:
broadcast event-item
on brewing of speed potion:
on brew finished for speed 2 potion:

Called when a brewing stand is about to use an item to increase its fuel level.


Since 2.13
Syntax Patterns
brew[ing [stand]] consum(e|ing) fuel [of %item types%]
brew[ing [stand]] fuel consumption [of %item types%]
Usage Examples
on brewing consume fuel:
prevent the brewing stand from consuming fuel
on brewing fuel consumption of blaze powder:

Called when a brewing stand starts brewing.


Since 2.13
Syntax Patterns
brew[ing] start[ed|ing]
Usage Examples
on brewing start:
set the brewing time to 1 second

Called when a message is broadcasted.


Since 2.10
Syntax Patterns
broadcast
Usage Examples
on broadcast:
set broadcast-message to "&c[BROADCAST] %broadcasted message%"
Syntax Patterns
bucket (catch[ing]|captur(e|ing)) [[of] %entity types%]

Called when a player empties a bucket. You can also use the place event with a check for water or lava.


Since 1.0
Syntax Patterns
bucket empty[ing]
[player] empty[ing] [a] bucket
Usage Examples
on bucket empty:

Called when a player fills a bucket.


Since 1.0
Syntax Patterns
bucket fill[ing]
[player] fill[ing] [a] bucket
Usage Examples
on player filling a bucket:

Called when a block is destroyed by fire.


Since 1.0, 2.6 (BlockData support)
Syntax Patterns
[block] burn[ing] [[of] %item types/block datas%]
Usage Examples
on burn:
on burn of oak wood, oak fences, or chests:
on burn of oak_log[axis=y]:

Called when a player rightclicks on a block while holding a block or a placeable item. You can either cancel the event to prevent the block from being built, or uncancel it to allow it.

Please note that the data value of the block to be placed is not available in this event, only its ID.


Since 1.0 (basic), 2.0 ([un]cancellable)
Syntax Patterns
[block] can build check
Usage Examples
on block can build check:
cancel event

Called whenever a player chats.

Use chat format to change message format.

Use chat recipients to edit chat recipients.


Since 1.4.1
Syntax Patterns
chat
Usage Examples
on chat:
if player has permission "owner":
set chat format to "&lt;red&gt;[player]&lt;light gray&gt;: &lt;light red&gt;[message]"
else if player has permission "admin":
set chat format to "&lt;light red&gt;[player]&lt;light gray&gt;: &lt;orange&gt;[message]"
else: #default message format
set chat format to "&lt;orange&gt;[player]&lt;light gray&gt;: &lt;white&gt;[message]"

Called after a new chunk was generated.


Since 1.0
Syntax Patterns
chunk (generat|populat)(e|ing)
Usage Examples
on chunk generate:

Called when a chunk loads. The chunk might or might not contain mobs when it's loaded.


Since 1.0
Syntax Patterns
chunk load[ing]
Usage Examples
on chunk load:

Called when a chunk is unloaded due to not being near any player.


Since 1.0
Syntax Patterns
chunk unload[ing]
Usage Examples
on chunk unload:

Called when a user clicks on a block, an entity or air with or without an item in their hand.

Please note that rightclick events with an empty hand while not looking at a block are not sent to the server, so there's no way to detect them.

Also note that a leftclick on an entity is an attack and thus not covered by the 'click' event, but the 'damage' event.


Since 1.0, 2.10 (blockdata)
Syntax Patterns
[(right|left)[( |-)]][mouse[( |-)]]click[ing] [on %entity type/item type/block data%] [(with|using|holding) %item type%]
[(right|left)[( |-)]][mouse[( |-)]]click[ing] (with|using|holding) %item type% on %entity type/item type/block data%
Usage Examples
on click:
on rightclick holding a fishing rod:
on leftclick on a stone or obsidian:
on rightclick on a creeper:
on click with a sword:
on click on chest[facing=north]:
on click on campfire[lit=true]:

Called when an entity is set on fire, e.g. by fire or lava, a fireball, or by standing in direct sunlight (zombies, skeletons).


Since 1.0
Syntax Patterns
combust[ing]
Usage Examples
on combust:

Called when a player enters a command (not necessarily a Skript command) but you can check if command is a skript command, see Is a Skript command condition.


Since 2.0
Syntax Patterns
command [%texts%]
Usage Examples
on command:
on command "/stop":
on command "pm Njol ":

Called when the player connects to the server. This event is called before the player actually joins the server, so if you want to prevent players from joining you should prefer this event over on join.


Since 2.0
Syntax Patterns
[player] connect[ing]
Usage Examples
on connect:
player doesn't have permission "VIP"
number of players is greater than 15
kick the player due to "The last 5 slots are reserved for VIP players."

Called when a player is done eating/drinking something, e.g. an apple, bread, meat, milk or a potion.


Since 2.0
Syntax Patterns
[player] ((eat|drink)[ing]|consum(e|ing)) [[of] %item types%]
Usage Examples
on consume:

Called when a player crafts an item.


Since unknown (before 2.1)
Syntax Patterns
[player] craft[ing] [[of] %item types%]
Usage Examples
on craft:

Called when a creeper is struck by lighting and gets powered. Cancel the event to prevent the creeper from being powered.


Since 1.0
Syntax Patterns
creeper power
Usage Examples
on creeper power:

Called when an entity receives damage, e.g. by an attack from another entity, lava, fire, drowning, fall, suffocation, etc.


Since 1.0, 2.7 (by entity)
Syntax Patterns
damag(e|ing) [of %entity type%] [by %entity type%]
Usage Examples
on damage:
on damage of a player:
on damage of player by zombie:

Called when a living entity (including players) dies.


Since 1.0
Syntax Patterns
death [of %entity types%]
Usage Examples
on death:
on death of player:
on death of a wither or ender dragon:
broadcast "A %entity% has been slain in %world%!"

Called when a dispenser dispenses an item.


Since unknown (before 2.1)
Syntax Patterns
dispens(e|ing) [[of] %item types%]
Usage Examples
on dispense of iron block:
send "that'd be 19.99 please!"

Called when a player drops an item from their inventory, or an entity drops an item, such as a chicken laying an egg.


Since unknown (before 2.1), 2.7 (entity)
Syntax Patterns
[player|entity] drop[ping] [[of] %item types%]
Usage Examples
on drop:
if event-item is compass:
cancel event
on entity drop of an egg:
if event-entity is a chicken:
set item of event-dropped item to a diamond

Called when a player throws an egg and it lands. You can just use the shoot event in most cases. However, this event allows modification of properties like the hatched entity type and the number of entities to hatch.


Since 1.0
Syntax Patterns
throw[ing] [of] [an] egg
[player] egg throw
Usage Examples
on throw of an egg:

Called when a player uses a firework to boost their fly speed when flying with an elytra.


Since 2.10
Syntax Patterns
elytra boost
Usage Examples
on elytra boost:
if the used firework will be consumed:
prevent the used firework from being consume

Called when a player successfully enchants an item.

To get the enchanted item, see the enchant item expression


Since 2.5
Syntax Patterns
[item] enchant
Usage Examples
on enchant:
if the clicked button is 1: # offer 1
set the applied enchantments to sharpness 10 and unbreaking 10

Called when a player puts an item into enchantment table. This event may be called multiple times.

To get the enchant item, see the enchant item expression


Since 2.5
Syntax Patterns
[item] enchant prepare
Usage Examples
on enchant prepare:
set enchant offer 1 to sharpness 1
set the cost of enchant offer 1 to 10 levels

Called when an enderman gets mad because a player looked at them.

Note: This does not stop enderman from targeting the player as a result of getting damaged.


Since 2.9.0
Syntax Patterns
enderman (enrage|anger)
Usage Examples
# Stops endermen from getting angry players with the permission "safeFrom.enderman"
on enderman enrage:
if player has permission "safeFrom.enderman":
cancel event

Event On Enderman/Sheep/Silverfish/Falling Block

Section titled “ Event On Enderman/Sheep/Silverfish/Falling Block”

Called when an enderman places or picks up a block, a sheep eats grass, a silverfish boops into/out of a block or a falling block lands and turns into a block respectively.

event-block represents the old block and event-blockdata represents the new replacement that'll be applied to the block.


Since unknown, 2.5.2 (falling block), 2.8.0 (any entity support)
Syntax Patterns
enderman place
enderman pickup
sheep eat
silverfish enter
silverfish exit
falling block fall[ing]
falling block land[ing]
(entity|%*-entitydatas%) chang(e|ing) block[s]
Usage Examples
on sheep eat:
kill event-entity
broadcast "A sheep stole some grass!"
on falling block land:
event-entity is a falling dirt
cancel event

Called whenever two animals begin to conceive a child. The type can be specified.


Since 2.10
Syntax Patterns
[entity] breed[ing] [of %entity types%]
Usage Examples
on breeding of llamas:
send "When a %breeding mother% and %breeding father% love each other very much they make %offspring%" to breeder

Called when an entity dismounts.


Since 2.2-dev13b
Syntax Patterns
dismount[ing]
Usage Examples
on dismount:
kill event-entity

Called when an entity jumps.


Since 2.7
Syntax Patterns
entity jump[ing]
Usage Examples
on entity jump:
if entity is a wither skeleton:
cancel event

Called when entity starts riding another.


Since 2.2-dev13b
Syntax Patterns
mount[ing]
Usage Examples
on mount:
cancel event
New

Called when an entity's potion effect is modified.


Since 2.10, 2.14 (action support)
Syntax Patterns
entity potion effect [modif[y|ication]] [[of] %potion effect types%] [%potion actions%] [due to %potion causes%]
Usage Examples
on entity potion effect modification:
broadcast "A potion effect was added to %event-entity%!"
on entity potion effect of night vision added:
message "You can now see in the dark!"
on entity potion effect of strength removed:
message "You're now weaker!"

Called when an entity shoots a bow. event-entity refers to the shot projectile/entity.


Since 2.11
Syntax Patterns
%entity types% shoot[ing] (bow|projectile)
Usage Examples
on player shoot bow:
chance of 30%:
damage event-slot by 10
send "Your bow has taken increased damage!" to shooter
on stray shooting bow:
set {_e} to event-entity
spawn a cow at {_e}:
set velocity of entity to velocity of {_e}
set event-entity to last spawned entity

Called when an entity is about to be replaced by another entity.

Examples when it's called include; when a zombie gets cured and a villager spawns, an entity drowns in water like a zombie that turns to a drown, an entity that gets frozen in powder snow, a mooshroom that when sheared, spawns a new cow.


Since 2.8.0
Syntax Patterns
(entit(y|ies)|%*-entitydatas%) transform[ing] [due to %transform reasons%]
Usage Examples
on a zombie transforming due to curing:
on mooshroom transforming:
on zombie, skeleton or slime transform:

Called when a player's experience changes.


Since 2.7
Syntax Patterns
[player] (level progress|[e]xp|experience) (change|update|increase|decrease)
Usage Examples
on level progress change:
set {_xp} to event-experience
broadcast "%{_xp}%"

Called when a player's experience cooldown changes.

Experience cooldown is how long until a player can pick up another orb of experience.


Since 2.10
Syntax Patterns
player (experience|[e]xp) cooldown change
Usage Examples
on player experience cooldown change:
broadcast event-player
broadcast event-timespan
broadcast past event-timespan
broadcast xp cooldown change reason

Called whenever experience is about to spawn.

Please note that this event will not fire for xp orbs spawned by plugins (including Skript) with Bukkit.


Since 2.0
Syntax Patterns
[e]xp[erience] [orb] spawn
spawn of [a[n]] [e]xp[erience] [orb]
Usage Examples
on xp spawn:
world is "minigame_world"
cancel event

Called when an entity (a primed TNT or a creeper) explodes.


Since 1.0
Syntax Patterns
explo(d(e|ing)|sion)
Usage Examples
on explosion:

Called when an explosive is primed, i.e. an entity will explode shortly. Creepers can abort the explosion if the player gets too far away, while TNT will explode for sure after a short time.


Since 1.0
Syntax Patterns
explosion prime
Usage Examples
on explosion prime:

Called when a block 'fades away', e.g. ice or snow melts.


Since 1.0, 2.6 (BlockData support)
Syntax Patterns
[block] fad(e|ing) [[of] %item types/block datas%]
Usage Examples
on fade of snow or blue ice:
on fade of snow[layers=2]

Called when a firework explodes.


Since 2.4
Syntax Patterns
[a] firework explo(d(e|ing)|sion) [colo[u]red %colors%]
Usage Examples
on firework explode:
if event-colors contains red:
on firework exploding colored red, light green and black:
on firework explosion colored rgb 0, 255, 0:
broadcast "A firework colored %colors% was exploded at %location%!"

Called when a player joins the server for the first time.


Since 1.3.7
Syntax Patterns
first (join|login)
Usage Examples
on first join:
broadcast "Welcome %player% to the server!"

Called when a player triggers a fishing event.

An entity hooked event is triggered when an entity gets caught by a fishing rod.

A fish escape event is called when the player fails to click on time, and the fish escapes.

A fish approaching event is when the bobber is waiting to be hooked, and a fish is approaching.

A fishing state change event is triggered whenever the fishing state changes.


Since 2.10, 2.11 (state change)
Syntax Patterns
[fishing] (line|rod) cast
fish (caught|catch)
entity (hook[ed]|caught|catch)
(bobber|hook) (in|hit) ground
fish (escape|get away)
[fishing] (rod|line) reel in
fish bit(e|ing)
(fish approach[ing]|(bobber|hook) lure[d])
fishing state change[d]
Usage Examples
on fishing line cast:
send "You caught a fish!" to player
on entity caught:
push event-entity vector from entity to player
on fishing state change:
if event-fishing state is fish caught:
broadcast "A fish has been caught!"

Called when a players stops/starts flying.


Since 2.2-dev36
Syntax Patterns
[player] flight toggl(e|ing)
[player] toggl(e|ing) flight
Usage Examples
on flight toggle:
if {game::%player%::playing} exists:
cancel event

Called when a blocks flows or teleports to another block. This not only applies to water and lava, but teleporting dragon eggs as well.


Since 1.0
Syntax Patterns
[block] flow[ing]
block mov(e|ing)
Usage Examples
on block flow:
if event-block is water:
broadcast "Build more dams! It's starting to get wet in here"

Called when a block is created, but not by a player, e.g. snow forms due to snowfall, water freezes in cold biomes. This isn't called when block spreads (mushroom growth, water physics etc.), as it has its own event (see spread event).


Since 1.0, 2.6 (BlockData support)
Syntax Patterns
[block] form[ing] [[of] %item types/block datas%]
Usage Examples
on form of snow:

Called when a furnace burns an item from its fuel slot.


Since 1.0, 2.10 (specific item)
Syntax Patterns
[furnace] fuel burn[ing] [of %item types%]
Usage Examples
on fuel burning:
broadcast fuel burned
if burned fuel is coal:
add 20 seconds to burn time

Called when a player takes any item out of the furnace.


Since 2.10
Syntax Patterns
furnace [item] extract[ion] [of %item types%]
Usage Examples
on furnace extract:
if event-items is an iron ingot:
remove event-items from event-player's inventory

Called when a player's gamemode changes.


Since 1.0
Syntax Patterns
game[ ]mode change [to %gamemode%]
Usage Examples
on gamemode change:
on gamemode change to adventure:

Called when an entity toggles glider on or off, or when server toggles gliding state of an entity forcibly.


Since 2.2-dev21
Syntax Patterns
(gliding state change|toggl(e|ing) gliding)
Usage Examples
on toggling gliding:
cancel the event # bad idea, but you CAN do it!

Called when a tree, giant mushroom or plant grows to next stage.

"of" matches any grow event, "from" matches only the old state, "into" matches only the new state,and "from into" requires matching both the old and new states.

Using "and" lists in this event is equivalent to using "or" lists. The event will trigger if any one of the elements is what grew.


Since 1.0, 2.2-dev20 (plants), 2.8.0 (from, into, blockdata)
Syntax Patterns
grow[th] [of (%tree types%|%item types/block datas%)]
grow[th] from %item types/block datas%
grow[th] [in]to (%tree types%|%item types/block datas%)
grow[th] from %item types/block datas% [in]to (%tree types%|%item types/block datas%)
Usage Examples
on grow:
on grow of tree:
on grow of wheat[age=7]:
on grow from a sapling:
on grow into tree:
on grow from a sapling into tree:
on grow of wheat, carrots, or potatoes:
on grow into tree, giant mushroom, cactus:
on grow from wheat[age=0] to wheat[age=1] or wheat[age=2]:

Called whenever a player swaps the items in their main- and offhand slots.

Works also when one or both of the slots are empty.

The event is called before the items are actually swapped,

so when you use the player's tool or player's offtool expressions,

they will return the values before the swap -

this enables you to cancel the event before anything happens.


Since 2.3
Syntax Patterns
swap[ping of] [(hand|held)] item[s]
Usage Examples
on swap hand items:
event-player's tool is a diamond sword
cancel event

Called when a player harvests a block. A block being harvested is when a block drops items and the state of the block is changed, but the block is not broken. An example is harvesting berries from a berry bush.


Since 2.12
Syntax Patterns
[player] [block|crop] harvest[ing] [of %item types/block datas%]
Usage Examples
on player block harvest:
send "You have harvested %event-block% that dropped %event-items% using your %item of event-slot% in your %event-equipment slot%"
on crop harvesting of sweet berry bush:
chance 5%:
set drops to a diamond
chance 1%
cancel the drops

Called when an entity is healed, e.g. by eating (players), being fed (pets), or by the effect of a potion of healing (overworld mobs) or harm (nether mobs).


Since 1.0, 2.9.0 (by reason)
Syntax Patterns
heal[ing] [of %entity types%] [(from|due to|by) %heal reasons%]
%entity types% heal[ing] [(from|due to|by) %heal reasons%]
Usage Examples
on heal:
on player healing from a regeneration potion:
on healing of a zombie, cow or a wither:
heal reason is healing potion
cancel event

Called when a horse jumps.


Since 2.5.1
Syntax Patterns
horse jump
Usage Examples
on horse jump:
push event-entity upwards at speed 2

Called when the hunger bar of a player changes, i.e. either increases by eating or decreases over time.


Since 1.4.4
Syntax Patterns
(food|hunger) (level|met(er|re)|bar) chang(e|ing)
Usage Examples
on food bar change:

Called when a block starts burning, i.e. a fire block is placed next to it and this block is flammable.

The burn event will be called when the block is about do be destroyed by the fire.


Since 1.0
Syntax Patterns
[block] ignit(e|ion)
Usage Examples
on block ignite:
if event-block is a ladder:
cancel event

Called when clicking on inventory slot.


Since 2.2-Fixes-V10
Syntax Patterns
[player] inventory(-| )click[ing] [[at] %item types%]
Usage Examples
on inventory click:
if event-item is stone:
give player 1 stone
remove 20$ from player's balance

Called when player's currently viewed inventory is closed.


Since 2.2-dev21
Syntax Patterns
inventory clos(ing|e[d])
Usage Examples
on inventory close:
if player's location is {location}:
send "You exited the shop!"

Called when a player drags an item in their cursor across the inventory.


Since 2.7
Syntax Patterns
inventory drag[ging]
Usage Examples
on inventory drag:
if player's current inventory is {_gui}:
send "You can't drag your items here!" to player
cancel event

Called when an entity or block (e.g. hopper) tries to move items directly from one inventory to another.

When this event is called, the initiator may have already removed the item from the source inventory and is ready to move it into the destination inventory.

If this event is cancelled, the items will be returned to the source inventory.


Since 2.8.0
Syntax Patterns
inventory item (move|transport)
inventory (mov(e|ing)|transport[ing]) [an] item
Usage Examples
on inventory item move:
broadcast "%holder of past event-inventory% is transporting %event-item% to %holder of event-inventory%!"

Called when an inventory is opened for player.


Since 2.2-dev21
Syntax Patterns
inventory open[ed]
Usage Examples
on inventory open:
close player's inventory

Called when an inventory (a hopper, a hopper minecart, etc.) picks up an item


Since 2.5.1
Syntax Patterns
inventory pick[ ]up
Usage Examples
on inventory pickup:

Called when a slot in a player's inventory is changed.

Warning: setting the event-slot to a new item can result in an infinite loop.


Since 2.7
Syntax Patterns
[player] inventory slot chang(e|ing)
Usage Examples
on inventory slot change:
if event-item is a diamond:
send "You obtained a diamond!" to player

Called when a player breaks their tool because its damage reached the maximum value.

This event cannot be cancelled.


Since 2.1.1
Syntax Patterns
[player] tool break[ing]
[player] break[ing] [(a|the)] tool
Usage Examples
on tool break:

Called when an item is damaged. Most tools are damaged by using them; armor is damaged when the wearer takes damage.


Since 2.5
Syntax Patterns
item damag(e|ing)
Usage Examples
on item damage:
cancel event

Called when an item is about to be despawned from the world, usually 5 minutes after it was dropped.


Since 2.2-dev35
Syntax Patterns
(item[ ][stack]|[item] %item types%) despawn[ing]
[item[ ][stack]] despawn[ing] [[of] %item types%]
Usage Examples
on item despawn of diamond:
send "Not my precious!"
cancel event
Minecraft 1.13 or newer

Called when a player has an item repaired via the Mending enchantment.


Since 2.5.1
Syntax Patterns
item mend[ing]
Usage Examples
on item mend:
chance of 50%:
cancel the event
send "Oops! Mending failed!" to player

Called when dropped items merge into a single stack. event-entity will be the entity which is trying to merge, and future event-entity will be the entity which is being merged into.


Since 2.2-dev35
Syntax Patterns
(item[ ][stack]|[item] %item types%) merg(e|ing)
item[ ][stack] merg(e|ing) [[of] %item types%]
Usage Examples
on item merge of gold blocks:
cancel event

Called whenever an item stack is spawned in a world, e.g. as drop of a block or mob, a player throwing items out of their inventory, or a dispenser dispensing an item (not shooting it).


Since unknown (before 2.1)
Syntax Patterns
item spawn[ing] [[of] %item types%]
Usage Examples
on item spawn of iron sword:
broadcast "Someone dropped an iron sword!"

Called when the player joins the server. The player is already in a world when this event is called, so if you want to prevent players from joining you should prefer on connect over this event.


Since 1.0
Syntax Patterns
[player] (login|logging in|join[ing])
Usage Examples
on join:
message "Welcome on our awesome server!"
broadcast "%player% just joined the server!"

Called whenever a player jumps.

This event requires PaperSpigot.


Since 2.3
Syntax Patterns
[player] jump[ing]
Usage Examples
on jump:
event-player does not have permission "jump"
cancel event

Called when a player is kicked from the server. You can change the kick message or cancel the event entirely.


Since 1.0
Syntax Patterns
[player] (kick|being kicked)
Usage Examples
on kick:

Called after a player changed their language in the game settings. You can use the language expression to get the current language of the player.


Since 2.3
Syntax Patterns
[player] (language|locale) chang(e|ing)
[player] chang(e|ing) (language|locale)
Usage Examples
on language change:
if player's language starts with "en":
send "Hello!"

Called when an entity is leashed or unleashed. Cancelling these events will prevent the leashing or unleashing from occurring.


Since 2.10
Syntax Patterns
[player] [un]leash[ing] [of %entity types%]
Usage Examples
on player leash of a sheep:
send "Baaaaa--" to player
on player leash:
send "<%event-entity%> Let me go!" to player
on unleash:
broadcast "<%event-entity%> I'm free"
on player unleash:
send "<%event-entity%> Thanks for freeing me!" to player

Called when a leaf block decays due to not being connected to a tree.


Since 1.0
Syntax Patterns
leaves decay[ing]
Usage Examples
on leaves decay:

Called when a player's level changes, e.g. by gathering experience or by enchanting something.


Since 1.0, 2.4 (level up/down)
Syntax Patterns
[player] level (change|up|down)
Usage Examples
on level change:

Called when lightning strikes.


Since 1.0
Syntax Patterns
lightning [strike]
Usage Examples
on lightning:
spawn a zombie at location of event-entity
MC 1.16+

Called when a loot table of an inventory is generated in the world.

For example, when opening a shipwreck chest.


Since 2.7
Syntax Patterns
loot generat(e|ing)
Usage Examples
on loot generate:
chance of 10%
add 64 diamonds to the loot
send "You hit the jackpot at %event-location%!"

Called whenever an entity enters a state of being in love.


Since 2.10
Syntax Patterns
[entity] enter[s] love mode
[entity] love mode [enter]
Usage Examples
on love mode enter:
cancel event # No one is allowed love here

Called when a player or entity moves or rotates their head.

NOTE: Move event will only be called when the entity/player moves position, keyword 'turn around' is for orientation (ie: looking around), and the combined syntax listens for both.

NOTE: These events can be performance heavy as they are called quite often.


Since 2.6, 2.8.0 (turn around)
Syntax Patterns
%entity type% (move|walk|step|(turn[ing] around|rotate))
%entity type% (move|walk|step) or (turn[ing] around|rotate)
%entity type% (turn[ing] around|rotate) or (move|walk|step)
Usage Examples
on player move:
if player does not have permission "player.can.move":
cancel event
on skeleton move:
if event-entity is not in world "world":
kill event-entity
on player turning around:
send action bar "You are currently turning your head around!" to player

Called when a player moves onto a certain type of block.

Please note that using this event can cause lag if there are many players online.


Since 2.0
Syntax Patterns
(step|walk)[ing] (on|over) %*item types%
Usage Examples
on walking on dirt or grass:
on stepping on stone:

Called when a physics check is done on a block. By cancelling this event you can prevent some things from happening, e.g. sand falling, dirt turning into grass, torches dropping if their supporting block is destroyed, etc.Please note that using this event might cause quite some lag since it gets called extremely often.


Since 1.4.6
Syntax Patterns
[block] physics
Usage Examples
# prevents sand from falling
on block physics:
block is sand
cancel event

Called when a player/entity picks up an item. Please note that the item is still on the ground when this event is called.


Since unknown (before 2.1), 2.5 (entity)
Syntax Patterns
[(player|entity)] (pick[ ]up|picking up) [[of] %item types%]
Usage Examples
on pick up:
on entity pickup of wheat:

Called when a pig is stroke by lightning and transformed into a zombie pigman. Cancel the event to prevent the transformation.


Since 1.0
Syntax Patterns
pig[ ]zap
Usage Examples
on pig zap:

Called when a piglin finishes bartering. A piglin may start bartering after picking up an item on its bartering list.

Cancelling will prevent piglins from dropping items, but will still make them pick up the input.


Since 2.10
Syntax Patterns
piglin (barter[ing]|trad(e|ing))
Usage Examples
on piglin barter:
if barter drops contain diamond:
send "Diamonds belong in the money pit!" to player
cancel event

Called when a piston is about to extend.


Since 1.0
Syntax Patterns
piston extend[ing]
Usage Examples
on piston extend:
broadcast "A piston is extending!"

Called when a piston is about to retract.


Since 1.0
Syntax Patterns
piston retract[ing]
Usage Examples
on piston retract:
broadcast "A piston is retracting!"

Called when a player places a block.


Since 1.0, 2.6 (BlockData support)
Syntax Patterns
[block] (plac(e|ing)|build[ing]) [[of] %item types/block datas%]
Usage Examples
on place:
on place of a furnace, crafting table or chest:
on break of chest[type=right] or chest[type=left]

Called when a player enters a chunk. Note that this event is based on 'player move' event, and may be called frequent internally.


Since 2.7
Syntax Patterns
[player] (enter[s] [a] chunk|chunk enter[ing])
Usage Examples
on player enters a chunk:
send "You entered a chunk: %past event-chunk% -> %event-chunk%!" to player

Called when a player has slept long enough to count as passing the night/storm.

Cancelling this event will prevent the player from being counted as deeply sleeping unless they exit and re-enter the bed.


Since 2.7
Syntax Patterns
[player] deep sleep[ing]
Usage Examples
on player deep sleeping:
send "Zzzz.." to player
Minecraft 1.21.3+

Called when a player sends an updated input to the server.

Note: The input keys event value is the set of keys the player is currently pressing, not the keys that were pressed or released.


Since 2.10
Syntax Patterns
[player] (toggle|toggling|press[ing]|release|releasing) of (%input keys%|(an|any) input key)
([player] %input keys%|[an|player] input key) (toggle|toggling|press[ing]|release|releasing)
Usage Examples
on input key press:
send "You are pressing: %event-inputkeys%" to player

Called when a player picks up an arrow from the ground.


Since 2.8.0
Syntax Patterns
[player] (pick[ing| ]up [an] arrow|arrow pick[ing| ]up)
Usage Examples
on arrow pickup:
cancel the event
teleport event-projectile to block 5 above event-projectile

Called when a player has traded with a villager.


Since 2.7
Syntax Patterns
player trad(e|ing)
Usage Examples
on player trade:
chance of 50%:
cancel event
send "The trade was somehow denied!" to player

Called when a player enters a world. Does not work with other entities!


Since 2.2-dev28
Syntax Patterns
[player] world chang(ing|e[d])
Usage Examples
on player world change:
world is "city"
send "Welcome to the City!"

Called when a player or an entity uses a nether or end portal. Note that 'on entity portal' event does not apply to players.

Cancel the event to prevent the entity from teleporting.


Since 1.0, 2.5.3 (entities), 2.13 (location changers)
Syntax Patterns
[player] portal
entity portal
Usage Examples
on portal:
broadcast "%player% has entered a portal!"
on player portal:
player's world is world("wilderness")
set world of event-location to player's world
add 9000 to x-pos of event-location
on entity portal:
broadcast "A %type of event-entity% has entered a portal!
Minecraft 1.14+ (event-entity support)

Called when a portal is created, either by a player or mob lighting an obsidian frame on fire, or by a nether portal creating its teleportation target in the nether/overworld.

In Minecraft 1.14+, you can use the player in this event.

Please note that there may not always be a player (or other entity) in this event.


Since 1.0, 2.5.3 (event-entity support)
Syntax Patterns
portal creat(e|ion)
Usage Examples
on portal create:

Called when an entity enters a nether portal or an end portal. Please note that this event will be fired many times for a nether portal.


Since 1.0
Syntax Patterns
portal enter[ing]
entering [a] portal
Usage Examples
on portal enter:

Called just before displaying crafting result to player. Note that setting the result item might or might not work due to Bukkit bugs.


Since 2.2-Fixes-V10
Syntax Patterns
[player] (preparing|beginning) craft[ing] [[of] %item types%]
Usage Examples
on preparing craft of torch:

Called when a player steps on a pressure plate or tripwire respectively.


Since 1.0 (pressure plate), 1.4.4 (tripwire)
Syntax Patterns
[step[ping] on] [a] [pressure] plate
(trip|[step[ping] on] [a] tripwire)
Usage Examples
on step on pressure plate:

Called when a projectile collides with an entity.


Since 2.5
Syntax Patterns
projectile collide
Usage Examples
on projectile collide:
teleport shooter of event-projectile to event-entity

Called when a projectile hits an entity or a block.


Since 1.0
Syntax Patterns
projectile hit
Usage Examples
on projectile hit:
if victim's health <= 3:
delete event-projectile

Called when a player leaves the server.


Since 1.0 (simple disconnection)
Syntax Patterns
(quit[ting]|disconnect[ing]|log[ ]out|logging out|leav(e|ing))
Usage Examples
on quit:
on disconnect:

Called when a player is firing a bow and the server is choosing an arrow to use.

Cancelling this event will skip the current arrow item and fire a new event for the next arrow item.

The arrow and bow in the event can be accessed with the Readied Arrow/Bow expression.


Since 2.8.0
Syntax Patterns
[player] ((ready|choose|draw|load) arrow|arrow (choose|draw|load))
Usage Examples
on player ready arrow:
selected bow's name is "Spectral Bow"
if selected arrow is not a spectral arrow:
cancel event

Called when the redstone current of a block changes. This event is of not much use yet.


Since 1.0
Syntax Patterns
redstone [current] [chang(e|ing)]
Usage Examples
on redstone change:
send "someone is using redstone" to console

Called when a player takes action on a resource pack request sent via the

send resource pack effect.

The resource pack condition can be used

to check the resource pack state.

This event will be triggered once when the player accepts or declines the resource pack request,

and once when the resource pack is successfully installed or failed to download.


Since 2.4
Syntax Patterns
resource pack [request] response
resource pack [request] %resource pack states%
Usage Examples
on resource pack request response:
if the resource pack was declined or failed to download:
on resource pack deny:
kick the player due to "You have to install the resource pack to play in this server!"

Called when a player respawns via death or entering the end portal in the end. You should prefer this event over the death event as the player is technically alive when this event is called.


Since 1.0
Syntax Patterns
[player] respawn[ing]
Usage Examples
on respawn:

Called when an entity dies, always. If they are not holding a totem, this is cancelled - you can, however, uncancel it.


Since 2.2-dev28
Syntax Patterns
[entity] resurrect[ion] [attempt]
Usage Examples
on resurrect attempt:
entity is player
entity has permission "admin.undying"
uncancel the event

Called when the player activates the riptide enchantment, using their trident to propel them through the air.

Note: the riptide action is performed client side, so manipulating the player in this event may have undesired effects.


Since 2.5
Syntax Patterns
[use of] riptide [enchant[ment]]
Usage Examples
on riptide:
send "You are riptiding!"

Called directly after the trigger is loaded, or directly before the whole script is unloaded.

The keyword 'async' indicates the trigger can be ran asynchronously,


Since 2.0
Syntax Patterns
[async] [script] (load|init|enable)
[async] [script] (unload|stop|disable)
Usage Examples
on load:
set {running::%script%} to true
on unload:
set {running::%script%} to false

Called when the server sends a list of commands to the player. This usually happens on join. The sent commands can be modified via the sent commands expression.

Modifications will affect what commands show up for the player to tab complete. They will not affect what commands the player can actually run.

Adding new commands to the list is illegal behavior and will be ignored.


Since 2.8.0
Syntax Patterns
send[ing] [of [the]] [server] command[s] list
[server] command list send
Usage Examples
on send command list:
set command list to command list where [input does not contain ":"]
remove "help" from command list

Called when a server list ping is coming in, generally when a Minecraft client pings the server to show its information in the server list.

The IP expression can be used to get the IP adress of the pinger.

This event can be cancelled on PaperSpigot 1.12.2+ only and this means the player will see the server as offline (but still can join).

Also you can use MOTD, Max Players, Online Players Count, Protocol Version, Version String, Hover List and Server Icon expressions, and Player Info Visibility and Hide Player from Server List effects to modify the server list.


Since 2.3
Syntax Patterns
server [list] ping
Usage Examples
on server list ping:
set the motd to "Welcome %{player-by-IP::%ip%}%! Join now!" if {player-by-IP::%ip%} is set, else "Join now!"
set the fake max players count to (online players count + 1)
set the shown icon to a random server icon out of {server-icons::*}

Called when the server starts or stops (actually, when Skript starts or stops, so a /reload will trigger these events as well).


Since 2.0
Syntax Patterns
(server|skript) (start|load|enable)
(server|skript) (stop|unload|disable)
Usage Examples
on skript start:
on server stop:

Called when sheep regrows its sheared wool back.


Since 2.2-dev21
Syntax Patterns
sheep [re]grow[ing] wool
Usage Examples
on sheep grow wool:
cancel event

Called whenever a projectile is shot. Use the shooter expression to get who shot the projectile.


Since 1.0
Syntax Patterns
[projectile] (shoot|launch)
Usage Examples
on shoot:
if projectile is an arrow:
send "you shot an arrow!" to shooter

As signs are placed empty, this event is called when a player is done editing a sign.


Since 1.0
Syntax Patterns
sign (chang[e]|edit)[ing]
[player] (chang[e]|edit)[ing] [a] sign
Usage Examples
on sign change:
line 2 is empty
set line 1 to "&lt;red&gt;%line 1%"

Called when a slime splits. Usually this happens when a big slime dies.


Since 2.2-dev26
Syntax Patterns
slime split[ting]
Usage Examples
on slime split:

Called when a furnace smelts an item in its input slot.


Since 1.0, 2.10 (specific item)
Syntax Patterns
[furnace] [ore] smelt[ed|ing] [of %item types%]
[furnace] smelt[ed|ing] of ore
Usage Examples
on smelt:
clear the smelted item
on smelt of raw iron:
broadcast smelted item
set the smelted item to iron block

Called when a player starts or stops sneaking. Use is sneaking to get whether the player was sneaking before the event was called.


Since 1.0
Syntax Patterns
[player] toggl(e|ing) sneak
[player] sneak toggl(e|ing)
Usage Examples
# make players that stop sneaking jump
on sneak toggle:
player is sneaking
push the player upwards at speed 0.5

Called when an entity spawns (excluding players).


Since 1.0, 2.5.1 (non-living entities)
Syntax Patterns
spawn[ing] [of %entity types%]
Usage Examples
on spawn of a zombie:
on spawn of an ender dragon:
broadcast "A dragon has been sighted in %world%!"

Called when the spawn point of a world changes.


Since 1.0
Syntax Patterns
[world] spawn change
Usage Examples
on spawn change:
broadcast "someone changed the spawn!"

Called with a player starts, stops or swaps spectating an entity.


Since 2.7
Syntax Patterns
[player] stop spectating [(of|from) %*entity types%]
[player] (swap|switch) spectating [(of|from) %*entity types%]
[player] start spectating [of %*entity types%]
Usage Examples
on player start spectating of a zombie:
Minecraft 1.13 or newer

Called when a sponge absorbs blocks.


Since 2.5
Syntax Patterns
sponge absorb
Usage Examples
on sponge absorb:
loop absorbed blocks:
broadcast "%loop-block% was absorbed by a sponge"!

Called when a new block forms as a result of a block that can spread, e.g. water or mushrooms.


Since 1.0
Syntax Patterns
spread[ing]
Usage Examples
on spread:

Called when a player starts or stops sprinting. Use is sprinting to get whether the player was sprinting before the event was called.


Since 1.0
Syntax Patterns
[player] toggl(e|ing) sprint
[player] sprint toggl(e|ing)
Usage Examples
on sprint toggle:
player is not sprinting
send "Run!"

Called when a furnace starts smelting an item in its ore slot.


Since 2.10
Syntax Patterns
[furnace] start [of] smelt[ing] [[of] %item types%]
[furnace] smelt[ing] start [of %item types%]
Usage Examples
on smelting start:
if the smelting item is raw iron:
set total cook time to 1 second
on smelting start of raw iron:
add 20 seconds to total cook time

Called when a player selects a recipe in a stonecutter.


Since 2.8.0
Syntax Patterns
stonecutting [[of] %item types%]
Usage Examples
on stonecutting stone slabs
cancel the event
on stonecutting:
broadcast "%player% is using stonecutter to craft %event-item%!"

Called when a player stops using an item. For example, when the player releases the interact button when holding a bow, an edible item, or a spyglass.

Note that event-timespan will return the time the item was used for.


Since 2.8.0
Syntax Patterns
[player] (stop|end) (using item|item use)
Usage Examples
on player stop using item:
broadcast "%player% used %event-item% for %event-timespan%."
1.13 or newer

Called when an entity swims or stops swimming.


Since 2.3
Syntax Patterns
[entity] toggl(e|ing) swim
[entity] swim toggl(e|ing)
Usage Examples
on swim toggle:
event-entity does not have permission "swim"
cancel event

Called when the local time of the system the server is running on reaches the provided real-life time.


Since 2.11
Syntax Patterns
at %times% [in] real time
Usage Examples
at 14:20 in real time:
at 2:30am real time:
at 6:10 pm in real time:
at 5:00 am and 5:00 pm in real time:
at 5:00 and 17:00 in real time:

Called when a player tames a wolf or ocelot. Can be cancelled to prevent the entity from being tamed.


Since 1.0
Syntax Patterns
[entity] tam(e|ing)
Usage Examples
on tame:

Called when a mob starts/stops following/attacking another entity, usually a player.


Since 1.0
Syntax Patterns
[entity] target
[entity] un[-]target
Usage Examples
on entity target:
target is a player

This event can be used to listen to teleports from non-players or player entities respectively.

When teleporting entities, the event may also be called due to a result of natural causes, such as an enderman or shulker teleporting, or wolves teleporting to players.

When teleporting players, the event can be called by teleporting through a nether/end portal, or by other means (e.g. plugins).


Since 1.0, 2.9.0 (entity teleport)
Syntax Patterns
[%entity types%] teleport[ing]
Usage Examples
on teleport:
on player teleport:
on creeper teleport:

Called whenever a player changes their held item by selecting a different slot (e.g. the keys 1-9 or the mouse wheel), not by dropping or replacing the item in the current slot.


Since 1.0
Syntax Patterns
[player['s]] (tool|item held|held item) chang(e|ing)
Usage Examples
on player's held item change:
Minecraft 1.21.1+

Called when a vault in a trial chamber is about to display an item.


Since 2.12
Syntax Patterns
vault display[ing] item
Usage Examples
on vault display item:
set event-item to a netherite ingot

Called when a vehicle collides with a block or entity.


Since 2.10
Syntax Patterns
vehicle collision [(with|of) [a[n]] %item types/block datas/entity types%]
vehicle block collision [(with|of) [a[n]] %item types/block datas%]
vehicle entity collision [(with|of) [a[n]] %entity types%]
Usage Examples
on vehicle collision:
on vehicle collision with obsidian:
on vehicle collision with a zombie:

Called when a new vehicle is created, e.g. when a player places a boat or minecart.


Since 1.0
Syntax Patterns
vehicle create
creat(e|ing|ion of) [a] vehicle
Usage Examples
on vehicle create:

Called when a vehicle gets damage. Too much damage will destroy the vehicle.


Since 1.0
Syntax Patterns
vehicle damage
damag(e|ing) [a] vehicle
Usage Examples
on vehicle damage:

Called when a vehicle is destroyed. Any passenger will be ejected and the vehicle might drop some item(s).


Since 1.0
Syntax Patterns
vehicle destroy
destr(oy[ing]|uction of) [a] vehicle
Usage Examples
on vehicle destroy:
cancel event

Called when an entity enters a vehicle, either deliberately (players) or by falling into them (mobs).


Since 1.0
Syntax Patterns
vehicle enter
enter[ing] [a] vehicle
Usage Examples
on vehicle enter:
entity is a player
cancel event

Called when an entity exits a vehicle.


Since 1.0
Syntax Patterns
vehicle exit
exit[ing] [a] vehicle
Usage Examples
on vehicle exit:
if event-entity is a spider:
kill event-entity

Called when a vehicle moves.

Please note that using this event can cause lag if there are multiple vehicle entities, i.e. Horse, Pig, Boat, Minecart


Since 2.10
Syntax Patterns
vehicle move
Usage Examples
on vehicle move:
broadcast past event-location
broadcast event-location

Called when a villager changes its career. Can be caused by being employed or losing their job.


Since 2.12
Syntax Patterns
villager career chang(e[d]|ing)
Usage Examples
on villager career change:
if all:
event-career change reason is employment
event-villager profession is armorer profession
then:
cancel event

Called when a world's weather changes.


Since 1.0
Syntax Patterns
weather change [to %weather types%]
Usage Examples
on weather change:
on weather change to sunny:

Called when a world border changes its bounds, either over time, or instantly.

This event does not get called for virtual borders.


Since 2.11
Syntax Patterns
world[ ]border [bounds] chang(e|ing)
Usage Examples
on worldborder bounds change:
broadcast "The diameter of %event-worldborder% is changing from %past event-number% to %event-number% over the next %event-timespan%"

Event On World Border Bounds Finish Change

Section titled “ Event On World Border Bounds Finish Change”

Called when a moving world border has finished its move.

This event does not get called for virtual borders.


Since 2.11
Syntax Patterns
world[ ]border [bounds] finish chang(e|ing)
Usage Examples
on worldborder bounds finish change:
broadcast "Over the past %event-timespan%, the diameter of %event-worldborder% went from %past event-number% to %event-number%"

Called when a world border's center has changed.

This event does not get called for virtual borders.


Since 2.11
Syntax Patterns
world[ ]border center chang(e|ing)
Usage Examples
on worldborder center change:
broadcast "The center of %event-worldborder% has moved from %past event-location% to %event-location%"

Called when a world is initialized. As all default worlds are initialized before

any scripts are loaded, this event is only called for newly created worlds.

World management plugins might change the behaviour of this event though.


Since 1.0, 2.8.0 (defining worlds)
Syntax Patterns
world init[ialization] [of %worlds%]
Usage Examples
on world init of "world_the_end":

Called when a world is loaded. As with the world init event, this event will not be called for the server's default world(s).


Since 1.0, 2.8.0 (defining worlds)
Syntax Patterns
world load[ing] [of %worlds%]
Usage Examples
on world load of "world_nether":
broadcast "The world %event-world% has been loaded!"

Called when a world is saved to disk. Usually all worlds are saved simultaneously, but world management plugins could change this.


Since 1.0, 2.8.0 (defining worlds)
Syntax Patterns
world sav(e|ing) [of %worlds%]
Usage Examples
on world save of "world":
broadcast "The world %event-world% has been saved"

Called when a world is unloaded. This event will never be called if you don't have a world management plugin.


Since 1.0, 2.8.0 (defining worlds)
Syntax Patterns
world unload[ing] [of %worlds%]
Usage Examples
on world unload:
broadcast "the %event-world% has been unloaded!"

Called when a zombie is done breaking a wooden door. Can be cancelled to prevent the zombie from breaking the door.


Since 1.0
Syntax Patterns
zombie break[ing] [a] [wood[en]] door
Usage Examples
on zombie breaking a wood door:

The kick message that is displayed on-screen when a player is kicked.


Since 2.12 Return Type

Text

Applicable Events

On Kick

Syntax Patterns
[the] on-screen kick message
Usage Examples
on kick:
on-screen kick message is "Invalid hotbar selection (Hacking?)"
cancel event

The amount of online players. This can be changed in a server list ping event only to show fake online player amount.

real online player count always return the real count of online players and can't be changed.


Since 2.3 Return Type

Number

Syntax Patterns
[the] [((real|default)|(fake|shown|displayed))] [online] player (count|amount|number)
[the] [((real|default)|(fake|shown|displayed))] (count|amount|number|size) of online players
Usage Examples
on server list ping:
# This will make the max players count 5 if there are 4 players online.
set the fake max players count to (online player count + 1)

Grant/revoke a user operator state.


Since 1.0
Syntax Patterns
[de[-]]op %offline players%
Usage Examples
op the player
deop all players
Minecraft 1.14.2+

Opens a written book to a player.


Since 2.5.1
Syntax Patterns
(open|show) book %item type% (to|for) %players%
Usage Examples
open book player's tool to player

Opens an inventory to a player. The player can then access and modify the inventory as if it was a chest that he just opened.

Please note that currently 'show' and 'open' have the same effect, but 'show' will eventually show an unmodifiable view of the inventory in the future.


Since 2.0, 2.1.1 (closing), 2.2-Fixes-V10 (anvil), 2.4 (hopper, dropper, dispenser
Syntax Patterns
(open|show) (((crafting [table]|workbench)|chest|anvil|hopper|dropper|dispenser) [(view|window|inventory)]|%inventory/inventory type%) (to|for) %players%
close [the] inventory [view] (to|of|for) %players%
close %players%'[s] inventory [view]
Usage Examples
show the victim's inventory to the player
open the player's inventory for the player

Open or close the lid of the block(s).


Since 2.10
Syntax Patterns
(open|close) [the] lid[s] (of|for) %blocks%
(open|close) %blocks%'[s] lid[s]
Usage Examples
open the lid of {_chest}
close the lid of {_blocks::*}

Return the currently opened inventory of a player.

If no inventory is open, it returns the own player's crafting inventory.


Since 2.2-dev24, 2.2-dev35 (Just 'current inventory' works in player events) Return Type

Inventory

Syntax Patterns
[the] (current|open|top) inventory [of %players%]
%players%'[s] (current|open|top) inventory
Usage Examples
set slot 1 of player's current inventory to diamond sword

Options are used for replacing parts of a script with something else.

For example, an option may represent a message that appears in multiple locations.

Take a look at the example below that showcases this.


Since 1.0
Syntax Patterns
options
Usage Examples
options:
no_permission: You're missing the required permission to execute this command!
command /ping:
permission: command.ping
permission message: {@no_permission}
trigger:
message "Pong!"
command /pong:
permission: command.pong
permission message: {@no_permission}
trigger:
message "Ping!"

The main or hidden gene of a panda.


Since 2.11 Return Type

Gene

Syntax Patterns
[the] (main|hidden) gene[s] of %living entities%
%living entities%'[s] (main|hidden) gene[s]
Usage Examples
if the main gene of last spawned panda is lazy:
set the main gene of last spawned panda to playful

Whether a panda is on its back.


Since 2.11
Syntax Patterns
%living entities% (is|are) on (its|their) back[s]
%living entities% (isn't|is not|aren't|are not) on (its|their) back[s]
Usage Examples
if last spawned panda is on its back:
make last spawned panda get off its back

Whether a panda is rolling.


Since 2.11
Syntax Patterns
%living entities% (is|are) rolling
%living entities% (isn't|is not|aren't|are not) rolling
Usage Examples
if last spawned panda is rolling:
make last spawned panda stop rolling

Whether a panda is scared.


Since 2.11
Syntax Patterns
%living entities% (is|are) scared
%living entities% (isn't|is not|aren't|are not) scared
Usage Examples
if last spawned panda is scared:

Whether a panda is sneezing.


Since 2.11
Syntax Patterns
%living entities% (is|are) sneezing
%living entities% (isn't|is not|aren't|are not) sneezing
Usage Examples
if last spawned panda is sneezing:
make last spawned panda stop sneezing

Parses text as a given type, or as a given pattern.

This expression can be used in two different ways: One which parses the entire text as a single instance of a type, e.g. as a number, and one that parses the text according to a pattern.

If the given text could not be parsed, this expression will return nothing and the parse error will be set if some information is available.

Some notes about parsing with a pattern:

- The pattern must be a Skript pattern, e.g. percent signs are used to define where to parse which types, e.g. put a %number% or %items% in the pattern if you expect a number or some items there.

- You have to save the expression's value in a list variable, e.g. set {parsed::*} to message parsed as "...".

- The list variable will contain the parsed values from all %types% in the pattern in order. If a type was plural, e.g. %items%, the variable's value at the respective index will be a list variable, e.g. the values will be stored in {parsed::1::*}, not {parsed::1}.


Since 2.0 Return Type

Object

Syntax Patterns
%text% parsed as (%*type%|"<.*>")
Usage Examples
set {var} to line 1 parsed as number
on chat:
set {var::*} to message parsed as "buying %items% for %money%"
if parse error is set:
message "%parse error%"
else if {var::*} is set:
cancel event
remove {var::2} from the player's balance
give {var::1::*} to the player

The error which caused the last parse operation to fail, which might not be set if a pattern was used and the pattern didn't match the provided text at all.


Since 2.0 Return Type

Text

Syntax Patterns
[the] [last] [parse] error
Usage Examples
set {var} to line 1 parsed as integer
if {var} is not set:
parse error is set:
message "<red>Line 1 is invalid: %last parse error%"
else:
message "<red>Please put an integer on line 1!"
New

Various particles.


Since 2.14
Syntax Patterns
crimson spore particle
dripping obsidian tear particles
dripping water particle
a falling obsidian tear particle
a nautilus particle
a damage indicator particle
a glow particle
sweep attack particle
sculk soul particle
a gust particle
dripstone dripping water particle
white ash particles
a sweep attack particle
campfire cosy smoke particles
reverse portal particles
elder guardian particles
smoke particles
large smoke particle
small flame particles
dripping honey particles
enchanting particle
an ash particle
composter particles
damage indicator particle
a bubble particle
snowflake particle
a dripping honey particle
bubble pop particle
campfire cosy smoke particle
dust plume particles
splash particle
dripstone dripping lava particle
infested particle
warped spore particle
sculk charge pop particle
angry villager particle
an enchanted hit particle
an elder guardian particle
enchanted hit particle
a warped spore particle
infested particles
firefly particle
explosion particles
a small gust particle
a vault connection particle
small gust particles
enchanting particles
ominous spawning particles
white smoke particle
crit particle
an explosion emitter particle
spit particle
nautilus particles
falling obsidian tear particle
cherry leaves particle
composter particle
ominous trial spawner detection particle
a raid omen particle
a dripstone dripping lava particle
underwater particles
a portal particle
a lava particle
a downward current particle
a campfire signal smoke particle
poof particle
downward current particle
glow particles
damage indicator particles
vault connection particle
an explosion particle
falling honey particle
totem of undying particles
sneeze particles
small gust particle
ominous spawning particle
a falling water particle
crimson spore particles
pale oak leaves particles
dripping water particles
a dripstone dripping water particle
a wax off particle
a white ash particle
bubble column particles
smoke particle
dolphin particle
sculk charge pop particles
large gust emitter particle
underwater particle
falling dripstone water particle
a trial omen particle
a falling dripstone lava particle
falling nectar particle
a sonic boom particle
a dripping obsidian tear particle
trial spawner detection particle
an cobweb item particle
a sculk soul particle
a bubble pop particle
a falling honey particle
falling dripstone water particles
a sneeze particle
campfire signal smoke particle
landing lava particles
a falling lava particle
cloud particle
explosion particle
a splash particle
happy villager particles
a falling dripstone water particle
a spore blossom air particle
snowball item particles
a happy villager particle
note particle
a large smoke particle
a crit particle
fishing particles
portal particle
heart particles
witch particle
ash particles
a scrape particle
ash particle
a landing obsidian tear particle
wax on particle
a dripping water particle
cobweb item particle
small gust emitter particle
an end rod particle
bubble pop particles
copper flame particles
lava particles
a ominous trial spawner detection particle
falling lava particles
spore blossom air particle
nautilus particle
a sculk charge pop particle
a landing lava particle
a poof particle
falling water particles
scrape particles
a snowflake particle
a falling spore blossom particle
a dust plume particle
a heart particle
campfire signal smoke particles
happy villager particle
wax on particles
a small gust emitter particle
sonic boom particles
dust plume particle
a trial spawner detection particle
landing honey particle
a underwater particle
trial omen particle
rain particle
bubble particle
small gust emitter particles
angry villager particles
scrape particle
dripstone dripping water particles
an enchanting particle
falling obsidian tear particles
spore blossom air particles
dripstone dripping lava particles
snowball item particle
sonic boom particle
falling dripstone lava particle
a dolphin particle
dripping lava particles
wax off particle
falling nectar particles
a flame particle
dripping obsidian tear particle
electric spark particle
firefly particles
electric spark particles
bubble particles
cloud particles
a large gust emitter particle
a firework particle
an snowball item particle
a spit particle
falling spore blossom particles
landing obsidian tear particle
an infested particle
portal particles
soul particles
a white smoke particle
a soul particle
dripping lava particle
a note particle
raid omen particles
witch particles
a glow squid ink particle
egg crack particles
glow squid ink particles
note particles
rain particles
fishing particle
enchanted hit particles
a falling nectar particle
a dripping lava particle
a pale oak leaves particle
raid omen particle
a rain particle
egg crack particle
pale oak leaves particle
slime item particles
a landing honey particle
flame particles
splash particles
falling honey particles
dripping honey particle
a copper flame particle
copper flame particle
flame particle
explosion emitter particles
downward current particles
cobweb item particles
soul fire flame particle
landing obsidian tear particles
white smoke particles
an ominous spawning particle
large gust emitter particles
large smoke particles
heart particle
spit particles
dolphin particles
glow squid ink particle
falling dripstone lava particles
trial omen particles
reverse portal particle
bubble column particle
crit particles
explosion emitter particle
firework particle
falling lava particle
landing honey particles
a soul fire flame particle
a smoke particle
a bubble column particle
soul fire flame particles
a fishing particle
mycelium particles
an egg crack particle
sculk soul particles
a cherry leaves particle
end rod particles
ominous trial spawner detection particles
squid ink particle
a squid ink particle
totem of undying particle
a small flame particle
an electric spark particle
sweep attack particles
falling water particle
an slime item particle
sneeze particle
warped spore particles
white ash particle
an angry villager particle
a firefly particle
small flame particle
end rod particle
a cloud particle
a reverse portal particle
a wax on particle
slime item particle
firework particles
elder guardian particle
landing lava particle
squid ink particles
glow particle
mycelium particle
vault connection particles
a totem of undying particle
soul particle
trial spawner detection particles
a composter particle
a mycelium particle
gust particle
falling spore blossom particle
cherry leaves particles
a witch particle
a campfire cosy smoke particle
a crimson spore particle
wax off particles
snowflake particles
gust particles
lava particle
poof particles
New

Sets how many particles to draw. Particle count has an influence on how the 'offset' and 'extra' values of a particle apply. Offsets are treated as distributions if particle count is greater than 0. Offsets are treated as velocity or some other special behavior if particle count is 0. This means that setting the particle count may change how your particle behaves. Be careful! More detailed information on particle behavior can be found at Paper's particle documentation.


Since 2.14 Return Type

Number

Syntax Patterns
[the] particle count of %particles%
%particles%'[s] particle count
Usage Examples
draw 7 blue dust particles at player
New

Determines the normal distribution that particles may be drawn within. The distribution is defined by a vector of x, y, and z standard deviations. Particles will be randomly drawn based on these values, clustering towards the center. 68% of particles will be within 1 standard deviation, 95% within 2, and 99.7% within three. The area the particles will spawn in can be roughly estimated as being within 2 times the standard deviation in each axis. For example, a distribution of 1, 2, and 1 would spawn particles within roughly 2 blocks on the x and z axes, and within 4 blocks on the y axis. Please note that distributions only take effect if the particle count is greater than 0! Particles with counts of 0 do not have distributions. If the particle count is 0, the offset is treated differently depending on the particle. More detailed information on particle behavior can be found at Paper's particle documentation.


Since 2.14 Return Type

Vector

Syntax Patterns
[the] particle distribution of %particles%
%particles%'[s] particle distribution
Usage Examples
set the particle distribution of {_my-particle} to vector(1, 2, 1)
New

Determines the offset value for a particle. Offsets are treated as distributions if particle count is greater than 0. Offsets are treated as velocity or some other special behavior if particle count is 0. Setting distribution/velocity with this method may change the particle count to 1/0 respectively. More detailed information on particle behavior can be found at Paper's particle documentation.


Since 2.14 Return Type

Vector

Syntax Patterns
[the] particle offset of %particles%
%particles%'[s] particle offset
Usage Examples
set the particle offset of {_my-particle} to vector(1, 2, 1)
New

Determines the specific 'speed' or 'extra' value of a particle. This value is used in different ways depending on the particle, but in general it: * acts as the speed at which the particle moves if the particle count is greater than 0. * acts as a multiplier to the particle's offset if the particle count is 0. More detailed information on particle behavior can be found at Paper's particle documentation.


Since 2.14 Return Type

Number

Syntax Patterns
[the] (particle speed [value]|extra value) of %particles%
%particles%'[s] (particle speed [value]|extra value)
Usage Examples
set the extra value of {_my-flame-particle} to 2
set the particle speed of {_my-flame-particle} to 0

Expression Particle with Offset/Distribution/Velocity

Section titled “ Expression Particle with Offset/Distribution/Velocity”
New

Applies a specific offset to a particle. Offsets are treated as distributions if particle count is greater than 0. Offsets are treated as velocity or some other special behavior if particle count is 0. Setting distribution/velocity with this method may change the particle count to 1/0 respectively. More detailed information on particle behavior can be found at Paper's particle documentation.


Since 2.14 Return Type

Particle

Syntax Patterns
%particles% with [an] offset [of] %vector%
%particles% with [a] distribution [of] %vector%
%directional particles% with [a] velocity [of] %vector%
Usage Examples
draw an electric spark particle with a velocity of vector(1,2,3) at player
draw 12 red dust particles with a distribution of vector(1,2,1) at player's head location

Expression Particle with Speed/Extra Value

Section titled “ Expression Particle with Speed/Extra Value”
New

Applies a specific 'speed' or 'extra' value to a particle. This value is used in different ways depending on the particle, but in general it: * acts as the speed at which the particle moves if the particle count is greater than 0. * acts as a multiplier to the particle's offset if the particle count is 0. More detailed information on particle behavior can be found at Paper's particle documentation.


Since 2.14 Return Type

Particle

Syntax Patterns
%particles% with ([a] particle speed [value]|[an] extra value) [of] %number%
Usage Examples
draw an electric spark particle with a speed of 0 at player
draw 12 red dust particles with an extra value of 0.4 at player's head location
New

Creates particles that require some extra information, such as colors, locations, or block data. Particles not present here do not require data and can be found in the Particle type. Data requirements vary from version to version, so these docs are only accurate for the most recent Minecraft version at time of release. For example, between 1.21.8 and 1.21.9, the 'flash' particle became colourable and now requires a colour data.


Since 2.14 Return Type

Particle

Syntax Patterns
[%*number%|a[n]] %color% effect particle[s] (of|with) power %number%
[%*number%|a[n]] %color% instant effect particle[s] (of|with) power %number%
[%*number%|a[n]] %color% flash particle[s]
[%*number%|a[n]] %color% (potion|entity) effect particle[s]
[%*number%|a[n]] %color% tinted leaves particle[s]
[%*number%|a[n]] %color% dust particle[s] [of size %number%]
[%*number%|a[n]] %color% dust particle[s] [of size %number%] that transitions to %color%
[%*number%|a[n]] %item type/block data% block particle[s]
[%*number%|a[n]] %item type/block data% [block] crumble particle[s]
[%*number%|a[n]] %item type/block data% [block] marker particle[s]
[%*number%|a[n]] %item type/block data% dust pillar particle[s]
[%*number%|a[n]] falling %item type/block data% dust particle[s]
[%*number%|a[n]] %item type% item particle[s]
[%*number%|a[n]] sculk charge particle[s] [with [a] roll angle [of] %number%]
[%*number%|a[n]] shriek particle[s] [delayed by %time span%]
[%*number%|a[n]] vibration particle[s] moving to[wards] %entity/location% [over [a duration of] %time span%]
[%*number%|a[n]] %color% trail particle[s] moving to[wards] %location% [over [a duration of] %time span%]
[%*number%|a[n]] dragon breath particle[s] [of power %number%]
Usage Examples
set {blood-effect} to a red dust particle of size 1
draw 3 blue trail particles moving to player's target over 3 seconds at player

The passenger of a vehicle, or the rider of a mob.

For 1.11.2 and above, it returns a list of passengers and you can use all changers in it.

See also: vehicle


Since 2.0, 2.2-dev26 (Multiple passengers for 1.11.2+) Return Type

Entity

Syntax Patterns
[the] passenger[s] of %entities%
%entities%'[s] passenger[s]
Usage Examples
passengers of the minecart contains a creeper or a cow
the boat's passenger contains a pig
add a cow and a zombie to passengers of last spawned boat
set passengers of player's vehicle to a pig and a horse
remove all pigs from player's vehicle
clear passengers of boat

Make an entity pathfind towards a location or another entity. Not all entities can pathfind. If the pathfinding target is another entity, the entities may or may not continuously follow the target.


Since 2.7
Syntax Patterns
make %living entities% (pathfind|move) to[wards] %living entity/location% [at speed %number%]
make %living entities% stop (pathfinding|moving)
Usage Examples
make all creepers pathfind towards player
make all cows stop pathfinding
make event-entity pathfind towards player at speed 1

Returns a percentage of one or more numbers.


Since 2.8.0 Return Type

Number

Syntax Patterns
%number%(\%| percent) of %numbers%
Usage Examples
set damage to 10% of victim's health
set damage to 125 percent of damage
set {_result} to {_percent} percent of 999
set {_result::*} to 10% of {_numbers::*}
set experience to 50% of player's total experience

An event that is called periodically.


Since 1.0
Syntax Patterns
every %time span%
Usage Examples
every 2 seconds:
every minecraft hour:
every tick: # can cause lag depending on the code inside the event
every minecraft days:

An event that is called periodically.


Since 1.0
Syntax Patterns
every %time span% in [world[s]] %worlds%
Usage Examples
every 2 seconds in "world":
every minecraft hour in "flatworld":
every tick in "world": # can cause lag depending on the code inside the event
every minecraft days in "plots":

Get the number of possible ordered arrangements from 1 to 'options' with each arrangement having a size equal to 'selected'

For example, permutations with 3 options and an arrangement size of 1, returns 3: (1), (2), (3)

Permutations with 3 options and an arrangement size of 2 returns 6: (1, 2), (1, 3), (2, 1), (2, 3), (3, 1), (3, 2)

Note that the bigger the 'options' and lower the 'selected' may result in approximations or even infinity values.

Permutations differ from combinations in that permutations account for the arrangement of elements within the set, whereas combinations focus on unique sets and ignore the order of elements.

Example: (1, 2) and (2, 1) are two distinct permutations because the positions of '1' and '2' are different, but they represent a single combination since order doesn't matter in combinations.


Since 2.11 Return Type

Number

Syntax Patterns
permutations(options: number, selected: number)
Usage Examples
permutations(10, 2) = 90
permutations(10, 4) = 5040
permutations(size of {some list::*}, 2)

Make entities, players, or leaves be persistent.

Persistence of entities is whether they are retained through server restarts.

Persistence of leaves is whether they should decay when not connected to a log block within 6 meters.

Persistence of players is if the player's playerdata should be saved when they leave the server. Players' persistence is reset back to 'true' when they join the server.

Passengers inherit the persistence of their vehicle, meaning a persistent zombie put on a non-persistent chicken will become non-persistent. This does not apply to players.

By default, all entities are persistent.


Since 2.11
Syntax Patterns
make %entities/blocks% [not] persist[ent]
force %entities/blocks% to [not] persist
prevent %entities/blocks% from persisting
Usage Examples
prevent all entities from persisting
force {_leaves} to persist
command /kickcheater <cheater: player>:
permission: op
trigger:
prevent {_cheater} from persisting
kick {_cheater}

Returns the mathematical constant pi. (approx. 3.1415926535)


Since 2.7 Return Type

Number

Syntax Patterns
(pi|π)
Usage Examples
set {_tau} to pi * 2

The amount of time before a dropped item can be picked up by an entity.


Since 2.7 Return Type

Timespan

Syntax Patterns
[the] pick[ ]up delay of %entities%
%entities%'[s] pick[ ]up delay
Usage Examples
drop diamond sword at {_location} without velocity
set pickup delay of last dropped item to 5 seconds
Minecraft 1.21.5+

Represents the variant of a pig entity.

NOTE: Minecraft namespaces are supported, ex: 'minecraft:warm'.


Since 2.12
Syntax Patterns
cold, temperate, warm

Pings of players, as Minecraft server knows them. Note that they will almost certainly be different from the ones you'd get from using ICMP echo requests. This expression is only supported on some server software (PaperSpigot).


Since 2.2-dev36 Return Type

Number

Syntax Patterns
[the] ping of %players%
%players%'[s] ping
Usage Examples
command /ping <player=%player%>:
trigger:
send "%arg-1%'s ping is %arg-1's ping%"

A plain item is an item with no modifications. It can be used to convert items to their default state or to match with other default items.


Since 2.6 Return Type

Item Type

Syntax Patterns
[a[n]] (plain|unmodified) %item type%
Usage Examples
if the player's tool is a plain diamond: # check if player's tool has no modifications
send "You are holding a plain diamond!"

Make an axolotl start or stop playing dead.


Since 2.11
Syntax Patterns
make %living entities% (start playing|play) dead
force %living entities% to (start playing|play) dead
make %living entities% (stop playing|not play) dead
force %living entities% to (stop playing|not play) dead
Usage Examples
make last spawned axolotl play dead

Plays or draws a specific effect at a location, to a player, or on an entity. Effects can be: * Particles. * Game effects, which consist of combinations of particles and sounds, like the bone meal particles, the sound of footsteps on a specific block, or the particles and sound of breaking a splash potion. * Entity effects, which are particles or animations that are entity-specific and can only be played on a compatible entity. For example, the ravager attack animation can be played with this effect. All effects vary significantly in availability from version to version, and some may simply not function on your version of Minecraft. Some effects, like the death animation entity effect, may cause client glitches and should be used carefully!


Syntax Patterns
[force] (play|show|draw) %game effects/particles% [%directions% %locations%] [as %player%]
[force] (play|draw) %game effects/particles% [%directions% %locations%] (for|to) %players% [as %player%]
(play|show|draw) %game effects% [%directions% %locations%] (in|with) [a] [view] (radius|range) [of] %number%
(play|show|draw) %entity effects% on %entities%
Usage Examples
draw 2 smoke particles at player
force draw 10 red dust particles of size 3 for player
play blue instant splash potion break effect with a view radius of 10
play ravager attack animation on player's target

Plays a sound at given location for everyone or just for given players, or plays a sound to specified players. Both Minecraft sound names and Spigot sound names are supported. Playing resource pack sounds are supported too. The sound category is 'master' by default.

When running 1.19+, playing a sound from an entity directly will result in the sound coming from said entity, even while moving.

If the sound is custom, a location emitter will follow the entity. Do note that pitch and volume

are reflected based on the entity, and Minecraft may not use the values from this syntax.

Minecraft sometimes has a set of sounds under one sound ID that will randomly play. To counter this, you can directly state which seed to use.

Please note that sound names can get changed in any Minecraft or Spigot version, or even removed from Minecraft itself.


Since 2.2-dev28, 2.4 (sound categories), 2.9 (sound seed & entity emitter)
Syntax Patterns
play sound[s] %texts% [[with] seed %number%] [(in|from) %sound category%] [(at|with) volume %number%] [(and|at|with) pitch %number%] (at|on|from) %locations/entities% [(to|for) %players%]
play sound[s] %texts% [[with] seed %number%] [(in|from) %sound category%] [(at|with) volume %number%] [(and|at|with) pitch %number%] [(to|for) %players%] [(at|on|from) %locations/entities%]
Usage Examples
play sound "block.note_block.pling"
play sound "entity.experience_orb.pickup" with volume 0.5 to the player
play sound "custom.music.1" in jukebox category at {speakerBlock}
play sound "BLOCK_AMETHYST_BLOCK_RESONATE" with seed 1 on target entity for the player

Returns an online player from their name or UUID, if player is offline function will return nothing.

Setting 'getExactPlayer' parameter to true will return the player whose name is exactly equal to the provided name instead of returning a player that their name starts with the provided name.


Since 2.8.0 Return Type

Player

Syntax Patterns
player(nameOrUUID: text, getExactPlayer: optional boolean (yes/no))
Usage Examples
set {_p} to player("Notch") # will return an online player whose name is or starts with 'Notch'
set {_p} to player("Notch", true) # will return the only online player whose name is 'Notch'
set {_p} to player("069a79f4-44e9-4726-a5be-fca90e38aaf5") # <none> if player is offline

A player. Depending on whether a player is online or offline several actions can be performed with them, though you won't get any errors when using effects that only work if the player is online (e.g. changing their inventory) on an offline player.

You have two possibilities to use players as command arguments: and . The first requires that the player is online and also accepts only part of the name, while the latter doesn't require that the player is online, but the player's name has to be entered exactly.


Since 1.0
Syntax Patterns
Parsing an offline player as a player (online) will return nothing (none), for that case you would need to parse as offlineplayer which only returns nothing (none) if player doesn't exist in Minecraft databases (name not taken) otherwise it will return the player regardless of their online status.
Usage Examples
set {_p} to "Notch" parsed as a player # returns <none> unless Notch is actually online or starts with Notch like Notchan
set {_p} to "N" parsed as a player # returns Notch if Notch is online because their name starts with 'N' (case insensitive) however, it would return nothing if no player whose name starts with 'N' is online.
Spigot 1.19+

The custom chat completion suggestions. You can add, set, remove, and clear them. Removing the names of online players with this expression is ineffective.

This expression will not return anything due to Bukkit limitations.


Since 2.10 Return Type

Text

Syntax Patterns
[the] [custom] chat completion[s] of %players%
%players%'[s] [custom] chat completion[s]
Usage Examples
add "Skript" and "Njol" to chat completions of all players
remove "text" from {_p}'s chat completions
clear player's chat completions

Sets whether all player related information is hidden in the server list.

The Vanilla Minecraft client will display ??? (dark gray) instead of player counts and will not show the

hover hist when hiding player info.

The version string can override the ???.

Also the Online Players Count and

Max Players expressions will return -1 when hiding player info.


Since 2.3 Applicable Events

On Server List Ping

Syntax Patterns
hide [all] player [related] info[rmation] [(in|on|from) [the] server list]
(show|reveal) [all] player [related] info[rmation] [(in|to|on|from) [the] server list]
Usage Examples
hide player info
hide player related information in the server list
reveal all player related info
Minecraft 1.21.2+

Get the current input keys of a player.


Since 2.10 Return Type

Input Key

Syntax Patterns
[the] [current] (inputs|input keys) of %players%
%players%'[s] [current] (inputs|input keys)
Usage Examples
broadcast "%player% is pressing %current input keys of player%"
Minecraft 1.13 or newer

The message above and below the player list in the tab menu.


Since 2.4 Return Type

Text

Syntax Patterns
[the] (player|tab)[ ]list (header|footer) [(text|message)] of %players%
%players%'[s] (player|tab)[ ]list (header|footer) [(text|message)]
Usage Examples
set all players' tab list header to "Welcome to the Server!"
send "%the player's tab list header%" to player
reset all players' tab list header

Player's protocol version. For more information and list of protocol versions visit wiki.vg.


Since 2.6.2 Return Type

Number

Syntax Patterns
[the] protocol version of %players%
%players%'[s] protocol version
Usage Examples
command /protocolversion <player>:
trigger:
send "Protocol version of %arg-1%: %protocol version of arg-1%"

Gets a skull item representing a player. Skulls for other entities are provided by the aliases.


Since 2.0 Return Type

Item Type

Syntax Patterns
[the] skull of %offline players%
%offline players%'[s] skull
Usage Examples
give the victim's skull to the attacker
set the block at the entity to the entity's skull

Poison or cure an entity. If the entity is already poisoned, the duration may be overwritten.


Since 1.3.2
Syntax Patterns
poison %living entities% [for %time span%]
(cure|unpoison) %living entities% [(from|of) poison]
Usage Examples
poison the player
poison the victim for 20 seconds
cure the player from of poison

The blocks associated with a portal in the portal creation event.


Since 2.4 Return Type

Block

Applicable Events

On Portal Create

Syntax Patterns
[the] portal['s] blocks
[the] blocks of [the] portal
Usage Examples
on portal creation:
loop portal blocks:
broadcast "%loop-block% is part of a portal!"

The amount of time before an entity can use a portal. By default, it is 15 seconds after exiting a nether portal or end gateway.

Players in survival/adventure get a cooldown of 0.5 seconds, while those in creative get no cooldown.

Resetting will set the cooldown back to the default 15 seconds for non-player entities and 0.5 seconds for players.


Since 2.8.0 Return Type

Timespan

Syntax Patterns
[the] portal cooldown of %entities%
%entities%'[s] portal cooldown
Usage Examples
on portal:
wait 1 tick
set portal cooldown of event-entity to 5 seconds

A potion effect, including the potion effect type, tier and duration.


Since 2.5.2
Syntax Patterns
speed of tier 1 for 10 seconds
New

Modify whether a potion effect is ambient.

That is, whether the potion effect produces more, translucent, particles.


Since 2.14
Syntax Patterns
make %skriptpotioneffects% [not] ambient
Usage Examples
make the player's potion effects ambient
New

An expression to obtain the amplifier of a potion effect.


Since 2.7, 2.14 (support for potion effect objects, changing) Return Type

Number

Syntax Patterns
[the] ([potion] amplifier|potion tier|potion level)[s] [of %skriptpotioneffects%]
%skriptpotioneffects%'[s] ([potion] amplifier|potion tier|potion level)[s]
Usage Examples
set the amplifier of {_potion} to 10
add 10 to the amplifier of the player's speed effect
New

An expression to obtain the duration of a potion effect.


Since 2.14 Return Type

Timespan

Syntax Patterns
[the] ([potion] duration|potion length)[s] [of %skriptpotioneffects%]
%skriptpotioneffects%'[s] ([potion] duration|potion length)[s]
Usage Examples
set the duration of {_potion} to 10 seconds
add 10 seconds to the duration of the player's speed effect
New

Checks whether a potion effect has an icon.


Since 2.14
Syntax Patterns
%skriptpotioneffects% (has|have) ([an] icon|icons)
%skriptpotioneffects% (doesn't|does not|do not|don't) have ([an] icon|icons)
Usage Examples
on entity potion effect modification:
if the potion effect has an icon:
hide the icon of event-potioneffecttype for event-entity
New

Checks whether a potion effect has particles.


Since 2.14
Syntax Patterns
%skriptpotioneffects% (has|have) particles
%skriptpotioneffects% (doesn't|does not|do not|don't) have particles
Usage Examples
on entity potion effect modification:
if the potion effect has particles:
hide the particles of event-potioneffecttype for event-entity
New

Modify whether a potion effect shows an icon.


Since 2.14
Syntax Patterns
(show|hide) [the] [potion] icon[s] [(of|for) %skriptpotioneffects%]
(show|hide) %skriptpotioneffects%'[s] icon[s]
Usage Examples
hide the icon for the player's potion effects
New

Modify whether a potion effect is infinite.

That is, whether the potion effect will ever expire.


Since 2.14
Syntax Patterns
make %skriptpotioneffects% [not] (infinite|permanent)
Usage Examples
make the player's potion effects infinite
New

Checks whether a potion effect is ambient.

That is, whether the potion effect produces more, translucent, particles.


Since 2.14
Syntax Patterns
%skriptpotioneffects% (is|are) ambient
%skriptpotioneffects% (isn't|is not|aren't|are not) ambient
Usage Examples
on entity potion effect modification:
if the potion effect is ambient:
message "It's particle time!"
New

Modify whether a potion effect shows particles.


Since 2.14
Syntax Patterns
(show|hide) [the] [potion] particles [(of|for) %skriptpotioneffects%]
(show|hide) %skriptpotioneffects%'[s] particles
Usage Examples
hide the particles for the player's potion effects
New

Represents the action being performed in an 'entity potion effect' event.

'added' indicates the entity does not already have a potion effect of the event potion effect type.

'changed' indicates the entity already has a potion effect of the event potion effect type, but some property about the potion effect is changing.

'cleared' indicates that the effect is being removed because all of the entity's effects are being removed.

'removed' indicates that the event potion effect type has been specifically removed from the entity.


Since 2.14
Syntax Patterns
add, removed, added, change, clear, removal, cleared, remove, changed
Usage Examples
on entity potion effect:
if the event-potion effect action is removal:
message "One of your existing potion effects was removed!"

Represents the cause of an 'entity potion effect' event. For example, an arrow hitting an entity or a command being executed.


Since 2.10
Syntax Patterns
patrol captain, axolotl, death, removal by resurrection, beacon effect, potion drunk, illusion, unknown, drinking potion, expired, pillager captain, attack, villager trade, nautilus potion causes, spawned spider, wither rose infliction, conversion, enter area effect cloud, conduit effect, command, food, drinking milk, plugin, converted, spider spawn, splash potion, warden, expiration, potion splash, dolphin boost, arrow infliction, turtle helmet effect
Usage Examples
on entity potion effect:
if the event-potion effect cause is arrow affliction:
message "You were hit by a tipped arrow!"
New Paper 1.20.4+ for hidden effects

An expression to obtain a specific potion effect type of an entity or item.

When an entity is affected by a potion effect but already has a weaker version of that effect type, the weaker version becomes hidden. If the weaker version has a longer duration, it returns after the stronger version expires.

NOTE: Hidden effects are not able to be changed.


Since 2.14 Return Type

Object

Syntax Patterns
[the] [active|hidden|(active and hidden|hidden and active)] %potion effect types% [potion] effect[s] of %living entities/item types%
%living entities/item types%'[s] [active|hidden|(active and hidden|hidden and active)] %potion effect types% [potion] effect[s]
Usage Examples
set {_effect} to the player's active speed effect
add 10 seconds to the player's slowness effect
clear the player's hidden strength effects
reset the player's weakness effects
delete the player's active jump boost effect

A potion effect type, e.g. 'strength' or 'swiftness'.


Since 2.0 beta 3
Syntax Patterns
absorption, bad luck, bad omen, blindness, breath of the nautilus, conduit power, confusion, damage, damage resistance, darkness, dolphin's grace, dolphins grace, fast digging, fast mining, fire immunity, fire resistance, floating, glowing, haste, health, health boost, hero of the village, hunger, increase damage, increased damage, infested, instant damage, instant health, invisibility, jump, jump boost, levitation, luck, max health boost, maximum health boost, mining fatigue, nausea, night vision, oozing, poison, raid omen, reduce damage, reduced damage, regeneration, resistance, saturation, slow, slow digging, slow fall, slow falling, slow mining, slowness, speed, strength, swiftness, trial omen, unluck, water breathing, weakness, weaving, wind charged, wither, wither effect, wither potion effect
Usage Examples
apply swiftness 5 to the player
apply potion of speed 2 to the player for 60 seconds
remove invisibility from the victim

Condition Potion Effect Type - Is Instant

Section titled “ Condition Potion Effect Type - Is Instant”
New

Checks whether a potion effect type is instant.

That is, whether the effect happens once/immediately.


Since 2.14
Syntax Patterns
%potion effect types% (is|are) instant
%potion effect types% (isn't|is not|aren't|are not) instant
Usage Examples
if any of the potion effects of the player's tool are instant:
message "Use your tool for immediate benefits!"
New

Represents the type of effect a potion effect type has on an entity.


Since 2.14
Syntax Patterns
beneficial, neutral, harmful
New Minecraft 1.21+

An expression to obtain the category of a potion effect type.

That is, whether the potion effect type is beneficial, harmful, or neutral.


Since 2.14 Return Type

Potion Effect Type Category

Syntax Patterns
[the] potion [effect [type]] category of %potion effect types%
%potion effect types%'[s] potion [effect [type]] category
Usage Examples
on entity potion effect modification:
if the potion effect type category is harmful:
message "You have been afflicted with %potion effect type%"
New Paper 1.20.4+ for hidden effects

An expression to obtain the active or hidden potion effects of an entity or item.

When an entity is affected by a potion effect but already has a weaker version of that effect type, the weaker version becomes hidden. If the weaker version has a longer duration, it returns after the stronger version expires.

NOTE: Hidden effects are not able to be changed.

NOTE: Clearing the base potion effects of a potion item is not possible. If you wish to do so, just set the item to a water bottle.


Since 2.5.2, 2.14 (active/hidden support, more change modes) Return Type

Object

Syntax Patterns
[the] [active|hidden|(active and hidden|hidden and active)] potion effects of %living entities/item types%
%living entities/item types%'[s] [active|hidden|(active and hidden|hidden and active)] potion effects
Usage Examples
set {_effects::*} to the active potion effects of the player
clear the player's hidden potion effects
add the potion effects of the player to the potion effects of the player's tool
reset the potion effects of the player's tool
remove speed and night vision from the potion effects of the player

Calculates the product of a list of numbers.


Since 2.2 Return Type

Number

Syntax Patterns
product(ns: numbers)
Usage Examples
product(1) = 1
product(2, 3, 4) = 24
product({some list variable::*})
product(2, {_v::*}, and the player's y-coordinate)

A projectile, e.g. an arrow, snowball or thrown potion.


Since 1.0
Syntax Patterns
arrow, fireball, snowball, thrown potion, etc.
Usage Examples
projectile is a snowball
shoot an arrow at speed 5 from the player

A projectile's critical state. The only currently accepted projectiles are arrows and tridents.


Since 2.5.1 Return Type

Boolean

Syntax Patterns
[the] (projectile|arrow) critical (state|ability|mode) of %projectiles%
%projectiles%'[s] (projectile|arrow) critical (state|ability|mode)
Usage Examples
on shoot:
event-projectile is an arrow
set projectile critical mode of event-projectile to true

Returns the force at which a projectile was shot within an entity shoot bow event.


Since 2.11 Return Type

Number

Syntax Patterns
[the] projectile force
Usage Examples
on entity shoot projectile:
set the velocity of shooter to vector(0,1,0) * projectile force

The protocol version that will be sent as the protocol version of the server in a server list ping event. For more information and list of protocol versions visit wiki.vg.

If this protocol version doesn't match with the protocol version of the client, the client will see the version string.

But please note that, this expression has no visual effect over the version string. For example if the server uses PaperSpigot 1.12.2, and you make the protocol version 107 (1.9),

the version string will not be "Paper 1.9", it will still be "Paper 1.12.2".

But then you can customize the version string as you wish.

Also if the protocol version of the player is higher than protocol version of the server, it will say

"Server out of date!", and if vice-versa "Client out of date!" when you hover on the ping bars.

This can be set in a server list ping event only

(increase and decrease effects cannot be used because that wouldn't make sense).


Since 2.3 Return Type

Number

Applicable Events

On Server List Ping

Syntax Patterns
[the] [server] [(sent|required|fake)] protocol version [number]
Usage Examples
on server list ping:
set the version string to "<light green>Version: <orange>%minecraft version%"
set the protocol version to 0 # 13w41a (1.7) - so the player will see the custom version string almost always

Pull the hooked entity to the player.


Since 2.10 Applicable Events

On Fishing

Syntax Patterns
(reel|pull) in hook[ed] entity
Usage Examples
on fishing state of caught entity:
pull in hooked entity

Push entities in a given direction or towards a specific location.


Since 1.4.6, 2.12 (push towards)
Syntax Patterns
(push|thrust|pull) %entities% [along] %direction% [(at|with) [a] (speed|velocity|force) [of] %number%]
(push|thrust|pull) %entities% (towards|away from) %location% [(at|with) [a] (speed|velocity|force) [of] %number%]
Usage Examples
push the player upwards
push the victim downwards at speed 0.5
push player towards player's target at speed 2
pull player along vector(1,1,1) at speed 1.5

Set the PvP state for a given world.


Since 1.3.4
Syntax Patterns
enable PvP [in %worlds%]
disable PVP [in %worlds%]
Usage Examples
enable PvP #(current world only)
disable PvP in all worlds

Checks the PvP state of a world.


Since 1.3.4
Syntax Patterns
(is PvP|PvP is) enabled [in %worlds%]
(is PvP|PvP is) disabled [in %worlds%]
Usage Examples
PvP is enabled
PvP is disabled in "world"

Returns a quaternion from the given W, X, Y and Z parameters.


Since 2.10 Return Type

Quaternion

Syntax Patterns
quaternion(w: number, x: number, y: number, z: number)
Usage Examples
quaternion(1, 5.6, 45.21, 10)

Quaternions are four dimensional vectors, often used for representing rotations.


Since 2.10

A queued list of values. Entries are removed from a queue when they are queried.


Since 2.10
Usage Examples
set {queue} to a new queue
add "hello" to {queue}
broadcast the 1st element of {queue}

Requires the using queues experimental feature flag to be enabled. Creates a new queue. A queue is a set of elements that can have things removed from the start and added to the end. Any value can be added to a queue. Adding a non-existent value (e.g. `{variable that isn't set}`) will have no effect. This means that removing an element from the queue will always return a value unless the queue is empty. Requesting an element from a queue (e.g. `the 1st element of {queue}`) also removes it from the queue.


Since 2.10 (experimental) Return Type

Queue

Syntax Patterns
[a] [new] queue [(of|with) %objects%]
Usage Examples
set {queue} to a new queue
add "hello" and "there" to {queue}
broadcast the first element of {queue} # hello
broadcast the first element of {queue} # there
# queue is now empty
set {queue} to a new queue of "hello" and "there"
broadcast the last element of {queue} # removes 'there'
add "world" to {queue}
broadcast the first 2 elements of {queue} # removes 'hello', 'world'

Expression Queue Start/End (Experimental)

Section titled “ Expression Queue Start/End (Experimental)”

Requires the using queues experimental feature flag to be enabled. The first or last element in a queue. Asking for this does not remove the element from the queue. This is designed for use with the add changer: to add or remove elements from the start or the end of the queue.


Since 2.10 (experimental) Return Type

Object

Syntax Patterns
[the] (start|end) of %queue%
%queue%'[s] (start|end)
Usage Examples
set {queue} to a new queue
add "hello" to {queue}
add "foo" to the start of {queue}
broadcast the first element of {queue} # foo
broadcast the first element of {queue} # hello
# queue is now empty

Represents a quit reason from a player quit server event.


Since 2.8.0
Syntax Patterns
disconnected, erroneous state, kicked, quit, timed out, erroneous

The quit reason as to why a player disconnected in a quit event.


Since 2.8.0 Return Type

Quit Reason

Syntax Patterns
[the] (quit|disconnect) (cause|reason)
Usage Examples
on quit:
quit reason was kicked
player is banned
clear {server::player::%uuid of player%::*}

Gets a random item out of a set, e.g. a random player out of all players online.


Since 1.4.9 Return Type

Object

Syntax Patterns
[a] random %*type% [out] of %objects%
Usage Examples
give a diamond to a random player out of all players
give a random item out of all items to the player

One or more random characters between two given characters. Use 'alphanumeric' if you want only alphanumeric characters.

This expression uses the Unicode numerical code of a character to determine which characters are between the two given characters.

If strings of more than one character are given, only the first character of each is used.


Since 2.8.0 Return Type

Text

Syntax Patterns
[a|%integer%] random [alphanumeric] character[s] (from|between) %text% (to|and) %text%
Usage Examples
set {_captcha} to join (5 random characters between "a" and "z") with ""
send 3 random alphanumeric characters between "0" and "z"

A given amount of random numbers or integers between two given numbers. Use 'number' if you want any number with decimal parts, or use use 'integer' if you only want whole numbers.

Please note that the order of the numbers doesn't matter, i.e. random number between 2 and 1 will work as well as random number between 1 and 2.


Since 1.4, 2.10 (Multiple random numbers) Return Type

Number

Syntax Patterns
[a|%integer%] random (integer|number)[s] (from|between) %number% (to|and) %number%
Usage Examples
set the player's health to a random number between 5 and 10
send "You rolled a %random integer from 1 to 6%!" to the player
set {_chances::*} to 5 random integers between 5 and 96
set {_decimals::*} to 3 random numbers between 2.7 and -1.5

Returns a random UUID.


Since 2.5.1, 2.11 (return UUIDs) Return Type

UUID

Syntax Patterns
[a] random uuid
Usage Examples
set {_uuid} to random uuid

The raw Minecraft material name of the given item. Note that this is not guaranteed to give same results on all servers.


Since unknown (2.2) Return Type

Text

Syntax Patterns
(raw|minecraft|vanilla) name[s] of %item types%
Usage Examples
raw name of tool of player

Returns the string without formatting (colors etc.) and without stripping them from it, e.g. raw "&aHello There!" would output &aHello There!


Since 2.7 Return Type

Text

Syntax Patterns
raw %texts%
Usage Examples
send raw "&aThis text is unformatted!" to all players

The bow or arrow in a Ready Arrow event.


Since 2.8.0 Return Type

Item

Applicable Events

On Ready Arrow

Syntax Patterns
[the] (readied|selected|drawn) (arrow|bow)
Usage Examples
on player ready arrow:
selected bow's name is "Spectral Bow"
if selected arrow is not a spectral arrow:
cancel event
New

Returns all values of an expression, including those in nested structures such as lists of lists.


Since 2.14 Return Type

Object

Syntax Patterns
recursive %~objects%
Usage Examples
on load:
set {_data::a::b::c} to "value1"
set {_data::a::b::d} to "value2"
set {_data::a::e} to "value3"
set {_data::f} to "value4"
broadcast recursive {_data::*}
# broadcasts "value1", "value2", "value3", "value4"
broadcast recursive indices of {_data::*}
# broadcasts "a::b::c", "a::b::d", "a::e", "f"

The recursive size of list.

Returns the recursive size of the list with sublists included, e.g.

{list::*} Structure

├──── {list::1}: 1

├──── {list::2}: 2

│ ├──── {list::2::1}: 3

│ │ └──── {list::2::1::1}: 4

│ └──── {list::2::2}: 5

└──── {list::3}: 6

Where using %size of {list::*}% will only return 3 (the first layer of indices only), while %recursive size of {list::*}% will return 6 (the entire list)

Please note that getting a list's recursive size can cause lag if the list is large, so only use this expression if you need to!


Since 1.0 Return Type

Number

Syntax Patterns
[the] recursive (amount|number|size) of %objects%
Usage Examples
if recursive size of {player-data::*} > 1000:

Power of a redstone block


Since 2.5 Return Type

Number

Syntax Patterns
[the] redstone power of %blocks%
%blocks%'[s] redstone power
Usage Examples
if redstone power of targeted block is 15:
send "This block is very powerful!"

Registers a new tag containing either items or entity datas. Note that items will NOT keep any information other than their type, so adding `diamond sword named "test"` to a tag is the same as adding `diamond sword`

Item tags should be used for contexts where the item is not placed down, while block tags should be used for contexts where the item is placed. For example, and item tag could be "skript:edible", while a block tag would be "skript:needs_water_above".

All custom tags will be given the namespace "skript", followed by the name you give it. The name must only include the characters A to Z, 0 to 9, and '/', '.', '_', and '-'. Otherwise, the tag will not register.

Please note that two tags can share a name if they are of different types. Registering a new tag of the same name and type will overwrite the existing tag. Tags will reset on server shutdown.


Since 2.10
Syntax Patterns
register [a[n]] [custom] (item|block|entity [type]) tag named %text% (containing|using) %entity types/item types%
Usage Examples
register a new custom entity tag named "fish" using cod, salmon, tropical fish, and pufferfish
register an item tag named "skript:wasp_weapons/swords" containing diamond sword and netherite sword
register block tag named "pokey" containing sweet berry bush and bamboo sapling
on player move:
block at player is tagged as tag "skript:pokey"
damage the player by 1 heart
Minecraft 1.21

Releases the stored entities in an entity block storage (i.e. beehive).

When using beehives, providing a timespan will prevent the released bees from re-entering the beehive for that amount of time.

Due to unstable behaviour on older versions, this effect requires Minecraft version 1.21+.


Since 2.11
Syntax Patterns
(release|evict) [the] (stored entities|entity storage) of %blocks% [for %time span%]
Usage Examples
release the stored entities of {_beehive}
release the entity storage of {_hive} for 5 seconds

How much time a player has left underwater before starting to drown.


Since 2.0 Return Type

Timespan

Syntax Patterns
[the] remaining air of %living entities%
%living entities%'[s] remaining air
Usage Examples
if the player's remaining air is less than 3 seconds:
send "hurry, get to the surface!" to the player

Repeats inputted strings a given amount of times.


Since 2.8.0 Return Type

Text

Syntax Patterns
%texts% repeated %integer% time[s]
Usage Examples
broadcast nl and nl repeated 200 times
broadcast "Hello World " repeated 5 times
if "aa" repeated 2 times is "aaaa":
broadcast "Ahhhh" repeated 100 times

Replaces all occurrences of a given text or regex with another text. Please note that you can only change variables and a few expressions, e.g. a message or a line of a sign.


Since 2.0, 2.2-dev24 (multiple strings, items in inventory), 2.5 (replace first, case sensitivity), 2.10 (regex)
Syntax Patterns
replace [(all|every)|[the] first] %texts% in %texts% with %text% [with case sensitivity]
replace [(all|every)|[the] first] %texts% with %text% in %texts% [with case sensitivity]
(replace [with|using] regex|regex replace) %texts% in %texts% with %text%
(replace [with|using] regex|regex replace) %texts% with %text% in %texts%
replace [all|every] %item types% in %inventories% with %item type%
replace [all|every] %item types% with %item type% in %inventories%
Usage Examples
replace "<item>" in {_msg} with "[%name of player's tool%]"
replace every "&" with "§" in line 1 of targeted block
# Very simple chat censor
on chat:
replace all "idiot" and "noob" with "****" in the message
regex replace "(idiot|noob)" with "****" in the message # Regex version using word boundaries for better results
replace all stone and dirt in player's inventory and player's top inventory with diamond

Returns the resonating time of a bell.

A bell will start resonating five game ticks after being rung, and will continue to resonate for 40 game ticks.


Since 2.9.0 Return Type

Timespan

Syntax Patterns
[the] resonat(e|ing) time of %block%
%block%'[s] resonat(e|ing) time
Usage Examples
broadcast "The bell has been resonating for %resonating time of target block%"

Checks state of the resource pack in a resource pack request response event.


Since 2.4 Applicable Events

On Resource Pack Request Response

Syntax Patterns
[the] resource pack (was|is|has) [been] %resource pack state%
[the] resource pack (was|is|has)(n't| not) [been] %resource pack state%
Usage Examples
on resource pack response:
if the resource pack wasn't accepted:
kick the player due to "You have to install the resource pack to play in this server!"

The state in a resource pack request response event.


Since 2.4
Syntax Patterns
discarded, refused, rejected, failed reload, accepted, failed, failed to reload, failed to download, downloaded, successfully loaded, accept, fail, successfully load, refuse, declined, successfully install, success, reject, decline, successfully installed, download fail, invalid url
Minecraft 1.16+

The charges of a respawn anchor.


Since 2.7 Return Type

Number

Syntax Patterns
[the] [max[imum]] charge[s] of %blocks%
%blocks%'[s] [max[imum]] charge[s]
Usage Examples
set the charges of event-block to 3

The location that a player should respawn at. This is used within the respawn event.


Since 2.2-dev35 Return Type

Location

Syntax Patterns
[the] respawn location
Usage Examples
on respawn:
set respawn location to {example::spawn}
New

The respawn reason in a respawn event.


Since 2.14
Syntax Patterns
death, plugin, end portal
New

The respawn reason in a respawn event.


Since 2.14 Return Type

Respawn Reason

Syntax Patterns
[the] respawn[ing] reason
Usage Examples
on respawn:
if respawn reason is end portal:
broadcast "%player% took the end portal to the overworld!"

Runs something (like a function) and returns its result.

If the thing is expected to return multiple values, use 'results' instead of 'result'.


Since 2.10 Return Type

Object

Syntax Patterns
[the] result[s] of [running|executing] %executable% [with arg[ument]s %objects%]
Usage Examples
set {_function} to the function named "myFunction"
set {_result} to the result of {_function}
set {_list::*} to the results of {_function}
set {_result} to the result of {_function} with arguments 13 and true

Makes a trigger or a section (e.g. a function) return a value


Since 2.2, 2.8.0 (returns aliases)
Syntax Patterns
return %objects%
Usage Examples
function double(i: number) :: number:
return 2 * {_i}
function divide(i: number) returns number:
return {_i} / 2
New

Reverses given list.


Since 2.4, 2.14 (retain indices when looping) Return Type

Object

Syntax Patterns
reversed %objects%
Usage Examples
set {_list::*} to reversed {_list::*}

Returns a RGB color from the given red, green and blue parameters. Alpha values can be added optionally, but these only take affect in certain situations, like text display backgrounds.


Since 2.5, 2.10 (alpha) Return Type

Color

Syntax Patterns
rgb(red: long, green: long, blue: long, alpha: long = 255)
Usage Examples
dye player's leggings rgb(120, 30, 45)
set the colour of a text display to rgb(10, 50, 100, 50)

Causes a bell to ring.

Optionally, the entity that rang the bell and the direction the bell should ring can be specified.

A bell can only ring in two directions, and the direction is determined by which way the bell is facing.

By default, the bell will ring in the direction it is facing.


Since 2.9.0
Syntax Patterns
ring %blocks% [from [the]] [%direction%]
(make|let) %entity% ring %blocks% [from [the]] [%direction%]
Usage Examples
make player ring target-block

Returns the ringing time of a bell.

A bell typically rings for 50 game ticks.


Since 2.9.0 Return Type

Timespan

Syntax Patterns
[the] ring[ing] time of %block%
%block%'[s] ring[ing] time
Usage Examples
broadcast "The bell has been ringing for %ringing time of target block%"

Calculates the nth root of a number.


Since 2.11 Return Type

Number

Syntax Patterns
root(n: number, number: number)
Usage Examples
root(2, 4) = 2 # same as sqrt(4)
root(4, 16) = 2
root(-4, 16) = 0.5 # same as 16^(-1/4)

Rotates displays, quaternions, or vectors around an axis a set amount of degrees, or around all 3 axes at once.

Vectors can only be rotated around the global X/Y/Z axes, or an arbitrary vector axis.

Quaternions are more flexible, allowing rotation around the global or local X/Y/Z axes, arbitrary vectors, or all 3 local axes at once.

Global axes are the ones in the Minecraft world. Local axes are relative to how the quaternion is already oriented.

Rotating a display is a shortcut for rotating its left rotation. If the right rotation needs to be modified, it should be acquired, rotated, and re-set.

Note that rotating a quaternion/display around a vector results in a rotation around the local vector, so results may not be what you expect. For example, rotating quaternions/displays around vector(1, 0, 0) is the same as rotating around the local X axis.

The same applies to rotations by all three axes at once. In addition, rotating around all three axes of a quaternion/display at once will rotate in ZYX order, meaning the Z rotation will be applied first and the X rotation last.


Since 2.2-dev28, 2.10 (quaternions, displays)
Syntax Patterns
rotate %vectors/quaternions/displays% around [the] [global] (x|y|z)(-| )axis by %number%
rotate %quaternions/displays% around [the|its|their] local (x|y|z)(-| )ax(i|e)s by %number%
rotate %vectors/quaternions/displays% around [the] %vector% by %number%
rotate %quaternions/displays% by x %number%, y %number%(, [and]| and) z %number%
Usage Examples
rotate {_quaternion} around x axis by 10 degrees
rotate last spawned block display around y axis by 10 degrees
rotate {_vector} around vector(1, 1, 1) by 45
rotate {_quaternion} by x 45, y 90, z 135

Rotates a quaternion or vector around an axis a set amount of degrees, or around all 3 axes at once.

Vectors can only be rotated around the global X/Y/Z axes, or an arbitrary vector axis.

Quaternions are more flexible, allowing rotation around the global or local X/Y/Z axes, arbitrary vectors, or all 3 local axes at once.

Global axes are the ones in the Minecraft world. Local axes are relative to how the quaternion is already oriented.

Note that rotating a quaternion around a vector results in a rotation around the local vector, so results may not be what you expect. For example, rotating around vector(1, 0, 0) is the same as rotating around the local X axis.

The same applies to rotations by all three axes at once. In addition, rotating around all three axes of a quaternion/display at once will rotate in ZYX order, meaning the Z rotation will be applied first and the X rotation last.


Since 2.10 Return Type

Object

Syntax Patterns
%quaternions/vectors% rotated around [the] [global] (x|y|z)(-| )axis by %number%
%quaternions% rotated around [the|its|their] local (x|y|z)(-| )ax(i|e)s by %number%
%quaternions/vectors% rotated around [the] %vector% by %number%
%quaternions% rotated by x %number%, y %number%(, [and]| and) z %number%
Usage Examples
set {_new} to {_quaternion} rotated around x axis by 10 degrees
set {_new} to {_vector} rotated around vector(1, 1, 1) by 45
set {_new} to {_quaternion} rotated by x 45, y 90, z 135

Returns the axis or angle that a quaternion will rotate by/around.

All quaternions can be represented by a rotation of some amount around some axis, so this expression provides the ability to get that angle/axis.


Since 2.10 Return Type

Object

Syntax Patterns
[the] rotation (angle|axis) of %quaternions%
%quaternions%'[s] rotation (angle|axis)
Usage Examples
set {_quaternion} to axisAngle(45, vector(1, 2, 3))
send rotation axis of {_quaternion} # 1, 2, 3
send rotation angle of {_quaternion} # 45
set rotation angle of {_quaternion} to 135
set rotation axis of {_quaternion} to vector(0, 1, 0)

Rounds a number, i.e. returns the closest integer to the argument. Place a second argument to define the decimal placement.


Since 2.2, 2.7 (decimal placement) Return Type

Number

Syntax Patterns
round(n: number, d: number = 0)
Usage Examples
round(2.34) = 2
round(2) = 2
round(2.99) = 3
round(2.5) = 3

Rounds numbers normally, up (ceiling) or down (floor) respectively.


Since 2.0 Return Type

Number

Syntax Patterns
[a|the] (round[ed] down|floored) %numbers%
%numbers% (round[ed] down|floored)
[a|the] round[ed] %numbers%
%numbers% round[ed]
[a|the] (round[ed] up|ceil[ing]ed) %numbers%
%numbers% (round[ed] up|ceil[ing]ed)
Usage Examples
set {var} to rounded health of player
set line 1 of the block to "%rounded (1.5 * player's level)%"
add rounded down argument to the player's health

Executes a task (a function). Any returned result is discarded.


Since 2.10
Syntax Patterns
run %executable% [with arg[ument]s %objects%]
execute %executable% [with arg[ument]s %objects%]
Usage Examples
set {_function} to the function named "myFunction"
run {_function}
run {_function} with arguments {_things::*}

Checks if current Minecraft version is given version or newer.


Since 2.5
Syntax Patterns
running [below] minecraft %text%
Usage Examples
running minecraft "1.14"

The saturation of a player. If used in a player event, it can be omitted and will default to event-player.


Since 2.2-Fixes-v10, 2.2-dev35 (fully modifiable), 2.6.2 (syntax pattern changed) Return Type

Number

Syntax Patterns
[the] saturation of %players%
%players%'[s] saturation
Usage Examples
set saturation of player to 20

Save all worlds or a given world manually.

Note: saving many worlds at once may possibly cause the server to freeze.


Since 2.8.0
Syntax Patterns
save [[the] world[s]] %worlds%
Usage Examples
save "world_nether"
save all worlds
New

A particle effect which can be scaled up or down.


Since 2.14
New

Represents the physical size/scale of something.

For example, the scale of a display entity would be a vector containing multipliers on its size in the x, y, and z axis.

For a particle effect like the sweeping edge particle, scale is a number determining how large the particle should be.


Since 2.14 Return Type

Object

Syntax Patterns
[the] scale[s] of %objects%
%objects%'[s] scale[s]
Usage Examples
set the scale of {_display} to vector(0,2,0)
set the scale of {_particle} to 1.5

Scoreboard tags are simple list of texts stored directly in the data of an entity.

So this is a Minecraft related thing, not Bukkit, so the tags will not get removed when the server stops. You can visit visit Minecraft Wiki for more info.

This is changeable and valid for any type of entity. Also you can use use the Has Scoreboard Tag condition to check whether an entity has the given tags.

Requires Minecraft 1.11+ (actually added in 1.9 to the game, but added in 1.11 to Spigot).


Since 2.3 Return Type

Text

Syntax Patterns
[(all [[of] the]|the)] scoreboard tags of %entities%
%entities%'[s] scoreboard tags
Usage Examples
on spawn of a monster:
if the spawn reason is mob spawner:
add "spawned by a spawner" to the scoreboard tags of event-entity
on death of a monster:
if the attacker is a player:
if the victim doesn't have the scoreboard tag "spawned by a spawner":
add 1$ to attacker's balance

A script loaded by Skript.

Disabled scripts will report as being empty since their content has not been loaded.


Since 2.10
Usage Examples
the current script

The current script, or a script from its (file) name.

If the script is enabled or disabled (or reloaded) this reference will become invalid.

Therefore, it is recommended to obtain a script reference when needed.


Since 2.0 Return Type

Script

Syntax Patterns
[the] [current] script
[the] script[s] [named] %texts%
[the] scripts in [directory|folder] %text%
Usage Examples
on script load:
broadcast "Loaded %the current script%"
on script load:
set {running::%script%} to true
on script unload:
set {running::%script%} to false
set {script} to the script named "weather.sk"
loop the scripts in directory "quests/":
enable loop-value

Gets the sea level of a world.


Since 2.5.1 Return Type

Number

Syntax Patterns
[the] sea level of %worlds%
%worlds%'[s] sea level
Usage Examples
send "The sea level in your world is %sea level in player's world%"

An expression to obtain or modify data relating to the pickles of a sea pickle block.


Since 2.7 Return Type

Number

Syntax Patterns
[the] [(min|max)[imum]] [sea] pickle(s| (count|amount)) of %blocks%
%blocks%'[s] [(min|max)[imum]] [sea] pickle(s| (count|amount))
Usage Examples
on block break:
type of block is sea pickle
send "Wow! This stack of sea pickles contained %event-block's sea pickle count% pickles!"
send "It could've contained a maximum of %event-block's maximum sea pickle count% pickles!"
send "It had to have contained at least %event-block's minimum sea pickle count% pickles!"
cancel event
set event-block's sea pickle count to event-block's maximum sea pickle count
send "This bad boy is going to hold so many pickles now!!"

Returns the seed of a loot table. Setting the seed of a block or entity that does not have a loot table will not do anything.


Since 2.10 Return Type

Number

Syntax Patterns
[the] loot[[ ]table] seed[s] of %entities/blocks%
%entities/blocks%'[s] loot[[ ]table] seed[s]
Usage Examples
set {_seed} loot table seed of block
set loot table seed of entity to 123456789

Makes a player see a block as something else or as the original.


Since 2.2-dev37c, 2.5.1 (block data support), 2.12 (as original)
Syntax Patterns
make %players% see %locations% as %item type/block data%
make %players% see %locations% as [the|its] (original|normal|actual) [block]
Usage Examples
make player see block at player as dirt
make player see player's target block as campfire[facing=south]
make all players see (blocks in radius 5 of location(0, 0, 0)) as bedrock
make all players see (blocks in radius 5 of location(0, 0, 0)) as original

Request that the player's client download and switch resource packs. The client will download

the resource pack in the background, and will automatically switch to it once the download is complete.

The URL must be a direct download link.

The hash is used for caching, the player won't have to re-download the resource pack that way.

The hash must be SHA-1, you can get SHA-1 hash of your resource pack using

this online tool.

The resource pack request action can be used to check

status of the sent resource pack request.


Since 2.4
Syntax Patterns
send [the] resource pack [from [[the] URL]] %text% to %players%
send [the] resource pack [from [[the] URL]] %text% with hash %text% to %players%
Usage Examples
on join:
send the resource pack from "URL" with hash "hash" to the player

The commands that will be sent to the player in a send commands to player event.

Modifications will affect what commands show up for the player to tab complete. They will not affect what commands the player can actually run.

Adding new commands to the list is illegal behavior and will be ignored.


Since 2.8.0 Return Type

Text

Applicable Events

On Send Command List

Syntax Patterns
[the] [sent] [server] command[s] list
Usage Examples
on send command list:
set command list to command list where [input does not contain ":"]
remove "help" from command list

A server icon that was loaded using the load server icon effect.


Since 2.3
Usage Examples

Icon of the server in the server list. Can be set to an icon that loaded using the

load server icon effect,

or can be reset to the default icon in a server list ping.

'default server icon' returns the default server icon (server-icon.png) always and cannot be changed.


Since 2.3 Return Type

Server Icon

Syntax Patterns
[the] [((default)|(shown|sent))] [server] icon
Usage Examples
on script load:
set {server-icons::default} to the default server icon

Returns a list of all the values of a type. Useful for looping.


Since 1.0 pre-5, 2.7 (classinfo) Return Type

Object

Syntax Patterns
[all [[of] the]|the|every] %*type%
Usage Examples
loop all attribute types:
set loop-value attribute of player to 10
message "Set attribute %loop-value% to 10!"

Shears or un-shears a shearable entity with drops by shearing and a 'sheared' sound. Using with 'force' will force this effect despite the entity's 'shear state'.

Please note that..:

- Force-shearing or un-shearing on a sheared mushroom cow is not possible


Since 2.0 (cows, sheep & snowmen), 2.8.0 (all shearable entities)
Syntax Patterns
[force] shear %living entities%
un[-]shear %living entities%
Usage Examples
on rightclick on a sheep holding a sword:
shear the clicked sheep
chance of 10%
force shear the clicked sheep

Shoots a projectile (or any other entity) from a given entity or location.


Since 2.10
Syntax Patterns
shoot %entity types% [from %living entities/locations%] [(at|with) (speed|velocity) %number%] [%direction%]
(make|let) %living entities/locations% shoot %entity types% [(at|with) (speed|velocity) %number%] [%direction%]
Usage Examples
shoot arrow from all players at speed 2
shoot a pig from all players:
add event-entity to {_projectiles::*}

The shooter of a projectile.


Since 1.3.7, 2.11 (entity shoot bow event) Return Type

Living Entity

Syntax Patterns
[the] shooter [of %projectile%]
Usage Examples
shooter is a skeleton
New

Shuffles given list randomly.


Since 2.2-dev32, 2.14 (retain indices when looping) Return Type

Object

Syntax Patterns
shuffled %objects%
Usage Examples
set {_list::*} to shuffled {_list::*}

A line of text on a sign. Can be changed, but remember that there is a 16 character limit per line (including color codes that use 2 characters each).


Since 1.3 Return Type

Text

Syntax Patterns
[the] line %number% [of %block%]
[the] (1st|first|2nd|second|3rd|third|4th|fourth) line [of %block%]
Usage Examples
on rightclick on sign:
line 2 of the clicked block is "[Heal]":
heal the player
set line 3 to "%player%"

Controls whether or not an entity is silent.


Since 2.5
Syntax Patterns
silence %entities%
unsilence %entities%
make %entities% silent
make %entities% not silent
Usage Examples
make target entity silent

The simulation distance of a world or a player.

Simulation distance is the minimum distance in chunks for entities to tick.

Simulation distance is capped to the current view distance of the world or player.

The view distance is capped between 2 and 32 chunks.


Since 2.11 Return Type

Number

Syntax Patterns
[the] simulation distance[s] of %worlds/players%
%worlds/players%'[s] simulation distance[s]
Usage Examples
set simulation distance of player to 10
add 50 to the simulation distance of world "world"
reset the simulation distance of player
clear the simulation distance of world "world"

The sine function. It starts at 0° with a value of 0, goes to 1 at 90°, back to 0 at 180°, to -1 at 270° and then repeats every 360°. Uses degrees, not radians.


Since 2.2 Return Type

Number

Syntax Patterns
sin(n: number)
Usage Examples
sin(90) = 1
sin(60) = 0.866

The size of something. Using 'size of {list::*}' will return the length of the list, so if you want the sizes of the things inside the lists, use 'sizes of {list::*}'.


Since 1.0, 2.13 (sizes of) Return Type

Object

Syntax Patterns
[the] size[s] of %objects%
%objects%'[s] size[s]
Usage Examples
message "There are %size of all players% players online!"

The size of a world border.

The size can not be smaller than 1.


Since 2.11 Return Type

Number

Syntax Patterns
[the] world[ ]border (size|diameter|radius) [of %worldborders%]
%worldborders%'[s] world[ ]border (size|diameter|radius)
Usage Examples
set world border radius of {_worldborder} to 10

The skull owner of a player skull.


Since 2.9.0, 2.10 (of items) Return Type

Offline Player

Syntax Patterns
[the] (head|skull) owner of %slots/item types/item stacks/blocks%
%slots/item types/item stacks/blocks%'[s] (head|skull) owner
Usage Examples
set {_owner} to the skull owner of event-block
set skull owner of {_block} to "Njol" parsed as offlineplayer
set head owner of player's tool to {_player}

Represents a single slot of an inventory. Notable slots are the armour slots and furnace slots.

The most important property that distinguishes a slot from an item is its ability to be changed, e.g. it can be set, deleted, enchanted, etc. (Some item expressions can be changed as well, e.g. items stored in variables. For that matter: slots are never saved to variables, only the items they represent at the time when the variable is set).

Please note that tool can be regarded a slot, but it can actually change it's position, i.e. doesn't represent always the same slot.


Usage Examples
set tool of player to dirt
delete helmet of the victim
set the color of the player's tool to green
enchant the player's chestplate with projectile protection 5

Index of an an inventory slot. Other types of slots may or may not have indices. Note that comparing slots with numbers is also possible; if index of slot is same as the number, comparisonsucceeds. This expression is mainly for the cases where you must for some reason save the slot numbers.

Raw index of slot is unique for the view, see Minecraft Wiki


Since 2.2-dev35, 2.8.0 (raw index) Return Type

Number

Syntax Patterns
[the] [(raw|unique)] index of %slots%
%slots%'[s] [(raw|unique)] index
Usage Examples
if index of event-slot is 10:
send "You bought a pie!"
if display name of player's top inventory is "Custom Menu": # 3 rows inventory
if raw index of event-slot > 27: # outside custom inventory
cancel event

Sorts a list variable using either the natural ordering of the contents or the results of the given expression. Be warned, this will overwrite the indices of the list variable. When using the full sort %~objects% (by|based on) <expression> pattern, the input expression can be used to refer to the current item being sorted. (See input expression for more information.)


Since 2.9.0, 2.10 (sort order)
Syntax Patterns
sort %~objects% [in (descending|ascending) order] [(by|based on) <.+>]
Usage Examples
set {_words::*} to "pineapple", "banana", "yoghurt", and "apple"
sort {_words::*} # alphabetical sort
sort {_words::*} by length of input # shortest to longest
sort {_words::*} in descending order by length of input # longest to shortest
sort {_words::*} based on {tastiness::%input%} # sort based on custom value
New

Sorts given list in natural order. All objects in list must be comparable; if they're not, this expression will return nothing.


Since 2.2-dev19, 2.14 (retain indices when looping) Return Type

Object

Syntax Patterns
sorted %objects%
Usage Examples
set {_sorted::*} to sorted {_players::*}
command /leaderboard:
trigger:
loop reversed sorted {most-kills::*}:
send "%loop-counter%. %loop-index% with %loop-value% kills" to sender

The category of a sound, they are used for sound options of Minecraft. See the play sound and stop sound effects.


Since 2.4
Syntax Patterns
hostile creatures category, speech category, records category, friendly creature category, noteblock category, hostile creature category, note block category, voice category, ambient category, ui, noteblocks category, note blocks category, weather category, block category, friendly mob category, jukebox category, hostile mob category, master category, master volume category, hostile category, record category, user interface, blocks category, environment category, jukeboxes category, player category, players category, hostile mobs category, friendly mobs category, music category, friendly creatures category, neutral category

The source block in a spread event.


Since 2.7 Return Type

Block

Applicable Events

On Spread

Syntax Patterns
[the] source block
Usage Examples
on spread:
if the source block is a grass block:
set the source block to dirt
Minecraft 1.20.2+ (entity snapshots)

Spawns entities. This can be used as an effect and as a section.

If it is used as a section, the section is run before the entity is added to the world.

You can modify the entity in this section, using for example 'event-entity' or 'cow'.

Do note that other event values, such as 'player', won't work in this section.

If you're spawning a display and want it to be empty on initialization, like not having a block display be stone, set hidden config node 'spawn empty displays' to true.

Note that when spawning an entity via entity snapshots, the code within the section will not run instantaneously as compared to spawning normally (via 'a zombie').


Since 1.0, 2.6.1 (with section), 2.8.6 (dropped items), 2.10 (entity snapshots)
Syntax Patterns
(spawn|summon) %entity types/entity snapshots% [%directions% %locations%]
(spawn|summon) %number% of %entity types/entity snapshots% [%directions% %locations%]
Usage Examples
spawn 3 creepers at the targeted block
spawn a ghast 5 meters above the player
spawn a zombie at the player:
set name of the zombie to ""
spawn a block display of a ladder[waterlogged=true] at location above player:
set billboard of event-display to center # allows the display to rotate around the center axis

The spawn point of a world.


Since 1.4.2 Return Type

Location

Syntax Patterns
[the] spawn[s] [(point|location)[s]] [of %worlds%]
%worlds%'[s] spawn[s] [(point|location)[s]]
Usage Examples
teleport all players to spawn
set the spawn point of "world" to the player's location
Minecraft 1.20.2+, Minecraft 1.20.5+ (comparisons)

Gets or sets the entity snapshot that the provided spawn eggs will spawn when used.


Since 2.10 Return Type

Entity Snapshot

Syntax Patterns
[the] spawn egg entity of %item stacks/item types/slots%
%item stacks/item types/slots%'[s] spawn egg entity
Usage Examples
set {_item} to a zombie spawn egg
broadcast the spawn egg entity of {_item}
spawn a pig at location(0,0,0):
set the max health of entity to 20
set the health of entity to 20
set {_snapshot} to the entity snapshot of entity
clear entity
set the spawn egg entity of {_item} to {_snapshot}
if the spawn egg entity of {_item} is {_snapshot}: # Minecraft 1.20.5+
set the spawn egg entity of {_item} to (random element out of all entities)
set the spawn egg entity of {_item} to a zombie

The spawn reason in a spawn event.


Since 2.3
Syntax Patterns
dispense egg, egg, village defense, ocelot baby, silverfish trap, village invading, trap, dispensing egg, shoulder, drowned, metamorphosis, lightning, silverfish reveal, spell, built iron golem, natural, trial mob spawner, village invasion, frozen, mount, rehydration, build wither, built wither, iron golem defense, ender pearl, creature spawner, reinforcements, build snowman, build iron golem, rehydrated, breeding, raid, ominous item spawner, built copper golem, infection, customized, reanimate spawn reasons, potion effect, spawn egg, jockey, beehive, default, release from bucket, golem defense, patrol, slime split, infected, sheared, mob spawner, nether portal, trial spawner, shear, perching, custom, built snowman, chunk generation, breed, command, duplication, explosion, spawner, cured, enchantment, trial creature spawner, customised, piglin zombification, build copper golem

The spawn reason in a spawn event.


Since 2.3 Return Type

Spawn Reason

Syntax Patterns
[the] spawn[ing] reason
Usage Examples
on spawn:
spawn reason is reinforcements or breeding
cancel event
Minecraft 1.20.0+ (delete)

The entity type of a spawner (mob spawner). Change the entity type, reset it (pig) or clear it (Minecraft 1.20.0+).


Since 2.4, 2.9.2 (trial spawner), 2.12 (delete) Return Type

Entity Type

Syntax Patterns
[the] (spawner|entity|creature) type[s] of %blocks%
%blocks%'[s] (spawner|entity|creature) type[s]
Usage Examples
on right click:
if event-block is a spawner:
send "Spawner's type if %spawner type of event-block%" to player
set the creature type of {_spawner} to a trader llama
reset {_spawner}'s entity type # Pig
clear the spawner type of {_spawner} # Minecraft 1.20.0+

Grabs the spectator target entity of the players.


Since 2.4-alpha4, 2.7 (Paper Spectator Event) Return Type

Entity

Syntax Patterns
spectator target [of %players%]
%players%'[s] spectator target
Usage Examples
on player start spectating of player:
message "&c%spectator target% currently has %{game::kills::%spectator target%}% kills!" to the player
on player stop spectating:
past spectator target was a zombie
set spectator target to the nearest skeleton

A player's walking or flying speed. Both can be changed, but values must be between -1 and 1 (excessive values will be changed to -1 or 1 respectively). Negative values reverse directions.

Please note that changing a player's speed will change their FOV just like potions do.


Since unknown (before 2.1) Return Type

Number

Syntax Patterns
[the] (walk[ing]|fl(y[ing]|ight))[( |-)]speed of %players%
%players%'[s] (walk[ing]|fl(y[ing]|ight))[( |-)]speed
Usage Examples
set the player's walk speed to 1
increase the argument's fly speed by 0.1

Make a player start or stop sprinting.

If the player is not moving when this effect is used, they will be put in sprint mode for a tick and then stopped (this causes the FOV to change). Using it a second time, without the player manually sprinting in between, causes the player to stay in sprint mode, with some quirks.

- Particles may not be produced under the player's feet.

- The player will not exit the sprinting state if they stop moving.

- Restrictions like low hunger will not prevent the player from sprinting

- The player pressing shift will stop them sprinting, and pressing sprint will re-assert normal sprinting behavior

Using this effect two or more consecutive times on a stationary player produces undefined behavior and should not be relied on.


Since 2.11
Syntax Patterns
make %players% (start sprinting|sprint)
force %players% to (start sprinting|sprint)
make %players% (stop sprinting|not sprint)
force %players% to (stop sprinting|not sprint)
Usage Examples
make player start sprinting
force player to start sprinting

The square root, which is the inverse operation to squaring a number (for positive numbers only). This is the same as (argument) ^ (1/2) – other roots can be calculated via number ^ (1/root), e.g. set {_l} to {_volume}^(1/3).

Returns NaN (not a number) if the argument is negative.


Since 2.2 Return Type

Number

Syntax Patterns
sqrt(n: number)
Usage Examples
sqrt(4) = 2
sqrt(2) = 1.4142
sqrt(-1) = NaN

Checks if a text starts or ends with another.


Since 2.2-dev36, 2.5.1 (multiple strings support)
Syntax Patterns
%texts% (start|end)[s] with %texts%
%texts% (doesn't|does not|do not|don't) (start|end) with %texts%
Usage Examples
if the argument starts with "test" or "debug":
send "Stop!"

Stops or restarts the server. If restart is used when the restart-script spigot.yml option isn't defined, the server will stop instead.


Since 2.5
Syntax Patterns
(stop|shut[ ]down) [the] server
restart [the] server
Usage Examples
stop the server
restart server

Stops specific or all sounds from playing to a group of players. Both Minecraft sound names and Spigot sound names are supported. Resource pack sounds are supported too. The sound category is 'master' by default. A sound can't be stopped from a different category.

Please note that sound names can get changed in any Minecraft or Spigot version, or even removed from Minecraft itself.


Since 2.4, 2.7 (stop all sounds)
Syntax Patterns
stop (all sound[s]|sound[s] %texts%) [(in [the]|from) %sound category%] [(from playing to|for) %players%]
stop playing sound[s] %texts% [(in [the]|from) %sound category%] [(to|for) %players%]
Usage Examples
stop sound "block.chest.open" for the player
stop playing sounds "ambient.underwater.loop" and "ambient.underwater.loop.additions" to the player
stop all sounds for all players
stop sound in the record category

Whether a strider is shivering.


Since 2.12
Syntax Patterns
%living entities% (is|are) shivering
%living entities% (isn't|is not|aren't|are not) shivering
Usage Examples
if last spawned strider is shivering:
make last spawned strider stop shivering

Make a strider start/stop shivering.


Since 2.12
Syntax Patterns
make %living entities% start shivering
force %living entities% to start shivering
make %living entities% stop shivering
force %living entities% to stop shivering
Usage Examples
if last spawned strider is shivering:
make last spawned strider stop shivering

Retrieve the first, the last, or all of the color objects or color codes of a string.

The retrieved color codes of the string will be formatted with the color symbol.


Since 2.11 Return Type

Object

Syntax Patterns
[all [of the|the]|the] string colo[u]r[s] [code[s]] of %texts%
[the] first string colo[u]r[s] [code[s]] of %texts%
[the] last string colo[u]r[s] [code[s]] of %texts%
Usage Examples
set {_colors::*} to the string colors of "<red>hey<blue>yo"
set {_color} to the first string color code of "&aGoodbye!"
send "%{_color}%Howdy!" to all players

Extracts part of a text. You can either get the first <x> characters, the last <x> characters, the character at index <x>, or the characters between indices <x> and <y>. The indices <x> and <y> should be between 1 and the length of the text (other values will be fit into this range).


Since 2.1, 2.5.2 (character at, multiple strings support) Return Type

Text

Syntax Patterns
[the] (part|sub[ ](text|string)) of %texts% (between|from) [ind(ex|ices)|character[s]] %number% (and|to) [(index|character)] %number%
[the] (first|last) [%number%] character[s] of %texts%
[the] %number% (first|last) characters of %texts%
[the] character[s] at [(index|position|indexes|indices|positions)] %numbers% (in|of) %texts%
Usage Examples
set {_s} to the first 5 characters of the text argument
message "%subtext of {_s} from characters 2 to (the length of {_s} - 1)%" # removes the first and last character from {_s} and sends it to the player or console
set {_characters::*} to characters at 1, 2 and 7 in player's display name
send the last character of all players' names

Sums a list of numbers.


Since 2.2 Return Type

Number

Syntax Patterns
sum(ns: numbers)
Usage Examples
sum(1) = 1
sum(2, 3, 4) = 9
sum({some list variable::*})
sum(2, {_v::*}, and the player's y-coordinate)

Effect Suppress Type Hints (Experimental)

Section titled “ Effect Suppress Type Hints (Experimental)”

An effect to suppress local variable type hint errors for the syntax lines that follow this effect.

NOTE: Suppressing type hints also prevents syntax from providing new type hints. For example, with type hints suppressed, 'set {_x} to true' would not provide 'boolean' as a type hint for '{_x}'


Since 2.12
Syntax Patterns
[un]suppress [local variable] type hints
(start|stop) suppressing [local variable] type hints
Usage Examples
start suppressing local variable type hints
# potentially unsafe code goes here
stop suppressing local variable type hints
Minecraft 1.15.2+

Makes an entity swing their hand. This does nothing if the entity does not have an animation for swinging their hand.


Since 2.5.1
Syntax Patterns
make %living entities% swing [their] [main] hand
make %living entities% swing [their] off[ ]hand
Usage Examples
make player swing their main hand

Represents the name of a player that shows up in the tab list.


Since before 2.1 Return Type

Text

Syntax Patterns
[the] (player|tab)[ ]list name[s] of %players%
%players%'[s] (player|tab)[ ]list name[s]
Usage Examples
on join:
player has permission "name.red"
set the player's tab list name to "&lt;green&gt;%player's name%"

The players shown in the tab lists of the specified players.

`delete` will remove all the online players from the tab list.

`reset` will reset the tab list to the default state, which makes all players visible again.


Since 2.13 Return Type

Player

Syntax Patterns
[the] (tablist[ed]|listed) players [of %players%]
%players%'[s] (tablist[ed]|listed) players
Usage Examples
tablist players of player

Represents a tag which can be used to classify items, blocks, or entities.

Tags are composed of a value and an optional namespace: "minecraft:oak_logs".

If you omit the namespace, one will be provided for you, depending on what kind of tag you're using. For example, `tag "doors"` will be the tag "minecraft:doors", while `paper tag "doors"` will be "paper:doors".

`minecraft tag` will search through the vanilla tags, `datapack tag` will search for datapack-provided tags (a namespace is required here!), `paper tag` will search for Paper's custom tags if you are running Paper, and `custom tag` will look in the "skript" namespace for custom tags you've registered.

You can also filter by tag types using "item", "block", or "entity".


Since 2.10 Return Type

Minecraft Tag

Syntax Patterns
[minecraft|datapack|paper|(custom|skript)] [item|block|entity [type]] tag %texts%
Usage Examples
minecraft tag "dirt" # minecraft:dirt
paper tag "doors" # paper:doors
tag "skript:custom_dirt" # skript:custom_dirt
custom tag "dirt" # skript:dirt
datapack block tag "dirt" # minecraft:dirt
datapack tag "my_pack:custom_dirt" # my_pack:custom_dirt
tag "minecraft:mineable/pickaxe" # minecraft:mineable/pickaxe
custom item tag "blood_magic_sk/can_sacrifice_with" # skript:blood_magic_sk/can_sacrifice_with

The namespaced key of a minecraft tag. This takes the form of "namespace:key", e.g. "minecraft:dirt".


Since 2.10 Return Type

Text

Syntax Patterns
[the] [namespace[d]] key[s] of %minecraft tags%
%minecraft tags%'[s] [namespace[d]] key[s]
Usage Examples
broadcast namespaced keys of the tags of player's tool
if the key of {_my-tag} is "minecraft:stone":
return true

Returns all the values that a tag contains.

For item and block tags, this will return items. For entity tags, it will return entity datas (a creeper, a zombie).


Since 2.10 Return Type

Object

Syntax Patterns
[the] tag (contents|values) of %minecraft tag%
%minecraft tag%'[s] tag (contents|values)
Usage Examples
broadcast tag values of minecraft tag "dirt"
broadcast (first element of player's tool's block tags)'s tag contents

Returns all the tags of an item, block, or entity.

`minecraft tag` will return only the vanilla tags, `datapack tag` will return only datapack-provided tags, `paper tag` will return only Paper's custom tags (if you are running Paper), and `custom tag` will look in the "skript" namespace for custom tags you've registered.

You can also filter by tag types using "item", "block", or "entity".


Since 2.10 Return Type

Minecraft Tag

Syntax Patterns
[all [[of] the]|the] [minecraft|datapack|paper|(custom|skript)] [item|block|entity [type]] tags of %item type/entity/entity type%
%item type/entity/entity type%'[s] [minecraft|datapack|paper|(custom|skript)] [item|block|entity [type]] tags
Usage Examples
broadcast minecraft tags of dirt
send true if paper item tags of target block contains paper tag "doors"
broadcast the block tags of player's tool

Tame a tameable entity (horse, parrot, cat, etc.).


Since 2.10
Syntax Patterns
[un](tame|domesticate) %entities%
Usage Examples
tame {_horse}
untame {_horse}

The tamer of an entity. Can only be used in entity tame events. You can use 'event-entity' to refer tamed entity itself.


Since 2.2-dev25 Return Type

Player

Syntax Patterns
[the] tamer
Usage Examples
on tame:
if the tamer is a player:
send "someone tamed something!" to console

The tangent function. This is basically sin(arg)/cos(arg). Uses degrees, not radians.


Since 2.2 Return Type

Number

Syntax Patterns
tan(n: number)
Usage Examples
tan(0) = 0
tan(45) = 1
tan(89.99) = 5729.5779

For players this is the entity at the crosshair.

For mobs and experience orbs this is the entity they are attacking/following (if any).

The 'ray size' and 'ignoring blocks' options are only valid for players' targets.

The 'ray size' option effectively increases the area around the crosshair an entity can be in. It does so by expanding the hitboxes of entities by the given amount. Display entities have a hit box of 0, so using the 'ray size' option can be helpful when targeting them.

May grab entities in unloaded chunks.


Since 1.4.2, 2.7 (Reset), 2.8.0 (ignore blocks, ray size) Return Type

Entity

Syntax Patterns
[the] target[[ed] %*entity type%] [of %living entities%] [ignoring blocks] [[with|at] [a] ray[ ]size [of] %number%]
%living entities%'[s] target[[ed] %*entity type%] [ignoring blocks] [[with|at] [a] ray[ ]size [of] %number%]
Usage Examples
on entity target:
if entity's target is a player:
send "You're being followed by an %entity%!" to target of entity
reset target of entity # Makes the entity target-less
delete targeted entity of player # for players it will delete the target
delete target of last spawned zombie # for entities it will make them target-less

The block at the crosshair. This regards all blocks that are not air as fully solid, e.g. torches will be like a solid stone block for this expression.

The actual target block will regard the actual hit box of the block.


Since 1.0, 2.9.0 (actual/exact) Return Type

Block

Syntax Patterns
[the] [(actual[ly]|exact)] target[ed] block[s] [of %living entities%]
%living entities%'[s] [(actual[ly]|exact)] target[ed] block[s]
Usage Examples
set target block of player to stone
set target block of player to oak_stairs[waterlogged=true]
break target block of player using player's tool
give player 1 of type of target block
teleport player to location above target block
kill all entities in radius 3 around target block of player
set {_block} to actual target block of player
break actual target block of player

Teleport an entity to a specific location.

This effect is delayed by default on Paper, meaning certain syntax such as the return effect for functions cannot be used after this effect.

The keyword 'force' indicates this effect will not be delayed,

which may cause lag spikes or server crashes when using this effect to teleport entities to unloaded chunks.

Teleport flags are settings to retain during a teleport. Such as direction, passengers, x coordinate, etc.


Since 1.0, 2.10 (flags)
Syntax Patterns
[force] teleport %entities% (to|%direction%) %location% [[while] retaining %teleport flags%]
Usage Examples
teleport the player to {home::%uuid of player%}
teleport the attacker to the victim
on dismount:
cancel event
teleport the player to {server::spawn} retaining vehicle and passengers

The teleport cause in a teleport event.


Since 2.2-dev35
Syntax Patterns
bed exit, nether portal, ender gateway, exiting bed, consumable effect, ender portal, command, unknown, plugin, dismounted, ender pearl, spectator, spectate, end gateway, exit bed, gateway, dismount, end portal

The teleport cause within a player teleport event.


Since 2.2-dev35 Return Type

Teleport Cause

Syntax Patterns
[the] teleport (cause|reason|type)
Usage Examples
on teleport:
teleport cause is nether portal, end portal or end gateway
cancel event

Teleport Flags are settings to retain during a teleport.


Since 2.10
Syntax Patterns
passengers, xyz velocity, z velocity, yaw velocity, inventory, pitch velocity, vehicle, opened inventory, open inventory, x velocity, passenger, pitch and yaw velocity, yaw and pitch velocity, directional velocity, y velocity

Temperature at given block.


Since 2.2-dev35 Return Type

Number

Syntax Patterns
[the] temperature[s] of %blocks%
%blocks%'[s] temperature[s]
Usage Examples
message "%temperature of the targeted block%"

A shorthand expression for returning something based on a condition.


Since 2.2-dev36 Return Type

Object

Syntax Patterns
%objects% if <.+>[,] (otherwise|else) %objects%
Usage Examples
set {points} to 500 if {admin::%player's uuid%} is set else 100

Text is simply text, i.e. a sequence of characters, which can optionally contain expressions which will be replaced with a meaningful representation (e.g. %player% will be replaced with the player's name).

Because scripts are also text, you have to put text into double quotes to tell Skript which part of the line is an effect/expression and which part is the text.

Please read the article on Texts and Variable Names to learn more.


Since 1.0
Syntax Patterns
simple: "..."
quotes: "...""..."
expressions: "...%expression%..."
percent "...%%..."
Usage Examples
broadcast "Hello World!"
message "Hello %player%"
message "The id of ""%type of tool%"" is %id of tool%."

Returns or changes the alignment setting of text displays.


Since 2.10 Return Type

Display Text Alignment

Syntax Patterns
[the] text alignment[s] [of %displays%]
%displays%'[s] text alignment[s]
Usage Examples
set text alignment of the last spawned text display to left aligned

Applies or removes drop shadow from the displayed text on a text display.


Since 2.10
Syntax Patterns
(apply|add) (drop|text) shadow to [[the] text of] %displays%
(apply|add) (drop|text) shadow to %displays%'[s] text
(remove|clear) (drop|text) shadow from [[the] text of] %displays%
(remove|clear) (drop|text) shadow from %displays%'[s] text
Usage Examples
apply drop shadow to last spawned text display
if {_display} has drop shadow:
remove drop shadow from the text of {_display}

Returns whether the text of a display has drop shadow applied.


Since 2.10
Syntax Patterns
[[the] text of] %displays% (has|have) [a] (drop|text) shadow
%displays%'[s] text (has|have) [a] (drop|text) shadow
[[the] text of] %displays% (doesn't|does not|do not|don't) have [a] (drop|text) shadow
%displays%'[s] text (doesn't|does not|do not|don't) have [a] (drop|text) shadow
Usage Examples
if {_display} has drop shadow:
remove drop shadow from the text of {_display}

Returns or changes the line width of text displays. Default is 200.


Since 2.10 Return Type

Number

Syntax Patterns
[the] line width [of %displays%]
%displays%'[s] line width
Usage Examples
set the line width of the last spawned text display to 300
New

Returns or changes the text opacity of text displays. The default is 255, fully opaque. Values are between 0 and 255. 0 to 3 are treated the same as 255, meaning fully opaque. Values from 4 to 26 are fully transparent, and opacity increases linearly from there up to 255. For backwards compatability, setting negative values between -1 and -128 wrap around, so -1 is the same as 255 and -128 is the same as 128. Adding or subtracting values will adjust the opacity within the bounds of 0-255, so subtracting 300 wil always result in an opacity of 0.


Since 2.10, 2.14 (0-255) Return Type

Number

Syntax Patterns
[the] [display] [text] opacity [of %displays%]
%displays%'[s] [display] [text] opacity
Usage Examples
set the text opacity of the last spawned text display to 0 # fully opaque
set text opacity of all text displays to 255 # fully opaque
set text opacity of all text displays to 128 # semi-transparent
set text opacity of all text displays to 4 # fully transparent

Forces a text display to either be or not be visible through blocks.


Since 2.10
Syntax Patterns
make %displays% visible through (blocks|walls)
force %displays% to be visible through (blocks|walls)
(prevent|block) %displays% from being (visible|seen) through (blocks|walls)
Usage Examples
force last spawned text display to be visible through walls
prevent all text displays from being visible through walls

Condition Text Display Visible Through Blocks

Section titled “ Condition Text Display Visible Through Blocks”

Returns whether text displays can be seen through blocks or not.


Since 2.10
Syntax Patterns
%displays% (is|are) visible through (blocks|walls)
%displays% (isn't|is not|aren't|are not) visible through (blocks|walls)
Usage Examples
if last spawned text display is visible through walls:
prevent last spawned text display from being visible through walls

Returns or changes the text/string of displays.

Note that currently you can only use Skript chat codes when running Paper.


Since 2.10 Return Type

Text

Syntax Patterns
[the] text[s] of %displays%
%displays%'[s] text[s]
Usage Examples
set text of the last spawned text display to "example"

The egg thrown in a Player Egg Throw event.


Since 2.7 Return Type

Projectile

Applicable Events

On Egg Throw

Syntax Patterns
[the] [thrown] egg
Usage Examples
spawn an egg at the egg

A time is a point in a minecraft day's time (i.e. ranges from 0:00 to 23:59), which can vary per world.

See date and timespan for the other time types of Skript.


Since 1.0
Syntax Patterns
##:##
##[##][ ]am/pm
Usage Examples
at 20:00:
time is 8 pm
broadcast "It's %time%"

Tests whether a given real time was more or less than some time span ago.


Since 2.0
Syntax Patterns
%date% (was|were)( more|(n't| not) less) than %time span% [ago]
%date% (was|were)((n't| not) more| less) than %time span% [ago]
Usage Examples
command /command-with-cooldown:
trigger:
{command::%player's uuid%::last-usage} was less than a minute ago:
message "Please wait a minute between uses of this command."
stop
set {command::%player's uuid%::last-usage} to now
# ... actual command trigger here ...

The time of a world.

Use the "minecraft timespan" syntax to change the time according to Minecraft's time intervals.

Since Minecraft uses discrete intervals for time (ticks), changing the time by real-world minutes or real-world seconds only changes it approximately.

Removing an amount of time from a world's time will move the clock forward a day.


Since 1.0 Return Type

Time

Syntax Patterns
[the] time[s] [([with]in|of) %worlds%]
%worlds%'[s] time[s]
Usage Examples
set time of world "world" to 2:00
add 2 minecraft hours to time of world "world"
add 54 real seconds to time of world "world" # approximately 1 minecraft hour

Returns the total amount of time the entity has lived. Note: This does not reset when a player dies.


Since 2.13 Return Type

Timespan

Syntax Patterns
[the] time (alive|lived) of %entities%
%entities%'[s] time (alive|lived)
Usage Examples
clear all entities where [input's time lived > 1 hour]
on right click on entity:
send "%entity% has lived for %time lived of entity%" to player
MC 1.15+ (offline players)

The amount of time a player has played for on the server. This info is stored in the player's statistics in the main world's data folder. Changing this will also change the player's stats which can be views in the client's statistics menu.

Using this expression on offline players on Minecraft 1.14 and below will return nothing <none>.


Since 2.5, 2.7 (offline players) Return Type

Timespan

Syntax Patterns
[the] (time played|play[ ]time) of %offline players%
%offline players%'[s] (time played|play[ ]time)
Usage Examples
set {_t} to time played of player
if player's time played is greater than 10 minutes:
give player a diamond sword
set player's time played to 0 seconds

The time since a date has passed or the time until a date will pass.

This expression will return 0 seconds if the time since or time until would be negative, e.g. if one tries to get the time since a future date.


Since 2.5, 2.10 (time until) Return Type

Timespan

Syntax Patterns
[the] time since %dates%
[the] (time [remaining]|remaining time) until %dates%
Usage Examples
send "%time since 5 minecraft days ago% has passed since 5 minecraft days ago!" to player
send "%time until {countdown::end}% until the game begins!" to player

A period of time between two times. Mostly useful since you can use this to test for whether it's day, night, dusk or dawn in a specific world.

This type might be removed in the future as you can use 'time of world is between x and y' as a replacement.


Since 1.0
Syntax Patterns
##:## - ##
dusk/day/dawn/night
Usage Examples
time in world is night

A timespan is a difference of two different dates or times, e.g '10 minutes'. Timespans are always displayed as real life time, but can be defined as minecraft time, e.g. '5 minecraft days and 12 hours'.

NOTE: Months always have the value of 30 days, and years of 365 days.

See date and time for the other time types of Skript.


Since 1.0, 2.6.1 (weeks, months, years)
Syntax Patterns
<number> [minecraft/mc/real/rl/irl] ticks/seconds/minutes/hours/days/weeks/months/years [[,/and] <more...>]
[]##:##[.####] ([]minutes:seconds[.milliseconds])
Usage Examples
every 5 minecraft days:
wait a minecraft second and 5 ticks
every 10 mc days and 12 hours:
halt for 12.7 irl minutes, 12 hours and 120.5 seconds

Retrieve specific information of a timespan such as hours/minutes/etc.


Since 2.9.0 Return Type

Number

Syntax Patterns
[the] ((tick|second|minute|hour|day|week|month|year))s of %time spans%
%time spans%'[s] ((tick|second|minute|hour|day|week|month|year))s
Usage Examples
set {_t} to difference between now and {Payouts::players::%uuid of player%::last-date}
send "It has been %days of {_t}% day(s) since last payout."

Resets the title of the player to the default values.


Since 2.3
Syntax Patterns
reset [the] title[s] [of %players%]
reset [the] %players%'[s] title[s]
Usage Examples
reset the titles of all players
reset the title

Sends a title/subtitle to the given player(s) with optional fadein/stay/fadeout times for Minecraft versions 1.11 and above.

If you're sending only the subtitle, it will be shown only if there's a title displayed at the moment, otherwise it will be sent with the next title. To show only the subtitle, use: send title " " with subtitle "yourtexthere" to player.

Note: if no input is given for the times, it will keep the ones from the last title sent, use the reset title effect to restore the default values.


Since 2.3
Syntax Patterns
send title %text% [with subtitle %text%] [to %players%] [for %time span%] [with fade[(-| )]in %time span%] [[and] [with] fade[(-| )]out %time span%]
send subtitle %text% [to %players%] [for %time span%] [with fade[(-| )]in %time span%] [[and] [with] fade[(-| )]out %time span%]
Usage Examples
send title "Competition Started" with subtitle "Have fun, Stay safe!" to player for 5 seconds
send title "Hi %player%" to player
send title "Loot Drop" with subtitle "starts in 3 minutes" to all players
send title "Hello %player%!" with subtitle "Welcome to our server" to player for 5 seconds with fadein 1 second and fade out 1 second
send subtitle "Party!" to all players
New

Turns a number in a string using a specific base (decimal, hexadecimal, octal). For example, converting 32 to hexadecimal (base 16) would be 'toBase(32, 16)', which would return "20". You can use any base between 2 and 36.


Since 2.14 Return Type

Text

Syntax Patterns
toBase(n: objects, base: integer between 2 and 36)
Usage Examples
send "Decode this binary number for a prize! %toBase({_guess}, 2)%"

Toggle the state of a block or boolean.


Since 1.4, 2.12 (booleans)
Syntax Patterns
(open|turn on|activate) %blocks%
(close|turn off|de[-]activate) %blocks%
(toggle|switch) [[the] state of] %blocks/booleans (yes/no)%
Usage Examples
# use arrows to toggle switches, doors, etc.
on projectile hit:
projectile is arrow
toggle the block at the arrow
# With booleans
toggle gravity of player

Toggles the custom name visibility of an entity.


Since 2.10
Syntax Patterns
(show|hide) [the] (custom|display)[ ]name of %entities%
(show|hide) %entities%'[s] (custom|display)[ ]name
Usage Examples
show the custom name of event-entity
hide target's display name

Toggle the flight mode of a player.


Since 2.3
Syntax Patterns
(allow|enable) (fly|flight) (for|to) %players%
(disallow|disable) (fly|flight) (for|to) %players%
Usage Examples
allow flight to event-player

Determines whether living entities are able to pick up items or not


Since 2.8.0
Syntax Patterns
allow %living entities% to pick([ ]up items| items up)
(forbid|disallow) %living entities% (from|to) pick([ing | ]up items|[ing] items up)
Usage Examples
forbid player from picking up items
send "You can no longer pick up items!" to player
on drop:
if player can't pick up items:
allow player to pick up items

The item an entity is holding in their main or off hand.


Since 1.0 Return Type

Slot

Syntax Patterns
[the] (tool|held item|weapon) [of %living entities%]
%living entities%'[s] (tool|held item|weapon)
[the] off[ ]hand (tool|item) [of %living entities%]
%living entities%'[s] off[ ]hand (tool|item)
Usage Examples
player's tool is tagged with minecraft tag "pickaxes"
player's off hand tool is a shield
set tool of all players to a diamond sword
set offhand tool of target entity to a bow

The total experience, in points, of players or experience orbs.

Adding to a player's experience will trigger Mending, but setting their experience will not.


Since 2.7 Return Type

Number

Syntax Patterns
[the] [total] experience of %entities%
%entities%'[s] [total] experience
Usage Examples
set total experience of player to 100
add 100 to player's experience
if player's total experience is greater than 100:
set player's total experience to 0
give player 1 diamond

Returns the 3 most recent TPS readings, like the /tps command. This expression is only supported on some server software (PaperSpigot).


Since 2.2-dev36 Return Type

Number

Syntax Patterns
tps from [the] last ([1] minute|1[ ]m[inute])
tps from [the] last 5[ ]m[inutes]
tps from [the] last 15[ ]m[inutes]
[the] tps
Usage Examples
broadcast "%tps%"

Transforms (or 'maps') a list's values using a given expression. This is akin to looping over the list and setting each value to a modified version of itself.

Evaluates the given expression for each element in the list, replacing the original element with the expression's result.

If the given expression returns a single value, the indices of the list will not change. If the expression returns multiple values, then then indices will be reset as a single index cannot contain multiple values.

Only variable lists can be transformed with this effect. For other lists, see the transform expression.


Since 2.10
Syntax Patterns
(transform|map) %~objects% (using|with) <.+>
Usage Examples
set {_a::*} to 1, 2, and 3
transform {_a::*} using input * 2
# {_a::*} is now 2, 4, and 6
# get a list of the sizes of all clans without manually looping
set {_clan-sizes::*} to indices of {clans::*}
transform {_clan-sizes::*} using {clans::%input%::size}
# set all existing values of a list to 0:
transform {_list::*} with 0

Represents a transform reason of an entity transform event.


Since 2.8.0
Syntax Patterns
infection, magma slime split, villager infection, tadpole metamorphosis, drowning, creeper super charge, unknown, split, tadpole converting, metamorphosis, skeleton converting to stray, lightning, slime split, entity drowning, slime splitting, zombie drowning, zombie curing, skeleton freeze, entity freezing, zombie converting to drowned, curing, entity freeze, skeleton freezing, mooshroom shear, zombie cure, tadpole converting to frog, mooshroom shearing, magma slime splitting, piglin zombification

The transform reason within an entity entity transform event.


Since 2.8.0 Return Type

Transform Reason

Syntax Patterns
[the] transform[ing] (cause|reason|type)
Usage Examples
on entity transform:
transform reason is infection, drowned or frozen

Transforms (or 'maps') a list's values using a given expression. This is akin to looping over the list and getting a modified version of each value.

If the given expression returns a single value, the indices of the list will not change. If the expression returns multiple values, then then indices will be reset as a single index cannot contain multiple values.


Since 2.10 Return Type

Object

Syntax Patterns
%objects% (transformed|mapped) (using|with) \[<.+>\]
%objects% (transformed|mapped) (using|with) \(<.+>\)
Usage Examples
set {_a::*} to (1, 2, and 3) transformed using (input * 2 - 1, input * 2)
# {_a::*} is now 1, 2, 3, 4, 5, and 6
# get a list of the sizes of all clans without manually looping
set {_clan-sizes::*} to keyed {clans::*} transformed using [{clans::%input index%::size}]
# using the 'keyed' expression retains the indices of the clans list

Creates a tree.

This may require that there is enough space above the given location and that the block below is dirt/grass, but it is possible that the tree will just grow anyways, possibly replacing every block in its path.


Since 1.0
Syntax Patterns
(grow|create|generate) tree [of type %tree type%] %directions% %locations%
(grow|create|generate) %tree type% %directions% %locations%
Usage Examples
grow a tall redwood tree above the clicked block

A tree type represents a tree species or a huge mushroom species. These can be generated in a world with the generate tree effect.


Syntax Patterns
[any] <general tree/mushroom type>, e.g. tree/any jungle tree/etc.
<specific tree/mushroom species>, e.g. red mushroom/small jungle tree/big regular tree/etc.
Usage Examples
grow any regular tree at the block
grow a huge red mushroom above the block

Represents a type, e.g. number, object, item type, location, block, world, entity type, etc.

This is mostly used for expressions like 'event-', '-argument', 'loop-', etc., e.g. event-world, number-argument and loop-player.


Since 2.0
Syntax Patterns
See the type name patterns of all types - including this one
Usage Examples
{variable} is a number # check whether the variable contains a number, e.g. -1 or 5.5
{variable} is a type # check whether the variable contains a type, e.g. number or player
{variable} is an object # will always succeed if the variable is set as everything is an object, even types.
disable PvP in the event-world
kill the loop-entity

Type of a block, item, entity, inventory, potion effect or enchantment type.

Types of items, blocks and block datas are item types similar to them but have amounts

of one, no display names and, on Minecraft 1.13 and newer versions, are undamaged.

Types of entities and inventories are entity types and inventory types known to Skript.

Types of potion effects are potion effect types.

Types of enchantment types are enchantments.


Since 1.4, 2.5.2 (potion effect), 2.7 (block datas), 2.10 (enchantment type) Return Type

Object

Syntax Patterns
[the] type of %entity types/item types/inventories/potion effects/block datas/enchantment types%
%entity types/item types/inventories/potion effects/block datas/enchantment types%'[s] type
Usage Examples
on rightclick on an entity:
message "This is a %type of clicked entity%!"

Creates breakable or unbreakable copies of given items.


Since 2.2-dev13b, 2.9.0 (breakable) Return Type

Item Type

Syntax Patterns
[un]breakable %item types%
Usage Examples
set {_item} to unbreakable iron sword
give breakable {_weapon} to all players

Converts given Unix timestamp to a date. The Unix timespan represents the number of seconds elapsed since 1 January 1970.


Since 2.5 Return Type

Date

Syntax Patterns
[the] unix date of %numbers%
%numbers%'[s] unix date
Usage Examples
unix date of 946684800 #1 January 2000 12:00 AM (UTC Time)

Converts given date to Unix timestamp. This is roughly how many seconds have elapsed since 1 January 1970.


Since 2.2-dev31 Return Type

Number

Syntax Patterns
[the] unix timestamp of %dates%
%dates%'[s] unix timestamp
Usage Examples
unix timestamp of now

Represents an unleash reason of an unleash event.


Since 2.10
Syntax Patterns
player unleashed, distance, unleashed by player, player unleash, holder (gone|disappeared), unknown

The unleash reason in an unleash event.


Since 2.10 Return Type

Unleash Reason

Applicable Events

On Leash / Unleash

Syntax Patterns
[the] unleash[ing] reason
Usage Examples
if the unleash reason is distance:
broadcast "The leash was snapped in half."

Updates the blocks by setting them to a selected block

Using 'without physics' will not send updates to the surrounding blocks of the blocks being set.

Example: Updating a block next to a sand block in the air 'without physics' will not cause the sand block to fall.


Since 2.10
Syntax Patterns
update %blocks% (as|to be) %block data% [without [neighbo[u]r[ing]|adjacent] [physics] update[s]]
Usage Examples
update {_blocks::*} as gravel
update {_blocks::*} to be sand without physics updates
update {_blocks::*} as stone without neighbouring updates

Place at the top of a script file to enable an optional experimental feature.

Experimental features may change behavior in Skript and may contain bugs. Use at your own discretion.

A list of the available experimental features can be found in the changelog for your version of Skript.


Since 2.9.0
Syntax Patterns
using [[the] experiment] <.+>
Usage Examples
using 1.21
using the experiment my-cool-addon-feature

Returns a UUID from the given string. The string must be in the format of a UUID.


Since 2.11 Return Type

UUID

Syntax Patterns
uuid(uuid: string)
Usage Examples
uuid("069a79f4-44e9-4726-a5be-fca90e38aaf5")

UUIDs are unique identifiers that ensure things can be reliably distinguished from each other. They are generated in a way that makes it practically impossible for duplicates to occur.

Read more about UUIDs and how they are used in Minecraft in the wiki entry about UUIDs.


Since 2.11

The UUID of a player, entity or world.


Since 2.1.2, 2.2 (offline players' uuids), 2.2-dev24 (other entities' uuids) Return Type

UUID

Syntax Patterns
[the] UUID of %offline players/worlds/entities%
%offline players/worlds/entities%'[s] UUID
Usage Examples
# prevents people from joining the server if they use the name of a player
# who has played on this server at least once since this script has been added
on login:
if {uuid::%name of player%} exists:
{uuid::%name of player%} is not uuid of player
kick player due to "Someone with your name has played on this server before"
else:
set {uuid::%name of player%} to uuid of player
command /what-is-my-uuid:
trigger:
set {_uuid} to uuid of player
send "Your UUID is '%string within {_uuid}%'"

Returns the value of something that has a value, e.g. a node in a config.

The value is automatically converted to the specified type (e.g. text, number) where possible.


Since 2.10 Return Type

Object

Syntax Patterns
[the] [%*type%] value of %objects%
%objects%'[s] [%*type%] value
Usage Examples
set {_node} to node "update check interval" in the skript config
broadcast text value of {_node}
# text value of {_node} = "12 hours" (text)
wait for {_node}'s timespan value
# timespan value of {_node} = 12 hours (duration)

Returns the value of an sub-node of the given node, following the provided path.

The value is automatically converted to the specified type (e.g. text, number) where possible.


Since 2.10 Return Type

Object

Syntax Patterns
[the] %*type% value [at] %text% (from|in) %node%
Usage Examples
set {_node} to node "language" in the skript config
broadcast the text value of {_node}

Gets the value within objects. Usually used with variables to get the value they store rather than the variable itself, or with lists to get the values of a type.


Since 2.7 Return Type

Object

Syntax Patterns
[the] (%*type%|value[s]) (within|in) %~objects%
Usage Examples
set {_entity} to a random entity out of all entities
delete entity within {_entity} # This deletes the entity itself and not the value stored in the variable
set {_list::*} to "something", 10, "test" and a zombie
broadcast the strings within {_list::*} # "something", "test"

Used for defining variables present within a script.

This section is not required, but it ensures that a variable has a value if it doesn't exist when the script is loaded.


Since 1.0
Syntax Patterns
variables
Usage Examples
variables:
{joins} = 0
{balance::%player%} = 0
on join:
add 1 to {joins}
message "Your balance is %{balance::%player%}%"

Creates a new vector, which can be used with various expressions, effects and functions.


Since 2.2-dev23 Return Type

Vector

Syntax Patterns
vector(x: number, y: number, z: number)
Usage Examples
vector(0, 0, 0)

Vector is a collection of numbers. In Minecraft, 3D vectors are used to express velocities of entities.


Since 2.2-dev23
Syntax Patterns
vector(x, y, z)
Usage Examples

Gets the angle between two vectors.


Since 2.2-dev28 Return Type

Number

Syntax Patterns
[the] angle between [[the] vectors] %vector% and %vector%
Usage Examples
send "%the angle between vector 1, 0, 0 and vector 0, 1, 1%"

Expression Vectors - Create from Direction

Section titled “ Expression Vectors - Create from Direction”

Creates vectors from given directions.

Relative directions are relative to the origin, (0, 0, 0). Therefore, the vector from the direction 'forwards' is (0, 0, 1).


Since 2.8.0 Return Type

Vector

Syntax Patterns
vector[s] [from] %directions%
%directions% vector[s]
Usage Examples
set {_v} to vector from direction upwards
set {_v} to vector in direction of player
set {_v} to vector in horizontal direction of player
set {_v} to vector from facing of player
set {_v::*} to vectors from north, south, east, and west

Creates a vector from x, y and z values.


Since 2.2-dev28 Return Type

Vector

Syntax Patterns
[a] [new] vector [(from|at|to)] %number%,[ ]%number%(,[ ]| and )%number%
Usage Examples
set {_v} to vector 0, 1, 0

Expression Vectors - Create Location from Vector

Section titled “ Expression Vectors - Create Location from Vector”

Creates a location from a vector in a world.


Since 2.2-dev28 Return Type

Location

Syntax Patterns
%vector% to location in %world%
location (from|of) %vector% in %world%
%vector% [to location] in %world% with yaw %number% and pitch %number%
location (from|of) %vector% in %world% with yaw %number% and pitch %number%
Usage Examples
set {_loc} to {_v} to location in world "world"
set {_loc} to {_v} to location in world "world" with yaw 45 and pitch 90
set {_loc} to location of {_v} in "world" with yaw 45 and pitch 90

Gets the cross product between two vectors.


Since 2.2-dev28 Return Type

Vector

Syntax Patterns
%vector% cross %vector%
Usage Examples
send "%vector 1, 0, 0 cross vector 0, 1, 0%"

Forms a 'cylindrical shaped' vector using yaw to manipulate the current point.


Since 2.2-dev28 Return Type

Vector

Syntax Patterns
[a] [new] cylindrical vector [from|with] [radius] %number%, [yaw] %number%(,[ and]| and) [height] %number%
Usage Examples
loop 360 times:
set {_v} to cylindrical vector radius 1, yaw loop-value, height 2
set {_v} to cylindrical vector radius 1, yaw 90, height 2

Gets the dot product between two vectors.


Since 2.2-dev28 Return Type

Number

Syntax Patterns
%vector% dot %vector%
Usage Examples
set {_dot} to {_v1} dot {_v2}

Gets or sets the length of a vector.


Since 2.2-dev28 Return Type

Number

Syntax Patterns
[the] (vector|standard|normal) length[s] of %vectors%
%vectors%'[s] (vector|standard|normal) length[s]
Usage Examples
send "%standard length of vector 1, 2, 3%"
set {_v} to vector 1, 2, 3
set standard length of {_v} to 2
send "%standard length of {_v}%"

Expression Vectors - Location Vector Offset

Section titled “ Expression Vectors - Location Vector Offset”
New

Returns the location offset by vectors. Supports both global and local axes. When using local axes, the vector is applied relative to the direction the location is facing.


Since 2.2-dev28, 2.14 (local axes) Return Type

Location

Syntax Patterns
%location% offset by [[the] vectors] %vectors% [using local axes]
%location%[ ]~[~][ ]%vectors%
Usage Examples
set {_loc} to {_loc} ~ {_v}
# spawn a tnt 5 blocks in front of player
set {_l} to player's location offset by vector(0, 1, 5) using local axes
spawn tnt at {_l}

Returns the same vector but with length 1.


Since 2.2-dev28 Return Type

Vector

Syntax Patterns
normalize[d] %vector%
%vector% normalized
Usage Examples
set {_v} to normalized {_v}

Creates a random unit vector.


Since 2.2-dev28, 2.7 (signed components) Return Type

Vector

Syntax Patterns
[a] random vector
Usage Examples
set {_v} to a random vector

Forms a 'spherical shaped' vector using yaw and pitch to manipulate the current point.


Since 2.2-dev28 Return Type

Vector

Syntax Patterns
[a] [new] spherical vector [(from|with)] [radius] %number%, [yaw] %number%(,[ and]| and) [pitch] %number%
Usage Examples
loop 360 times:
set {_v} to spherical vector radius 1, yaw loop-value, pitch loop-value
set {_v} to spherical vector radius 1, yaw 45, pitch 90

Gets the squared length of a vector.


Since 2.2-dev28 Return Type

Number

Syntax Patterns
[the] squared length[s] of %vectors%
%vectors%'[s] squared length[s]
Usage Examples
send "%squared length of vector 1, 2, 3%"

Expression Vectors - Vector Between Locations

Section titled “ Expression Vectors - Vector Between Locations”

Creates a vector between two locations.


Since 2.2-dev28 Return Type

Vector

Syntax Patterns
[the] vector (from|between) %location% (to|and) %location%
Usage Examples
set {_v} to vector between {_loc1} and {_loc2}

Expression Vectors - Vector from Location

Section titled “ Expression Vectors - Vector from Location”

Creates a vector from a location.


Since 2.2-dev28 Return Type

Vector

Syntax Patterns
[the] vector (of|from|to) %location%
%location%'s vector
Usage Examples
set {_v} to vector of {_loc}

Expression Vectors - Vector from Yaw and Pitch

Section titled “ Expression Vectors - Vector from Yaw and Pitch”

Creates a vector from a yaw and pitch value.


Since 2.2-dev28 Return Type

Vector

Syntax Patterns
[a] [new] vector (from|with) yaw %number% and pitch %number%
[a] [new] vector (from|with) pitch %number% and yaw %number%
Usage Examples
set {_v} to vector from yaw 45 and pitch 45

An expression to get the vector projection of two vectors.


Since 2.8.0 Return Type

Vector

Syntax Patterns
[vector] projection [of] %vector% on[to] %vector%
Usage Examples
set {_projection} to vector projection of vector(1, 2, 3) onto vector(4, 4, 4)

Represents a vehicle.


Since 2.10.2

Makes an entity ride another entity, e.g. a minecart, a saddled pig, an arrow, etc.


Since 2.0
Syntax Patterns
(make|let|force) %entities% [to] (ride|mount) [(in|on)] %entity/entity type%
(make|let|force) %entities% [to] (dismount|(dismount|leave) [(from|of)] [(any|the[ir]|his|her)] vehicle[s])
(eject|dismount) [(any|the)] passenger[s] (of|from) %entities%
Usage Examples
make the player ride a saddled pig
make the attacker ride the victim

The vehicle an entity is in, if any.

This can actually be any entity, e.g. spider jockeys are skeletons that ride on a spider, so the spider is the 'vehicle' of the skeleton.

See also: passenger


Since 2.0 Return Type

Entity

Syntax Patterns
[the] vehicle[s] [of %entities%]
%entities%'[s] vehicle[s]
Usage Examples
set the vehicle of {game::players::*} to a saddled pig
give {game::players::*} a carrot on a stick
on vehicle enter:
vehicle is a horse
add 1 to {statistics::horseMounting::%uuid of player%}

Gets or changes velocity of an entity or particle.

Setting the velocity of a particle will remove its random dispersion and force it to be a single particle.


Since 2.2-dev31 Return Type

Vector

Syntax Patterns
[the] velocit(y|ies) of %entities/directional particles%
%entities/directional particles%'[s] velocit(y|ies)
Usage Examples
set player's velocity to {_v}
set the velocity of {_particle} to vector(0, 1, 0)
if the vector length of the player's velocity is greater than 5:
send "You're moving fast!" to the player

The version of Bukkit, Minecraft or Skript respectively.


Since 2.0 Return Type

Text

Syntax Patterns
([craft]bukkit|minecraft|skript)( |-)version
Usage Examples
message "This server is running Minecraft %minecraft version% on Bukkit %bukkit version%"
message "This server is powered by Skript %skript version%"

The text to show if the protocol version of the server doesn't match with protocol version of the client. You can check the protocol version expression for more information about this.

This can only be set in a server list ping event.


Since 2.3 Return Type

Text

Applicable Events

On Server List Ping

Syntax Patterns
[the] [shown|custom] version [string|text]
Usage Examples
on server list ping:
set the protocol version to 0 # 13w41a (1.7), so it will show the version string always
set the version string to "&lt;light green&gt;Version: &lt;orange&gt;%minecraft version%"

The view distance of a world or a player.

The view distance of a player is the distance in chunks sent by the server to the player. This has nothing to do with client side view distance settings.

View distance is capped between 2 to 32 chunks.


Since 2.4, 2.11 (worlds) Return Type

Number

Syntax Patterns
[the] view distance[s] of %players/worlds%
%players/worlds%'[s] view distance[s]
Usage Examples
set view distance of player to 10
add 50 to the view distance of world "world"
reset the view distance of player
clear the view distance of world "world"
1.13.2+

The view distance of the client. Can not be changed. This differs from the server side view distance of player as this will retrieve the view distance the player has set on their client.


Since 2.5 Return Type

Number

Syntax Patterns
[the] client view distance[s] of %players%
%players%'[s] client view distance[s]
Usage Examples
set {_clientView} to the client view distance of player
set view distance of player to client view distance of player

Represents a reason why a villager changed its career.


Since 2.12
Syntax Patterns
losing job, employment

Represents the level/experience of a villager.

The level will determine which trades are available to players (value between 1 and 5, defaults to 1).

When a villager's level is 1, they may lose their profession if they don't have a workstation.

Experience works along with the leveling system, determining which level the villager will move to.

Experience must be greater than or equal to 0.

Learn more about villager levels on Minecraft Wiki


Since 2.10 Return Type

Number

Syntax Patterns
[the] villager (level|experience) of %living entities%
%living entities%'[s] villager (level|experience)
Usage Examples
set {_level} to villager level of {_villager}
set villager level of last spawned villager to 2
add 1 to villager level of target entity
remove 1 from villager level of event-entity
reset villager level of event-entity
set villager experience of last spawned entity to 100

Represents the different professions of villagers.


Since 2.10
Syntax Patterns
armorer, armorer profession, armourer, armourer profession, butcher, butcher profession, cartographer, cartographer profession, cleric, cleric profession, farmer, farmer profession, fisherman, fisherman profession, fletcher, fletcher profession, leatherworker, leatherworker profession, librarian, librarian profession, mason, mason profession, nitwit, nitwit profession, no profession, none, none profession, shepherd, shepherd profession, toolsmith, toolsmith profession, unemployed, weaponsmith, weaponsmith profession

Represents the profession of a villager/zombie villager.


Since 2.10 Return Type

Villager Profession

Syntax Patterns
[the] villager profession of %living entities%
%living entities%'[s] villager profession
Usage Examples
set {_p} to villager profession of event-entity
villager profession of event-entity = nitwit profession
set villager profession of {_villager} to librarian profession
delete villager profession of event-entity

Represents the different types of villagers. These are usually the biomes a villager can be from.


Since 2.10
Syntax Patterns
desert, jungle, plains, savanna, snow, swamp, taiga

Represents the type of a villager/zombie villager. This usually represents the biome the villager is from.


Since 2.10 Return Type

Villager Type

Syntax Patterns
[the] villager type of %living entities%
%living entities%'[s] villager type
Usage Examples
set {_type} to villager type of {_villager}
villager type of {_villager} = plains
set villager type of event-entity to plains

Make bats and foxes sleep or wake up.

Make villagers sleep by providing a location of a bed.

Make players sleep by providing a location of a bed. Using 'with force' will bypass "nearby monsters" ,the max distance, allowing players to sleep even if the bed is far away, and lets players sleep in the nether and end. Does not work if the location of the bed is not in the world the player is currently in.

Using 'without spawn location update' will make players wake up without setting their spawn location to the bed.


Since 2.11
Syntax Patterns
make %living entities% (start sleeping|[go to] sleep) [%direction% %location%]
force %living entities% to (start sleeping|[go to] sleep) [%direction% %location%]
make %players% (start sleeping|[go to] sleep) %direction% %location% (with force)
force %players% to (start sleeping|[go to] sleep) %direction% %location% (with force)
make %living entities% (stop sleeping|wake up)
force %living entities% to (stop sleeping|wake up)
make %players% (stop sleeping|wake up) (without spawn [location] update)
force %players% to (stop sleeping|wake up) (without spawn [location] update)
Usage Examples
make {_fox} go to sleep
make {_bat} stop sleeping
make {_villager} start sleeping at location(0, 0, 0)
make player go to sleep at location(0, 0, 0) with force
make player wake up without spawn location update

The anger level a warden feels towards an entity.

A warden can be angry towards multiple entities with different anger levels.

If an entity reaches an anger level of 80+, the warden will pursue it.

Anger level maxes out at 150.


Since 2.11 Return Type

Number

Syntax Patterns
[the] anger level [of] %living entities% towards %living entities%
%living entities%'[s] anger level towards %living entities%
Usage Examples
set the anger level of last spawned warden towards player to 20
clear the last spawned warden's anger level towards player

The entity a warden is most angry at.

A warden can be angry towards multiple entities with different anger levels.


Since 2.11 Return Type

Living Entity

Syntax Patterns
[the] most angered entity of %living entities%
%living entities%'[s] most angered entity
Usage Examples
if the most angered entity of last spawned warden is not player:
set the most angered entity of last spawned warden to player

Expression Warning Distance of World Border

Section titled “ Expression Warning Distance of World Border”

The warning distance of a world border. The player's screen will be tinted red when they are within this distance of the border.

Players only see a red tint when approaching a world's worldborder and the warning distance has to be an integer greater than or equal to 0.


Since 2.11 Return Type

Number

Syntax Patterns
[the] world[ ]border warning distance [of %worldborders%]
%worldborders%'[s] world[ ]border warning distance
Usage Examples
set world border warning distance of {_worldborder} to 1

The warning time of a world border. If the border is shrinking, the player's screen will be tinted red once the border will catch the player within this time period.


Since 2.11 Return Type

Timespan

Syntax Patterns
[the] world[ ]border warning time [of %worldborders%]
%worldborders%'[s] world[ ]border warning time
Usage Examples
set world border warning time of {_worldborder} to 1 second

The weather of a world or player.

Clearing or resetting the weather of a player will make the player's weather match the weather of the world.

Clearing or resetting the weather of a world will make the weather clear.


Since 1.0 Return Type

Weather Type

Applicable Events

On Weather Change

Syntax Patterns
[the] weather [(in|of) %players/worlds%]
[the] (custom|client) weather [of %players%]
%players/worlds%'[s] weather
%players%'[s] (custom|client) weather
Usage Examples
set weather to clear
weather in "world" is rainy
reset custom weather of player
set weather of player to clear

The weather types sunny, rainy, and thundering.


Since 1.0
Syntax Patterns
clear/sun/sunny, rain/rainy/raining, and thunder/thundering/thunderstorm
Usage Examples
is raining
is sunny in the player's world
message "It is %weather in the argument's world% in %world of the argument%"

A shorthand for returning the result of a condition (true or false). This is functionally identical to using `true if else false`.


Since 2.9.0 Return Type

Boolean

Syntax Patterns
whether <.+>
Usage Examples
set {fly} to whether player can fly
broadcast "Flying: %whether player is flying%"

While Loop sections are loops that will just keep repeating as long as a condition is met.


Since 2.0, 2.6 (do while)
Syntax Patterns
[do] while <.+>
Usage Examples
while size of all players < 5:
send "More players are needed to begin the adventure" to all players
wait 5 seconds
set {_counter} to 1
do while {_counter} > 1: # false but will increase {_counter} by 1 then get out
add 1 to {_counter}
# Be careful when using while loops with conditions that are almost
# always true for a long time without using 'wait %timespan%' inside it,
# otherwise it will probably hang and crash your server.
while player is online:
give player 1 dirt
wait 1 second # without using a delay effect the server will crash

An expression for obtaining and modifying the server's whitelist.

Players may be added and removed from the whitelist.

The whitelist can be enabled or disabled by setting the whitelist to true or false respectively.


Since 2.5.2, 2.9.0 (delete) Return Type

Offline Player

Syntax Patterns
[the] white[ ]list
Usage Examples
set the whitelist to false
add all players to whitelist
reset the whitelist

Checks to see if the firework used in an 'elytra boost' event will be consumed.


Since 2.10
Syntax Patterns
[the] (boosting|used) firework will be consumed
[the] (boosting|used) firework (will not|won't) be consumed
Usage Examples
on elytra boost:
if the used firework will be consumed:
prevent the used firework from being consumed

Checks if the dropped item will be despawned naturally through Minecraft's timer.


Since 2.11
Syntax Patterns
%itementities% can (despawn naturally|naturally despawn)
%itementities% (can't|cannot|can not) (despawn naturally|naturally despawn)
Usage Examples
if all dropped items can despawn naturally:
prevent all dropped items from naturally despawning

Checks if the dropped item will be despawned naturally through Minecraft's timer.


Since 2.11
Syntax Patterns
%itementities% will (despawn naturally|naturally despawn)
%itementities% (will (not|neither)|won't) (despawn naturally|naturally despawn)
Usage Examples
if all dropped items can despawn naturally:
prevent all dropped items from naturally despawning
Spigot 1.20.5+

Creates a copy of an item with (or without) fire resistance.


Since 2.9.0 Return Type

Item Type

Syntax Patterns
%item type% with[out] fire[ ]resistance
fire resistant %item type%
Usage Examples
set {_x} to diamond sword with fire resistance
equip player with netherite helmet without fire resistance
drop fire resistant stone at player
Minecraft 1.21+

Represents the variant of a wolf entity.

NOTE: Minecraft namespaces are supported, ex: 'minecraft:ashen'.


Since 2.10
Syntax Patterns
ashen, black, chestnut, pale, rusty, snowy, spotted, striped, woods

Gets a world from its name.


Since 2.2 Return Type

World

Syntax Patterns
world(name: string)
Usage Examples
set {_nether} to world("%{_world}%_nether")

One of the server's worlds. Worlds can be put into scripts by surrounding their name with double quotes, e.g. "world_nether", but this might not work reliably as text uses the same syntax.


Since 1.0, 2.2 (alternate syntax)
Syntax Patterns
<code>"world_name"</code>, e.g. "world"
Usage Examples
broadcast "Hello!" to the world "world_nether"

The world the event occurred in.


Since 1.0 Return Type

World

Syntax Patterns
[the] world [of %locations/entities/chunk%]
%locations/entities/chunk%'[s] world
Usage Examples
world is "world_nether"
teleport the player to the world's spawn
set the weather in the player's world to rain
set {_world} to world of event-chunk

Represents the border of a world or player.


Since 2.11

Get the border of a world or a player.

A player's world border is not persistent. Restarts, quitting, death or changing worlds will reset the border.


Since 2.11 Return Type

World Border

Syntax Patterns
[the] world[ ]border [of %worlds/players%]
%worlds/players%'[s] world[ ]border
Usage Examples
set {_border} to world border of player's world

Represents the environment of a world.


Since 2.7
Syntax Patterns
normal, nether, the end, the overworld, custom, the nether, end, overworld

The environment of a world


Since 2.7 Return Type

World Environment

Syntax Patterns
[the] [world] environment of %worlds%
%worlds%'[s] [world] environment
Usage Examples
if environment of player's world is nether:
apply fire resistance to player for 10 minutes

Returns the world from a string.


Since 2.6.1 Return Type

World

Syntax Patterns
[the] world [(named|with name)] %text%
Usage Examples
world named {game::world-name}
the world "world"

The seed of given world. Note that it will be returned as Minecraft internally treats seeds, not as you specified it in world configuration.


Since 2.2-dev35 Return Type

Number

Syntax Patterns
[the] seed[s] (from|of) %worlds%
%worlds%'[s] seed[s]
Usage Examples
broadcast "Seed: %seed of player's world%"

All worlds of the server, useful for looping.


Since 1.0 Return Type

World

Syntax Patterns
[(all [[of] the]|the)] worlds
Usage Examples
loop all worlds:
broadcast "You're in %loop-world%" to loop-world

An expression for using an item or entity type with a different amount.


Since 1.2 Return Type

Object

Syntax Patterns
%number% of %item stacks/item types/entity types/particles%
Usage Examples
give level of player of iron pickaxes to the player

Integers between 1 and X, used in loops to loop X times.


Since 1.4.6 Return Type

Number

Syntax Patterns
%number% time[s]
once
twice
thrice
Usage Examples
loop 20 times:
broadcast "%21 - loop-number% seconds left.."
wait 1 second

The yaw or pitch of a location or vector.

A yaw of 0 or 360 represents the positive z direction. Adding a positive number to the yaw of a player will rotate it clockwise.

A pitch of 90 represents the negative y direction, or downward facing. A pitch of -90 represents upward facing. Adding a positive number to the pitch will rotate the direction downwards.

Only Paper 1.19+ users may directly change the yaw/pitch of players.


Since 2.0, 2.2-dev28 (vector yaw/pitch), 2.9.0 (entity changers) Return Type

Number

Syntax Patterns
[the] (yaw|pitch) of %entities/locations/vectors%
%entities/locations/vectors%'[s] (yaw|pitch)
Usage Examples
log "%player%: %location of player%, %player's yaw%, %player's pitch%" to "playerlocs.log"
set {_yaw} to yaw of player
set {_p} to pitch of target entity
set pitch of player to -90 # Makes the player look upwards, Paper 1.19+ only
add 180 to yaw of target of player # Makes the target look behind themselves
New

Represents the variant of a zombie nautilus.


Since 2.14
Syntax Patterns
temperate, warm

Turn a villager into a zombie villager. Cure a zombie villager immediately or after specified amount of time.

This effect removes the old entity and creates a new entity.

Zombifying a villager stored in a variable will update the variable to the new zombie villager.

Curing a zombie villager does not update the variable.


Since 2.11
Syntax Patterns
zombify %living entities%
unzombify %living entities% [(in|after) %time span%]
Usage Examples
zombify last spawned villager
set {_villager} to last spawned villager
zombify {_villager}
if {_villager} is a zombie villager:
# This will pass because '{_villager}' gets changed to the new zombie villager
set {_villager} to last spawned villager
zombify last spawned villager
if {_villager} is a zombie villager:
# This will fail because the variable was not provided when zombifying
unzombify {_zombieVillager}
unzombify {_zombieVillager} after 2 seconds