Expressions

Absorbed blocks 🔗
Patterns:
  • [the] absorbed blocks
Since: 2.5
Usable in events: sponge absorb
The blocks absorbed by a sponge block.
Examples:
the absorbed blocks
Affected Entities 🔗
Patterns:
  • [the] affected entities
Since: 2.4
The affected entities in the area cloud effect event.
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
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
All Scripts 🔗
Patterns:
  • [all [of the]] scripts [(without ([subdirectory] paths|parents))]
  • [all [of the]] (enabled|loaded) scripts [(without ([subdirectory] paths|parents))]
  • [all [of the]] (disabled|unloaded) scripts [(without ([subdirectory] paths|parents))]
Since: 2.5
Returns all of the scripts, or just the enabled or disabled ones.
Examples:
command /scripts:
    trigger:
        send "All Scripts: %scripts%" to player
        send "Loaded Scripts: %enabled scripts%" to player
        send "Unloaded Scripts: %disabled scripts%" to 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%
  • recursive (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.

Also, you can get the recursive size of a list, which will return 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!

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."
Applied Enchantments 🔗
Patterns:
  • [the] applied enchant[ment]s
Since: 2.5
Usable in events: enchant
The applied enchantments in an enchant event. Deleting or removing the applied enchantments will prevent the item's enchantment.
Examples:
on enchant
    set the applied enchantments to sharpness 10 and fire aspect 5
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
Arrow Knockback Strength 🔗
Patterns:
Since: 2.5.1
An arrow's knockback strength.
Examples:
on shoot:
    event-projectile is an arrow
    set arrow knockback strength of event-projectile to 10
Arrows Stuck 🔗
Patterns:
Since: 2.5
The number of arrows stuck in a living entity.
Examples:
set arrows stuck in player to 5
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 Data 🔗
Patterns:
Since: 2.5, 2.5.2 (set)
Requirements: Minecraft 1.13+
Get the block data associated with a block. This data can also be used to set blocks.
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]
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
Block State 🔗
Patterns:
Since: INSERT VERSION
Get/set the specific block states of blocks. States will accept numbers, booleans and strings. 'without updates' will stop the blocks around from updating their block states when changing a state. This has no effect when getting states. For more information regarding block state options, check McWiki, go to a block of your choosing, and scroll down to 'block states' to see all variations.
Examples:
set {_age} to block state "age" of target block
set block state "age" of target block to 3
set block state "facing" of target block to north
set block state "east" of target block without updates to false
Blocks 🔗
Patterns:
Since: 1.0, 2.5.1 (within/cuboid/chunk)
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.
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
Book Author 🔗
Patterns:
  • [the] [book] (author|writer|publisher) of %item types%
  • %item types%'[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
Case Text 🔗
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%
Since: 2.2-dev16 (lowercase and uppercase), 2.5 (advanced cases)
Copy of given text in Lowercase, Uppercase, Proper Case, camelCase, PascalCase, Snake_Case, and Kebab-Case
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?
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|clicked [enchant[ment]] button)
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. If the command sender is a command block, its location can be retrieved by using %block's location%
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 Inventory 🔗
Patterns:
Since: INSERT VERSION
Create a custom inventory that can be modified and opened to the player. NOTE: Inventories are not serialized, and will not save as variables once the server stops. Also, slots of a merchant inventory can't be set, these requires merchant recipes.
Examples:
set {_i} to custom chest inventory with size 4 named "Ma Chest"
set slot 1 of {_i} to a diamond sword
open {_i} to player
open a custom barrel inventory to player
open a custom hopper inventory named "Señor Hoppie" to player
Custom Model Data 🔗
Patterns:
Since: 2.5
Requirements: 1.14+
Get/set the CustomModelData tag for an item. (Value is an integer between 0 and 99999999)
Examples:
set custom model data of player's tool to 3
set {_model} to custom model data of player's tool
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/Damage Value 🔗
Patterns:
Since: 1.2
The data/damage value of an item/block. Data values of blocks are only supported on 1.12.2 and below. 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:
set damage value of player's tool to 10
set data value of target block of player to 3
add 1 to the data value of the clicked block
reset data value of block at player
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
Usable in events: death
Only works in 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.
Examples:
clear drops
remove 4 planks from the drops
Drops Of Block 🔗
Patterns:
Since: 2.5.1
Requirements: Minecraft 1.15+ ('as %entity%')
A list of the items that will drop when a block is broken.
Examples:
on break of block:
    give drops of block using player's tool to player
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
Enchant Item 🔗
Patterns:
  • [the] enchant[ed] item
Since: 2.5
Usable in events: enchant prepare, enchant
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.
Examples:
on enchant:
    set the enchanted item to a diamond chestplate
on enchant prepare:
    set the enchant item to a wooden sword
Enchanting Experience Cost 🔗
Patterns:
  • [the] [displayed] ([e]xp[erience]|enchanting) cost
Since: 2.5
Usable in events: enchant
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.
Examples:
on enchant:
    send "Cost: %the displayed enchanting cost%" to player
Enchantment Bonus 🔗
Patterns:
  • [the] enchantment bonus
Since: 2.5
Usable in events: enchant prepare
The enchantment bonus in an enchant prepare event. This represents the number of bookshelves affecting/surrounding the enchantment table.
Examples:
on enchant:
    send "There are %enchantment bonus% bookshelves surrounding this enchantment table!" to 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"
Enchantment Offer 🔗
Patterns:
  • [all [of]] [the] enchant[ment] offers
  • enchant[ment] offer[s] %numbers%
  • [the] %number%(st|nd|rd|th) enchant[ment] offer
Since: 2.5
Usable in events: enchant prepare
Requirements: 1.11 or newer
The enchantment offer in enchant prepare events.
Examples:
on enchant prepare:
    send "Your enchantment offers are: %the enchantment offers%" to player
Enchantment Offer Enchantment Cost 🔗
Patterns:
Since: 2.5
Requirements: 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.
Examples:
set cost of enchantment offer 1 to 50
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, 2.5 (chunks)
All entities in all worlds, in a specific world, in a chunk 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 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
Entity AI 🔗
Patterns:
Since: 2.5
Returns whether an entity has AI.
Examples:
set artificial intelligence of target entity to false
Entity Attribute 🔗
Patterns:
Since: 2.5
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.
Examples:
on damage of player:
    send "You are wounded!"
    set victim's attack speed attribute to 2
Entity Owner 🔗
Patterns:
Since: 2.5
The owner of a tameable entity, such as a horse or wolf.
Examples:
set owner of target entity to player
delete owner of target entity
set {_t} to uuid of tamer of target entity
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, 2.5.3 (block break event)
Usable in events: experience spawn, break / mine
How much experience was spawned in an experience spawn or block break event. Can be changed.
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
Exploded Blocks 🔗
Patterns:
  • [the] exploded blocks
Since: 2.5
Usable in events: explode
Get all the blocks that were destroyed in an explode event
Examples:
on explode:
    loop exploded blocks:
        add loop-block to {exploded::blocks::*}
Explosion Block Yield 🔗
Patterns:
  • [the] [explosion['s]] block (yield|amount)
  • [the] percentage of blocks dropped
Since: 2.5
Usable in events: explosion
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.
Examples:
on explode:
set the explosion's block yield to 10%
Explosion Yield 🔗
Patterns:
  • [the] explosion (yield|radius|size)
  • [the] (yield|radius|size) of [the] explosion
Since: 2.5
Usable in events: explosion prime
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
Examples:
on explosion prime:
    set the yield of the explosion to 10
Explosive Yield 🔗
Patterns:
  • [the] explosive (yield|radius|size) of %entities%
  • %entities%'[s] explosive (yield|radius|size)
Since: 2.5
Requirements: Minecraft 1.12 or newer for creepers
The yield of an explosive (creeper, primed tnt, fireball, etc.). This is how big of an explosion is caused by the entity. Read this wiki page for more information
Examples:
on spawn of a creeper:
    set the explosive yield of the event-entity to 10
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
Fall Distance 🔗
Patterns:
  • [the] [the] fall[en] (distance|height) of %entities%
  • %entities%'[s] [the] fall[en] (distance|height)
Since: 2.5
The distance an entity has fallen for.
Examples:
set all entities' fall distance to 10
on damage:
    send "%victim's fall distance%" to victim
Fertilized Blocks 🔗
Patterns:
  • [all] [the] fertilized blocks
Since: 2.5
Usable in events: block fertilize
Requirements: Minecraft 1.13 or newer
The blocks fertilized in block fertilize events.
Examples:
the fertilized blocks
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
Gamerule Value 🔗
Patterns:
Since: 2.5
Requirements: Minecraft 1.13+
The gamerule value of a world.
Examples:
set the gamerule commandBlockOutput of world "world" to false
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 to true
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:
        if 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:
Heal Amount 🔗
Patterns:
  • [the] heal amount
Since: 2.5.1
Usable in events: heal
The amount of health healed in a healing event.
Examples:
increase heal amount by 2
remove 0.5 from heal amount
Heal Reason 🔗
Patterns:
  • (regen|health regain|heal) (reason|cause)
Since: 2.5
The heal reason of a heal event. Please click on the link for more information.
Examples:
on heal:
    if heal reason = satiated:
        send "You ate enough food and gained health back!" to player
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 Button 🔗
Patterns:
  • [the] hotbar button
Since: 2.5
The hotbar button clicked in an inventory click event.
Examples:
on inventory click:
    send "You clicked the hotbar button %hotbar button%!"
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/Slots 🔗
Patterns:
  • (holder[s]|viewers|[amount of] rows|[amount of] slots) of %inventories%
  • %inventories%'[s] (holder[s]|viewers|[amount of] rows|[amount of] slots)
Since: 2.2-dev34, 2.5 (slots)
Gets the amount of rows/slots, viewers and 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:
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), 2.5.2 (throwable projectiles)
Requirements: Minecraft 1.15.2+ (throwable projectiles)
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. For throwable projectiles (snowballs, enderpearls etc.),it gets the displayed item. Other entities do not have items associated with them.
Examples:
Item with CustomModelData 🔗
Patterns:
Since: 2.5
Requirements: 1.14+
Get an item with a CustomModelData tag. (Value is an integer between 0 and 99999999)
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
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%
  • regex split %text% (at|using|by) [[the] delimiter] %text%
  • regex %text% split (at|using|by) [[the] delimiter] %text%
Since: 2.1, 2.5.2 (regex support)
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 Attacker 🔗
Patterns:
  • [the] last attacker of %entity%
  • %entity%'[s] last attacker
Since: 2.5.1
The last block or entity that attacked an entity.
Examples:
send "%last attacker of event-entity%"
Last Damage 🔗
Patterns:
Since: 2.5.1
The last damage that was done to an entity. Note that changing it doesn't deal more/less damage.
Examples:
set last damage of event-entity to 2
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
Last/First Login Time 🔗
Patterns:
Since: 2.5
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.
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."
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 their 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 Durability 🔗
Patterns:
Since: 2.5
The maximum durability of an item.
Examples:
maximum durability of diamond sword
if max durability of player's tool is not 0: # Item is damageable
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 Minecart Speed 🔗
Patterns:
  • [the] max[imum] minecart (speed|velocity) of %entities%
  • %entities%'[s] max[imum] minecart (speed|velocity)
Since: 2.5.1
The maximum speed of a minecart.
Examples:
on right click on minecart:
    set max minecart speed of event-entity to 1
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
Mending Repair Amount 🔗
Patterns:
  • [the] [mending] repair amount
Since: 2.5.1
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.
Examples:
on item mend:
    set the mending repair amount to 100
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
Minecart Derailed / Flying Velocity 🔗
Patterns:
  • [the] [minecart] (derailed|flying) velocity of %entities%
  • %entities%'[s] [minecart] (derailed|flying) velocity
Since: 2.5.1
The velocity of a minecart as soon as it has been derailed or as soon as it starts flying.
Examples:
on right click on minecart:
    set derailed velocity of event-entity to vector 2, 10, 2
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 / Tab List Name 🔗
Patterns:
  • [the] ((player|tab)[ ]list name[s]) of %players%
  • %players%'[s] ((player|tab)[ ]list name[s])
Since: before 2.1, 2.2-dev20 (inventory name), 2.4 (non-living entity support, changeable inventory name)
Represents the Minecraft account, display or tab list name of a player, or the custom name of an item, entity, inventory, or gamerule.

        
  • Players         
                  
    • Name: The Minecraft account name of the player. Can't be changed, but 'display name' can be changed.
    •             
    • Display Name: The name of the player that is displayed in messages. This name can be changed freely and can include colour codes, and is shared among all plugins (e.g. chat plugins will use the display name).
    •         
        
  •     
  • Entities         
                  
    • Name: 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'.
    •             
    • Display Name: 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         
                  
    • Name and Display Name: The custom name of the item (not the Minecraft locale name). Can be changed.
    •         
        
  •     
  • Inventories         
                  
    • Name and Display Name: 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 (1.13+)         
                  
    • Name: The name of the gamerule. Cannot be changed.
    •         
        
Examples:
on join:
    player has permission "name.red"
    set the player's display name to "[admin] %name of player%"
    set the player's tab list name to "%player's name%"
set the name of the player's tool to "Legendary Sword of Awesomeness"
Name / Display Name / Tab List Name 🔗
Patterns:
Since: before 2.1, 2.2-dev20 (inventory name), 2.4 (non-living entity support, changeable inventory name)
Represents the Minecraft account, display or tab list name of a player, or the custom name of an item, entity, inventory, or gamerule.

        
  • Players         
                  
    • Name: The Minecraft account name of the player. Can't be changed, but 'display name' can be changed.
    •             
    • Display Name: The name of the player that is displayed in messages. This name can be changed freely and can include colour codes, and is shared among all plugins (e.g. chat plugins will use the display name).
    •         
        
  •     
  • Entities         
                  
    • Name: 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'.
    •             
    • Display Name: 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         
                  
    • Name and Display Name: The custom name of the item (not the Minecraft locale name). Can be changed.
    •         
        
  •     
  • Inventories         
                  
    • Name and Display Name: 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 (1.13+)         
                  
    • Name: The name of the gamerule. Cannot be changed.
    •         
        
Examples:
on join:
    player has permission "name.red"
    set the player's display name to "[admin] %name of player%"
    set the player's tab list name to "%player's name%"
set the name of the player's tool to "Legendary Sword of Awesomeness"
Named Item 🔗
Patterns:
Since: 2.0
Directly names an item, useful for defining a named item in a script. If you want to (re)name existing items you can either use this expression or use set name of <item> 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"
New Line 🔗
Patterns:
  • n[ew]l[ine]
  • line[ ]break
Since: 2.5
Returns a line break separator.
Examples:
send "Hello%nl%Goodbye!" to player
No Damage Ticks 🔗
Patterns:
Since: 2.5
The number of ticks that an entity is invulnerable to damage for.
Examples:
on damage:
    set victim's invulnerability ticks to 20 #Victim will not take damage for the next second
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%"
Number of Characters 🔗
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%
Since: 2.5
The number of uppercase, lowercase, or digit characters in a string.
Examples:
#Simple Chat Filter
on chat:
    if number of uppercase chars in message / length of message > 0.5
        cancel event
        send "Your message has to many caps!" to player
Numbers 🔗
Patterns:
  • [(all [[of] the]|the)] (numbers|integers|decimals) (between|from) %number% (and|to) %number%
Since: 1.4.6 (integers & numbers), 2.5.1 (decimals)
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:'
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
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
Portal 🔗
Patterns:
  • [the] portal['s] blocks
  • [the] blocks of [the] portal
Since: 2.4
Usable in events: portal_create
The blocks associated with a portal in the portal creation event.
Examples:
on portal creation:
    loop portal blocks:
        broadcast "%loop-block% is part of a portal!"
Potion Effect 🔗
Patterns:
Since: 2.5.2
Create a new potion effect to apply to an entity or item type. Do note that when applying potion effects to tipped arrows/lingering potions, Minecraft reduces the timespan.
Examples:
set {_p} to potion effect of speed of tier 1 without particles for 10 minutes
add {_p} to potion effects of player's tool
add {_p} to potion effects of target entity
add potion effect of speed 1 to potion effects of player
Potion Effects 🔗
Patterns:
Since: 2.5.2
Represents the active potion effects of entities and itemtypes. You can clear all potion effects of an entity/itemtype and add/remove a potion effect/type to/from an entity/itemtype. Do note you will not be able to clear the base potion effects of a potion item. In that case, just set the item to a water bottle. When adding a potion effect type (rather than a potion effect), it will default to 15 seconds with tier 1.
Examples:
set {_p::*} to active potion effects of player
clear all the potion effects of player
clear all the potion effects of player's tool
add potion effects of player to potion effects of player's tool
add speed to potion effects of target entity
remove speed and night vision from potion effects of player
Prefix/Suffix 🔗
Patterns:
  • [the] [chat] (prefix|suffix) of %players%
  • %players%'[s] [chat] (prefix|suffix)
Since: 2.0
The prefix or suffix as defined in the server's chat plugin.
Examples:
on chat:
    cancel event
    broadcast "%player's prefix%%player's display name%%player's suffix%: %message%" to the player's world
set the player's prefix to "[Admin] "
Projectile Bounce State 🔗
Patterns:
  • [the] [the] projectile bounce (state|ability|mode) of %projectiles%
  • %projectiles%'[s] [the] projectile bounce (state|ability|mode)
Since: 2.5.1
A projectile's bounce state.
Examples:
on projectile hit:
    set projectile bounce mode of event-projectile to true
Projectile Critical State 🔗
Patterns:
  • [the] [the] (projectile|arrow) critical (state|ability|mode) of %projectiles%
  • %projectiles%'[s] [the] (projectile|arrow) critical (state|ability|mode)
Since: 2.5.1
A projectile's critical state. The only currently accepted projectiles are arrows and tridents.
Examples:
on shoot:
    event-projectile is an arrow
    set projectile critical mode of event-projectile to true
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
Random UUID 🔗
Patterns:
  • [a] random uuid
Since: 2.5.1
Returns a random UUID.
Examples:
set {_uuid} to random uuid
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
Redstone Block Power 🔗
Patterns:
  • [the] redstone power of %blocks%
  • %blocks%'[s] redstone power
Since: 2.5
Power of a redstone block
Examples:
if redstone power of targeted block is 15:
    send "This block is very powerful!"
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}
Reversed List 🔗
Patterns:
Since: 2.4
Reverses given list.
Examples:
set {_list::*} to reversed {_list::*}
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
Sea Level 🔗
Patterns:
Since: 2.5.1
Gets the sea level of a world.
Examples:
send "The sea level in your world is %sea level in player's world%"
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
Spawner Type 🔗
Patterns:
  • [the] (entity|creature) type[s] of %blocks%
  • %blocks%'[s] (entity|creature) type[s]
Since: 2.4
Retrieves, sets, or resets the spawner's entity type
Examples:
on right click:
    if event-block is spawner:
        send "Spawner's type is %target block's entity type%"
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 their 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%
  • [the] character[s] at [(index|position|indexes|indices|positions)] %numbers% (in|of) %texts%
Since: 2.1, 2.5.2 (character at, multiple strings support)
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).
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
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!"
Time Played 🔗
Patterns:
Since: 2.5
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.
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
Time Since 🔗
Patterns:
  • [the] time since %dates%
Since: 2.5
The time that has passed since a date. If the given date is in the future, a value will not be returned.
Examples:
send "%time since 5 minecraft days ago% has passed since 5 minecraft days ago!" to player
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, 2.5.2 (potion effect)
Type of a block, item, entity, inventory or potion effect. 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. Types of potion effects are potion effect types.
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 Date 🔗
Patterns:
Since: 2.5
Converts given Unix timestamp to a date. The Unix timespan represents the number of seconds elapsed since 1 January 1970.
Examples:
unix date of 946684800 #1 January 2000 12:00 AM (UTC Time)
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
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%"
View Distance of Client 🔗
Patterns:
  • [the] client view distance[s] of %players%
  • %players%'[s] client view distance[s]
Since: 2.5
Requirements: 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.
Examples:
set {_clientView} to the client view distance of player
set view distance of player to client view distance of player
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
Whitelist 🔗
Patterns:
  • [the] white[ ]list
Since: 2.5.2
A server's whitelist.This expression can be used to add/remove players to/from the whitelist, to enable it and disable it (set whitelist to true / set whitelist to false), and to empty it (reset whitelist)
Examples:
set whitelist to false
add all players to whitelist
reset the whitelist
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"