Patterns: |
|
Required Entries: | trigger |
Optional Entries: | usage, description, prefix, permission, permission message, aliases, executable by, cooldown, cooldown message, cooldown bypass, cooldown storage |
Since: | 1.0 |
Examples:
usage: A command for broadcasting a message to all players.
permission: skript.command.broadcast
permission message: You don't have permission to broadcast messages
aliases: /bc
executable by: players and console
cooldown: 15 seconds
cooldown message: You last broadcast a message %elapsed time% ago. You can broadcast another message in %remaining time%.
cooldown bypass: skript.command.broadcast.admin
cooldown storage: {cooldown::%player%}
trigger:
broadcast the argument
Patterns: |
|
Since: | 2.2, 2.7 (local functions) |
They can also return a value to the trigger that is executing the function.
Note that local functions come before global functions execution
Examples:
broadcast {_message} # our message argument is available in '{_message}'
local function giveApple(amount: number) :: item:
return {_amount} of apple
function getPoints(p: player) returns number:
return {points::%{_p}%}
Patterns: |
|
Since: | 1.0 |
For example, an option may represent a message that appears in multiple locations.
Take a look at the example below that showcases this.
Examples:
no_permission: You're missing the required permission to execute this command!
command /ping:
permission: command.ping
permission message: {@no_permission}
trigger:
message "Pong!"
command /pong:
permission: command.pong
permission message: {@no_permission}
trigger:
message "Ping!"
Patterns: |
|
Since: | 2.9.0 |
For example, this might include
Examples:
using my-cool-addon-feature
Patterns: |
|
Since: | 1.0 |
This section is not required, but it ensures that a variable has a value if it doesn't exist when the script is loaded.
Examples:
{joins} = 0
{balance::%player%} = 0
on join:
add 1 to {joins}
message "Your balance is %{balance::%player%}%"
Patterns: |
|
Since: | 2.5 |
Usable in events: | sponge absorb |
Return Type: | Block |
Examples:
Patterns: |
|
Since: | 2.8.0 |
Requirements: | Paper |
Return Type: | ItemStack |
Examples:
if victim's active tool is a bow:
interrupt player's active item use
Patterns: |
|
Since: | 2.8.0 |
Requirements: | Paper |
Return Type: | Timespan |
If an entity is not using any item, this will return 0 seconds.
Examples:
broadcast player's remaining item use time
wait 1 second
broadcast player's item use time
Patterns: |
|
Since: | 2.4 |
Return Type: | Living Entity |
Examples:
loop affected entities:
if loop-value is a player:
send "WARNING: you've step on an area effect cloud!" to loop-value
Patterns: | |
Since: | 2.7 |
Return Type: | integer |
For blocks, 'Age' represents the different growth stages that a crop-like block can go through. A value of 0 indicates that the crop was freshly planted, whilst a value equal to 'maximum age' indicates that the crop is ripe and ready to be harvested.
For entities, 'Age' represents the time left for them to become adults and it's in minus increasing to be 0 which means they're adults, e.g. A baby cow needs 20 minutes to become an adult which equals to 24,000 ticks so their age will be -24000 once spawned.
Examples:
set age of targeted block to maximum age of targeted block
# Spawn a baby cow that will only need 1 minute to become an adult
spawn a baby cow at player
set age of last spawned entity to -1200 # in ticks = 60 seconds
Patterns: |
|
Since: | 2.7 |
Return Type: | Object |
Examples:
trigger:
send all the banned players
Patterns: |
|
Since: | 2.2-dev35 |
Requirements: | Vault, a permission plugin that supports Vault |
Return Type: | Text |
Examples:
trigger:
if argument is "list":
send "%all groups%"
Patterns: |
|
Since: | 2.7 |
Return Type: | Offline Player |
Examples:
Patterns: | |
Since: | 2.2-dev33 |
Return Type: | Text |
Examples:
Patterns: |
|
Since: | 2.5 |
Return Type: | Text |
Examples:
trigger:
send "All Scripts: %scripts%" to player
send "Loaded Scripts: %enabled scripts%" to player
send "Unloaded Scripts: %disabled scripts%" to player
Patterns: |
|
Since: | 2.6 |
Return Type: | Text |
Examples:
send "Number of all script commands: %size of all script commands%"
Patterns: | |
Since: | 1.4.3 |
Return Type: | Number |
Examples:
altitude of the attacker is higher than the altitude of the victim
set damage to damage * 1.2
Patterns: | |
Since: | 1.0 |
Return Type: | long |
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:
Patterns: |
|
Since: | 2.0 |
Return Type: | long |
Examples:
Patterns: |
|
Since: | 2.8.0 |
Return Type: | integer |
The default value of max cost set by vanilla Minecraft is 40.
Examples:
if {AnvilRepairSaleActive} = true:
wait a tick # recommended, to avoid client bugs
set anvil repair cost to anvil repair cost * 50%
send "Anvil repair sale is ON!" to player
on inventory click:
player have permission "anvil.repair.max.bypass"
set max repair cost of event-inventory to 99999
Patterns: |
|
Since: | 2.7 |
Return Type: | Text |
Examples:
type of event-inventory is anvil inventory
if the anvil text input of the event-inventory is "FREE OP":
ban player
Patterns: | |
Since: | 1.0, 2.7 (support for command events) |
Return Type: | Object |
One can also use the type of the argument instead of its index to address the argument, e.g. in the above example 'player-argument' is the same as 'argument 1'.
Please note that specifying the argument type is only supported in script commands.
Examples:
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
Patterns: |
|
Since: | 1.4.2 |
Return Type: | Object |
Examples:
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!"
Patterns: |
|
Since: | 2.8.0 |
Return Type: | Block |
Examples:
Patterns: |
|
Since: | 2.5.1 |
Return Type: | long |
Examples:
event-projectile is an arrow
set arrow knockback strength of event-projectile to 10
Patterns: |
|
Since: | 2.5 |
Return Type: | long |
Examples:
Patterns: | |
Since: | 2.6.1 |
Requirements: | Minecraft 1.15+ |
Return Type: | float |
NOTE: Currently this can not be set to anything.
Examples:
if attack cooldown of attacker < 1:
set damage to 0
send "Your hit was too weak! wait until your weapon is fully charged next time." to attacker
Patterns: |
|
Since: | 1.3 |
Usable in events: | damage, death, destroy |
Return Type: | Entity |
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:
attacker is a player
health of attacker is less than or equal to 2
damage victim by 1 heart
Patterns: |
|
Since: | 2.0, 2.7 (offlineplayers, safe bed) |
Return Type: | Location |
safe bed location
.NOTE: Offline players can not have their bed location changed, only online players.
Examples:
teleport player the the player's bed
else:
teleport the player to the world's spawn point
set the bed location of player to spawn location of world("world") # unsafe/invalid bed location
set the safe bed location of player to spawn location of world("world") # safe/valid bed location
Patterns: | |
Since: | 1.4.4, 2.6.1 (3D biomes) |
Return Type: | Biome |
(i.e. the altitude (y-coordinate) doesn't matter), up until Minecraft 1.15.x.
As of Minecraft 1.16, biomes are now 3D (per block vs column).
Examples:
every real minute:
loop all players:
biome at loop-player is desert
damage the loop-player by 1
Patterns: |
|
Since: | 1.0 |
Return Type: | Block |
Can optionally include a direction as well, e.g. 'block above' or 'block in front of the player'.
Examples:
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
Patterns: | |
Since: | 1.0 |
Return Type: | Block |
Can optionally include a direction as well, e.g. 'block above' or 'block in front of the player'.
Examples:
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
Patterns: | |
Since: | 2.7 |
Requirements: | 1.17+ |
Return Type: | float |
Examples:
event-block is set
send "Break Speed: %break speed for player%" to player
Patterns: | |
Since: | 2.5, 2.5.2 (set), 3.0.0 (BlockDisplay/FallingBlock) |
Requirements: | Minecraft 1.13+ |
Return Type: | Block Data |
This data can also be used to set blocks.
Examples:
set block at player to {data}
set block data of target block to oak_stairs[facing=south;waterlogged=true]
spawn falling block above player:
set blockdata of entity to oak_stairs[]
Patterns: | |
Since: | 2.6 |
Requirements: | Minecraft 1.13+ |
Return Type: | Number |
This number is used to calculate the time required to break each block.
Examples:
if block hardness of target block > 5:
Patterns: | |
Since: | 1.0 |
Return Type: | Block |
Examples:
set loop-block to air
Patterns: |
|
Since: | 1.0, 2.5.1 (within/cuboid/chunk) |
Return Type: | Block |
Blocks from/to and between will return a straight line whereas blocks within will return a cuboid.
Examples:
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
Patterns: |
|
Since: | 2.1 |
Requirements: | Supported regions plugin |
Return Type: | Block |
This expression requires a supported regions plugin to be installed.
Examples:
clear the loop-block
Patterns: |
|
Since: | 2.2-dev31 |
Return Type: | Text |
Examples:
message "Book Title: %author of event-item%"
Patterns: |
|
Since: | 2.2-dev31, 2.7 (changers) |
Return Type: | Text |
Note: In order to modify the pages of a new written book, you must have the title and author
of the book set. Skript will do this for you, but if you want your own, please set those values.
Examples:
message "Book Pages: %pages of event-item%"
message "Book Page 1: %page 1 of event-item%"
set page 1 of player's held item to "Book writing"
Patterns: |
|
Since: | 2.2-dev31 |
Return Type: | Text |
Examples:
message "Book Title: %title of event-item%"
Patterns: |
|
Since: | 2.2-dev16 (lowercase and uppercase), 2.5 (advanced cases) |
Return Type: | Text |
Examples:
"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?
Patterns: | |
Since: | 2.9.0 |
Return Type: | integer |
Examples:
loop {_letters::*}:
set {_codepoint} to codepoint of lowercase loop-value
return false if {_codepoint} is not set # 'loop-value is not a single character'
if:
{_previous-codepoint} is set
# if the codepoint of the current character is not
# 1 more than the codepoint of the previous character
# then the letters are not in order
{_codepoint} - {_previous-codepoint} is not 1
then:
return false
set {_previous-codepoint} to {_codepoint}
return true
Patterns: |
|
Since: | 2.9.0 |
Return Type: | Text |
Examples:
set {_lower} to codepoint of {_lower}
return {_none} if {_lower} is not set
set {_upper} to codepoint of {_upper}
return {_none} if {_upper} is not set
loop integers between {_lower} and {_upper}:
add character from codepoint loop-value to {_chars::*}
return {_chars::*}
Patterns: | |
Since: | 2.8.0 |
Return Type: | Text |
If you would like only alphanumeric characters you can use the 'alphanumeric' option in the expression.
If strings of more than one character are given, only the first character of each is used.
Examples:
broadcast "%loop-value%"
# 0123456789:;<=>?@ABC... ...uvwxyz
send characters between "0" and "z"
# 0123456789ABC... ...uvwxyz
send alphanumeric characters between "0" and "z"
Patterns: |
|
Since: | 2.2-dev31 |
Return Type: | Text |
Examples:
Patterns: |
|
Since: | 2.2-Fixes-v7, 2.2-dev35 (clearing recipients) |
Return Type: | Player |
Examples:
Patterns: |
|
Since: | 2.0, 2.8.0 (loaded chunks) |
Return Type: | Chunk |
Resetting a chunk may or may not be supported on some MC versions.
Examples:
set {_chunks::*} to the loaded chunks of the player's world
Patterns: |
|
Since: | 1.0, 2.2-dev35 (more clickable things) |
Usable in events: | click, inventory click |
Return Type: | Object |
Examples:
if the clicked block is a chest:
show the inventory of the clicked block to the player
Patterns: | |
Since: | 2.0 |
Return Type: | Text |
any colors and chat styles from the message. Parsing all
chat styles requires this expression to be used in same line with
the send effect.
Examples:
set message to colored message # Safe; only colors get parsed
command /fade <player>:
trigger:
set display name of the player-argument to uncolored display name of the player-argument
command /format <text>:
trigger:
message formatted text-argument # Safe, because we're sending to whoever used this command
Patterns: |
|
Since: | 2.0, 2.7 (support for script commands) |
Usable in events: | command |
Return Type: | Text |
Examples:
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
Patterns: |
|
Since: | 2.6 |
Return Type: | Text |
Examples:
description of command "help"
label of command "pl"
usage of command "help"
aliases of command "bukkit:help"
permission of command "/op"
command "op"'s permission message
command "sk"'s plugin owner
command /greet <player>:
usage: /greet <target>
trigger:
if arg-1 is sender:
send "&cYou can't greet yourself! Usage: %the usage%"
stop
send "%sender% greets you!" to arg-1
send "You greeted %arg-1%!"
Patterns: |
|
Since: | 2.0 |
Usable in events: | command |
Return Type: | Command Sender |
If the command sender is a command block, its location can be retrieved by using %block's location%
Examples:
on command:
log "%executor% used command /%command% %arguments%" to "commands.log"
Patterns: | |
Since: | 2.0 |
Return Type: | Location |
Examples:
every 5 seconds:
loop all players:
set the loop-player's compass target to location of {compass::target::%%loop-player%}
Patterns: |
|
Since: | 1.3.1 |
Return Type: | Command Sender |
Examples:
send "message to console" to the console
Patterns: |
|
Since: | 2.2-dev33 |
Return Type: | Object |
the last usage date, or the cooldown bypass permission.
Examples:
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%}
Patterns: | |
Since: | 1.4.3 |
Return Type: | Number |
Examples:
message "Watch out for lava!"
Patterns: |
|
Since: | 1.0 |
Return Type: | Entity |
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:
kill the creeper
kill all powered creepers in the wolf's world
projectile is an arrow
Patterns: | |
Since: | 2.2-dev17 |
Return Type: | ItemStack |
This slot is always empty if player has no inventory open.
Examples:
set cursor slot of player to itemstack of 64 of diamond
Patterns: | |
Since: | 2.2-dev34, 2.8.0 (chat format) |
Requirements: | Paper 1.16+ (chat format) |
Return Type: | Inventory |
Examples:
set {_inventory} to a chest inventory with 1 row
set slot 4 of {_inventory} to a diamond named "example"
open {_inventory} to player
open chest inventory named "<#00ff00>hex coloured title!" with 6 rows to player
Patterns: |
|
Since: | 2.5 |
Requirements: | 1.14+ |
Return Type: | long |
Examples:
set {_model} to custom model data of player's tool
Patterns: |
|
Since: | 1.3.5, 2.8.0 (item damage event) |
Usable in events: | Damage, Vehicle Damage, Item Damage |
Return Type: | Number |
For entity damage events, possibly ignoring armour, criticals and/or enchantments (remember that in Skript '1' is one full heart, not half a heart).
For items, it's the amount of durability damage the item will be taking.
Examples:
event-item is any tool
clear damage # unbreakable tools as the damage will be 0
on damage:
increase the damage by 2
Patterns: |
|
Since: | 2.0 |
Return Type: | Damage Cause |
Examples:
Patterns: |
|
Since: | 1.2, 2.7 (durability reversed) |
Return Type: | integer |
Examples:
reset the durability of {_item}
set durability of player's held item to 0
Patterns: |
|
Since: | 2.4 |
Return Type: | ItemStack |
Examples:
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
Patterns: | |
Since: | 2.2-dev33 |
Return Type: | Date |
Examples:
set {_hourAfter} to 1 hour after {someOtherDate}
set {_hoursBefore} to 5 hours before {someOtherDate}
Patterns: | |
Since: | 1.4 |
Return Type: | Object |
Examples:
message "You have to wait a minute before using this command again!"
Patterns: | |
Since: | 2.3 |
Return Type: | Difficulty |
Examples:
Patterns: |
|
Since: | 1.0 (basic), 2.0 (extended) |
Return Type: | Direction |
Examples:
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
Patterns: |
|
Since: | 1.0 |
Usable in events: | death |
Return Type: | ItemStack |
Holds the drops of the dying creature. Drops can be prevented by removing them with "remove ... from drops" or "clear drops" if you don't want any drops at all.
Examples:
remove itemstack of 4 of oak planks from the drops
Patterns: |
|
Since: | 2.5.1 |
Requirements: | Minecraft 1.15+ ('as %entity%') |
Return Type: | ItemStack |
Examples:
give drops of block using player's tool to player
Patterns: | |
Since: | 2.0, 2.7 (relative to last element), 2.8.0 (range of elements) |
Return Type: | Object |
See also: random expression
Examples:
set {_last} to last element of {top players::*}
set {_random player} to random element out of all players
send 2nd last element of {top players::*} to player
set {page2::*} to elements from 11 to 20 of {top players::*}
Patterns: |
|
Since: | 2.5 |
Usable in events: | enchant prepare, enchant |
Return Type: | ItemStack |
It can be modified, but enchantments will still be applied in the enchant event.
Examples:
set the enchanted item to a diamond chestplate
on enchant prepare:
set the enchant item to a wooden sword
Patterns: |
|
Since: | 2.5 |
Usable in events: | enchant |
Return Type: | long |
This is number that was displayed in the enchantment table, not the actual number of levels removed.
Examples:
send "Cost: %the displayed enchanting cost%" to player
Patterns: |
|
Since: | 2.5 |
Usable in events: | enchant prepare |
Return Type: | long |
Examples:
send "There are %enchantment bonus% bookshelves surrounding this enchantment table!" to player
Patterns: |
|
Since: | 2.0 |
Return Type: | long |
The optional 'stored' pattern is for Enchanted Books, where they're not actually enchanted but have stored enchantments.
Examples:
message "You have a sword of sharpness %level of sharpness of the player's tool% equipped"
# Stored Enchantments
set {_item} to 1 of enchanted book
set stored enchantment level of sharpness of {_item} to 10
Patterns: | |
Since: | 2.5 |
Usable in events: | enchant prepare |
Requirements: | 1.11 or newer |
Return Type: | Enchantment Offer |
These can be changed using the 'enchantmentOffer' function.
Examples:
send "Your enchantment offers are: %the enchantment offers%" to player
set enchantment offer 3 to enchantmentOffer(sharpness, 10, 20)
Patterns: |
|
Since: | 2.5 |
Requirements: | 1.11 or newer |
Return Type: | long |
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:
Patterns: |
|
Since: | 1.2.1, 2.5 (chunks) |
Return Type: | Entity |
all players
, all creepers in the player's world
, or players in radius 100 of the player
. Examples:
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
Patterns: |
|
Since: | 2.5 |
Return Type: | Boolean |
Examples:
Patterns: | |
Since: | 2.5, 2.6.1 (final attribute value) |
Return Type: | Number |
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:
send "You are wounded!" to victim
set victim's attack speed attribute to 2
Patterns: |
|
Since: | 2.5 |
Return Type: | Offline Player |
Examples:
delete owner of target entity
set {_t} to uuid of tamer of target entity
Patterns: | |
Since: | 3.0.0 |
Return Type: | Entity Type |
Examples:
if entity type of target = pig:
Patterns: |
|
Since: | 1.0, 2.8.0 (Armour) |
Return Type: | ItemStack |
Examples:
delete chest slot of player
set {_i::*} to feet slot of all players
set body slot of all llamas to red carpet
Patterns: |
|
Since: | 2.1, 2.5.3 (block break event), 2.7 (experience change event) |
Usable in events: | experience spawn, break / mine, experience change |
Return Type: | Number |
Examples:
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
Patterns: |
|
Since: | 2.5, 2.8.6 (modify blocks) |
Usable in events: | explode |
Return Type: | Block |
Examples:
loop exploded blocks:
add loop-block to {exploded::blocks::*}
on explode:
loop exploded blocks:
if loop-block is grass:
remove loop-block from exploded blocks
on explode:
clear exploded blocks
on explode:
set exploded blocks to blocks in radius 10 around event-entity
on explode:
add blocks above event-entity to exploded blocks
Patterns: |
|
Since: | 2.5 |
Usable in events: | explosion |
Return Type: | Number |
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:
set the explosion's block yield to 10%
Patterns: |
|
Since: | 2.5 |
Usable in events: | explosion prime |
Return Type: | Number |
When changing the yield, values less than 0 will be ignored.
Read this wiki page for more information
Examples:
set the yield of the explosion to 10
Patterns: | |
Since: | 2.5 |
Requirements: | Minecraft 1.12 or newer for creepers |
Return Type: | Number |
Read this wiki page for more information
Examples:
set the explosive yield of the event-entity to 10
Patterns: |
|
Since: | 1.4 |
Return Type: | Direction |
Examples:
loop blocks from the block below the player in the horizontal facing of the player:
set loop-block to cobblestone
Patterns: |
|
Since: | 2.5 |
Usable in events: | block fertilize |
Requirements: | Minecraft 1.13 or newer |
Return Type: | Block |
Examples:
Patterns: |
|
Since: | 2.2-dev36 |
Return Type: | Object |
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:
Patterns: |
|
Since: | 2.4 |
Return Type: | Firework Effect |
Examples:
launch trailing flickering star colored purple, yellow, blue, green and red fading to pink at target entity
launch ball large colored red, purple and white fading to light green and black at player's location with duration 1
Patterns: | |
Since: | 2.2-dev31, 2.7 (support variables in format) |
Return Type: | Text |
Examples:
trigger:
send "Full date: %now formatted human-readable%" to sender
send "Short date: %now formatted as "yyyy-MM-dd"%" to sender
Patterns: | |
Since: | 1.1 |
Return Type: | Object |
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:
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
Patterns: |
|
Since: | 2.8.0 |
Return Type: | double |
Examples:
send action bar "Memory left: %free memory%/%max memory%MB" to player
wait 5 ticks
Patterns: | |
Since: | 1.0, 2.8.0 (syntax rework) |
Usable in events: | smelt, fuel burn |
Return Type: | ItemStack |
Remember to use 'block' and not
furnace
, as furnace
is not an existing expression.Note that if the result in a smelt event is changed to an item that differs in type from the items currently in the result slot, the smelting will fail to complete (the item will attempt to smelt itself again).
Note that if values other than
the result
are changed, event values may not accurately reflect the actual items in a furnace.Thus you may wish to use the event block in this case (e.g.
the fuel slot of the event-block
) to get accurate values if needed. Examples:
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
Patterns: |
|
Since: | 2.2-dev21 |
Return Type: | Boolean |
Examples:
Patterns: |
|
Since: | 2.2-dev35 |
Requirements: | Vault, a permission plugin that supports Vault |
Return Type: | Text |
If you have LuckPerms, ensure you have vault integration enabled in the luck perms configurations.
Examples:
broadcast "%group of player%" # this is the player's primary group
broadcast "%groups of player%" # this is all of the player's groups
Patterns: |
|
Since: | 2.6.2 |
Return Type: | Entity |
Examples:
if item of hanging entity is diamond pickaxe:
cancel event
if hanging remover is a player:
send "You can't break that item frame!" to hanging remover
Patterns: |
|
Since: | 2.0, 2.2-dev32 (SHA-256 algorithm) |
Return Type: | Text |
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:
trigger:
set {password::%uuid of player%} to text-argument hashed with SHA-256
command /login <text>:
trigger:
if text-argument hashed with SHA-256 is {password::%uuid of player%}:
message "Login successful."
else:
message "Wrong password!"
Patterns: |
|
Since: | 2.7 |
Usable in events: | Egg Throw |
Return Type: | Entity Type |
Examples:
set the hatching entity type to a primed tnt
Patterns: |
|
Since: | 2.0 |
Return Type: | Location |
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 in front of the player's eyes to glass
loop blocks in front of the player's head:
Patterns: |
|
Since: | 2.5.1 |
Usable in events: | heal |
Return Type: | double |
Examples:
increase the heal amount by 2
remove 0.5 from the healing amount
Patterns: |
|
Since: | 2.5 |
Usable in events: | heal |
Return Type: | Heal Reason |
Examples:
heal reason is satiated
send "You ate enough food and gained full health back!"
Patterns: |
|
Since: | 1.0 |
Usable in events: | damage |
Return Type: | Number |
The minimum value is 0, and the maximum is the entity's max health (e.g. 20 for players).
Examples:
Patterns: | |
Since: | 2.3 |
Return Type: | Player |
Examples:
Patterns: |
|
Since: | 2.5 |
Return Type: | long |
Examples:
send "You clicked the hotbar button %hotbar button%!"
Patterns: | |
Since: | 2.2-dev36 |
Return Type: | ItemStack |
To retrieve its number use Slot Index expression.
Use future and past tense to grab the previous slot in an item change event, see example.
Examples:
set player's selected hotbar slot to slot 4 of player
send "index of player's current hotbar slot = 1" # second slot from the left
on item held change:
if the selected hotbar slot was a diamond:
set the currently selected hotbar slot to slot 5 of player
Patterns: |
|
Since: | 2.3 |
Usable in events: | server list ping |
Requirements: | Paper 1.12.2 or newer |
Return Type: | Text |
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:
clear the hover list
add "&aWelcome to the &6Minecraft &aserver!" to the hover list
add "" to the hover list # A blank line
add "&cThere are &6%online players count% &conline players!" to the hover list
Patterns: | |
Since: | 1.4, 2.2-dev26 (when used in connect event), 2.3 (when used in server list ping event) |
Return Type: | Text |
Examples:
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
Patterns: | |
Since: | 2.1 |
Return Type: | long |
Examples:
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}
Patterns: | |
Since: | 2.4 (indices), 2.6.1 (sorting) |
Return Type: | Text |
To sort the indices, all objects in the list must be comparable;
Otherwise, this expression will just return the unsorted indices.
Examples:
broadcast "%indices of {l::*}%" # result is 1, 2 and 3
set {_leader-board::first} to 17
set {_leader-board::third} to 30
set {_leader-board::second} to 25
set {_leader-board::fourth} to 42
set {_ascending-indices::*} to sorted indices of {_leader-board::*} in ascending order
broadcast "%{_ascending-indices::*}%" #result is first, second, third, fourth
set {_descending-indices::*} to sorted indices of {_leader-board::*} in descending order
broadcast "%{_descending-indices::*}%" #result is fourth, third, second, first
Patterns: |
|
Since: | 2.8.0 |
Usable in events: | Inventory Item Move |
Return Type: | Inventory |
Examples:
holder of event-initiator-inventory is a chest
broadcast "Item transport happening at %location at holder of event-initiator-inventory%!"
Patterns: |
|
Since: | 2.2-dev36, 2.9.0 (input index) |
Return Type: | Object |
For example, if you ran 'broadcast "something" and "something else" where [input is "something"]
the condition would be checked twice, using "something" and "something else" as the inputs.
The 'input index' pattern can be used when acting on a variable to access the index of the input.
Examples:
sort {_list::*} based on length of input index
Patterns: |
|
Since: | 1.0 |
Return Type: | Inventory |
You can usually omit this expression and can directly add or remove items to/from blocks or entities.
Examples:
clear the player's inventory
remove 5 of wool from the inventory of the clicked block
Patterns: |
|
Since: | 2.2-dev16 |
Return Type: | Inventory Action |
Examples:
Patterns: |
|
Since: | 2.8.0 |
Usable in events: | Inventory Close |
Requirements: | Paper |
Return Type: | Inventory Close Reasons |
Examples:
inventory close reason is teleport
send "Your inventory closed due to teleporting!" to player
Patterns: |
|
Since: | 2.2-dev34, 2.5 (slots) |
Return Type: | Object |
NOTE: 'Viewers' expression returns a list of players viewing the inventory. Note that a player is considered to be viewing their own inventory and internal crafting screen even when said inventory is not open.
Examples:
holder of player's top inventory
{_inventory}'s viewers
Patterns: | |
Since: | 2.2-dev24 |
Return Type: | ItemStack |
Examples:
set slot 0 of player to itemstack of 2 of stone
clear slot 1 of player
Patterns: |
|
Since: | unknown (before 2.1) |
Return Type: | ItemStack |
Examples:
item is a clock
set the time to 6:00
Patterns: |
|
Since: | 2.2-dev24 |
Return Type: | long |
This amount is clamped between 0 and 99.
Anything above 99 will not serialize and may kick the player.
0 and below will delete the item.
Examples:
set item amount of player's tool to 10
add 3 to item amount of player's tool
remove 2 from item amount of player's tool
Patterns: | |
Since: | 2.8.0 |
Return Type: | Timespan |
Examples:
set item cooldown of player's tool for player to 1 minute
set item cooldown of stone and grass for all players to 20 seconds
reset item cooldown of cobblestone and dirt for all players
Patterns: |
|
Since: | 2.2-dev36 |
Return Type: | Enchantment |
The optional 'stored' pattern is for Enchanted Books, which do not have enchantments but rather have stored enchantments.
Examples:
loop enchantments of player's tool:
if enchantments of {_item} contains sharpness:
Patterns: | |
Since: | 2.2-dev35, 2.2-dev36 (improved), 2.5.2 (throwable projectiles) |
Return Type: | ItemStack |
For dropped item entities, it gets the item that was dropped.
For item frames, the item inside the frame is returned.
For throwable projectiles (snowballs, enderpearls etc.) it gets the displayed item.
For ItemDisplay entities it gets the item show on display.
Other entities do not have items associated with them.
Deleting the item of an ItemFrame will just remove the ItemStack from the frame but deleting the item of a dropped item or projectile will remove the entity itself.
Examples:
set item of target entity of player to itemstack of diamond
Patterns: |
|
Since: | 2.5 |
Requirements: | 1.14+ |
Return Type: | ItemStack |
Examples:
set slot 1 of inventory of player to wooden hoe with custom model data 357
Patterns: |
|
Since: | 3.0.0 |
Return Type: | ItemStack |
Examples:
Patterns: |
|
Since: | 2.3 |
Return Type: | ItemStack |
If multiple strings are passed, each of them will be a separate line in the lore.
Examples:
give {_test} to player
Patterns: | |
Since: | 3.0.0 |
Return Type: | ItemStack |
Supports Minecraft's command item format.
See McWiki Data Component Format for more details
Examples:
set {_i} to itemstack of netherite shovel
set {_item} to itemstack of stick[minecraft:consumable={},food={saturation:1,nutrition:2}] # Will create a stick you can eat
set {_item} to itemstack of experience_bottle[enchantment_glint_override=false] # Will create an xp bottle without glint
set {_item} to itemstack of apple[!food,!consumable] # Will create an apple that cannot be consumed
Patterns: |
|
Since: | 2.9.0 |
Return Type: | ItemStack |
Examples:
equip player with 1 of netherite helmet without fire resistance
drop fire resistant itemstack of stone at player
Patterns: |
|
Since: | 2.0, 2.8.0 (specific types of items) |
Return Type: | ItemStack |
Please note that the positions of the items in the inventory are not saved, only their order is preserved.
Examples:
loop-item is enchanted
remove loop-item from the player
set {inventory::%uuid of player%::*} to items in the player's inventory
Patterns: |
|
Since: | 2.1, 2.5.2 (regex support), 2.7 (case sensitivity) |
Return Type: | Text |
Examples:
set {_s::*} to the string argument split at ","
Patterns: | |
Since: | 2.3 |
Return Type: | Text |
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:
Patterns: |
|
Since: | 2.5.1 |
Return Type: | Number |
Examples:
Patterns: |
|
Since: | 2.2-Fixes-V10 |
Return Type: | Damage Cause |
Examples:
Patterns: |
|
Since: | 2.3 |
Requirements: | Paper 1.12.2 or newer |
Return Type: | Server Icon |
Examples:
Patterns: | |
Since: | 2.4 |
Requirements: | Paper 1.9 or newer |
Return Type: | Resource Pack State |
Examples:
Patterns: |
|
Since: | 1.3 (spawned entity), 2.0 (shot entity), 2.2-dev26 (dropped item), 2.7 (struck lightning, firework) |
Return Type: | Entity |
Examples:
set {healer::%spawned priest%} to true
shoot an arrow from the last spawned entity
ignite the shot projectile
drop a diamond sword
push last dropped item upwards
teleport player to last struck lightning
delete last launched firework
Patterns: |
|
Since: | 2.5 |
Return Type: | Date |
Examples:
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."
Patterns: |
|
Since: | 2.3 |
Return Type: | Entity |
Examples:
Patterns: | |
Since: | unknown (before 2.1) |
Usable in events: | level change |
Return Type: | long |
Examples:
set the player's level to 0
Patterns: | |
Since: | 2.0 |
Usable in events: | level change |
Return Type: | Number |
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:
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
Patterns: | |
Since: | 1.3.4 |
Return Type: | byte |
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:
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
Patterns: |
|
Since: | 2.7 |
Return Type: | Text |
Examples:
broadcast "This server uses Vault plugin!"
send "Plugins (%size of loaded plugins%): %plugins%" to player
Patterns: |
|
Since: | 2.0 |
Return Type: | Location |
Examples:
set {_loc} to the location 1 meter above the player
Patterns: | |
Since: | 1.0 |
Return Type: | Location |
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:
message "You home was set to %player's location% in %player's world%."
Patterns: |
|
Since: | 2.8.0 |
Return Type: | long |
Examples:
give player 1 stone
wait 5 ticks
if loop-counter > 30:
stop loop
loop {top-balances::*}:
if loop-iteration <= 10:
broadcast "#%loop-iteration% %loop-index% has $%loop-value%"
Patterns: |
|
Since: | 1.0, 2.8.0 (loop-counter) |
Return Type: | Object |
Examples:
loop 10 times:
message "%11 - loop-number%"
wait a second
# Generate a 10x10 floor made of randomly colored wool below the player
loop blocks from the block below the player to the block 10 east of the block below the player:
loop blocks from the loop-block to the block 10 north of the loop-block:
set loop-block-2 to any wool
loop {top-balances::*}:
loop-iteration <= 10
send "#%loop-iteration% %loop-index% has $%loop-value%"
Patterns: |
|
Since: | 2.7 |
Requirements: | MC 1.16+ |
Return Type: | ItemStack |
Examples:
chance of %10
add 64 diamonds
send "You hit the jackpot!!"
Patterns: |
|
Since: | 2.1 |
Return Type: | Text |
Examples:
Patterns: | |
Since: | 2.2-dev34, 2.9.0 (lowest solid block, 'non-air' option removed, additional syntax option) |
Return Type: | Block |
Note that the y-coordinate of the location is not taken into account for this expression.
Examples:
set the highest solid block at the player's location to the lowest solid block at the player's location
Patterns: |
|
Since: | 2.3 |
Return Type: | Text |
'default MOTD' returns the default MOTD always and can't be changed.
Examples:
set the motd to "Join now!"
Patterns: |
|
Since: | 3.0.0 |
Return Type: | Material |
Setting the material of an ItemStack is not supported and may result in weird behaviour.
Setting the material of a BlockData is not supported.
Setting the material of a Block/BlockDisplay/ItemDisplay will act normally.
Examples:
set {_mat} to material of player's tool
set {_mat} to material of target block of player
set material of target block of player to oak log
Patterns: |
|
Since: | 2.5, 2.9.0 (change) |
Requirements: | Minecraft 1.20.5+ (custom amount) |
Return Type: | integer |
Note: 'delete' will remove the max durability from the item (making it a non-damageable item). Delete requires Paper 1.21+
Examples:
if max durability of player's tool is not 0: # Item is damageable
set max durability of player's tool to 5000
add 5 to max durability of player's tool
reset max durability of player's tool
delete max durability of player's tool
Patterns: |
|
Since: | 2.0 |
Usable in events: | damage, death |
Return Type: | Number |
Examples:
set the maximum health of the player to 100
spawn a giant
set the last spawned entity's max health to 1000
Patterns: |
|
Since: | 2.8.0 |
Requirements: | Paper |
Return Type: | Timespan |
Some items, like bows and shields, do not have a limit to their use. They will return 1 hour.
Examples:
broadcast max usage duration of player's tool
Patterns: |
|
Since: | 2.3, 2.7 (modify max real players) |
Requirements: | Paper 1.16+ (modify max real players) |
Return Type: | integer |
'real max players' returns the real count of max players of the server and can be modified on Paper 1.16 or later.
Examples:
set the max players count to (online players count + 1)
Patterns: | |
Since: | 2.7 |
Return Type: | Timespan |
Examples:
send "you're about to freeze!" to the player
Patterns: |
|
Since: | 2.1, INSERT VERSION (change) |
Return Type: | long |
The max stack size you can set must be between 1 and 99 (Clamped value from Minecraft).
Resetting will reset back to the vanilla Minecraft value.
Examples:
set max stack size of player's tool to 10
add 3 to max stack size of player's tool
remove 20 from max stack size of player's tool
reset max stack size of player's tool
Patterns: |
|
Since: | 2.1.1 |
Return Type: | Player |
Examples:
!kick myself
!give a diamond axe to me
Patterns: |
|
Since: | 2.5.1 |
Return Type: | long |
Modifying the repair amount will affect how much experience is given to the player after mending.
Examples:
set the mending repair amount to 100
Patterns: |
|
Since: | 1.4.6 (chat message), 1.4.9 (join & quit messages), 2.0 (death message), 2.9.0 (clear message) |
Usable in events: | chat, join, quit, death |
Return Type: | Text |
Examples:
player has permission "admin"
set message to "&c%message%"
on first join:
set join message to "Welcome %player% to our awesome server!"
on join:
player has played before
set join message to "Welcome back, %player%!"
on quit:
if {vanish::%player's uuid%} is set:
clear quit message
else:
set quit message to "%player% left this awesome server!"
on death:
set the death message to "%player% died!"
Patterns: |
|
Since: | 2.2-dev36 |
Return Type: | Object |
Examples:
broadcast "%metadata value ""healer"" of player%"
clear metadata value "healer" of player
Patterns: | |
Since: | 2.6.1 |
Return Type: | Location |
Examples:
executable by: players
trigger:
teleport player to the center of player's location
send "You're no longer stuck."
Patterns: | |
Since: | 2.5.1 |
Return Type: | Vector |
Examples:
set derailed velocity of event-entity to vector 2, 10, 2
Patterns: |
|
Since: | 2.0, 2.5 (offline players) |
Requirements: | Vault, an economy plugin that supports Vault |
Return Type: | Number |
Examples:
remove 20 from the player's balance
add 200 to the player's account
Patterns: | |
Since: | 2.7 |
Requirements: | Paper 1.16+ |
Return Type: | Moon Phase |
Examples:
send "Watch for the wolves!"
Patterns: |
|
Since: | 2.2-dev27 |
Return Type: | Block |
Examples:
Patterns: |
|
Since: | before 2.1, 2.2-dev20 (inventory name), 2.4 (non-living entity support, changeable inventory name), 2.7 (worlds) |
Return Type: | Text |
- 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 color 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.
- Worlds
- Name: The name of the world. Cannot be changed.
Examples:
player has permission "name.red"
set the player's display name to "<red>[admin] <gold>%name of player%"
set the player's tab list name to "<green>%player's name%"
set the name of the player's tool to "Legendary Sword of Awesomeness"
Patterns: | |
Since: | before 2.1, 2.2-dev20 (inventory name), 2.4 (non-living entity support, changeable inventory name), 2.7 (worlds) |
Return Type: | Text |
- 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 color 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.
- Worlds
- Name: The name of the world. Cannot be changed.
Examples:
player has permission "name.red"
set the player's display name to "<red>[admin] <gold>%name of player%"
set the player's tab list name to "<green>%player's name%"
set the name of the player's tool to "Legendary Sword of Awesomeness"
Patterns: |
|
Since: | 2.0, 2.2-dev34 (inventories) |
Return Type: | Object |
set name of <item/inventory> to <text>
. Examples:
set tool of player to the player's tool named "<gold>Wand"
set the name of the player's tool to "<gold>Wand"
open hopper inventory named "Magic Hopper" to player
Patterns: |
|
Since: | 2.7 |
Return Type: | Entity |
Examples:
teleport player to the nearest cow relative to player
teleport player to the nearest entity relative to player
on click:
kill nearest pig
Patterns: |
|
Since: | 2.5 |
Return Type: | Text |
Examples:
Patterns: |
|
Since: | 2.5 |
Return Type: | long |
Examples:
set victim's invulnerability ticks to 20 #Victim will not take damage for the next second
Patterns: |
|
Since: | 1.4 |
Return Type: | Date |
Examples:
Patterns: | |
Since: | 2.5 |
Return Type: | long |
Examples:
on chat:
if number of uppercase chars in message / length of message > 0.5
cancel event
send "<red>Your message has to many caps!" to player
Patterns: | |
Since: | 1.4.6 (integers & numbers), 2.5.1 (decimals) |
Return Type: | Number |
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 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
Patterns: |
|
Since: | 2.2-dev35 |
Return Type: | Offline Player |
Examples:
Patterns: |
|
Since: | 2.3 |
Requirements: | Paper (fake count) |
Return Type: | long |
real online player count
always return the real count of online players and can't be changed. Examples:
# This will make the max players count 5 if there are 4 players online.
set the fake max players count to (online player count + 1)
Patterns: | |
Since: | 2.2-dev24, 2.2-dev35 (Just 'current inventory' works in player events) |
Return Type: | Inventory |
If no inventory is open, it returns the own player's crafting inventory.
Examples:
Patterns: | |
Since: | 2.0 |
Return Type: | Object |
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:
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
Patterns: |
|
Since: | 2.0 |
Return Type: | Text |
Examples:
if {var} is not set:
parse error is set:
message "<red>Line 1 is invalid: %last parse error%"
else:
message "<red>Please put an integer on line 1!"
Patterns: | |
Since: | 2.0, 2.2-dev26 (Multiple passengers for 1.11.2+) |
Return Type: | Entity |
For 1.11.2 and above, it returns a list of passengers and you can use all changers in it.
See also: vehicle
Examples:
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
Patterns: | |
Since: | 2.8.0 |
Return Type: | Number |
Examples:
set damage to 125 percent of damage
set {_result} to {_percent} percent of 999
set {_result::*} to 10% of {_numbers::*}
set experience to 50% of player's total experience
Patterns: |
|
Since: | 2.7 |
Return Type: | double |
Examples:
Patterns: | |
Since: | 2.2-dev36 |
Return Type: | long |
Examples:
trigger:
send "%arg-1%'s ping is %arg-1's ping%"
Patterns: | |
Since: | 2.6.2 |
Requirements: | Paper 1.12.2 or newer |
Return Type: | integer |
Examples:
trigger:
send "Protocol version of %arg-1%: %protocol version of arg-1%"
Patterns: |
|
Since: | 2.0 |
Return Type: | ItemStack |
Examples:
set the block at the entity to the entity's skull
Patterns: | |
Since: | 2.2-dev34 |
Return Type: | Weather Type |
Examples:
reset player's weather
if arg-player's weather is rainy
Patterns: |
|
Since: | 2.4 |
Usable in events: | portal_create |
Return Type: | Block |
Examples:
loop portal blocks:
broadcast "%loop-block% is part of a portal!"
Patterns: | |
Since: | 2.8.0 |
Return Type: | Timespan |
Players in survival/adventure get a cooldown of 0.5 seconds, while those in creative get no cooldown.
Resetting will set the cooldown back to the default 15 seconds for non-player entities and 0.5 seconds for players.
Examples:
wait 1 tick
set portal cooldown of event-entity to 5 seconds
Patterns: |
|
Since: | 2.5.2 |
Return Type: | Potion Effect |
to tipped arrows/lingering potions, Minecraft reduces the timespan.
Examples:
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
Patterns: |
|
Since: | 2.7 |
Return Type: | integer |
Examples:
Patterns: |
|
Since: | 2.5.2 |
Return Type: | Potion Effect |
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:
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
Patterns: | |
Since: | 2.0 |
Requirements: | Vault, a chat plugin that supports Vault |
Return Type: | Text |
Examples:
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 "[<red>Admin<reset>] "
Patterns: |
|
Since: | 2.5.1 |
Return Type: | Boolean |
Examples:
event-projectile is an arrow
set projectile critical mode of event-projectile to true
Patterns: |
|
Since: | 2.3 |
Usable in events: | server list ping |
Requirements: | Paper 1.12.2 or newer |
Return Type: | long |
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:
set the version string to "<light green>Version: <orange>%minecraft version%"
set the protocol version to 0 # 13w41a (1.7) - so the player will see the custom version string almost always
Patterns: |
|
Since: | 2.8.0 |
Requirements: | Paper 1.16.5+ |
Return Type: | Quit Reason |
Examples:
quit reason was kicked
player is banned
clear {server::player::%uuid of player%::*}
Patterns: | |
Since: | 2.8.0 |
Return Type: | Text |
This expression uses the Unicode numerical code of a character to determine which characters are between the two given characters.
If strings of more than one character are given, only the first character of each is used.
Examples:
send 3 random alphanumeric characters between "0" and "z"
Patterns: | |
Since: | 1.4 |
Return Type: | Number |
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:
send "You rolled a %random integer from 1 to 6%!" to the player
Patterns: |
|
Since: | 2.5.1 |
Return Type: | UUID |
Examples:
Patterns: |
|
Since: | unknown (2.2) |
Return Type: | Text |
Note that this is not guaranteed to give same results on all servers.
Examples:
Patterns: |
|
Since: | 2.8.0 |
Usable in events: | ready arrow |
Return Type: | ItemStack |
Examples:
selected bow's name is "Spectral Bow"
if selected arrow is not a spectral arrow:
cancel event
Patterns: | |
Since: | 2.1 |
Requirements: | Supported regions plugin |
Return Type: | Offline Player |
This expression requires a supported regions plugin to be installed.
Examples:
message "You're entering %region% whose owners are %owners of region%"
Patterns: | |
Since: | 2.1 |
Requirements: | Supported regions plugin |
Return Type: | Region |
This expression requires a supported regions plugin to be installed.
Examples:
line 1 of the clicked block is "[region info]"
set {_regions::*} to regions at the clicked block
if {_regions::*} is empty:
message "No regions exist at this sign."
else:
message "Regions containing this sign: <gold>%{_regions::*}%<r>."
Patterns: |
|
Since: | INSERT VERSION |
Return Type: | Object |
Registries cannot be changed via Skript.
Examples:
loop registry values of biome registry:
Patterns: |
|
Since: | 2.0 |
Return Type: | Timespan |
Examples:
send "hurry, get to the surface!" to the player
Patterns: | |
Since: | 2.9.0 |
Requirements: | Spigot 1.19.4+ |
Return Type: | Timespan |
A bell will start resonating five game ticks after being rung, and will continue to resonate for 40 game ticks.
Examples:
Patterns: |
|
Since: | 2.2-dev35 |
Return Type: | Location |
Examples:
set respawn location to {example::spawn}
Patterns: | |
Since: | 2.0 |
Return Type: | long |
Examples:
set line 1 of the block to rounded "%(1.5 * player's level)%"
add rounded down argument to the player's health
Patterns: | |
Since: | 2.2-Fixes-v10, 2.2-dev35 (fully modifiable), 2.6.2 (syntax pattern changed) |
Return Type: | Number |
Examples:
Patterns: | |
Since: | 2.3 |
Return Type: | Text |
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:
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
Patterns: |
|
Since: | 2.0 |
Usable in events: | Script Load/Unload |
Return Type: | Text |
Examples:
set {running::%script%} to true
on script unload:
set {running::%script%} to false
Patterns: | |
Since: | 2.7 |
Return Type: | integer |
Examples:
type of block is sea pickle
send "Wow! This stack of sea pickles contained %event-block's sea pickle count% pickles!"
send "It could've contained a maximum of %event-block's maximum sea pickle count% pickles!"
send "It had to have contained at least %event-block's minimum sea pickle count% pickles!"
cancel event
set event-block's sea pickle count to event-block's maximum sea pickle count
send "This bad boy is going to hold so many pickles now!!"
Patterns: |
|
Since: | 2.8.0 |
Usable in events: | send command list |
Return Type: | Text |
Modifications will affect what commands show up for the player to tab complete. They will not affect what commands the player can actually run.
Adding new commands to the list is illegal behavior and will be ignored.
Examples:
set command list to command list where [input does not contain ":"]
remove "help" from command list
Patterns: |
|
Since: | 2.3 |
Requirements: | Paper 1.12.2 or newer |
Return Type: | Server Icon |
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:
set {server-icons::default} to the default server icon
Patterns: |
|
Since: | 1.3.7 |
Return Type: | Living Entity |
Examples:
Patterns: | |
Since: | 1.3 |
Return Type: | Text |
Examples:
line 2 of the clicked block is "[Heal]":
heal the player
set line 3 to "%player%"
Patterns: | |
Since: | 2.9.0 |
Return Type: | Offline Player |
Examples:
set skull owner of {_block} to "Njol" parsed as offlineplayer
Patterns: |
|
Since: | 2.3 |
Return Type: | Spawn Reason |
Examples:
spawn reason is reinforcements or breeding
cancel event
Patterns: | |
Since: | 2.4, 2.9.2 (trial spawner) |
Return Type: | Entity Type |
Examples:
if event-block is spawner:
send "Spawner's type is %target block's entity type%"
Patterns: |
|
Since: | 2.2-dev32d |
Return Type: | Number |
Examples:
Patterns: | |
Since: | 2.4-alpha4, 2.7 (Paper Spectator Event) |
Requirements: | Paper |
Return Type: | Entity |
Examples:
message "&c%spectator target% currently has %{game::kills::%spectator target%}% kills!" to the player
on player stop spectating:
past spectator target was a zombie
set spectator target to the nearest skeleton
Patterns: | |
Since: | unknown (before 2.1) |
Return Type: | Number |
Please note that changing a player's speed will change their FOV just like potions do.
Examples:
increase the argument's fly speed by 0.1
Patterns: |
|
Since: | 2.1, 2.5.2 (character at, multiple strings support) |
Return Type: | Text |
Examples:
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
Patterns: |
|
Since: | 2.2-dev36 |
Return Type: | Number |
Examples:
Patterns: |
|
Since: | INSERT VERSION |
Requirements: | Minecraft 1.21+ |
Return Type: | Tag |
See McWiki Tag for more information on tags.
`registrykey` = Refers to the type of registry this tag is from.
`string` = You can use the `minecraft:` namespace and/or namespaces from DataPacks. If you omit this value it defaults to 'minecraft'.
Examples:
set {_tag} to block registry tag "mineable/pickaxe"
set {_tag} to block reigstry tag "my_pack:some_item_tag"
set {_tag} to enchantment registry tag "treasure"
Patterns: | |
Since: | INSERT VERSION |
Requirements: | Minecraft 1.21+ |
Return Type: | Object |
Tags and their values are created by Minecraft and DataPacks, and the values cannot be edited via Skript.
Examples:
if tag values of item registry tag "minecraft:banners" contains material of player's tool:
if tag values of entity type registry tag "arthropod" contains type of target entity:
Patterns: |
|
Since: | 2.2-dev25 |
Return Type: | Player |
Examples:
if the tamer is a player:
send "someone tamed something!" to console
Patterns: |
|
Since: | 1.4.2, 2.7 (Reset), 2.8.0 (ignore blocks) |
Return Type: | Entity |
For mobs and experience orbs this is the entity they are attacking/following (if any).
Display entities have a hit box of 0, so you should use 'target display' to collect Display entities
May grab entities in unloaded chunks.
Examples:
if entity's target entity is a player:
send "You're being followed by an %entity%!" to target of entity
reset target entity of entity # Makes the entity target-less
delete targeted entity of player # for players it will delete the target
delete target entity of last spawned zombie # for entities it will make them target-less
Patterns: |
|
Since: | 1.0, 2.9.0 (actual/exact) |
Return Type: | Block |
The actual target block will regard the actual hit box of the block.
Examples:
set target block of player to oak_stairs[waterlogged=true]
break target block of player using player's tool
give player 1 of type of target block
teleport player to location above target block
kill all entities in radius 3 around target block of player
set {_block} to actual target block of player
break actual target block of player
Patterns: |
|
Since: | 2.2-dev35 |
Return Type: | Teleport Cause |
Examples:
teleport cause is nether portal, end portal or end gateway
cancel event
Patterns: |
|
Since: | 2.7 |
Usable in events: | Egg Throw |
Return Type: | Projectile |
Examples:
Patterns: | |
Since: | 1.0 |
Return Type: | Time |
Use the "minecraft timespan" syntax to change the time according to Minecraft's time intervals.
Since Minecraft uses discrete intervals for time (ticks), changing the time by real-world minutes or real-world seconds only changes it approximately.
Removing an amount of time from a world's time will move the clock forward a day.
Examples:
add 2 minecraft hours to time of world "world"
add 54 real seconds to time of world "world" # approximately 1 minecraft hour
Patterns: |
|
Since: | 2.5, 2.7 (offline players) |
Requirements: | MC 1.15+ (offline players) |
Return Type: | Timespan |
Using this expression on offline players on Minecraft 1.14 and below will return nothing
<none>
. Examples:
if player's time played is greater than 10 minutes:
give player a diamond sword
set player's time played to 0 seconds
Patterns: |
|
Since: | 2.9.0 |
Return Type: | long |
Examples:
send "It has been %days of {_t}% day(s) since last payout."
Patterns: |
|
Since: | 1.0 |
Return Type: | ItemStack |
Examples:
player's off hand tool is a shield
set tool of all players to a diamond sword
set offhand tool of target entity to a bow
Patterns: | |
Since: | 2.7 |
Return Type: | integer |
Adding to a player's experience will trigger Mending, but setting their experience will not.
Examples:
add 100 to player's experience
if player's total experience is greater than 100:
set player's total experience to 0
give player 1 diamond
Patterns: |
|
Since: | 2.8.0 |
Return Type: | Transform Reason |
Examples:
transform reason is infection, drowned or frozen
Patterns: |
|
Since: | 1.4, 2.5.2 (potion effect), 2.7 (block datas) |
Return Type: | Object |
Types of items, blocks and block datas are item types similar to them but have amounts
of one, no display names and, on Minecraft 1.13 and newer versions, are undamaged.
Types of entities and inventories are entity types and inventory types known to Skript.
Types of potion effects are potion effect types.
Examples:
message "This is a %type of clicked entity%!"
Patterns: |
|
Since: | 2.1.2, 2.2 (offline players' UUIDs), 2.2-dev24 (other entities' UUIDs) |
Return Type: | UUID |
Examples:
# 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
Patterns: |
|
Since: | 2.2-dev13b, 2.9.0 (breakable) |
Return Type: | ItemStack |
Examples:
give breakable {_weapon} to all players
Patterns: | |
Since: | 2.7 |
Return Type: | Object |
Examples:
delete entity within {_entity} # This deletes the entity itself and not the value stored in the variable
set {_list::*} to "something", 10, "test" and a zombie
broadcast the strings within {_list::*} # "something", "test"
Patterns: | |
Since: | 2.2-dev28 |
Return Type: | Location |
Examples:
set {_loc} to {_v} to location in world "world" with yaw 45 and pitch 90
set {_loc} to location of {_v} in "world" with yaw 45 and pitch 90
Patterns: |
|
Since: | 2.8.0 |
Return Type: | Vector |
Relative directions are relative to the origin, (0, 0, 0). Therefore, the vector from the direction 'forwards' is (0, 0, 1).
Examples:
set {_v} to vector in direction of player
set {_v} to vector in horizontal direction of player
set {_v} to vector from facing of player
set {_v::*} to vectors from north, south, east, and west
Patterns: | |
Since: | 2.2-dev28 |
Return Type: | Vector |
Examples:
set {_v} to cylindrical vector radius 1, yaw loop-value, height 2
set {_v} to cylindrical vector radius 1, yaw 90, height 2
Patterns: | |
Since: | 2.2-dev28 |
Return Type: | Number |
Examples:
set {_v} to vector 1, 2, 3
set standard length of {_v} to 2
send "%standard length of {_v}%"
Patterns: |
|
Since: | 2.2-dev28, 2.7 (signed components) |
Return Type: | Vector |
Examples:
Patterns: | |
Since: | 2.2-dev28 |
Return Type: | Vector |
Examples:
set {_v} to spherical vector radius 1, yaw loop-value, pitch loop-value
set {_v} to spherical vector radius 1, yaw 45, pitch 90
Patterns: | |
Since: | 2.2-dev28 |
Return Type: | Number |
Examples:
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::*}%"
Patterns: |
|
Since: | 2.0 |
Return Type: | Text |
Examples:
message "This server is powered by Skript %skript version%"
Patterns: |
|
Since: | 2.3 |
Usable in events: | Server List Ping |
Requirements: | Paper 1.12.2+ |
Return Type: | Text |
This can only be set in a server list ping event.
Examples:
set the protocol version to 0 # 13w41a (1.7), so it will show the version string always
set the version string to "<light green>Version: <orange>%minecraft version%"
Patterns: |
|
Since: | 1.3, 2.6.1 (projectile hit event) |
Usable in events: | damage, death, projectile hit |
Return Type: | Entity |
Examples:
victim is a creeper
damage the attacked by 1 heart
Patterns: | |
Since: | 2.4 |
Requirements: | Paper |
Return Type: | integer |
NOTE: This is the view distance sent by the server to the player.
This has nothing to do with client side view distance settings
NOTE: This may not work on some versions (such as MC 1.14.x).
The return value in this case will be the view distance set in system.properties.
Examples:
set {_view} to view distance of player
reset view distance of all players
add 2 to view distance of player
Patterns: | |
Since: | 2.5 |
Requirements: | 1.13.2+ |
Return Type: | long |
Examples:
set view distance of player to client view distance of player
Patterns: | |
Since: | 1.0 |
Usable in events: | weather change |
Return Type: | Weather Type |
Examples:
weather in "world" is rainy
Patterns: |
|
Since: | 2.9.0 |
Return Type: | Boolean |
Examples:
broadcast "Flying: %whether player is flying%"
Patterns: |
|
Since: | 2.5.2, 2.9.0 (delete) |
Return Type: | Offline Player |
Players may be added and removed from the whitelist.
The whitelist can be enabled or disabled by setting the whitelist to true or false respectively.
Examples:
add all players to whitelist
reset the whitelist
Patterns: | |
Since: | 1.0 |
Return Type: | World |
Examples:
teleport the player to the world's spawn
set the weather in the player's world to rain
set {_world} to world of event-chunk
Patterns: | |
Since: | 2.7 |
Return Type: | World Environment |
Examples:
apply fire resistance to player for 10 minutes
Patterns: |
|
Since: | 1.0 |
Return Type: | World |
Examples:
broadcast "You're in %loop-world%" to loop-world
Patterns: |
|
Since: | 1.2 |
Return Type: | ItemStack |
Please note that this expression is not stable and might be replaced in the future.
Examples:
Patterns: | |
Since: | 2.0, 2.2-dev28 (vector yaw/pitch), 2.9.0 (entity changers) |
Requirements: | Paper 1.19+ (player changers) |
Return Type: | float |
A yaw of 0 or 360 represents the positive z direction. Adding a positive number to the yaw of a player will rotate it clockwise.
A pitch of 90 represents the negative y direction, or downward facing. A pitch of -90 represents upward facing. Adding a positive number to the pitch will rotate the direction downwards.
Only Paper 1.19+ users may directly change the yaw/pitch of players.
Examples:
set {_yaw} to yaw of player
set {_p} to pitch of target entity
set pitch of player to -90 # Makes the player look upwards, Paper 1.19+ only
add 180 to yaw of target of player # Makes the target look behind themselves
Patterns: |
|
Since: | 1.4, 2.1.1 (ban reason), 2.5 (timespan), 2.9.0 (kick) |
If a reason is given, it will be shown to the player when they try to join the server while banned.
A length of ban may also be given to apply a temporary ban. If it is absent for any reason, a permanent ban will be used instead.
We recommend that you test your scripts so that no accidental permanent bans are applied.
Note that banning people does not kick them from the server.
You can optionally use 'and kick' or consider using the kick effect after applying a ban.
Examples:
ban "127.0.0.1"
IP-ban the player because "he is an idiot"
ban player due to "inappropriate language" for 2 days
ban and kick player due to "inappropriate language" for 2 days
Patterns: |
|
Since: | 2.4 |
You can add a tool, which will spawn items based on how that tool would break the block
(ie: When using a hand to break stone, it drops nothing, whereas with a pickaxe it drops cobblestone)
Examples:
break clicked block naturally
loop blocks in radius 10 around player:
break loop-block using player's tool
loop blocks in radius 10 around player:
break loop-block naturally using diamond pickaxe
Patterns: |
|
Since: | 2.8.0 |
Requirements: | Paper 1.16+ |
For example, interrupting eating, or drawing back a bow.
Examples:
if the victim's active tool is a bow:
interrupt the usage of the player's active item
Patterns: |
|
Since: | 2.2-dev34 |
Examples:
executable by: players
cooldown: 10 seconds
trigger:
if length of arg-1 is more than 16:
# Makes it so that invalid arguments don't make you wait for the cooldown again
cancel the cooldown
send "Your nickname may be at most 16 characters."
stop
set the player's display name to arg-1
Patterns: |
|
Since: | 2.4 |
Usable in events: | death, break / mine |
Requirements: | 1.12.2 or newer (cancelling item drops of blocks) |
Examples:
if name of the entity is "&cSpecial":
cancel drops of items
on break of a coal ore:
cancel the experience drops
Patterns: |
|
Since: | 1.0 |
Examples:
victim is a player
victim has the permission "skript.god"
cancel the event
Patterns: | |
Since: | 1.0 (set, add, remove, delete), 2.0 (remove all) |
Examples:
Set the player's display name to "<red>%name of player%"
set the block above the victim to lava
# add:
add 2 to the player's health # preferably use '<a href='#EffHealth'>heal</a>' for this
add argument to {blacklist::*}
give a diamond pickaxe of efficiency 5 to the player
increase the data value of the clicked block by 1
# remove:
remove 2 pickaxes from the victim
subtract 2.5 from {points::%uuid of player%}
# remove all:
remove every iron tool from the player
remove all minecarts from {entitylist::*}
# delete:
delete the block below the player
clear drops
delete {variable}
# reset:
reset walk speed of player
reset chunk at the targeted block
Patterns: |
|
Since: | 2.5 |
Examples:
charge the event-entity
Patterns: |
|
Since: | 2.0, 2.2-dev26 (maps and potions) |
(red, green, blue)
, where (0,0,0)
is black and (255,255,255)
is white. Armor is colorable for all Minecraft versions. With Minecraft 1.11 or newer you can also color potions and maps. Note that the colors might not look exactly how you'd expect. Examples:
color the player's tool red
Patterns: |
|
Since: | 1.0, 2.8.0 (bungeecord command) |
If the command is a bungeecord side command, you can use the [bungeecord] option to execute command on the proxy.
Examples:
execute console command "/say Hello everyone!"
execute player bungeecord command "/alert &6Testing Announcement!"
Patterns: |
|
Since: | 2.2-dev37, 2.7 (while loops), 2.8.0 (outer loops) |
Examples:
loop all players:
if loop-value does not have permission "moderator":
continue # filter out non moderators
broadcast "%loop-player% is a moderator!" # Only moderators get broadcast
# Game starting counter
set {_counter} to 11
while {_counter} > 0:
remove 1 from {_counter}
wait a second
if {_counter} != 1, 2, 3, 5 or 10:
continue # only print when counter is 1, 2, 3, 5 or 10
broadcast "Game starting in %{_counter}% second(s)"
Patterns: | |
Since: | 2.8.0 |
Note: Copying a value into a variable/list will overwrite the existing data.
Examples:
set {_foo::sublist::foobar} to "hey"
copy {_foo::*} to {_copy::*}
broadcast indices of {_copy::*} # bar, sublist
broadcast {_copy::bar} # 1
broadcast {_copy::sublist::foobar} # "hey!"
Patterns: |
|
Since: | 1.0 |
Damage/healing will be referenced by full health amount.
If using optional 'hearts', the amount will be cut in half to represent a heart.
Examples:
damage all mobs by 10
heal the player
repair tool of player
Patterns: |
|
Since: | 1.4 |
ban player → wait 7 days → unban player
will not work if you restart your server anytime within these 7 days. You also have to be careful even when using small delays! Examples:
halt for 5 minecraft hours
wait a tick
Patterns: |
|
Since: | 2.3 |
Examples:
give a diamond to the player if the player has permission "rank.vip"
Patterns: |
|
Since: | 1.0 |
Examples:
drop tnt
Patterns: |
|
Since: | 2.4 |
Examples:
enable script file "testing"
unload script file "script.sk"
Patterns: |
|
Since: | 2.0 |
Examples:
disenchant the player's tool
Patterns: |
|
Since: | 2.9.0 |
Requirements: | MC 1.17+ |
All non-whitelisted players will be kicked upon enforcing the whitelist.
Examples:
unenforce the whitelist
Patterns: |
|
Since: | 1.0, 2.7 (multiple entities) |
This will replace any armor that the entity is wearing.
Examples:
equip player with diamond helmet, leather chestplate, golden leggings and iron boots
equip all horses with a saddle and diamond horse armor
Patterns: |
|
Since: | unknown (before 2.1) |
Examples:
stop
message "%player% has no ores!"
loop blocks above the player:
loop-block is not air:
exit 2 sections
set loop-block to water
Patterns: |
|
Since: | 2.5 |
Examples:
stop ignition of the last spawned creeper
Patterns: |
|
Since: | 1.0 |
Hint: use a force of 0 to create a fake explosion that does no damage whatsoever, or use the explosion effect introduced in Skript 2.0.
Starting with Bukkit 1.4.5 and Skript 2.0 you can use safe explosions which will damage entities but won't destroy any blocks.
Examples:
create an explosion of force 0 at the victim
Patterns: |
|
Since: | 2.5.1 |
Requirements: | Minecraft 1.15.2+ |
Examples:
make last spawned wolf attack player
Patterns: |
|
Since: | 2.2-dev21 |
Examples:
force event-player to respawn
Patterns: |
|
Since: | 2.8.0 |
Requirements: | Paper 1.17.1+ |
Examples:
make entity left handed
make all zombies in radius 10 of player right handed
Patterns: | |
Since: | 2.3 |
Examples:
hide {vanished::*} from the server list
Patterns: |
|
Since: | 2.9.0 |
Requirements: | Spigot 1.20.5+ |
If changing the 'entire' tooltip of an item, nothing will show up when a player hovers over it.
If changing the 'additional' tooltip, only specific parts (which change per item) will be hidden.
Examples:
hide {_item}'s additional tool tip
Patterns: |
|
Since: | 2.4 |
Usable in events: | death |
Examples:
if the victim is an op:
keep the inventory and experiences
Patterns: |
|
Since: | 1.0 |
Note: This effect does not set the entity's health to 0 (which causes issues), but damages the entity by 100 times its maximum health.
Examples:
kill all creepers in the player's world
kill all endermen, witches and bats
Patterns: |
|
Since: | 2.7 |
Requirements: | Paper 1.19.2+ |
Examples:
knock victim (vector from attacker to victim) with strength 10
Patterns: |
|
Since: | 2.4 |
Examples:
Patterns: |
|
Since: | 2.3 |
See Spigot's Javadocs for more info.
Examples:
leash event-entity to player
send "&aYou leashed &2%event-entity%!" to player
Patterns: |
|
Since: | 1.4 |
Examples:
strike lightning effect at the victim
Patterns: |
|
Since: | 2.3 |
Requirements: | Paper 1.12.2 or newer |
last loaded server icon expression.
Please note that the image must be 64x64 and the file path starts from the server folder.
Examples:
clear {server-icons::*}
loop 5 times:
load server icon from file "icons/%loop-number%.png"
add the last loaded server icon to {server-icons::*}
on server list ping:
set the icon to a random server icon out of {server-icons::*}
Patterns: |
|
Since: | 2.8.0 |
The load effect will create a new world if world doesn't already exist.
When attempting to load a normal vanilla world you must define it's environment i.e "world_nether" must be loaded with nether environment
Examples:
load the world "myCustomWorld"
unload "world_nether"
unload "world_the_end" without saving
unload all worlds
Patterns: |
|
Since: | 2.3 |
Examples:
suppress the variable save warnings
Patterns: | |
Since: | 2.0, 2.9.0 (severities) |
NB: Using 'server.log' as the log file will write to the default server log. Omitting the log file altogether will log the message as '[Skript] [<script>.sk] <message>' in the server log.
Examples:
log "%player% has just joined the server!"
on world change:
log "Someone just went to %event-world%!" to file "worldlog/worlds.log"
on command:
log "%player% just executed %full command%!" to file "server/commands.log" with a severity of warning
Patterns: |
|
Since: | 2.7 |
Requirements: | Paper 1.17+, Paper 1.19.1+ (Players & Look Anchors) |
Examples:
on entity explosion:
set {_player} to the nearest player
{_player} is set
distance between {_player} and the event-location is less than 15
make {_player} look towards vector from the {_player} to location of the event-entity
force {_enderman} to face the block 3 meters above {_location} at head rotation speed 100.5 and max head pitch -40
Patterns: |
|
Since: | 2.7 |
Usable in events: | Egg Throw |
Examples:
# EGGS FOR DAYZ!
make the egg hatch
Patterns: |
|
Since: | 2.9.0 |
Requirements: | Spigot 1.20.5+ |
Examples:
make {_items::*} not resistant to fire
Patterns: | |
Since: | 2.5 |
Examples:
make the explosion fiery
Patterns: |
|
Since: | 2.7 |
When setting an entity to invisible while using an invisibility potion on it, the potion will be overridden and when it runs out the entity keeps its invisibility.
Examples:
Patterns: | |
Since: | 2.3 |
Examples:
force all players to send the message "I love this server"
Patterns: |
|
Since: | 2.8.0 |
Examples:
Patterns: |
|
Since: | 1.0, 2.2-dev26 (advanced features), 2.5.2 (optional sender), 2.6 (sending objects) |
Requirements: | Minecraft 1.16.4+ for optional sender |
in given string or in formatted expressions will be parsed.
Adding an optional sender allows the messages to be sent as if a specific player sent them.
This is useful with Minecraft 1.16.4's new chat ignore system, in which players can choose to ignore other players,
but for this to work, the message needs to be sent from a player.
Examples:
message "This message is a distraction. Mwahaha!"
send "Your kill streak is %{kill streak::%uuid of player%}%." to player
if the targeted entity exists:
message "You're currently looking at a %type of the targeted entity%!"
on chat:
cancel event
send "[%player%] >> %message%" to all players from player
Patterns: |
|
Since: | 2.5.1 |
Requirements: | Minecraft 1.14.2+ |
Examples:
Patterns: |
|
Since: | 2.0, 2.1.1 (closing), 2.2-Fixes-V10 (anvil), 2.4 (hopper, dropper, dispenser |
Please note that currently 'show' and 'open' have the same effect, but 'show' will eventually show an unmodifiable view of the inventory in the future.
Examples:
open the player's inventory for the player
Patterns: | |
Since: | INSERT VERSION |
Some particles may be affected differently by these values, so let's break them down:
`first number` = count, how many particles to spawn at once (use '0' if you notice the particle kinda flies away).
`particle` = the particle to spawn.
`using` = the data used for this particle (some particles like 'block', 'item' and 'dust' require more data).
`location` = where you are going to spawn the particle.
`delta` = a vector with the maximum random offset. The position of each particle will be randomized positively and negatively by the offset parameters on each axis.
Some particles use the delta to set color/direction if count is set to 0.
`extra` = the extra data for this particle, depends on the particle used (normally speed).
`force` = whether to send the particle to players within an extended range and encourage
their client to render it regardless of settings (this only works when not using `for player[s]`) (default = false)
`for %players%` = will only send this particle to a player, not the whole server.
Examples:
make 1 of block particle using dirt at location of target block
make 10 of poof at player with offset vector(2, 2, 2) with extra 0.5
draw 20 of dust using dustOption(blue, 10) at location above target block
draw 1 of dust_color_transition using dustTransition(blue, green, 3) at location of player
draw 1 of vibration using vibration({loc1}, {loc2}, 1 second) at {loc1} with force
make 0 of shriek using 1 above target block of player
make 1 of sculk_charge using 0.1 at {_loc} with force
Patterns: |
|
Since: | 2.7 |
Requirements: | Paper |
Examples:
make all cows stop pathfinding
make event-entity pathfind towards player at speed 1
Patterns: |
|
Since: | 2.2-dev28, 2.4 (sound categories), 2.9 (sound seed & entity emitter) |
Requirements: | Minecraft 1.18.1+ (entity emitters), Paper 1.19.4+ or Adventure API 4.12.0+ (sound seed) |
When running 1.19+, playing a sound from an entity directly will result in the sound coming from said entity, even while moving.
If the sound is custom, a location emitter will follow the entity. Do note that pitch and volume
are reflected based on the entity, and Minecraft may not use the values from this syntax.
If using Paper 1.19.4+ or Adventure API 4.12.0+ you can utilize sound seeds. Minecraft sometimes have a set of sounds under one sound ID
that will randomly play, to counter this, you can directly state which seed to use.
Please note that sound names can get changed in any Minecraft or Spigot version, or even removed from Minecraft itself.
Examples:
play sound "entity.experience_orb.pickup" with volume 0.5 to the player
play sound "custom.music.1" in jukebox category at {speakerBlock}
play sound "BLOCK_AMETHYST_BLOCK_RESONATE" with seed 1 on target entity for the player #1.20.1+
Patterns: |
|
Since: | 2.3 |
Usable in events: | server list ping |
Requirements: | Paper 1.12.2 or newer |
The Vanilla Minecraft client will display ??? (dark gray) instead of player counts and will not show the
hover hist when hiding player info.
The version string can override the ???.
Also the Online Players Count and
Max Players expressions will return -1 when hiding player info.
Examples:
hide player related information in the server list
reveal all player related info
Patterns: | |
Since: | 2.3 |
When reveal is used in combination of the hidden players expression and the viewers are not specified, this will default it to the given player in the hidden players expression.
Note: if a player was hidden and relogs, this player will be visible again.
Examples:
if {vanished::%player's uuid%} is true:
hide the player from all players
reveal hidden players of {_player}
Patterns: |
|
Since: | 1.3.2 |
Examples:
poison the victim for 20 seconds
cure the player from poison
Patterns: |
|
Since: | 2.0, 2.2-dev27 (ambient and particle-less potion effects), 2.5 (replacing existing effect), 2.5.2 (potion effects), 2.7 (icon and infinite) |
Examples:
remove haste from the victim
on join:
apply infinite potion of strength of tier {strength::%uuid of player%} to the player
apply potion of strength of tier {strength::%uuid of player%} to the player for 999 days # Before 1.19.4
apply potion effects of player's tool to player
apply haste potion of tier 3 without any particles whilst hiding the potion icon to the player # Hide potions
Patterns: |
|
Since: | 2.0, 2.2-dev24 (replace in multiple strings and replace items in inventory), 2.5 (replace first, case sensitivity) |
Examples:
replace every "&" with "§" in line 1
# The following acts as a simple chat censor, but it will e.g. censor mass, hassle, assassin, etc. as well:
on chat:
replace all "kys", "idiot" and "noob" with "****" in the message
replace all stone and dirt in player's inventory and player's top inventory with diamond
Patterns: |
|
Since: | 2.2, 2.8.0 (returns aliases) |
Examples:
return 2 * {_i}
function divide(i: number) returns number:
return {_i} / 2
Patterns: | |
Since: | 2.9.0 |
Requirements: | Spigot 1.19.4+ |
Optionally, the entity that rang the bell and the direction the bell should ring can be specified.
A bell can only ring in two directions, and the direction is determined by which way the bell is facing.
By default, the bell will ring in the direction it is facing.
Examples:
Patterns: |
|
Since: | 2.8.0 |
Note: saving many worlds at once may possibly cause the server to freeze.
Examples:
save all worlds
Patterns: |
|
Since: | 2.2-dev37c, 2.5.1 (block data support) |
Examples:
make player see target block as campfire[facing=south]
Patterns: | |
Since: | 2.4 |
the resource pack in the background, and will automatically switch to it once the download is complete.
The URL must be a direct download link.
The hash is used for caching, the player won't have to re-download the resource pack that way.
The hash must be SHA-1, you can get SHA-1 hash of your resource pack using
this online tool.
The resource pack request action can be used to check
status of the sent resource pack request.
Examples:
send the resource pack from "URL" with hash "hash" to the player
Patterns: |
|
Since: | 2.0 (cows, sheep & snowmen), 2.8.0 (all shearable entities) |
Requirements: | Paper 1.19.4+ (all shearable entities) |
Please note that..:
- If your server is not running with Paper 1.19.4 or higher, this effect will only change its 'shear state', and the 'force' effect is unavailable
- Force-shearing or un-shearing on a sheared mushroom cow is not possible
Examples:
shear the clicked sheep
chance of 10%
force shear the clicked sheep
Patterns: |
|
Since: | 1.4 |
Examples:
make the player shoot a creeper at speed 10
shoot a pig from the creeper
Patterns: |
|
Since: | 2.9.0 |
Be warned, this will overwrite the indices of the list variable.
Examples:
sort {_words::*} # alphabetical sort
sort {_words::*} by length of input # shortest to longest
sort {_words::*} based on {tastiness::%input%} # sort based on custom value
Patterns: |
|
Since: | 2.5 |
Examples:
restart server
Patterns: |
|
Since: | 2.4, 2.7 (stop all sounds) |
Requirements: | MC 1.17.1 (stop all sounds) |
Please note that sound names can get changed in any Minecraft or Spigot version, or even removed from Minecraft itself.
Examples:
stop playing sounds "ambient.underwater.loop" and "ambient.underwater.loop.additions" to the player
stop all sounds for all players
stop sound in the record category
Patterns: |
|
Since: | 2.5.1 |
Requirements: | Minecraft 1.15.2+ |
Examples:
Patterns: | |
Since: | 1.0 |
This effect is delayed by default on Paper, meaning certain syntax such as the return effect for functions cannot be used after this effect.
The keyword 'force' indicates this effect will not be delayed,
which may cause lag spikes or server crashes when using this effect to teleport entities to unloaded chunks.
Examples:
teleport the attacker to the victim
Patterns: | |
Since: | 2.3 |
If you're sending only the subtitle, it will be shown only if there's a title displayed at the moment, otherwise it will be sent with the next title. To show only the subtitle, use:
send title " " with subtitle "yourtexthere" to player
.Note: if no input is given for the times, it will keep the ones from the last title sent, use the reset title effect to restore the default values.
Examples:
send title "Hi %player%" to player
send title "Loot Drop" with subtitle "starts in 3 minutes" to all players
send title "Hello %player%!" with subtitle "Welcome to our server" to player for 5 seconds with fadein 1 second and fade out 1 second
send subtitle "Party!" to all players
Patterns: |
|
Since: | 2.8.0 |
Examples:
send "You can no longer pick up items!" to player
on drop:
if player can't pick up items:
allow player to pick up items
Patterns: |
|
Since: | 1.0 |
This may require that there is enough space above the given location and that the block below is dirt/grass
but it is possible that the tree will just grow anyways, possibly replacing every block in its path.
Examples:
Patterns: |
|
Since: | 2.0 |
Examples:
make the attacker ride the victim
Patterns: |
|
Since: | 1.0 |
Examples:
deop all players
Patterns: |
|
Since: | 1.0, 2.6.1 (with section), 2.8.6 (dropped items) |
If it is used as a section, the section is run before the entity is added to the world.
You can modify the entity in this section, using for example 'event-entity' or 'cow'.
Do note that other event values, such as 'player', won't work in this section.
Examples:
spawn a ghast 5 meters above the player
spawn a zombie at the player:
set name of the zombie to ""
Patterns: | |
Since: | 2.9.0 |
Requirements: | Spigot 1.19.4+ |
A bell will start resonating five game ticks after being rung, and will continue to resonate for 40 game ticks.
Examples:
Patterns: |
|
Since: | 2.0 |
Requirements: | Supported regions plugin |
This condition requires a supported regions plugin to be installed.
Examples:
description: set the block at your crosshair to a different type
trigger:
player cannot build at the targeted block:
message "You do not have permission to change blocks there!"
stop
set the targeted block to argument
Patterns: |
|
Since: | 1.0 |
Examples:
player has enough space for 64 feathers
Patterns: |
|
Since: | 2.8.0 |
Examples:
send "You can pick up items!" to player
on drop:
if player can't pick up items:
send "Be careful, you won't be able to pick that up!" to player
Patterns: | |
Since: | 2.3 |
Examples:
message "<light red>The player %player-argument% is not online!"
Patterns: |
|
Since: | 1.0 |
Valid values are between 0% and 100%, or if the percent sign is omitted between 0 and 1.
Examples:
drop a diamond
chance of {chance}% # {chance} between 0 and 100
chance of {chance} # {chance} between 0 and 1
Patterns: |
|
Since: | 1.0 |
Note: This is the only element where not all patterns are shown. It has actually another two sets of similar patters, but with
(was|were)
or will be
instead of (is|are)
respectively, which check different time states of the first expression. Examples:
time in the player's world is greater than 8:00
the creature is not an enderman or an ender dragon
Patterns: |
|
Since: | 1.0 |
Examples:
player has 4 flint and 2 iron ingots
{list::*} contains 5
Patterns: |
|
Since: | 2.0 |
Examples:
on damage:
damage was caused by lava, fire or burning
victim is a player
victim has a potion of fire resistance
cancel event
apply fire resistance to the victim for 30 seconds
remove 1 potion of fire resistance from the victim
# prevent mobs from dropping items under certain circumstances
on death:
entity is not a player
damage wasn't caused by a block explosion, an attack, a projectile, a potion, fire, burning, thorns or poison
clear drops
Patterns: |
|
Since: | 2.7 |
Requirements: | Minecraft 1.16+ |
Examples:
Patterns: |
|
Since: | 2.7 |
Usable in events: | Egg Throw |
Examples:
if an entity won't hatch:
send "Better luck next time!" to the player
Patterns: |
|
Since: | 2.8.0 |
Requirements: | MC 1.13+ (cows, sheep & snowmen), Paper 1.19.4+ (all shearable entities) |
Examples:
send "This entity has nothing left to shear!" to player
Patterns: | |
Since: | 2.6.1 |
Requirements: | Minecraft 1.16+ (in water), Paper 1.16+ (in rain, lava and bubble column) |
Examples:
if player is in water:
player is in lava:
player is in bubble column
Patterns: |
|
Since: | 2.2-dev36 |
Examples:
if event is cancelled:
broadcast "no clicks allowed!"
Patterns: | |
Since: | 1.2 |
Examples:
on damage:
projectile exists
broadcast "%attacker% used a %projectile% to attack %victim%!"
Patterns: |
|
Since: | 2.5 |
Examples:
Patterns: | |
Since: | 2.3 |
Examples:
message "Your custom weather is %player's weather%"
Patterns: |
|
Since: | 2.5 |
Requirements: | 1.14+ |
Examples:
Patterns: |
|
Since: | 2.8.0 |
Examples:
Patterns: | |
Since: | 2.8.0 |
Examples:
send "You can't use this item right now. Wait %item cooldown of player's tool for player%"
Patterns: |
|
Since: | 2.9.0 |
Requirements: | Spigot 1.20.5+ |
The 'entire tooltip' is what shows to the player when they hover an item (i.e. name, lore, etc.).
The 'additional tooltip' hides certain information from certain items (potions, maps, books, fireworks, and banners).
Examples:
if additional tooltip of {_item} is hidden:
Patterns: |
|
Since: | 2.8.0 |
Examples:
victim has line of sight to attacker
player has no line of sight to location 100 blocks in front of player
Patterns: |
|
Since: | 2.2-dev36 |
Examples:
Patterns: |
|
Since: | 1.0 |
Examples:
victim has the permission "admin":
send "You're attacking an admin!" to attacker
Patterns: |
|
Since: | 1.4, 2.7 (multiple players) |
Examples:
player hasn't played before
Patterns: |
|
Since: | 2.6.1 |
Examples:
send "You are sonic!"
if all players have potion effects speed and haste:
broadcast "You are ready to MINE!"
Patterns: | |
Since: | 2.4 |
Requirements: | Paper 1.9 or newer |
Examples:
Patterns: | |
Since: | 2.3 |
Examples:
Patterns: |
|
Since: | 2.5 |
Requirements: | Paper 1.13 or newer |
Examples:
loop all players in radius 3 of the last spawned creeper
send "RUN!!!" to the loop-player
Patterns: | |
Since: | 2.0, 2.4-alpha4 (non-living entity support) |
Examples:
on shoot:
while the projectile is alive:
Patterns: |
|
Since: | 1.4 |
Examples:
victim is not IP-banned
"127.0.0.1" is banned
Patterns: |
|
Since: | 2.7 |
Usable in events: | respawn |
Requirements: | Minecraft 1.16+ |
Examples:
the respawn location is a bed
broadcast "%player% is respawning in their bed! So cozy!"
Patterns: | |
Since: | 2.5 |
Examples:
send "This block is well-powered by redstone!"
if clicked block is indirectly redstone powered:
send "This block is indirectly redstone powered."
Patterns: | |
Since: | unknown (before 2.1) |
Examples:
victim is blocking
damage attacker by 0.5 hearts
Patterns: | |
Since: | 1.4.4 |
Examples:
victim is burning:
increase damage by 2
Patterns: |
|
Since: | 2.5 |
Examples:
broadcast "A charged creeper is at %location of last spawned creeper%"
Patterns: |
|
Since: | 2.8.0 |
Requirements: | Minecraft 1.17+ |
Examples:
wait a second
if the last spawned spider is climbing:
message"The spider is now climbing!"
Patterns: |
|
Since: | 2.2-dev36 |
If running MC 1.20.6-1.21.1: Will check if an ItemStack has a food component.
If running MC 1.21.3+: Will check if an ItemStack has a consumable component.
Examples:
player's tool is edible
Patterns: |
|
Since: | unknown (before 2.1) |
Examples:
Patterns: |
|
Since: | 1.4.6 |
Examples:
tool of player is not enchanted
Patterns: |
|
Since: | 2.9.0 |
Examples:
if {_items::*} aren't resistant to fire:
Patterns: | |
Since: | 2.5.1 |
Requirements: | Minecraft 1.11.2+ |
Examples:
if player's tool is not fuel:
send "Please hold a valid fuel item in your hand"
cancel event
Patterns: |
|
Since: | 2.7 |
Examples:
Patterns: |
|
Since: | 2.8.0 |
Requirements: | Paper |
Hands are raised when an entity is using an item (eg: blocking, drawing a bow, eating).
Examples:
if victim's main hand is raised:
drop player's tool at player
set player's tool to air
Patterns: |
|
Since: | 1.0 |
Cannot be used with endermen, use 'entity is [not] an enderman holding <item type>' instead.
Examples:
victim isn't holding a sword of sharpness
Patterns: | |
Since: | 2.5 |
Examples:
if the explosion is fiery:
broadcast "A fiery explosive has been ignited!"
Patterns: |
|
Since: | 2.7 |
Examples:
Patterns: | |
Since: | 2.5.2 |
Requirements: | Minecraft 1.13+ |
Examples:
if event-block is interactable:
cancel event
send "You cannot break interactable blocks!"
Patterns: |
|
Since: | 2.7 |
Examples:
Patterns: |
|
Since: | 2.8.0 |
Requirements: | Paper 1.15+ |
Examples:
while event-entity is not jumping:
wait 5 ticks
push event-entity upwards
Patterns: |
|
Since: | 2.5 |
Examples:
Patterns: | |
Since: | 2.3, 2.5 (revamp with chunk at location/coords) |
Examples:
if chunk 1, 10 in world "world" is loaded:
if world("lobby") is loaded:
Patterns: |
|
Since: | 2.1 |
Requirements: | Supported regions plugin |
This condition requires a supported regions plugin to be installed.
Examples:
player is the owner of the region
message "Welcome back to %region%!"
send "%player% just entered %region%!" to all members of the region
Patterns: |
|
Since: | 1.4 |
Requirements: | Paper 1.20+ (Connected) |
Examples:
player-argument is offline
while player is connected:
wait 60 seconds
send "hello!" to player
# The following will act like `{_player} is online`.
# Using variables with `is connected` will not behave the same as with non-variables.
while {_player} is connected:
broadcast "online!"
wait 1 tick
Patterns: |
|
Since: | 2.7 |
Examples:
Patterns: | |
Since: | 2.5.1 |
Requirements: | Minecraft 1.13.2+ |
A block is passable if it has no colliding parts that would prevent players from moving through it.
Blocks like tall grass, flowers, signs, etc. are passable, but open doors, fence gates, trap doors, etc. are not because they still have parts that can be collided with.
Examples:
Patterns: |
|
Since: | 2.9.0 |
Requirements: | Paper |
Can only be a living entity that is a Mob.
Examples:
while {_entity} is pathfinding
wait a second
launch flickering trailing burst firework colored red at location of {_entity}
subtract 10 from {defence::tower::health}
clear entity within {_entity}
Patterns: | |
Since: | 2.6 |
Plugin names can be found in the plugin's 'plugin.yml' file or by using the '/plugins' command, they are NOT the name of the plugin's jar file.
When checking if a plugin is not enabled, this will return true if the plugin is either disabled or not on the server.
When checking if a plugin is disabled, this will return true if the plugin is on the server and is disabled.
Examples:
if plugin "WorldGuard" is not enabled:
if plugins "Essentials" and "Vault" are enabled:
if plugin "MyBrokenPlugin" is disabled:
Patterns: |
|
Since: | 1.4.4 |
Examples:
cure the player from poison
message "You have been cured!"
Patterns: |
|
Since: | 2.7 |
Requirements: | 1.16.5+, Paper 1.19.2+ (blockdata) |
A preferred tool is one that will drop the block's item when used.
For example, a wooden pickaxe is a preferred tool for grass and stone blocks, but not for iron ore.
Examples:
event-block is set
if player's tool is the preferred tool for event-block:
break event-block naturally using player's tool
else:
cancel event
Patterns: |
|
Since: | 2.0 |
Examples:
Patterns: |
|
Since: | 2.5 |
Examples:
Patterns: | |
Since: | 2.3 |
Slimes can generally spawn in the swamp biome and in slime chunks.
For more info, see the Minecraft wiki.
Examples:
trigger:
if chunk at player is a slime chunk:
send "Yeah, it is!"
else:
send "Nope, it isn't"
Patterns: | |
Since: | 1.4.4 |
Examples:
on target:
target is sneaking
distance of target and the entity is bigger than 4
cancel the event
Patterns: |
|
Since: | 2.7 |
Examples:
birch wood is stackable
torch is stackable
Patterns: |
|
Since: | 2.3 |
Requirements: | 1.13 or newer |
Examples:
Patterns: | |
Since: | INSERT VERSION |
Requirements: | Minecraft 1.21+ |
Examples:
if target entity is tagged as entity type registry tag "minecraft:arthropod":
if player's tool is not tagged as item registry tag "minecraft:buttons":
Patterns: |
|
Since: | 2.5 |
Examples:
if victim is tameable:
cancel event
Patterns: | |
Since: | 2.2-dev36 |
Note that this condition may not work for all blocks, due to the transparency list used by Spigot not being completely accurate.
Examples:
Patterns: |
|
Since: | 2.5.1, 2.9.0 (breakable) |
Examples:
send "This item is unbreakable!" to player
if tool of {_p} is breakable:
send "Your tool is breakable!" to {_p}
Patterns: | |
Since: | 2.9.0 |
Examples:
on load:
if the script is using "example feature":
broadcast "You're using an experimental feature!"
Patterns: |
|
Since: | 2.5.2, 2.9.0 (enforce, offline players) |
Requirements: | MC 1.17+ (enforce) |
Examples:
if the server is whitelisted:
if the server whitelist is enforced:
Patterns: | |
Since: | 2.7 |
Requirements: | MC 1.17+ (within block) |
Note that using the is between condition will refer to a straight line between locations, while this condition will refer to the cuboid between locations.
Examples:
send "You are in a PvP zone!" to player
if player is in world("world"):
send "You are in the overworld!" to player
if attacker's location is inside of victim:
cancel event
send "Back up!" to attacker and victim
Patterns: | |
Since: | 2.7 |
Examples:
if attacker's location is within 10 blocks around {_spawn}:
cancel event
send "You can't PVP in spawn."
Patterns: |
|
Since: | 3.0.0 |
Requirements: | Paper 1.21.3+ for Partial Matching |
This will ignore stack count.
Optionally you can do a partial match, this will only check the data components on the second ItemStack while ignoring other data components.
Examples:
if {_i} matches itemstack of diamond sword: # This will fail as the items don't match
if {_i} partially matches itemstack of diamond sword: # This will pass as only the components of the second item are checked.
if player's tool matches {_i}:
Patterns: |
|
Since: | 2.8.0 |
Requirements: | Paper 1.17.1+ (entities) |
Paper 1.17.1+ is required for non-player entities.
Examples:
if victim is left handed:
cancel event
Patterns: | |
Since: | 2.5.2 |
Examples:
if message partially matches "\d":
send "Message contains a digit!"
if message doesn't match "[A-Za-z]+":
send "Message doesn't only contain letters!"
Patterns: |
|
Since: | INSERT VERSION |
The first pattern will match if both conditions are true.
The second pattern will match if either of the conditions are true.
Examples:
if (block below player is dirt) && (block at player is air):
if (block above player is dirt) or (block below player is dirt):
if (attacker is a zombie) || (victim is a sheep):
# More than 2
if (("a" = "a") and ("b" = "b")) and ("c" = "c"):
if (("a" = "a") and ("b" = "b")) or ("c" = "c"):
Patterns: |
|
Since: | 2.1 |
Requirements: | Supported regions plugin |
This condition requires a supported regions plugin to be installed.
Examples:
on region enter:
region contains {flags.%world%.red}
message "The red flag is near!"
Patterns: |
|
Since: | 2.4 |
Usable in events: | resource pack request response |
Examples:
if the resource pack wasn't accepted:
kick the player due to "You have to install the resource pack to play in this server!"
Patterns: |
|
Since: | 2.5 |
Examples:
Patterns: | |
Since: | 2.0 |
Examples:
trigger:
{command::%player's uuid%::last-usage} was less than a minute ago:
message "Please wait a minute between uses of this command."
stop
set {command::%player's uuid%::last-usage} to now
# ... actual command trigger here ...
Patterns: |
|
Since: | 1.0 |
if: executed when its condition is true
else if: executed if all previous chained conditionals weren't executed, and its condition is true
else: executed if all previous chained conditionals weren't executed
parse if: a special case of 'if' condition that its code will not be parsed if the condition is not true
else parse if: another special case of 'else if' condition that its code will not be parsed if all previous chained conditionals weren't executed, and its condition is true
Examples:
send "Your health is okay so far but be careful!"
else if player's health is greater than 2:
send "You need to heal ASAP, your health is very low!"
else: # Less than 2 hearts
send "You are about to DIE if you don't heal NOW. You have only %player's health% heart(s)!"
parse if plugin "SomePluginName" is enabled: # parse if %condition%
# This code will only be executed if the condition used is met otherwise Skript will not parse this section therefore will not give any errors/info about this section
Patterns: |
|
Since: | 1.0 |
A loop will loop through all elements of the given expression, e.g. all players, worlds, items, etc. The conditions & effects inside the loop will be executed for every of those elements, which can be accessed with ‘loop-
send "hello" to loop-player
. When a condition inside a loop is not fulfilled the loop will start over with the next element of the loop. You can however use stop loop
to exit the loop completely and resume code execution after the end of the loop.Loopable Values
All expressions that represent more than one value, e.g. ‘all players’, ‘worlds’, etc., as well as list variables, can be looped. You can also use a list of expressions, e.g.
loop the victim and the attacker
, to execute the same code for only a few values.List Variables
When looping list variables, you can also use
loop-index
in addition to loop-value
inside the loop. loop-value
is the value of the currently looped variable, and loop-index
is the last part of the variable's name (the part where the list variable has its asterisk *). Examples:
send "Hello %loop-player%!" to loop-player
loop items in player's inventory:
if loop-item is dirt:
set loop-item to air
loop 10 times:
send title "%11 - loop-value%" and subtitle "seconds left until the game begins" to player for 1 second # 10, 9, 8 etc.
wait 1 second
loop {Coins::*}:
set {Coins::%loop-index%} to loop-value + 5 # Same as "add 5 to {Coins::%loop-index%}" where loop-index is the uuid of the player and loop-value is the actually coins value such as 200
Patterns: |
|
Since: | 2.0, 2.6 (do while) |
Examples:
send "More players are needed to begin the adventure" to all players
wait 5 seconds
set {_counter} to 1
do while {_counter} > 1: # false but will increase {_counter} by 1 then get out
add 1 to {_counter}
# Be careful when using while loops with conditions that are almost
# always true for a long time without using 'wait %timespan%' inside it,
# otherwise it will probably hang and crash your server.
while player is online:
give player 1 dirt
wait 1 second # without using a delay effect the server will crash
Patterns: | |
Since: | 1.3.4 |
Examples:
at 7am in "world"
Patterns: |
|
Since: | 2.7 |
Requirements: | Paper |
Note: this does not include anvil damage from falling.
Examples:
cancel the event
Patterns: |
|
Since: | 2.7 |
Examples:
event-item is set # result item
chance of 5%:
set repair cost to repair cost * 50%
send "You're LUCKY! You got 50% discount." to player
Patterns: |
|
Since: | 2.2-dev21 |
Examples:
Patterns: |
|
Since: | 2.5.1 |
Examples:
send "You swung your arm!"
Patterns: |
|
Since: | 2.5 |
Requirements: | Paper |
Examples:
send "You equipped %event-item%!"
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 2.9.0 |
Requirements: | Spigot 1.19.4+ |
Examples:
send "&amp;amp;lt;red&amp;amp;gt;Raiders are nearby!" to all players in radius 32 around event-block
Patterns: |
|
Since: | 2.9.0 |
Requirements: | Spigot 1.19.4+ or Paper 1.16.5+ (no event-direction) |
Examples:
send "&amp;amp;lt;gold&amp;amp;gt;Ding-dong!&amp;amp;lt;reset&amp;amp;gt;" to all players in radius 10 of event-block
Patterns: |
|
Since: | 1.0 |
Examples:
if block is log:
send "You can't break the holy log!"
Patterns: |
|
Since: | 2.5 |
Requirements: | Minecraft 1.13 or newer |
Examples:
send "Fertilized %size of fertilized blocks% blocks got fertilized."
Patterns: |
|
Since: | 2.2-Fixes-V10 |
Examples:
Patterns: |
|
Since: | 2.2-dev31 |
Examples:
Patterns: |
|
Since: | 2.2-dev31 |
Examples:
Patterns: |
|
Since: | 1.0 (break), unknown (mine), 2.6 (BlockData support) |
Examples:
on break of stone:
on mine of any ore:
on break of chest[facing=north]:
on break of potatoes[age=7]:
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 1.0, 2.6 (BlockData support) |
Examples:
on burn of wood, fences, or chests:
on burn of oak_log[axis=y]:
Patterns: |
|
Since: | 1.0 (basic), 2.0 ([un]cancellable) |
Please note that the data value of the block to be placed is not available in this event, only its ID.
Examples:
cancel event
Patterns: |
|
Since: | 1.4.1 |
Use chat format to change message format.
Use chat recipients to edit chat recipients.
Examples:
if player has permission "owner":
set chat format to "&amp;amp;amp;lt;red&amp;amp;amp;gt;[player]&amp;amp;amp;lt;light gray&amp;amp;amp;gt;: &amp;amp;amp;lt;light red&amp;amp;amp;gt;[message]"
else if player has permission "admin":
set chat format to "&amp;amp;amp;lt;light red&amp;amp;amp;gt;[player]&amp;amp;amp;lt;light gray&amp;amp;amp;gt;: &amp;amp;amp;lt;orange&amp;amp;amp;gt;[message]"
else: #default message format
set chat format to "&amp;amp;amp;lt;orange&amp;amp;amp;gt;[player]&amp;amp;amp;lt;light gray&amp;amp;amp;gt;: &amp;amp;amp;lt;white&amp;amp;amp;gt;[message]"
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 1.0 |
Please note that rightclick events with an empty hand while not looking at a block are not sent to the server, so there's no way to detect them.
Also note that a leftclick on an entity is an attack and thus not covered by the 'click' event, but the 'damage' event.
Examples:
on rightclick holding a fishing rod:
on leftclick on a stone or obsidian:
on rightclick on a creeper:
on click with a sword:
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 2.0 |
Examples:
on command "/stop":
on command "pm Njol ":
Patterns: |
|
Since: | 2.0 |
Examples:
player doesn't have permission "VIP"
number of players is greater than 15
kick the player due to "The last 5 slots are reserved for VIP players."
Patterns: |
|
Since: | 2.0 |
Examples:
Patterns: |
|
Since: | unknown (before 2.1) |
Examples:
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 1.0, 2.7 (by entity) |
Examples:
on damage of a player:
on damage of player by zombie:
Patterns: |
|
Since: | 1.0 |
Examples:
on death of player:
on death of a wither or ender dragon:
broadcast "A %entity% has been slain in %world%!"
Patterns: |
|
Since: | unknown (before 2.1) |
Examples:
send "that'd be 19.99 please!"
Patterns: |
|
Since: | unknown (before 2.1), 2.7 (entity) |
Examples:
if event-item is compass:
cancel event
on entity drop of an egg:
if event-entity is a chicken:
set item of event-dropped item to a diamond
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 2.5 |
To get the enchanted item, see the enchant item expression
Examples:
if the clicked button is 1: # offer 1
set the applied enchantments to sharpness 10 and unbreaking 10
Patterns: |
|
Since: | 2.5 |
To get the enchant item, see the enchant item expression
Examples:
set enchant offer 1 to sharpness 1
set the cost of enchant offer 1 to 10 levels
Patterns: |
|
Since: | 2.9.0 |
Requirements: | Paper |
Note: This does not stop enderman from targeting the player as a result of getting damaged.
Examples:
on enderman enrage:
if player has permission "safeFrom.enderman":
cancel event
Patterns: |
|
Since: | unknown, 2.5.2 (falling block), 2.8.0 (any entity support) |
event-block represents the old block and event-blockdata represents the new replacement that'll be applied to the block.
Examples:
kill event-entity
broadcast "A sheep stole some grass!"
on falling block land:
event-entity is a falling dirt
cancel event
Patterns: |
|
Since: | 2.2-dev13b |
Examples:
kill event-entity
Patterns: |
|
Since: | 2.7 |
Requirements: | Paper 1.15.2+ |
Examples:
if entity is a wither skeleton:
cancel event
Patterns: |
|
Since: | 2.2-dev13b |
Examples:
cancel event
Patterns: |
|
Since: | 2.5.3 |
Examples:
broadcast "A %type of event-entity% has entered a portal!
Patterns: |
|
Since: | 2.8.0 |
Examples when it's called include; when a zombie gets cured and a villager spawns, an entity drowns in water like a zombie that turns to a drown, an entity that gets frozen in powder snow, a mooshroom that when sheared, spawns a new cow.
Examples:
on mooshroom transforming:
on zombie, skeleton or slime transform:
Patterns: |
|
Since: | 2.7 |
Examples:
set {_xp} to event-experience
broadcast "%{_xp}%"
Patterns: |
|
Since: | 2.0 |
Please note that this event will not fire for xp orbs spawned by plugins (including Skript) with Bukkit.
Examples:
world is "minigame_world"
cancel event
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 1.0, 2.6 (BlockData support) |
Examples:
on fade of snow[layers=2]
Patterns: |
|
Since: | 2.4 |
Examples:
on firework exploding colored red, light green and black
on firework explosion colored light green:
broadcast "A firework colored %colors% was exploded at %location%!"
Patterns: |
|
Since: | 1.3.7 |
Examples:
broadcast "Welcome %player% to the server!"
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 2.2-dev36 |
Examples:
if {game::%player%::playing} exists:
cancel event
Patterns: |
|
Since: | 1.0 |
Examples:
if event-block is water:
broadcast "Build more dams! It's starting to get wet in here"
Patterns: |
|
Since: | 1.0, 2.6 (BlockData support) |
Examples:
on form of a mushroom:
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 2.2-dev21 |
Examples:
cancel the event # bad idea, but you CAN do it!
Patterns: |
|
Since: | 1.0, 2.2-dev20 (plants), 2.8.0 (from, into, blockdata) |
"of" matches any grow event, "from" matches only the old state, "into" matches only the new state,and "from into" requires matching both the old and new states.
Using "and" lists in this event is equivalent to using "or" lists. The event will trigger if any one of the elements is what grew.
Examples:
on grow of tree:
on grow of wheat[age=7]:
on grow from a sapling:
on grow into tree:
on grow from a sapling into tree:
on grow of wheat, carrots, or potatoes:
on grow into tree, giant mushroom, cactus:
on grow from wheat[age=0] to wheat[age=1] or wheat[age=2]:
Patterns: |
|
Since: | 2.3 |
Works also when one or both of the slots are empty.
The event is called before the items are actually swapped,
so when you use the player's tool or player's offtool expressions,
they will return the values before the swap -
this enables you to cancel the event before anything happens.
Examples:
event-player's tool is a diamond sword
cancel event
Patterns: |
|
Since: | 1.0, 2.9.0 (by reason) |
Examples:
on player healing from a regeneration potion:
on healing of a zombie, cow or a wither:
heal reason is healing potion
cancel event
Patterns: |
|
Since: | 2.5.1 |
Examples:
push event-entity upwards at speed 2
Patterns: |
|
Since: | 1.4.4 |
Examples:
Patterns: |
|
Since: | 1.0 |
The burn event will be called when the block is about do be destroyed by the fire.
Examples:
if event-block is a ladder:
cancel event
Patterns: |
|
Since: | 2.2-Fixes-V10 |
Examples:
if event-item is stone:
give player 1 stone
remove 20$ from player's balance
Patterns: |
|
Since: | 2.2-dev21 |
Examples:
if player's location is {location}:
send "You exited the shop!"
Patterns: |
|
Since: | 2.7 |
Examples:
if player's current inventory is {_gui}:
send "You can't drag your items here!" to player
cancel event
Patterns: |
|
Since: | 2.8.0 |
When this event is called, the initiator may have already removed the item from the source inventory and is ready to move it into the destination inventory.
If this event is cancelled, the items will be returned to the source inventory.
Examples:
broadcast "%holder of past event-inventory% is transporting %event-item% to %holder of event-inventory%!"
Patterns: |
|
Since: | 2.2-dev21 |
Examples:
close player's inventory
Patterns: |
|
Since: | 2.5.1 |
Examples:
Patterns: |
|
Since: | 2.7 |
Requirements: | Paper 1.19.2+ |
Warning: setting the event-slot to a new item can result in an infinite loop.
Examples:
if event-item is a diamond:
send "You obtained a diamond!" to player
Patterns: |
|
Since: | 2.1.1 |
This event cannot be cancelled.
Examples:
Patterns: |
|
Since: | 2.5 |
Examples:
cancel event
Patterns: | |
Since: | 2.2-dev35 |
Examples:
send "Not my precious!"
cancel event
Patterns: |
|
Since: | 2.5.1 |
Requirements: | Minecraft 1.13 or newer |
Examples:
chance of 50%:
cancel the event
send "Oops! Mending failed!" to player
Patterns: | |
Since: | 2.2-dev35 |
Examples:
cancel event
Patterns: |
|
Since: | unknown (before 2.1) |
Examples:
broadcast "Someone dropped an iron sword!"
Patterns: |
|
Since: | 1.0 |
Examples:
message "Welcome on our awesome server!"
broadcast "%player% just joined the server!"
Patterns: |
|
Since: | 2.3 |
This event requires PaperSpigot.
Examples:
event-player does not have permission "jump"
cancel event
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 2.3 |
This event requires Minecraft 1.12+.
Examples:
if player's language starts with "en":
send "Hello!"
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 1.0, 2.4 (level up/down) |
Examples:
Patterns: |
|
Since: | 1.0 |
Examples:
spawn a zombie at location of event-entity
Patterns: |
|
Since: | 2.7 |
Requirements: | MC 1.16+ |
For example, when opening a shipwreck chest.
Examples:
chance of 10%
add 64 diamonds to the loot
send "You hit the jackpot at %event-location%!"
Patterns: |
|
Since: | 2.6, 2.8.0 (turn around) |
Requirements: | Paper 1.16.5+ (entity move) |
NOTE: Move event will only be called when the entity/player moves position, keyword 'turn around' is for orientation (ie: looking around), and the combined syntax listens for both.
NOTE: These events can be performance heavy as they are called quite often.
Examples:
if player does not have permission "player.can.move":
cancel event
on skeleton move:
if event-entity is not in world "world":
kill event-entity
on player turning around:
send action bar "You are currently turning your head around!" to player
Patterns: |
|
Since: | 2.0 |
Please note that using this event can cause lag if there are many players online.
Examples:
on stepping on stone:
Patterns: |
|
Since: | 1.4.6 |
Examples:
on block physics:
block is sand
cancel event
Patterns: |
|
Since: | unknown (before 2.1), 2.5 (entity) |
Examples:
on entity pickup of wheat:
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 1.0 |
Examples:
broadcast "A piston is extending!"
Patterns: |
|
Since: | 1.0 |
Examples:
broadcast "A piston is retracting!"
Patterns: |
|
Since: | 1.0, 2.6 (BlockData support) |
Examples:
on place of a furnace, workbench or chest:
on break of chest[type=right] or chest[type=left]
Patterns: |
|
Since: | 2.7 |
Examples:
send "You entered a chunk: %past event-chunk% -&amp;amp;gt; %event-chunk%!" to player
Patterns: |
|
Since: | 2.7 |
Requirements: | Paper 1.16+ |
Cancelling this event will prevent the player from being counted as deeply sleeping unless they exit and re-enter the bed.
Examples:
send "Zzzz.." to player
Patterns: |
|
Since: | 2.8.0 |
Requirements: | Minecraft 1.14+ (event-projectile) |
Examples:
cancel the event
teleport event-projectile to block 5 above event-projectile
Patterns: |
|
Since: | 2.7 |
Requirements: | Paper 1.16.5+ |
Examples:
chance of 50%:
cancel event
send "The trade was somehow denied!" to player
Patterns: |
|
Since: | 2.2-dev28 |
Examples:
world is "city"
send "Welcome to the City!"
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 1.0, 2.5.3 (event-entity support) |
Requirements: | Minecraft 1.14+ (event-entity support) |
In Minecraft 1.14+, you can use the player in this event.
Please note that there may not always be a player (or other entity) in this event.
Examples:
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 2.2-Fixes-V10 |
Examples:
Patterns: |
|
Since: | 1.0 (pressure plate), 1.4.4 (tripwire) |
Examples:
Patterns: |
|
Since: | 2.5 |
Requirements: | Paper |
Examples:
teleport shooter of event-projectile to event-entity
Patterns: |
|
Since: | 1.0 |
Use the damage event with a check for a projectile to be able to use the entity that got hit in the case when the projectile hit a living entity.
A damage event will even be fired if the damage is 0, e.g. when throwing snowballs at non-nether mobs.
Examples:
event-projectile is arrow
delete event-projectile
Patterns: |
|
Since: | 1.0 (simple disconnection) |
Examples:
on disconnect:
Patterns: |
|
Since: | 2.8.0 |
Requirements: | Paper |
Cancelling this event will skip the current arrow item and fire a new event for the next arrow item.
The arrow and bow in the event can be accessed with the Readied Arrow/Bow expression.
Examples:
selected bow's name is "Spectral Bow"
if selected arrow is not a spectral arrow:
cancel event
Patterns: |
|
Since: | 1.0 |
Examples:
send "someone is using redstone" to console
Patterns: |
|
Since: | 2.1 |
Requirements: | Supported regions plugin |
This event requires a supported regions plugin to be installed.
Examples:
message "Leaving %region%."
Patterns: |
|
Since: | 2.4 |
send resource pack effect.
The resource pack condition can be used
to check the resource pack state.
This event will be triggered once when the player accepts or declines the resource pack request,
and once when the resource pack is successfully installed or failed to download.
Examples:
if the resource pack was declined or failed to download:
on resource pack deny:
kick the player due to "You have to install the resource pack to play in this server!"
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 2.2-dev28 |
Examples:
entity is player
entity has permission "admin.undying"
uncancel the event
Patterns: |
|
Since: | 2.5 |
Note: the riptide action is performed client side, so manipulating the player in this event may have undesired effects.
Examples:
send "You are riptiding!"
Patterns: |
|
Since: | 2.0 |
The keyword 'async' indicates the trigger can be ran asynchronously,
Examples:
set {running::%script%} to true
on unload:
set {running::%script%} to false
Patterns: |
|
Since: | 2.8.0 |
Modifications will affect what commands show up for the player to tab complete. They will not affect what commands the player can actually run.
Adding new commands to the list is illegal behavior and will be ignored.
Examples:
set command list to command list where [input does not contain ":"]
remove "help" from command list
Patterns: |
|
Since: | 2.3 |
The IP expression can be used to get the IP adress of the pinger.
This event can be cancelled on PaperSpigot 1.12.2+ only and this means the player will see the server as offline (but still can join).
Also you can use MOTD, Max Players, Online Players Count, Protocol Version, Version String, Hover List and Server Icon expressions, and Player Info Visibility and Hide Player from Server List effects to modify the server list.
Examples:
set the motd to "Welcome %{player-by-IP::%ip%}%! Join now!" if {player-by-IP::%ip%} is set, else "Join now!"
set the fake max players count to (online players count + 1)
set the shown icon to a random server icon out of {server-icons::*}
Patterns: |
|
Since: | 2.0 |
Examples:
on server stop:
Patterns: |
|
Since: | 2.2-dev21 |
Examples:
cancel event
Patterns: |
|
Since: | 1.0 |
Examples:
if projectile is an arrow:
send "you shot an arrow!" to shooter
Patterns: |
|
Since: | 1.0 |
Examples:
line 2 is empty
set line 1 to "&amp;amp;amp;lt;red&amp;amp;amp;gt;%line 1%"
Patterns: |
|
Since: | 2.2-dev26 |
Examples:
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 1.0 |
Examples:
on sneak toggle:
player is sneaking
push the player upwards at speed 0.5
Patterns: |
|
Since: | 1.0, 2.5.1 (non-living entities) |
Examples:
on spawn of an ender dragon:
broadcast "A dragon has been sighted in %world%!"
Patterns: |
|
Since: | 1.0 |
Examples:
broadcast "someone changed the spawn!"
Patterns: |
|
Since: | 2.7 |
Requirements: | Paper |
Examples:
Patterns: |
|
Since: | 2.5 |
Requirements: | Minecraft 1.13 or newer |
Examples:
loop absorbed blocks:
broadcast "%loop-block% was absorbed by a sponge"!
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 1.0 |
Examples:
player is not sprinting
send "Run!"
Patterns: |
|
Since: | 2.8.0 |
Requirements: | Paper 1.16+ |
Examples:
cancel the event
on stonecutting:
broadcast "%player% is using stonecutter to craft %event-item%!"
Patterns: |
|
Since: | 2.8.0 |
Requirements: | Paper 1.18.2+ |
Note that event-timespan will return the time the item was used for.
Examples:
broadcast "%player% used %event-item% for %event-timespan%."
Patterns: |
|
Since: | 2.3 |
Requirements: | 1.13 or newer |
Examples:
event-entity does not have permission "swim"
cancel event
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 1.0 |
Examples:
target is a player
Patterns: |
|
Since: | 1.0, 2.9.0 (entity teleport) |
When teleporting entities, the event may also be called due to a result of natural causes, such as an enderman or shulker teleporting, or wolves teleporting to players.
When teleporting players, the event can be called by teleporting through a nether/end portal, or by other means (e.g. plugins).
Examples:
on player teleport:
on creeper teleport:
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 1.0 |
Examples:
cancel event
Patterns: |
|
Since: | 1.0 |
Examples:
entity is a player
cancel event
Patterns: |
|
Since: | 1.0 |
Examples:
if event-entity is a spider:
kill event-entity
Patterns: |
|
Since: | 1.0 |
Examples:
on weather change to sunny:
Patterns: |
|
Since: | 1.0, 2.8.0 (defining worlds) |
any scripts are loaded, this event is only called for newly created worlds.
World management plugins might change the behaviour of this event though.
Examples:
Patterns: |
|
Since: | 1.0, 2.8.0 (defining worlds) |
Examples:
broadcast "The world %event-world% has been loaded!"
Patterns: |
|
Since: | 1.0, 2.8.0 (defining worlds) |
Examples:
broadcast "The world %event-world% has been saved"
Patterns: |
|
Since: | 1.0, 2.8.0 (defining worlds) |
Examples:
broadcast "the %event-world% has been unloaded!"
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 1.0 |
Examples:
every minecraft hour:
every tick: # can cause lag depending on the code inside the event
every minecraft days:
Patterns: |
|
Since: | 2.5 |
Note that this type does not contain any numerical values.
See attributes for more info.
These are auto-generated and may differ between MC versions.
NOTE: Minecraft namespaces and underscores are supported, ex: 'minecraft:attack_damage'.
Examples:
Patterns: |
|
Since: | 1.4.4 |
NOTE: Minecraft namespaces are supported, ex: 'minecraft:basalt_deltas'.
As of Paper 1.21.3, custom biomes are also supported.
Examples:
set biome of block at player to my_pack:super_swamp
Patterns: |
|
Since: | 2.5 |
Examples:
set target block of player to oak stairs[facing=north;waterlogged=true]
set block at player to grass_block[snowy=true]
set loop-block to minecraft:chest[facing=north]
set block above player to oak_log[axis=y]
set target block of player to minecraft:oak_leaves[distance=2;persistent=false]
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 2.4 |
Requirements: | Minecraft 1.14 or newer |
NOTE: Minecraft namespaces are supported, ex: 'minecraft:british_shorthair'.
Examples:
Patterns: |
|
Since: | 2.0 |
Chunks are spread on a fixed rectangular grid in their world.
Examples:
Patterns: |
|
Since: | 2.2-dev16b, 2.2-dev35 (renamed to click type) |
Examples:
Patterns: |
|
Since: | Unknown |
Examples:
set the color of the block to green
message "You're holding a &amp;amp;amp;amp;amp;amp;lt;%color of tool%&amp;amp;amp;amp;amp;amp;gt;%color of tool%&amp;amp;amp;amp;amp;amp;lt;reset&amp;amp;amp;amp;amp;amp;gt; wool block"
Patterns: |
|
Since: | 1.0 |
Examples:
trigger:
if arg-1 is not set:
if command sender is console:
send "You can't push yourself as a console :\" to sender
stop
push sender upwards with force 2
send "Yay!"
else:
push arg-1 upwards with force 2
send "Yay!" to sender and arg-1
Patterns: |
|
Since: | 2.0 |
Please note that support for this type is very rudimentary, e.g. lava, fire and burning, as well as projectile and attack are considered different types.
Examples:
Patterns: |
|
Since: | 1.4 |
See time and timespan for the other time types of Skript.
Examples:
subtract a day from {_yesterday}
# now {_yesterday} represents the date 24 hours before now
Patterns: |
|
Since: | 2.3 |
Examples:
Patterns: | |
Since: | 2.0 |
Locations and some blocks also have a direction, but without a length.
Please note that directions have changed extensively in the betas and might not work perfectly. They can also not be used as command arguments.
Examples:
loop blocks from the block infront of the player to the block 10 below the player:
set the block behind the loop-block to water
Patterns: |
|
Since: | 1.4.6 |
NOTE: Minecraft namespaces are supported, ex: 'minecraft:vanishing_curse'.
As of Minecraft 1.21 this will also support custom enchantments using namespaces, ex: 'myenchants:explosive'.
Examples:
enchant player's tool with my_pack:flying 4
Patterns: |
|
Since: | 2.5 |
Examples:
set enchant offer 1 to sharpness 1
set the cost of enchant offer 1 to 10 levels
Patterns: |
|
Since: | 1.0 |
Examples:
player is an op
projectile is an arrow
shoot a fireball from the player
Patterns: |
|
Since: | 3.0.0 |
Examples:
Patterns: |
|
Since: | 3.0.0 |
Examples:
Patterns: |
|
Since: | 3.0.0 |
Examples:
Patterns: |
|
Since: | 2.4 |
which can be used in the launch firework effect.
See the firework effect expression for detailed patterns.
Examples:
launch trailing flickering star colored purple, yellow, blue, green and red fading to pink at target entity
launch ball large colored red, purple and white fading to light green and black at player's location with duration 1
Patterns: |
|
Since: | 2.4 |
Examples:
Patterns: |
|
Since: | 1.0 |
Examples:
set the player argument's game mode to creative
Patterns: |
|
Since: | 2.5 |
Examples:
Patterns: |
|
Since: | 2.4 |
Requirements: | Minecraft 1.14 or newer |
Examples:
Patterns: |
|
Since: | 2.5 |
Examples:
Patterns: |
|
Since: | 1.0 |
An inventory has a fixed amount of slots which represent a specific place in the inventory, e.g. the helmet slot for players (Please note that slot support is still very limited but will be improved eventually).
Examples:
add itemstack of diamond to inventory of target player
Patterns: |
|
Since: | 2.2-dev16 |
Examples:
Patterns: |
|
Since: | 2.8.0 |
Requirements: | Paper |
Examples:
Patterns: |
|
Since: | 2.2-dev32 |
Examples:
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 1.0 |
Examples:
shoot a zombie from the creeper
Patterns: |
|
Since: | 3.0.0 |
Materials are auto-generated based on Minecraft keys and may change between MC versions.
NOTE: Minecraft namespaces and underscores are supported, ex: 'minecraft:oak_log'.
Examples:
if material of target block = oak stairs:
set material of target block to diamond ore
set {_item} to itemstack of diamond axe
set {_item} to itemstack of diamond_axe
set {_item} to itemstack of minecraft:diamond_axe
Patterns: |
|
Since: | 2.2-dev36 |
Examples:
Patterns: |
|
Since: | 2.7 |
Requirements: | Paper 1.16+ |
Examples:
Patterns: |
|
Since: | 1.0 |
Please note that many expressions only need integers, i.e. will discard any fractional parts of any numbers without producing an error.
Examples:
set {_temp} to 2*{_temp} - 2.5
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 2.0 beta 8 |
Examples:
Patterns: |
|
Since: | INSERT VERSION |
Some particles require extra data, these are distinguished by their data type within the square brackets.
DustOption, DustTransition and Vibration each have their own functions to build the appropriate data for these particles.
NOTE: These are auto-generated and may differ between server versions.
Examples:
Patterns: |
|
Since: | 1.0 |
You have two possibilities to use players as command arguments: <player> and <offline player>. The first requires that the player is online and also accepts only part of the name, while the latter doesn't require that the player is online, but the player's name has to be entered exactly.
Examples:
set {_p} to "N" parsed as a player # returns Notch if Notch is online because their name starts with 'N' (case insensitive) however, it would return nothing if no player whose name starts with 'N' is online.
Patterns: |
|
Since: | 2.5.2 |
Examples:
Patterns: |
|
Since: | Unknown |
Examples:
apply potion of speed 2 to the player for 60 seconds
remove invisibility from the victim
Patterns: |
|
Since: | 1.0 |
Examples:
shoot an arrow at speed 5 from the player
Patterns: |
|
Since: | 2.8.0 |
Requirements: | Paper 1.16.5+ |
Examples:
Patterns: |
|
Since: | 2.1 |
Requirements: | Supported regions plugin |
Please note that some regions plugins do not have named regions, some use numerical ids to identify regions, and some may have regions with the same name in different worlds, thus using regions like "region name" in scripts may or may not work.
Examples:
Patterns: |
|
Since: | INSERT VERSION |
The names in the square brackets represent the Skript Type the registry represents.
Some registries might not be fully supported by Skript yet.
The names are auto generated based on the key for the registry and may change anytime.
Examples:
Patterns: |
|
Since: | 2.4 |
Examples:
Patterns: |
|
Since: | 2.3 |
Examples:
Patterns: |
|
Since: | 2.4 |
Examples:
Patterns: |
|
Since: | 2.3 |
Examples:
Patterns: |
|
Since: | INSERT VERSION |
Requirements: | Minecraft 1.21+ |
See McWiki Tag for more information on tags.
Examples:
Patterns: |
|
Since: | 2.2-dev35 |
Examples:
Patterns: |
|
Since: | 1.0 |
Because scripts are also text, you have to put text into double quotes to tell Skript which part of the line is an effect/expression and which part is the text.
Please read the article on Texts and Variable Names to learn more.
Examples:
message "Hello %player%"
message "The id of ""%type of tool%"" is %id of tool%."
Patterns: |
|
Since: | 1.0 |
This type might be removed in the future as you can use 'time of world is between x and y' as a replacement.
Examples:
Patterns: |
|
Since: | 1.0, 2.6.1 (weeks, months, years) |
NOTE: Months always have the value of 30 days, and years of 365 days.
See date and time for the other time types of Skript.
Examples:
wait a minecraft second and 5 ticks
every 10 mc days and 12 hours:
halt for 12.7 irl minutes, 12 hours and 120.5 seconds
Patterns: |
|
Since: | 2.8.0 |
Examples:
Patterns: |
|
Since: | 3.0.0 |
Examples:
Patterns: |
|
Since: | 2.0 |
This is mostly used for expressions like 'event-<type>', '<type>-argument', 'loop-<type>', etc., e.g. event-world, number-argument and loop-player.
Examples:
{variable} is a type # check whether the variable contains a type, e.g. number or player
{variable} is an object # will always succeed if the variable is set as everything is an object, even types.
disable PvP in the event-world
kill the loop-entity
Patterns: |
|
Since: | INSERT VERSION |
Examples:
Patterns: |
|
Since: | 2.2-dev23 |
Examples:
Patterns: |
|
Since: | 1.0 |
Examples:
is sunny in the player's world
message "It is %weather in the argument's world% in %world of the argument%"
Patterns: |
|
Since: | 1.0, 2.2 (alternate syntax) |
Examples:
Patterns: |
|
Since: | 2.7 |
Examples:
Patterns: |
|
Since: | 2.2 |
Return Type: | Number |
Examples:
abs(-2) = 2
Patterns: |
|
Since: | 2.2 |
Return Type: | Number |
Examples:
atan2(10, 0) = 90
atan2(-10, 5) = -63.4349
Patterns: |
|
Since: | 2.2-dev32 |
Return Type: | long |
Examples:
Patterns: |
|
Since: | 2.5 |
Return Type: | Boolean |
Examples:
caseEquals("text", "text", "text") = true
caseEquals({some list variable::*})
Patterns: |
|
Since: | 2.2 |
Return Type: | long |
Examples:
ceil(2) = 2
ceil(2.99) = 3
Patterns: |
|
Since: | 2.8.0 |
Return Type: | Number |
Examples:
clamp(5.5, 0, 5) = 5
clamp(0.25, 0, 0.5) = 0.25
clamp(5, 7, 10) = 7
clamp((5, 0, 10, 9, 13), 7, 10) = (7, 7, 10, 9, 10)
set {_clamped::*} to clamp({_values::*}, 0, 10)
Patterns: |
|
Since: | 2.9.0 |
Return Type: | Text |
Examples:
concat("foo ", 100, " bar") # foo 100 bar
Patterns: |
|
Since: | 2.2 |
Return Type: | Date |
Examples:
date(1990, 3, 5, 14, 30) # 14:30, 5th May 1990
date(1999, 12, 31, 23, 59, 59, 999, -3*60, 0) # almost year 2000 in parts of Brazil (-3 hours offset, no DST)
Patterns: |
|
Since: | INSERT VERSION |
Return Type: | dustoption |
Examples:
set {_c} to dustOption(rgb(1, 255, 1), 3)
Patterns: |
|
Since: | INSERT VERSION |
Return Type: | dusttransition |
Examples:
set {_d} to dustTransition(blue, rgb(1,1,1), 5)
Patterns: |
|
Since: | 3.0.0 |
Return Type: | Enchantment Offer |
Examples:
set enchantment offer 1 to enchantmentOffer(sharpness, 5, 10)
set enchantment offer 2 to enchantmentOffer(unbreaking, 1)
set enchantment offer 3 to enchantmentOffer(custom:fancy_enchantment, 2, 2)
Patterns: |
|
Since: | 2.2 |
Return Type: | Number |
Examples:
exp(1) = 2.7183
Patterns: |
|
Since: | 2.2 |
Return Type: | long |
Examples:
floor(2) = 2
floor(2.99) = 2
Patterns: |
|
Since: | 2.8.0 |
Return Type: | Boolean |
Examples:
isNaN(0/0) # true
isNaN(sqrt(-1)) # true
Patterns: |
|
Since: | 2.2 |
Return Type: | Number |
Examples:
ln(exp(5)) = 5
ln(2) = 0.6931
Patterns: |
|
Since: | 2.2 |
Return Type: | Location |
Examples:
teleport player to location(1,1,1, world "world")
teleport player to location(1,1,1, world "world", 100, 0)
teleport player to location(1,1,1, world "world", yaw of player, pitch of player)
teleport player to location(1,1,1, world of player)
teleport player to location(1,1,1, world("world"))
teleport player to location({_x}, {_y}, {_z}, {_w}, {_yaw}, {_pitch})
# SETTING BLOCKS
set block at location(1,1,1, world "world") to stone
set block at location(1,1,1, world "world", 100, 0) to stone
set block at location(1,1,1, world of player) to stone
set block at location(1,1,1, world("world")) to stone
set block at location({_x}, {_y}, {_z}, {_w}) to stone
# USING VARIABLES
set {_l1} to location(1,1,1)
set {_l2} to location(10,10,10)
set blocks within {_l1} and {_l2} to stone
if player is within {_l1} and {_l2}:
# OTHER
kill all entities in radius 50 around location(1,65,1, world "world")
delete all entities in radius 25 around location(50,50,50, world "world_nether")
ignite all entities in radius 25 around location(1,1,1, world of player)
Patterns: |
|
Since: | 2.2 |
Return Type: | Number |
log(base ^ exponent, base) = exponent
for any positive number 'base' and any number 'exponent'. Another useful equation is base ^ log(a, base) = a
for any numbers 'base' and 'a'. Please note that due to how numbers are represented in computers, these equations do not hold for all numbers, as the computed values may slightly differ from the correct value. Returns NaN (not a number) if any of the arguments are negative. Examples:
log(16, 2) = 4 # 2^4 = 16
Patterns: |
|
Since: | 2.2 |
Return Type: | Number |
Examples:
max(1, 2, 3, 4) = 4
max({some list variable::*})
Patterns: |
|
Since: | 2.2 |
Return Type: | Number |
Examples:
min(1, 2, 3, 4) = 1
min({some list variable::*})
Patterns: |
|
Since: | 2.2 |
Return Type: | Number |
d/m
, where d and m are the arguments of this function. The returned value is always positive. Returns NaN (not a number) if the second argument is zero. Examples:
mod(256436, 100) = 36
mod(-1, 10) = 9
Patterns: |
|
Since: | 2.8.0, 2.9.0 (prevent lookups) |
Return Type: | Offline Player |
Examples:
set {_p} to offlineplayer("069a79f4-44e9-4726-a5be-fca90e38aaf5")
set {_p} to offlineplayer("Notch", false)
Patterns: |
|
Since: | 2.8.0 |
Return Type: | Player |
Examples:
set {_p} to player("Notch", true) # will return the only online player whose name is 'Notch'
set {_p} to player("069a79f4-44e9-4726-a5be-fca90e38aaf5") # &amp;amp;lt;none&amp;amp;gt; if player is offline
Patterns: |
|
Since: | 2.2 |
Return Type: | Number |
Examples:
product(2, 3, 4) = 24
product({some list variable::*})
product(2, {_v::*}, and the player's y-coordinate)
Patterns: |
|
Since: | 2.5 |
Return Type: | Color |
Examples:
Patterns: |
|
Since: | 2.2, 2.7 (decimal placement) |
Return Type: | Number |
Examples:
round(2) = 2
round(2.99) = 3
round(2.5) = 3
Patterns: |
|
Since: | 2.2 |
Return Type: | Number |
Examples:
sin(60) = 0.866
Patterns: |
|
Since: | 2.2 |
Return Type: | Number |
(argument) ^ (1/2)
– other roots can be calculated via number ^ (1/root)
, e.g. set {_l} to {_volume}^(1/3)
. Returns NaN (not a number) if the argument is negative. Examples:
sqrt(2) = 1.4142
sqrt(-1) = NaN
Patterns: |
|
Since: | 2.2 |
Return Type: | Number |
Examples:
sum(2, 3, 4) = 9
sum({some list variable::*})
sum(2, {_v::*}, and the player's y-coordinate)
Patterns: |
|
Since: | INSERT VERSION |
Return Type: | trail |
Examples:
make 10 of trail using {_trail} at location of player
Patterns: |
|
Since: | 2.2-dev23 |
Return Type: | Vector |
Examples:
Patterns: |
|
Since: | INSERT VERSION |
Return Type: | vibration |
Examples: