Expressions

Affected Entities 🔗
Patterns:
  • [the] affected entities
Since: 2.4
The affected entities in the
All Groups 🔗
Patterns:
  • all groups
Since: 2.2-dev35
Requirements: Vault, a permission plugin that supports Vault
All the groups a player can have. This expression requires Vault and a compatible permissions plugin to be installed.
Examples:
command /group :
    trigger:
        if argument is "list":
            send "%all groups%"
All Permissions 🔗
Patterns:
  • [(all [[of] the]|the)] permissions (from|of) %players%
  • [(all [[of] the]|the)] %players%'[s] permissions
Since: 2.2-dev33
Returns all permissions of the defined player(s). Note that the modifications to resulting list do not actually change permissions.
Examples:
set {_permissions::*} to all permissions of the player
Alphabetical Sort 🔗
Patterns:
  • alphabetically sorted %texts%
Since: 2.2-dev18b
Sorts given strings in alphabetical order.
Examples:
set {_list::*} to alphabetically sorted {_strings::*}
Altitude 🔗
Patterns:
Since: 1.4.3
Effectively an alias of 'y-coordinate of …', it represents the height of some object above bedrock.
Examples:
on damage:
    altitude of the attacker is higher than the altitude of the victim
    set damage to damage * 1.2
Amount 🔗
Patterns:
  • (amount|number|size) of %objects%
Since: 1.0
The amount of something. Please note that amount of %items% will not return the number of items, but the number of stacks, e.g. 1 for a stack of 64 torches. To get the amount of items in a stack, see the item amount expression.
Examples:
message "There are %number of all players% players online!"
Amount of Items 🔗
Patterns:
Since: 2.0
Counts how many of a particular item type are in a given inventory.
Examples:
message "You have %number of ores in the player's inventory% ores in your inventory."
Argument 🔗
Patterns:
  • [the] last arg[ument][s]
  • [the] arg[ument][s](-| )<(\d+)>
  • [the] <(\d*1)st|(\d*2)nd|(\d*3)rd|(\d*[4-90])th> arg[ument][s]
  • [the] arg[ument][s]
  • [the] %*type%( |-)arg[ument][( |-)<\d+>]
  • [the] arg[ument]( |-)%*type%[( |-)<\d+>]
Since: 1.0
Only usable in 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'.
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 🔗
Patterns:
Since: 1.4.2
Arithmetic expressions, e.g. 1 + 2, (health of player - 2) / 3, etc.
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!"
Armour Slot 🔗
Patterns:
  • [the] (boot[s]|shoe[s]|leg[ging][s]|chestplate[s]|helm[et][s]) [(item|slot)] of %living entities%
  • %living entities%'[s] (boot[s]|shoe[s]|leg[ging][s]|chestplate[s]|helm[et][s]) [(item|slot)]
Since: 1.0
A part of a player's armour, i.e. the boots, leggings, chestplate or helmet.
Examples:
set chestplate of the player to a diamond chestplate
helmet of player is neither a helmet nor air # player is wearing a block, e.g. from another plugin
Attacked 🔗
Patterns:
  • [the] (attacked|damaged|victim) [<(.+)>]
Since: 1.3
Usable in events: damage, death
The victim of a damage event, e.g. when a player attacks a zombie this expression represents the zombie.
Examples:
on damage:
    victim is a creeper
    damage the attacked by 1 heart
Attacker 🔗
Patterns:
  • [the] (attacker|damager)
Since: 1.3
Usable in events: damage, death, destroy
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.
Examples:
on damage:
    attacker is a player
    health of attacker is less than or equal to 2
    damage victim by 1 heart
Bed 🔗
Patterns:
  • [the] bed[s] [location[s]] of %players%
  • %players%'[s] bed[s] [location[s]]
Since: 2.0
The bed location of a player, i.e. the spawn point of a player if he ever slept in a bed and the bed still exists and is unobstructed.
Examples:
bed of player exists:
    teleport player the the player's bed
else:
    teleport the player to the world's spawn point
Biome 🔗
Patterns:
Since: 1.4.4
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.
Examples:
# damage player in deserts constantly
every real minute:
    loop all players:
        biome at loop-player is desert
        damage the loop-player by 1
Block 🔗
Patterns:
  • [the] [event-]block
Since: 1.0
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'.
Examples:
block is 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
Block 🔗
Patterns:
Since: 1.0
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'.
Examples:
block is 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
Block Sphere 🔗
Patterns:
  • [(all [[of] the]|the)] blocks in radius %number% [(of|around) %location%]
  • [(all [[of] the]|the)] blocks around %location% in radius %number%
Since: 1.0
All blocks in a sphere around a center, mostly useful for looping.
Examples:
loop blocks in radius 5 around the player:
    set loop-block to air
Blocks 🔗
Patterns:
Since: 1.0
Blocks relative to other blocks or between other blocks. Can be used to get blocks relative to other blocks or for looping.
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
Blocks in Region 🔗
Patterns:
  • [(all|the)] blocks (in|of) [[the] region[s]] %regions%
Since: 2.1
All blocks in a region. This expression requires a supported regions plugin to be installed.
Examples:
loop all blocks in the region {arena.%{faction.%player%}%}:
    clear the loop-block
Book Author 🔗
Patterns:
  • [the] [book] (author|writer|publisher) of %item stack%
  • %item stack%'[s] [book] (author|writer|publisher)
Since: 2.2-dev31
The author of a book.
Examples:
on book sign:
    message "Book Title: %author of event-item%"
Book Pages 🔗
Patterns:
Since: 2.2-dev31
The pages of a book.
Examples:
on book sign:
    message "Book Pages: %pages of event-item%"
    message "Book Page 1: %page 1 of event-item%"
Book Title 🔗
Patterns:
Since: 2.2-dev31
The title of a book.
Examples:
on book sign:
    message "Book Title: %title of event-item%"
Burn/Cook Time 🔗
Patterns:
  • [the] burn[ing] time
  • [the] (burn|cook)[ing] time of %blocks%
  • %blocks%'[s] (burn|cook)[ing] time
Since: 2.3
The time a furnace takes to burn an item in a fuel burn event. Can also be used to change the burn/cook time of a placed furnace.
Examples:
on fuel burn:
    if fuel slot is coal:
        set burning time to 1 tick
Chat Format 🔗
Patterns:
  • [the] (message|chat) format[ting]
Since: 2.2-dev31
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].
Examples:
set the chat format to "[player]: [message]"
Chat Recipients 🔗
Patterns:
  • [chat][( |-)]recipients
Since: 2.2-Fixes-v7, 2.2-dev35 (clearing recipients)
Recipients of chat events where this is called.
Examples:
chat recipients
Chunk 🔗
Patterns:
Since: 2.0
The chunk a block, location or entity is in.
Examples:
add the chunk at the player to {protected chunks::*}
Clicked Block/Entity/Inventory/Slot 🔗
Patterns:
  • [the] (clicked (block|%*item type/entity type%)|clicked slot|clicked inventory|click (type|action)|inventory action)
Since: 1.0, 2.2-dev35 (more clickable things)
Usable in events: click, inventory click
The clicked block, entity, inventory, inventory slot, inventory click type or inventory action.
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
Colour of 🔗
Patterns:
Since: 1.2
The colour of an item, can also be used to colour chat messages with "<%colour of ...%>this text is coloured!".
Examples:
on click on wool:
    message "This wool block is <%colour of block%>%colour of block%!"
    set the colour of the block to black
Coloured / Uncoloured 🔗
Patterns:
  • (colo[u]r-|colo[u]red )%texts%
  • (format-|formatted )%texts%
  • (un|non)[-](colo[u]r-|colo[u]red |format-|formatted )%texts%
Since: 2.0
Parses <colour>s and, optionally, chat styles in a message or removes any colours and chat styles from the message. Parsing all chat styles requires this expression to be used in same line with the send effect.
Examples:
on chat:
    set message to coloured message # Safe; only colors get parsed
command /fade <player>:
    trigger:
        set display name of the player-argument to uncoloured display name of the player-argument
command /format <text>:
    trigger:
        message formatted text-argument # Safe, because we're sending to whoever used this command
Command 🔗
Patterns:
  • [the] (full|complete|whole) command
  • [the] command [label]
  • [the] arguments
Since: 2.0
Usable in events: command
The command that caused an 'on command' event (excluding the leading slash and all arguments)
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
Command Sender 🔗
Patterns:
  • [the] [command['s]] (sender|executor)
Since: 2.0
Usable in events: command
The player or the console who sent a command. Mostly useful in commands and command events.
Examples:
make the command sender execute "/say hi!"
on command:
    log "%executor% used command /%command% %arguments%" to "commands.log"
Compass Target 🔗
Patterns:
Since: 2.0
The location a player's compass is pointing at.
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%}
Console 🔗
Patterns:
  • [the] (console|server)
Since: 1.3.1
Represents the server's console which can receive messages and execute commands
Examples:
execute console command "/stop"
send "message to console" to the console
Cooldown Time/Remaining Time/Elapsed Time/Last Usage/Bypass Permission 🔗
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]]
Since: 2.2-dev33
Only usable in command events. Represents the cooldown time, the remaining time, the elapsed time, the last usage date, or the cooldown bypass permission.
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%}
Coordinate 🔗
Patterns:
  • [the] (x|y|z)(-| )(coord[inate]|pos[ition]|loc[ation])[s] of %locations%
  • %locations%'[s] (x|y|z)(-| )(coord[inate]|pos[ition]|loc[ation])[s]
Since: 1.4.3
Represents a given coordinate of a location.
Examples:
player's y-coordinate is smaller than 40:
    message "Watch out for lava!"
Creature/Entity/Player/Projectile/Villager/Powered Creeper/etc. 🔗
Patterns:
  • [the] [event-]<.+>
Since: 1.0
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'.
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
Cursor Slot 🔗
Patterns:
Since: 2.2-dev17
The item which the player has on their cursor. This slot is always empty if player has no inventories open.
Examples:
cursor slot of player is dirt
set cursor slot of player to 64 diamonds
Custom Chest Inventory 🔗
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%]
Since: 2.2-dev34
Returns a chest inventory with the given amount of rows and the name. Use the open inventory effect to open it.
Examples:
open chest inventory with 1 row named "test" to player
set {_inventory} to chest inventory with 1 row
Damage 🔗
Patterns:
  • [the] damage
Since: 1.3.5
Usable in events: damage
How much damage is done in a damage event, possibly ignoring armour, criticals and/or enchantments. Can be changed (remember that in Skript '1' is one full heart, not half a heart).
Examples:
increase the damage by 2
Damage Cause 🔗
Patterns:
  • [the] damage (cause|type)
Since: 2.0
The damage cause of a damage event. Please click on the link for more information.
Examples:
damage cause is lava, fire or burning
Damaged Item 🔗
Patterns:
Since: 2.4
Directly damages an item. In MC versions 1.12.2 and lower, this can be used to apply data values to items/blocks
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"
set target block of player to wool with data value 1
set target block of player to potato plant with data value 7
Data Value 🔗
Patterns:
Since: 1.2
The data value of an item. You usually don't need this expression as you can check and set items with aliases easily, but this expression can e.g. be used to "add 1 to data of <item>", e.g. for cycling through all wool colours.
Examples:
add 1 to the data value of the clicked block
Date Ago/Later 🔗
Patterns:
Since: 2.2-dev33
A date the specified timespan before/after another date.
Examples:
set {_yesterday} to 1 day ago
Default Value 🔗
Patterns:
Since: 2.2-dev36
A shorthand expression for giving things a default value. If the first thing isn't set, the second thing will be returned.
Examples:
broadcast {score::%player's uuid%} otherwise "%player% has no score!"
Difference 🔗
Patterns:
Since: 1.4
The difference between two values, e.g. numbers, dates or times.
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!"
Difficulty 🔗
Patterns:
  • [the] difficult(y|ies) of %worlds%
  • %worlds%'[s] difficult(y|ies)
Since: 2.3
The difficulty of a world.
Examples:
set the difficulty of "world" to hard
Direction 🔗
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])
Since: 1.0 (basic), 2.0 (extended)
A helper expression for the direction type.
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
Distance 🔗
Patterns:
Since: 1.0
The distance between two points.
Examples:
if the distance between the player and {home::%uuid of player%} is smaller than 20:
    message "You're very close to your home!"
Drops 🔗
Patterns:
  • [the] drops
Since: 1.0, 2.4 (block break event drops)
Usable in events: break / mine, death
Only works in block break and death events. Holds 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. In break events, drops can only be cleared, and is only available in 1.12+
Examples:
clear drops
remove 4 planks from the drops
on break of diamond ore:
    clear drops
Element of 🔗
Patterns:
  • ([the] first|[the] last|[a] random|%number%(st|nd|rd|th)) element [out] of %objects%
Since: 2.0
The first, last or a random element of a set, e.g. a list variable. See also: random
Examples:
give a random element out of {free items::*} to the player
Enchantment Level 🔗
Patterns:
Since: 2.0
The level of a particular enchantment on an item.
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"
Ender Chest 🔗
Patterns:
Since: 2.0
The ender chest of a player.
Examples:
open the player's ender chest to the player
Entities 🔗
Patterns:
Since: 1.2.1
All entities in all worlds, in a specific world or in a radius around a certain location, e.g. 'all players', 'all creepers in the player's world', or 'players in radius 100 of the player'.
Examples:
kill all creepers in the player's world
send "Psst!" to all players witin 100 meters of the player
give a diamond to all ops
heal all tamed wolves in radius 2000 around {town center}
Exhaustion 🔗
Patterns:
Since: 2.2-dev35
The exhaustion of a player. This is mainly used to determine the rate of hunger depletion.
Examples:
set exhaustion of all players to 1
Experience 🔗
Patterns:
  • [the] [(spawned|dropped)] [e]xp[erience] [orb[s]]
Since: 2.1
Usable in events: experience spawn
How much experience was spawned in an experience spawn event. Can be changed.
Examples:
on experience spawn:
    add 5 to the spawned experience
Facing 🔗
Patterns:
Since: 1.4
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')
Examples:
# makes a bridge
loop blocks from the block below the player in the horizontal facing of the player:
    set loop-block to cobblestone
Filter 🔗
Patterns:
  • %objects% (where|that match) \[<.+>\]
Since: 2.2-dev36
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.
Examples:
send "congrats on being staff!" to all players where [player input has permission "staff"]
Filter Input 🔗
Patterns:
  • input
  • %*type% input
Since: 2.2-dev36
Represents the input in a filter expression. 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.
Examples:
send "congrats on being staff!" to all players where [input has permission "staff"]
Final Damage 🔗
Patterns:
  • [the] final damage
Since: 2.2-dev19
Usable in events: damage
How much damage is done in a damage event, considering all types of damage reduction. Can NOT be changed.
Examples:
send "%final damage%" to victim
Flight Mode 🔗
Patterns:
  • [the] fl(y[ing]|ight) (mode|state) of %players%
  • %players%'[s] fl(y[ing]|ight) (mode|state)
Since: 2.2-dev34
Whether the player(s) are allowed to fly. Use Make Fly effect to force player(s) to fly.
Examples:
set flight mode of player to true
send "%flying state of all players%"
Food Level 🔗
Patterns:
  • [the] (food|hunger)[[ ](level|met(er|re)|bar)] [of %player%]
  • %player%'[s] (food|hunger)[[ ](level|met(er|re)|bar)]
Since: 1.0
The food level of a player from 0 to 10. Has several aliases: food/hunger level/meter/bar.
Examples:
set the player's food level to 10
Formatted Time 🔗
Patterns:
  • %dates% formatted [human-readable] [(with|as) %text%]
Since: 2.2-dev31
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.
Examples:
now formatted human-readable
Former/Future State 🔗
Patterns:
  • [the] (former|past|old) [state] [of] %~object%
  • %~object% before [the event]
  • [the] (future|to-be|new) [state] [of] %~object%
  • %~object%(-to-be| after[(wards| the event)])
Since: 1.1
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.
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
Furnace Slot 🔗
Patterns:
  • (fuel|result) [slot]
  • (ore|fuel|result)[s] [slot[s]] of %blocks%
  • %blocks%'[s] (ore|fuel|result)[s] [slot[s]]
Since: 1.0
Usable in events: smelt, fuel burn
A slot of a furnace, i.e. either the ore, fuel or result slot. Remember to use 'block' and not 'furnace', as 'furnace' is not an existing expression.
Examples:
set the fuel slot of the clicked block to a lava bucket
set the block's ore slot to 64 iron ore
give the result of the block to the player
clear the result slot of the block
Game Mode 🔗
Patterns:
Since: 1.0
The gamemode of a player. (Gamemodes)
Examples:
player's gamemode is survival
set the player's gamemode to creative
Gliding State 🔗
Patterns:
  • [the] (gliding|glider) [state] of %entities%
  • %entities%'[s] (gliding|glider) [state]
Since: 2.2-dev21
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.
Examples:
set gliding of player to off
Glowing 🔗
Patterns:
Since: 2.2-dev18
Indicates if targeted entity is glowing (new 1.9 effect) or not. Glowing entities can be seen through walls.
Examples:
set glowing of player on
Gravity 🔗
Patterns:
Since: 2.2-dev21
If entity is affected by gravity or not, i.e. if it has Minecraft 1.10+ NoGravity flag.
Examples:
set gravity of player off
Group 🔗
Patterns:
Since: 2.2-dev35
Requirements: Vault, a permission plugin that supports Vault
The primary group or all groups of a player. This expression requires Vault and a compatible permissions plugin to be installed.
Examples:
on join:
    broadcast "%group of player%" # this is the player's primary group
    broadcast "%groups of player%" # this is all of the player's groups
Hash 🔗
Patterns:
  • %texts% hash[ed] with (MD5|SHA-256)
Since: 2.0, 2.2-dev32 (SHA-256 algorithm)
Hashes the given text using the MD5 or SHA-256 algorithms. Each algorithm is suitable for different use cases.

MD5 is provided mostly for backwards compatibility, as it is outdated and not secure. SHA-256 is more secure, and can used to hash somewhat confidental data like IP addresses and even passwords. It is not that secure out of the box, so please consider using salt when dealing with passwords! When hashing data, you must specify algorithms that will be used for security reasons!

Please note that a hash cannot be reversed under normal circumstanses. You will not be able to get original value from a hash with Skript.

Examples:
command /setpass :
    trigger:
        set {password::%uuid of player%} to text-argument hashed with SHA-256
command /login :
    trigger:
        tif text-argument hashed with SHA-256 is {password::%uuid of player%}:
            message "Login successful."
        else:
            message "Wrong password!"
Head location 🔗
Patterns:
Since: 2.0
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.
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:
Health 🔗
Patterns:
Since: 1.0
Usable in events: damage
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).
Examples:
message "You have %health% HP left."
Hidden Players 🔗
Patterns:
  • [(all [[of] the]|the)] hidden players (of|for) %players%
  • [(all [[of] the]|the)] players hidden (from|for|by) %players%
Since: 2.3
The players hidden from a player that were hidden using the player visibility effect.
Examples:
message "You are currently hiding: %hidden players of the player%"
Highest Solid Block 🔗
Patterns:
  • highest [(solid|non-air)] block at %locations%
Since: 2.2-dev34
Returns the highest solid block at the x and z coordinates of the world of a given location.
Examples:
highest block at location of arg-player
Hotbar Slot 🔗
Patterns:
  • [the] [([currently] selected|current)] hotbar slot of %players%
  • %players%'[s] [([currently] selected|current)] hotbar slot
Since: 2.2-dev36
The slot number of the currently selected hotbar slot.
Examples:
message "%player's current hotbar slot%"
set player's selected hotbar slot to slot 4 of player
Hover List 🔗
Patterns:
  • [the] [custom] [(player|server)] (hover|sample) ([message] list|message)
  • [the] [custom] player [(hover|sample)] list
Since: 2.3
Usable in events: server list ping
Requirements: Paper 1.12.2 or newer
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.
Examples:
on server list ping:
    clear the hover list
    add "Welcome to the Minecraft server!" to the hover list
    add "" to the hover list # A blank line
    add "There are %online players count% online players!" to the hover list
Humidity 🔗
Patterns:
  • [the] humidit(y|ies) of %blocks%
  • %blocks%'[s] humidit(y|ies)
Since: 2.2-dev35
Humidity of given blocks.
Examples:
set {_humidity} to event-block's humidity
IP 🔗
Patterns:
  • IP[s][( |-)address[es]] of %players%
  • %players%'[s] IP[s][( |-)address[es]]
  • IP[( |-)address]
Since: 1.4, 2.2-dev26 (when used in connect event), 2.3 (when used in server list ping event)
The IP address of a player, or the connected player in a connect event, or the pinger in a server list ping event.
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
Id 🔗
Patterns:
Since: 1.0
The id of a specific item. You usually don't need this expression as you can likely do everything with aliases.
Examples:
message "the ID of %type of the clicked block% is %id of the clicked block%."
Index Of 🔗
Patterns:
  • [the] [(first|last)] index of %text% in %text%
Since: 2.1
The first or last index of a character (or text) in a text, or -1 if it doesn't occur in the text. Indices range from 1 to the length of the text.
Examples:
set {_first} to the first index of "@" in the text argument
if {_s} contains "abc":
    set {_s} to the first (index of "abc" in {_s} + 3) characters of {_s} # removes everything after the first "abc" from {_s}
Indexes of List 🔗
Patterns:
  • [the] (indexes|indices) of %objects%
  • (all of the|all the|all) (indices|indexes) of %objects%
Since: 2.4
Returns all the indexes of a list variable
Examples:
set {l::*} to "some", "cool" and "values" broadcast "%all indexes of {l::*}%" # result is 1, 2 and 3
Inventory 🔗
Patterns:
  • [the] inventor(y|ies) of %inventoryholders%
  • %inventoryholders%'[s] inventor(y|ies)
Since: 1.0
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.
Examples:
add a plank to the player's inventory
clear the player's inventory
remove 5 wool from the inventory of the clicked block
Inventory Action 🔗
Patterns:
  • [the] inventory action
Since: 2.2-dev16
The inventory action of an inventory event. Please click on the link for more information.
Examples:
inventory action is pickup all
Inventory Holder/Viewers/Rows 🔗
Patterns:
  • [the] (holder[s]|viewers|[amount of] rows) of %inventories%
  • %inventories%'[s] (holder[s]|viewers|[amount of] rows)
Since: 2.2-dev34
Gets the rows/size/viewers/holder of an inventory.
Examples:
event-inventory's amount of rows
holder of player's top inventory
{_inventory}'s viewers
Inventory Slot 🔗
Patterns:
Since: 2.2-dev24
Represents a slot in an inventory. It can be used to change the item in an inventory too.
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
Item 🔗
Patterns:
  • [the] item
Since: unknown (before 2.1)
The item involved in an event, e.g. in a drop, dispense, pickup or craft event.
Examples:
on dispense:
    item is a clock
    set the time to 6:00
Item Amount 🔗
Patterns:
  • [the] item[[ ]stack] (amount|size|number) of %item stacks%
  • %item stacks%'[s] item[[ ]stack] (amount|size|number)
Since: 2.2-dev24
The amount of an item stack.
Examples:
send "You have got %item amount of player's tool% %player's tool% in your hand!" to player
Item Enchantments 🔗
Patterns:
Since: 2.2-dev36
All the enchantments an item type has.
Examples:
clear enchantments of event-item
Item of an Entity 🔗
Patterns:
Since: 2.2-dev35, 2.2-dev36 (improved)
An item associated with an entity. For dropped item entities, it gets, obviously, the item that was dropped. For item frames, the item inside the frame is returned. Other entities do not have items associated with them.
Examples:
Item with Lore 🔗
Patterns:
Since: 2.3
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.
Examples:
set {_test} to stone with lore "line 1" and "line 2"
give {_test} to player
Items 🔗
Patterns:
  • [(all [[of] the]|the|every)] item(s|[ ]types)
  • [(all [[of] the]|the)] items of type[s] %item types%
  • [(all [[of] the]|the|every)] block(s|[ ]types)
  • [(all [[of] the]|the)] blocks of type[s] %item types%
Since: unknown (before 2.1)
Items or blocks of a specific type, useful for looping.
Examples:
loop items of type ore and log:
    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
Items In 🔗
Patterns:
  • [(all [[of] the]|the)] items ([with]in|of|contained in|out of) [(inventor(y|ies)]) %inventories%
Since: 2.0
All 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.
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
Join & Split 🔗
Patterns:
  • (concat[enate]|join) %texts% [(with|using|by) [[the] delimiter] %text%]
  • split %text% (at|using|by) [[the] delimiter] %text%
  • %text% split (at|using|by) [[the] delimiter] %text%
Since: 2.1
Joins several texts with a common delimiter (e.g. ", "), or splits a text into multiple texts at a given delimiter.
Examples:
message "Online players: %join all players with "" | ""%" # %all players% would use the default "x, y, and z"
set {_s::*} to the string argument split at ","
Language 🔗
Patterns:
  • [the] [([currently] selected|current)] [game] (language|locale) [setting] of %players%
  • %players%'[s] [([currently] selected|current)] [game] (language|locale) [setting]
Since: 2.3
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.
Examples:
message player's current language
Last Damage Cause 🔗
Patterns:
Since: 2.2-Fixes-V10
Cause of last damage done to an entity
Examples:
set last damage cause of event-entity to fire tick
Last Loaded Server Icon 🔗
Patterns:
  • [the] [last[ly]] loaded server icon
Since: 2.3
Requirements: Paper 1.12.2 or newer
Returns the last loaded server icon with the load server icon effect.
Examples:
set {server-icon} to the last loaded server icon
Last Resource Pack Response 🔗
Patterns:
  • [the] [last] resource pack response[s] of %players%
  • %players%'[s] [last] resource pack response[s]
Since: 2.4
Requirements: Paper 1.9 or newer
Returns the last resource pack response received from a player.
Examples:
if player's last resource pack response is deny or download fail:
Last Spawned Entity 🔗
Patterns:
  • [the] [last[ly]] (spawned|shot) %*entity type%
  • [the] [last[ly]] dropped (item)
Since: 1.3 (spawned entity), 2.0 (shot entity), 2.2-dev26 (dropped item)
Holds the entity that was spawned most recently with the spawn effect, drop with the drop effect or shot with the shoot 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.
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
Leash Holder 🔗
Patterns:
Since: 2.3
The leash holder of a living entity.
Examples:
set {_example} to the leash holder of the target mob
Length 🔗
Patterns:
Since: 2.1
The length of a text, in number of characters.
Examples:
set {_l} to length of the string argument
Level 🔗
Patterns:
Since: unknown (before 2.1)
Usable in events: level change
The level of a player.
Examples:
reduce the victim's level by 1
set the player's level to 0
Level Progress 🔗
Patterns:
Since: 2.0
Usable in events: level change
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 his progress was more than 50%.
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
Light Level 🔗
Patterns:
Since: 1.3.4
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.
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
Location 🔗
Patterns:
  • [the] [event-](location|position)
Since: 2.0
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).
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
Location 🔗
Patterns:
Since: 2.0
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).
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
Location 🔗
Patterns:
Since:
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.
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%."
Location At 🔗
Patterns:
  • [the] (location|position) [at] [\(][x[ ][=[ ]]]%number%, [y[ ][=[ ]]]%number%, [and] [z[ ][=[ ]]]%number%[\)] [[(in|of) [[the] world]] %world%]
Since: 2.0
Allows to create a location from three coordinates and a world.
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
Loop value 🔗
Patterns:
  • [the] loop-<.+>
Since: 1.0
The currently looped value.
Examples:
# countdown:
loop 10 times:
    message "%11 - loop-number%"
    wait a second
# generate a 10x10 floor made of randomly coloured 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
Lore 🔗
Patterns:
Since: 2.1
An item's lore.
Examples:
set the 1st line of the item's lore to "Excalibur 2.0"
MOTD 🔗
Patterns:
  • [the] [(default)|(shown|displayed)] (MOTD|message of [the] day)
Since: 2.3
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.
Examples:
on server list ping:
    set the motd to "Join now!"
Max Health 🔗
Patterns:
Since: 2.0
Usable in events: damage, death
The maximum health of an entity, e.g. 10 for a player.
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
Max Players 🔗
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
Since: 2.3
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 always and can't be changed.
Examples:
on server list ping:
    set the max players count to (online players count + 1)
Maximum Stack Size 🔗
Patterns:
Since: 2.1
The maximum stack size of the specified material, e.g. 64 for torches, 16 for buckets, and 1 for swords.
Examples:
send "You can only pick up %max stack size of player's tool% of %type of (player's tool)%" to player
Me 🔗
Patterns:
  • me
  • my[self]
Since: 2.1.1
A 'me' expression that can be used in effect commands only.
Examples:
!heal me
!kick myself
!give a diamond axe to me
Message 🔗
Patterns:
  • [the] [chat( |-)]message
  • [the] (join|log[ ]in)( |-)message
  • [the] (quit|leave|log[ ]out|kick)( |-)message
  • [the] death( |-)message
Since: 1.4.6 (chat message), 1.4.9 (join & quit messages), 2.0 (death message)
Usable in events: chat, join, quit, death
The (chat) message of a chat event, the join message of a join event, the quit message of a quit event, or the death message on a death event. This expression is mostly useful for being changed.
Examples:
on chat:
    player has permission "admin"
    set message to "%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:
    set quit message to "%player% left this awesome server!"

on death:
    set the death message to "%player% died!"
Metadata 🔗
Patterns:
Since: 2.2-dev36
Metadata is a way to store temporary data on entities, blocks and more that disappears after a server restart.
Examples:
set metadata value "healer" of player to true
broadcast "%metadata value ""healer"" of player%"
clear metadata value "healer" of player
Money 🔗
Patterns:
  • [the] (money|balance|[bank] account) of %players%
  • %players%'[s] (money|balance|[bank] account)
Since: 2.0
Requirements: Vault, a permission plugin that supports Vault
How much virtual money a player has (can be changed). This expression requires Vault and a compatible economy plugin to be installed.
Examples:
message "You have %player's money%" # the currency name will be added automatically
remove 20$ from the player's balance # replace '$' by whatever currency you use
add 200 to the player's account # or omit the currency alltogether
Moved blocks 🔗
Patterns:
  • [the] moved blocks
Since: 2.2-dev27
Blocks which are moved in a piston event. Cannot be used outside of piston events.
Examples:
the moved blocks
Name / Display Name 🔗
Patterns:
  • [the] (player|tab)[ ]list name[s] of %players%
  • %players%'[s] (player|tab)[ ]list name[s]
Since: 1.4.6 (players' name & display name), unknown (player list name), 2.0 (item name), 2.2-dev20 (inventory name)
Represents a player's minecraft account name, chat display name, or playerlist name, or the custom name of an item, en entity or an inventory. The differences between the different names are:
  • name: Minecraft account name of a player (unchangeable), or the custom name of an item or mob (changeable).
  • display name: The name of a player as displayed in the chat and messages, e.g. when including %player% in a message. This name can be changed freely and can include colour codes, and is shared among all plugins (e.g. chat plugins will use a changed name).
  • tab list name: The name of a player used in the player lists that usually opens with the tab key. Please note that this is limited to 16 characters, including colour codes which are counted as 2 characters each, and that no two players can have the same tab list name at the same time.
Examples:
on join:
    player has permission "name.red"
    set the player's display name to "[admin]%name of player%"
    set the player's tablist name to "%name of player%"
set the name of the player's tool to "Legendary Sword of Awesomeness"
Name / Display Name 🔗
Patterns:
Since: 1.4.6 (players' name & display name), unknown (player list name), 2.0 (item name), 2.2-dev20 (inventory name)
Represents a player's minecraft account name, chat display name, or playerlist name, or the custom name of an item, en entity or an inventory. The differences between the different names are:
  • name: Minecraft account name of a player (unchangeable), or the custom name of an item or mob (changeable).
  • display name: The name of a player as displayed in the chat and messages, e.g. when including %player% in a message. This name can be changed freely and can include colour codes, and is shared among all plugins (e.g. chat plugins will use a changed name).
  • tab list name: The name of a player used in the player lists that usually opens with the tab key. Please note that this is limited to 16 characters, including colour codes which are counted as 2 characters each, and that no two players can have the same tab list name at the same time.
Examples:
on join:
    player has permission "name.red"
    set the player's display name to "[admin]%name of player%"
    set the player's tablist name to "%name of player%"
set the name of the player's tool to "Legendary Sword of Awesomeness"
Name / Display Name 🔗
Patterns:
Since: 1.4.6 (players' name & display name), unknown (player list name), 2.0 (item name), 2.2-dev20 (inventory name)
Represents a player's minecraft account name, chat display name, or playerlist name, or the custom name of an item, en entity or an inventory. The differences between the different names are:
  • name: Minecraft account name of a player (unchangeable), or the custom name of an item or mob (changeable).
  • display name: The name of a player as displayed in the chat and messages, e.g. when including %player% in a message. This name can be changed freely and can include colour codes, and is shared among all plugins (e.g. chat plugins will use a changed name).
  • tab list name: The name of a player used in the player lists that usually opens with the tab key. Please note that this is limited to 16 characters, including colour codes which are counted as 2 characters each, and that no two players can have the same tab list name at the same time.
Examples:
on join:
    player has permission "name.red"
    set the player's display name to "[admin]%name of player%"
    set the player's tablist name to "%name of player%"
set the name of the player's tool to "Legendary Sword of Awesomeness"
Named Item/Inventory 🔗
Patterns:
Since: 2.0, 2.2-dev34 (inventories)
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>.
Examples:
give a diamond sword of sharpness 100 named "Excalibur" to the player
set tool of player to the player's tool named "Wand"
set the name of the player's tool to "Wand"
open hopper inventory named "Magic Hopper" to player
Now 🔗
Patterns:
  • now
Since: 1.4
The current system time of the server. Use time to get the Minecraft time of a world.
Examples:
broadcast "Current server time: %now%"
Numbers 🔗
Patterns:
  • [(all [[of] the]|the)] (numbers|integers) (between|from) %number% (and|to) %number%
Since: 1.4.6
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 want to use the 'times' expression instead, for instance 'loop 5 times:'
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
Offline players 🔗
Patterns:
  • [(all [[of] the]|the)] offline[ ]players
Since: 2.2-dev35
All players that have ever joined the server. This includes the players currently online.
Examples:
send "Size of all players who have joined the server: %size of all offline players%"
Online Player Count 🔗
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
Since: 2.3
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 returns the real count of online players and can't be changed.

Fake online player count requires PaperSpigot 1.12.2+.

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 players count + 1)
Opened Inventory 🔗
Patterns:
  • [the] (current|open|top) inventory [of %players%]
  • %players%'[s] (current|open|top) inventory
Since: 2.2-dev24, 2.2-dev35 (Just 'current inventory' works in player events)
Return the currently opened inventory of a player. If no inventory is open, it returns the own player's crafting inventory.
Examples:
set slot 1 of player's current inventory to diamond sword
Parse 🔗
Patterns:
Since: 2.0
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}.
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
Parse Error 🔗
Patterns:
  • [the] [last] [parse] error
Since: 2.0
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.
Examples:
set {var} to line 1 parsed as integer
if {var} is not set:
    parse error is set:
        message "Line 1 is invalid: %last parse error%"
    else:
        message "Please put an integer on line 1!"
Passenger 🔗
Patterns:
Since: 2.0, 2.2-dev26 (Multiple passengers for 1.11.2+)
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
Examples:
#for 1.11 and lower
passenger of the minecart is a creeper or a cow
the saddled pig's passenger is a player
#for 1.11.2+
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
Ping 🔗
Patterns:
Since: 2.2-dev36
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).
Examples:
command /ping :
    trigger:
        send "%arg-1%'s ping is %arg-1's ping%"
Player List Header and Footer 🔗
Patterns:
  • [the] (player|tab)[ ]list (header|footer) [(text|message)] of %players%
  • %players%'[s] (player|tab)[ ]list (header|footer) [(text|message)]
Since: 2.4
Requirements: Minecraft 1.13 or newer
The message above and below the player list in the tab menu.
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 Skull 🔗
Patterns:
Since: 2.0
Gets a skull item representing a player. Skulls for other entities are provided by the aliases.
Examples:
give the victim's skull to the attacker
set the block at the entity to the entity's skull
Player Weather 🔗
Patterns:
  • [the] [(client|custom)] weather of %players%
  • %players%'[s] [(client|custom)] weather
Since: 2.2-dev34
The weather for a player.
Examples:
set weather of arg-player to rainy
reset player's weather
if arg-player's weather is rainy
Protocol Version 🔗
Patterns:
  • [the] [(sent|required|fake)] protocol version [number]
Since: 2.3
Usable in events: server list ping
Requirements: Paper 1.12.2 or newer
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).

Examples:
on server list ping:
    set the version string to "Version: %minecraft version%"
    set the protocol version to 0 # 13w41a (1.7) - so the player will see the custom version string almost always
Random 🔗
Patterns:
Since: 1.4.9
Gets a random item out of a set, e.g. a random player out of all players online.
Examples:
give a diamond to a random player out of all players
give a random item out of all items to the player
Random Number 🔗
Patterns:
  • [a] random (integer|number) (from|between) %number% (to|and) %number%
Since: 1.4
A random number or integer 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.
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
Raw Name 🔗
Patterns:
Since: unknown (2.2)
The raw Minecraft material name of the given item. Note that this is not guaranteed to give same results on all servers.
Examples:
raw name of tool of player
Region 🔗
Patterns:
  • [the] [event-]region
Since: 2.1
The region involved in an event. This expression requires a supported regions plugin to be installed.
Examples:
on region enter:
    region is {forbidden region}
    cancel the event
Region Members & Owners 🔗
Patterns:
  • [(all|the)] (members|owner[s]) of [[the] region[s]] %regions%
  • [[the] region[s]] %regions%'[s] (members|owner[s])
Since: 2.1
A list of members or owners of a region. This expression requires a supported regions plugin to be installed.
Examples:
on entering of a region:
    message "You're entering %region% whose owners are %owners of region%".
Regions At 🔗
Patterns:
Since: 2.1
All regions at a particular location. This expression requires a supported regions plugin to be installed.
Examples:
On click on a sign:
    line 1 of the clicked block is "[region info]"
    set {_regions::*} to regions at the clicked block
    if {_regions::*} is empty:
        message "No regions exist at this sign."
    else:
        message "Regions containing this sign: %{_regions::*}%."
Remaining Air 🔗
Patterns:
Since: unknown (before 2.1)
How much time a player has left underwater before starting to drown.
Examples:
player's remaining air is less than 3 seconds:
    send "hurry, get to the surface!" to the player
Respawn location 🔗
Patterns:
  • [the] respawn location
Since: 2.2-dev35
The location that a player should respawn at. This is used within the respawn event.
Examples:
on respawn:
    set respawn location to {example::spawn}
Rounding 🔗
Patterns:
  • [(a|the)] round[ed] down %number%
  • [(a|the)] round[ed] %number%
  • [(a|the)] round[ed] up %number%
Since: 2.0
Rounds numbers normally, up (ceiling) or down (floor) respectively.
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
Saturation 🔗
Patterns:
Since: 2.2-Fixes-v10, 2.2-dev35 (fully modifiable)
The saturation of a player. If used in a player event, it can be omitted and will default to event-player.
Examples:
set saturation of player to 20
Scoreboard Tags 🔗
Patterns:
  • [(all [[of] the]|the)] scoreboard tags of %entities%
  • %entities%'[s] scoreboard tags
Since: 2.3
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).

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
Script Name 🔗
Patterns:
  • [the] script[['s] name]
  • name of [the] script
Since: 2.0
Usable in events: Script Load/Unload
Holds the current script's name (the file name without '.sk').
Examples:
on script load:
    set {running::%script%} to true
on script unload:
    set {running::%script%} to false
Server Icon 🔗
Patterns:
  • [the] [((default)|(shown|sent))] [server] icon
Since: 2.3
Requirements: Paper 1.12.2 or newer
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.
Examples:
on script load:
    set {server-icons::default} to the default server icon
Shooter 🔗
Patterns:
Since: 1.3.7
The shooter of a projectile.
Examples:
shooter is a skeleton
Shuffled List 🔗
Patterns:
Since: 2.2-dev32
Shuffles given list randomly. This is done by replacing indices by random numbers in resulting list.
Examples:
set {_list::*} to shuffled {_list::*}
Sign Text 🔗
Patterns:
  • [the] line %number% [of %block%]
  • [the] (1st|first|2nd|second|3rd|third|4th|fourth) line [of %block%]
Since: 1.3
A line of text on a sign. Can be changed, but remember that there is a 16 character limit per line (including colour codes that use 2 characters each).
Examples:
on rightclick on sign:
    line 2 of the clicked block is "[Heal]":
        heal the player
    set line 3 to "%player%"
Slot Index 🔗
Patterns:
  • [the] (index|indices) of %slots%
  • %slots%'[s] (index|indices)
Since: 2.2-dev35
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.
Examples:
if index of event-slot is 10:
    send "You bought a pie!"
Sorted List 🔗
Patterns:
Since: 2.2-dev19
Sorts given list in natural order. All objects in list must be comparable; if they're not, this expression will return nothing.
Examples:
set {_sorted::*} to sorted {_players::*}
Spawn 🔗
Patterns:
  • [the] spawn[s] [(point|location)[s]] [of %worlds%]
  • %worlds%'[s] spawn[s] [(point|location)[s]]
Since: 1.4.2
The spawn point of a world.
Examples:
teleport all players to spawn
set the spawn point of "world" to the player's location
Spawn Reason 🔗
Patterns:
  • [the] spawn[ing] reason
Since: 2.3
The spawn reason in a spawn event.
Examples:
on spawn:
    spawn reason is reinforcements or breeding
Special Number 🔗
Patterns:
  • (NaN|[(-|minus)](infinity|∞)) value
  • value of (NaN|[(-|minus)](infinity|∞))
Since: 2.2-dev32d
Special number values, namely NaN, Infinity and -Infinity
Examples:
if {_number} is NaN value:
Speed 🔗
Patterns:
  • [the] (walk[ing]|fl(y[ing]|ight))[( |-])speed of %players%
  • %players%'[s] (walk[ing]|fl(y[ing]|ight))[( |-])speed
Since: unknown (before 2.1)
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 his FOV just like potions do.
Examples:
set the player's walk speed to 1
increase the argument's fly speed by 0.1
Subtext 🔗
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%
Since: 2.1
Extracts part of a text. You can either get the first <x> characters, the last <x> characters, 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).
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
TPS (ticks per second) 🔗
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
Since: 2.2-dev36
Returns the 3 most recent TPS readings, like the /tps command. This expression is only supported on some server software (PaperSpigot).
Examples:
broadcast "%tps%"
Tamer 🔗
Patterns:
  • [the] tamer
Since: 2.2-dev25
The tamer of an entity. Can only be used in entity tame events. You can use 'event-entity' to refer tamed entity itself.
Examples:
on tame:
    if the tamer is a player:
        send "someone tamed something!" to console
Target 🔗
Patterns:
Since: unknown (before 2.1)
For players this is the entity at the crosshair, while for mobs and experience orbs it represents the entity they are attacking/following (if any).
Examples:
on entity target:
    entity's target is a player
    send "You're being followed by an %entity%!" to target of entity
Targeted Block 🔗
Patterns:
  • [the] target[ed] block[s] [of %players%]
  • %players%'[s] target[ed] block[s]
  • [the] actual[ly] target[ed] block[s] [of %players%]
  • %players%'[s] actual[ly] target[ed] block[s]
Since: 1.0
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.
Examples:
# A command to set the block a player looks at to a specific type:
command /setblock :
    trigger:
        set targeted block to argument
Teleport Cause 🔗
Patterns:
  • [the] teleport (cause|reason|type)
Since: 2.2-dev35
The teleport cause within a player teleport event.
Examples:
on teleport
    teleport cause is nether portal, end portal or end gateway
Temperature 🔗
Patterns:
  • [the] temperature[s] of %blocks%
  • %blocks%'[s] temperature[s]
Since: 2.2-dev35
Temperature at given block.
Examples:
message "%temperature of the targeted block%"
Ternary 🔗
Patterns:
Since: 2.2-dev36
A shorthand expression for returning something based on a condition.
Examples:
set {points} to 500 if {admin::%player's uuid%} is set else 100
Time 🔗
Patterns:
  • [the] time[s] [([with]in|of) %worlds%]
  • %worlds%'[s] time[s]
Since: 1.0
The time of a world.
Examples:
time in world is between 18:00 and 6:00:
    broadcast "It's night-time, watch out for monsters!"
Tool 🔗
Patterns:
Since: 1.0
The item a player is holding.
Examples:
player is holding a pickaxe
# is the same as
player's tool is a pickaxe
player's off hand tool is shield #Only for Minecraft 1.9
Type of 🔗
Patterns:
Since: 1.4
Type of a block, an item, en entity or an inventory. Types of items and blocks 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.
Examples:
on rightclick on an entity:
    message "This is a %type of clicked entity%!"
UUID 🔗
Patterns:
Since: 2.1.2, 2.2 (offline players' UUIDs), 2.2-dev24 (other entities' UUIDs)
The UUID of a player, entity or world. In the future there will be an option to use a player's UUID instead of the name in variable names (i.e. when %player% is used), but for now this can be used. Please note that this expression does not work for offline players if you are under 1.8!
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
Unbreakable Items 🔗
Patterns:
Since: 2.2-dev13b
Creates unbreakable copies of given items.
Examples:
unbreakable iron sword #Creates unbreakable iron sword
Unix Timestamp 🔗
Patterns:
  • [the] unix timestamp of %dates%
  • %dates%'[s] unix timestamp
Since: 2.2-dev31
Converts given date to Unix timestamp. This is roughly how many seconds have elapsed since 1 January 1970.
Examples:
unix timestamp of now
Upper/lower Case Text 🔗
Patterns:
  • %text% in (upper|lower) case
  • capitalized %text%
Since: 2.2-dev16
Copy of given text in upper or lower case.
Examples:
"oops!" in upper case # OOPS!
Vectors - Angle Between 🔗
Patterns:
Since: 2.2-dev28
Gets the angle between two vectors.
Examples:
send "%the angle between vector 1, 0, 0 and vector 0, 1, 1%"
Vectors - Arithmetic 🔗
Patterns:
Since: 2.2-dev28
Arithmetic expressions for vectors.
Examples:
set {_v} to vector 1, 2, 3 // 5
set {_v} to {_v} ++ {_v}
set {_v} to {_v} ++ 5
set {_v} to {_v} -- {_v}
set {_v} to {_v} -- 5
set {_v} to {_v} ** {_v}
set {_v} to {_v} ** 5
set {_v} to {_v} // {_v}
set {_v} to {_v} // 5
Vectors - Create from XYZ 🔗
Patterns:
Since: 2.2-dev28
Creates a vector from x, y and z values.
Examples:
set {_v} to vector 0, 1, 0
Vectors - Cross Product 🔗
Patterns:
Since: 2.2-dev28
Gets the cross product between two vectors.
Examples:
send "%vector 1, 0, 0 cross vector 0, 1, 0%"
Vectors - Cylindrical Shape 🔗
Patterns:
  • [a] [new] cylindrical vector [(from|with)] [radius] %number%, [yaw] %number%(,| and) [height] %number%
Since: 2.2-dev28
Forms a 'cylindrical shaped' vector using yaw to manipulate the current point.
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
Vectors - Dot Product 🔗
Patterns:
Since: 2.2-dev28
Gets the dot product between two vectors.
Examples:
set {_v} to {_v2} dot {_v3}
Vectors - Length 🔗
Patterns:
  • [the] (vector|standard|normal) length[s] of %vectors%
  • %vectors%'[s] (vector|standard|normal) length[s]
Since: 2.2-dev28
Gets or sets the length of a vector.
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}%"
Vectors - Location Vector Offset 🔗
Patterns:
Since: 2.2-dev28
Returns the location offset by vectors.
Examples:
set {_loc} to {_loc} ~ {_v}
Vectors - Normalized 🔗
Patterns:
Since: 2.2-dev28
Returns the same vector but with length 1.
Examples:
set {_v} to normalized {_v}
Vectors - Random Vector 🔗
Patterns:
  • [a] random vector
Since: 2.2-dev28
Creates a random vector.
Examples:
set {_v} to a random vector
Vectors - Spherical Shape 🔗
Patterns:
  • [new] spherical vector [(from|with)] [radius] %number%, [yaw] %number%(,| and) [pitch] %number%
Since: 2.2-dev28
Forms a 'spherical shaped' vector using yaw and pitch to manipulate the current point.
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
Vectors - Squared Length 🔗
Patterns:
  • [the] squared length[s] of %vectors%
  • %vectors%'[s] squared length[s]
Since: 2.2-dev28
Gets the squared length of a vector.
Examples:
send "%squared length of vector 1, 2, 3%"
Vectors - Vector Between Locations 🔗
Patterns:
Since: 2.2-dev28
Creates a vector between two locations.
Examples:
set {_v} to vector between {_loc1} and {_loc2}
Vectors - Vector from Location 🔗
Patterns:
Since: 2.2-dev28
Creates a vector from a location.
Examples:
set {_v} to vector of {_loc}
Vectors - Vector from Pitch and Yaw 🔗
Patterns:
  • [a] [new] vector (from|with) yaw %number% and pitch %number%
Since: 2.2-dev28
Creates a vector from a yaw and pitch value.
Examples:
set {_v} to vector from yaw 45 and pitch 45
Vectors - Velocity 🔗
Patterns:
Since: 2.2-dev31
Gets or changes velocity of an entity.
Examples:
set player's velocity to {_v}
Vectors - XYZ Component 🔗
Patterns:
  • [the] [vector] (x|y|z) [component[s]] of %vectors%
  • %vectors%'[s] [vector] (x|y|z) [component[s]]
Since: 2.2-dev28
Gets or changes the x, y or z component of a vector.
Examples:
set {_v} to vector 1, 2, 3
send "%x of {_v}%, %y of {_v}%, %z of {_v}%"
add 1 to x of {_v}
add 2 to y of {_v}
add 3 to z of {_v}
send "%x of {_v}%, %y of {_v}%, %z of {_v}%"
set x component of {_v} to 1
set y component of {_v} to 2
set z component of {_v} to 3
send "%x component of {_v}%, %y component of {_v}%, %z component of {_v}%"
Vectors - Yaw and Pitch 🔗
Patterns:
  • [the] [vector] (yaw|pitch) of %vectors%
  • %vectors%'[s] [vector] (yaw|pitch)
Since: 2.2-dev28
Gets or sets the yaw or pitch value of a vector.
Examples:
set {_v} to vector -1, 1, 1
send "%vector yaw of {_v}%, %vector pitch of {_v}%"
add 45 to vector yaw of {_v}
subtract 45 from vector pitch of {_v}
send "%vector yaw of {_v}%, %vector pitch of {_v}%"
set vector yaw of {_v} to -45
set vector pitch of {_v} to 45
send "%vector yaw of {_v}%, %vector pitch of {_v}%"
Vehicle 🔗
Patterns:
Since: 2.0
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
Examples:
vehicle of the player is a minecart
Version 🔗
Patterns:
  • ([craft]bukkit|minecraft|skript)( |-)version
Since: 2.0
The version of Bukkit, Minecraft or Skript respectively.
Examples:
message "This server is running Minecraft %minecraft version% on Bukkit %bukkit version%"
message "This server is powered by Skript %skript version%"
Version String 🔗
Patterns:
  • [the] [(shown|custom)] version [(string|text)]
Since: 2.3
Usable in events: server list ping
Requirements: Paper 1.12.2 or newer
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.
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 "Version: %minecraft version%"
Weather 🔗
Patterns:
Since: 1.0
Usable in events: weather change
The weather in the given or the current world.
Examples:
set weather to clear
weather in "world" is rainy
World 🔗
Patterns:
Since: 1.0
The world the event occurred in.
Examples:
world is "world_nether"
teleport the player to the world's spawn
set the weather in the player's world to rain
World Seed 🔗
Patterns:
Since: 2.2-dev35
The seed of given world. Note that it will be returned as Minecraft internally treats seeds, not as you specified it in world configuration.
Examples:
broadcast "Seed: %seed of player's world%"
Worlds 🔗
Patterns:
  • [(all [[of] the]|the)] worlds
Since: 1.0
All worlds of the server, useful for looping.
Examples:
loop all worlds:
    broadcast "You're in %loop-world%" to loop-world
X of Item 🔗
Patterns:
Since: 1.2
An expression to be able to use a certain amount of items where the amount can be any expression. Please note that this expression is not stable and might be replaced in the future.
Examples:
give level of player of pickaxes to the player
Yaw / Pitch 🔗
Patterns:
Since: 2.0
The yaw or pitch of a location. You likely won't need this expression ever if you don't know what this means.
Examples:
log "%player%: %location of player%, %player's yaw%, %player's pitch%" to "playerlocs.log"