Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gamingoninsulin/41572718a10d6f54a140109b824ece89 to your computer and use it in GitHub Desktop.
Save gamingoninsulin/41572718a10d6f54a140109b824ece89 to your computer and use it in GitHub Desktop.

Skriptversion 2.10.1 Documentation

Aliases

Type: Structure

Patterns: * aliases

Used for registering custom aliases for a script.

Examples

aliases:    blacklisted items = TNT, bedrock, obsidian, mob spawner, lava, lava bucket    shiny swords = golden sword, iron sword, diamond sword

Command

Type: Structure

Patterns: * command <.+>

Used for registering custom commands.

Examples

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

Function

Type: Structure

Patterns: * [local] function <.+>

Functions are structures that can be executed with arguments/parameters to run code.They can also return a value to the trigger that is executing the function.Note that local functions come before global functions execution

Examples

function sayMessage(message: text):    broadcast {_message} # our message argument is available in '{_message}'local function giveApple(amount: number) :: item:    return {_amount} of applefunction getPoints(p: player) returns number:    return {points::%{_p}%}

Options

Type: Structure

Patterns: * options

Options are used for replacing parts of a script with something else.For example, an option may represent a message that appears in multiple locations.Take a look at the example below that showcases this.

Examples

options:    no_permission: You're missing the required permission to execute this command!command /ping:    permission: command.ping    permission message: {@no_permission}    trigger:        message "Pong!"command /pong:    permission: command.pong    permission message: {@no_permission}    trigger:        message "Ping!"

Using Experimental Feature

Type: Structure

Patterns: * using <.+>

Place at the top of a script file to enable an optional experimental feature.For example, this might include

Examples

using 1.21using my-cool-addon-feature

Variables

Type: Structure

Patterns: * variables

Used for defining variables present within a script.This section is not required, but it ensures that a variable has a value if it doesn't exist when the script is loaded.

Examples

variables:    {joins} = 0    {balance::%player%} = 0on join:    add 1 to {joins}    message "Your balance is %{balance::%player%}%"

Absorbed blocks

Type: Expression

Patterns: * [the] absorbed blocks

The blocks absorbed by a sponge block.

Examples

the absorbed blocks

Active Item

Type: Expression

Patterns: * [the] (raised|active) (tool|item|weapon) of %living entities%

  • %living entities%'[s] (raised|active) (tool|item|weapon)

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

Examples

on damage of player:    if victim's active tool is a bow:        interrupt player's active item use

Active Item Use Time

Type: Expression

Patterns: * [the] [elapsed|remaining] (item|tool) us[ag]e time of %living entities%

  • %living entities%'[s] [elapsed|remaining] (item|tool) us[ag]e time

Returns the time that the entities have either spent using an item, or the time left for them to finish using an item.If an entity is not using any item, this will return 0 seconds.

Examples

on right click:    broadcast player's remaining item use time    wait 1 second    broadcast player's item use time

Affected Entities

Type: Expression

Patterns: * [the] affected entities

The affected entities in the area cloud effect event.

Examples

on area cloud effect:    loop affected entities:        if loop-value is a player:            send "WARNING: you've step on an area effect cloud!" to loop-value

Age of Block/Entity

Type: Expression

Patterns: * [the] [max[imum]] age of %blocks/entities%

  • %blocks/entities%'[s] [max[imum]] age

Returns the age or maximum age of blocks and age for entities (there in no maximum age for entities).For blocks, 'Age' represents the different growth stages that a crop-like block can go through. A value of 0 indicates that the crop was freshly planted, whilst a value equal to 'maximum age' indicates that the crop is ripe and ready to be harvested.For entities, 'Age' represents the time left for them to become adults and it's in minus increasing to be 0 which means they're adults, e.g. A baby cow needs 20 minutes to become an adult which equals to 24,000 ticks so their age will be -24000 once spawned.

Examples

# Set targeted crop to fully grown cropset age of targeted block to maximum age of targeted block # Spawn a baby cow that will only need 1 minute to become an adultspawn a baby cow at playerset age of last spawned entity to -1200 # in ticks = 60 seconds

All Banned Players/IPs

Type: Expression

Patterns: * [all [[of] the]|the] banned (players|(ips|ip addresses))

Obtains the list of all banned players or IP addresses.

Examples

command /banlist:    trigger:        send all the banned players

All Groups

Type: Expression

Patterns: * all groups

All the groups a player can have. This expression requires Vault and a compatible permissions plugin to be installed.

Examples

command /group &lt;text&gt;:    trigger:        if argument is "list":            send "%all groups%"

All Operators

Type: Expression

Patterns: * [all [[of] the]|the] [server] [non(-| )]op[erator]s

The list of operators on the server.

Examples

set {_ops::*} to all operators

All Permissions

Type: Expression

Patterns: * [(all [[of] the]|the)] permissions (from|of) %players%

  • [(all [[of] the]|the)] %players%'[s] permissions

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

Examples

set {_permissions::*} to all permissions of the player

All Scripts

Type: Expression

Patterns: * [all [of the]|the] scripts [without ([subdirectory] paths|parents)]

  • [all [of the]|the] (enabled|loaded) scripts [without ([subdirectory] paths|parents)]
  • [all [of the]|the] (disabled|unloaded) scripts [without ([subdirectory] paths|parents)]

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

Examples

command /scripts:    trigger:        send "All Scripts: %scripts%" to player        send "Loaded Scripts: %enabled scripts%" to player        send "Unloaded Scripts: %disabled scripts%" to player

All Scripts (Experimental)

Type: Expression

Patterns: * [all [[of] the]|the] scripts

  • [all [[of] the]|the] (enabled|loaded) scripts
  • [all [[of] the]|the] (disabled|unloaded) scripts

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

Examples

command /scripts:    trigger:        send "All Scripts: %scripts%" to player        send "Loaded Scripts: %enabled scripts%" to player        send "Unloaded Scripts: %disabled scripts%" to player

All Tags of a Type

Type: Expression

Patterns: * [all [[of] the]|the] [minecraft|datapack|paper|custom] [item|block|entity [type]] tags

Returns all the tags.minecraft tag will return only the vanilla tags, datapack tag will return only datapack-provided tags, paper tag will return only Paper's custom tags (if you are running Paper), and custom tag will look in the "skript" namespace for custom tags you've registered.You can also filter by tag types using "item", "block", or "entity".

Examples

broadcast minecraft tagssend paper entity tagsbroadcast all block tags

All commands

Type: Expression

Patterns: * [(all|the|all [of] the)] [registered] [script] commands

Returns all registered commands or all script commands.

Examples

send "Number of all commands: %size of all commands%"send "Number of all script commands: %size of all script commands%"

Alpha/Red/Green/Blue Color Value

Type: Expression

Patterns: * [the] (alpha|red|green|blue) (value|component) of %colors%

  • %colors%'[s] (alpha|red|green|blue) (value|component)

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

Examples

broadcast red value of rgb(100, 0, 50) # sends '100'set {_red} to red's red value + 10

Alphabetical Sort

Type: Expression

Patterns: * alphabetically sorted %texts%

Sorts given strings in alphabetical order.

Examples

set {_list::*} to alphabetically sorted {_strings::*}

Altitude

Type: Expression

Patterns: * [the] altitude[s] of %locations%

  • %locations%'[s] altitude[s]

Effectively an alias of 'y-coordinate of …', it represents the height of some object above bedrock.

Examples

on damage:    altitude of the attacker is higher than the altitude of the victim    set damage to damage * 1.2

Amount

Type: Expression

Patterns: * [the] (amount|number|size) of %numbered thing%

  • [the] (amount|number|size) of %objects%
  • [the] recursive (amount|number|size) of %objects%

The amount or size of something.Please note that amount of %items% will not return the number of items, but the number of stacks, e.g. 1 for a stack of 64 torches. To get the amount of items in a stack, see the item amount expression.Also, you can get the recursive size of a list, which will return the recursive size of the list with sublists included, e.g.{list::} Structure ├──── {list::1}: 1 ├──── {list::2}: 2 │ ├──── {list::2::1}: 3 │ │ └──── {list::2::1::1}: 4 │ └──── {list::2::2}: 5 └──── {list::3}: 6Where using %size of {list::}% will only return 3 (the first layer of indices only), while %recursive size of {list::*}% will return 6 (the entire list)Please note that getting a list's recursive size can cause lag if the list is large, so only use this expression if you need to!

Examples

message "There are %number of all players% players online!"

Amount of Items

Type: Expression

Patterns: * [the] (amount|number) of %item types% (in|of) %inventories%

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

Examples

message "You have %number of ores in the player's inventory% ores in your inventory."

Angle

Type: Expression

Patterns: * %number% [in] deg[ree][s]

  • %number% [in] rad[ian][s]
  • %numbers% in deg[ree][s]
  • %numbers% in rad[ian][s]

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

Examples

set {_angle} to 90 degrees{_angle} is 90 # true180 degrees is pi # truepi radians is 180 degrees # true

Anvil Repair Cost

Type: Expression

Patterns: * [the] [anvil] [item] [max[imum]] repair cost [of %inventories%]

  • %inventories%'[s] [anvil] [item] [max[imum]] repair cost

Returns the experience cost (in levels) to complete the current repair or the maximum experience cost (in levels) to be allowed by the current repair.The default value of max cost set by vanilla Minecraft is 40.

Examples

on inventory click:    if {AnvilRepairSaleActive} = true:        wait a tick # recommended, to avoid client bugs        set anvil repair cost to anvil repair cost * 50%        send "Anvil repair sale is ON!" to playeron inventory click:    player have permission "anvil.repair.max.bypass"    set max repair cost of event-inventory to 99999

Anvil Text Input

Type: Expression

Patterns: * [the] anvil [inventory] (rename|text) input of %inventories%

  • %inventories%'[s] anvil [inventory] (rename|text) input

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

Examples

on inventory click:    type of event-inventory is anvil inventory    if the anvil text input of the event-inventory is "FREE OP":        ban player

Applied Beacon Effect

Type: Expression

Patterns: * [the] applied [beacon] effect

The type of effect applied by a beacon.

Examples

on beacon effect:    if the applied effect is primary beacon effect:        broadcast "Is Primary"    else if applied effect = secondary effect:        broadcast "Is Secondary"

Applied Enchantments

Type: Expression

Patterns: * [the] applied enchant[ment]s

The applied enchantments in an enchant event. Deleting or removing the applied enchantments will prevent the item's enchantment.

Examples

on enchant:    set the applied enchantments to sharpness 10 and fire aspect 5

Argument

Type: Expression

Patterns: * [the] last arg[ument]

  • [the] argument<(\d+)>
  • [the] <(\d1)st|(\d2)nd|(\d3)rd|(\d[4-90])th> arg[ument][s]
  • [(all [[of] the]|the)] arg[ument][s]
  • [the] %*type%( |-)arg[ument][( |-)<\d+>]
  • [the] argument%*type%[( |-)<\d+>]

Usable in script commands and command events. Holds the value of an argument given to the command, e.g. if the command "/tell " is used like "/tell Njol Hello Njol!" argument 1 is the player named "Njol" and argument 2 is "Hello Njol!".One can also use the type of the argument instead of its index to address the argument, e.g. in the above example 'player-argument' is the same as 'argument 1'.Please note that specifying the argument type is only supported in script commands.

Examples

give the item-argument to the player-argumentdamage the player-argument by the number-argumentgive a diamond pickaxe to the argumentadd argument 1 to argument 2heal the last argument

Arithmetic

Type: Expression

Patterns: * (%object%)[ ]+[ ](%object%)

  • (%object%)[ ]+[ ]%object%
  • %object%[ ]+[ ](%object%)
  • %object%[ ]+[ ]%object%
  • (%object%)[ ]-[ ](%object%)
  • (%object%)[ ]-[ ]%object%
  • %object%[ ]-[ ](%object%)
  • %object%[ ]-[ ]%object%
  • (%object%)[ ]*[ ](%object%)
  • (%object%)[ ]*[ ]%object%
  • %object%[ ]*[ ](%object%)
  • %object%[ ]*[ ]%object%
  • (%object%)[ ]/[ ](%object%)
  • (%object%)[ ]/[ ]%object%
  • %object%[ ]/[ ](%object%)
  • %object%[ ]/[ ]%object%
  • (%object%)[ ]^[ ](%object%)
  • (%object%)[ ]^[ ]%object%
  • %object%[ ]^[ ](%object%)
  • %object%[ ]^[ ]%object%

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

Examples

set the player's health to 10 - the player's healthloop (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!"

Armor Slot

Type: Expression

Patterns: * [the] (((boots|shoes)|leg[ging]s|chestplate[s]|helmet[s]) [(item|slot)]|armo[u]r[s]|body armo[u]r) of %living entities%

  • %living entities%'[s] (((boots|shoes)|leg[ging]s|chestplate[s]|helmet[s]) [(item|slot)]|armo[u]r[s]|body armo[u]r)

Equipment of living entities, i.e. the boots, leggings, chestplate or helmet.Body armor is a special slot that can only be used for:Horses: Horse armour (doesn't work on zombie or skeleton horses)Wolves: Wolf ArmorLlamas (regular or trader): Carpet

Examples

set chestplate of the player to a diamond chestplatehelmet of player is neither a helmet nor air # player is wearing a block, e.g. from another plugin

Arrow Attached Block

Type: Expression

Patterns: * [the] (attached|hit) block of %projectiles%

  • %projectiles%'[s] (attached|hit) block

Returns the attached block of an arrow.

Examples

set hit block of last shot arrow to diamond block

Arrow Knockback Strength

Type: Expression

Patterns: * [the] arrow knockback strength of %projectiles%

  • %projectiles%'[s] arrow knockback strength

An arrow's knockback strength.

Examples

on shoot:    event-projectile is an arrow    set arrow knockback strength of event-projectile to 10

Arrows Stuck

Type: Expression

Patterns: * [number of] arrow[s] stuck in %living entities%

The number of arrows stuck in a living entity.

Examples

set arrows stuck in player to 5

Attack Cooldown

Type: Expression

Patterns: * [the] attack cooldown of %players%

  • %players%'[s] attack cooldown

Returns the current cooldown for a player's attack. This is used to calculate damage, with 1.0 representing a fully charged attack and 0.0 representing a non-charged attack.NOTE: Currently this can not be set to anything.

Examples

on damage:    if attack cooldown of attacker < 1:        set damage to 0        send "Your hit was too weak! wait until your weapon is fully charged next time." to attacker

Attacked

Type: Expression

Patterns: * [the] (attacked|damaged|victim) [<(.+)>]

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

Examples

on damage:    victim is a creeper    damage the attacked by 1 heart

Attacker

Type: Expression

Patterns: * [the] (attacker|damager)

The attacker of a damage event, e.g. when a player attacks a zombie this expression represents the player.Please note that the attacker can also be a block, e.g. a cactus or lava, but this expression will not be set in these cases.

Examples

on damage:    attacker is a player    health of attacker is less than or equal to 2    damage victim by 1 heart

Banner Pattern

Type: Expression

Patterns: * [a] %banner pattern type% colo[u]red %color%

Creates a new banner pattern.

Examples

set {_pattern} to a creeper banner pattern colored redadd {_pattern} to banner patterns of {_banneritem}remove {_pattern} from banner patterns of {_banneritem}set the 1st banner pattern of block at location(0,0,0) to {_pattern}clear the 1st banner pattern of block at location(0,0,0)

Banner Pattern Item

Type: Expression

Patterns: * [a[n]] %*banner pattern types% item[s]

Gets the item from a banner pattern type.Note that not all banner pattern types have an item.

Examples

set {_item} to creeper charged banner pattern itemset {_item} to snout banner pattern itemset {_item} to thing banner pattern item

Banner Patterns

Type: Expression

Patterns: * [all [[of] the]|the] banner pattern[s] of %item stacks/item types/slots/blocks%

  • %item stacks/item types/slots/blocks%'[s] banner pattern[s]
  • [the] %integer%[st|nd|rd|th] [banner] pattern of %item stacks/item types/slots/blocks%
  • %item stacks/item types/slots/blocks%'[s] %integer%[st|nd|rd|th] [banner] pattern

Gets or sets the banner patterns of a banner.In order to set a specific position of a banner, there needs to be that many patterns already on the banner.This expression will add filler patterns to the banner to allow the specified position to be set.For Example, setting the 3rd banner pattern of a banner that has no patterns on it, will internally add 3 base patterns, allowing the 3rd banner pattern to be set.

Examples

broadcast banner patterns of {_banneritem}broadcast 1st banner pattern of block at location(0,0,0)clear banner patterns of {_banneritem}

Barter Drops

Type: Expression

Patterns: * [the] [piglin] barter[ing] drops

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

Examples

on piglin barter:    if the bartering drops contain a jack-o-lantern:        remove jack-o-lantern from bartering output        broadcast "it's not halloween yet!"

Barter Input

Type: Expression

Patterns: * [the] [piglin] barter[ing] input

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

Examples

on piglin barter:    if the bartering input is a gold ingot:        broadcast "my precious..."

Beacon Effects

Type: Expression

Patterns: * %blocks%['s] primary [beacon] effect

  • [the] primary [beacon] effect [of %blocks%]
  • %blocks%['s] secondary [beacon] effect
  • [the] secondary [beacon] effect [of %blocks%]
  • %blocks%['s] [beacon] range
  • [the] [beacon] range [of %blocks%]
  • %blocks%['s] [beacon] tier
  • [the] [beacon] tier [of %blocks%]

The active effects of a beacon.The secondary effect can be set to anything, but the icon in the GUI will not display correctly.The secondary effect can only be set when the beacon is at max tier.The primary and secondary effect can not be the same, primary will always retain the potion type and secondary will be cleared.You can only change the range on Paper.

Examples

broadcast tier of {_block}set primary beacon effect of {_block} to hasteadd 1 to range of {_block}

Bed

Type: Expression

Patterns: * [the] [((safe|valid)|(unsafe|invalid))] bed[s] [location[s]] of %offline players%

  • %offline players%'[s] [((safe|valid)|(unsafe|invalid))] bed[s] [location[s]]

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

Examples

if bed of player exists:    teleport player the the player's bedelse:    teleport the player to the world's spawn pointset the bed location of player to spawn location of world("world") # unsafe/invalid bed locationset the safe bed location of player to spawn location of world("world") # safe/valid bed location

Biome

Type: Expression

Patterns: * [the] biome [(of|%direction%) %locations%]

  • %locations%'[s] biome

The biome at a certain location. Please note that biomes are only defined for x/z-columns(i.e. the altitude (y-coordinate) doesn't matter), up until Minecraft 1.15.x.As of Minecraft 1.16, biomes are now 3D (per block vs column).

Examples

# damage player in deserts constantlyevery real minute:    loop all players:        biome at loop-player is desert        damage the loop-player by 1

Block

Type: Expression

Patterns: * [the] [event-]block

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

Examples

block is oreset block below to airspawn a creeper above the blockloop blocks in radius 4:    loop-block is obsidian    set loop-block to waterblock is a chest:    clear the inventory of the block

Block

Type: Expression

Patterns: * [the] block %direction% [%location%]

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

Examples

block is oreset block below to airspawn a creeper above the blockloop blocks in radius 4:    loop-block is obsidian    set loop-block to waterblock is a chest:    clear the inventory of the block

Block Break Speed

Type: Expression

Patterns: * [the] break speed[s] [of %blocks%] [for %players%]

  • %block%'[s] break speed[s] [for %players%]

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

Examples

on left click using diamond pickaxe:    event-block is set    send "Break Speed: %break speed for player%" to player

Block Data

Type: Expression

Patterns: * [the] block[ ]data of %blocks/displays%

  • %blocks/displays%'[s] block[ ]data

Get the block data associated with a block.This data can also be used to set blocks.

Examples

set {_data} to block data of target blockset block at player to {_data}set block data of target block to oak_stairs[facing=south;waterlogged=true]

Block Hardness

Type: Expression

Patterns: * [the] [block] hardness of %item types%

  • %item types%'[s] [block] hardness

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

Examples

set {_hard} to block hardness of target blockif block hardness of target block > 5:

Block Sound

Type: Expression

Patterns: * [the] (break|fall|hit|place|step) sound[s] of %blocks/block datas/item types%

  • %blocks/block datas/item types%'[s] (break|fall|hit|place|step) sound[s]

Gets the sound that a given block, blockdata, or itemtype will use in a specific scenario.This will return a string in the form of "SOUND_EXAMPLE", which can be used in the play sound syntax.Check out this website for a list of sounds in Minecraft, or this one to go to the Sounds wiki page.

Examples

play sound (break sound of dirt) at all playersset {_sounds::*} to place sounds of dirt, grass block, blue wool and stone

Block Sphere

Type: Expression

Patterns: * [(all [[of] the]|the)] blocks in radius %number% [(of|around) %location%]

  • [(all [[of] the]|the)] blocks around %location% in radius %number%

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

Examples

loop blocks in radius 5 around the player:    set loop-block to air

Blocks

Type: Expression

Patterns: * [(all [[of] the]|the)] blocks %direction% [%locations%]

  • [(all [[of] the]|the)] blocks from %location% [on] %direction%
  • [(all [[of] the]|the)] blocks from %location% to %location%
  • [(all [[of] the]|the)] blocks between %location% and %location%
  • [(all [[of] the]|the)] blocks within %location% and %location%
  • [(all [[of] the]|the)] blocks (in|within) %chunk%

Blocks relative to other blocks or between other blocks. Can be used to get blocks relative to other blocks or for looping.Blocks from/to and between will return a straight line whereas blocks within will return a cuboid.

Examples

loop blocks above the player:loop blocks between the block below the player and the targeted block:set the blocks below the player, the victim and the targeted block to airset all blocks within {loc1} and {loc2} to stoneset all blocks within chunk at player to air

Blocks in Region

Type: Expression

Patterns: * [(all|the)] blocks (in|of) [[the] region[s]] %regions%

All blocks in a region.This expression requires a supported regions plugin to be installed.

Examples

loop all blocks in the region {arena.%{faction.%player%}%}:    clear the loop-block

Book Author

Type: Expression

Patterns: * [the] [book] (author|writer|publisher) of %item types%

  • %item types%'[s] [book] (author|writer|publisher)

The author of a book.

Examples

on book sign:    message "Book Title: %author of event-item%"

Book Pages

Type: Expression

Patterns: * [all [[of] the]|the] [book] (pages|content) of %item types/item stacks%

  • %item types/item stacks%'[s] [book] (pages|content)
  • [book] page %number% of %item types/item stacks%
  • %item types/item stacks%'[s] [book] page %number%

The pages of a book (Supports Skript's chat format)Note: In order to modify the pages of a new written book, you must have the title and authorof the book set. Skript will do this for you, but if you want your own, please set those values.

Examples

on book sign:    message "Book Pages: %pages of event-item%"    message "Book Page 1: %page 1 of event-item%"set page 1 of player's held item to "Book writing"

Book Title

Type: Expression

Patterns: * [the] book (name|title) of %item types%

  • %item types%'[s] book (name|title)

The title of a book.

Examples

on book sign:    message "Book Title: %title of event-item%"

Breeding Family

Type: Expression

Patterns: * [the] breeding mother

  • [the] breeding father
  • [the] [bred] (offspring|child)
  • [the] breeder

Represents family members within a breeding event.

Examples

on breeding:    send "When a %breeding mother% and %breeding father% love each other very much, they make a %bred offspring%" to breeder

Case Text

Type: Expression

Patterns: * %texts% in (upper|lower)[ ]case

  • (upper|lower)[ ]case %texts%
  • capitali(s|z)ed %texts%
  • %texts% in (lenient|strict) [ ]case
  • (lenient|strict) [ ]case %texts%
  • %texts% in [(lenient|strict) ]camel[ ]case
  • [(lenient|strict) ]camel[ ]case %texts%
  • %texts% in [(lenient|strict) ]pascal[ ]case
  • [(lenient|strict) ]pascal[ ]case %texts%
  • %texts% in [(lower|upper|capital|screaming)[ ]]snake[ ]case
  • [(lower|upper|capital|screaming)[ ]]snake[ ]case %texts%
  • %texts% in [(lower|upper|capital)[ ]]kebab[ ]case
  • [(lower|upper|capital)[ ]]kebab[ ]case %texts%

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

Examples

"Oops!" in lowercase # oops!"oops!" in uppercase # OOPS!"hellO i'm steve!" in proper case # HellO I'm Steve!"hellO i'm steve!" in strict proper case # Hello I'm Steve!"spAwn neW boSs ()" in camel case # spAwnNeWBoSs()"spAwn neW boSs ()" in strict camel case # spawnNewBoss()"geneRate ranDom numBer ()" in pascal case # GeneRateRanDomNumBer()"geneRate ranDom numBer ()" in strict pascal case # GenerateRandomNumber()"Hello Player!" in snake case # Hello_Player!"Hello Player!" in lower snake case # hello_player!"Hello Player!" in upper snake case # HELLO_PLAYER!"What is your name?" in kebab case # What-is-your-name?"What is your name?" in lower kebab case # what-is-your-name?"What is your name?" in upper kebab case # WHAT-IS-YOUR-NAME?

Character Codepoint

Type: Expression

Patterns: * [the] [unicode|character] code([ ]point| position) of %texts%

  • %texts%'[s] [unicode|character] code([ ]point| position)

Returns the Unicode codepoint of a character

Examples

function is_in_order(letters: strings) :: boolean:    loop {_letters::*}:        set {_codepoint} to codepoint of lowercase loop-value        return false if {_codepoint} is not set # 'loop-value is not a single character'        if:            {_previous-codepoint} is set            # if the codepoint of the current character is not            # 1 more than the codepoint of the previous character            # then the letters are not in order            {_codepoint} - {_previous-codepoint} is not 1        then:            return false        set {_previous-codepoint} to {_codepoint}    return true

Character from Codepoint

Type: Expression

Patterns: * character (from|at|with) code([ ]point| position) %integer%

Returns the character at the specified codepoint

Examples

function chars_between(lower: string, upper: string) :: strings:    set {_lower} to codepoint of {_lower}    return {_none} if {_lower} is not set    set {_upper} to codepoint of {_upper}    return {_none} if {_upper} is not set    loop integers between {_lower} and {_upper}:        add character from codepoint loop-value to {_chars::*}    return {_chars::*}

Characters Between

Type: Expression

Patterns: * [(all [[of] the]|the)] [alphanumeric] characters (between|from) %text% (and|to) %text%

All characters between two given characters, useful for generating random strings. This expression uses the Unicode numerical code of a character to determine which characters are between the two given characters. The ASCII table linked here shows this ordering for the first 256 characters.If you would like only alphanumeric characters you can use the 'alphanumeric' option in the expression.If strings of more than one character are given, only the first character of each is used.

Examples

loop characters from "a" to "f":    broadcast "%loop-value%"# 0123456789:;<=>?@ABC... ...uvwxyzsend characters between "0" and "z"# 0123456789ABC... ...uvwxyzsend alphanumeric characters between "0" and "z"

Chat Format

Type: Expression

Patterns: * [the] (message|chat) format[ting]

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

Examples

set the chat format to "&lt;yellow&gt;[player]&lt;light gray&gt;: &lt;green&gt;[message]"

Chat Recipients

Type: Expression

Patterns: * [chat][( |-)]recipients

Recipients of chat events where this is called.

Examples

chat recipients

Chunk

Type: Expression

Patterns: * [(all [[of] the]|the)] chunk[s] (of|%directions%) %locations%

  • %locations%'[s] chunk[s]
  • [(all [[of] the]|the)] loaded chunks (of|in) %worlds%

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

Examples

add the chunk at the player to {protected chunks::*}set {_chunks::*} to the loaded chunks of the player's world

Clicked Block/Entity/Inventory/Slot

Type: Expression

Patterns: * [the] (clicked [enchant[ment]] (button|option)|clicked (block|%*item type/entity type%)|clicked slot|clicked inventory|click (type|action)|inventory action)

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

Examples

message "You clicked on a %type of clicked entity%!"if the clicked block is a chest:    show the inventory of the clicked block to the player

Color of

Type: Expression

Patterns: * [the] colo[u]r[s] of %blocks/item types/entities/firework effects/displays%

  • %blocks/item types/entities/firework effects/displays%'[s] colo[u]r[s]

The color of an item, entity, block, firework effect, or text display.This can also be used to color chat messages with "<%color of ...%>this text is colored!".Do note that firework effects support setting, adding, removing, resetting, and deleting; text displays support setting and resetting; and items, entities, and blocks only support setting, and only for very few items/blocks.

Examples

on click on wool:    message "This wool block is <%color of block%>%color of block%<reset>!"    set the color of the block to black

Colored / Uncolored

Type: Expression

Patterns: * (colo[u]r-|colo[u]red )%texts%

  • (format-|formatted )%texts%
  • (un|non)[-](colo[u]r-|colo[u]red |format-|formatted )%texts%

Parses s and, optionally, chat styles in a message or removesany colors and chat styles from the message. Parsing allchat styles requires this expression to be used in same line withthe send effect.

Examples

on chat:    set message to colored message # Safe; only colors get parsedcommand /fade &lt;player&gt;:    trigger:        set display name of the player-argument to uncolored display name of the player-argumentcommand /format &lt;text&gt;:    trigger:        message formatted text-argument # Safe, because we're sending to whoever used this command

Command

Type: Expression

Patterns: * [the] (full|complete|whole) command

  • [the] command [(label|alias)]

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

Examples

# prevent any commands except for the /exit command during some gameon command:    if {game::%player%::playing} is true:        if the command is not "exit":            message "You're not allowed to use commands during the game"            cancel the event

Command Block Command

Type: Expression

Patterns: * [the] [command[ ]block] command of %blocks/entities%

  • %blocks/entities%'[s] [command[ ]block] command

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

Examples

send command of {_block}set command of {_cmdMinecart} to "say asdf"

Command Info

Type: Expression

Patterns: * [the] main command [label|name] [of [[the] command[s] %texts%]]

  • command[s] %texts%'[s] main command [label|name]
  • [the] description [of [[the] command[s] %texts%]]
  • command[s] %texts%'[s] description
  • [the] label [of [[the] command[s] %texts%]]
  • command[s] %texts%'[s] label
  • [the] usage [of [[the] command[s] %texts%]]
  • command[s] %texts%'[s] usage
  • [(all|the|all [of] the)] aliases [of [[the] command[s] %texts%]]
  • command[s] %texts%'[s] aliases
  • [the] permission [of [[the] command[s] %texts%]]
  • command[s] %texts%'[s] permission
  • [the] permission message [of [[the] command[s] %texts%]]
  • command[s] %texts%'[s] permission message
  • [the] plugin [owner] [of [[the] command[s] %texts%]]
  • command[s] %texts%'[s] plugin [owner]

Get information about a command.

Examples

main command label of command "skript"description of command "help"label of command "pl"usage of command "help"aliases of command "bukkit:help"permission of command "/op"command "op"'s permission messagecommand "sk"'s plugin ownercommand /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%!"

Command Sender

Type: Expression

Patterns: * [the] [command['s]] (sender|executor)

The player or the console who sent a command. Mostly useful in commands and command events.If the command sender is a command block, its location can be retrieved by using %block's location%

Examples

make the command sender execute "/say hi!"on command:    log "%executor% used command /%command% %arguments%" to "commands.log"

Compass Target

Type: Expression

Patterns: * [the] compass target of %players%

  • %players%'[s] compass target

The location a player's compass is pointing at.

Examples

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

Config (Experimental)

Type: Expression

Patterns: * [the] [skript] config

The Skript config.This can be reloaded, or navigated to retrieve options.

Examples

set {_node} to node "language" in the skript config if text value of {_node} is "french":     broadcast "Bonjour!"

Console

Type: Expression

Patterns: * [the] (console|server)

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

Examples

execute console command "/stop"send "message to console" to the console

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

Type: Expression

Patterns: * [the] remaining [time] [of [the] (cooldown|wait) [(of|for) [the] [current] command]]

  • [the] elapsed [time] [of [the] (cooldown|wait) [(of|for) [the] [current] command]]
  • [the] ((cooldown|wait) time|[wait] time of [the] (cooldown|wait) [(of|for) [the] [current] command])
  • [the] last usage [date] [of [the] (cooldown|wait) [(of|for) [the] [current] command]]
  • [the] [cooldown] bypass perm[ission] [of [the] (cooldown|wait) [(of|for) [the] [current] command]]

Only usable in command events. Represents the cooldown time, the remaining time, the elapsed time,the last usage date, or the cooldown bypass permission.

Examples

command /home:    cooldown: 10 seconds    cooldown message: You last teleported home %elapsed time% ago, you may teleport home again in %remaining time%.    trigger:        teleport player to {home::%player%}

Coordinate

Type: Expression

Patterns: * [the] (x|y|z)(-| )(coord[inate]|pos[ition]|loc[ation])[s] of %locations%

  • %locations%'[s] (x|y|z)(-| )(coord[inate]|pos[ition]|loc[ation])[s]

Represents a given coordinate of a location.

Examples

player's y-coordinate is smaller than 40:    message "Watch out for lava!"

Create Loot Context

Type: Expression

Patterns: * [a] loot context %direction% %location%

Create a loot context.

Examples

set {_player} to playerset {_context} to a loot context at player:    set loot luck value to 10    set looter to {_player}    set looted entity to last spawned piggive player loot items of loot table "minecraft:entities/iron_golem" with loot context {_context}

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

Type: Expression

Patterns: * [the] [event-]<.+>

The entity involved in an event (an entity is a player, a creature or an inanimate object like ignited TNT, a dropped item or an arrow).You can use the specific type of the entity that's involved in the event, e.g. in a 'death of a creeper' event you can use 'the creeper' instead of 'the entity'.

Examples

give a diamond sword of sharpness 3 to the playerkill the creeperkill all powered creepers in the wolf's worldprojectile is an arrow

Cursor Slot

Type: Expression

Patterns: * [the] cursor slot of %players%

  • %players%'[s] cursor slot

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

Examples

cursor slot of player is dirtset cursor slot of player to 64 diamonds

Custom Chest Inventory

Type: Expression

Patterns: * [a] [new] chest inventory (named|with name) %text% [with %number% row[s]]

  • [a] [new] chest inventory with %number% row[s] [(named|with name) %text%]

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

Examples

open chest inventory with 1 row named "test" to playerset {_inventory} to a chest inventory with 1 rowset slot 4 of {_inventory} to a diamond named "example"open {_inventory} to playeropen chest inventory named "<#00ff00>hex coloured title!" with 6 rows to player

Custom Model Data

Type: Expression

Patterns: * [the] [custom] model data of %item types%

  • %item types%'[s] [custom] model data

Get/set the CustomModelData tag for an item. (Value is an integer between 0 and 99999999)

Examples

set custom model data of player's tool to 3set {_model} to custom model data of player's tool

Damage

Type: Expression

Patterns: * [the] damage

How much damage is done in a entity/vehicle/item damage events.For entity damage events, possibly ignoring armour, criticals and/or enchantments (remember that in Skript '1' is one full heart, not half a heart).For items, it's the amount of durability damage the item will be taking.

Examples

on item damage:    event-item is any tool    clear damage # unbreakable tools as the damage will be 0on damage:    increase the damage by 2

Damage Cause

Type: Expression

Patterns: * [the] damage (cause|type)

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

Examples

damage cause is lava, fire or burning

Damage Value/Durability

Type: Expression

Patterns: * [the] (damage[s] [value[s]]|durabilit(y|ies)) of %item types/item stacks/slots%

  • %item types/item stacks/slots%'[s] (damage[s] [value[s]]|durabilit(y|ies))

The damage value/durability of an item.

Examples

set damage value of player's tool to 10reset the durability of {_item}set durability of player's held item to 0

Damaged Item

Type: Expression

Patterns: * %item type% with (damage|data) [value] %number%

  • %item type% damaged by %number%

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

Examples

give player diamond sword with damage value 100set player's tool to diamond hoe damaged by 250give 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 1set target block of player to potato plant with data value 7

Date Ago/Later

Type: Expression

Patterns: * %time span% (ago|in the past|before [the] [date] %date%)

  • %time span% (later|(from|after) [the] [date] %date%)

A date the specified timespan before/after another date.

Examples

set {_yesterday} to 1 day agoset {_hourAfter} to 1 hour after {someOtherDate}set {_hoursBefore} to 5 hours before {someOtherDate}

De-queue Queue (Experimental)

Type: Expression

Patterns: * (de|un)queued %queue%

  • unrolled %queue%

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

Examples

set {queue} to a new queue add "hello" and "there" to {queue} set {list::*} to dequeued {queue}

Default Value

Type: Expression

Patterns: * %objects% (otherwise|?) %objects%

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

Examples

broadcast {score::%player's uuid%} otherwise "%player% has no score!"

Difference

Type: Expression

Patterns: * difference (between|of) %object% and %object%

The difference between two valuesSupported types include numbers, dates and times.

Examples

if difference between {command::%player%::lastuse} and now is smaller than a minute:    message "You have to wait a minute before using this command again!"

Difficulty

Type: Expression

Patterns: * [the] difficult(y|ies) of %worlds%

  • %worlds%'[s] difficult(y|ies)

The difficulty of a world.

Examples

set the difficulty of "world" to hard

Direction

Type: Expression

Patterns: * [%number% [(block|met(er|re))[s]] [to the]] (north[(-| )][(ward[(s|ly)]|er[(n|ly)])] [of]|south[(-| )][(ward[(s|ly)]|er[(n|ly)])] [of]|(east|west)[(ward[(s|ly)]|er[(n|ly)])] [of]|above|over|(up|down)[ward[(s|ly)]]|below|under[neath]|beneath) [%direction%]

  • [%number% [(block|met(er|re))[s]]] in [the] (direction|horizontal direction|facing|horizontal facing) of %entity/block% [(of|from)]
  • [%number% [(block|met(er|re))[s]]] in %entity/block%'[s] (direction|horizontal direction|facing|horizontal facing) [(of|from)]
  • [%number% [(block|met(er|re))[s]]] (in[ ]front [of]|forward[s]|behind|backwards|[to the] (right|left) [of])
  • [%number% [(block|met(er|re))[s]]] horizontal[ly] (in[ ]front [of]|forward[s]|behind|backwards|to the (right|left) [of])

A helper expression for the direction type.

Examples

thrust the player upwardsset the block behind the player to waterloop 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 stoneblock in horizontal facing of the clicked entity from the player is airspawn a creeper 1.5 meters horizontally behind the playerspawn a TNT 5 meters above and 2 meters horizontally behind the playerthrust the last spawned TNT in the horizontal direction of the player with speed 0.2push the player upwards and horizontally forward at speed 0.5push the clicked entity in in the direction of the player at speed -0.5open the inventory of the block 2 blocks below the player to the playerteleport the clicked entity behind the playergrow a regular tree 2 meters horizontally behind the player

Display Billboard

Type: Expression

Patterns: * [the] bill[ |-]board[ing] [setting] [of %displays%]

  • %displays%'[s] bill[ |-]board[ing] [setting]

Returns or changes the billboard setting of displays.This describes the axes/points around which the display can pivot.Displays spawn with the 'fixed' billboard by default. Resetting this expression will also set it to 'fixed'.

Examples

set billboard of the last spawned text display to center

Display Brightness

Type: Expression

Patterns: * [the] [block|sky] (light [level]|brightness) override[s] of %displays%

  • %displays%'[s] [block|sky] (light [level]|brightness) override[s]

Returns or changes the brightness override of displays.Unmodified displays will not have a brightness override value set. Resetting or deleting this value will remove the override.Use the 'block' or 'sky' options to get/change specific values or get both values as a list by using neither option.NOTE: setting only one of the sky/block light overrides of a display without an existing override will set both sky and block light to the given value. Make sure to set both block and sky levels to your desired values for the best results. Likewise, you can only clear the brightness override, you cannot clear/reset the sky/block values individually.

Examples

set sky light override of the last spawned text display to 7subtract 3 from the block light level override of the last spawned text displayif sky light level override of {_display} is 5:    clear brightness override of {_display}

Display Glow Color Override

Type: Expression

Patterns: * [the] glow[ing] colo[u]r[s] override[s] [of %displays%]

  • %displays%'[s] glow[ing] colo[u]r[s] override[s]

Returns or changes the glowing color override of displays.This overrides whatever color is already set for the scoreboard team of the displays.

Examples

set glow color override of the last spawned text display to blue

Display Height/Width

Type: Expression

Patterns: * [the] display (height|width) [of %displays%]

  • %displays%'[s] display (height|width)

Returns or changes the height or width of displays.The rendering culling bounding box spans horizontally width/2 from entity position, which determines the point at which the display will be frustum culled (no longer rendered because the game determines you are no longer able to see it).If set to 0, no culling will occur on both the vertical and horizontal directions. Default is 0.0.

Examples

set display height of the last spawned text display to 2.5

Display Interpolation Delay/Duration

Type: Expression

Patterns: * [the] interpolation (delay|duration)[s] [of %displays%]

  • %displays%'[s] interpolation (delay|duration)[s]

Returns or changes the interpolation delay/duration of displays.Interpolation duration is the amount of time a display will take to interpolate, or shift, between its current state and a new state.Interpolation delay is the amount of ticks before client-side interpolation will commence.Setting to 0 seconds will make it immediate.Resetting either value will return that value to 0.

Examples

set interpolation delay of the last spawned text display to 2 ticks

Display Shadow Radius/Strength

Type: Expression

Patterns: * [the] shadow (radius|strength) [of %displays%]

  • %displays%'[s] shadow (radius|strength)

Returns or changes the shadow radius/strength of displays.

Examples

set shadow radius of the last spawned text display to 1.75

Display Teleport Delay/Duration

Type: Expression

Patterns: * [the] teleport[ation] duration[s] [of %displays%]

  • %displays%'[s] teleport[ation] duration[s]

The teleport duration of displays is the amount of time it takes to get between locations.0 means that updates are applied immediately.1 means that the display entity will move from current position to the updated one over one tick.Higher values spread the movement over multiple ticks. Max of 59 ticks.

Examples

set teleport delay of the last spawned text display to 2 ticksteleport last spawned text display to {_location}wait 2 ticksmessage "display entity has arrived at %{_location}%"

Display Transformation Rotation

Type: Expression

Patterns: * [the] (left|right) [transformation] rotation [of %displays%]

  • %displays%'[s] (left|right) [transformation] rotation

Returns or changes the transformation rotation of displays.The left rotation is applied first, with the right rotation then being applied based on the rotated axis.

Examples

set left transformation rotation of last spawned block display to quaternion(1, 0, 0, 0) # reset block display

Display Transformation Scale/Translation

Type: Expression

Patterns: * [the] (display|[display] transformation) (scale|translation) of %displays%

  • %displays%'[s] (display|[display] transformation) (scale|translation)

Returns or changes the transformation scale or translation of displays.

Examples

set transformation translation of display to vector from -0.5, -0.5, -0.5 # Center the display in the same position as a block

Display View Range

Type: Expression

Patterns: * [the] [display] view (range|radius) [of %displays%]

  • %displays%'[s] [display] view (range|radius)

Returns or changes the view range of displays.Default value is 1.0. This value is then multiplied by 64 and the player's entity view distance setting to determine the actual range.For example, a player with 150% entity view distance will see a block display with a view range of 1.2 at 1.2 * 64 * 150% = 115.2 blocks away.

Examples

set view range of the last spawned text display to 2.9

Distance

Type: Expression

Patterns: * [the] distance between %location% and %location%

The distance between two points.

Examples

if the distance between the player and {home::%uuid of player%} is smaller than 20:    message "You're very close to your home!"

Drops

Type: Expression

Patterns: * [the] drops

Only works in death events. Holds the drops of the dying creature. Drops can be prevented by removing them with "remove ... from drops", e.g. "remove all pickaxes from the drops", or "clear drops" if you don't want any drops at all.

Examples

clear dropsremove 4 planks from the drops

Drops Of Block

Type: Expression

Patterns: * [(all|the|all [of] the)] drops of %blocks% [(using|with) %item type% [(as %entity%)]]

  • %blocks%'s drops [(using|with) %item type% [(as %entity%)]]

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

Examples

on break of block:    give drops of block using player's tool to player

Elements

Type: Expression

Patterns: * [the] (first|last) element [out] of %objects%

  • [the] (first|last) %integer% elements [out] of %objects%
  • [a] random element [out] of %objects%
  • [the] %integer%(st|nd|rd|th) [[to] last] element [out] of %objects%
  • [the] elements (from|between) %integer% (to|and) %integer% [out] of %objects%
  • [the] (first|next|last) element (of|in) %queue%
  • [the] (first|last) %integer% elements (of|in) %queue%
  • [a] random element (of|in) %queue%
  • [the] %integer%(st|nd|rd|th) [[to] last] element (of|in) %queue%
  • [the] elements (from|between) %integer% (to|and) %integer% (of|in) %queue%

The first, last, range or a random element of a set, e.g. a list variable, or a queue.Asking for elements from a queue will also remove them from the queue, see the new queue expression for more information.See also: random expression

Examples

broadcast the first 3 elements of {top players::*}set {_last} to last element of {top players::*}set {_random player} to random element out of all playerssend 2nd last element of {top players::*} to playerset {page2::*} to elements from 11 to 20 of {top players::*}broadcast the 1st element in {queue}broadcast the first 3 elements in {queue}

Enchant Item

Type: Expression

Patterns: * [the] enchant[ed] item

The enchant item in an enchant prepare event or enchant event.It can be modified, but enchantments will still be applied in the enchant event.

Examples

on enchant:    set the enchanted item to a diamond chestplateon enchant prepare:    set the enchant item to a wooden sword

Enchanting Experience Cost

Type: Expression

Patterns: * [the] [displayed] ([e]xp[erience]|enchanting) cost

The cost of enchanting in an enchant event.This is number that was displayed in the enchantment table, not the actual number of levels removed.

Examples

on enchant:    send "Cost: %the displayed enchanting cost%" to player

Enchantment Bonus

Type: Expression

Patterns: * [the] enchantment bonus

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

Examples

on enchant:    send "There are %enchantment bonus% bookshelves surrounding this enchantment table!" to player

Enchantment Level

Type: Expression

Patterns: * [the] [enchant[ment]] level[s] of %enchantments% (on|of) %item types%

  • [the] %enchantments% [enchant[ment]] level[s] (on|of) %item types%
  • %item types%'[s] %enchantments% [enchant[ment]] level[s]
  • %item types%'[s] [enchant[ment]] level[s] of %enchantments%

The level of a particular enchantment on an item.

Examples

player's tool is a sword of sharpness:    message "You have a sword of sharpness %level of sharpness of the player's tool% equipped"

Enchantment Offer

Type: Expression

Patterns: * [all [of]] [the] enchant[ment] offers

  • enchant[ment] offer[s] %numbers%
  • [the] %number%(st|nd|rd|th) enchant[ment] offer

The enchantment offer in enchant prepare events.

Examples

on enchant prepare:    send "Your enchantment offers are: %the enchantment offers%" to player

Enchantment Offer Cost

Type: Expression

Patterns: * [the] [enchant[ment]] cost of %enchantment offers%

  • %enchantment offers%'[s] [enchant[ment]] cost

The cost of an enchantment offer. This is displayed to the right of an enchantment offer.If the cost is changed, it will always be at least 1.This changes how many levels are required to enchant, but does not change the number of levels removed.To change the number of levels removed, use the enchant event.

Examples

set cost of enchantment offer 1 to 50

Ender Chest

Type: Expression

Patterns: * [the] ender[ ]chest[s] of %players%

  • %players%'[s] ender[ ]chest[s]

The ender chest of a player.

Examples

open the player's ender chest to the player

Entities

Type: Expression

Patterns: * [(all [[of] the]|the)] %*entity types% [(in|of) ([world[s]] %worlds%|%chunks%)]

  • [(all [[of] the]|the)] entities of type[s] %entity types% [(in|of) ([world[s]] %worlds%|%chunks%)]
  • [(all [[of] the]|the)] %*entity types% (within|[with]in radius) %number% [(block[s]|met(er|re)[s])] (of|around) %location%
  • [(all [[of] the]|the)] entities of type[s] %entity types% in radius %number% (of|around) %location%
  • [(all [[of] the]|the)] %*entity types% within %location% and %location%
  • [(all [[of] the]|the)] entities of type[s] %entity types% within %location% and %location%

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

Examples

kill all creepers in the player's worldsend "Psst!" to all players within 100 meters of the playergive a diamond to all opsheal all tamed wolves in radius 2000 around {town center}delete all monsters in chunk at playersize of all players within {_corner::1} and {_corner::2}}

Entity AI

Type: Expression

Patterns: * [the] (ai|artificial intelligence) of %living entities%

  • %living entities%'[s] (ai|artificial intelligence)

Returns whether an entity has AI.

Examples

set artificial intelligence of target entity to false

Entity Attribute

Type: Expression

Patterns: * [the] %attribute type% [((total|final|modified))] attribute [value] of %entities%

  • %entities%'[s] %attribute type% [((total|final|modified))] attribute [value]

The numerical value of an entity's particular attribute.Note that the movement speed attribute cannot be reliably used for players. For that purpose, use the speed expression instead.Resetting an entity's attribute is only available in Minecraft 1.11 and above.

Examples

on damage of player:    send "You are wounded!" to victim    set victim's attack speed attribute to 2

Entity Fire Burn Duration

Type: Expression

Patterns: * [the] [max[imum]] (burn[ing]|fire) (time|duration) of %entities%

  • %entities%'[s] [max[imum]] (burn[ing]|fire) (time|duration)

How much time an entity will be burning for.

Examples

send "You will stop burning in %fire time of player%"send the max burn time of target

Entity Owner

Type: Expression

Patterns: * [the] (owner|tamer) of %living entities%

  • %living entities%'[s] (owner|tamer)

The owner of a tameable entity, such as a horse or wolf.

Examples

set owner of target entity to playerdelete owner of target entityset {_t} to uuid of tamer of target entity

Entity Snapshot

Type: Expression

Patterns: * [the] entity snapshot of %entities/entity types%

  • %entities/entity types%'[s] entity snapshot

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

Examples

spawn a pig at location(0, 0, 0):    set the max health of entity to 20    set the health of entity to 20    set {_snapshot} to the entity snapshot of entity    clear entityspawn {_snapshot} at location(0, 0, 0)

Entity Sound

Type: Expression

Patterns: * [the] (damage|hurt) sound[s] of %living entities%

  • %living entities%'[s] (damage|hurt) sound[s]
  • [the] death sound[s] of %living entities%
  • %living entities%'[s] death sound[s]
  • [the] [(tall|high)|(low|normal)] fall damage sound[s] [from [[a] height [of]] %number%] of %living entities%
  • %living entities%'[s] [(tall|high)|(low|normal)] fall [damage] sound[s] [from [[a] height [of]] %number%]
  • [the] swim[ming] sound[s] of %living entities%
  • %living entities%'[s] swim[ming] sound[s]
  • [the] [(fast|speedy)] splash sound[s] of %living entities%
  • %living entities%'[s] [(fast|speedy)] splash sound[s]
  • [the] eat[ing] sound[s] of %living entities% [(with|using|[while] eating [a]) %item type%]
  • %living entities%'[s] eat[ing] sound[s]
  • [the] drink[ing] sound[s] of %living entities% [(with|using|[while] drinking [a]) %item type%]
  • %living entities%'[s] drink[ing] sound[s]
  • [the] ambient sound[s] of %living entities%
  • %living entities%'[s] ambient sound[s]

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

Examples

play sound (hurt sound of player) at playerset {_sounds::*} to death sounds of (all mobs in radius 10 of player)

Exhaustion

Type: Expression

Patterns: * [the] exhaustion of %players%

  • %players%'[s] exhaustion

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

Examples

set exhaustion of all players to 1

Experience

Type: Expression

Patterns: * [the] [(spawned|dropped)] [e]xp[erience] [orb[s]]

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

Examples

on experience spawn:    add 5 to the spawned experienceon break of coal ore:    clear dropped experienceon break of diamond ore:    if tool of player = diamond pickaxe:        add 100 to dropped experienceon breed:    breeding father is a cow    set dropped experience to 10on fish catch:    add 70 to dropped experience

Experience Cooldown Change Reason

Type: Expression

Patterns: * [the] (experience|[e]xp) cooldown change (reason|cause|type)

The experience change reason within an experience cooldown change event.

Examples

on player experience cooldown change:    if xp cooldown change reason is plugin:        #Changed by a plugin    else if xp cooldown change reason is orb pickup:        #Changed by picking up xp orb

Experience Pickup Cooldown

Type: Expression

Patterns: * [the] (experience|[e]xp) [pickup|collection] cooldown of %players%

  • %players%'[s] (experience|[e]xp) [pickup|collection] cooldown

The experience cooldown of a player.Experience cooldown is how long until a player can pick up another orb of experience.The cooldown of a player must be 0 to pick up another orb of experience.

Examples

send experience cooldown of playerset the xp pickup cooldown of player to 1 hourif exp collection cooldown of player >= 10 minutes:    clear the experience pickup cooldown of player

Exploded Blocks

Type: Expression

Patterns: * [the] exploded blocks

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

Examples

on explode:    loop exploded blocks:        add loop-block to {exploded::blocks::*}on explode:    loop exploded blocks:        if loop-block is grass:            remove loop-block from exploded blockson explode:    clear exploded blockson explode:    set exploded blocks to blocks in radius 10 around event-entityon explode:    add blocks above event-entity to exploded blocks

Explosion Block Yield

Type: Expression

Patterns: * [the] [explosion['s]] block (yield|amount)

  • [the] percentage of blocks dropped

The percentage of exploded blocks dropped in an explosion event.When changing the yield, a value greater than 1 will function the same as using 1.Attempting to change the yield to a value less than 0 will have no effect.

Examples

on explode:set the explosion's block yield to 10%

Explosion Yield

Type: Expression

Patterns: * [the] explosion (yield|radius|size)

  • [the] (yield|radius|size) of [the] explosion

The yield of the explosion in an explosion prime event. This is how big the explosion is. When changing the yield, values less than 0 will be ignored. Read this wiki page for more information

Examples

on explosion prime:    set the yield of the explosion to 10

Explosive Yield

Type: Expression

Patterns: * [the] explosive (yield|radius|size) of %entities%

  • %entities%'[s] explosive (yield|radius|size)

The yield of an explosive (creeper, primed tnt, fireball, etc.). This is how big of an explosion is caused by the entity.Read this wiki page for more information

Examples

on spawn of a creeper:    set the explosive yield of the event-entity to 10

Facing

Type: Expression

Patterns: * [the] [(horizontal)] facing of %living entities/blocks%

  • %living entities/blocks%'[s] [(horizontal)] facing

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

Examples

# makes a bridgeloop blocks from the block below the player in the horizontal facing of the player:    set loop-block to cobblestone

Fall Distance

Type: Expression

Patterns: * [the] fall[en] (distance|height) of %entities%

  • %entities%'[s] fall[en] (distance|height)

The distance an entity has fallen for.

Examples

set all entities' fall distance to 10on damage:    send "%victim's fall distance%" to victim

Fertilized Blocks

Type: Expression

Patterns: * [all] [the] fertilized blocks

The blocks fertilized in block fertilize events.

Examples

the fertilized blocks

Filter

Type: Expression

Patterns: * %objects% (where|that match) [<.+>]

  • %objects% (where|that match) (<.+>)

Filters a list based on a condition. For example, if you ran 'broadcast "something" and "something else" where [string input is "something"]', only "something" would be broadcast as it is the only string that matched the condition.

Examples

send "congrats on being staff!" to all players where [player input has permission "staff"]loop (all blocks in radius 5 of player) where [block input is not air]:

Final Damage

Type: Expression

Patterns: * [the] final damage

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

Examples

send "%final damage%" to victim

Firework Effect

Type: Expression

Patterns: * [(flickering|trailing|flickering trailing|trailing flickering)] %firework type% [firework [effect]] colo[u]red %colors%

  • [(flickering|trailing|flickering trailing|trailing flickering)] %firework type% [firework [effect]] colo[u]red %colors% fad(e|ing) [to] %colors%

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

Examples

launch flickering trailing burst firework colored blue and green at playerlaunch trailing flickering star colored purple, yellow, blue, green and red fading to pink at target entitylaunch ball large colored red, purple and white fading to light green and black at player's location with duration 1

Fishing Approach Angle

Type: Expression

Patterns: * (min[imum]|max[imum]) fish[ing] approach[ing] angle

Returns the angle at which the fish will approach the fishing hook, after the wait time.The angle is in degrees, with 0 being positive Z, 90 being negative X, 180 being negative Z, and 270 being positive X.By default, returns a value between 0 and 360 degrees.

Examples

on fish approach:    if any:        maximum fishing approach angle is bigger than 300.5 degrees        min fishing approach angle is smaller than 59.5 degrees    then:        cancel event

Fishing Bite Time

Type: Expression

Patterns: * fish[ing] bit(e|ing) [wait] time

Returns the time it takes a fish to bite the fishing hook, after it started approaching the hook.May return a timespan of 0 seconds. If modifying the value, it should be at least 1 tick.

Examples

on fish approach:    set fishing bite time to 5 seconds

Fishing Hook

Type: Expression

Patterns: * [the] fish[ing] (hook|bobber)

The fishing hook in a fishing event.

Examples

on fish line cast:    wait a second    teleport player to fishing hook

Fishing Hooked Entity

Type: Expression

Patterns: * hook[ed] entity

Returns the hooked entity in the hooked event.

Examples

on entity hooked:    if hooked entity is a player:        teleport hooked entity to player

Fishing Wait Time

Type: Expression

Patterns: * (min[imum]|max[imum]) fish[ing] wait[ing] time

Returns the minimum and/or maximum waiting time of the fishing hook. Default minimum value is 5 seconds and maximum is 30 seconds, before lure is applied.

Examples

on fishing line cast:    set min fish waiting time to 10 seconds    set max fishing waiting time to 20 seconds

Flight Mode

Type: Expression

Patterns: * [the] fl(y[ing]|ight) (mode|state) of %players%

  • %players%'[s] fl(y[ing]|ight) (mode|state)

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

Examples

set flight mode of player to truesend "%flying state of all players%"

Food Level

Type: Expression

Patterns: * [the] (food|hunger)[ ] [of %players%]

  • %players%'[s] (food|hunger)[ ]

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

Examples

set the player's food level to 10

Formatted Date

Type: Expression

Patterns: * %dates% formatted [human-readable] [(with|as) %text%]

  • [human-readable] formatted %dates% [(with|as) %text%]

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

Examples

command /date:    trigger:        send "Full date: %now formatted human-readable%" to sender        send "Short date: %now formatted as "yyyy-MM-dd"%" to sender

Former/Future State

Type: Expression

Patterns: * [the] (former|past|old) [state] [of] %~objects%

  • %~objects% before [the event]
  • [the] (future|to-be|new) [state] [of] %~objects%
  • %~objects%(-to-be| after[(wards| the event)])

Represents the value of an expression before an event happened or the value it will have directly after the event, e.g. the old or new level respectively in a level change event.Note: The past, future and present states of an expression are sometimes called 'time states' of an expression.Note 2: If you don't specify whether to use the past or future state of an expression that has different values, its default value will be used which is usually the value after the event.

Examples

on teleport:    former world was "world_nether" # or 'world was'    world will be "world" # or 'world after the event is'on tool change:    past tool is an axe    the tool after the event will be airon weather change:    set {weather::%world%::old} to past weather    set {weather::%world%::current} to the new weather

Free / Max / Total Memory

Type: Expression

Patterns: * [the] [server] (free|max[imum]|total) (memory|ram)

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

Examples

while player is online:    send action bar "Memory left: %free memory%/%max memory%MB" to player    wait 5 ticks

Freeze Time

Type: Expression

Patterns: * [the] freeze time of %entities%

  • %entities%'[s] freeze time

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

Examples

player's freeze time is less than 3 seconds:    send "you're about to freeze!" to the player

Function (Experimental)

Type: Expression

Patterns: * [the|a] function [named] %text% [(in|from) %script%]

  • [the] functions [named] %texts% [(in|from) %script%]
  • [all [[of] the]|the] functions (in|from) %script%

Obtain a function by name, which can be executed.

Examples

set {_function} to the function named "myFunction"run {_function} with arguments 13 and true

Furnace Event Items

Type: Expression

Patterns: * [the] (smelted item|result[ item])

  • [the] extracted item[s]
  • [the] smelting item
  • [the] burned (fuel|item)

Represents the different items in furnace events.Only 'smelting item' can be changed.

Examples

on furnace smelt:    broadcast smelted item    # Or 'result'on furnace extract:    broadcast extracted itemon fuel burn:    broadcast burned fuelon smelting start:    broadcast smelting item    clear smelting item

Furnace Slot

Type: Expression

Patterns: * [the] (ore|input) slot[s] [of %blocks%]

  • %blocks%'[s] (ore|input) slot[s]
  • [the] fuel slot[s] [of %blocks%]
  • %blocks%'[s] fuel slot[s]
  • [the] (result|output) slot[s] [of %blocks%]
  • %blocks%'[s] (result|output) slot[s]

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

Examples

set the fuel slot of the clicked block to a lava bucketset the block's ore slot to 64 iron oreclear the result slot of the blockon smelt:    if the fuel slot is charcoal:        add 5 seconds to the burn time

Furnace Times

Type: Expression

Patterns: * [the] [furnace] cook[ing] time [of %blocks%]

  • %blocks%'[s]cook[ing] time
  • [the] [furnace] total cook[ing] time [of %blocks%]
  • %blocks%'[s]total cook[ing] time
  • [the] [furnace] fuel burn[ing] time [of %blocks%]
  • %blocks%'[s]fuel burn[ing] time

The cook time, total cook time, and burn time of a furnace. Can be changed.cook time: The amount of time an item has been smelting for.total cook time: The amount of time required to finish smelting an item.burn time: The amount of time left for the current fuel until consumption of another fuel item.

Examples

set the cooking time of {_block} to 10set the total cooking time of {_block} to 50set the fuel burning time of {_block} to 100on smelt:    if the fuel slot is charcoal:        add 5 seconds to the fuel burn time

Game Mode

Type: Expression

Patterns: * [the] game[ ]mode of %players%

  • %players%'[s] game[ ]mode

The gamemode of a player. (Gamemodes)

Examples

player's gamemode is survivalset the player's gamemode to creative

Gamerule Value

Type: Expression

Patterns: * [the] gamerule %gamerule% of %worlds%

The gamerule value of a world.

Examples

set the gamerule commandBlockOutput of world "world" to false

Gliding State

Type: Expression

Patterns: * [the] (gliding|glider) [state] of %living entities%

  • %living entities%'[s] (gliding|glider) [state]

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

Examples

set gliding of player to off

Glowing

Type: Expression

Patterns: * [the] glowing of %entities%

  • %entities%'[s] glowing

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

Examples

set glowing of player to true

Gravity

Type: Expression

Patterns: * [the] gravity of %entities%

  • %entities%'[s] gravity

If entity is affected by gravity or not, i.e. if it has Minecraft 1.10+ NoGravity flag.

Examples

set gravity of player off

Group

Type: Expression

Patterns: * [the] group[s] of %offline players%

  • %offline players%'[s] group[s]

The primary group or all groups of a player. This expression requires Vault and a compatible permissions plugin to be installed.If you have LuckPerms, ensure you have vault integration enabled in the luck perms configurations.

Examples

on join:    broadcast "%group of player%" # this is the player's primary group    broadcast "%groups of player%" # this is all of the player's groups

Hanging Entity/Remover

Type: Expression

Patterns: * [the] hanging (entity|remover)

Returns the hanging entity or remover in hanging break and place events.

Examples

on break of item frame:    if item of hanging entity is diamond pickaxe:        cancel event        if hanging remover is a player:            send "You can't break that item frame!" to hanging remover

Hash

Type: Expression

Patterns: * %texts% hash[ed] with (MD5|SHA-256)

Hashes the given text using the MD5 or SHA-256 algorithms. Each algorithm is suitable for different use cases.MD5 is provided mostly for backwards compatibility, as it is outdated and not secure. SHA-256 is more secure, and can used to hash somewhat confidental data like IP addresses and even passwords. It is not that secure out of the box, so please consider using salt when dealing with passwords! When hashing data, you must specify algorithms that will be used for security reasons! Please note that a hash cannot be reversed under normal circumstanses. You will not be able to get original value from a hash with Skript.

Examples

command /setpass &lt;text&gt;:    trigger:        set {password::%uuid of player%} to text-argument hashed with SHA-256command /login &lt;text&gt;:    trigger:        if text-argument hashed with SHA-256 is {password::%uuid of player%}:            message "Login successful."        else:            message "Wrong password!"

Hatching Entity Type

Type: Expression

Patterns: * [the] hatching entity [type]

The type of the entity that will be hatched in a Player Egg Throw event.

Examples

on player egg throw:    set the hatching entity type to a primed tnt

Hatching Number

Type: Expression

Patterns: * [the] hatching number

The number of entities that will be hatched in a Player Egg Throw event.Please note that no more than 127 entities can be hatched at once.

Examples

on player egg throw:    set the hatching number to 10

Head location

Type: Expression

Patterns: * [the] (head|eye[s]) [location[s]] of %living entities%

  • %living entities%'[s] (head|eye[s]) [location[s]]

The location of an entity's head, mostly useful for players and e.g. looping blocks in the player's line of sight.Please note that this location is only accurate for entities whose head is exactly above their center, i.e. players, endermen, zombies, skeletons, etc., but not sheep, pigs or cows.

Examples

set the block at the player's head to airset the block in front of the player's eyes to glassloop blocks in front of the player's head:

Heal Amount

Type: Expression

Patterns: * [the] heal[ing] amount

The amount of health healed in a heal event.

Examples

on player healing:    increase the heal amount by 2    remove 0.5 from the healing amount

Heal Reason

Type: Expression

Patterns: * [the] (regen|health regain|heal[ing]) (reason|cause)

The heal reason of a heal event.

Examples

on heal:    heal reason is satiated    send "You ate enough food and gained full health back!"

Health

Type: Expression

Patterns: * [the] health of %living entities%

  • %living entities%'[s] health

The health of a creature, e.g. a player, mob, villager, etc. The minimum value is 0, and the maximum is the creature's max health (e.g. 10 for players).

Examples

message "You have %health% HP left."

Hidden Players

Type: Expression

Patterns: * [(all [[of] the]|the)] hidden players (of|for) %players%

  • [(all [[of] the]|the)] players hidden (from|for|by) %players%

The players hidden from a player that were hidden using the entity visibility effect.

Examples

message "&lt;light red&gt;You are currently hiding: &lt;light gray&gt;%hidden players of the player%"

Horse Domestication

Type: Expression

Patterns: * [the] [max[imum]] domestication level of %living entities%

  • %living entities%'[s] [max[imum]] domestication level

Gets and/or sets the (max) domestication of a horse.The domestication of a horse is how close a horse is to becoming tame - the higher the domestication, the closer they are to becoming tame (must be between 1 and the max domestication level of the horse).The max domestication of a horse is how long it will take for a horse to become tame (must be greater than 0).

Examples

function domesticateAndTame(horse: entity, p: offline player, i: int = 10):    add {_i} to domestication level of {_horse}    if domestication level of {_horse} >= max domestication level of {_horse}:        tame {_horse}        set tamer of {_horse} to {_p}

Hostname

Type: Expression

Patterns: * [the] (host|domain)[ ][name]

The hostname used by the connecting player to connect to the server in a connect event.

Examples

on connect:    hostname is "testers.example.com"    send "Welcome back tester!"

Hotbar Button

Type: Expression

Patterns: * [the] hotbar button

The hotbar button clicked in an inventory click event.

Examples

on inventory click:    send "You clicked the hotbar button %hotbar button%!"

Hotbar Slot

Type: Expression

Patterns: * [the] [([currently] selected|current)] hotbar slot[s] [of %players%]

  • %players%'[s] [([currently] selected|current)] hotbar slot[s]

The currently selected hotbar slot.To retrieve its number use Slot Index expression.Use future and past tense to grab the previous slot in an item change event, see example.

Examples

message "%player's current hotbar slot%"set player's selected hotbar slot to slot 4 of playersend "index of player's current hotbar slot = 1" # second slot from the lefton item held change:    if the selected hotbar slot was a diamond:        set the currently selected hotbar slot to slot 5 of player

Hover List

Type: Expression

Patterns: * [the] [custom] [player|server] (hover|sample) ([message] list|message)

  • [the] [custom] player [hover|sample] list

The list when you hover on the player counts of the server in the server list.This can be changed using texts or players in a server list ping event only. Adding players to the list means adding the name of the players.And note that, for example if there are 5 online players (includes fake online count) in the server and the hover list is set to 3 values, Minecraft will show "... and 2 more ..." at end of the list.

Examples

on server list ping:    clear the hover list    add "&aWelcome to the &6Minecraft &aserver!" to the hover list    add "" to the hover list # A blank line    add "&cThere are &6%online players count% &conline players!" to the hover list

Humidity

Type: Expression

Patterns: * [the] humidit(y|ies) of %blocks%

  • %blocks%'[s] humidit(y|ies)

Humidity of given blocks.

Examples

set {_humidity} to event-block's humidity

IP

Type: Expression

Patterns: * IP[s][( |-)address[es]] of %players%

  • %players%'[s] IP[s][( |-)address[es]]
  • IP[( |-)address]

The IP address of a player, or the connected player in a connect event, or the pinger in a server list ping event.

Examples

ban the IP address of the playerbroadcast "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

Index Of

Type: Expression

Patterns: * [the] [(first|last)] index of %text% in %text%

The first or last index of a character (or text) in a text, or -1 if it doesn't occur in the text. Indices range from 1 to the length of the text.

Examples

set {_first} to the first index of "@" in the text argumentif {_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}

Indices of List

Type: Expression

Patterns: * [(the|all [[of] the])] (indexes|indices) of %~objects%

  • %~objects%'[s] (indexes|indices)
  • [sorted] (indices|indexes) of %~objects% in (ascending|descending) order
  • [sorted] %~objects%'[s] (indices|indexes) in (ascending|descending) order

Returns all the indices of a list variable, optionally sorted by their values.To sort the indices, all objects in the list must be comparable;Otherwise, this expression will just return the unsorted indices.

Examples

set {l::*} to "some", "cool" and "values"broadcast "%indices of {l::*}%" # result is 1, 2 and 3set {_leader-board::first} to 17set {_leader-board::third} to 30set {_leader-board::second} to 25set {_leader-board::fourth} to 42set {_ascending-indices::*} to sorted indices of {_leader-board::*} in ascending orderbroadcast "%{_ascending-indices::*}%" #result is first, second, third, fourthset {_descending-indices::*} to sorted indices of {_leader-board::*} in descending orderbroadcast "%{_descending-indices::*}%" #result is fourth, third, second, first

Initiator Inventory

Type: Expression

Patterns: * [the] [event-]initiator[( |-)inventory]

Returns the initiator inventory in an on inventory item move event.

Examples

on inventory item move:    holder of event-initiator-inventory is a chest    broadcast "Item transport happening at %location at holder of event-initiator-inventory%!"

Input

Type: Expression

Patterns: * input

  • %*type% input
  • input index

Represents the input in a filter expression or sort effect.For example, if you ran 'broadcast "something" and "something else" where [input is "something"]the condition would be checked twice, using "something" and "something else" as the inputs.The 'input index' pattern can be used when acting on a variable to access the index of the input.

Examples

send "congrats on being staff!" to all players where [input has permission "staff"]sort {_list::*} based on length of input index

Inventory

Type: Expression

Patterns: * [the] inventor(y|ies) of %inventoryholders/item types%

  • %inventoryholders/item types%'[s] inventor(y|ies)

The inventory of a block or player. You can usually omit this expression and can directly add or remove items to/from blocks or players.

Examples

add a plank to the player's inventoryclear the player's inventoryremove 5 wool from the inventory of the clicked block

Inventory Action

Type: Expression

Patterns: * [the] inventory action

The inventory action of an inventory event. Please click on the link for more information.

Examples

inventory action is pickup all

Inventory Close Reason

Type: Expression

Patterns: * [the] inventory clos(e|ing) (reason|cause)

The inventory close reason of an inventory close event.

Examples

on inventory close:    inventory close reason is teleport    send "Your inventory closed due to teleporting!" to player

Inventory Holder/Viewers/Rows/Slots

Type: Expression

Patterns: * (holder[s]|viewers|[amount of] rows|[amount of] slots) of %inventories%

  • %inventories%'[s] (holder[s]|viewers|[amount of] rows|[amount of] slots)

Gets the amount of rows/slots, viewers and holder of an inventory.NOTE: 'Viewers' expression returns a list of players viewing the inventory. Note that a player is considered to be viewing their own inventory and internal crafting screen even when said inventory is not open.

Examples

event-inventory's amount of rowsholder of player's top inventory{_inventory}'s viewers

Inventory Slot

Type: Expression

Patterns: * [the] slot[s] %numbers% of %inventory%

  • %inventory%'[s] slot[s] %numbers%

Represents a slot in an inventory. It can be used to change the item in an inventory too.

Examples

if slot 0 of player is air:    set slot 0 of player to 2 stones    remove 1 stone from slot 0 of player    add 2 stones to slot 0 of player    clear slot 1 of player

Item

Type: Expression

Patterns: * [the] item

The item involved in an event, e.g. in a drop, dispense, pickup or craft event.

Examples

on dispense:    item is a clock    set the time to 6:00

Item Amount

Type: Expression

Patterns: * [the] item[[ ]stack] (amount|size|number) of %slots/item types/item stacks%

  • %slots/item types/item stacks%'[s] item[[ ]stack] (amount|size|number)

The amount of an item stack.

Examples

send "You have got %item amount of player's tool% %player's tool% in your hand!" to player

Item Cooldown

Type: Expression

Patterns: * [the] [item] cooldown of %item types% for %players%

  • %players%'[s] [item] cooldown for %item types%

Change the cooldown of a specific material to a certain amount of Timespan.

Examples

on right click using stick:    set item cooldown of player's tool for player to 1 minute    set item cooldown of stone and grass for all players to 20 seconds    reset item cooldown of cobblestone and dirt for all players

Item Display Transform

Type: Expression

Patterns: * [the] item [display] transform [of %displays%]

  • %displays%'[s] item [display] transform

Returns or changes the item display transform of item displays.

Examples

set the item transform of the last spawned item display to first person left handedset the item transform of the last spawned item display to no transform # Reset to default

Item Enchantments

Type: Expression

Patterns: * [the] enchantments of %item types%

  • %item types%'[s] enchantments

All the enchantments an item type has.

Examples

clear enchantments of event-item

Item Flags

Type: Expression

Patterns: * [the] item flags of %item types%

  • %item types%'[s] item flags

The item flags of an item. Can be modified.

Examples

set item flags of player's tool to hide enchants and hide attributesadd hide potion effects to item flags of player's held itemremove hide enchants from item flags of {legendary sword}

Item of an Entity

Type: Expression

Patterns: * [the] item [inside] of %entities%

  • %entities%'[s] item [inside]

An item associated with an entity. For dropped item entities, it gets the item that was dropped.For item frames, the item inside the frame is returned.For throwable projectiles (snowballs, enderpearls etc.) or item displays, it gets the displayed item.Other entities do not have items associated with them.

Examples

item of event-entityset the item inside of event-entity to a diamond sword named "Example"

Item with CustomModelData

Type: Expression

Patterns: * %item type% with [custom] model data %number%

Get an item with a CustomModelData tag. (Value is an integer between 0 and 99999999)

Examples

give player a diamond sword with custom model data 2set slot 1 of inventory of player to wooden hoe with custom model data 357

Item with Enchantment Glint

Type: Expression

Patterns: * %item types% with[out] [enchant[ment]] glint

Get an item with or without enchantment glint.

Examples

set {_item with glint} to diamond with enchantment glintset {_item without glint} to diamond without enchantment glint

Item with Item Flags

Type: Expression

Patterns: * %item types% with [the] item flag[s] %item flags%

  • %item types% with [the] %item flags% item flag[s]

Creates a new item with the specified item flags.

Examples

give player diamond sword with item flags hide enchants and hide attributesset {_item} to player's tool with item flag hide additional tooltipgive player torch with hide placed on item flagset {_item} to diamond sword with all item flags

Item with Lore

Type: Expression

Patterns: * %item type% with [(a|the)] lore %texts%

Returns the given item type with the specified lore added to it.If multiple strings are passed, each of them will be a separate line in the lore.

Examples

set {_test} to stone with lore "line 1" and "line 2"give {_test} to player

Items

Type: Expression

Patterns: * [all [[of] the]|the] block[[ ]type]s

  • every block[[ ]type]
  • [all [[of] the]|the|every] block[s] of type[s] %item types%
  • [all [[of] the]|the|every] item[s] of type[s] %item types%

Items or blocks of a specific type, useful for looping.

Examples

loop items of type ore and log:    block contains loop-item    message "Theres at least one %loop-item% in this block"drop all blocks at the player # drops one of every block at the player

Items In

Type: Expression

Patterns: * [all [[of] the]] items ([with]in|of|contained in|out of) [inventor(y|ies)] %inventories%

  • all [[of] the] %item types% ([with]in|of|contained in|out of) [inventor(y|ies)] %inventories%

All items or specific type(s) of items in an inventory. Useful for looping or storing in a list variable.Please note that the positions of the items in the inventory are not saved, only their order is preserved.

Examples

loop all items in the player's inventory:    loop-item is enchanted    remove loop-item from the playerset {inventory::%uuid of player%::*} to items in the player's inventory

Join & Split

Type: Expression

Patterns: * (concat[enate]|join) %texts% [(with|using|by) [[the] delimiter] %text%]

  • split %text% (at|using|by) [[the] delimiter] %text% [with case sensitivity] [without [the] trailing [empty] (string|text)]
  • %text% split (at|using|by) [[the] delimiter] %text% [with case sensitivity] [without [the] trailing [empty] (string|text)]
  • regex split %text% (at|using|by) [[the] delimiter] %text% [without [the] trailing [empty] (string|text)]
  • regex %text% split (at|using|by) [[the] delimiter] %text% [without [the] trailing [empty] (string|text)]

Joins several texts with a common delimiter (e.g. ", "), or splits a text into multiple texts at a given delimiter.

Examples

message "Online players: %join all players' names with "" | ""%" # %all players% would use the default "x, y, and z"set {_s::*} to the string argument split at ","

Language

Type: Expression

Patterns: * [the] [([currently] selected|current)] [game] (language|locale) [setting] of %players%

  • %players%'[s] [([currently] selected|current)] [game] (language|locale) [setting]

Currently selected game language of a player. The value of the language is not defined properly.The vanilla Minecraft client will use lowercase language / country pairs separated by an underscore, but custom resource packs may use any format they wish.

Examples

message player's current language

Last Attacker

Type: Expression

Patterns: * [the] last attacker of %entity%

  • %entity%'[s] last attacker

The last block or entity that attacked an entity.

Examples

send "%last attacker of event-entity%"

Last Color

Type: Expression

Patterns: * [the] last color[s] of %texts%

  • %texts%'[s] last color[s]

The colors used at the end of a string. The colors of the returned string will be formatted with their symbols.

Examples

set {_color} to the last colors of "<red>hey<blue>yo"

Last Damage

Type: Expression

Patterns: * [the] last damage of %living entities%

  • %living entities%'[s] last damage

The last damage that was done to an entity. Note that changing it doesn't deal more/less damage.

Examples

set last damage of event-entity to 2

Last Damage Cause

Type: Expression

Patterns: * [the] last damage (cause|reason|type) of %living entities%

  • %living entities%'[s] last damage (cause|reason|type)

Cause of last damage done to an entity

Examples

set last damage cause of event-entity to fire tick

Last Death Location

Type: Expression

Patterns: * [the] [last] death location[s] of %offline players%

  • %offline players%'[s] [last] death location[s]

Gets the last death location of a player, or offline player, if available.Can also be set, reset, and deleted if the player is online.

Examples

set {_loc} to the last death location of playerteleport player to last death location of (random element out of all players)

Last Loaded Server Icon

Type: Expression

Patterns: * [the] [last[ly]] loaded server icon

Returns the last loaded server icon with the load server icon effect.

Examples

set {server-icon} to the last loaded server icon

Last Resource Pack Response

Type: Expression

Patterns: * [the] [last] resource pack response[s] of %players%

  • %players%'[s] [last] resource pack response[s]

Returns the last resource pack response received from a player.

Examples

if player's last resource pack response is deny or download fail:

Last Spawned Entity

Type: Expression

Patterns: * [the] [last[ly]] (spawned|shot) %*entity type%

  • [the] [last[ly]] dropped (item)
  • [the] [last[ly]] (created|struck) (lightning)
  • [the] [last[ly]] (launched|deployed) (firework)

Holds the entity that was spawned most recently with the spawn effect (section), dropped with the drop effect, shot with the shoot effect or created with the lightning effect. Please note that even though you can spawn multiple mobs simultaneously (e.g. with 'spawn 5 creepers'), only the last spawned mob is saved and can be used. If you spawn an entity, shoot a projectile and drop an item you can however access all them together.

Examples

spawn a priestset {healer::%spawned priest%} to trueshoot an arrow from the last spawned entityignite the shot projectiledrop a diamond swordpush last dropped item upwardsteleport player to last struck lightningdelete last launched firework

Last/First Login Time

Type: Expression

Patterns: * [the] (last|first) login of %offline players%

  • %offline players%'[s] (last|first) login

When a player last/first logged in the server. 'last login' requires paper to get the last login, otherwise it will get the last time they were seen on the server.

Examples

command /onlinefor:    trigger:        send "You have been online for %difference between player's last login and now%."        send "You first joined the server %difference between player's first login and now% ago."

Leash Holder

Type: Expression

Patterns: * [the] leash holder[s] of %living entities%

  • %living entities%'[s] leash holder[s]

The leash holder of a living entity.

Examples

set {_example} to the leash holder of the target mob

Length

Type: Expression

Patterns: * [the] length of %texts%

  • %texts%'[s] length

The length of a text, in number of characters.

Examples

set {_l} to length of the string argument

Level

Type: Expression

Patterns: * [the] level of %players%

  • %players%'[s] level

The level of a player.

Examples

reduce the victim's level by 1set the player's level to 0

Level Progress

Type: Expression

Patterns: * [the] level progress of %players%

  • %players%'[s] level progress

The player's progress in reaching the next level, this represents the experience bar in the game. Please note that this value is between 0 and 1 (e.g. 0.5 = half experience bar).Changing this value can cause the player's level to change if the resulting level progess is negative or larger than 1, e.g. increase the player's level progress by 0.5 will make the player gain a level if their progress was more than 50%.

Examples

# use the exp bar as manaon 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.2every 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.99on xp spawn:    cancel event

Light Level

Type: Expression

Patterns: * [(sky|sun|block)[ ]]light[ ]level [(of|%direction%) %location%]

Gets the light level at a certain location which ranges from 0 to 15.It can be separated into sunlight (15 = direct sunlight, 1-14 = indirect) and block light (torches, glowstone, etc.). The total light level of a block is the maximum of the two different light types.

Examples

# set vampire players standing in bright sunlight on fireevery 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

Loaded Plugins

Type: Expression

Patterns: * [(all [[of] the]|the)] [loaded] plugins

An expression to obtain a list of the names of the server's loaded plugins.

Examples

if the loaded plugins contains "Vault":    broadcast "This server uses Vault plugin!"send "Plugins (%size of loaded plugins%): %plugins%" to player

Location

Type: Expression

Patterns: * [the] event-

The location where an event happened (e.g. at an entity or block), or a location relative to another (e.g. 1 meter above another location).

Examples

drop 5 apples at the event-location # exactly the same as writing 'drop 5 apples'set {_loc} to the location 1 meter above the player

Location

Type: Expression

Patterns: * [the] (location|position) %directions% [%location%]

The location where an event happened (e.g. at an entity or block), or a location relative to another (e.g. 1 meter above another location).

Examples

drop 5 apples at the event-location # exactly the same as writing 'drop 5 apples'set {_loc} to the location 1 meter above the player

Location

Type: Expression

Patterns: * (location|position) of %location%

  • %location%'[s] (location|position)

The location of a block or entity. This not only represents the x, y and z coordinates of the location but also includes the world and the direction an entity is looking (e.g. teleporting to a saved location will make the teleported entity face the same saved direction every time).Please note that the location of an entity is at it's feet, use head location to get the location of the head.

Examples

set {home::%uuid of player%} to the location of the playermessage "You home was set to %player's location% in %player's world%."

Location At

Type: Expression

Patterns: * [the] (location|position) [at] [(][x[ ][=[ ]]]%number%, [y[ ][=[ ]]]%number%, [and] [z[ ][=[ ]]]%number%[)] [[(in|of) [[the] world]] %world%]

Allows to create a location from three coordinates and a world.

Examples

set {_loc} to the location at arg-1, arg-2, arg-3 of the world arg-4distance between the player and the location (0, 0, 0) is less than 200

Loop Iteration

Type: Expression

Patterns: * [the] loop(-| )(counter|iteration)[-%*number%]

Returns the loop's current iteration count (for both normal and while loops).

Examples

while player is online:    give player 1 stone    wait 5 ticks    if loop-counter > 30:        stop looploop {top-balances::*}:    if loop-iteration <= 10:        broadcast "#%loop-iteration% %loop-index% has $%loop-value%"

Loop value

Type: Expression

Patterns: * [the] [current] loop-<.+>

  • [the] next loop-<.+>
  • [the] previous loop-<.+>

Returns the previous, current, or next looped value.

Examples

# Countdownloop 10 times:    message "%11 - loop-number%"    wait a second# Generate a 10x10 floor made of randomly colored wool below the playerloop 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 woolloop {top-balances::*}:    loop-iteration <= 10    send "#%loop-iteration% %loop-index% has $%loop-value%"loop shuffled (integers between 0 and 8):    if all:        previous loop-value = 1        loop-value = 4        next loop-value = 8    then:         kill all players

Loot

Type: Expression

Patterns: * [the] loot

The loot that will be generated in a 'loot generate' event.

Examples

on loot generate:    chance of %10    add 64 diamonds to loot    send "You hit the jackpot!!"

Loot Context

Type: Expression

Patterns: * [the] loot[ ]context

The loot context involved in the context create section.

Examples

set {_context} to a new loot context at {_location}:    broadcast loot context

Loot Location of Loot Context

Type: Expression

Patterns: * [the] loot[ing] [context] location [of %loot contexts%]

  • %loot contexts%'[s] loot[ing] [context] location

Returns the loot location of a loot context.

Examples

set {_player} to playerset {_context} to a loot context at player:    if {_player} is in "world_nether":        set loot location to location of last spawned pigsend loot location of {_context} to player

Loot Table

Type: Expression

Patterns: * [the] loot[ ]table[s] of %entities/blocks%

  • %entities/blocks%'[s] loot[ ]table[s]

Returns the loot table of an entity or block.Setting the loot table of a block will update the block state, and once opened will generate loot of the specified loot table. Please note that doing so may cause warnings in the console due to over-filling the chest.Please note that resetting/deleting the loot table of an ENTITY will reset the entity's loot table to its default.

Examples

set loot table of event-entity to "minecraft:entities/ghast"# this will set the loot table of the entity to a ghast's loot table, thus dropping ghast tears and gunpowderset loot table of event-block to "minecraft:chests/simple_dungeon"

Loot Table from Key

Type: Expression

Patterns: * [the] loot[ ]table[s] %texts%

Returns the loot table from a namespaced key.

Examples

set {_table} to loot table "minecraft:chests/simple_dungeon"

Loot of Loot Table

Type: Expression

Patterns: * [the] loot of %loot tables% [(with|using) %loot context%]

  • %loot tables%'[s] loot [(with|using) %loot context%]

Returns the items of a loot table using a loot context. Not specifying a loot context will use a loot context with a location at the world's origin.

Examples

set {_items::*} to loot items of the loot table "minecraft:chests/simple_dungeon" with loot context {_context}# this will set {_items::*} to the items that would be dropped from the simple dungeon loot table with the given loot contextgive player loot items of entity's loot table with loot context {_context}# this will give the player the items that the entity would drop with the given loot context

Looted Entity of Loot Context

Type: Expression

Patterns: * [the] looted entity [of %loot contexts%]

  • %loot contexts%'[s] looted entity

Returns the looted entity of a loot context.

Examples

set {_entity} to looted entity of {_context}set {_context} to a loot context at player:    set loot luck value to 10    set looter to player    set looted entity to last spawned pig

Looter of Loot Context

Type: Expression

Patterns: * [the] (looter|looting player) [of %loot contexts%]

  • %loot contexts%'[s] (looter|looting player)

Returns the looter of a loot context. Note that setting the looter will read the looter's tool enchantments (e.g. looting) when generating loot.

Examples

set {_killer} to looter of {_context}set {_context} to a loot context at player:    set loot luck value to 10    set looter to player    set looted entity to last spawned pig

Lore

Type: Expression

Patterns: * [the] lore of %item stack/item type%

  • %item stack/item type%'[s] lore
  • [the] line %number% of [the] lore of %item stack/item type%
  • [the] line %number% of %item stack/item type%'[s] lore
  • [the] %number%(st|nd|rd|th) line of [the] lore of %item stack/item type%
  • [the] %number%(st|nd|rd|th) line of %item stack/item type%'[s] lore

An item's lore.

Examples

set the 1st line of the item's lore to "&lt;orange&gt;Excalibur 2.0"

Love Time

Type: Expression

Patterns: * [the] love[d] time of %living entities%

  • %living entities%'[s] love[d] time

The amount of time the animals have been in love for. Using a value of 30 seconds is equivalent to using an item to breed them.Only works on animals that can be bred and returns '0 seconds' for animals that can't be bred.

Examples

on right click:    send "%event-entity% has been in love for %love time of event-entity% more than you!" to player

Lowest/Highest Solid Block

Type: Expression

Patterns: * [the] (highest|lowest) [solid] block (at|of) %locations%

  • %locations%'[s] (highest|lowest) [solid] block

An expression to obtain the lowest or highest solid (impassable) block at a location.Note that the y-coordinate of the location is not taken into account for this expression.

Examples

teleport the player to the block above the highest block at the playerset the highest solid block at the player's location to the lowest solid block at the player's location

Luck of Loot Context

Type: Expression

Patterns: * [the] loot[ing] [context] luck [value|factor] [of %loot contexts%]

  • %loot contexts%'[s] loot[ing] [context] luck [value|factor]

Returns the luck of a loot context as a float. This represents the luck potion effect that an entity can have.

Examples

set {_luck} to loot luck value of {_context}set {_context} to a loot context at player:    set loot luck value to 10    set looter to player    set looted entity to last spawned pig

MOTD

Type: Expression

Patterns: * [the] [(default)|(shown|displayed)] (MOTD|message of [the] day)

The message of the day in the server list. This can be changed in a server list ping event only.'default MOTD' returns the default MOTD always and can't be changed.

Examples

on server list ping:    set the motd to "Join now!"

Max Durability

Type: Expression

Patterns: * [the] max[imum] (durabilit(y|ies)|damage) of %item types/item stacks/slots%

  • %item types/item stacks/slots%'[s] max[imum] (durabilit(y|ies)|damage)

The maximum durability of an item. Changing requires Minecraft 1.20.5+Note: 'delete' will remove the max durability from the item (making it a non-damageable item). Delete requires Paper 1.21+

Examples

maximum durability of diamond swordif max durability of player's tool is not 0: # Item is damageableset max durability of player's tool to 5000add 5 to max durability of player's toolreset max durability of player's tooldelete max durability of player's tool

Max Health

Type: Expression

Patterns: * [the] max[imum] health of %living entities%

  • %living entities%'[s] max[imum] health

The maximum health of an entity, e.g. 10 for a player.

Examples

on join:    set the maximum health of the player to 100spawn a giantset the last spawned entity's max health to 1000

Max Item Use Time

Type: Expression

Patterns: * [the] max[imum] [item] us(e|age) (time|duration) of %item stacks%

  • %item stacks%'[s] max[imum] [item] us(e|age) (time|duration)

Returns the max duration an item can be used for before the action completes. E.g. it takes 1.6 seconds to drink a potion, or 1.4 seconds to load an unenchanted crossbow.Some items, like bows and shields, do not have a limit to their use. They will return 1 hour.

Examples

on right click:    broadcast max usage duration of player's tool

Max Minecart Speed

Type: Expression

Patterns: * [the] max[imum] minecart (speed|velocity) of %entities%

  • %entities%'[s] max[imum] minecart (speed|velocity)

The maximum speed of a minecart.

Examples

on right click on minecart:    set max minecart speed of event-entity to 1

Max Players

Type: Expression

Patterns: * [the] [(real|default)|(fake|shown|displayed)] max[imum] player[s] [count|amount|number|size]

  • [the] [(real|default)|(fake|shown|displayed)] max[imum] (count|amount|number|size) of players

The count of max players. This can be changed in a server list ping event only.'real max players' returns the real count of max players of the server and can be modified on Paper 1.16 or later.

Examples

on server list ping:    set the max players count to (online players count + 1)

Maximum Freeze Time

Type: Expression

Patterns: * [the] max[imum] freeze time of %entities%

  • %entities%'[s] max[imum] freeze time

The maximum amount of time an entity can spend in powdered snow before taking damage.

Examples

difference between player's freeze time and player's max freeze time is less than 1 second:    send "you're about to freeze!" to the player

Maximum Stack Size

Type: Expression

Patterns: * [the] max[imum] stack[[ ]size] of %item types/inventories%

  • %item types/inventories%'[s] max[imum] stack[[ ]size]

The maximum stack size of an item (e.g. 64 for torches, 16 for buckets, 1 for swords, etc.) or inventory.In 1.20.5+, the maximum stack size of items can be changed to any integer from 1 to 99, and stacked up to the maximum stack size of the inventory they're in.

Examples

send "You can hold %max stack size of player's tool% of %type of player's tool% in a slot." to playerset the maximum stack size of inventory of all players to 16add 8 to the maximum stack size of player's toolreset the maximum stack size of {_gui}

Me

Type: Expression

Patterns: * me

  • my[self]

A 'me' expression that can be used in players' effect commands only.

Examples

!heal me!kick myself!give a diamond axe to me

Mending Repair Amount

Type: Expression

Patterns: * [the] [mending] repair amount

The number of durability points an item is to be repaired in a mending event. Modifying the repair amount will affect how much experience is given to the player after mending.

Examples

on item mend:    set the mending repair amount to 100

Message

Type: Expression

Patterns: * [the] [chat( |-)]message

  • [the] (join|log[ ]in)( |-)message
  • [the] (quit|leave|log[ ]out|kick)( |-)message
  • [the] death( |-)message
  • [the] broadcast(-|[ed] )message

The (chat) message of a chat event, the join message of a join event, the quit message of a quit event, the death message of a death event or the broadcasted message in a broadcast event. This expression is mostly useful for being changed.

Examples

on chat:    player has permission "admin"    set message to "&c%message%"on first join:    set join message to "Welcome %player% to our awesome server!"on join:    player has played before    set join message to "Welcome back, %player%!"on quit:    if {vanish::%player's uuid%} is set:        clear quit message    else:        set quit message to "%player% left this awesome server!"on death:    set the death message to "%player% died!"on broadcast:    set broadcast message to "&a[BROADCAST] %broadcast message%"

Metadata

Type: Expression

Patterns: * metadata [(value|tag)[s]] %texts% of %metadata holders%

  • %metadata holders%'[s] metadata [(value|tag)[s]] %text%

Metadata is a way to store temporary data on entities, blocks and more that disappears after a server restart.

Examples

set metadata value "healer" of player to truebroadcast "%metadata value ""healer"" of player%"clear metadata value "healer" of player

Middle of Location

Type: Expression

Patterns: * [the] (middle|center) [point] of %location%

  • %location%'[s] (middle|center) [point]

Returns the middle/center of a location. In other words, returns the middle of the X, Z coordinates and the floor value of the Y coordinate of a location.

Examples

command /stuck:    executable by: players    trigger:        teleport player to the center of player's location        send "You're no longer stuck."

Minecart Derailed / Flying Velocity

Type: Expression

Patterns: * [the] [minecart] (derailed|flying) velocity of %entities%

  • %entities%'[s] [minecart] (derailed|flying) velocity

The velocity of a minecart as soon as it has been derailed or as soon as it starts flying.

Examples

on right click on minecart:    set derailed velocity of event-entity to vector 2, 10, 2

Money

Type: Expression

Patterns: * [the] (money|balance|[bank] account) of %offline players%

  • %offline players%'[s] (money|balance|[bank] account)

How much virtual money a player has (can be changed).

Examples

message "You have %player's money%" # the currency name will be added automaticallyremove 20$ from the player's balance # replace '$' by whatever currency you useadd 200 to the player's account # or omit the currency altogether

Moon Phase

Type: Expression

Patterns: * [the] (lunar|moon) phase[s] of %worlds%

  • %worlds%'[s] (lunar|moon) phase[s]

The current moon phase of a world.

Examples

if moon phase of player's world is full moon:    send "Watch for the wolves!"

Moved blocks

Type: Expression

Patterns: * [the] moved blocks

Blocks which are moved in a piston event. Cannot be used outside of piston events.

Examples

the moved blocks

Name / Display Name / Tab List Name

Type: Expression

Patterns: * [the] name[s] of %offline players/entities/named things/inventories%

  • %offline players/entities/named things/inventories%'[s] name[s]
  • [the] (display|nick|chat|custom)[ ]name[s] of %offline players/entities/named things/inventories%
  • %offline players/entities/named things/inventories%'[s] (display|nick|chat|custom)[ ]name[s]
  • [the] (player|tab)[ ]list name[s] of %players%
  • %players%'[s] (player|tab)[ ]list name[s]

Represents the Minecraft account, display or tab list name of a player, or the custom name of an item, entity, block, inventory, gamerule, world, script or function.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: Name: The name of the gamerule. Cannot be changed.Worlds: Name: The name of the world. Cannot be changed.Scripts: Name: The name of a script, excluding its file extension.

Examples

on join:    player has permission "name.red"    set the player's display name to "&lt;red&gt;[admin] &lt;gold&gt;%name of player%"    set the player's tab list name to "&lt;green&gt;%player's name%"set the name of the player's tool to "Legendary Sword of Awesomeness"

Named Item/Inventory

Type: Expression

Patterns: * %item type/inventory type% (named|with name[s]) %text%

Directly names an item/inventory, useful for defining a named item/inventory in a script. If you want to (re)name existing items/inventories you can either use this expression or use set name of <item/inventory> to .

Examples

give a diamond sword of sharpness 100 named "&lt;gold&gt;Excalibur" to the playerset tool of player to the player's tool named "&lt;gold&gt;Wand"set the name of the player's tool to "&lt;gold&gt;Wand"open hopper inventory named "Magic Hopper" to player

Nearest Entity

Type: Expression

Patterns: * [the] nearest %*entity types% [[relative] to %entity/location%]

  • [the] %*entity types% nearest [to %entity/location%]

Gets the entity nearest to a location or another entity.

Examples

kill the nearest pig and cow relative to playerteleport player to the nearest cow relative to playerteleport player to the nearest entity relative to playeron click:    kill nearest pig

New Line

Type: Expression

Patterns: * nl

  • new[ ]line
  • line[ ]break

Returns a line break separator.

Examples

send "Hello%nl%Goodbye!" to player

No Damage Ticks

Type: Expression

Patterns: * [the] (invulnerability|invincibility|no damage) tick[s] of %living entities%

  • %living entities%'[s] (invulnerability|invincibility|no damage) tick[s]

The number of ticks that an entity is invulnerable to damage for.

Examples

on damage:    set victim's invulnerability ticks to 20 #Victim will not take damage for the next second

Node (Experimental)

Type: Expression

Patterns: * [the] node %text% (of|in) %node%

  • %node%'[s] node %text%
  • [the] nodes (of|in) %nodes%
  • %node%'[s] nodes

Returns a node inside a config (or another section-node).Nodes in Skript configs are written in the format key: value.Section nodes can contain other nodes.

Examples

set {_node} to node "language" in the skript config if text value of {_node} is "french":     broadcast "Bonjour!" set {_script} to the current script loop nodes of the current script:     broadcast name of loop-value

Now

Type: Expression

Patterns: * now

The current system time of the server. Use time to get the Minecraft time of a world.

Examples

broadcast "Current server time: %now%"

Number of Characters

Type: Expression

Patterns: * number of upper[ ]case char(acters|s) in %text%

  • number of lower[ ]case char(acters|s) in %text%
  • number of digit char(acters|s) in %text%

The number of uppercase, lowercase, or digit characters in a string.

Examples

#Simple Chat Filteron chat:    if number of uppercase chars in message / length of message > 0.5        cancel event        send "&lt;red&gt;Your message has to many caps!" to player

Numbers

Type: Expression

Patterns: * [(all [[of] the]|the)] (numbers|integers|decimals) (between|from) %number% (and|to) %number%

All numbers between two given numbers, useful for looping.Use 'numbers' if your start is not an integer and you want to keep the fractional part of the start number constant, or use 'integers' if you only want to loop integers.You may also use 'decimals' if you want to use the decimal precision of the start number.You may want to use the 'times' expression instead, for instance 'loop 5 times:'

Examples

loop numbers from 2.5 to 5.5: # loops 2.5, 3.5, 4.5, 5.5loop integers from 2.9 to 5.1: # same as '3 to 5', i.e. loops 3, 4, 5loop decimals from 3.94 to 4: # loops 3.94, 3.95, 3.96, 3.97, 3.98, 3.99, 4

Offline players

Type: Expression

Patterns: * [(all [[of] the]|the)] offline[ ]players

All players that have ever joined the server. This includes the players currently online.

Examples

send "Size of all players who have joined the server: %size of all offline players%"

Online Player Count

Type: Expression

Patterns: * [the] [((real|default)|(fake|shown|displayed))] [online] player (count|amount|number)

  • [the] [((real|default)|(fake|shown|displayed))] (count|amount|number|size) of online players

The amount of online players. This can be changed in a server list ping event only to show fake online player amount.real online player count always return the real count of online players and can't be changed.

Examples

on server list ping:    # This will make the max players count 5 if there are 4 players online.    set the fake max players count to (online player count + 1)

Opened Inventory

Type: Expression

Patterns: * [the] (current|open|top) inventory [of %players%]

  • %players%'[s] (current|open|top) inventory

Return the currently opened inventory of a player.If no inventory is open, it returns the own player's crafting inventory.

Examples

set slot 1 of player's current inventory to diamond sword

Parse

Type: Expression

Patterns: * %text% parsed as (%type%|"<.>")

Parses text as a given type, or as a given pattern.This expression can be used in two different ways: One which parses the entire text as a single instance of a type, e.g. as a number, and one that parses the text according to a pattern.If the given text could not be parsed, this expression will return nothing and the parse error will be set if some information is available.Some notes about parsing with a pattern:- The pattern must be a Skript pattern, e.g. percent signs are used to define where to parse which types, e.g. put a %number% or %items% in the pattern if you expect a number or some items there.- You have to save the expression's value in a list variable, e.g. set {parsed::} to message parsed as "...".- The list variable will contain the parsed values from all %types% in the pattern in order. If a type was plural, e.g. %items%, the variable's value at the respective index will be a list variable, e.g. the values will be stored in {parsed::1::}, not {parsed::1}.

Examples

set {var} to line 1 parsed as numberon chat:    set {var::*} to message parsed as "buying %items% for %money%"    if parse error is set:        message "%parse error%"    else if {var::*} is set:        cancel event        remove {var::2} from the player's balance        give {var::1::*} to the player

Parse Error

Type: Expression

Patterns: * [the] [last] [parse] error

The error which caused the last parse operation to fail, which might not be set if a pattern was used and the pattern didn't match the provided text at all.

Examples

set {var} to line 1 parsed as integerif {var} is not set:    parse error is set:        message "&lt;red&gt;Line 1 is invalid: %last parse error%"    else:        message "&lt;red&gt;Please put an integer on line 1!"

Passenger

Type: Expression

Patterns: * [the] passenger[s] of %entities%

  • %entities%'[s] passenger[s]

The passenger of a vehicle, or the rider of a mob.For 1.11.2 and above, it returns a list of passengers and you can use all changers in it.See also: vehicle

Examples

#for 1.11 and lowerpassenger of the minecart is a creeper or a cowthe saddled pig's passenger is a player#for 1.11.2+passengers of the minecart contains a creeper or a cowthe boat's passenger contains a pigadd a cow and a zombie to passengers of last spawned boatset passengers of player's vehicle to a pig and a horseremove all pigs from player's vehicleclear passengers of boat

Percent of

Type: Expression

Patterns: * %number%(%| percent) of %numbers%

Returns a percentage of one or more numbers.

Examples

set damage to 10% of victim's healthset damage to 125 percent of damageset {_result} to {_percent} percent of 999set {_result::*} to 10% of {_numbers::*}set experience to 50% of player's total experience

Pi

Type: Expression

Patterns: * (pi|π)

Returns the mathematical constant pi. (approx. 3.1415926535)

Examples

set {_tau} to pi * 2

Pickup Delay

Type: Expression

Patterns: * [the] pick[ ]up delay of %entities%

  • %entities%'[s] pick[ ]up delay

The amount of time before a dropped item can be picked up by an entity.

Examples

drop diamond sword at {_location} without velocityset pickup delay of last dropped item to 5 seconds

Ping

Type: Expression

Patterns: * [the] ping of %players%

  • %players%'[s] ping

Pings of players, as Minecraft server knows them. Note that they will almost certainly be different from the ones you'd get from using ICMP echo requests. This expression is only supported on some server software (PaperSpigot).

Examples

command /ping <player=%player%>:    trigger:        send "%arg-1%'s ping is %arg-1's ping%"

Plain Item

Type: Expression

Patterns: * [a[n]] (plain|unmodified) %item type%

A plain item is an item with no modifications. It can be used to convert items to their default state or to match with other default items.

Examples

if the player's tool is a plain diamond: # check if player's tool has no modifications    send "You are holding a plain diamond!"

Player Chat Completions

Type: Expression

Patterns: * [the] [custom] chat completion[s] of %players%

  • %players%'[s] [custom] chat completion[s]

The custom chat completion suggestions. You can add, set, remove, and clear them. Removing the names of online players with this expression is ineffective.This expression will not return anything due to Bukkit limitations.

Examples

add "Skript" and "Njol" to chat completions of all playersremove "text" from {_p}'s chat completionsclear player's chat completions

Player Input Keys

Type: Expression

Patterns: * [the] [current] (inputs|input keys) of %players%

  • %players%'[s] [current] (inputs|input keys)

Get the current input keys of a player.

Examples

broadcast "%player% is pressing %current input keys of player%"

Player List Header and Footer

Type: Expression

Patterns: * [the] (player|tab)[ ]list (header|footer) [(text|message)] of %players%

  • %players%'[s] (player|tab)[ ]list (header|footer) [(text|message)]

The message above and below the player list in the tab menu.

Examples

set all players' tab list header to "Welcome to the Server!"send "%the player's tab list header%" to playerreset all players' tab list header

Player Protocol Version

Type: Expression

Patterns: * [the] protocol version of %players%

  • %players%'[s] protocol version

Player's protocol version. For more information and list of protocol versions visit wiki.vg.

Examples

command /protocolversion &ltplayer&gt:    trigger:        send "Protocol version of %arg-1%: %protocol version of arg-1%"

Player Skull

Type: Expression

Patterns: * [the] (head|skull) of %offline players%

  • %offline players%'[s] (head|skull)

Gets a skull item representing a player. Skulls for other entities are provided by the aliases.

Examples

give the victim's skull to the attackerset the block at the entity to the entity's skull

Player Weather

Type: Expression

Patterns: * [the] [(client|custom)] weather of %players%

  • %players%'[s] [(client|custom)] weather

The weather for a player.

Examples

set weather of arg-player to rainyreset player's weatherif arg-player's weather is rainy

Portal

Type: Expression

Patterns: * [the] portal['s] blocks

  • [the] blocks of [the] portal

The blocks associated with a portal in the portal creation event.

Examples

on portal creation:    loop portal blocks:        broadcast "%loop-block% is part of a portal!"

Portal Cooldown

Type: Expression

Patterns: * [the] portal cooldown of %entities%

  • %entities%'[s] portal cooldown

The amount of time before an entity can use a portal. By default, it is 15 seconds after exiting a nether portal or end gateway.Players in survival/adventure get a cooldown of 0.5 seconds, while those in creative get no cooldown.Resetting will set the cooldown back to the default 15 seconds for non-player entities and 0.5 seconds for players.

Examples

on portal:    wait 1 tick    set portal cooldown of event-entity to 5 seconds

Potion Effect

Type: Expression

Patterns: * [new] potion effect of %potion effect type% [potion] [[[of] tier] %number%] [without particles] [for %time span%]

  • [new] ambient potion effect of %potion effect type% [potion] [[[of] tier] %number%] [without particles] [for %time span%]

Create a new potion effect to apply to an entity or item type. Do note that when applying potion effects to tipped arrows/lingering potions, Minecraft reduces the timespan.

Examples

set {_p} to potion effect of speed of tier 1 without particles for 10 minutesadd {_p} to potion effects of player's tooladd {_p} to potion effects of target entityadd potion effect of speed 1 to potion effects of player

Potion Effect Tier

Type: Expression

Patterns: * [the] [potion] (tier|amplifier|level) of %potion effect types% (of|for|on) %living entities%

An expression to obtain the amplifier of a potion effect applied to an entity.

Examples

if the amplifier of haste of player >= 3:

Potion Effects

Type: Expression

Patterns: * [the] [(all [[of] the]|the)] [active] potion effects of %living entities/item types%

  • %living entities/item types%'[s] [(all [[of] the]|the)] [active] potion effects

Represents the active potion effects of entities and itemtypes.You can clear all potion effects of an entity/itemtype and add/remove a potion effect/type to/from an entity/itemtype.Do note you will not be able to clear the base potion effects of a potion item. In that case, just set the item to a water bottle.When adding a potion effect type (rather than a potion effect), it will default to 15 seconds with tier 1.

Examples

set {_p::*} to active potion effects of playerclear all the potion effects of playerclear all the potion effects of player's tooladd potion effects of player to potion effects of player's tooladd speed to potion effects of target entityremove speed and night vision from potion effects of player

Prefix/Suffix

Type: Expression

Patterns: * [the] [chat] (prefix|suffix) of %players%

  • %players%'[s] [chat] (prefix|suffix)

The prefix or suffix as defined in the server's chat plugin.

Examples

on chat:    cancel event    broadcast "%player's prefix%%player's display name%%player's suffix%: %message%" to the player's worldset the player's prefix to "[&lt;red&gt;Admin<reset>] "clear player's prefix

Projectile Critical State

Type: Expression

Patterns: * [the] (projectile|arrow) critical (state|ability|mode) of %projectiles%

  • %projectiles%'[s] (projectile|arrow) critical (state|ability|mode)

A projectile's critical state. The only currently accepted projectiles are arrows and tridents.

Examples

on shoot:    event-projectile is an arrow    set projectile critical mode of event-projectile to true

Protocol Version

Type: Expression

Patterns: * [the] [server] [(sent|required|fake)] protocol version [number]

The protocol version that will be sent as the protocol version of the server in a server list ping event. For more information and list of protocol versions visit wiki.vg.If this protocol version doesn't match with the protocol version of the client, the client will see the version string.But please note that, this expression has no visual effect over the version string. For example if the server uses PaperSpigot 1.12.2, and you make the protocol version 107 (1.9),the version string will not be "Paper 1.9", it will still be "Paper 1.12.2".But then you can customize the version string as you wish.Also if the protocol version of the player is higher than protocol version of the server, it will say"Server out of date!", and if vice-versa "Client out of date!" when you hover on the ping bars.This can be set in a server list ping event only(increase and decrease effects cannot be used because that wouldn't make sense).

Examples

on server list ping:    set the version string to "&lt;light green&gt;Version: &lt;orange&gt;%minecraft version%"    set the protocol version to 0 # 13w41a (1.7) - so the player will see the custom version string almost always

Queue (Experimental)

Type: Expression

Patterns: * [a] [new] queue [(of|with) %objects%]

Requires the using queues experimental feature flag to be enabled.Creates a new queue. A queue is a set of elements that can have things removed from the start and added to the end.Any value can be added to a queue. Adding a non-existent value (e.g. {variable that isn't set}) will have no effect. This means that removing an element from the queue will always return a value unless the queue is empty.Requesting an element from a queue (e.g. the 1st element of {queue}) also removes it from the queue.

Examples

set {queue} to a new queue add "hello" and "there" to {queue} broadcast the first element of {queue} # hello broadcast the first element of {queue} # there # queue is now emptyset {queue} to a new queue of "hello" and "there" broadcast the last element of {queue} # removes 'there' add "world" to {queue} broadcast the first 2 elements of {queue} # removes 'hello', 'world'

Queue Start/End (Experimental)

Type: Expression

Patterns: * [the] (start|end) of %queue%

  • %queue%'[s] (start|end)

Requires the using queues experimental feature flag to be enabled.The first or last element in a queue. Asking for this does not remove the element from the queue.This is designed for use with the add changer: to add or remove elements from the start or the end of the queue.

Examples

set {queue} to a new queue add "hello" to {queue} add "foo" to the start of {queue} broadcast the first element of {queue} # foo broadcast the first element of {queue} # hello # queue is now empty

Quit Reason

Type: Expression

Patterns: * [the] (quit|disconnect) (cause|reason)

The quit reason as to why a player disconnected in a quit event.

Examples

on quit:    quit reason was kicked    player is banned    clear {server::player::%uuid of player%::*}

Random

Type: Expression

Patterns: * [a] random %*type% [out] of %objects%

Gets a random item out of a set, e.g. a random player out of all players online.

Examples

give a diamond to a random player out of all playersgive a random item out of all items to the player

Random Character

Type: Expression

Patterns: * [a|%integer%] random [alphanumeric] character[s] (from|between) %text% (to|and) %text%

One or more random characters between two given characters. Use 'alphanumeric' if you want only alphanumeric characters.This expression uses the Unicode numerical code of a character to determine which characters are between the two given characters.If strings of more than one character are given, only the first character of each is used.

Examples

set {_captcha} to join (5 random characters between "a" and "z") with ""send 3 random alphanumeric characters between "0" and "z"

Random Numbers

Type: Expression

Patterns: * [a|%integer%] random (integer|number)[s] (from|between) %number% (to|and) %number%

A given amount of random numbers or integers between two given numbers. Use 'number' if you want any number with decimal parts, or use use 'integer' if you only want whole numbers.Please note that the order of the numbers doesn't matter, i.e. random number between 2 and 1 will work as well as random number between 1 and 2.

Examples

set the player's health to a random number between 5 and 10send "You rolled a %random integer from 1 to 6%!" to the playerset {_chances::*} to 5 random integers between 5 and 96set {_decimals::*} to 3 random numbers between 2.7 and -1.5

Random UUID

Type: Expression

Patterns: * [a] random uuid

Returns a random UUID.

Examples

set {_uuid} to random uuid

Raw Name

Type: Expression

Patterns: * (raw|minecraft|vanilla) name[s] of %item types%

The raw Minecraft material name of the given item. Note that this is not guaranteed to give same results on all servers.

Examples

raw name of tool of player

Raw String

Type: Expression

Patterns: * raw %texts%

Returns the string without formatting (colors etc.) and without stripping them from it, e.g. raw "&aHello There!" would output &aHello There!

Examples

send raw "&aThis text is unformatted!" to all players

Readied Arrow/Bow

Type: Expression

Patterns: * [the] (readied|selected|drawn) (arrow|bow)

The bow or arrow in a Ready Arrow event.

Examples

on player ready arrow:    selected bow's name is "Spectral Bow"    if selected arrow is not a spectral arrow:        cancel event

Redstone Block Power

Type: Expression

Patterns: * [the] redstone power of %blocks%

  • %blocks%'[s] redstone power

Power of a redstone block

Examples

if redstone power of targeted block is 15:    send "This block is very powerful!"

Region

Type: Expression

Patterns: * [the] [event-]region

The region involved in an event.This expression requires a supported regions plugin to be installed.

Examples

on region enter:    region is {forbidden region}    cancel the event

Region Members & Owners

Type: Expression

Patterns: * [(all|the)] (members|owner[s]) of [[the] region[s]] %regions%

  • [[the] region[s]] %regions%'[s] (members|owner[s])

A list of members or owners of a region.This expression requires a supported regions plugin to be installed.

Examples

on entering of a region:    message "You're entering %region% whose owners are %owners of region%"

Regions At

Type: Expression

Patterns: * [the] region[(s)] %direction% %locations%

All regions at a particular location.This expression requires a supported regions plugin to be installed.

Examples

On click on a sign:    line 1 of the clicked block is "[region info]"    set {_regions::*} to regions at the clicked block    if {_regions::*} is empty:        message "No regions exist at this sign."    else:        message "Regions containing this sign: &lt;gold&gt;%{_regions::*}%<r>."

Remaining Air

Type: Expression

Patterns: * [the] remaining air of %living entities%

  • %living entities%'[s] remaining air

How much time a player has left underwater before starting to drown.

Examples

if the player's remaining air is less than 3 seconds:    send "hurry, get to the surface!" to the player

Repeat String

Type: Expression

Patterns: * %texts% repeated %integer% time[s]

Repeats inputted strings a given amount of times.

Examples

broadcast nl and nl repeated 200 timesbroadcast "Hello World " repeated 5 timesif "aa" repeated 2 times is "aaaa":    broadcast "Ahhhh" repeated 100 times

Resonating Time

Type: Expression

Patterns: * [the] resonat(e|ing) time of %block%

  • %block%'[s] resonat(e|ing) time

Returns the resonating time of a bell.A bell will start resonating five game ticks after being rung, and will continue to resonate for 40 game ticks.

Examples

broadcast "The bell has been resonating for %resonating time of target block%"

Respawn Anchor Charges

Type: Expression

Patterns: * [the] [max[imum]] charge[s] of %blocks%

  • %blocks%'[s] [max[imum]] charge[s]

The charges of a respawn anchor.

Examples

set the charges of event-block to 3

Respawn location

Type: Expression

Patterns: * [the] respawn location

The location that a player should respawn at. This is used within the respawn event.

Examples

on respawn:    set respawn location to {example::spawn}

Result (Experimental)

Type: Expression

Patterns: * [the] result[s] of [running|executing] %executable% [with arg[ument]s %objects%]

Runs something (like a function) and returns its result.If the thing is expected to return multiple values, use 'results' instead of 'result'.

Examples

set {_function} to the function named "myFunction"set {_result} to the result of {_function}set {_list::*} to the results of {_function}set {_result} to the result of {_function} with arguments 13 and true

Reversed List

Type: Expression

Patterns: * reversed %objects%

Reverses given list.

Examples

set {_list::*} to reversed {_list::*}

Ringing Time

Type: Expression

Patterns: * [the] ring[ing] time of %block%

  • %block%'[s] ring[ing] time

Returns the ringing time of a bell.A bell typically rings for 50 game ticks.

Examples

broadcast "The bell has been ringing for %ringing time of target block%"

Rotated Quaternion/Vector

Type: Expression

Patterns: * %quaternions/vectors% rotated around [the] [global] (x|y|z)(-| )axis by %number%

  • %quaternions% rotated around [the|its|their] local (x|y|z)(-| )ax(i|e)s by %number%
  • %quaternions/vectors% rotated around [the] %vector% by %number%
  • %quaternions% rotated by x %number%, y %number%(, [and]| and) z %number%

Rotates a quaternion or vector around an axis a set amount of degrees, or around all 3 axes at once.Vectors can only be rotated around the global X/Y/Z axes, or an arbitrary vector axis.Quaternions are more flexible, allowing rotation around the global or local X/Y/Z axes, arbitrary vectors, or all 3 local axes at once.Global axes are the ones in the Minecraft world. Local axes are relative to how the quaternion is already oriented.Note that rotating a quaternion around a vector results in a rotation around the local vector, so results may not be what you expect. For example, rotating around vector(1, 0, 0) is the same as rotating around the local X axis.The same applies to rotations by all three axes at once. In addition, rotating around all three axes of a quaternion/display at once will rotate in ZYX order, meaning the Z rotation will be applied first and the X rotation last.

Examples

set {_new} to {_quaternion} rotated around x axis by 10 degreesset {_new} to {_vector} rotated around vector(1, 1, 1) by 45set {_new} to {_quaternion} rotated by x 45, y 90, z 135

Rotation Axis/Angle

Type: Expression

Patterns: * [the] rotation (angle|axis) of %quaternions%

  • %quaternions%'[s] rotation (angle|axis)

Returns the axis or angle that a quaternion will rotate by/around.All quaternions can be represented by a rotation of some amount around some axis, so this expression provides the ability to get that angle/axis.

Examples

set {_quaternion} to axisAngle(45, vector(1, 2, 3))send rotation axis of {_quaternion} # 1, 2, 3send rotation angle of {_quaternion} # 45set rotation angle of {_quaternion} to 135set rotation axis of {_quaternion} to vector(0, 1, 0)

Rounding

Type: Expression

Patterns: * [(a|the)] round[ed] down %number%

  • [(a|the)] round[ed] %number%
  • [(a|the)] round[ed] up %number%

Rounds numbers normally, up (ceiling) or down (floor) respectively.

Examples

set {var} to rounded health of playerset line 1 of the block to rounded "%(1.5 * player's level)%"add rounded down argument to the player's health

Saturation

Type: Expression

Patterns: * [the] saturation of %players%

  • %players%'[s] saturation

The saturation of a player. If used in a player event, it can be omitted and will default to event-player.

Examples

set saturation of player to 20

Scoreboard Tags

Type: Expression

Patterns: * [(all [[of] the]|the)] scoreboard tags of %entities%

  • %entities%'[s] scoreboard tags

Scoreboard tags are simple list of texts stored directly in the data of an entity.So this is a Minecraft related thing, not Bukkit, so the tags will not get removed when the server stops. You can visit visit Minecraft Wiki for more info.This is changeable and valid for any type of entity. Also you can use use the Has Scoreboard Tag condition to check whether an entity has the given tags.Requires Minecraft 1.11+ (actually added in 1.9 to the game, but added in 1.11 to Spigot).

Examples

on spawn of a monster:    if the spawn reason is mob spawner:        add "spawned by a spawner" to the scoreboard tags of event-entityon death of a monster:    if the attacker is a player:        if the victim doesn't have the scoreboard tag "spawned by a spawner":            add 1$ to attacker's balance

Script

Type: Expression

Patterns: * [the] [current] script

  • [the] script[s] [named] %texts%
  • [the] scripts in [directory|folder] %text%

The current script, or a script from its (file) name.If the script is enabled or disabled (or reloaded) this reference will become invalid.Therefore, it is recommended to obtain a script reference when needed.

Examples

on script load:    broadcast "Loaded %the current script%"on script load:    set {running::%script%} to trueon script unload:    set {running::%script%} to falseset {script} to the script named "weather.sk"loop the scripts in directory "quests/":    enable loop-value

Sea Level

Type: Expression

Patterns: * [the] sea level of %worlds%

  • %worlds%'[s] sea level

Gets the sea level of a world.

Examples

send "The sea level in your world is %sea level in player's world%"

Sea Pickles

Type: Expression

Patterns: * [the] [(min|max)[imum]] [sea] pickle(s| (count|amount)) of %blocks%

  • %blocks%'[s] [(min|max)[imum]] [sea] pickle(s| (count|amount))

An expression to obtain or modify data relating to the pickles of a sea pickle block.

Examples

on block break:    type of block is sea pickle    send "Wow! This stack of sea pickles contained %event-block's sea pickle count% pickles!"    send "It could've contained a maximum of %event-block's maximum sea pickle count% pickles!"    send "It had to have contained at least %event-block's minimum sea pickle count% pickles!"    cancel event    set event-block's sea pickle count to event-block's maximum sea pickle count    send "This bad boy is going to hold so many pickles now!!"

Seed of Loot Table

Type: Expression

Patterns: * [the] loot[[ ]table] seed[s] of %entities/blocks%

  • %entities/blocks%'[s] loot[[ ]table] seed[s]

Returns the seed of a loot table. Setting the seed of a block or entity that does not have a loot table will not do anything.

Examples

set {_seed} loot table seed of blockset loot table seed of entity to 123456789

Sent Command List

Type: Expression

Patterns: * [the] [sent] [server] command[s] list

The commands that will be sent to the player in a send commands to player event.Modifications will affect what commands show up for the player to tab complete. They will not affect what commands the player can actually run.Adding new commands to the list is illegal behavior and will be ignored.

Examples

on send command list:    set command list to command list where [input does not contain ":"]    remove "help" from command list

Server Icon

Type: Expression

Patterns: * [the] [((default)|(shown|sent))] [server] icon

Icon of the server in the server list. Can be set to an icon that loaded using theload server icon effect,or can be reset to the default icon in a server list ping.'default server icon' returns the default server icon (server-icon.png) always and cannot be changed.

Examples

on script load:    set {server-icons::default} to the default server icon

Sets

Type: Expression

Patterns: * [all [[of] the]|the|every] %*type%

Returns a list of all the values of a type. Useful for looping.

Examples

loop all attribute types:    set loop-value attribute of player to 10    message "Set attribute %loop-value% to 10!"

Shooter

Type: Expression

Patterns: * [the] shooter [of %projectile%]

The shooter of a projectile.

Examples

shooter is a skeleton

Shuffled List

Type: Expression

Patterns: * shuffled %objects%

Shuffles given list randomly. This is done by replacing indices by random numbers in resulting list.

Examples

set {_list::*} to shuffled {_list::*}

Sign Text

Type: Expression

Patterns: * [the] line %number% [of %block%]

  • [the] (1st|first|2nd|second|3rd|third|4th|fourth) line [of %block%]

A line of text on a sign. Can be changed, but remember that there is a 16 character limit per line (including color codes that use 2 characters each).

Examples

on rightclick on sign:    line 2 of the clicked block is "[Heal]":        heal the player    set line 3 to "%player%"

Skull Owner

Type: Expression

Patterns: * [the] (head|skull) owner of %slots/item types/item stacks/blocks%

  • %slots/item types/item stacks/blocks%'[s] (head|skull) owner

The skull owner of a player skull.

Examples

set {_owner} to the skull owner of event-blockset skull owner of {_block} to "Njol" parsed as offlineplayerset head owner of player's tool to {_player}

Slot Index

Type: Expression

Patterns: * [the] [(raw|unique)] index of %slots%

  • %slots%'[s] [(raw|unique)] index

Index of an an inventory slot. Other types of slots may or may not have indices. Note that comparing slots with numbers is also possible; if index of slot is same as the number, comparisonsucceeds. This expression is mainly for the cases where you must for some reason save the slot numbers.Raw index of slot is unique for the view, see Minecraft Wiki

Examples

if index of event-slot is 10:    send "You bought a pie!"if display name of player's top inventory is "Custom Menu": # 3 rows inventory    if raw index of event-slot > 27: # outside custom inventory        cancel event

Sorted List

Type: Expression

Patterns: * sorted %objects%

Sorts given list in natural order. All objects in list must be comparable; if they're not, this expression will return nothing.

Examples

set {_sorted::*} to sorted {_players::*}

Source Block

Type: Expression

Patterns: * [the] source block

The source block in a spread event.

Examples

on spread:    if the source block is a grass block:        set the source block to dirt

Spawn

Type: Expression

Patterns: * [the] spawn[s] [(point|location)[s]] [of %worlds%]

  • %worlds%'[s] spawn[s] [(point|location)[s]]

The spawn point of a world.

Examples

teleport all players to spawnset the spawn point of "world" to the player's location

Spawn Egg Entity

Type: Expression

Patterns: * [the] spawn egg entity of %item stacks/item types/slots%

  • %item stacks/item types/slots%'[s] spawn egg entity

Gets or sets the entity snapshot that the provided spawn eggs will spawn when used.

Examples

set {_item} to a zombie spawn eggbroadcast the spawn egg entity of {_item}spawn a pig at location(0,0,0):    set the max health of entity to 20    set the health of entity to 20    set {_snapshot} to the entity snapshot of entity    clear entityset the spawn egg entity of {_item} to {_snapshot}if the spawn egg entity of {_item} is {_snapshot}: # Minecraft 1.20.5+set the spawn egg entity of {_item} to (random element out of all entities)set the spawn egg entity of {_item} to a zombie

Spawn Reason

Type: Expression

Patterns: * [the] spawn[ing] reason

The spawn reason in a spawn event.

Examples

on spawn:    spawn reason is reinforcements or breeding    cancel event

Spawner Type

Type: Expression

Patterns: * [the] (spawner|entity|creature) type[s] of %blocks%

  • %blocks%'[s] (spawner|entity|creature) type[s]

Retrieves, sets, or resets the spawner's entity type

Examples

on right click:    if event-block is spawner:        send "Spawner's type is %target block's entity type%"

Special Number

Type: Expression

Patterns: * (NaN|(-|minus)) value

Special number values, namely NaN, Infinity and -Infinity

Examples

if {_number} is infinity value:

Spectator Target

Type: Expression

Patterns: * spectator target [of %players%]

  • %players%'[s] spectator target

Grabs the spectator target entity of the players.

Examples

on player start spectating of player:    message "&c%spectator target% currently has %{game::kills::%spectator target%}% kills!" to the playeron player stop spectating:    past spectator target was a zombie    set spectator target to the nearest skeleton

Speed

Type: Expression

Patterns: * [the] (walk[ing]|fl(y[ing]|ight))[( |-)]speed of %players%

  • %players%'[s] (walk[ing]|fl(y[ing]|ight))[( |-)]speed

A player's walking or flying speed. Both can be changed, but values must be between -1 and 1 (excessive values will be changed to -1 or 1 respectively). Negative values reverse directions.Please note that changing a player's speed will change their FOV just like potions do.

Examples

set the player's walk speed to 1increase the argument's fly speed by 0.1

Substring

Type: Expression

Patterns: * [the] (part|sub ) of %texts% (between|from) [ind(ex|ices)|character[s]] %number% (and|to) [(index|character)] %number%

  • [the] (first|last) [%number%] character[s] of %texts%
  • [the] %number% (first|last) characters of %texts%
  • [the] character[s] at [(index|position|indexes|indices|positions)] %numbers% (in|of) %texts%

Extracts part of a text. You can either get the first characters, the last characters, the character at index , or the characters between indices and . The indices and should be between 1 and the length of the text (other values will be fit into this range).

Examples

set {_s} to the first 5 characters of the text argumentmessage "%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 consoleset {_characters::*} to characters at 1, 2 and 7 in player's display namesend the last character of all players' names

TPS (ticks per second)

Type: Expression

Patterns: * tps from [the] last ([1] minute|1[ ]m[inute])

  • tps from [the] last 5[ ]m[inutes]
  • tps from [the] last 15[ ]m[inutes]
  • [the] tps

Returns the 3 most recent TPS readings, like the /tps command. This expression is only supported on some server software (PaperSpigot).

Examples

broadcast "%tps%"

Tag

Type: Expression

Patterns: * [minecraft|datapack|paper|custom] [item|block|entity [type]] tag %texts%

Represents a tag which can be used to classify items, blocks, or entities.Tags are composed of a value and an optional namespace: "minecraft:oak_logs".If you omit the namespace, one will be provided for you, depending on what kind of tag you're using. For example, tag "doors" will be the tag "minecraft:doors", while paper tag "doors" will be "paper:doors".minecraft tag will search through the vanilla tags, datapack tag will search for datapack-provided tags (a namespace is required here!), paper tag will search for Paper's custom tags if you are running Paper, and custom tag will look in the "skript" namespace for custom tags you've registered.You can also filter by tag types using "item", "block", or "entity".

Examples

minecraft tag "dirt" # minecraft:dirtpaper tag "doors" # paper:doorstag "skript:custom_dirt" # skript:custom_dirtcustom tag "dirt" # skript:dirtdatapack block tag "dirt" # minecraft:dirtdatapack tag "my_pack:custom_dirt" # my_pack:custom_dirttag "minecraft:mineable/pickaxe" # minecraft:mineable/pickaxecustom item tag "blood_magic_sk/can_sacrifice_with" # skript:blood_magic_sk/can_sacrifice_with

Tag Namespaced Key

Type: Expression

Patterns: * [the] [namespace[d]] key[s] of %minecraft tags%

  • %minecraft tags%'[s] [namespace[d]] key[s]

The namespaced key of a minecraft tag. This takes the form of "namespace:key", e.g. "minecraft:dirt".

Examples

broadcast namespaced keys of the tags of player's toolif the key of {_my-tag} is "minecraft:stone":    return true

Tags Contents

Type: Expression

Patterns: * [the] tag (contents|values) of %minecraft tag%

  • %minecraft tag%'[s] tag (contents|values)

Returns all the values that a tag contains.For item and block tags, this will return items. For entity tags, it will return entity datas (a creeper, a zombie).

Examples

broadcast tag values of minecraft tag "dirt"broadcast (first element of player's tool's block tags)'s tag contents

Tags of X

Type: Expression

Patterns: * [all [[of] the]|the] [minecraft|datapack|paper|custom] [item|block|entity [type]] tags of %item type/entity/entity type%

  • %item type/entity/entity type%'[s] [minecraft|datapack|paper|custom] [item|block|entity [type]] tags

Returns all the tags of an item, block, or entity.minecraft tag will return only the vanilla tags, datapack tag will return only datapack-provided tags, paper tag will return only Paper's custom tags (if you are running Paper), and custom tag will look in the "skript" namespace for custom tags you've registered.You can also filter by tag types using "item", "block", or "entity".

Examples

broadcast minecraft tags of dirtsend true if paper item tags of target block contains paper tag "doors"broadcast the block tags of player's tool

Tamer

Type: Expression

Patterns: * [the] tamer

The tamer of an entity. Can only be used in entity tame events. You can use 'event-entity' to refer tamed entity itself.

Examples

on tame:    if the tamer is a player:        send "someone tamed something!" to console

Target

Type: Expression

Patterns: * [the] target[[ed] %*entity type%] [of %living entities%] [ignoring blocks] [[with|at] ray[ ]size %number%]

  • %living entities%'[s] target[[ed] %*entity type%] [ignoring blocks] [[with|at] ray[ ]size %number%]

For players this is the entity at the crosshair.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 entitiesMay grab entities in unloaded chunks.

Examples

on entity target:    if entity's target is a player:        send "You're being followed by an %entity%!" to target of entityreset target of entity # Makes the entity target-lessdelete targeted entity of player # for players it will delete the targetdelete target of last spawned zombie # for entities it will make them target-less

Targeted Block

Type: Expression

Patterns: * [the] [(actual[ly]|exact)] target[ed] block[s] [of %living entities%]

  • %living entities%'[s] [(actual[ly]|exact)] target[ed] block[s]

The block at the crosshair. This regards all blocks that are not air as fully solid, e.g. torches will be like a solid stone block for this expression.The actual target block will regard the actual hit box of the block.

Examples

set target block of player to stoneset target block of player to oak_stairs[waterlogged=true]break target block of player using player's toolgive player 1 of type of target blockteleport player to location above target blockkill all entities in radius 3 around target block of playerset {_block} to actual target block of playerbreak actual target block of player

Teleport Cause

Type: Expression

Patterns: * [the] teleport (cause|reason|type)

The teleport cause within a player teleport event.

Examples

on teleport:    teleport cause is nether portal, end portal or end gateway    cancel event

Temperature

Type: Expression

Patterns: * [the] temperature[s] of %blocks%

  • %blocks%'[s] temperature[s]

Temperature at given block.

Examples

message "%temperature of the targeted block%"

Ternary

Type: Expression

Patterns: * %objects% if <.+>[,] (otherwise|else) %objects%

A shorthand expression for returning something based on a condition.

Examples

set {points} to 500 if {admin::%player's uuid%} is set else 100

Text Display Alignment

Type: Expression

Patterns: * [the] text alignment[s] [of %displays%]

  • %displays%'[s] text alignment[s]

Returns or changes the alignment setting of text displays.

Examples

set text alignment of the last spawned text display to left

Text Display Line Width

Type: Expression

Patterns: * [the] line width [of %displays%]

  • %displays%'[s] line width

Returns or changes the line width of text displays. Default is 200.

Examples

set the line width of the last spawned text display to 300

Text Display Opacity

Type: Expression

Patterns: * [the] [display] opacity [of %displays%]

  • %displays%'[s] [display] opacity

Returns or changes the opacity of text displays.Values are between -127 and 127. The value of 127 represents it being completely opaque.

Examples

set the opacity of the last spawned text display to -1 # Reset

Text Of

Type: Expression

Patterns: * [the] text[s] of %displays%

  • %displays%'[s] text[s]

Returns or changes the text/string of displays.Note that currently you can only use Skript chat codes when running Paper.

Examples

set text of the last spawned text display to "example"

The Egg

Type: Expression

Patterns: * [the] [thrown] egg

The egg thrown in a Player Egg Throw event.

Examples

spawn an egg at the egg

Time

Type: Expression

Patterns: * [the] time[s] [([with]in|of) %worlds%]

  • %worlds%'[s] time[s]

The time of a world.Use the "minecraft timespan" syntax to change the time according to Minecraft's time intervals.Since Minecraft uses discrete intervals for time (ticks), changing the time by real-world minutes or real-world seconds only changes it approximately.Removing an amount of time from a world's time will move the clock forward a day.

Examples

set time of world "world" to 2:00add 2 minecraft hours to time of world "world"add 54 real seconds to time of world "world" # approximately 1 minecraft hour

Time Played

Type: Expression

Patterns: * [the] time played of %offline players%

  • %offline players%'[s] time played

The amount of time a player has played for on the server. This info is stored in the player's statistics in the main world's data folder. Changing this will also change the player's stats which can be views in the client's statistics menu.Using this expression on offline players on Minecraft 1.14 and below will return nothing .

Examples

set {_t} to time played of playerif player's time played is greater than 10 minutes:    give player a diamond swordset player's time played to 0 seconds

Time Since/Until

Type: Expression

Patterns: * [the] time since %dates%

  • [the] (time [remaining]|remaining time) until %dates%

The time since a date has passed or the time until a date will pass.This expression will return 0 seconds if the time since or time until would be negative, e.g. if one tries to get the time since a future date.

Examples

send "%time since 5 minecraft days ago% has passed since 5 minecraft days ago!" to playersend "%time until {countdown::end}% until the game begins!" to player

Timespan Details

Type: Expression

Patterns: * [the] ((tick|second|minute|hour|day|week|month|year))s of %time spans%

  • %time spans%'[s] ((tick|second|minute|hour|day|week|month|year))s

Retrieve specific information of a timespan such as hours/minutes/etc.

Examples

set {_t} to difference between now and {Payouts::players::%uuid of player%::last-date}send "It has been %days of {_t}% day(s) since last payout."

Tool

Type: Expression

Patterns: * [the] ((tool|held item|weapon)|(off[ ]hand (tool|item))) [of %living entities%]

  • %living entities%'[s] ((tool|held item|weapon)|(off[ ]hand (tool|item)))

The item an entity is holding in their main or off hand.

Examples

player's tool is a pickaxeplayer's off hand tool is a shieldset tool of all players to a diamond swordset offhand tool of target entity to a bow

Total Experience

Type: Expression

Patterns: * [the] [total] experience of %entities%

  • %entities%'[s] [total] experience

The total experience, in points, of players or experience orbs.Adding to a player's experience will trigger Mending, but setting their experience will not.

Examples

set total experience of player to 100add 100 to player's experienceif player's total experience is greater than 100:    set player's total experience to 0    give player 1 diamond

Transform Reason

Type: Expression

Patterns: * [the] transform[ing] (cause|reason|type)

The transform reason within an entity entity transform event.

Examples

on entity transform:    transform reason is infection, drowned or frozen

Transformed List

Type: Expression

Patterns: * %objects% (transformed|mapped) (using|with) [<.+>]

  • %objects% (transformed|mapped) (using|with) (<.+>)

Transforms (or 'maps') a list's values using a given expression. This is akin to looping over the list and getting a modified version of each value.Indices cannot be retained with this expression. To retain indices, see the transform effect.

Examples

set {_a::*} to (1, 2, and 3) transformed using (input * 2 - 1, input * 2)# {_a::*} is now 1, 2, 3, 4, 5, and 6# get a list of the sizes of all clans without manually loopingset {_clan-sizes::*} to indices of {clans::*} transformed using [{clans::%input%::size}]

Type of

Type: Expression

Patterns: * [the] type of %entity types/item types/inventories/potion effects/block datas/enchantment types%

  • %entity types/item types/inventories/potion effects/block datas/enchantment types%'[s] type

Type of a block, item, entity, inventory, potion effect or enchantment type.Types of items, blocks and block datas are item types similar to them but have amountsof one, no display names and, on Minecraft 1.13 and newer versions, are undamaged.Types of entities and inventories are entity types and inventory types known to Skript.Types of potion effects are potion effect types.Types of enchantment types are enchantments.

Examples

on rightclick on an entity:    message "This is a %type of clicked entity%!"

UUID

Type: Expression

Patterns: * [the] UUID of %offline players/worlds/entities%

  • %offline players/worlds/entities%'[s] UUID

The UUID of a player, entity or world.In the future there will be an option to use a player's UUID instead of the name in variable names (i.e. when %player% is used), but for now this can be used.Please note that this expression does not work for offline players if you are under 1.8!

Examples

# prevents people from joining the server if they use the name of a player# who has played on this server at least once since this script has been addedon login:    if {uuid::%name of player%} exists:        {uuid::%name of player%} is not uuid of player        kick player due to "Someone with your name has played on this server before"    else:        set {uuid::%name of player%} to uuid of player

Unbreakable Items

Type: Expression

Patterns: * [un]breakable %item types%

Creates breakable or unbreakable copies of given items.

Examples

set {_item} to unbreakable iron swordgive breakable {_weapon} to all players

Unix Date

Type: Expression

Patterns: * [the] unix date of %numbers%

  • %numbers%'[s] unix date

Converts given Unix timestamp to a date. The Unix timespan represents the number of seconds elapsed since 1 January 1970.

Examples

unix date of 946684800 #1 January 2000 12:00 AM (UTC Time)

Unix Timestamp

Type: Expression

Patterns: * [the] unix timestamp of %dates%

  • %dates%'[s] unix timestamp

Converts given date to Unix timestamp. This is roughly how many seconds have elapsed since 1 January 1970.

Examples

unix timestamp of now

Unleash Reason

Type: Expression

Patterns: * [the] unleash[ing] reason

The unleash reason in an unleash event.

Examples

if the unleash reason is distance:    broadcast "The leash was snapped in half."

Value

Type: Expression

Patterns: * [the] %*type% value [at] %text% (from|in) %node%

  • [the] %*type% value of %valued thing%
  • [the] %*type% values of %valued things%
  • %valued thing%'s %*type% value
  • %valued things%'[s] %*type% values

Returns the value of something that has a value, e.g. a node in a config.The value is automatically converted to the specified type (e.g. text, number) where possible.

Examples

set {_node} to node "language" in the skript config broadcast the text value of {_node}set {_node} to node "update check interval" in the skript config broadcast text value of {_node} # text value of {_node} = "12 hours" (text) wait for {_node}'s timespan value # timespan value of {_node} = 12 hours (duration)

Value Within

Type: Expression

Patterns: * [the] (%*type%|value[s]) (within|in) %~objects%

Gets the value within objects. Usually used with variables to get the value they store rather than the variable itself, or with lists to get the values of a type.

Examples

set {_entity} to a random entity out of all entitiesdelete entity within {_entity} # This deletes the entity itself and not the value stored in the variableset {_list::*} to "something", 10, "test" and a zombiebroadcast the strings within {_list::*} # "something", "test"

Vector/Quaternion - WXYZ Component

Type: Expression

Patterns: * [the] [vector|quaternion] (w|x|y|z) [component[s]] of %vectors/quaternions%

  • %vectors/quaternions%'[s] [vector|quaternion] (w|x|y|z) [component[s]]

Gets or changes the W, X, Y or Z component of vectors/quaternions.You cannot use the W component with vectors; it is for quaternions only.

Examples

set {_v} to vector 1, 2, 3send "%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 1set y component of {_v} to 2set z component of {_v} to 3send "%x component of {_v}%, %y component of {_v}%, %z component of {_v}%"

Vectors - Angle Between

Type: Expression

Patterns: * [the] angle between [[the] vectors] %vector% and %vector%

Gets the angle between two vectors.

Examples

send "%the angle between vector 1, 0, 0 and vector 0, 1, 1%"

Vectors - Create Location from Vector

Type: Expression

Patterns: * %vector% to location in %world%

  • location (from|of) %vector% in %world%
  • %vector% [to location] in %world% with yaw %number% and pitch %number%
  • location (from|of) %vector% in %world% with yaw %number% and pitch %number%

Creates a location from a vector in a world.

Examples

set {_loc} to {_v} to location in world "world"set {_loc} to {_v} to location in world "world" with yaw 45 and pitch 90set {_loc} to location of {_v} in "world" with yaw 45 and pitch 90

Vectors - Create from Direction

Type: Expression

Patterns: * vector[s] [from] %directions%

  • %directions% vector[s]

Creates vectors from given directions.Relative directions are relative to the origin, (0, 0, 0). Therefore, the vector from the direction 'forwards' is (0, 0, 1).

Examples

set {_v} to vector from direction upwardsset {_v} to vector in direction of playerset {_v} to vector in horizontal direction of playerset {_v} to vector from facing of playerset {_v::*} to vectors from north, south, east, and west

Vectors - Create from XYZ

Type: Expression

Patterns: * [a] [new] vector [(from|at|to)] %number%,[ ]%number%(,[ ]| and )%number%

Creates a vector from x, y and z values.

Examples

set {_v} to vector 0, 1, 0

Vectors - Cross Product

Type: Expression

Patterns: * %vector% cross %vector%

Gets the cross product between two vectors.

Examples

send "%vector 1, 0, 0 cross vector 0, 1, 0%"

Vectors - Cylindrical Shape

Type: Expression

Patterns: * [a] [new] cylindrical vector [from|with] [radius] %number%, [yaw] %number%(,[ and]| and) [height] %number%

Forms a 'cylindrical shaped' vector using yaw to manipulate the current point.

Examples

loop 360 times:    set {_v} to cylindrical vector radius 1, yaw loop-value, height 2set {_v} to cylindrical vector radius 1, yaw 90, height 2

Vectors - Dot Product

Type: Expression

Patterns: * %vector% dot %vector%

Gets the dot product between two vectors.

Examples

set {_dot} to {_v1} dot {_v2}

Vectors - Length

Type: Expression

Patterns: * [the] (vector|standard|normal) length[s] of %vectors%

  • %vectors%'[s] (vector|standard|normal) length[s]

Gets or sets the length of a vector.

Examples

send "%standard length of vector 1, 2, 3%"set {_v} to vector 1, 2, 3set standard length of {_v} to 2send "%standard length of {_v}%"

Vectors - Location Vector Offset

Type: Expression

Patterns: * %location% offset by [[the] vectors] %vectors%

  • %location%[ ][][ ]%vectors%

Returns the location offset by vectors.

Examples

set {_loc} to {_loc} ~ {_v}

Vectors - Normalized

Type: Expression

Patterns: * normalize[d] %vector%

  • %vector% normalized

Returns the same vector but with length 1.

Examples

set {_v} to normalized {_v}

Vectors - Random Vector

Type: Expression

Patterns: * [a] random vector

Creates a random unit vector.

Examples

set {_v} to a random vector

Vectors - Spherical Shape

Type: Expression

Patterns: * [a] [new] spherical vector [(from|with)] [radius] %number%, [yaw] %number%(,[ and]| and) [pitch] %number%

Forms a 'spherical shaped' vector using yaw and pitch to manipulate the current point.

Examples

loop 360 times:    set {_v} to spherical vector radius 1, yaw loop-value, pitch loop-valueset {_v} to spherical vector radius 1, yaw 45, pitch 90

Vectors - Squared Length

Type: Expression

Patterns: * [the] squared length[s] of %vectors%

  • %vectors%'[s] squared length[s]

Gets the squared length of a vector.

Examples

send "%squared length of vector 1, 2, 3%"

Vectors - Vector Between Locations

Type: Expression

Patterns: * [the] vector (from|between) %location% (to|and) %location%

Creates a vector between two locations.

Examples

set {_v} to vector between {_loc1} and {_loc2}

Vectors - Vector Projection

Type: Expression

Patterns: * [vector] projection [of] %vector% on[to] %vector%

An expression to get the vector projection of two vectors.

Examples

set {_projection} to vector projection of vector(1, 2, 3) onto vector(4, 4, 4)

Vectors - Vector from Location

Type: Expression

Patterns: * [the] vector (of|from|to) %location%

  • %location%'s vector

Creates a vector from a location.

Examples

set {_v} to vector of {_loc}

Vectors - Vector from Yaw and Pitch

Type: Expression

Patterns: * [a] [new] vector (from|with) yaw %number% and pitch %number%

  • [a] [new] vector (from|with) pitch %number% and yaw %number%

Creates a vector from a yaw and pitch value.

Examples

set {_v} to vector from yaw 45 and pitch 45

Vectors - Velocity

Type: Expression

Patterns: * [the] velocit(y|ies) of %entities%

  • %entities%'[s] velocit(y|ies)

Gets or changes velocity of an entity.

Examples

set player's velocity to {_v}

Vehicle

Type: Expression

Patterns: * [the] vehicle[s] of %entities%

  • %entities%'[s] vehicle[s]

The vehicle an entity is in, if any. This can actually be any entity, e.g. spider jockeys are skeletons that ride on a spider, so the spider is the 'vehicle' of the skeleton.See also: passenger

Examples

vehicle of the player is a minecart

Version

Type: Expression

Patterns: * ([craft]bukkit|minecraft|skript)( |-)version

The version of Bukkit, Minecraft or Skript respectively.

Examples

message "This server is running Minecraft %minecraft version% on Bukkit %bukkit version%"message "This server is powered by Skript %skript version%"

Version String

Type: Expression

Patterns: * [the] [shown|custom] version [string|text]

The text to show if the protocol version of the server doesn't match with protocol version of the client. You can check the protocol version expression for more information about this.This can only be set in a server list ping event.

Examples

on server list ping:    set the protocol version to 0 # 13w41a (1.7), so it will show the version string always    set the version string to "&lt;light green&gt;Version: &lt;orange&gt;%minecraft version%"

View Distance

Type: Expression

Patterns: * [the] view distance[s] of %players%

  • %players%'[s] view distance[s]

The view distance of a player as set by the server. Can be changed.NOTE: This is the view distance sent by the server to the player.This has nothing to do with client side view distance settingsNOTE: 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 distance of player to 10set {_view} to view distance of playerreset view distance of all playersadd 2 to view distance of player

View Distance of Client

Type: Expression

Patterns: * [the] client view distance[s] of %players%

  • %players%'[s] client view distance[s]

The view distance of the client. Can not be changed. This differs from the server side view distance of player as this will retrieve the view distance the player has set on their client.

Examples

set {_clientView} to the client view distance of playerset view distance of player to client view distance of player

Villager Level/Experience

Type: Expression

Patterns: * [the] villager (level|experience) of %living entities%

  • %living entities%'[s] villager (level|experience)

Represents the level/experience of a villager.The level will determine which trades are available to players (value between 1 and 5, defaults to 1).When a villager's level is 1, they may lose their profession if they don't have a workstation.Experience works along with the leveling system, determining which level the villager will move to.Experience must be greater than or equal to 0.Learn more about villager levels on Minecraft Wiki

Examples

set {_level} to villager level of {_villager}set villager level of last spawned villager to 2add 1 to villager level of target entityremove 1 from villager level of event-entityreset villager level of event-entityset villager experience of last spawned entity to 100

Villager Profession

Type: Expression

Patterns: * [the] villager profession of %living entities%

  • %living entities%'[s] villager profession

Represents the profession of a villager/zombie villager.

Examples

set {_p} to villager profession of event-entityvillager profession of event-entity = nitwit professionset villager profession of {_villager} to librarian professiondelete villager profession of event-entity

Villager Type

Type: Expression

Patterns: * [the] villager type of %living entities%

  • %living entities%'[s] villager type

Represents the type of a villager/zombie villager. This usually represents the biome the villager is from.

Examples

set {_type} to villager type of {_villager}villager type of {_villager} = plainsset villager type of event-entity to plains

Weather

Type: Expression

Patterns: * [the] weather [(in|of) %worlds%]

  • %worlds%'[s] weather

The weather in the given or the current world.

Examples

set weather to clearweather in "world" is rainy

Whether

Type: Expression

Patterns: * whether <.+>

A shorthand for returning the result of a condition (true or false). This is functionally identical to using true if else false.

Examples

set {fly} to whether player can flybroadcast "Flying: %whether player is flying%"

Whitelist

Type: Expression

Patterns: * [the] white[ ]list

An expression for obtaining and modifying the server's whitelist.Players may be added and removed from the whitelist.The whitelist can be enabled or disabled by setting the whitelist to true or false respectively.

Examples

set the whitelist to falseadd all players to whitelistreset the whitelist

With Fire Resistance

Type: Expression

Patterns: * %item type% with[out] fire[ ]resistance

  • fire resistant %item type%

Creates a copy of an item with (or without) fire resistance.

Examples

set {_x} to diamond sword with fire resistanceequip player with netherite helmet without fire resistancedrop fire resistant stone at player

World

Type: Expression

Patterns: * [the] world [of %locations/entities/chunk%]

  • %locations/entities/chunk%'[s] world

The world the event occurred in.

Examples

world is "world_nether"teleport the player to the world's spawnset the weather in the player's world to rainset {_world} to world of event-chunk

World Environment

Type: Expression

Patterns: * [the] [world] environment of %worlds%

  • %worlds%'[s] [world] environment

The environment of a world

Examples

if environment of player's world is nether:    apply fire resistance to player for 10 minutes

World Seed

Type: Expression

Patterns: * [the] seed[s] (from|of) %worlds%

  • %worlds%'[s] seed[s]

The seed of given world. Note that it will be returned as Minecraft internally treats seeds, not as you specified it in world configuration.

Examples

broadcast "Seed: %seed of player's world%"

World from Name

Type: Expression

Patterns: * [the] world [(named|with name)] %text%

Returns the world from a string.

Examples

world named {game::world-name}the world "world"

Worlds

Type: Expression

Patterns: * [(all [[of] the]|the)] worlds

All worlds of the server, useful for looping.

Examples

loop all worlds:    broadcast "You're in %loop-world%" to loop-world

X Times

Type: Expression

Patterns: * %number% time[s]

  • once
  • twice
  • thrice

Integers between 1 and X, used in loops to loop X times.

Examples

loop 20 times:    broadcast "%21 - loop-number% seconds left.."    wait 1 second

X of Item

Type: Expression

Patterns: * %number% of %item stacks/item types/entity type%

An expression to be able to use a certain amount of items where the amount can be any expression. Please note that this expression is not stable and might be replaced in the future.

Examples

give level of player of pickaxes to the player

Yaw / Pitch

Type: Expression

Patterns: * [the] (yaw|pitch) of %entities/locations/vectors%

  • %entities/locations/vectors%'[s] (yaw|pitch)

The yaw or pitch of a location or vector.A yaw of 0 or 360 represents the positive z direction. Adding a positive number to the yaw of a player will rotate it clockwise.A pitch of 90 represents the negative y direction, or downward facing. A pitch of -90 represents upward facing. Adding a positive number to the pitch will rotate the direction downwards.Only Paper 1.19+ users may directly change the yaw/pitch of players.

Examples

log "%player%: %location of player%, %player's yaw%, %player's pitch%" to "playerlocs.log"set {_yaw} to yaw of playerset {_p} to pitch of target entityset pitch of player to -90 # Makes the player look upwards, Paper 1.19+ onlyadd 180 to yaw of target of player # Makes the target look behind themselves

Action Bar

Type: Effect

Patterns: * send [the] action[ ]bar [with text] %text% [to %players%]

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

Examples

send action bar "Hello player!" to player

Allow / Prevent Leash Drop

Type: Effect

Patterns: * (force|allow) [the] (lead|leash) [item] to drop

  • (block|disallow|prevent) [the] (lead|leash) [item] from dropping

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

Examples

on unleash:    if player is not set:        prevent the leash from dropping    else if player is op:        allow the leash to drop

Allow Aging

Type: Effect

Patterns: * lock age of %living entities%

  • prevent aging of %living entities%
  • prevent %living entities% from aging
  • unlock age of %living entities%
  • allow aging of %living entities%
  • allow %living entities% to age

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

Examples

on spawn of animal:    allow aging of entity

Apply Bone Meal

Type: Effect

Patterns: * apply [%number%] bone[ ]meal[s] [to %blocks%]

Applies bone meal to a crop, sapling, or composter

Examples

apply 3 bone meal to event-block

Apply Fishing Lure

Type: Effect

Patterns: * apply [the] lure enchantment bonus

  • remove [the] lure enchantment bonus

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

Examples

on fishing line cast:    apply lure enchantment bonus

Ban

Type: Effect

Patterns: * ban [and kick] %texts/offline players% [(by reason of|because [of]|on account of|due to) %text%] [for %time span%]

  • unban %texts/offline players%
  • ban [and kick] %players% by IP [(by reason of|because [of]|on account of|due to) %text%] [for %time span%]
  • unban %players% by IP
  • IP(-| )ban [and kick] %players% [(by reason of|because [of]|on account of|due to) %text%] [for %time span%]
  • (IP(-| )unban|un[-]IP[-]ban) %players%

Bans or unbans a player or an IP address.If a reason is given, it will be shown to the player when they try to join the server while banned.A length of ban may also be given to apply a temporary ban. If it is absent for any reason, a permanent ban will be used instead.We recommend that you test your scripts so that no accidental permanent bans are applied.Note that banning people does not kick them from the server.You can optionally use 'and kick' or consider using the kick effect after applying a ban.

Examples

unban playerban "127.0.0.1"IP-ban the player because "he is an idiot"ban player due to "inappropriate language" for 2 daysban and kick player due to "inappropriate language" for 2 days

Break Block

Type: Effect

Patterns: * break %blocks% [naturally] [using %item type%]

Breaks the block and spawns items as if a player had mined it You can add a tool, which will spawn items based on how that tool would break the block (ie: When using a hand to break stone, it drops nothing, whereas with a pickaxe it drops cobblestone)

Examples

on right click:    break clicked block naturallyloop blocks in radius 10 around player:    break loop-block using player's toolloop blocks in radius 10 around player:    break loop-block naturally using diamond pickaxe

Broadcast

Type: Effect

Patterns: * broadcast %objects% [(to|in) %worlds%]

Broadcasts a message to the server.

Examples

broadcast "Welcome %player% to the server!"broadcast "Woah! It's a message!"

Cancel Active Item

Type: Effect

Patterns: * (cancel|interrupt) [the] us[ag]e of %living entities%'[s] [active|current] item

Interrupts the action entities may be trying to complete.For example, interrupting eating, or drawing back a bow.

Examples

on damage of player:    if the victim's active tool is a bow:        interrupt the usage of the player's active item

Cancel Command Cooldown

Type: Effect

Patterns: * (cancel|ignore) [the] [current] [command] cooldown

  • un(cancel|ignore) [the] [current] [command] cooldown

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

Examples

command /nick &lt;text&gt;:    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

Cancel Drops

Type: Effect

Patterns: * (cancel|clear|delete) [the] drops [of (items|[e]xp[erience][s])]

  • (cancel|clear|delete) [the] (item|[e]xp[erience]) drops

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

Examples

on death of a zombie:    if name of the entity is "&cSpecial":        cancel drops of itemson break of a coal ore:    cancel the experience drops

Cancel Event

Type: Effect

Patterns: * cancel [the] event

  • uncancel [the] event

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

Examples

on damage:    victim is a player    victim has the permission "skript.god"    cancel the event

Change: Set/Add/Remove/Delete/Reset

Type: Effect

Patterns: * (add|give) %objects% to %~objects%

  • increase %~objects% by %objects%
  • give %~objects% %objects%
  • set %~objects% to %objects%
  • remove (all|every) %objects% from %~objects%
  • (remove|subtract) %objects% from %~objects%
  • (reduce|decrease) %~objects% by %objects%
  • (delete|clear) %~objects%
  • reset %~objects%

A very general effect that can change many expressions. Many expressions can only be set and/or deleted, while some can have things added to or removed from them.

Examples

# set:Set the player's display name to "&lt;red&gt;%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 thisadd argument to {blacklist::*}give a diamond pickaxe of efficiency 5 to the playerincrease the data value of the clicked block by 1# remove:remove 2 pickaxes from the victimsubtract 2.5 from {points::%uuid of player%}# remove all:remove every iron tool from the playerremove all minecarts from {entitylist::*}# delete:delete the block below the playerclear dropsdelete {variable}# reset:reset walk speed of playerreset chunk at the targeted block

Charge Entity

Type: Effect

Patterns: * make %entities% (un|not |non[-| ])

  • un %entities%

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

Examples

on spawn of creeper:    charge the event-entity

Color Items

Type: Effect

Patterns: * (dye|colo[u]r|paint) %item types% %color%

  • (dye|colo[u]r|paint) %item types% (%number%, %number%, %number%)

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

Examples

dye player's helmet bluecolor the player's tool red

Command

Type: Effect

Patterns: * [execute] [the] [bungee[cord]] command[s] %texts% [by %command senders%]

  • [execute] [the] %command senders% [bungee[cord]] command[s] %texts%
  • (let|make) %command senders% execute [[the] [bungee[cord]] command[s]] %texts%

Executes a command. This can be useful to use other plugins in triggers.If the command is a bungeecord side command, you can use the [bungeecord] option to execute command on the proxy.

Examples

make player execute command "/home"execute console command "/say Hello everyone!"execute player bungeecord command "/alert &6Testing Announcement!"

Conditional / Unconditional

Type: Effect

Patterns: * make command block[s] %blocks% [(un|not )]conditional

Sets whether the provided command blocks are conditional or not.

Examples

make command block {_block} conditionalmake command block {_block} unconditional if {_block} is conditional

Connect

Type: Effect

Patterns: * connect %players% to [proxy|bungeecord] [server] %text%

  • send %players% to [proxy|bungeecord] server %text%
  • transfer %players% to server %text% [on port %number%]

Connect a player to a server running on your proxy, or any server supporting transfers. Read below for more information.If the server is running Minecraft 1.20.5 or above, you may specify an IP and Port to transfer a player over to that server.When transferring players using an IP, the transfer will not complete if the accepts-transfers option isn't enabled in server.properties for the server specified.If the port is not provided, it will default to 25565.

Examples

connect all players to proxy server "hub"transfer player to server "my.server.com"transfer player to server "localhost" on port 25566

Consume Boosting Firework

Type: Effect

Patterns: * (prevent|disallow) [the] (boosting|used) firework from being consumed

  • allow [the] (boosting|used) firework to be consumed

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

Examples

on elytra boost:    if the used firework will be consumed:        prevent the used firework from being consume

Continue

Type: Effect

Patterns: * continue [this loop|[the] [current] loop]

  • continue [the] <-?\d+(_\d+)*>(st|nd|rd|th) loop

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

Examples

# Broadcast online moderatorsloop 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 counterset {_counter} to 11while {_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)"

Copy Into Variable

Type: Effect

Patterns: * copy %~objects% [in]to %~objects%

Copies objects into a variable. When copying a list over to another list, the source list and its sublists are also copied over.Note: Copying a value into a variable/list will overwrite the existing data.

Examples

set {_foo::bar} to 1set {_foo::sublist::foobar} to "hey"copy {_foo::*} to {_copy::*}broadcast indices of {_copy::*} # bar, sublistbroadcast {_copy::bar} # 1broadcast {_copy::sublist::foobar} # "hey!"

Damage/Heal/Repair

Type: Effect

Patterns: * damage %living entities/item types/slots% by %number% [heart[s]] [with [fake] [damage] cause %damage cause%]

  • heal %living entities% [by %number% [heart[s]]]
  • repair %item types/slots% [by %number%]

Damage, heal, or repair an entity or item.Servers running Spigot 1.20.4+ can optionally choose to specify a fake damage cause.

Examples

damage player by 5 heartsdamage player by 3 hearts with fake cause fallheal the playerrepair tool of player

Delay

Type: Effect

Patterns: * (wait|halt) [for] %time span%

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

Examples

wait 2 minuteshalt for 5 minecraft hourswait a tick

Detonate Entities

Type: Effect

Patterns: * detonate %entities%

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

Examples

detonate last launched firework

Do If

Type: Effect

Patterns: * <.+> if <.+>

Execute an effect if a condition is true.

Examples

on join:    give a diamond to the player if the player has permission "rank.vip"

Drop

Type: Effect

Patterns: * drop %item types/experience points% [%directions% %locations%] [without velocity]

Drops one or more items.

Examples

on death of creeper:    drop 1 TNT

Enable/Disable/Unload/Reload Script

Type: Effect

Patterns: * ((enable|load)|reload|disable|unload) script [file|named] %text%

  • ((enable|load)|reload|disable|unload) skript file %text%
  • ((enable|load)|reload|disable|unload) %scripts%

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

Examples

reload script "test"enable script file "testing"unload script file "script.sk"set {_script} to the script "MyScript.sk"reload {_script}

Enchant/Disenchant

Type: Effect

Patterns: * enchant %~item types% with %enchantment types%

  • disenchant %~item types%

Enchant or disenchant an existing item.

Examples

enchant the player's tool with sharpness 5disenchant the player's tool

Enforce Whitelist

Type: Effect

Patterns: * [un]enforce [the] [server] white[ ]list

Enforces or un-enforce a server's whitelist.All non-whitelisted players will be kicked upon enforcing the whitelist.

Examples

enforce the whitelistunenforce the whitelist

Entity Visibility

Type: Effect

Patterns: * hide %entities% [(from|for) %players%]

  • reveal %entities% [(to|for|from) %players%]

Change visibility of the given entities for the given players.If no players are given, will hide the entities from all online players.When reveal is used in combination of the hidden players expression and the viewers are not specified, this will default it to the given player in the hidden players expression.Note: all previously hidden entities (including players) will be visible when a player leaves and rejoins.

Examples

on spawn:    if event-entity is a chicken:        hide event-entityreveal hidden players of players

Equip

Type: Effect

Patterns: * equip [%living entities%] with %item types%

  • make %living entities% wear %item types%
  • unequip %item types% [from %living entities%]
  • unequip %living entities%'[s] (armo[u]r|equipment)

Equips or unequips an entity with the given itemtypes (usually armor).This effect will replace any armor that the entity is already wearing.

Examples

equip player with diamond helmetequip player with all diamond armorunequip diamond chestplate from playerunequip all armor from playerunequip player's armor

Exit

Type: Effect

Patterns: * (exit|stop) [trigger]

  • (exit|stop) [1|a|the|this] (section|loop|conditional)
  • (exit|stop) <-?\d+(_\d+)*> (section|loop|conditional)s
  • (exit|stop) all (section|loop|conditional)s

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

Examples

if player has any ore:    stopmessage "%player% has no ores!"loop blocks above the player:    loop-block is not air:        exit 2 sections    set loop-block to water

Explode Creeper

Type: Effect

Patterns: * instantly explode [creeper[s]] %living entities%

  • explode [creeper[s]] %living entities% instantly
  • ignite creeper[s] %living entities%
  • start (ignition|explosion) [process] of [creeper[s]] %living entities%
  • stop (ignition|explosion) [process] of [creeper[s]] %living entities%

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

Examples

start explosion of the last spawned creeperstop ignition of the last spawned creeper

Explosion

Type: Effect

Patterns: * [(create|make)] [an] explosion (of|with) (force|strength|power) %number% [%directions% %locations%] [with fire]

  • [(create|make)] [a] safe explosion (of|with) (force|strength|power) %number% [%directions% %locations%]
  • [(create|make)] [a] fake explosion [%directions% %locations%]
  • [(create|make)] [an] explosion[ ]effect [%directions% %locations%]

Creates an explosion of a given force. The Minecraft Wiki has an article on explosions which lists the explosion forces of TNT, creepers, etc.Hint: use a force of 0 to create a fake explosion that does no damage whatsoever, or use the explosion effect introduced in Skript 2.0.Starting with Bukkit 1.4.5 and Skript 2.0 you can use safe explosions which will damage entities but won't destroy any blocks.

Examples

create an explosion of force 10 at the playercreate an explosion of force 0 at the victim

Feed

Type: Effect

Patterns: * feed [the] %players% [by %number% [beef[s]]]

Feeds the specified players.

Examples

feed all playersfeed the player by 5 beefs

Force Attack

Type: Effect

Patterns: * make %living entities% attack %entity%

  • force %living entities% to attack %entity%

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

Examples

spawn a wolf at player's locationmake last spawned wolf attack player

Force Enchantment Glint

Type: Effect

Patterns: * (force|make) %item types% [to] [start] glint[ing]

  • (force|make) %item types% [to] (not|stop) glint[ing]
  • (clear|delete|reset) [the] enchantment glint override of %item types%
  • (clear|delete|reset) %item types%'s enchantment glint override

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

Examples

force {_items::*} to glintforce the player's tool to stop glinting

Force Respawn

Type: Effect

Patterns: * force %players% to respawn

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

Examples

on death of player:    force event-player to respawn

Generate Loot

Type: Effect

Patterns: * generate [the] loot (of|using) %loot table% [(with|using) %loot context%] in %inventories%

Generates the loot in the specified inventories from a loot table using a loot context. Not specifying a loot context will use a loot context with a location at the world's origin.Note that if the inventory is full, it will cause warnings in the console due to over-filling the inventory.

Examples

generate loot of loot table "minecraft:chests/simple_dungeon" using loot context at player in {_inventory}generate loot using "minecraft:chests/shipwreck_supply" in {_inventory}

Handedness

Type: Effect

Patterns: * make %living entities% (left|right)( |-)handed

Make mobs left or right-handed. This does not affect players.

Examples

spawn skeleton at spawn of world "world":    make entity left handedmake all zombies in radius 10 of player right handed

Hide Player from Server List

Type: Effect

Patterns: * hide %players% (in|on|from) [the] server list

  • hide %players%'[s] info[rmation] (in|on|from) [the] server list

Hides a player from the hover list and decreases the online players count (only if the player count wasn't changed before).

Examples

on server list ping:    hide {vanished::*} from the server list

Ignite/Extinguish

Type: Effect

Patterns: * (ignite|set fire to) %entities% [for %time span%]

  • (set|light) %entities% on fire [for %time span%]
  • extinguish %entities%

Lights entities on fire or extinguishes them.

Examples

ignite the playerextinguish the player

Item Tooltips

Type: Effect

Patterns: * (show|reveal|hide) %item types%'[s] [entire|additional] tool[ ]tip

  • (show|reveal|hide) [the] [entire|additional] tool[ ]tip of %item types%

Show or hide the tooltip of an item.If changing the 'entire' tooltip of an item, nothing will show up when a player hovers over it.If changing the 'additional' tooltip, only specific parts (which change per item) will be hidden.

Examples

hide the entire tooltip of player's toolhide {_item}'s additional tool tip

Keep Inventory / Experience

Type: Effect

Patterns: * keep [the] (inventory|items) [(and [e]xp[erience][s] [point[s]])]

  • keep [the] [e]xp[erience][s] [point[s]] [(and (inventory|items))]

Keeps the inventory or/and experiences of the dead player in a death event.

Examples

on death of a player:    if the victim is an op:        keep the inventory and experiences

Kick

Type: Effect

Patterns: * kick %players% [(by reason of|because [of]|on account of|due to) %text%]

Kicks a player from the server.

Examples

on place of TNT, lava, or obsidian:    kick the player due to "You may not place %block%!"    cancel the event

Kill

Type: Effect

Patterns: * kill %entities%

Kills an entity.

Examples

kill the playerkill all creepers in the player's worldkill all endermen, witches and bats

Knockback

Type: Effect

Patterns: * (apply knockback to|knock[back]) %living entities% [%direction%] [with (strength|force) %number%]

Apply the same velocity as a knockback to living entities in a direction. Mechanics such as knockback resistance will be factored in.

Examples

knockback player northknock victim (vector from attacker to victim) with strength 10

Launch firework

Type: Effect

Patterns: * (launch|deploy) [[a] firework [with effect[s]]] %firework effects% at %locations% [([with] (duration|power)|timed) %number%]

Launch firework effects at the given location(s).

Examples

launch ball large colored red, purple and white fading to light green and black at player's location with duration 1

Leash entities

Type: Effect

Patterns: * (leash|lead) %living entities% to %entity%

  • make %entity% (leash|lead) %living entities%
  • un(leash|lead) [holder of] %living entities%

Leash living entities to other entities. When trying to leash an Ender Dragon, Wither, Player, or a Bat, this effect will not work.See Spigot's Javadocs for more info.

Examples

on right click:    leash event-entity to player    send "&aYou leashed &2%event-entity%!" to player

Lightning

Type: Effect

Patterns: * (create|strike) lightning[([ ]effect)] %directions% %locations%

Strike lightning at a given location. Can use 'lightning effect' to create a lightning that does not harm entities or start fires.

Examples

strike lightning at the playerstrike lightning effect at the victim

Load Server Icon

Type: Effect

Patterns: * load [the] server icon (from|of) [the] [image] [file] %text%

Loads server icons from the given files. You can get the loaded icon using thelast loaded server icon expression.Please note that the image must be 64x64 and the file path starts from the server folder.

Examples

on load:    clear {server-icons::*}    loop 5 times:        load server icon from file "icons/%loop-number%.png"        add the last loaded server icon to {server-icons::*}on server list ping:    set the icon to a random server icon out of {server-icons::*}

Load World

Type: Effect

Patterns: * load [[the] world[s]] %texts% [with environment %environment%]

  • unload [[the] world[s]] %worlds% [without saving]

Load your worlds or unload your worldsThe 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 world "world_nether" with environment netherload the world "myCustomWorld"unload "world_nether"unload "world_the_end" without savingunload all worlds

Locally Suppress Warning

Type: Effect

Patterns: * [local[ly]] suppress [the] (conflict|variable save|[missing] conjunction|starting [with] expression[s]|deprecated syntax|unreachable code) warning[s]

Suppresses target warnings from the current script.

Examples

locally suppress missing conjunction warningssuppress the variable save warnings

Log

Type: Effect

Patterns: * log %texts% [(to|in) [file[s]] %texts%] [with [the|a] severity [of] (warning|severe)]

Writes text into a .log file. Skript will write these files to /plugins/Skript/logs.NB: Using 'server.log' as the log file will write to the default server log. Omitting the log file altogether will log the message as '[Skript] [<script>.sk] ' in the server log.

Examples

on join:    log "%player% has just joined the server!"on world change:    log "Someone just went to %event-world%!" to file "worldlog/worlds.log"on command:    log "%player% just executed %full command%!" to file "server/commands.log" with a severity of warning

Look At

Type: Effect

Patterns: * (force|make) %living entities% [to] (face [towards]|look [(at|towards)]) (%entity%['s (feet|eyes)]|(feet|eyes) of %entity%) [at [head] [rotation] speed %number%] [[and] max[imum] [head] pitch %number%]

  • (force|make) %living entities% [to] (face [towards]|look [(at|towards)]) %vector/location% [at [head] [rotation] speed %number%] [[and] max[imum] [head] pitch %number%]

Forces the mob(s) or player(s) to look at an entity, vector or location. Vanilla max head pitches range from 10 to 50.

Examples

force the player to look towards event-entity's feeton 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-entityforce {_enderman} to face the block 3 meters above {_location} at head rotation speed 100.5 and max head pitch -40

Make Adult/Baby

Type: Effect

Patterns: * make %living entities% [a[n]] (adult|baby)

  • force %living entities% to be[come] a[n] (adult|baby)

Force a animal to become an adult or baby.

Examples

on spawn of mob:    entity is not an adult    make entity an adult

Make Breedable

Type: Effect

Patterns: * make %living entities% breedable

  • unsterilize %living entities%
  • make %living entities% (not |non(-| )|un)breedable
  • sterilize %living entities%

Sets whether or not entities will be able to breed. Only works on animals.

Examples

on spawn of animal:    make entity unbreedable

Make Egg Hatch

Type: Effect

Patterns: * make [the] egg [not] hatch

Makes the egg hatch in a Player Egg Throw event.

Examples

on player egg throw:    # EGGS FOR DAYZ!    make the egg hatch

Make Fire Resistant

Type: Effect

Patterns: * make %item types% [not] (fire resistant|resistant to fire)

Makes items fire resistant.

Examples

make player's tool fire resistant:make {_items::*} not resistant to fire

Make Fly

Type: Effect

Patterns: * force %players% to [(start|stop)] fly[ing]

  • make %players% (start|stop) flying
  • make %players% fly

Forces a player to start/stop flying.

Examples

make player flyforce all players to stop flying

Make Incendiary

Type: Effect

Patterns: * make %entities% [not] incendiary

  • make %entities%'[s] explosion [not] (incendiary|fiery)
  • make [the] [event(-| )]explosion [not] (incendiary|fiery)

Sets if an entity's explosion will leave behind fire. This effect is also usable in an explosion prime event.

Examples

on explosion prime:    make the explosion fiery

Make Invisible

Type: Effect

Patterns: * make %living entities% (invisible|not visible)

  • make %living entities% (visible|not invisible)

Makes a living entity visible/invisible. This is not a potion and therefore does not have features such as a time limit or particles.When setting an entity to invisible while using an invisibility potion on it, the potion will be overridden and when it runs out the entity keeps its invisibility.

Examples

make target entity invisible

Make Invulnerable

Type: Effect

Patterns: * make %entities% (invulnerable|invincible)

  • make %entities% (not (invulnerable|invincible)|vulnerable|vincible)

Makes an entity invulnerable/not invulnerable.

Examples

make target entity invulnerable

Make Say

Type: Effect

Patterns: * make %players% (say|send [the] message[s]) %texts%

  • force %players% to (say|send [the] message[s]) %texts%

Forces a player to send a message to the chat. If the message starts with a slash it will force the player to use command.

Examples

make the player say "Hello."force all players to send the message "I love this server"

Make Sign Glow

Type: Effect

Patterns: * make %blocks/item types% have glowing text

  • make %blocks/item types% have (normal|non[-| ]glowing) text

Makes a sign (either a block or item) have glowing text or normal text

Examples

make target block of player have glowing text

Message

Type: Effect

Patterns: * (message|send [message[s]]) %objects% [to %command senders%] [from %player%]

Sends a message to the given player. Only styles writtenin 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 "A wild %player% appeared!"message "This message is a distraction. Mwahaha!"send "Your kill streak is %{kill streak::%uuid of player%}%." to playerif 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

Open Book

Type: Effect

Patterns: * (open|show) book %item type% (to|for) %players%

Opens a written book to a player.

Examples

open book player's tool to player

Open/Close Inventory

Type: Effect

Patterns: * (open|show) (((crafting [table]|workbench)|chest|anvil|hopper|dropper|dispenser) [(view|window|inventory)]|%inventory/inventory type%) (to|for) %players%

  • close [the] inventory [view] (to|of|for) %players%
  • close %players%'[s] inventory [view]

Opens an inventory to a player. The player can then access and modify the inventory as if it was a chest that he just opened.Please note that currently 'show' and 'open' have the same effect, but 'show' will eventually show an unmodifiable view of the inventory in the future.

Examples

show the victim's inventory to the playeropen the player's inventory for the player

Open/Close Lid

Type: Effect

Patterns: * (open|close) [the] lid[s] (of|for) %blocks%

  • (open|close) %blocks%'[s] lid[s]

Open or close the lid of the block(s).

Examples

open the lid of {_chest}close the lid of {_blocks::*}

Pathfind

Type: Effect

Patterns: * make %living entities% (pathfind|move) to[wards] %living entity/location% [at speed %number%]

  • make %living entities% stop (pathfinding|moving)

Make an entity pathfind towards a location or another entity. Not all entities can pathfind. If the pathfinding target is another entity, the entities may or may not continuously follow the target.

Examples

make all creepers pathfind towards playermake all cows stop pathfindingmake event-entity pathfind towards player at speed 1

Play Effect

Type: Effect

Patterns: * (play|show) %visual effects% (on|%directions%) %entities/locations% [(to %players%|in (radius|range) of %number%)]

  • (play|show) %number% %visual effects% (on|%directions%) %locations% [(to %players%|in (radius|range) of %number%)]

Plays a visual effect at a given location or on a given entity.Please note that some effects can only be played on entities, e.g. wolf hearts or the hurt effect, and that these are always visible to all players.

Examples

play wolf hearts on the clicked wolfshow mob spawner flames at the targeted block to the player

Play Sound

Type: Effect

Patterns: * play sound[s] %texts% [[with] seed %number%] [(in|from) %sound category%] [(at|with) volume %number%] [(and|at|with) pitch %number%] (at|on|from) %locations/entities% [(to|for) %players%]

  • play sound[s] %texts% [[with] seed %number%] [(in|from) %sound category%] [(at|with) volume %number%] [(and|at|with) pitch %number%] [(to|for) %players%] [(at|on|from) %locations/entities%]

Plays a sound at given location for everyone or just for given players, or plays a sound to specified players. Both Minecraft sound names and Spigot sound names are supported. Playing resource pack sounds are supported too. The sound category is 'master' by default. When running 1.19+, playing a sound from an entity directly will result in the sound coming from said entity, even while moving.If the sound is custom, a location emitter will follow the entity. Do note that pitch and volume are reflected based on the entity, and Minecraft may not use the values from this syntax.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 "block.note_block.pling"play sound "entity.experience_orb.pickup" with volume 0.5 to the playerplay 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+

Player Info Visibility

Type: Effect

Patterns: * hide [all] player [related] info[rmation] [(in|on|from) [the] server list]

  • (show|reveal) [all] player [related] info[rmation] [(in|to|on|from) [the] server list]

Sets whether all player related information is hidden in the server list.The Vanilla Minecraft client will display ??? (dark gray) instead of player counts and will not show thehover hist when hiding player info.The version string can override the ???.Also the Online Players Count andMax Players expressions will return -1 when hiding player info.

Examples

hide player infohide player related information in the server listreveal all player related info

Poison/Cure

Type: Effect

Patterns: * poison %living entities% [for %time span%]

  • (cure|unpoison) %living entities% [(from|of) poison]

Poison or cure a creature.

Examples

poison the playerpoison the victim for 20 secondscure the player from poison

Potion Effects

Type: Effect

Patterns: * apply %potion effects% to %living entities%

  • apply infinite [ambient] [potion of] %potion effect types% [potion] [[[of] tier] %number%] [without [any] particles] [(whilst hiding [the]|without (the|a)) [potion] icon] to %living entities% [replacing [the] existing effect]
  • apply [ambient] [potion of] %potion effect types% [potion] [[[of] tier] %number%] [without [any] particles] [(whilst hiding [the]|without (the|a)) [potion] icon] to %living entities% [for %time span%] [replacing [the] existing effect]

Apply or remove potion effects to/from entities.

Examples

apply ambient swiftness 2 to the playerremove haste from the victimon 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.4apply potion effects of player's tool to playerapply haste potion of tier 3 without any particles whilst hiding the potion icon to the player # Hide potions

Pull In Hooked Entity

Type: Effect

Patterns: * (reel|pull) in hook[ed] entity

Pull the hooked entity to the player.

Examples

on fishing state of caught entity:    pull in hooked entity

Push

Type: Effect

Patterns: * (push|thrust) %entities% %direction% [(at|with) (speed|velocity|force) %number%]

Push entities around.

Examples

push the player upwardspush the victim downwards at speed 0.5

PvP

Type: Effect

Patterns: * enable PvP [in %worlds%]

  • disable PVP [in %worlds%]

Set the PvP state for a given world.

Examples

enable PvP #(current world only)disable PvP in all worlds

Register Tag

Type: Effect

Patterns: * register [a[n]] [custom] (item|block|entity [type]) tag named %text% (containing|using) %entity types/item types%

Registers a new tag containing either items or entity datas. Note that items will NOT keep any information other than their type, so adding diamond sword named "test" to a tag is the same as adding diamond swordItem tags should be used for contexts where the item is not placed down, while block tags should be used for contexts where the item is placed. For example, and item tag could be "skript:edible", while a block tag would be "skript:needs_water_above".All custom tags will be given the namespace "skript", followed by the name you give it. The name must only include the characters A to Z, 0 to 9, and '/', '.', '_', and '-'. Otherwise, the tag will not register.Please note that two tags can share a name if they are of different types. Registering a new tag of the same name and type will overwrite the existing tag. Tags will reset on server shutdown.

Examples

register a new custom entity tag named "fish" using cod, salmon, tropical fish, and pufferfishregister an item tag named "skript:wasp_weapons/swords" containing diamond sword and netherite swordregister block tag named "pokey" containing sweet berry bush and bamboo saplingon player move:    block at player is tagged as tag "skript:pokey"    damage the player by 1 heart

Replace

Type: Effect

Patterns: * replace [(all|every)|[the] first] %texts% in %texts% with %text% [with case sensitivity]

  • replace [(all|every)|[the] first] %texts% with %text% in %texts% [with case sensitivity]
  • (replace [with|using] regex|regex replace) %texts% in %texts% with %text%
  • (replace [with|using] regex|regex replace) %texts% with %text% in %texts%
  • replace [all|every] %item types% in %inventories% with %item type%
  • replace [all|every] %item types% with %item type% in %inventories%

Replaces all occurrences of a given text or regex with another text. Please note that you can only change variables and a few expressions, e.g. a message or a line of a sign.

Examples

replace "<item>" in {_msg} with "[%name of player's tool%]"replace every "&" with "§" in line 1 of targeted block# Very simple chat censoron chat:    replace all "idiot" and "noob" with "****" in the message    regex replace "\b(idiot|noob)\b" with "****" in the message # Regex version using word boundaries for better resultsreplace all stone and dirt in player's inventory and player's top inventory with diamond

Return

Type: Effect

Patterns: * return %objects%

Makes a trigger or a section (e.g. a function) return a value

Examples

function double(i: number) :: number:    return 2 * {_i}function divide(i: number) returns number:    return {_i} / 2

Ring Bell

Type: Effect

Patterns: * ring %blocks% [from [the]] [%direction%]

  • (make|let) %entity% ring %blocks% [from [the]] [%direction%]

Causes a bell to ring.Optionally, the entity that rang the bell and the direction the bell should ring can be specified.A bell can only ring in two directions, and the direction is determined by which way the bell is facing.By default, the bell will ring in the direction it is facing.

Examples

make player ring target-block

Rotate

Type: Effect

Patterns: * rotate %vectors/quaternions/displays% around [the] [global] (x|y|z)(-| )axis by %number%

  • rotate %quaternions/displays% around [the|its|their] local (x|y|z)(-| )ax(i|e)s by %number%
  • rotate %vectors/quaternions/displays% around [the] %vector% by %number%
  • rotate %quaternions/displays% by x %number%, y %number%(, [and]| and) z %number%

Rotates displays, quaternions, or vectors around an axis a set amount of degrees, or around all 3 axes at once.Vectors can only be rotated around the global X/Y/Z axes, or an arbitrary vector axis.Quaternions are more flexible, allowing rotation around the global or local X/Y/Z axes, arbitrary vectors, or all 3 local axes at once.Global axes are the ones in the Minecraft world. Local axes are relative to how the quaternion is already oriented.Rotating a display is a shortcut for rotating its left rotation. If the right rotation needs to be modified, it should be acquired, rotated, and re-set.Note that rotating a quaternion/display around a vector results in a rotation around the local vector, so results may not be what you expect. For example, rotating quaternions/displays around vector(1, 0, 0) is the same as rotating around the local X axis.The same applies to rotations by all three axes at once. In addition, rotating around all three axes of a quaternion/display at once will rotate in ZYX order, meaning the Z rotation will be applied first and the X rotation last.

Examples

rotate {_quaternion} around x axis by 10 degreesrotate last spawned block display around y axis by 10 degreesrotate {_vector} around vector(1, 1, 1) by 45rotate {_quaternion} by x 45, y 90, z 135

Run (Experimental)

Type: Effect

Patterns: * run %executable% [with arg[ument]s %objects%]

  • execute %executable% [with arg[ument]s %objects%]

Executes a task (a function). Any returned result is discarded.

Examples

set {_function} to the function named "myFunction"run {_function}run {_function} with arguments {_things::*}

Save World

Type: Effect

Patterns: * save [[the] world[s]] %worlds%

Save all worlds or a given world manually.Note: saving many worlds at once may possibly cause the server to freeze.

Examples

save "world_nether"save all worlds

Send Block Change

Type: Effect

Patterns: * make %players% see %blocks% as %item type/block data%

Makes a player see a block as something it really isn't. BlockData support is only for MC 1.13+

Examples

make player see block at player as dirtmake player see target block as campfire[facing=south]

Send Resource Pack

Type: Effect

Patterns: * send [the] resource pack [from [[the] URL]] %text% to %players%

  • send [the] resource pack [from [[the] URL]] %text% with hash %text% to %players%

Request that the player's client download and switch resource packs. The client will download the resource pack in the background, and will automatically switch to it once the download is complete. The URL must be a direct download link.The hash is used for caching, the player won't have to re-download the resource pack that way. The hash must be SHA-1, you can get SHA-1 hash of your resource pack using this online tool.The resource pack request action can be used to check status of the sent resource pack request.

Examples

on join:    send the resource pack from "URL" with hash "hash" to the player

Shear

Type: Effect

Patterns: * [force] shear %living entities%

  • un[-]shear %living entities%

Shears or un-shears a shearable entity with drops by shearing and a 'sheared' sound. Using with 'force' will force this effect despite the entity's 'shear state'. Please note that..: - 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

on rightclick on a sheep holding a sword:    shear the clicked sheep    chance of 10%    force shear the clicked sheep

Silence Entity

Type: Effect

Patterns: * silence %entities%

  • unsilence %entities%
  • make %entities% silent
  • make %entities% not silent

Controls whether or not an entity is silent.

Examples

make target entity silent

Sort

Type: Effect

Patterns: * sort %~objects% [in (descending|ascending) order] [(by|based on) <.+>]

Sorts a list variable using either the natural ordering of the contents or the results of the given expression. Be warned, this will overwrite the indices of the list variable.When using the full sort %~objects% (by|based on) pattern, the input expression can be used to refer to the current item being sorted. (See input expression for more information.)

Examples

set {_words::*} to "pineapple", "banana", "yoghurt", and "apple"sort {_words::*} # alphabetical sortsort {_words::*} by length of input # shortest to longestsort {_words::*} in descending order by length of input # longest to shortestsort {_words::*} based on {tastiness::%input%} # sort based on custom value

Stop Server

Type: Effect

Patterns: * (stop|shut[ ]down) [the] server

  • restart [the] server

Stops or restarts the server. If restart is used when the restart-script spigot.yml option isn't defined, the server will stop instead.

Examples

stop the serverrestart server

Stop Sound

Type: Effect

Patterns: * stop (all sound[s]|sound[s] %texts%) [(in [the]|from) %sound category%] [(from playing to|for) %players%]

  • stop playing sound[s] %texts% [(in [the]|from) %sound category%] [(to|for) %players%]

Stops specific or all sounds from playing to a group of players. Both Minecraft sound names and Spigot sound names are supported. Resource pack sounds are supported too. The sound category is 'master' by default. A sound can't be stopped from a different category. Please note that sound names can get changed in any Minecraft or Spigot version, or even removed from Minecraft itself.

Examples

stop sound "block.chest.open" for the playerstop playing sounds "ambient.underwater.loop" and "ambient.underwater.loop.additions" to the playerstop all sounds for all playersstop sound in the record category

Swing Hand

Type: Effect

Patterns: * make %living entities% swing [their] [main] hand

  • make %living entities% swing [their] off[ ]hand

Makes an entity swing their hand. This does nothing if the entity does not have an animation for swinging their hand.

Examples

make player swing their main hand

Tame / Untame

Type: Effect

Patterns: * un %entities%

Tame a tameable entity (horse, parrot, cat, etc.).

Examples

tame {_horse}untame {_horse}

Teleport

Type: Effect

Patterns: * [force] teleport %entities% (to|%direction%) %location% [[while] retaining %teleport flags%]

Teleport an entity to a specific location. This effect is delayed by default on Paper, meaning certain syntax such as the return effect for functions cannot be used after this effect.The keyword 'force' indicates this effect will not be delayed, which may cause lag spikes or server crashes when using this effect to teleport entities to unloaded chunks.Teleport flags are settings to retain during a teleport. Such as direction, passengers, x coordinate, etc.

Examples

teleport the player to {home::%uuid of player%}teleport the attacker to the victimon dismount:    cancel event    teleport the player to {server::spawn} retaining vehicle and passengers

Text Display Drop Shadow

Type: Effect

Patterns: * (apply|add) (drop|text) shadow to [[the] text of] %displays%

  • (apply|add) (drop|text) shadow to %displays%'[s] text
  • (remove|clear) (drop|text) shadow from [[the] text of] %displays%
  • (remove|clear) (drop|text) shadow from %displays%'[s] text

Applies or removes drop shadow from the displayed text on a text display.

Examples

apply drop shadow to last spawned text displayif {_display} has drop shadow:    remove drop shadow from the text of {_display}

Text Display See Through Blocks

Type: Effect

Patterns: * make %displays% visible through (blocks|walls)

  • force %displays% to be visible through (blocks|walls)
  • (prevent|block) %displays% from being (visible|seen) through (blocks|walls)

Forces a text display to either be or not be visible through blocks.

Examples

force last spawned text display to be visible through wallsprevent all text displays from being visible through walls

Title - Reset

Type: Effect

Patterns: * reset [the] title[s] [of %players%]

  • reset [the] %players%'[s] title[s]

Resets the title of the player to the default values.

Examples

reset the titles of all playersreset the title

Title - Send

Type: Effect

Patterns: * send title %text% [with subtitle %text%] [to %players%] [for %time span%] [with fade[(-| )]in %time span%] [[and] [with] fade[(-| )]out %time span%]

  • send subtitle %text% [to %players%] [for %time span%] [with fade[(-| )]in %time span%] [[and] [with] fade[(-| )]out %time span%]

Sends a title/subtitle to the given player(s) with optional fadein/stay/fadeout times for Minecraft versions 1.11 and above. If you're sending only the subtitle, it will be shown only if there's a title displayed at the moment, otherwise it will be sent with the next title. To show only the subtitle, use: send title " " with subtitle "yourtexthere" to player.Note: if no input is given for the times, it will keep the ones from the last title sent, use the reset title effect to restore the default values.

Examples

send title "Competition Started" with subtitle "Have fun, Stay safe!" to player for 5 secondssend title "Hi %player%" to playersend title "Loot Drop" with subtitle "starts in 3 minutes" to all playerssend title "Hello %player%!" with subtitle "Welcome to our server" to player for 5 seconds with fadein 1 second and fade out 1 secondsend subtitle "Party!" to all players

Toggle

Type: Effect

Patterns: * (close|turn off|de[-]activate) %blocks%

  • (toggle|switch) [[the] state of] %blocks%
  • (open|turn on|activate) %blocks%

Toggle the state of a block.

Examples

# use arrows to toggle switches, doors, etc.on projectile hit:    projectile is arrow    toggle the block at the arrow

Toggle Custom Name Visibility

Type: Effect

Patterns: * (show|hide) [the] (custom|display)[ ]name of %entities%

  • (show|hide) %entities%'[s] (custom|display)[ ]name

Toggles the custom name visibility of an entity.

Examples

show the custom name of event-entityhide target's display name

Toggle Flight

Type: Effect

Patterns: * (allow|enable) (fly|flight) (for|to) %players%

  • (disallow|disable) (fly|flight) (for|to) %players%

Toggle the flight mode of a player.

Examples

allow flight to event-player

Toggle Picking Up Items

Type: Effect

Patterns: * allow %living entities% to pick([ ]up items| items up)

  • (forbid|disallow) %living entities% (from|to) pick([ing | ]up items|[ing] items up)

Determines whether living entities are able to pick up items or not

Examples

forbid player from picking up itemssend "You can no longer pick up items!" to playeron drop:    if player can't pick    up items:        allow player to pick up items

Transform List

Type: Effect

Patterns: * (transform|map) %~objects% (using|with) <.+>

Transforms (or 'maps') a list's values using a given expression. This is akin to looping over the list and setting each value to a modified version of itself.Evaluates the given expression for each element in the list, replacing the original element with the expression's result.If the given expression returns a single value, the indices of the list will not change. If the expression returns multiple values, then then indices will be reset as a single index cannot contain multiple values.Only variable lists can be transformed with this effect. For other lists, see the transform expression.

Examples

set {_a::*} to 1, 2, and 3transform {_a::*} using input * 2# {_a::*} is now 2, 4, and 6# get a list of the sizes of all clans without manually loopingset {_clan-sizes::*} to indices of {clans::*}transform {_clan-sizes::*} using {clans::%input%::size}# set all existing values of a list to 0:transform {_list::*} to 0

Tree

Type: Effect

Patterns: * (grow|create|generate) tree [of type %tree type%] %directions% %locations%

  • (grow|create|generate) %tree type% %directions% %locations%

Creates a tree.This may require that there is enough space above the given location and that the block below is dirt/grass, but it is possible that the tree will just grow anyways, possibly replacing every block in its path.

Examples

grow a tall redwood tree above the clicked block

Update Block

Type: Effect

Patterns: * update %blocks% (as|to be) %block data% [without [neighbo[u]r[ing]|adjacent] [physic[s]] update[s]]

Updates the blocks by setting them to a selected blockUsing 'without physics' will not send updates to the surrounding blocks of the blocks being set.Example: Updating a block next to a sand block in the air 'without physics' will not cause the sand block to fall.

Examples

update {_blocks::*} as gravelupdate {_blocks::*} to be sand without physics updatesupdate {_blocks::*} as stone without neighbouring updates

Vehicle

Type: Effect

Patterns: * (make|let|force) %entities% [to] (ride|mount) [(in|on)] %entities/entity types%

  • (make|let|force) %entities% [to] (dismount|(dismount|leave) [(from|of)] [(any|the[ir]|his|her)] vehicle[s])
  • (eject|dismount) [(any|the)] passenger[s] (of|from) %entities%

Makes an entity ride another entity, e.g. a minecart, a saddled pig, an arrow, etc.

Examples

make the player ride a saddled pigmake the attacker ride the victim

op/deop

Type: Effect

Patterns: * [de[-]]op %offline players%

Grant/revoke a user operator state.

Examples

op the playerdeop all players

Shoot

Type: EffectSection

Patterns: * shoot %entity types% [from %living entities/locations%] [(at|with) (speed|velocity) %number%] [%direction%]

  • (make|let) %living entities/locations% shoot %entity types% [(at|with) (speed|velocity) %number%] [%direction%]

Shoots a projectile (or any other entity) from a given entity or location.

Examples

shoot arrow from all players at speed 2shoot a pig from all players:    add event-entity to {_projectiles::*}

Spawn

Type: EffectSection

Patterns: * (spawn|summon) %entity types/entity snapshots% [%directions% %locations%]

  • (spawn|summon) %number% of %entity types/entity snapshots% [%directions% %locations%]

Spawns entities. This can be used as an effect and as a section.If it is used as a section, the section is run before the entity is added to the world.You can modify the entity in this section, using for example 'event-entity' or 'cow'. Do note that other event values, such as 'player', won't work in this section.If you're spawning a display and want it to be empty on initialization, like not having a block display be stone, set hidden config node 'spawn empty displays' to true.Note that when spawning an entity via entity snapshots, the code within the section will not run instantaneously as compared to spawning normally (via 'a zombie').

Examples

spawn 3 creepers at the targeted blockspawn a ghast 5 meters above the playerspawn a zombie at the player:    set name of the zombie to ""spawn a block display of a ladder[waterlogged=true] at location above player:    set billboard of event-display to center # allows the display to rotate around the center axis

Alphanumeric

Type: Condition

Patterns: * %texts% (is|are) alphanumeric

  • %texts% (isn't|is not|aren't|are not) alphanumeric

Checks if the given string is alphanumeric.

Examples

if the argument is not alphanumeric:    send "Invalid name!"

Bell Is Resonating

Type: Condition

Patterns: * %blocks% (is|are) resonating

  • %blocks% (isn't|is not|aren't|are not) resonating

Checks to see if a bell is currently resonating.A bell will start resonating five game ticks after being rung, and will continue to resonate for 40 game ticks.

Examples

target block is resonating

Bell Is Ringing

Type: Condition

Patterns: * %blocks% (is|are) ringing

  • %blocks% (isn't|is not|aren't|are not) ringing

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

Examples

target block is ringing

Can Age

Type: Condition

Patterns: * %living entities% can (age|grow (up|old[er]))

  • %living entities% (can't|cannot|can not) (age|grow (up|old[er]))

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

Examples

on breeding:    entity can't age    broadcast "An immortal has been born!" to player

Can Breed

Type: Condition

Patterns: * %living entities% can (breed|be bred)

  • %living entities% (can't|cannot|can not) (breed|be bred)

Checks whether or not a living entity can be bred.

Examples

on right click on living entity:    event-entity can't breed    send "Turns out %event-entity% is not breedable. Must be a Skript user!" to player

Can Build

Type: Condition

Patterns: * %players% (can|(is|are) allowed to) build %directions% %locations%

  • %players% (can('t|not)|(is|are)(n't| not) allowed to) build %directions% %locations%

Tests whether a player is allowed to build at a certain location.This condition requires a supported regions plugin to be installed.

Examples

command /setblock &lt;material&gt;:    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

Can Fly

Type: Condition

Patterns: * %players% can fly

  • %players% (can't|cannot|can not) fly

Whether a player is allowed to fly.

Examples

player can fly

Can Hold

Type: Condition

Patterns: * %inventories% (can hold|ha(s|ve) [enough] space (for|to hold)) %item types%

  • %inventories% (can(no|')t hold|(ha(s|ve) not|ha(s|ve)n't|do[es]n't have) [enough] space (for|to hold)) %item types%

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

Examples

block can hold 200 cobblestoneplayer has enough space for 64 feathers

Can Pick Up Items

Type: Condition

Patterns: * %living entities% can pick([ ]up items| items up)

  • %living entities% (can't|cannot|can not) pick([ ]up items| items up)

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

Examples

if player can pick items up:    send "You can pick up items!" to playeron drop:    if player can't pick    up items:        send "Be careful, you won't be able to pick that up!" to player

Can See

Type: Condition

Patterns: * %entities% (is|are) [visible|invisible] for %players%

  • %players% can see %entities%
  • %entities% (is|are)(n't| not) [visible|invisible] for %players%
  • %players% can('t| not) see %entities%

Checks whether the given players can see the provided entities.

Examples

if sender can't see the player-argument:    message "who dat?"if the player can see the last spawned entity:    message "hello there!"

Can See Chat Colors

Type: Condition

Patterns: * %players% can see chat colo[u]r[s|ing]

  • %players% (can't|cannot|can not) see chat colo[u]r[s|ing]

Checks whether a player can see chat colors.

Examples

if player can see chat colors:    send "Find the red word in <red>this<reset> message."else:    send "You cannot partake in finding the colored word."

Can See Messages

Type: Condition

Patterns: * %player% can see all messages [in chat]

  • %player% can only see (commands|system messages) [in chat]
  • %player% can('t|[ ]not) see any (command[s]|message[s]) [in chat]
  • %player% can('t|[ ]not) see all messages [in chat]
  • %player% can('t|[ ]not) only see (commands|system messages) [in chat]

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

Examples

if player can see all messages:    send "You can see all messages."if player can only see commands:    send "This game doesn't work with commands-only chat."if player can't see any messages:    send action bar "Server shutting down in 5 minutes!"

Chance

Type: Condition

Patterns: * chance of %number%[(%)]

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

Examples

chance of 50%:    drop a diamondchance of {chance}% # {chance} between 0 and 100chance of {chance} # {chance} between 0 and 1

Comparison

Type: Condition

Patterns: * [(neither)] %objects% ((is|are)[(n't| not| neither)] ((greater|more|higher|bigger|larger) than|above)|>) %objects%

  • [(neither)] %objects% ((is|are)[(n't| not| neither)] (greater|more|higher|bigger|larger|above) [than] or (equal to|the same as)|>=) %objects%
  • [(neither)] %objects% ((is|are)[(n't| not| neither)] ((less|smaller|lower) than|below)|<) %objects%
  • [(neither)] %objects% ((is|are)[(n't| not| neither)] (less|smaller|lower|below) [than] or (equal to|the same as)|<=) %objects%
  • [(neither)] %objects% ((is|are) (not|neither)|isn't|aren't|!=) [equal to] %objects%
  • [(neither)] %objects% (is|are|=) [(equal to|the same as)] %objects%
  • [(neither)] %objects% (is|are) between %objects% and %objects%
  • [(neither)] %objects% (is not|are not|isn't|aren't) between %objects% and %objects%
  • [(neither)] %objects% (was|were)[(n't| not| neither)] ((greater|more|higher|bigger|larger) than|above) %objects%
  • [(neither)] %objects% (was|were)[(n't| not| neither)] (greater|more|higher|bigger|larger|above) [than] or (equal to|the same as) %objects%
  • [(neither)] %objects% (was|were)[(n't| not| neither)] ((less|smaller|lower) than|below) %objects%
  • [(neither)] %objects% (was|were)[(n't| not| neither)] (less|smaller|lower|below) [than] or (equal to|the same as) %objects%
  • [(neither)] %objects% ((was|were) (not|neither)|wasn't|weren't) [equal to] %objects%
  • [(neither)] %objects% (was|were) [(equal to|the same as)] %objects%
  • [(neither)] %objects% (was|were) between %objects% and %objects%
  • [(neither)] %objects% (was not|were not|wasn't|weren't) between %objects% and %objects%
  • [(neither)] %objects% (will be|(will (not|neither) be|won't be)) ((greater|more|higher|bigger|larger) than|above) %objects%
  • [(neither)] %objects% (will be|(will (not|neither) be|won't be)) (greater|more|higher|bigger|larger|above) [than] or (equal to|the same as) %objects%
  • [(neither)] %objects% (will be|(will (not|neither) be|won't be)) ((less|smaller|lower) than|below) %objects%
  • [(neither)] %objects% (will be|(will (not|neither) be|won't be)) (less|smaller|lower|below) [than] or (equal to|the same as) %objects%
  • [(neither)] %objects% ((will (not|neither) be|won't be)|(isn't|aren't|is not|are not) (turning|changing) [in]to) [equal to] %objects%
  • [(neither)] %objects% (will be [(equal to|the same as)]|(is|are) (turning|changing) [in]to) %objects%
  • [(neither)] %objects% will be between %objects% and %objects%
  • [(neither)] %objects% (will not be|won't be) between %objects% and %objects%

A very general condition, it simply compares two values. Usually you can only compare for equality (e.g. block is/isn't of ), but some values can also be compared using greater than/less than. In that case you can also test for whether an object is between two others.Note: This is the only element where not all patterns are shown. It has actually another two sets of similar patters, but with (was|were) or will be instead of (is|are) respectively, which check different time states of the first expression.

Examples

the clicked block is a stone slab or a double stone slabtime in the player's world is greater than 8:00the creature is not an enderman or an ender dragon

Contains

Type: Condition

Patterns: * %inventories% (has|have) %item types% [in [(the[ir]|his|her|its)] inventory]

  • %inventories% (doesn't|does not|do not|don't) have %item types% [in [(the[ir]|his|her|its)] inventory]
  • %inventories/texts/objects% contain[s] %item types/texts/objects%
  • %inventories/texts/objects% (doesn't|does not|do not|don't) contain %item types/texts/objects%

Checks whether an inventory contains an item, a text contains another piece of text, a container contains something, or a list (e.g. {list variable::*} or 'drops') contains another object.

Examples

block contains 20 cobblestoneplayer has 4 flint and 2 iron ingots{list::*} contains 5

Damage Cause

Type: Condition

Patterns: * [the] damage (was|is|has)[n('|o)t] [been] (caused|done|made) by %damage cause%

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

Examples

# make players use their potions of fire resistance whenever they take any kind of fire damageon 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 circumstanceson 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

Do Respawn Anchors Work

Type: Condition

Patterns: * respawn anchors [do[(n't| not)]] work in %worlds%

Checks whether or not respawn anchors work in a world.

Examples

respawn anchors work in world "world_nether"

Egg Will Hatch

Type: Condition

Patterns: * [the] egg (will|will not|won't) hatch

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

Examples

on player egg throw:    if an entity won't hatch:        send "Better luck next time!" to the player

Entity Is Sheared

Type: Condition

Patterns: * %living entities% (is|are) (sheared|shorn)

  • %living entities% (isn't|is not|aren't|are not) (sheared|shorn)

Checks whether entities are sheared. This condition only works on cows, sheep and snowmen for versions below 1.19.4.

Examples

if targeted entity of player is sheared:    send "This entity has nothing left to shear!" to player

Entity is Wet

Type: Condition

Patterns: * %entities% (is|are) wet

  • %entities% (isn't|is not|aren't|are not) wet

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

Examples

if player is wet:

Entity is in Liquid

Type: Condition

Patterns: * %entities% (is|are) in (water|lava|[a] bubble[ ]column|rain)

  • %entities% (isn't|is not|aren't|are not) in (water|lava|[a] bubble[ ]column|rain)

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

Examples

if player is in rain:if player is in water:player is in lava:player is in bubble column

Event Cancelled

Type: Condition

Patterns: * [the] event is cancel[l]ed

  • [the] event (is not|isn't) cancel[l]ed

Checks whether or not the event is cancelled.

Examples

on click:    if event is cancelled:        broadcast "no clicks allowed!"

Exists/Is Set

Type: Condition

Patterns: * %~objects% (exist[s]|(is|are) set)

  • %~objects% (do[es](n't| not) exist|(is|are)(n't| not) set)

Checks whether a given expression or variable is set.

Examples

{teams::%player's uuid%::preferred-team} is not seton damage:    projectile exists    broadcast "%attacker% used a %projectile% to attack %victim%!"

Fishing Lure Applied

Type: Condition

Patterns: * lure enchantment bonus is (applied|active)

  • lure enchantment bonus is(n't| not) (applied|active)

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

Examples

on fishing line cast:    if lure enchantment bonus is applied:        cancel event

Has AI

Type: Condition

Patterns: * %living entities% (has|have) (ai|artificial intelligence)

  • %living entities% (doesn't|does not|do not|don't) have (ai|artificial intelligence)

Checks whether an entity has AI.

Examples

target entity has ai

Has Chat Filtering

Type: Condition

Patterns: * %players% (has|have) (chat|text) filtering (on|enabled)

  • %players% (doesn't|does not|do not|don't) have (chat|text) filtering (on|enabled)

Checks whether a player has chat filtering enabled.

Examples

if player doesn't have chat filtering enabled:send "<gray>This server may contain mature chat messages. You have been warned!" to player

Has Client Weather

Type: Condition

Patterns: * %players% (has|have) [a] (client|custom) weather [set]

  • %players% (doesn't|does not|do not|don't) have [a] (client|custom) weather [set]

Checks whether the given players have a custom client weather

Examples

if the player has custom weather:    message "Your custom weather is %player's weather%"

Has Custom Model Data

Type: Condition

Patterns: * %item types% (has|have) [custom] model data

  • %item types% (doesn't|does not|do not|don't) have [custom] model data

Check if an item has a custom model data tag

Examples

player's tool has custom model data

Has Glowing Text

Type: Condition

Patterns: * %blocks/item types% (has|have) glowing text

  • %blocks/item types% (doesn't|does not|do not|don't) have glowing text

Checks whether a sign (either a block or an item) has glowing text

Examples

if target block has glowing text

Has Item Cooldown

Type: Condition

Patterns: * %players% (has|have) [([an] item|a)] cooldown (on|for) %item types%

  • %players% (has|have) %item types% on [(item|a)] cooldown
  • %players% (doesn't|does not|do not|don't) have [([an] item|a)] cooldown (on|for) %item types%
  • %players% (doesn't|does not|do not|don't) have %item types% on [(item|a)] cooldown

Check whether a cooldown is active on the specified material for a specific player.

Examples

if player has player's tool on cooldown:    send "You can't use this item right now. Wait %item cooldown of player's tool for player%"

Has Item Tooltips

Type: Condition

Patterns: * [the] [entire|additional] tool[ ]tip[s] of %item types% (is|are) (shown|hidden)

  • [the] [entire|additional] tool[ ]tip[s] of %item types% (isn't|is not|aren't|are not) (shown|hidden)
  • %item types%'[s] [entire|additional] tool[ ]tip[s] (is|are) (shown|hidden)
  • %item types%'[s] [entire|additional] tool[ ]tip[s] (isn't|is not|aren't|are not) (shown|hidden)

Whether the entire or additional tooltip of an item is shown or hidden.The 'entire tooltip' is what shows to the player when they hover an item (i.e. name, lore, etc.).The 'additional tooltip' hides certain information from certain items (potions, maps, books, fireworks, and banners).

Examples

send true if entire tooltip of player's tool is shownif additional tooltip of {_item} is hidden:

Has Line of Sight

Type: Condition

Patterns: * %living entities% (has|have) [a] [direct] line of sight to %entities/locations%

  • %living entities% does(n't| not) have [a] [direct] line of sight to %entities/locations%
  • %living entities% (has|have) no [direct] line of sight to %entities/locations%

Checks whether living entities have an unobstructed line of sight to other entities or locations.

Examples

player has direct line of sight to location 5 blocks to the right of playervictim has line of sight to attackerplayer has no line of sight to location 100 blocks in front of player

Has Loot Table

Type: Condition

Patterns: * %blocks/entities% (has|have) [a] loot[ ]table

  • %blocks/entities% (doesn't|does not|do not|don't) have [a] loot[ ]table

Checks whether an entity or block has a loot table. The loot tables of chests will be deleted when the chest is opened or broken.

Examples

set event-block to chestif event-block has a loot table:    # this will never happen, because it doesn't have a loot table.set loot table of event-block to "minecraft:chests/simple_dungeon"if event-block has a loot table:    # this will happen, because it now has a loot table.

Has Metadata

Type: Condition

Patterns: * %metadata holders% (has|have) metadata [(value|tag)[s]] %texts%

  • %metadata holders% (doesn't|does not|do not|don't) have metadata [(value|tag)[s]] %texts%

Checks whether a metadata holder has a metadata tag.

Examples

if player has metadata value "healer":

Has Permission

Type: Condition

Patterns: * %command senders% (has|have) [the] permission[s] %texts%

  • %command senders% (doesn't|does not|do not|don't) have [the] permission[s] %texts%

Test whether a player has a certain permission.

Examples

player has permission "skript.tree"victim has the permission "admin":    send "You're attacking an admin!" to attacker

Has Played Before

Type: Condition

Patterns: * %offline players% [(has|have|did)] [already] play[ed] [on (this|the) server] (before|already)

  • %offline players% (has not|hasn't|have not|haven't|did not|didn't) [(already|yet)] play[ed] [on (this|the) server] (before|already|yet)

Checks whether a player has played on this server before. You can also use on first join if you want to make triggers for new players.

Examples

player has played on this server beforeplayer hasn't played before

Has Potion

Type: Condition

Patterns: * %living entities% (has|have) potion[s] [effect[s]] %potion effect types%

  • %living entities% (doesn't|does not|do not|don't) have potion[s] [effect[s]] %potion effect types%

Checks whether the given living entities have specific potion effects.

Examples

if player has potion speed:    send "You are sonic!"if all players have potion effects speed and haste:    broadcast "You are ready to MINE!"

Has Resource Pack

Type: Condition

Patterns: * %players% (has|have) [a] resource pack [(loaded|installed)]

  • %players% (doesn't|does not|do not|don't) have [a] resource pack [(loaded|installed)]

Checks whether the given players have a server resource pack loaded. Please note that this can't detect player's own resource pack, only the resource pack that sent by the server.

Examples

if the player has a resource pack loaded:

Has Scoreboard Tag

Type: Condition

Patterns: * %entities% (has|have) [the] score[ ]board tag[s] %texts%

  • %entities% (doesn't|does not|do not|don't) have [the] score[ ]board tag[s] %texts%

Checks whether the given entities has the given scoreboard tags.

Examples

if the targeted armor stand has the scoreboard tag "test tag":

Ignition Process

Type: Condition

Patterns: * [creeper[s]] %living entities% ((is|are)|(isn't|is not|aren't|are not)) going to explode

  • [creeper[s]] %living entities% ((is|are)|(isn't|is not|aren't|are not)) in the (ignition|explosion) process
  • creeper[s] %living entities% ((is|are)|(isn't|is not|aren't|are not)) ignited

Checks if a creeper is going to explode.

Examples

if the last spawned creeper is going to explode:    loop all players in radius 3 of the last spawned creeper        send "RUN!!!" to the loop-player

In The Past/Future

Type: Condition

Patterns: * %dates% (is|are)[(n't| not)] in the (past|future)

  • %dates% ha(s|ve)[(n't| not)] passed

Checks whether a date is in the past or future.Note that using the 'now' expression will not be in the past or future when used directly in the condition.

Examples

set {_date} to nowwait 5 secondsif {_date} is in the past:    # this will be trueif now is in the future:    # this will be falseset {_dates::*} to 1 day from now, 12 days from now, and 1 year from nowif {_dates::*} are in the future:    # this will be trueif {_dates::*} have passed:    # this will be false

Is Adult

Type: Condition

Patterns: * %living entities% (is|are) [an] adult

  • %living entities% (isn't|is not|aren't|are not) [an] adult

Checks whether or not a living entity is an adult.

Examples

on drink:    event-entity is not an adult    kill event-entity

Is Alive

Type: Condition

Patterns: * %entities% (is|are) (alive|dead)

  • %entities% (isn't|is not|aren't|are not) (alive|dead)

Checks whether an entity is alive. Works for non-living entities too.

Examples

if {villager-buddy::%player's uuid%} is not dead:on shoot:    while the projectile is alive:

Is Baby

Type: Condition

Patterns: * %living entities% (is|are) a (child|baby)

  • %living entities% (isn't|is not|aren't|are not) a (child|baby)

Checks whether or not a living entity is a baby.

Examples

on drink:    event-entity is a baby    kill event-entity

Is Banned

Type: Condition

Patterns: * %offline players/texts% (is|are) banned

  • %players/texts% (is|are) IP[(-| )]banned
  • %offline players/texts% (isn't|is not|aren't|are not) banned
  • %players/texts% (isn't|is not|aren't|are not) IP[(-| )]banned

Checks whether a player or IP is banned.

Examples

player is bannedvictim is not IP-banned"127.0.0.1" is banned

Is Bed/Anchor Spawn

Type: Condition

Patterns: * [the] respawn location (was|is)[(n'| no)t] [a] (bed|respawn anchor)

Checks what the respawn location of a player in the respawn event is.

Examples

on respawn:    the respawn location is a bed    broadcast "%player% is respawning in their bed! So cozy!"

Is Block

Type: Condition

Patterns: * %item types% (is|are) ([a] block|blocks)

  • %item types% (isn't|is not|aren't|are not) ([a] block|blocks)

Checks whether an item is a block.

Examples

player's held item is a block{list::*} are blocks

Is Block Redstone Powered

Type: Condition

Patterns: * %blocks% (is|are) redstone powered

  • %blocks% (is|are) indirectly redstone powered
  • %blocks% (is|are)(n't| not) redstone powered
  • %blocks% (is|are)(n't| not) indirectly redstone powered

Checks if a block is indirectly or directly powered by redstone

Examples

if clicked block is redstone powered:    send "This block is well-powered by redstone!"if clicked block is indirectly redstone powered:    send "This block is indirectly redstone powered."

Is Blocking

Type: Condition

Patterns: * %players% (is|are) (blocking|defending) [with [a] shield]

  • %players% (isn't|is not|aren't|are not) (blocking|defending) [with [a] shield]

Checks whether a player is blocking with their shield.

Examples

on damage of player:    victim is blocking    damage attacker by 0.5 hearts

Is Burning

Type: Condition

Patterns: * %entities% (is|are) (burning|ignited|on fire)

  • %entities% (isn't|is not|aren't|are not) (burning|ignited|on fire)

Checks whether an entity is on fire, e.g. a zombie due to being in sunlight, or any entity after falling into lava.

Examples

# increased attack against burning targetsvictim is burning:    increase damage by 2

Is Charged

Type: Condition

Patterns: * %entities% (is|are) (charged|powered)

  • %entities% (isn't|is not|aren't|are not) (charged|powered)

Checks if a creeper, wither, or wither skull is charged (powered).

Examples

if the last spawned creeper is charged:    broadcast "A charged creeper is at %location of last spawned creeper%"

Is Climbing

Type: Condition

Patterns: * %living entities% (is|are) climbing

  • %living entities% (isn't|is not|aren't|are not) climbing

Whether a living entity is climbing, such as a spider up a wall or a player on a ladder.

Examples

spawn a spider at location of spawnwait a secondif the last spawned spider is climbing:    message"The spider is now climbing!"

Is Conditional

Type: Condition

Patterns: * %blocks% (is|are) [un]conditional

  • %blocks% (isn't|is not|aren't|are not) [un]conditional

Checks whether a command block is conditional or not.

Examples

if {_block} is conditional:    make {_block} unconditional

Is Custom Name Visible

Type: Condition

Patterns: * %entities%'[s] custom name[s] (is|are) visible

  • %entities%'[s] custom name[s] (isn't|is not|are not|aren't) visible
  • custom name of %entities% (is|are) visible
  • custom name of %entities% (isn't|is not|are not|aren't) visible

Checks if an entity's custom name is visible.

Examples

send true if target's custom name is visible

Is Edible

Type: Condition

Patterns: * %item types% (is|are) edible

  • %item types% (isn't|is not|aren't|are not) edible

Checks whether an item is edible.

Examples

steak is edibleplayer's tool is edible

Is Empty

Type: Condition

Patterns: * %inventories/slots/texts/numbered thing% (is|are) empty

  • %inventories/slots/texts/numbered thing% (isn't|is not|aren't|are not) empty

Checks whether an inventory, an inventory slot, a queue, or a text is empty.

Examples

player's inventory is empty

Is Enchanted

Type: Condition

Patterns: * %item types% (is|are) enchanted [with %enchantment type%]

  • %item types% (isn't|is not|aren't|are not) enchanted [with %enchantment type%]

Checks whether an item is enchanted.

Examples

tool of the player is enchanted with efficiency 2helm, chestplate, leggings or boots are enchanted

Is Evenly Divisible By

Type: Condition

Patterns: * %numbers% (is|are) evenly divisible by %number%

  • %numbers% (isn't|is not|aren't|are not) evenly divisible by %number%
  • %numbers% can be evenly divided by %number%
  • %numbers% (can't|can[ ]not) be evenly divided by %number%

Check if a number is evenly divisible by another number.

Examples

if 5 is evenly divisible by 5:if 11 cannot be evenly divided by 10:

Is Fire Resistant

Type: Condition

Patterns: * %item types% (is|are) (fire resistant|resistant to fire)

  • %item types% (isn't|is not|aren't|are not) (fire resistant|resistant to fire)

Checks whether an item is fire resistant.

Examples

if player's tool is fire resistant:if {_items::*} aren't resistant to fire:

Is Fish Hook in Open Water

Type: Condition

Patterns: * %entities% (is|are) in open water[s]

  • %entities% (isn't|is not|aren't|are not) in open water[s]

Checks whether the fish hook is in open water.Open water is defined by a 5x4x5 area of water, air and lily pads. If in open water, treasure items may be caught.

Examples

on fish catch:    if fish hook is in open water:        send "You will catch a shark soon!"

Is Flammable

Type: Condition

Patterns: * %item types% (is|are) flammable

  • %item types% (isn't|is not|aren't|are not) flammable

Checks whether an item is flammable.

Examples

wood is flammableplayer's tool is flammable

Is Flying

Type: Condition

Patterns: * %players% (is|are) flying

  • %players% (isn't|is not|aren't|are not) flying

Checks whether a player is flying.

Examples

player is not flying

Is From A Mob Spawner

Type: Condition

Patterns: * %entities% (is|are) from a [mob] spawner

  • %entities% (isn't|aren't|is not|are not) from a [mob] spawner
  • %entities% (was|were) spawned (from|by) a [mob] spawner
  • %entities% (wasn't|weren't|was not|were not) spawned (from|by) a [mob] spawner

Checks if an entity was spawned from a mob spawner.

Examples

send whether target is from a mob spawner

Is Frozen

Type: Condition

Patterns: * %entities% (is|are) frozen

  • %entities% (isn't|is not|aren't|are not) frozen

Checks whether an entity is frozen.

Examples

if player is frozen:    kill player

Is Fuel

Type: Condition

Patterns: * %item types% (is|are) [furnace] fuel

  • %item types% (isn't|is not|aren't|are not) [furnace] fuel

Checks whether an item can be used as fuel in a furnace.

Examples

on right click on furnace:    if player's tool is not fuel:        send "Please hold a valid fuel item in your hand"        cancel event

Is Gliding

Type: Condition

Patterns: * %living entities% (is|are) gliding

  • %living entities% (isn't|is not|aren't|are not) gliding

Checks whether a living entity is gliding.

Examples

if player is gliding

Is Hand Raised

Type: Condition

Patterns: * %living entities%'[s] [main] hand[s] (is|are) raised

  • %living entities%'[s] [main] hand[s] (isn't|is not|aren't|are not) raised
  • [main] hand[s] of %living entities% (is|are) raised
  • [main] hand[s] of %living entities% (isn't|is not|aren't|are not) raised
  • %living entities%'[s] off[ |-]hand[s] (is|are) raised
  • %living entities%'[s] off[ |-]hand[s] (isn't|is not|aren't|are not) raised
  • off[ |-]hand[s] of %living entities% (is|are) raised
  • off[ |-]hand[s] of %living entities% (isn't|is not|aren't|are not) raised

Checks whether an entity has one or both of their hands raised.Hands are raised when an entity is using an item (eg: blocking, drawing a bow, eating).

Examples

on damage of player:    if victim's main hand is raised:        drop player's tool at player        set player's tool to air

Is Holding

Type: Condition

Patterns: * [%living entities%] ha(s|ve) %item types% in [main] hand

  • [%living entities%] (is|are) holding %item types% [in main hand]
  • [%living entities%] ha(s|ve) %item types% in off[(-| )]hand
  • [%living entities%] (is|are) holding %item types% in off[(-| )]hand
  • [%living entities%] (ha(s|ve) not|do[es]n't have) %item types% in [main] hand
  • [%living entities%] (is not|isn't) holding %item types% [in main hand]
  • [%living entities%] (ha(s|ve) not|do[es]n't have) %item types% in off[(-| )]hand
  • [%living entities%] (is not|isn't) holding %item types% in off[(-| )]hand

Checks whether a player is holding a specific item. Cannot be used with endermen, use 'entity is [not] an enderman holding ' instead.

Examples

player is holding a stickvictim isn't holding a sword of sharpness

Is In Love

Type: Condition

Patterns: * %living entities% (is|are) in lov(e|ing) [state|mode]

  • %living entities% (isn't|is not|aren't|are not) in lov(e|ing) [state|mode]

Checks whether or not a living entity is in love.

Examples

on spawn of living entity:    if entity is in love:broadcast "That was quick!"

Is Incendiary

Type: Condition

Patterns: * %entities% ((is|are) incendiary|cause[s] a[n] (incendiary|fiery) explosion)

  • %entities% ((is not|are not|isn't|aren't) incendiary|(does not|do not|doesn't|don't) cause[s] a[n] (incendiary|fiery) explosion)
  • the [event(-| )]explosion (is|(is not|isn't)) (incendiary|fiery)

Checks if an entity will create fire when it explodes. This condition is also usable in an explosion prime event.

Examples

on explosion prime:    if the explosion is fiery:        broadcast "A fiery explosive has been ignited!"

Is Infinite

Type: Condition

Patterns: * %potion effects% (is|are) infinite

  • %potion effects% (isn't|is not|aren't|are not) infinite

Checks whether potion effects are infinite.

Examples

all of the active potion effects of the player are infinite

Is Interactable

Type: Condition

Patterns: * %item types% (is|are) interactable

  • %item types% (isn't|is not|aren't|are not) interactable

Checks wether or not a block is interactable.

Examples

on block break:    if event-block is interactable:        cancel event        send "You cannot break interactable blocks!"

Is Invisible

Type: Condition

Patterns: * %living entities% (is|are) (invisible|visible)

  • %living entities% (isn't|is not|aren't|are not) (invisible|visible)

Checks whether a living entity is invisible.

Examples

target entity is invisible

Is Invulnerable

Type: Condition

Patterns: * %entities/gamemodes% (is|are) (invulnerable|invincible)

  • %entities/gamemodes% (isn't|is not|aren't|are not) (invulnerable|invincible)

Checks whether an entity or a gamemode is invulnerable. For gamemodes, Paper and Minecraft 1.20.6 are required

Examples

target entity is invulnerableloop all gamemodes:    if loop-value is not invulnerable:        broadcast "the gamemode %loop-value% is vulnerable!"

Is Jumping

Type: Condition

Patterns: * %living entities% (is|are) jumping

  • %living entities% (isn't|is not|aren't|are not) jumping

Checks whether a living entity is jumping. This condition does not work on players.

Examples

on spawn of zombie:    while event-entity is not jumping:        wait 5 ticks    push event-entity upwards

Is Leashed

Type: Condition

Patterns: * %living entities% (is|are) leashed

  • %living entities% (isn't|is not|aren't|are not) leashed

Checks to see if an entity is currently leashed.

Examples

target entity is leashed

Is Loaded

Type: Condition

Patterns: * chunk[s] %directions% [%locations%] (is|are)[((n't| not))] loaded

  • chunk [at] %number%, %number% (in|of) [world] %world% is[((n't| not))] loaded
  • %scripts/worlds% (is|are)[(n't| not)] loaded
  • script[s] %scripts% (is|are)[(n't| not)] loaded
  • world[s] %worlds% (is|are)[(n't| not)] loaded

Checks whether a world, chunk or script is loaded.'chunk at 1, 1' uses chunk coordinates, which are location coords divided by 16.

Examples

if chunk at {home::%player's uuid%} is loaded:if chunk 1, 10 in world "world" is loaded:if world("lobby") is loaded:if script named "MyScript.sk" is loaded:

Is Lootable

Type: Condition

Patterns: * %blocks/entities% (is|are) lootable

  • %blocks/entities% (isn't|is not|aren't|are not) lootable

Checks whether an entity or block is lootable. Lootables are entities or blocks that can have a loot table.

Examples

spawn a pig at event-locationset {_pig} to last spawned entityif {_pig} is lootable:    set loot table of {_pig} to "minecraft:entities/cow"    # the pig will now drop the loot of a cow when killed, because it is indeed a lootable entity.set block at event-location to chestif block at event-location is lootable:    set loot table of block at event-location to "minecraft:chests/simple_dungeon"    # the chest will now generate the loot of a simple dungeon when opened, because it is indeed a lootable block.set block at event-location to wool blockif block at event-location is lootable:    # uh oh, nothing will happen because a wool is not a lootable block.

Is Member/Owner of Region

Type: Condition

Patterns: * %offline players% (is|are) ([a] member|[(the|an)] owner) of [[the] region] %regions%

  • %offline players% (is|are)(n't| not) ([a] member|[(the|an)] owner) of [[the] region] %regions%

Checks whether a player is a member or owner of a particular region.This condition requires a supported regions plugin to be installed.

Examples

on region enter:    player is the owner of the region    message "Welcome back to %region%!"    send "%player% just entered %region%!" to all members of the region

Is Normalized

Type: Condition

Patterns: * %vectors% (is|are) normalized

  • %vectors% (isn't|is not|aren't|are not) normalized

Checks whether a vector is normalized i.e. length of 1

Examples

vector of player's location is normalized

Is Occluding

Type: Condition

Patterns: * %item types% (is|are) occluding

  • %item types% (isn't|is not|aren't|are not) occluding

Checks whether an item is a block and completely blocks vision.

Examples

player's tool is occluding

Is Online

Type: Condition

Patterns: * %offline players% (is|are) (online|offline|connected)

  • %offline players% (isn't|is not|aren't|are not) (online|offline|connected)

Checks whether a player is online. The 'connected' pattern will return false once this player leaves the server, even if they rejoin. Be aware that using the 'connected' pattern with a variable will not have this special behavior. Use the direct event-player or other non-variable expression for best results.

Examples

player is onlineplayer-argument is offlinewhile 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

Is Operator

Type: Condition

Patterns: * %offline players% (is|are) [[a] server|an] op[erator][s]

  • %offline players% (isn't|is not|aren't|are not) [[a] server|an] op[erator][s]

Checks whether a player is a server operator.

Examples

player is an operator

Is Passable

Type: Condition

Patterns: * %blocks% (is|are) passable

  • %blocks% (isn't|is not|aren't|are not) passable

Checks whether a block is passable.A block is passable if it has no colliding parts that would prevent players from moving through it.Blocks like tall grass, flowers, signs, etc. are passable, but open doors, fence gates, trap doors, etc. are not because they still have parts that can be collided with.

Examples

if player's targeted block is passable

Is Pathfinding

Type: Condition

Patterns: * %living entities% (is|are) pathfinding [to[wards] %living entity/location%]

  • %living entities% (isn't|is not|aren't|are not) pathfinding [to[wards] %living entity/location%]

Checks whether living entities are pathfinding.Can only be a living entity that is a Mob.

Examples

make {_entity} pathfind to {_location} at speed 2while {_entity} is pathfinding    wait a secondlaunch flickering trailing burst firework colored red at location of {_entity}subtract 10 from {defence::tower::health}clear entity within {_entity}

Is Plugin Enabled

Type: Condition

Patterns: * plugin[s] %texts% (is|are) enabled

  • plugin[s] %texts% (is|are)(n't| not) enabled
  • plugin[s] %texts% (is|are) disabled

Check if a plugin is enabled/disabled on the server.Plugin names can be found in the plugin's 'plugin.yml' file or by using the '/plugins' command, they are NOT the name of the plugin's jar file.When checking if a plugin is not enabled, this will return true if the plugin is either disabled or not on the server. When checking if a plugin is disabled, this will return true if the plugin is on the server and is disabled.

Examples

if plugin "Vault" is enabled:if plugin "WorldGuard" is not enabled:if plugins "Essentials" and "Vault" are enabled:if plugin "MyBrokenPlugin" is disabled:

Is Poisoned

Type: Condition

Patterns: * %living entities% (is|are) poisoned

  • %living entities% (isn't|is not|aren't|are not) poisoned

Checks whether an entity is poisoned.

Examples

player is poisoned:    cure the player from poison    message "You have been cured!"

Is Preferred Tool

Type: Condition

Patterns: * %item types% (is|are) %blocks/block datas%'s preferred tool[s]

  • %item types% (is|are) [the|a] preferred tool[s] (for|of) %blocks/block datas%
  • %item types% (is|are)(n't| not) %blocks/block datas%'s preferred tool[s]
  • %item types% (is|are)(n't| not) [the|a] preferred tool[s] (for|of) %blocks/block datas%

Checks whether an item is the preferred tool for a block. A preferred tool is one that will drop the block's item when used. For example, a wooden pickaxe is a preferred tool for grass and stone blocks, but not for iron ore.

Examples

on left click:    event-block is set    if player's tool is the preferred tool for event-block:        break event-block naturally using player's tool    else:        cancel event

Is Pressing Key

Type: Condition

Patterns: * %players% (is|are) pressing %input keys%

  • %players% (isn't|is not|aren't|are not) pressing %input keys%
  • %players% (was|were) pressing %input keys%
  • %players% (wasn't|was not|weren't|were not) pressing %input keys%

Checks if a player is pressing a certain input key.

Examples

on player input:    if player is pressing forward movement key:        send "You are moving forward!"

Is Riding

Type: Condition

Patterns: * %entities% (is|are) riding [%entity types%]

  • %entities% (isn't|is not|aren't|are not) riding [%entity types%]

Tests whether an entity is riding another or is in a vehicle.

Examples

player is riding a saddled pig

Is Riptiding

Type: Condition

Patterns: * %living entities% (is|are) riptiding

  • %living entities% (isn't|is not|aren't|are not) riptiding

Checks to see if an entity is currently using the Riptide enchantment.

Examples

target entity is riptiding

Is Saddled

Type: Condition

Patterns: * %living entities% (is|are) [properly] saddled

  • %living entities% (isn't|is not|aren't|are not) [properly] saddled

Checks whether a given entity (horse or steerable) is saddled.If 'properly' is used, this will only return true if the entity is wearing specifically a saddle item.

Examples

send whether {_horse} is saddled

Is Script Loaded

Type: Condition

Patterns: * script[s] [%texts%] (is|are) loaded

  • script[s] [%texts%] (isn't|is not|aren't|are not) loaded

Check if the current script, or another script, is currently loaded.

Examples

script is loadedscript "example.sk" is loaded

Is Silent

Type: Condition

Patterns: * %entities% (is|are) silent

  • %entities% (isn't|is not|aren't|are not) silent

Checks whether an entity is silent i.e. its sounds are disabled.

Examples

target entity is silent

Is Sleeping

Type: Condition

Patterns: * %players% (is|are) sleeping

  • %players% (isn't|is not|aren't|are not) sleeping

Checks whether a player is sleeping.

Examples

# cut your enemies' throats in their sleep >=)on attack:    attacker is holding a sword    victim is sleeping    increase the damage by 1000

Is Slime Chunk

Type: Condition

Patterns: * %chunk% (is|are) ([a] slime chunk|slime chunks|slimey)

  • %chunk% (isn't|is not|aren't|are not) ([a] slime chunk|slime chunks|slimey)

Tests whether a chunk is a so-called slime chunk.Slimes can generally spawn in the swamp biome and in slime chunks.For more info, see the Minecraft wiki.

Examples

command /slimey:    trigger:        if chunk at player is a slime chunk:            send "Yeah, it is!"        else:            send "Nope, it isn't"

Is Sneaking

Type: Condition

Patterns: * %players% (is|are) sneaking

  • %players% (isn't|is not|aren't|are not) sneaking

Checks whether a player is sneaking.

Examples

# prevent mobs from seeing sneaking players if they are at least 4 meters aparton target:    target is sneaking    distance of target and the entity is bigger than 4    cancel the event

Is Solid

Type: Condition

Patterns: * %item types% (is|are) solid

  • %item types% (isn't|is not|aren't|are not) solid

Checks whether an item is solid.

Examples

grass block is solidplayer's tool isn't solid

Is Sprinting

Type: Condition

Patterns: * %players% (is|are) sprinting

  • %players% (isn't|is not|aren't|are not) sprinting

Checks whether a player is sprinting.

Examples

player is not sprinting

Is Stackable

Type: Condition

Patterns: * %item stacks% (is|are) stackable

  • %item stacks% (isn't|is not|aren't|are not) stackable

Checks whether an item is stackable.

Examples

diamond axe is stackablebirch wood is stackabletorch is stackable

Is Swimming

Type: Condition

Patterns: * %living entities% (is|are) swimming

  • %living entities% (isn't|is not|aren't|are not) swimming

Checks whether a living entity is swimming.

Examples

player is swimming

Is Tagged

Type: Condition

Patterns: * %item types/entities/entity types% (is|are) tagged (as|with) %minecraft tags%

  • %item types/entities/entity types% (isn't|is not|aren't|are not) tagged (as|with) %minecraft tags%

Checks whether an item, block, entity, or entitydata is tagged with the given tag.

Examples

if player's tool is tagged with minecraft tag "enchantable/sharp_weapon":    enchant player's tool with sharpness 1if all logs are tagged with tag "minecraft:logs"

Is Tameable

Type: Condition

Patterns: * %living entities% (is|are) tameable

  • %living entities% (isn't|is not|aren't|are not) tameable

Check if an entity is tameable.

Examples

on damage:    if victim is tameable:        cancel event

Is Tamed

Type: Condition

Patterns: * %entities% (is|are) (tamed|domesticated)

  • %entities% (isn't|is not|aren't|are not) (tamed|domesticated)

Check if a tameable entity is tamed (horse, parrot, cat, etc.).

Examples

send true if {_horse} is tamedtame {_horse} if {_horse} is untamed

Is Ticking

Type: Condition

Patterns: * %entities% (is|are) ticking

  • %entities% (isn't|is not|aren't|are not) ticking

Checks if an entity is ticking.

Examples

send true if target is ticking

Is Transparent

Type: Condition

Patterns: * %item types% (is|are) transparent

  • %item types% (isn't|is not|aren't|are not) transparent

Checks whether an item is transparent. Note that this condition may not work for all blocks, due to the transparency list used by Spigot not being completely accurate.

Examples

player's tool is transparent.

Is Unbreakable

Type: Condition

Patterns: * %item types% (is|are) [un]breakable

  • %item types% (isn't|is not|aren't|are not) [un]breakable

Checks whether an item is unbreakable.

Examples

if event-item is unbreakable:    send "This item is unbreakable!" to playerif tool of {_p} is breakable:    send "Your tool is breakable!" to {_p}

Is Using Experimental Feature

Type: Condition

Patterns: * %script% is using %texts%

  • %scripts% are using %texts%
  • %script% is(n't| not) using %texts%
  • %scripts% are(n't| not) using %texts%

Checks whether a script is using an experimental feature by name.

Examples

the script is using "example feature"on load:    if the script is using "example feature":        broadcast "You're using an experimental feature!"

Is Valid

Type: Condition

Patterns: * %entities/scripts% (is|are) valid

  • %entities/scripts% (isn't|is not|aren't|are not) valid

Checks whether something (an entity, a script, a config, etc.) is valid.An invalid entity may have died or de-spawned for some other reason.An invalid script reference may have been reloaded, moved or disabled since.

Examples

if event-entity is valid

Is Wearing

Type: Condition

Patterns: * %living entities% (is|are) wearing %item types%

  • %living entities% (isn't|is not|aren't|are not) wearing %item types%

Checks whether an entity is wearing some items (usually armor).

Examples

player is wearing an iron chestplate and iron leggingsplayer is wearing all diamond armourtarget is wearing wolf armor

Is Whitelisted

Type: Condition

Patterns: * [the] server (is|(isn't|is not)) (in white[ ]list mode|white[ ]listed)

  • %offline players% (is|are|(isn't|is not|aren't|are not)) white[ ]listed
  • [the] server white[ ]list (is|(isn't|is not)) enforced

Whether or not the server or a player is whitelisted, or the server is whitelist enforced.

Examples

if the player is whitelisted:if the server is whitelisted:if the server whitelist is enforced:

Is Within

Type: Condition

Patterns: * %locations% (is|are) within %location% and %location%

  • %locations% (isn't|is not|aren't|are not) within %location% and %location%
  • %locations% (is|are) (within|in[side [of]]) %entity/chunk/world/block%
  • %locations% (isn't|is not|aren't|are not) (within|in[side [of]]) %entity/chunk/world/block%

Whether a location is within something else. The "something" can be a block, an entity, a chunk, a world, or a cuboid formed by two other locations.Note that using the is between condition will refer to a straight line between locations, while this condition will refer to the cuboid between locations.

Examples

if player's location is within {_loc1} and {_loc2}:    send "You are in a PvP zone!" to playerif player is in world("world"):    send "You are in the overworld!" to playerif attacker's location is inside of victim:    cancel event    send "Back up!" to attacker and victim

Is Within Radius

Type: Condition

Patterns: * %locations% (is|are) within %number% (block|metre|meter)[s] (around|of) %locations%

  • %locations% (isn't|is not|aren't|are not) within %number% (block|metre|meter)[s] (around|of) %locations%

Checks whether a location is within a certain radius of another location.

Examples

on damage:    if attacker's location is within 10 blocks around {_spawn}:        cancel event        send "You can't PVP in spawn."

Is a Skript command

Type: Condition

Patterns: * %text% (is|are) [a] s(k|c)ript (command|cmd)

  • %text% (isn't|is not|aren't|are not) [a] s(k|c)ript (command|cmd)

Checks whether a command/string is a custom Skript command.

Examples

# Example 1on command:    command is a skript command# Example 2"sometext" is a skript command

Is of Type

Type: Condition

Patterns: * %item stacks/entities% (is|are) of type[s] %item types/entity types%

  • %item stacks/entities% (isn't|is not|aren't|are not) of type[s] %item types/entity types%

Checks whether an item or an entity is of the given type. This is mostly useful for variables, as you can use the general 'is' condition otherwise (e.g. 'victim is a creeper').

Examples

tool is of type {selected type}victim is of type {villager type}

Is on Ground

Type: Condition

Patterns: * %entities% (is|are) on [the] ground

  • %entities% (isn't|is not|aren't|are not) on [the] ground

Checks whether an entity is on ground.

Examples

player is not on ground

Item Has Enchantment Glint Override

Type: Condition

Patterns: * %item types% (has|have) enchantment glint overrid(den|e)

  • %item types% (doesn't|does not|do not|don't) have enchantment glint overrid(den|e)

Checks whether an item has the enchantment glint overridden, or is forced to glint or not.

Examples

if the player's tool has the enchantment glint override    send "Your tool has the enchantment glint override." to playerif {_item} is forced to glint:    send "This item is forced to glint." to playerelse if {_item} is forced to not glint:    send "This item is forced to not glint." to playerelse:    send "This item does not have any glint override." to player

Item Has Enchantment Glint Override

Type: Condition

Patterns: * %item types% (is|are) forced to [not] glint

  • %item types% (isn't|is not|aren't|are not) forced to [not] glint

Checks whether an item has the enchantment glint overridden, or is forced to glint or not.

Examples

if the player's tool has the enchantment glint override    send "Your tool has the enchantment glint override." to playerif {_item} is forced to glint:    send "This item is forced to glint." to playerelse if {_item} is forced to not glint:    send "This item is forced to not glint." to playerelse:    send "This item does not have any glint override." to player

Leash Will Drop

Type: Condition

Patterns: * [the] (lead|leash) [item] (will|(won't|will not)) (drop|be dropped)

Checks whether the leash item will drop during the leash detaching in an unleash event.

Examples

on unleash:    if the leash will drop:        prevent the leash from dropping    else:        allow the leash to drop

Left Handed

Type: Condition

Patterns: * %living entities% (is|are) (left|right)( |-)handed

  • %living entities% (isn't|is not|aren't|are not) (left|right)( |-)handed

Checks if living entities or players are left or right-handed. Armor stands are neither right nor left-handed.Paper 1.17.1+ is required for non-player entities.

Examples

on damage of player:    if victim is left handed:        cancel event

Lid Is Open/Closed

Type: Condition

Patterns: * [the] lid[s] of %blocks% (is|are) (open[ed]|close[d])

  • [the] lid[s] of %blocks% (isn't|is not|aren't|are not) (open[ed]|close[d])
  • %blocks%'[s] lid[s] (is|are) (open[ed]|close[d])
  • %blocks%'[s] lid[s] (isn't|is not|aren't|are not) (open[ed]|close[d])

Check to see whether lidded blocks (chests, shulkers, etc.) are open or closed.

Examples

if the lid of {_chest} is closed:    open the lid of {_block}

Matches

Type: Condition

Patterns: * %texts% (match[es]|do[es](n't| not) match) %texts%

  • %texts% (partially match[es]|do[es](n't| not) partially match) %texts%

Checks whether the defined strings match the input regexes (Regular expressions).

Examples

on chat:    if message partially matches "\d":        send "Message contains a digit!"    if message doesn't match "[A-Za-z]+":        send "Message doesn't only contain letters!"

PvP

Type: Condition

Patterns: * (is PvP|PvP is) enabled [in %worlds%]

  • (is PvP|PvP is) disabled [in %worlds%]

Checks the PvP state of a world.

Examples

PvP is enabledPvP is disabled in "world"

Region Contains

Type: Condition

Patterns: * [[the] region] %regions% contain[s] %directions% %locations%

  • %locations% (is|are) ([contained] in|part of) [[the] region] %regions%
  • [[the] region] %regions% (do|does)(n't| not) contain %directions% %locations%
  • %locations% (is|are)(n't| not) (contained in|part of) [[the] region] %regions%

Checks whether a location is contained in a particular region.This condition requires a supported regions plugin to be installed.

Examples

player is in the region {regions::3}on region enter:    region contains {flags.%world%.red}    message "The red flag is near!"

Resource Pack

Type: Condition

Patterns: * [the] resource pack (was|is|has) [been] %resource pack state%

  • [the] resource pack (was|is|has)(n't| not) [been] %resource pack state%

Checks state of the resource pack in a resource pack request response event.

Examples

on resource pack response:    if the resource pack wasn't accepted:        kick the player due to "You have to install the resource pack to play in this server!"

Running Minecraft

Type: Condition

Patterns: * running [below] minecraft %text%

Checks if current Minecraft version is given version or newer.

Examples

running minecraft "1.14"

Starts/Ends With

Type: Condition

Patterns: * %texts% (start|end)[s] with %texts%

  • %texts% (doesn't|does not|do not|don't) (start|end) with %texts%

Checks if a text starts or ends with another.

Examples

if the argument starts with "test" or "debug":    send "Stop!"

Text Display Has Drop Shadow

Type: Condition

Patterns: * [[the] text of] %displays% (has|have) [a] (drop|text) shadow

  • %displays%'[s] text (has|have) [a] (drop|text) shadow
  • [[the] text of] %displays% (doesn't|does not|do not|don't) have [a] (drop|text) shadow
  • %displays%'[s] text (doesn't|does not|do not|don't) have [a] (drop|text) shadow

Returns whether the text of a display has drop shadow applied.

Examples

if {_display} has drop shadow:    remove drop shadow from the text of {_display}

Text Display Visible Through Blocks

Type: Condition

Patterns: * %displays% (is|are) visible through (blocks|walls)

  • %displays% (isn't|is not|aren't|are not) visible through (blocks|walls)

Returns whether text displays can be seen through blocks or not.

Examples

if last spawned text display is visible through walls:    prevent last spawned text display from being visible through walls

Time

Type: Condition

Patterns: * %date% (was|were)( more|(n't| not) less) than %time span% [ago]

  • %date% (was|were)((n't| not) more| less) than %time span% [ago]

Tests whether a given real time was more or less than some time span ago.

Examples

command /command-with-cooldown:    trigger:        {command::%player's uuid%::last-usage} was less than a minute ago:            message "Please wait a minute between uses of this command."            stop        set {command::%player's uuid%::last-usage} to now        # ... actual command trigger here ...

Will Consume Boosting Firework

Type: Condition

Patterns: * [the] (boosting|used) firework will be consumed

  • [the] (boosting|used) firework (will not|won't) be consumed

Checks to see if the firework used in an 'elytra boost' event will be consumed.

Examples

on elytra boost:    if the used firework will be consumed:        prevent the used firework from being consume

Conditionals

Type: Section

Patterns: * else

  • else [parse] if <.+>
  • else [parse] if (any|at least one [of])
  • else [parse] if [all]
  • [parse] if (any|at least one [of])
  • [parse] if [all]
  • [parse] if <.+>
  • then [run]
  • implicit:<.+>

Conditional sectionsif: executed when its condition is trueelse if: executed if all previous chained conditionals weren't executed, and its condition is trueelse: executed if all previous chained conditionals weren't executedparse if: a special case of 'if' condition that its code will not be parsed if the condition is not trueelse 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

if player's health is greater than or equal to 4:    send "Your health is okay so far but be careful!"else if player's health is greater than 2:    send "You need to heal ASAP, your health is very low!"else: # Less than 2 hearts    send "You are about to DIE if you don't heal NOW. You have only %player's health% heart(s)!"parse if plugin "SomePluginName" is enabled: # parse if %condition%    # This code will only be executed if the condition used is met otherwise Skript will not parse this section therefore will not give any errors/info about this section

Filter

Type: Section

Patterns: * filter %~objects% to match [any|all]

Filters a variable list based on the supplied conditions. Unlike the filter expression, this effect maintains the indices of the filtered list.It also supports filtering based on meeting any of the given criteria, rather than all, like multi-line if statements.

Examples

set {_a::*} to integers between -10 and 10filter {_a::*} to match:    input is a number    mod(input, 2) = 0    input > 0send {_a::*} # sends 2, 4, 6, 8, and 10

For Each Loop (Experimental)

Type: Section

Patterns: * (for [each]|loop) [value] %~object% in %objects%

  • (for [each]|loop) (key|index) %~object% in %objects%
  • (for [each]|loop) [key|index] %~object%(,| and) [value] %~object% in %objects%

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

Examples

for each {_player} in players:    send "Hello %{_player}%!" to {_player}loop {_item} in {list of items::*}:    broadcast {_item}'s namefor each key {_index} in {list of items::*}:    broadcast {_index}loop key {_index} and value {_value} in {list of items::*}:    broadcast "%{_index}% = %{_value}%"for each {_index}, {_value} in {my list::*}:    broadcast "%{_index}% = %{_value}%"

Loop

Type: Section

Patterns: * loop %objects%

Loop sections repeat their code with multiple values.A loop will loop through all elements of the given expression, e.g. all players, worlds, items, etc. The conditions & effects inside the loop will be executed for every of those elements, which can be accessed with ‘loop-’, e.g. send "hello" to loop-player. When a condition inside a loop is not fulfilled the loop will start over with the next element of the loop. You can however use stop loop to exit the loop completely and resume code execution after the end of the loop.Loopable ValuesAll 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 VariablesWhen 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

loop all players:    send "Hello %loop-player%!" to loop-playerloop items in player's inventory:    if loop-item is dirt:        set loop-item to airloop 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 secondloop {Coins::*}:    set {Coins::%loop-index%} to loop-value + 5 # Same as "add 5 to {Coins::%loop-index%}" where loop-index is the uuid of the player and loop-value is the number of coins for the playerloop shuffled (integers between 0 and 8):    if all:        previous loop-value = 1        loop-value = 4        next loop-value = 8    then:         kill all players

While Loop

Type: Section

Patterns: * [do] while <.+>

While Loop sections are loops that will just keep repeating as long as a condition is met.

Examples

while size of all players < 5:    send "More players are needed to begin the adventure" to all players    wait 5 secondsset {_counter} to 1do 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

At Time

Type: Event

Patterns: * [on] at %time% [in %worlds%]

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

Examples

at 18:00 at 7am in "world"

On Anvil Damage

Type: Event

Patterns: * [on] anvil damag(e|ing)

Called when an anvil is damaged/broken from being used to repair/rename items.Note: this does not include anvil damage from falling.

Examples

on anvil damage:     cancel the event

On Anvil Prepare

Type: Event

Patterns: * [on] anvil prepar(e|ing)

Called when an item is put in a slot for repair by an anvil. Please note that this event is called multiple times in a single item slot move.

Examples

on anvil prepare:     event-item is set # result item     chance of 5%:         set repair cost to repair cost * 50%         send "You're LUCKY! You got 50% discount." to player

On AoE Cloud Effect

Type: Event

Patterns: * [on] (area|AoE) [cloud] effect

Called when area effect cloud applies its potion effect. This happens every 5 ticks by default.

Examples

on area cloud effect:

On Arm Swing

Type: Event

Patterns: * [on] [player] arm swing

Called when a player swings their arm.

Examples

on arm swing:     send "You swung your arm!"

On Armor Change

Type: Event

Patterns: * [on] [player] armo[u]r change[d]

Called when armor pieces of a player are changed.

Examples

on armor change:     send "You equipped %event-item%!"

On Beacon Change Effect

Type: Event

Patterns: * [on] beacon change effect

  • [on] beacon effect change
  • [on] player chang(e[s]|ing) [of] beacon effect

Called when a player changes the effects of a beacon.

Examples

on beacon effect change:     broadcast event-player     broadcast event-block     broadcast primary beacon effect     broadcast secondary beacon effect on beacon change effect: on player change beacon effect:

On Beacon Effect

Type: Event

Patterns: * [on] [primary|secondary] beacon effect [of %potion effect types%]

  • [on] application of [primary|secondary] beacon effect [of %potion effect types%]
  • [on] [primary|secondary] beacon effect apply [of %potion effect types%]

Missing description.

Examples

Missing examples.

On Beacon Toggle

Type: Event

Patterns: * [on] beacon toggle

  • [on] beacon activat(e|ion)
  • [on] beacon deactivat(e|ion)

Missing description.

Examples

Missing examples.

On Bed Enter

Type: Event

Patterns: * [on] bed enter[ing]

  • [on] [player] enter[ing] [a] bed

Called when a player starts sleeping.

Examples

on bed enter:

On Bed Leave

Type: Event

Patterns: * [on] bed leav(e|ing)

  • [on] [player] leav(e|ing) [a] bed

Called when a player leaves a bed.

Examples

on player leaving a bed:

On Bell Resonate

Type: Event

Patterns: * [on] bell resonat(e|ing)

Called when a bell resonates, highlighting nearby raiders.

Examples

on bell resonate:     send "<red>Raiders are nearby!" to all players in radius 32 around event-block

On Bell Ring

Type: Event

Patterns: * [on] bell ring[ing]

Called when a bell is rung.

Examples

on bell ring:     send "<gold>Ding-dong!<reset>" to all players in radius 10 of event-block

On Block Damage

Type: Event

Patterns: * [on] block damag(ing|e)

Called when a player starts to break a block. You can usually just use the leftclick event for this.

Examples

on block damaging:     if block is log:         send "You can't break the holy log!"

On Block Drop

Type: Event

Patterns: * [on] block drop[ping] [[of] %item types/block datas%]

Called when a block broken by a player drops something.event-player: The player that broke the blockpast event-block: The block that was brokenevent-block: The block after being brokenevent-items (or drops): The drops of the blockevent-entities: The entities of the dropped itemsIf the breaking of the block leads to others being broken, such as torches, they will appearin "event-items" and "event-entities".

Examples

on block drop:     broadcast event-player     broadcast past event-block     broadcast event-block     broadcast event-items     broadcast event-entities on block drop of oak log:

On Block Fertilize

Type: Event

Patterns: * [on] [block] fertilize

Called when a player fertilizes blocks.

Examples

on block fertilize:     send "Fertilized %size of fertilized blocks% blocks got fertilized."

On Block Growth

Type: Event

Patterns: * [on] (plant|crop|block) grow[(th|ing)] [[of] %item types%]

Called when a crop grows. Alternative to new form of generic grow event.

Examples

on crop growth:

On Book Edit

Type: Event

Patterns: * [on] book (edit|change|write)

Called when a player edits a book.

Examples

on book edit:

On Book Sign

Type: Event

Patterns: * [on] book sign[ing]

Called when a player signs a book.

Examples

on book sign:

On Break / Mine

Type: Event

Patterns: * [on] [block] (break[ing]|min(e|ing)) [[of] %item types/block datas%]

Called when a block is broken by a player. If you use 'on mine', only events where the broken block dropped something will call the trigger.

Examples

on mine: on break of stone: on mine of any ore: on break of chest[facing=north]: on break of potatoes[age=7]:

On Broadcast

Type: Event

Patterns: * [on] broadcast

Called when a message is broadcasted.

Examples

on broadcast:     set broadcast-message to "&c[BROADCAST] %broadcasted message%"

On Bucket Catch Entity

Type: Event

Patterns: * [on] bucket (catch[ing]|captur(e|ing)) [[of] %entity types%]

Missing description.

Examples

Missing examples.

On Bucket Empty

Type: Event

Patterns: * [on] bucket empty[ing]

  • [on] [player] empty[ing] [a] bucket

Called when a player empties a bucket. You can also use the place event with a check for water or lava.

Examples

on bucket empty:

On Bucket fill

Type: Event

Patterns: * [on] bucket fill[ing]

  • [on] [player] fill[ing] [a] bucket

Called when a player fills a bucket.

Examples

on player filling a bucket:

On Burn

Type: Event

Patterns: * [on] [block] burn[ing] [[of] %item types/block datas%]

Called when a block is destroyed by fire.

Examples

on burn: on burn of wood, fences, or chests: on burn of oak_log[axis=y]:

On Can Build Check

Type: Event

Patterns: * [on] [block] can build check

Called when a player rightclicks on a block while holding a block or a placeable item. You can either cancel the event to prevent the block from being built, or uncancel it to allow it.Please note that the data value of the block to be placed is not available in this event, only its ID.

Examples

on block can build check:     cancel event

On Chat

Type: Event

Patterns: * [on] chat

Called whenever a player chats.Use chat format to change message format.Use chat recipients to edit chat recipients.

Examples

on chat:     if player has permission "owner":         set chat format to "&lt;red&gt;[player]&lt;light gray&gt;: &lt;light red&gt;[message]"     else if player has permission "admin":         set chat format to "&lt;light red&gt;[player]&lt;light gray&gt;: &lt;orange&gt;[message]"     else: #default message format         set chat format to "&lt;orange&gt;[player]&lt;light gray&gt;: &lt;white&gt;[message]"

On Chunk Generate

Type: Event

Patterns: * [on] chunk (generat|populat)(e|ing)

Called after a new chunk was generated.

Examples

on chunk generate:

On Chunk Load

Type: Event

Patterns: * [on] chunk load[ing]

Called when a chunk loads. The chunk might or might not contain mobs when it's loaded.

Examples

on chunk load:

On Chunk Unload

Type: Event

Patterns: * [on] chunk unload[ing]

Called when a chunk is unloaded due to not being near any player.

Examples

on chunk unload:

On Click

Type: Event

Patterns: * [on] [(right|left)[( |-)]][mouse[( |-)]]click[ing] [on %entity type/item type/block data%] [(with|using|holding) %item type%]

  • [on] [(right|left)[( |-)]][mouse[( |-)]]click[ing] (with|using|holding) %item type% on %entity type/item type/block data%

Called when a user clicks on a block, an entity or air with or without an item in their hand.Please note that rightclick events with an empty hand while not looking at a block are not sent to the server, so there's no way to detect them.Also note that a leftclick on an entity is an attack and thus not covered by the 'click' event, but the 'damage' event.

Examples

on click: on rightclick holding a fishing rod: on leftclick on a stone or obsidian: on rightclick on a creeper: on click with a sword: on click on chest[facing=north]: on click on campfire[lit=true]:

On Combust

Type: Event

Patterns: * [on] combust[ing]

Called when an entity is set on fire, e.g. by fire or lava, a fireball, or by standing in direct sunlight (zombies, skeletons).

Examples

on combust:

On Command

Type: Event

Patterns: * [on] command [%texts%]

Called when a player enters a command (not necessarily a Skript command) but you can check if command is a skript command, see Is a Skript command condition.

Examples

on command: on command "/stop": on command "pm Njol ":

On Connect

Type: Event

Patterns: * [on] [player] connect[ing]

Called when the player connects to the server. This event is called before the player actually joins the server, so if you want to prevent players from joining you should prefer this event over on join.

Examples

on connect:     player doesn't have permission "VIP"     number of players is greater than 15     kick the player due to "The last 5 slots are reserved for VIP players."

On Consume

Type: Event

Patterns: * [on] [player] ((eat|drink)[ing]|consum(e|ing)) [[of] %item types%]

Called when a player is done eating/drinking something, e.g. an apple, bread, meat, milk or a potion.

Examples

on consume:

On Craft

Type: Event

Patterns: * [on] [player] craft[ing] [[of] %item types%]

Called when a player crafts an item.

Examples

on craft:

On Creeper Power

Type: Event

Patterns: * [on] creeper power

Called when a creeper is struck by lighting and gets powered. Cancel the event to prevent the creeper from being powered.

Examples

on creeper power:

On Damage

Type: Event

Patterns: * [on] damag(e|ing) [of %entity type%] [by %entity type%]

Called when an entity receives damage, e.g. by an attack from another entity, lava, fire, drowning, fall, suffocation, etc.

Examples

on damage: on damage of a player: on damage of player by zombie:

On Death

Type: Event

Patterns: * [on] death [of %entity types%]

Called when a living entity (including players) dies.

Examples

on death: on death of player: on death of a wither or ender dragon:     broadcast "A %entity% has been slain in %world%!"

On Dispense

Type: Event

Patterns: * [on] dispens(e|ing) [[of] %item types%]

Called when a dispenser dispenses an item.

Examples

on dispense of iron block:     send "that'd be 19.99 please!"

On Drop

Type: Event

Patterns: * [on] [player|entity] drop[ping] [[of] %item types%]

Called when a player drops an item from their inventory, or an entity drops an item, such as a chicken laying an egg.

Examples

on drop:     if event-item is compass:         cancel event  on entity drop of an egg:     if event-entity is a chicken:         set item of event-dropped item to a diamond

On Egg Throw

Type: Event

Patterns: * [on] throw[ing] [of] [an] egg

  • [on] [player] egg throw

Called when a player throws an egg and it lands. You can just use the shoot event in most cases. However, this event allows modification of properties like the hatched entity type and the number of entities to hatch.

Examples

on throw of an egg:

On Elytra Boost

Type: Event

Patterns: * [on] elytra boost

Called when a player uses a firework to boost their fly speed when flying with an elytra.

Examples

on elytra boost:     if the used firework will be consumed:         prevent the used firework from being consume

On Enchant

Type: Event

Patterns: * [on] [item] enchant

Called when a player successfully enchants an item. To get the enchanted item, see the enchant item expression

Examples

on enchant:     if the clicked button is 1: # offer 1         set the applied enchantments to sharpness 10 and unbreaking 10

On Enchant Prepare

Type: Event

Patterns: * [on] [item] enchant prepare

Called when a player puts an item into enchantment table. This event may be called multiple times. To get the enchant item, see the enchant item expression

Examples

on enchant prepare:     set enchant offer 1 to sharpness 1     set the cost of enchant offer 1 to 10 levels

On Enderman Enrage

Type: Event

Patterns: * [on] enderman (enrage|anger)

Called when an enderman gets mad because a player looked at them.Note: This does not stop enderman from targeting the player as a result of getting damaged.

Examples

# Stops endermen from getting angry players with the permission "safeFrom.enderman" on enderman enrage:     if player has permission "safeFrom.enderman":         cancel event

On Enderman/Sheep/Silverfish/Falling Block

Type: Event

Patterns: * [on] enderman place

  • [on] enderman pickup
  • [on] sheep eat
  • [on] silverfish enter
  • [on] silverfish exit
  • [on] falling block fall[ing]
  • [on] falling block land[ing]
  • [on] (entity|%*-entitydatas%) chang(e|ing) block[s]

Called when an enderman places or picks up a block, a sheep eats grass, a silverfish boops into/out of a block or a falling block lands and turns into a block respectively.event-block represents the old block and event-blockdata represents the new replacement that'll be applied to the block.

Examples

on sheep eat:     kill event-entity     broadcast "A sheep stole some grass!"  on falling block land:     event-entity is a falling dirt     cancel event

On Entity Breed

Type: Event

Patterns: * [on] [entity] breed[ing] [of %entity types%]

Called whenever two animals begin to conceive a child. The type can be specified.

Examples

on breeding of llamas:     send "When a %breeding mother% and %breeding father% love each other very much they make %offspring%" to breeder

On Entity Dismount

Type: Event

Patterns: * [on] dismount[ing]

Called when an entity dismounts.

Examples

on dismount:     kill event-entity

On Entity Jump

Type: Event

Patterns: * [on] entity jump[ing]

Called when an entity jumps.

Examples

on entity jump:     if entity is a wither skeleton:         cancel event

On Entity Mount

Type: Event

Patterns: * [on] mount[ing]

Called when entity starts riding another.

Examples

on mount:     cancel event

On Entity Portal

Type: Event

Patterns: * [on] entity portal

Called when an entity uses a nether or end portal. Cancel the event to prevent the entity from teleporting.

Examples

on entity portal:     broadcast "A %type of event-entity% has entered a portal!

On Entity Potion Effect

Type: Event

Patterns: * [on] entity potion effect [modif[y|ication]] [[of] %potion effect types%] [due to %entity potion cause%]

Called when an entity's potion effect is modified.This modification can include adding, removing or changing their potion effect.

Examples

on entity potion effect modification:         broadcast "A potion effect was added to %event-entity%!"  on entity potion effect modification of night vision:

On Entity Transform

Type: Event

Patterns: * [on] (entit(y|ies)|%*-entitydatas%) transform[ing] [due to %transform reasons%]

Called when an entity is about to be replaced by another entity.Examples when it's called include; when a zombie gets cured and a villager spawns, an entity drowns in water like a zombie that turns to a drown, an entity that gets frozen in powder snow, a mooshroom that when sheared, spawns a new cow.

Examples

on a zombie transforming due to curing: on mooshroom transforming: on zombie, skeleton or slime transform:

On Experience Change

Type: Event

Patterns: * [on] [player] (level progress|[e]xp|experience) (change|update|increase|decrease)

Called when a player's experience changes.

Examples

on level progress change:     set {_xp} to event-experience     broadcast "%{_xp}%"

On Experience Cooldown Change

Type: Event

Patterns: * [on] player (experience|[e]xp) cooldown change

Called when a player's experience cooldown changes.Experience cooldown is how long until a player can pick up another orb of experience.

Examples

on player experience cooldown change:     broadcast event-player     broadcast event-timespan     broadcast past event-timespan     broadcast xp cooldown change reason

On Experience Spawn

Type: Event

Patterns: * [on] [e]xp[erience] [orb] spawn

  • [on] spawn of [a[n]] [e]xp[erience] [orb]

Called whenever experience is about to spawn.Please note that this event will not fire for xp orbs spawned by plugins (including Skript) with Bukkit.

Examples

on xp spawn:     world is "minigame_world"     cancel event

On Explode

Type: Event

Patterns: * [on] explo(d(e|ing)|sion)

Called when an entity (a primed TNT or a creeper) explodes.

Examples

on explosion:

On Explosion Prime

Type: Event

Patterns: * [on] explosion prime

Called when an explosive is primed, i.e. an entity will explode shortly. Creepers can abort the explosion if the player gets too far away, while TNT will explode for sure after a short time.

Examples

on explosion prime:

On Fade

Type: Event

Patterns: * [on] [block] fad(e|ing) [[of] %item types/block datas%]

Called when a block 'fades away', e.g. ice or snow melts.

Examples

on fade of snow or ice: on fade of snow[layers=2]

On Firework Explode

Type: Event

Patterns: * [on] [a] firework explo(d(e|ing)|sion) [colo[u]red %colors%]

Called when a firework explodes.

Examples

on firework explode:     if event-colors contains red: on firework exploding colored red, light green and black: on firework explosion colored rgb 0, 255, 0:     broadcast "A firework colored %colors% was exploded at %location%!"

On First Join

Type: Event

Patterns: * [on] first (join|login)

Called when a player joins the server for the first time.

Examples

on first join:     broadcast "Welcome %player% to the server!"

On Fishing

Type: Event

Patterns: * [on] [fishing] (line|rod) cast

  • [on] fish (caught|catch)
  • [on] entity (hook[ed]|caught|catch)
  • [on] (bobber|hook) (in|hit) ground
  • [on] fish (escape|get away)
  • [on] [fishing] (rod|line) reel in
  • [on] fish bit(e|ing)
  • [on] (fish approach[ing]|(bobber|hook) lure[d])

Called when a player triggers a fishing event.An entity hooked event is triggered when an entity gets caught by a fishing rod.A fish escape event is called when the player fails to click on time, and the fish escapes.A fish approaching event is when the bobber is waiting to be hooked, and a fish is approaching.

Examples

on fishing line cast:     send "You caught a fish!" to player on fishing state of caught entity:     push event-entity vector from entity to player

On Flight Toggle

Type: Event

Patterns: * [on] [player] flight toggl(e|ing)

  • [on] [player] toggl(e|ing) flight

Called when a players stops/starts flying.

Examples

on flight toggle:     if {game::%player%::playing} exists:         cancel event

On Flow

Type: Event

Patterns: * [on] [block] flow[ing]

  • [on] block mov(e|ing)

Called when a blocks flows or teleports to another block. This not only applies to water and lava, but teleporting dragon eggs as well.

Examples

on block flow:     if event-block is water:         broadcast "Build more dams! It's starting to get wet in here"

On Form

Type: Event

Patterns: * [on] [block] form[ing] [[of] %item types/block datas%]

Called when a block is created, but not by a player, e.g. snow forms due to snowfall, water freezes in cold biomes. This isn't called when block spreads (mushroom growth, water physics etc.), as it has its own event (see spread event).

Examples

on form of snow: on form of a mushroom:

On Fuel Burn

Type: Event

Patterns: * [on] [furnace] fuel burn[ing] [of %item types%]

Called when a furnace burns an item from its fuel slot.

Examples

on fuel burning:     broadcast fuel burned     if burned fuel is coal:         add 20 seconds to burn time

On Furnace Item Extract

Type: Event

Patterns: * [on] furnace [item] extract[ion] [of %item types%]

Called when a player takes any item out of the furnace.

Examples

on furnace extract:     if event-items is an iron ingot:         remove event-items from event-player's inventory

On Gamemode Change

Type: Event

Patterns: * [on] game[ ]mode change [to %gamemode%]

Called when a player's gamemode changes.

Examples

on gamemode change: on gamemode change to adventure:

On Gliding State Change

Type: Event

Patterns: * [on] (gliding state change|toggl(e|ing) gliding)

Called when an entity toggles glider on or off, or when server toggles gliding state of an entity forcibly.

Examples

on toggling gliding:     cancel the event # bad idea, but you CAN do it!

On Grow

Type: Event

Patterns: * [on] grow[th] [of (%tree types%|%item types/block datas%)]

  • [on] grow[th] from %item types/block datas%
  • [on] grow[th] [in]to (%tree types%|%item types/block datas%)
  • [on] grow[th] from %item types/block datas% [in]to (%tree types%|%item types/block datas%)

Called when a tree, giant mushroom or plant grows to next stage."of" matches any grow event, "from" matches only the old state, "into" matches only the new state,and "from into" requires matching both the old and new states.Using "and" lists in this event is equivalent to using "or" lists. The event will trigger if any one of the elements is what grew.

Examples

on grow: on grow of tree: on grow of wheat[age=7]: on grow from a sapling: on grow into tree: on grow from a sapling into tree: on grow of wheat, carrots, or potatoes: on grow into tree, giant mushroom, cactus: on grow from wheat[age=0] to wheat[age=1] or wheat[age=2]:

On Hand Item Swap

Type: Event

Patterns: * [on] swap[ping of] [(hand|held)] item[s]

Called whenever a player swaps the items in their main- and offhand slots.Works also when one or both of the slots are empty.The event is called before the items are actually swapped,so when you use the player's tool or player's offtool expressions,they will return the values before the swap -this enables you to cancel the event before anything happens.

Examples

on swap hand items:     event-player's tool is a diamond sword     cancel event

On Heal

Type: Event

Patterns: * [on] heal[ing] [of %entity types%] [(from|due to|by) %heal reasons%]

  • [on] %entity types% heal[ing] [(from|due to|by) %heal reasons%]

Called when an entity is healed, e.g. by eating (players), being fed (pets), or by the effect of a potion of healing (overworld mobs) or harm (nether mobs).

Examples

on heal: on player healing from a regeneration potion: on healing of a zombie, cow or a wither:     heal reason is healing potion     cancel event

On Horse Jump

Type: Event

Patterns: * [on] horse jump

Called when a horse jumps.

Examples

on horse jump:     push event-entity upwards at speed 2

On Hunger Meter Change

Type: Event

Patterns: * [on] (food|hunger) (level|met(er|re)|bar) chang(e|ing)

Called when the hunger bar of a player changes, i.e. either increases by eating or decreases over time.

Examples

on food bar change:

On Ignition

Type: Event

Patterns: * [on] [block] ignit(e|ion)

Called when a block starts burning, i.e. a fire block is placed next to it and this block is flammable.The burn event will be called when the block is about do be destroyed by the fire.

Examples

on block ignite:     if event-block is a ladder:         cancel event

On Inventory Click

Type: Event

Patterns: * [on] [player] inventory(-| )click[ing] [[at] %item types%]

Called when clicking on inventory slot.

Examples

on inventory click:     if event-item is stone:         give player 1 stone         remove 20$ from player's balance

On Inventory Close

Type: Event

Patterns: * [on] inventory clos(ing|e[d])

Called when player's currently viewed inventory is closed.

Examples

on inventory close:     if player's location is {location}:         send "You exited the shop!"

On Inventory Drag

Type: Event

Patterns: * [on] inventory drag[ging]

Called when a player drags an item in their cursor across the inventory.

Examples

on inventory drag:     if player's current inventory is {_gui}:         send "You can't drag your items here!" to player         cancel event

On Inventory Item Move

Type: Event

Patterns: * [on] inventory item (move|transport)

  • [on] inventory (mov(e|ing)|transport[ing]) [an] item

Called when an entity or block (e.g. hopper) tries to move items directly from one inventory to another.When this event is called, the initiator may have already removed the item from the source inventory and is ready to move it into the destination inventory.If this event is cancelled, the items will be returned to the source inventory.

Examples

on inventory item move:     broadcast "%holder of past event-inventory% is transporting %event-item% to %holder of event-inventory%!"

On Inventory Open

Type: Event

Patterns: * [on] inventory open[ed]

Called when an inventory is opened for player.

Examples

on inventory open:     close player's inventory

On Inventory Pickup

Type: Event

Patterns: * [on] inventory pick[ ]up

Called when an inventory (a hopper, a hopper minecart, etc.) picks up an item

Examples

on inventory pickup:

On Inventory Slot Change

Type: Event

Patterns: * [on] [player] inventory slot chang(e|ing)

Called when a slot in a player's inventory is changed.Warning: setting the event-slot to a new item can result in an infinite loop.

Examples

on inventory slot change:     if event-item is a diamond:         send "You obtained a diamond!" to player

On Item Break

Type: Event

Patterns: * [on] [player] tool break[ing]

  • [on] [player] break[ing] [(a|the)] tool

Called when a player breaks their tool because its damage reached the maximum value.This event cannot be cancelled.

Examples

on tool break:

On Item Damage

Type: Event

Patterns: * [on] item damag(e|ing)

Called when an item is damaged. Most tools are damaged by using them; armor is damaged when the wearer takes damage.

Examples

on item damage:     cancel event

On Item Despawn

Type: Event

Patterns: * [on] (item[ ][stack]|[item] %item types%) despawn[ing]

  • [on] [item[ ][stack]] despawn[ing] [[of] %item types%]

Called when an item is about to be despawned from the world, usually 5 minutes after it was dropped.

Examples

on item despawn of diamond:     send "Not my precious!"     cancel event

On Item Mend

Type: Event

Patterns: * [on] item mend[ing]

Called when a player has an item repaired via the Mending enchantment.

Examples

on item mend:     chance of 50%:         cancel the event         send "Oops! Mending failed!" to player

On Item Merge

Type: Event

Patterns: * [on] (item[ ][stack]|[item] %item types%) merg(e|ing)

  • [on] item[ ][stack] merg(e|ing) [[of] %item types%]

Called when dropped items merge into a single stack. event-entity will be the entity which is trying to merge, and future event-entity will be the entity which is being merged into.

Examples

on item merge of gold blocks:     cancel event

On Item Spawn

Type: Event

Patterns: * [on] item spawn[ing] [[of] %item types%]

Called whenever an item stack is spawned in a world, e.g. as drop of a block or mob, a player throwing items out of their inventory, or a dispenser dispensing an item (not shooting it).

Examples

on item spawn of iron sword:     broadcast "Someone dropped an iron sword!"

On Join

Type: Event

Patterns: * [on] [player] (login|logging in|join[ing])

Called when the player joins the server. The player is already in a world when this event is called, so if you want to prevent players from joining you should prefer on connect over this event.

Examples

on join:     message "Welcome on our awesome server!"     broadcast "%player% just joined the server!"

On Jump

Type: Event

Patterns: * [on] [player] jump[ing]

Called whenever a player jumps.This event requires PaperSpigot.

Examples

on jump:     event-player does not have permission "jump"     cancel event

On Kick

Type: Event

Patterns: * [on] [player] (kick|being kicked)

Called when a player is kicked from the server. You can change the kick message or cancel the event entirely.

Examples

on kick:

On Language Change

Type: Event

Patterns: * [on] [player] (language|locale) chang(e|ing)

  • [on] [player] chang(e|ing) (language|locale)

Called after a player changed their language in the game settings. You can use the language expression to get the current language of the player.This event requires Minecraft 1.12+.

Examples

on language change:     if player's language starts with "en":         send "Hello!"

On Leash / Unleash

Type: Event

Patterns: * [on] [player] [un]leash[ing] [of %entity types%]

Called when an entity is leashed or unleashed. Cancelling these events will prevent the leashing or unleashing from occurring.

Examples

on player leash of a sheep:     send "Baaaaa--" to player  on player leash:     send "<%event-entity%> Let me go!" to player  on unleash:     broadcast "<%event-entity%> I'm free"  on player unleash:     send "<%event-entity%> Thanks for freeing me!" to player

On Leaves Decay

Type: Event

Patterns: * [on] leaves decay[ing]

Called when a leaf block decays due to not being connected to a tree.

Examples

on leaves decay:

On Level Change

Type: Event

Patterns: * [on] [player] level (change|up|down)

Called when a player's level changes, e.g. by gathering experience or by enchanting something.

Examples

on level change:

On Lightning Strike

Type: Event

Patterns: * [on] lightning [strike]

Called when lightning strikes.

Examples

on lightning:     spawn a zombie at location of event-entity

On Loot Generate

Type: Event

Patterns: * [on] loot generat(e|ing)

Called when a loot table of an inventory is generated in the world.For example, when opening a shipwreck chest.

Examples

on loot generate:     chance of 10%     add 64 diamonds to the loot     send "You hit the jackpot at %event-location%!"

On Love Mode Enter

Type: Event

Patterns: * [on] [entity] enter[s] love mode

  • [on] [entity] love mode [enter]

Called whenever an entity enters a state of being in love.

Examples

on love mode enter:     cancel event # No one is allowed love here

On Move / Rotate

Type: Event

Patterns: * [on] %entity type% (move|walk|step|(turn[ing] around|rotate))

  • [on] %entity type% (move|walk|step) or (turn[ing] around|rotate)
  • [on] %entity type% (turn[ing] around|rotate) or (move|walk|step)

Called when a player or entity moves or rotates their head.NOTE: Move event will only be called when the entity/player moves position, keyword 'turn around' is for orientation (ie: looking around), and the combined syntax listens for both.NOTE: These events can be performance heavy as they are called quite often.

Examples

on player move:     if player does not have permission "player.can.move":         cancel event on skeleton move:     if event-entity is not in world "world":         kill event-entity on player turning around:     send action bar "You are currently turning your head around!" to player

On Move On

Type: Event

Patterns: * [on] (step|walk)[ing] (on|over) %*item types%

Called when a player moves onto a certain type of block.Please note that using this event can cause lag if there are many players online.

Examples

on walking on dirt or grass: on stepping on stone:

On Physics

Type: Event

Patterns: * [on] [block] physics

Called when a physics check is done on a block. By cancelling this event you can prevent some things from happening, e.g. sand falling, dirt turning into grass, torches dropping if their supporting block is destroyed, etc.Please note that using this event might cause quite some lag since it gets called extremely often.

Examples

# prevents sand from falling on block physics:     block is sand     cancel event

On Pick Up

Type: Event

Patterns: * [on] [(player|entity)] (pick[ ]up|picking up) [[of] %item types%]

Called when a player/entity picks up an item. Please note that the item is still on the ground when this event is called.

Examples

on pick up: on entity pickup of wheat:

On Pig Zap

Type: Event

Patterns: * [on] pig[ ]zap

Called when a pig is stroke by lightning and transformed into a zombie pigman. Cancel the event to prevent the transformation.

Examples

on pig zap:

On Piglin Barter

Type: Event

Patterns: * [on] piglin (barter[ing]|trad(e|ing))

Called when a piglin finishes bartering. A piglin may start bartering after picking up an item on its bartering list.Cancelling will prevent piglins from dropping items, but will still make them pick up the input.

Examples

on piglin barter:     if barter drops contain diamond:         send "Diamonds belong in the money pit!" to player         cancel event

On Piston Extend

Type: Event

Patterns: * [on] piston extend[ing]

Called when a piston is about to extend.

Examples

on piston extend:     broadcast "A piston is extending!"

On Piston Retract

Type: Event

Patterns: * [on] piston retract[ing]

Called when a piston is about to retract.

Examples

on piston retract:     broadcast "A piston is retracting!"

On Place

Type: Event

Patterns: * [on] [block] (plac(e|ing)|build[ing]) [[of] %item types/block datas%]

Called when a player places a block.

Examples

on place: on place of a furnace, workbench or chest: on break of chest[type=right] or chest[type=left]

On Player Chunk Enter

Type: Event

Patterns: * [on] [player] (enter[s] [a] chunk|chunk enter[ing])

Called when a player enters a chunk. Note that this event is based on 'player move' event, and may be called frequent internally.

Examples

on player enters a chunk:     send "You entered a chunk: %past event-chunk% -> %event-chunk%!" to player

On Player Deep Sleep

Type: Event

Patterns: * [on] [player] deep sleep[ing]

Called when a player has slept long enough to count as passing the night/storm.Cancelling this event will prevent the player from being counted as deeply sleeping unless they exit and re-enter the bed.

Examples

on player deep sleeping:     send "Zzzz.." to player

On Player Input

Type: Event

Patterns: * [on] [player] (toggle|toggling|press[ing]|release|releasing) of (%input keys%|(an|any) input key)

  • [on] ([player] %input keys%|[an|any [player]] input key) (toggle|toggling|press[ing]|release|releasing)

Called when a player sends an updated input to the server.Note: The input keys event value is the set of keys the player is currently pressing, not the keys that were pressed or released.

Examples

on any input key press:     send "You are pressing: %event-inputkeys%" to player

On Player Pickup Arrow

Type: Event

Patterns: * [on] [player] (pick[ing| ]up [an] arrow|arrow pick[ing| ]up)

Called when a player picks up an arrow from the ground.

Examples

on arrow pickup:     cancel the event     teleport event-projectile to block 5 above event-projectile

On Player Trade

Type: Event

Patterns: * [on] player trad(e|ing)

Called when a player has traded with a villager.

Examples

on player trade:     chance of 50%:         cancel event         send "The trade was somehow denied!" to player

On Player World Change

Type: Event

Patterns: * [on] [player] world chang(ing|e[d])

Called when a player enters a world. Does not work with other entities!

Examples

on player world change:     world is "city"     send "Welcome to the City!"

On Portal

Type: Event

Patterns: * [on] [player] portal

Called when a player uses a nether or end portal. Cancel the event to prevent the player from teleporting.

Examples

on player portal:

On Portal Create

Type: Event

Patterns: * [on] portal creat(e|ion)

Called when a portal is created, either by a player or mob lighting an obsidian frame on fire, or by a nether portal creating its teleportation target in the nether/overworld.In Minecraft 1.14+, you can use the player in this event.Please note that there may not always be a player (or other entity) in this event.

Examples

on portal create:

On Portal Enter

Type: Event

Patterns: * [on] portal enter[ing]

  • [on] entering [a] portal

Called when an entity enters a nether portal or an end portal. Please note that this event will be fired many times for a nether portal.

Examples

on portal enter:

On Prepare Craft

Type: Event

Patterns: * [on] [player] (preparing|beginning) craft[ing] [[of] %item types%]

Called just before displaying crafting result to player. Note that setting the result item might or might not work due to Bukkit bugs.

Examples

on preparing craft of torch:

On Pressure Plate / Trip

Type: Event

Patterns: * [on] [step[ping] on] [a] [pressure] plate

  • [on] (trip|[step[ping] on] [a] tripwire)

Called when a player steps on a pressure plate or tripwire respectively.

Examples

on step on pressure plate:

On Projectile Collide

Type: Event

Patterns: * [on] projectile collide

Called when a projectile collides with an entity.

Examples

on projectile collide:     teleport shooter of event-projectile to event-entity

On Projectile Hit

Type: Event

Patterns: * [on] projectile hit

Called when a projectile hits an entity or a block.

Examples

on projectile hit:     if victim's health <= 3:         delete event-projectile

On Quit

Type: Event

Patterns: * [on] (quit[ting]|disconnect[ing]|log[ ]out|logging out|leav(e|ing))

Called when a player leaves the server.

Examples

on quit: on disconnect:

On Ready Arrow

Type: Event

Patterns: * [on] [player] ((ready|choose|draw|load) arrow|arrow (choose|draw|load))

Called when a player is firing a bow and the server is choosing an arrow to use.Cancelling this event will skip the current arrow item and fire a new event for the next arrow item.The arrow and bow in the event can be accessed with the Readied Arrow/Bow expression.

Examples

on player ready arrow:     selected bow's name is "Spectral Bow"     if selected arrow is not a spectral arrow:         cancel event

On Redstone

Type: Event

Patterns: * [on] redstone [current] [chang(e|ing)]

Called when the redstone current of a block changes. This event is of not much use yet.

Examples

on redstone change:     send "someone is using redstone" to console

On Region Enter/Leave

Type: Event

Patterns: * [on] (enter[ing]|leav(e|ing)|exit[ing]) [of] ([a] region|[[the] region] %regions%)

  • [on] region (enter[ing]|leav(e|ing)|exit[ing])

Called when a player enters or leaves a region.This event requires a supported regions plugin to be installed.

Examples

on region exit:     message "Leaving %region%."

On Resource Pack Request Response

Type: Event

Patterns: * [on] resource pack [request] response

  • [on] resource pack [request] %resource pack states%

Called when a player takes action on a resource pack request sent via the send resource pack effect. The resource pack condition can be used to check the resource pack state.This event will be triggered once when the player accepts or declines the resource pack request, and once when the resource pack is successfully installed or failed to download.

Examples

on resource pack request response:     if the resource pack was declined or failed to download:  on resource pack deny:     kick the player due to "You have to install the resource pack to play in this server!"

On Respawn

Type: Event

Patterns: * [on] [player] respawn[ing]

Called when a player respawns. You should prefer this event over the death event as the player is technically alive when this event is called.

Examples

on respawn:

On Resurrect Attempt

Type: Event

Patterns: * [on] [entity] resurrect[ion] [attempt]

Called when an entity dies, always. If they are not holding a totem, this is cancelled - you can, however, uncancel it.

Examples

on resurrect attempt:     entity is player     entity has permission "admin.undying"     uncancel the event

On Riptide

Type: Event

Patterns: * [on] [use of] riptide [enchant[ment]]

Called when the player activates the riptide enchantment, using their trident to propel them through the air.Note: the riptide action is performed client side, so manipulating the player in this event may have undesired effects.

Examples

on riptide:     send "You are riptiding!"

On Script Load/Unload

Type: Event

Patterns: * [on] [async] [script] (load|init|enable)

  • [on] [async] [script] (unload|stop|disable)

Called directly after the trigger is loaded, or directly before the whole script is unloaded.The keyword 'async' indicates the trigger can be ran asynchronously,

Examples

on load:     set {running::%script%} to true on unload:     set {running::%script%} to false

On Send Command List

Type: Event

Patterns: * [on] send[ing] [of [the]] [server] command[s] list

  • [on] [server] command list send

Called when the server sends a list of commands to the player. This usually happens on join. The sent commands can be modified via the sent commands expression.Modifications will affect what commands show up for the player to tab complete. They will not affect what commands the player can actually run.Adding new commands to the list is illegal behavior and will be ignored.

Examples

on send command list:     set command list to command list where [input does not contain ":"]     remove "help" from command list

On Server List Ping

Type: Event

Patterns: * [on] server [list] ping

Called when a server list ping is coming in, generally when a Minecraft client pings the server to show its information in the server list.The IP expression can be used to get the IP adress of the pinger.This event can be cancelled on PaperSpigot 1.12.2+ only and this means the player will see the server as offline (but still can join).Also you can use MOTD, Max Players, Online Players Count, Protocol Version, Version String, Hover List and Server Icon expressions, and Player Info Visibility and Hide Player from Server List effects to modify the server list.

Examples

on server list ping:     set the motd to "Welcome %{player-by-IP::%ip%}%! Join now!" if {player-by-IP::%ip%} is set, else "Join now!"     set the fake max players count to (online players count + 1)     set the shown icon to a random server icon out of {server-icons::*}

On Server Start/Stop

Type: Event

Patterns: * [on] (server|skript) (start|load|enable)

  • [on] (server|skript) (stop|unload|disable)

Called when the server starts or stops (actually, when Skript starts or stops, so a /reload will trigger these events as well).

Examples

on skript start: on server stop:

On Sheep Regrow Wool

Type: Event

Patterns: * [on] sheep [re]grow[ing] wool

Called when sheep regrows its sheared wool back.

Examples

on sheep grow wool:     cancel event

On Shoot

Type: Event

Patterns: * [on] [projectile] shoot

Called whenever a projectile is shot. Use the shooter expression to get who shot the projectile.

Examples

on shoot:     if projectile is an arrow:         send "you shot an arrow!" to shooter

On Sign Change

Type: Event

Patterns: * [on] sign (chang[e]|edit)[ing]

  • [on] [player] (chang[e]|edit)[ing] [a] sign

As signs are placed empty, this event is called when a player is done editing a sign.

Examples

on sign change:     line 2 is empty     set line 1 to "&lt;red&gt;%line 1%"

On Slime Split

Type: Event

Patterns: * [on] slime split[ting]

Called when a slime splits. Usually this happens when a big slime dies.

Examples

on slime split:

On Smelt

Type: Event

Patterns: * [on] [furnace] [ore] smelt[ed|ing] [of %item types%]

  • [on] [furnace] smelt[ed|ing] of ore

Called when a furnace smelts an item in its input slot.

Examples

on smelt:     clear the smelted item on smelt of raw iron:     broadcast smelted item     set the smelted item to iron block

On Sneak Toggle

Type: Event

Patterns: * [on] [player] toggl(e|ing) sneak

  • [on] [player] sneak toggl(e|ing)

Called when a player starts or stops sneaking. Use is sneaking to get whether the player was sneaking before the event was called.

Examples

# make players that stop sneaking jump on sneak toggle:     player is sneaking     push the player upwards at speed 0.5

On Spawn

Type: Event

Patterns: * [on] spawn[ing] [of %entity types%]

Called when an entity spawns (excluding players).

Examples

on spawn of a zombie: on spawn of an ender dragon:     broadcast "A dragon has been sighted in %world%!"

On Spawn Change

Type: Event

Patterns: * [on] [world] spawn change

Called when the spawn point of a world changes.

Examples

on spawn change:     broadcast "someone changed the spawn!"

On Spectate

Type: Event

Patterns: * [on] [player] stop spectating [(of|from) %*entity types%]

  • [on] [player] (swap|switch) spectating [(of|from) %*entity types%]
  • [on] [player] start spectating [of %*entity types%]

Called with a player starts, stops or swaps spectating an entity.

Examples

on player start spectating of a zombie:

On Sponge Absorb

Type: Event

Patterns: * [on] sponge absorb

Called when a sponge absorbs blocks.

Examples

on sponge absorb:     loop absorbed blocks:         broadcast "%loop-block% was absorbed by a sponge"!

On Spread

Type: Event

Patterns: * [on] spread[ing]

Called when a new block forms as a result of a block that can spread, e.g. water or mushrooms.

Examples

on spread:

On Sprint Toggle

Type: Event

Patterns: * [on] [player] toggl(e|ing) sprint

  • [on] [player] sprint toggl(e|ing)

Called when a player starts or stops sprinting. Use is sprinting to get whether the player was sprinting before the event was called.

Examples

on sprint toggle:     player is not sprinting     send "Run!"

On Start Smelt

Type: Event

Patterns: * [on] [furnace] start [of] smelt[ing] [[of] %item types%]

  • [on] [furnace] smelt[ing] start [of %item types%]

Called when a furnace starts smelting an item in its ore slot.

Examples

on smelting start:     if the smelting item is raw iron:         set total cook time to 1 second on smelting start of raw iron:     add 20 seconds to total cook time

On Stonecutter Recipe Select

Type: Event

Patterns: * [on] stonecutting [[of] %item types%]

Called when a player selects a recipe in a stonecutter.

Examples

on stonecutting stone slabs     cancel the event  on stonecutting:     broadcast "%player% is using stonecutter to craft %event-item%!"

On Stop Using Item

Type: Event

Patterns: * [on] [player] (stop|end) (using item|item use)

Called when a player stops using an item. For example, when the player releases the interact button when holding a bow, an edible item, or a spyglass.Note that event-timespan will return the time the item was used for.

Examples

on player stop using item:     broadcast "%player% used %event-item% for %event-timespan%."

On Swim Toggle

Type: Event

Patterns: * [on] [entity] toggl(e|ing) swim

  • [on] [entity] swim toggl(e|ing)

Called when an entity swims or stops swimming.

Examples

on swim toggle:     event-entity does not have permission "swim"     cancel event

On Tame

Type: Event

Patterns: * [on] [entity] tam(e|ing)

Called when a player tames a wolf or ocelot. Can be cancelled to prevent the entity from being tamed.

Examples

on tame:

On Target

Type: Event

Patterns: * [on] [entity] target

  • [on] [entity] un[-]target

Called when a mob starts/stops following/attacking another entity, usually a player.

Examples

on entity target:     target is a player

On Teleport

Type: Event

Patterns: * [on] [%entity types%] teleport[ing]

This event can be used to listen to teleports from non-players or player entities respectively.When teleporting entities, the event may also be called due to a result of natural causes, such as an enderman or shulker teleporting, or wolves teleporting to players.When teleporting players, the event can be called by teleporting through a nether/end portal, or by other means (e.g. plugins).

Examples

on teleport: on player teleport: on creeper teleport:

On Tool Change

Type: Event

Patterns: * [on] [player['s]] (tool|item held|held item) chang(e|ing)

Called whenever a player changes their held item by selecting a different slot (e.g. the keys 1-9 or the mouse wheel), not by dropping or replacing the item in the current slot.

Examples

on player's held item change:

On Vehicle Collision

Type: Event

Patterns: * [on] vehicle collision [(with|of) [a[n]] %item types/block datas/entity types%]

  • [on] vehicle block collision [(with|of) [a[n]] %item types/block datas%]
  • [on] vehicle entity collision [(with|of) [a[n]] %entity types%]

Called when a vehicle collides with a block or entity.

Examples

on vehicle collision: on vehicle collision with obsidian: on vehicle collision with a zombie:

On Vehicle Create

Type: Event

Patterns: * [on] vehicle create

  • [on] creat(e|ing|ion of) [a] vehicle

Called when a new vehicle is created, e.g. when a player places a boat or minecart.

Examples

on vehicle create:

On Vehicle Damage

Type: Event

Patterns: * [on] vehicle damage

  • [on] damag(e|ing) [a] vehicle

Called when a vehicle gets damage. Too much damage will destroy the vehicle.

Examples

on vehicle damage:

On Vehicle Destroy

Type: Event

Patterns: * [on] vehicle destroy

  • [on] destr(oy[ing]|uction of) [a] vehicle

Called when a vehicle is destroyed. Any passenger will be ejected and the vehicle might drop some item(s).

Examples

on vehicle destroy:     cancel event

On Vehicle Enter

Type: Event

Patterns: * [on] vehicle enter

  • [on] enter[ing] [a] vehicle

Called when an entity enters a vehicle, either deliberately (players) or by falling into them (mobs).

Examples

on vehicle enter:     entity is a player     cancel event

On Vehicle Exit

Type: Event

Patterns: * [on] vehicle exit

  • [on] exit[ing] [a] vehicle

Called when an entity exits a vehicle.

Examples

on vehicle exit:     if event-entity is a spider:         kill event-entity

On Vehicle Move

Type: Event

Patterns: * [on] vehicle move

Called when a vehicle moves.Please note that using this event can cause lag if there are multiple vehicle entities, i.e. Horse, Pig, Boat, Minecart

Examples

on vehicle move:     broadcast past event-location     broadcast event-location

On Weather Change

Type: Event

Patterns: * [on] weather change [to %weather types%]

Called when a world's weather changes.

Examples

on weather change: on weather change to sunny:

On World Init

Type: Event

Patterns: * [on] world init[ialization] [of %worlds%]

Called when a world is initialized. As all default worlds are initialized beforeany scripts are loaded, this event is only called for newly created worlds.World management plugins might change the behaviour of this event though.

Examples

on world init of "world_the_end":

On World Load

Type: Event

Patterns: * [on] world load[ing] [of %worlds%]

Called when a world is loaded. As with the world init event, this event will not be called for the server's default world(s).

Examples

on world load of "world_nether":     broadcast "The world %event-world% has been loaded!"

On World Save

Type: Event

Patterns: * [on] world sav(e|ing) [of %worlds%]

Called when a world is saved to disk. Usually all worlds are saved simultaneously, but world management plugins could change this.

Examples

on world save of "world":     broadcast "The world %event-world% has been saved"

On World Unload

Type: Event

Patterns: * [on] world unload[ing] [of %worlds%]

Called when a world is unloaded. This event will never be called if you don't have a world management plugin.

Examples

on world unload:     broadcast "the %event-world% has been unloaded!"

On Zombie Break Door

Type: Event

Patterns: * [on] zombie break[ing] [a] [wood[en]] door

Called when a zombie is done breaking a wooden door. Can be cancelled to prevent the zombie from breaking the door.

Examples

on zombie breaking a wood door:

Periodical

Type: Event

Patterns: * [on] every %time span%

An event that is called periodically.

Examples

every 2 seconds: every minecraft hour: every tick: # can cause lag depending on the code inside the event every minecraft days:

Periodical

Type: Event

Patterns: * [on] every %time span% in [world[s]] %worlds%

An event that is called periodically.

Examples

every 2 seconds in "world": every minecraft hour in "flatworld": every tick in "world": # can cause lag depending on the code inside the event every minecraft days in "plots":

Any Named Thing

Type: Type

Patterns: * Missing patterns.

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

Examples

{thing}'s name

Any Numbered/Sized Thing

Type: Type

Patterns: * Missing patterns.

Something that has an amount or size.

Examples

the size of {thing} the amount of {thing}

Any Valued Thing

Type: Type

Patterns: * Missing patterns.

Something that has a value.

Examples

the text of {node}

Anything with Contents

Type: Type

Patterns: * Missing patterns.

Something that contains other things.

Examples

{a} contains {b}

Attribute Type

Type: Type

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

Represents the type of an attribute. Note that this type does not contain any numerical values.See attribute types for more info.NOTE: Minecraft namespaces are supported, ex: 'minecraft:generic.attack_damage'.

Examples

Missing examples.

Banner Pattern

Type: Type

Patterns: * Missing patterns.

Represents a banner pattern.

Examples

Missing examples.

Banner Pattern Type

Type: Type

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

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

Examples

Missing examples.

Biome

Type: Type

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

All possible biomes Minecraft uses to generate a world.NOTE: Minecraft namespaces are supported, ex: 'minecraft:basalt_deltas'.

Examples

biome at the player is desert

Block

Type: Type

Patterns: * Missing patterns.

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

Examples

Missing examples.

Block Data

Type: Type

Patterns: * Missing patterns.

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

Examples

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

Boolean

Type: Type

Patterns: * true/yes/on or false/no/off

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

Examples

set {config.%player%.use mod} to false

Cat Type

Type: Type

Patterns: * all black, black, british shorthair, calico, jellie, persian, ragdoll, red, siamese, tabby, white

Represents the race/type of a cat entity.NOTE: Minecraft namespaces are supported, ex: 'minecraft:british_shorthair'.

Examples

Missing examples.

Chunk

Type: Type

Patterns: * Missing patterns.

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

Examples

Missing examples.

Click Type

Type: Type

Patterns: * lmb, number key, mmb, rmb, drop item, drop key, window border using left mouse button, unknown, window border using right mouse, shift+rmb, unsupported, shift+lmb, ctrl+q, swap shield, left mouse button, left mouse with shift, left mouse, 0-9, double click, double click using mouse, border using rmb, right mouse button, right mouse button with shift, border using lmb, middle mouse, drop key with control, window border using right mouse button, swap offhand, custom, q, right mouse with shift, middle mouse button, drop stack, left mouse button with shift, right mouse, creative action

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

Examples

Missing examples.

Color

Type: Type

Patterns: * black, dark grey/dark gray, grey/light grey/gray/light gray/silver, white, blue/dark blue, cyan/aqua/dark cyan/dark aqua, light blue/light cyan/light aqua, green/dark green, light green/lime/lime green, yellow/light yellow, orange/gold/dark yellow, red/dark red, pink/light red, purple/dark purple, magenta/light purple, brown/indigo

Wool, dye and chat colors.

Examples

color of the sheep is red or black set the color of the block to green message "You're holding a &amp;amp;amp;lt;%color of tool%&amp;amp;amp;gt;%color of tool%&amp;amp;amp;lt;reset&amp;amp;amp;gt; wool block"

Command Sender

Type: Type

Patterns: * use the console for the console

  • see player for players.

A player or the console.

Examples

command /push [&amp;amp;amp;amp;lt;player&amp;amp;amp;amp;gt;]:     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

Config

Type: Type

Patterns: * Missing patterns.

A configuration (or code) loaded by Skript, such as the config.sk or aliases.Configs can be reloaded or navigated to find options.

Examples

the skript config

Damage Cause

Type: Type

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

The cause/type of a damage event, e.g. lava, fall, fire, drowning, explosion, poison, etc.Please note that support for this type is very rudimentary, e.g. lava, fire and burning, as well as projectile and attack are considered different types.

Examples

Missing examples.

Date

Type: Type

Patterns: * Missing patterns.

A date is a certain point in the real world's time which can be obtained with now expression, unix date expression and date function.See time and timespan for the other time types of Skript.

Examples

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

Difficulty

Type: Type

Patterns: * normal, medium, hard, easy, peaceful

The difficulty of a world.

Examples

Missing examples.

Direction

Type: Type

Patterns: * see direction (expression)

A direction, e.g. north, east, behind, 5 south east, 1.3 meters to the right, etc.Locations and some blocks also have a direction, but without a length.Please note that directions have changed extensively in the betas and might not work perfectly. They can also not be used as command arguments.

Examples

set the block below the victim to a chest loop blocks from the block infront of the player to the block 10 below the player:     set the block behind the loop-block to water

Display Billboard

Type: Type

Patterns: * vertical pivot, horizontal, middle, horizontal pivot, center pivot, center, fixed, vertical

Represents the billboard setting of a display.

Examples

Missing examples.

Display Entity

Type: Type

Patterns: * Missing patterns.

A text, block or item display entity.

Examples

Missing examples.

Display Text Alignment

Type: Type

Patterns: * middle aligned, centered, right aligned, center aligned, left aligned

Represents the text alignment setting of a text display.

Examples

Missing examples.

Enchantment

Type: Type

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

An enchantment, e.g. 'sharpness' or 'fortune'. Unlike enchantment type this type has no level, but you usually don't need to use this type anyway.NOTE: Minecraft namespaces are supported, ex: 'minecraft:basalt_deltas'.As of Minecraft 1.21 this will also support custom enchantments using namespaces, ex: 'myenchants:explosive'.

Examples

Missing examples.

Enchantment Offer

Type: Type

Patterns: * Missing patterns.

The enchantmentoffer in an enchant prepare event.

Examples

on enchant prepare:     set enchant offer 1 to sharpness 1     set the cost of enchant offer 1 to 10 levels

Enchantment Type

Type: Type

Patterns: * []

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

Examples

enchant the player's tool with sharpness 5 helmet is enchanted with waterbreathing

Entity

Type: Type

Patterns: * player, op, wolf, tamed ocelot, powered creeper, zombie, unsaddled pig, fireball, arrow, dropped item, item frame, etc.

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

Examples

entity is a zombie or creeper player is an op projectile is an arrow shoot a fireball from the player

Entity Potion Cause

Type: Type

Patterns: * patrol captain, axolotl, death, removal by resurrection, beacon effect, potion drunk, illusion, unknown, drinking potion, expired, pillager captain, attack, villager trade, spawned spider, wither rose infliction, conversion, enter area effect cloud, conduit effect, command, food, drinking milk, plugin, converted, spider spawn, splash potion, warden, expiration, potion splash, dolphin boost, arrow infliction, turtle helmet effect

Represents the cause of the action of a potion effect on an entity, e.g. arrow, command

Examples

Missing examples.

Entity Snapshot

Type: Type

Patterns: * Missing patterns.

Represents a snapshot of an entity's data.This includes all of the data associated with an entity (its name, health, attributes, etc.), at the time this expression is used. Essentially, these are a way to create templates for entities.Individual attributes of a snapshot cannot be modified or retrieved.

Examples

Missing examples.

Entity Type

Type: Type

Patterns: * Detailed usage will be added eventually

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

Examples

victim is a cow spawn a creeper

Entity Type with Amount

Type: Type

Patterns: *

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

Examples

spawn 5 creepers behind the player

Executable

Type: Type

Patterns: * Missing patterns.

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

Examples

run {_function} with arguments 1 and true

Experience

Type: Type

Patterns: * [] ([e]xp|experience [point[s]])

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

Examples

give 10 xp to the player

Experience Cooldown Change Reason

Type: Type

Patterns: * plugin, pickup orb, orb pickup

Represents a change reason of an experience cooldown change event.

Examples

Missing examples.

Firework Effect

Type: Type

Patterns: * See Firework Types

A configuration of effects that defines the firework when explodedwhich can be used in the launch firework effect.See the firework effect expression for detailed patterns.

Examples

launch flickering trailing burst firework colored blue and green at player launch trailing flickering star colored purple, yellow, blue, green and red fading to pink at target entity launch ball large colored red, purple and white fading to light green and black at player's location with duration 1

Firework Type

Type: Type

Patterns: * small, ball, star shaped, large, star, creeper face, small ball, large ball, burst, ball large, creeper

The type of a fireworkeffect.

Examples

Missing examples.

Function

Type: Type

Patterns: * Missing patterns.

A function loaded by Skript.This can be executed (with arguments) and may return a result.

Examples

run {_function} with arguments 1 and true set {_result} to the result of {_function}

Game Mode

Type: Type

Patterns: * adventure, survival, spectator, creative

The game modes survival, creative, adventure and spectator.

Examples

player's gamemode is survival set the player argument's game mode to creative

Gamerule

Type: Type

Patterns: * tntExplosionDropDecay, globalSoundEvents, enderPearlsVanishOnDeath, doFireTick, maxCommandChainLength, doVinesSpread, disableElytraMovementCheck, lavaSourceConversion, commandBlockOutput, forgiveDeadPlayers, playersNetherPortalCreativeDelay, doMobSpawning, maxEntityCramming, universalAnger, playersSleepingPercentage, snowAccumulationHeight, doImmediateRespawn, blockExplosionDropDecay, naturalRegeneration, doMobLoot, fallDamage, doEntityDrops, randomTickSpeed, playersNetherPortalDefaultDelay, spawnRadius, freezeDamage, sendCommandFeedback, doWardenSpawning, fireDamage, reducedDebugInfo, waterSourceConversion, projectilesCanBreakBlocks, announceAdvancements, drowningDamage, spawnChunkRadius, disableRaids, doWeatherCycle, mobExplosionDropDecay, doDaylightCycle, showDeathMessages, doTileDrops, doInsomnia, keepInventory, disablePlayerMovementCheck, doLimitedCrafting, mobGriefing, doTraderSpawning, commandModificationBlockLimit, logAdminCommands, minecartMaxSpeed, spectatorsGenerateChunks, doPatrolSpawning, maxCommandForkCount

A gamerule

Examples

Missing examples.

Gamerule Value

Type: Type

Patterns: * Missing patterns.

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

Examples

Missing examples.

Gene

Type: Type

Patterns: * normal, lazy, happy, worried, worrisome, aggressive, brown, brownish, savage, playful, wild, weak

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

Examples

Missing examples.

Heal Reason

Type: Type

Patterns: * an ender crystal, magic, a magic regeneration, magic regeneration, fed, sated, a magic regen, regen potion, a wither spawn, peaceful, unknown, a regeneration potion, consuming, a wither effect, peaceful regeneration, wither summoning, healing potion, wither potion, an end crystal, satiated, regeneration potion, potion, satisfied, ingesting, withered, custom, a wither spawning, end crystal, eating, wither spawning, a wither summoning, wither effect, a plugin, a regen potion, plugin, withering, a potion, wither spawn, a healing potion, ender crystal, magic regen, wither, peaceful regen

The health regain reason in a heal event.

Examples

Missing examples.

Input Key

Type: Type

Patterns: * left movement key, forward movement key, right movement key, backward key, left key, sprint key, forward key, right key, jumping key, sneaking key, jump key, sneak key, sprinting key, backward movement key

Represents a movement input key that is pressed by a player.

Examples

Missing examples.

Inventory

Type: Type

Patterns: * Missing patterns.

An inventory of a player or block. Inventories have many effects and conditions regarding the items contained.An inventory has a fixed amount of slots which represent a specific place in the inventory, e.g. the helmet slot for players (Please note that slot support is still very limited but will be improved eventually).

Examples

Missing examples.

Inventory Action

Type: Type

Patterns: * drop stack from slot, swap items with hotbar, swap cursor stack, pickup single item, pickup some, drop all from cursor, move to other inventory, pickup from bundle inventory actions, drop cursor stack, place all into bundle inventory actions, pickup all, swap with hotbar, pickup all into bundle inventory actions, nothing, drop all from slot, swap cursor, drop cursor, pickup all items, drop slot item, place from bundle inventory actions, place all, drop cursor item, drop slot stack, drop single item from slot, swap with cursor, place some, pickup one item, drop single item from cursor, collect items to cursor, unknown, clone stack, drop stack from cursor, drop one item from slot, drop one item from cursor, unsupported, do nothing, drop one from cursor, pickup half, drop items from slot, swap stack with cursor, place some into bundle inventory actions, place all items, collect to cursor, pickup some items, drop slot, drop items from cursor, hotbar move and readd, shift move, custom, pickup single, place one item, hotbar swap items, drop one from slot, place some items, place one, pickup half stack, instant move, hotbar swap, pickup some into bundle inventory actions

What player just did in inventory event. Note that when in creative game mode, most actions do not work correctly.

Examples

Missing examples.

Inventory Close Reasons

Type: Type

Patterns: * disconnect, death, teleport, cannot use, new opened, unknown, can't use, unloaded, disconnected, plugin, can not use, open new, player

The inventory close reason in an inventory close event.

Examples

Missing examples.

Inventory Type

Type: Type

Patterns: * barrel inventory, a loom inventory, a blast furnace inventory, workbench inventory, ender chest inventory, loom inventory, a workbench inventory, hopper inventory, a merchant inventory, a hopper inventory, chiseled bookshelf, an ender chest inventory, new smithing table, bookshelf, a jukebox, beacon inventory, shulker box inventory, a barrel inventory, a shulker box inventory, lectern inventory, chest inventory, a villager inventory, a smoker inventory, a brewing stand inventory, a smithing inventory, grindstone inventory, a crafter inventory, a crafting table inventory, a player inventory, decorated pot, furnace inventory, a creative inventory, blast furnace inventory, upgrade gear, a composter inventory, an enchanting table inventory, jukebox, a dropper inventory, a cartography table inventory, a upgrade gear, smoker inventory, composter inventory, a chest inventory, upgrade gear table, a upgrade gear table, dispenser inventory, player inventory, stonecutter inventory, a stonecutter inventory, a decorated pot, a lectern inventory, merchant inventory, cartography table inventory, a chiseled bookshelf, a new smithing table, a furnace inventory, anvil inventory, a dispenser inventory, a grindstone inventory, smithing inventory, dropper inventory, brewing stand inventory, villager inventory, enchanting table inventory, a beacon inventory, a bookshelf, crafter inventory, creative inventory, crafting table inventory, an anvil inventory

Minecraft has several different inventory types with their own use cases.

Examples

Missing examples.

Item

Type: Type

Patterns: * [ [of]] [of ], Where must be an alias that represents exactly one item (i.e cannot be a general alias like 'sword' or 'plant')

An item, e.g. a stack of torches, a furnace, or a wooden sword of sharpness 2. Unlike item type an item can only represent exactly one item (e.g. an upside-down cobblestone stair facing west), while an item type can represent a whole range of items (e.g. any cobble stone stairs regardless of direction).You don't usually need this type except when you want to make a command that only accepts an exact item.Please note that currently 'material' is exactly the same as 'item', i.e. can have an amount & enchantments.

Examples

set {_item} to type of the targeted block {_item} is a torch

Item Display Transforms

Type: Type

Patterns: * first person left handed, left handed in first person, right handed in third person, first person left hand, no transform, the ground, third person right hand, third person right handed, right handed in first person, menu, head, third person left hand, first person right handed, first person right hand, fixed position, left handed in third person, gui, ground, fixed, third person left handed

Represents the transform setting of an item display.

Examples

Missing examples.

Item Flag

Type: Type

Patterns: * hide unbreakable, hide unbreakable status, hide destroys, hide additional tooltip, destroys hidden, hide enchants, stored enchantments hidden, hidden destroys, hidden stored enchants, dye hidden, stored enchants hidden, hidden enchants, hidden unbreakable status, hidden stored enchantments, hide stored enchants, hide stored enchantments, hide attributes, hidden additional tooltip, hidden armor trim, hidden placed on, additional tooltip hidden, enchants hidden, enchantments hidden, attributes hidden, unbreakable status hidden, hidden dye color, unbreakable hidden, dye color hidden, hide enchantments, hidden unbreakable, hide dye color, hidden attributes, armor trim hidden, hide destroyable blocks, hide placed on, hidden dye, hide armor trim, hide breakable blocks, placed on hidden, hide dye

Represents flags that may be applied to hide certain attributes of an item.

Examples

Missing examples.

Item Type

Type: Type

Patterns: * [ [of]] [all/every] [of [] [,/and ]]

An item type is an alias, e.g. 'a pickaxe', 'all plants', etc., and can result in different items when added to an inventory, and unlike items they are well suited for checking whether an inventory contains a certain item or whether a certain item is of a certain type.An item type can also have one or more enchantments with or without a specific level defined, and can optionally start with 'all' or 'every' to make this item type represent all types that the alias represents, including data ranges.

Examples

give 4 torches to the player add all slabs to the inventory of the block player's tool is a diamond sword of sharpness remove a pickaxes of fortune 4 from {stored items::*} set {_item} to 10 of every upside-down stair block is dirt or farmland

Living Entity

Type: Type

Patterns: * see entity, but ignore inanimate objects

A living entity, i.e. a mob or player, not inanimate entities like projectiles or dropped items.

Examples

spawn 5 powered creepers shoot a zombie from the creeper

Location

Type: Type

Patterns: * Missing patterns.

A location in a world. Locations are world-specific and even store a direction, e.g. if you save a location and later teleport to it you will face the exact same direction you did when you saved the location.

Examples

Missing examples.

Loot Context

Type: Type

Patterns: * Missing patterns.

Represents additional information a loot table can use to modify its generated loot.Some loot tables will require some values (i.e. looter, location, looted entity) in a loot context when generating loot whereas others may not.For example, the loot table of a simple dungeon chest will only require a location, whereas the loot table of a cow will require a looting player, looted entity, and location.You can find more information about this in https://minecraft.wiki/w/Loot_context

Examples

Missing examples.

Loot Table

Type: Type

Patterns: * Missing patterns.

Loot tables represent what items should be in naturally generated containers, what items should be dropped when killing a mob, or what items can be fished.You can find more information about this in https://minecraft.wiki/w/Loot_table

Examples

Missing examples.

Metadata Holder

Type: Type

Patterns: * Missing patterns.

Something that can hold metadata (e.g. an entity or block)

Examples

set metadata value "super cool" of player to true

Minecraft Tag

Type: Type

Patterns: * Missing patterns.

A tag that classifies a material, or entity.

Examples

Missing examples.

Money

Type: Type

Patterns: * $ or $ , where '$' is your server's currency, e.g. '10 rupees' or '£5.00'

A certain amount of money. Please note that this differs from numbers as it includes a currency symbol or name, but usually the two are interchangeable, e.g. you can both add 100$ to the player's balance and add 100 to the player's balance.

Examples

add 10£ to the player's account remove Fr. 9.95 from the player's money set the victim's money to 0 increase the attacker's balance by the level of the victim * 100

Moon Phase

Type: Type

Patterns: * last quarter, waning crescent, waxing gibbous, full moon, waning gibbous, waxing crescent, new moon, first quarter

Represents the phase of a moon.

Examples

Missing examples.

Node

Type: Type

Patterns: * Missing patterns.

A node (entry) from a script config file.This may have navigable children.

Examples

the current script

Number

Type: Type

Patterns: * [-]###[.###] [in ] (any amount of digits; very large numbers will be truncated though)

A number, e.g. 2.5, 3, -9812454, 30 degrees or 3.14 radians.Please note that many expressions only need integers, i.e. will discard any fractional parts of any numbers without producing an error.Radians will be converted to degrees.

Examples

set the player's health to 5.5 set {_temp} to 2*{_temp} - 2.5 set {_angle} to 3.14 in radians # will be converted to degrees

Object

Type: Type

Patterns: * Missing patterns.

The supertype of all types, meaning that if %object% is used in e.g. a condition it will accept all kinds of expressions.

Examples

Missing examples.

Offline Player

Type: Type

Patterns: * Parsing an offline player as a player (online) will return nothing (none), for that case you would need to parse as offlineplayer which only returns nothing (none) if player doesn't exist in Minecraft databases (name not taken) otherwise it will return the player regardless of their online status.

A player that is possibly offline. See player for more information. Please note that while all effects and conditions that require a player can be used with an offline player as well, they will not work if the player is not actually online.

Examples

set {_p} to "Notch" parsed as an offlineplayer # returns Notch even if they're offline

Player

Type: Type

Patterns: * Parsing an offline player as a player (online) will return nothing (none), for that case you would need to parse as offlineplayer which only returns nothing (none) if player doesn't exist in Minecraft databases (name not taken) otherwise it will return the player regardless of their online status.

A player. Depending on whether a player is online or offline several actions can be performed with them, though you won't get any errors when using effects that only work if the player is online (e.g. changing their inventory) on an offline player.You have two possibilities to use players as command arguments: and . The first requires that the player is online and also accepts only part of the name, while the latter doesn't require that the player is online, but the player's name has to be entered exactly.

Examples

set {_p} to "Notch" parsed as a player # returns &amp;amp;amp;lt;none&amp;amp;amp;gt; unless Notch is actually online or starts with Notch like Notchan set {_p} to "N" parsed as a player # returns Notch if Notch is online because their name starts with 'N' (case insensitive) however, it would return nothing if no player whose name starts with 'N' is online.

Potion Effect

Type: Type

Patterns: * speed of tier 1 for 10 seconds

A potion effect, including the potion effect type, tier and duration.

Examples

Missing examples.

Potion Effect Type

Type: Type

Patterns: * absorption, bad luck, bad omen, blindness, conduit power, confusion, damage, damage resistance, darkness, dolphin's grace, dolphins grace, fast digging, fast mining, fire immunity, fire resistance, floating, glowing, haste, health, health boost, hero of the village, hunger, increase damage, increased damage, infested, instant damage, instant health, invisibility, jump, jump boost, levitation, luck, max health boost, maximum health boost, mining fatigue, nausea, night vision, oozing, poison, raid omen, reduce damage, reduced damage, regeneration, resistance, saturation, slow, slow digging, slow fall, slow falling, slow mining, slowness, speed, strength, swiftness, trial omen, unluck, water breathing, weakness, weaving, wind charged, wither, wither effect, wither potion effect

A potion effect type, e.g. 'strength' or 'swiftness'.

Examples

apply swiftness 5 to the player apply potion of speed 2 to the player for 60 seconds remove invisibility from the victim

Projectile

Type: Type

Patterns: * arrow, fireball, snowball, thrown potion, etc.

A projectile, e.g. an arrow, snowball or thrown potion.

Examples

projectile is a snowball shoot an arrow at speed 5 from the player

Quaternion

Type: Type

Patterns: * Missing patterns.

Quaternions are four dimensional vectors, often used for representing rotations.

Examples

Missing examples.

Queue

Type: Type

Patterns: * Missing patterns.

A queued list of values. Entries are removed from a queue when they are queried.

Examples

set {queue} to a new queue add "hello" to {queue} broadcast the 1st element of {queue}

Quit Reason

Type: Type

Patterns: * disconnected, erroneous state, kicked, quit, timed out, erroneous

Represents a quit reason from a player quit server event.

Examples

Missing examples.

Region

Type: Type

Patterns: * "region name"

A region of a regions plugin. Skript currently supports WorldGuard, Factions, GriefPrevention and PreciousStones.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

Missing examples.

Resource Pack State

Type: Type

Patterns: * discarded, refused, rejected, failed reload, accepted, failed, failed to reload, failed to download, downloaded, successfully loaded, accept, fail, successfully load, refuse, declined, successfully install, success, reject, decline, successfully installed, download fail, invalid url

The state in a resource pack request response event.

Examples

Missing examples.

Script

Type: Type

Patterns: * Missing patterns.

A script loaded by Skript.Disabled scripts will report as being empty since their content has not been loaded.

Examples

the current script

Server Icon

Type: Type

Patterns: * Missing patterns.

A server icon that was loaded using the load server icon effect.

Examples

Missing examples.

Slot

Type: Type

Patterns: * Missing patterns.

Represents a single slot of an inventory. Notable slots are the armour slots and furnace slots. The most important property that distinguishes a slot from an item is its ability to be changed, e.g. it can be set, deleted, enchanted, etc. (Some item expressions can be changed as well, e.g. items stored in variables. For that matter: slots are never saved to variables, only the items they represent at the time when the variable is set).Please note that tool can be regarded a slot, but it can actually change it's position, i.e. doesn't represent always the same slot.

Examples

set tool of player to dirt delete helmet of the victim set the color of the player's tool to green enchant the player's chestplate with projectile protection 5

Sound Category

Type: Type

Patterns: * hostile creatures category, speech category, records category, friendly creature category, noteblock category, hostile creature category, note block category, voice category, ambient category, noteblocks category, note blocks category, weather category, block category, friendly mob category, jukebox category, hostile mob category, master category, master volume category, hostile category, record category, blocks category, environment category, jukeboxes category, player category, players category, hostile mobs category, friendly mobs category, music category, friendly creatures category, neutral category

The category of a sound, they are used for sound options of Minecraft. See the play sound and stop sound effects.

Examples

Missing examples.

Spawn Reason

Type: Type

Patterns: * dispense egg, egg, village defense, ocelot baby, silverfish trap, village invading, trap, dispensing egg, shoulder, drowned, metamorphosis, lightning, silverfish reveal, spell, built iron golem, natural, trial mob spawner, village invasion, frozen, mount, build wither, built wither, iron golem defense, ender pearl, creature spawner, reinforcements, build snowman, build iron golem, breeding, raid, ominous item spawner, infection, customized, potion effect, spawn egg, jockey, beehive, default, golem defense, patrol, slime split, infected, sheared, mob spawner, nether portal, trial spawner, shear, perching, custom, built snowman, chunk generation, breed, command, duplication, explosion, spawner, cured, enchantment, trial creature spawner, customised, piglin zombification

The spawn reason in a spawn event.

Examples

Missing examples.

Teleport Cause

Type: Type

Patterns: * bed exit, nether portal, ender gateway, exiting bed, chorus fruit, ender portal, command, unknown, plugin, dismounted, ender pearl, spectator, spectate, end gateway, chorus, exit bed, gateway, dismount, end portal

The teleport cause in a teleport event.

Examples

Missing examples.

Teleport Flag

Type: Type

Patterns: * passengers, xyz velocity, z velocity, yaw velocity, inventory, pitch velocity, vehicle, opened inventory, open inventory, x velocity, passenger, pitch and yaw velocity, yaw and pitch velocity, directional velocity, y velocity

Teleport Flags are settings to retain during a teleport.

Examples

Missing examples.

Text

Type: Type

Patterns: * simple: "..."

  • quotes: "...""..."
  • expressions: "...%expression%..."
  • percent signs: "...%%..."

Text is simply text, i.e. a sequence of characters, which can optionally contain expressions which will be replaced with a meaningful representation (e.g. %player% will be replaced with the player's name).Because scripts are also text, you have to put text into double quotes to tell Skript which part of the line is an effect/expression and which part is the text.Please read the article on Texts and Variable Names to learn more.

Examples

broadcast "Hello World!" message "Hello %player%" message "The id of ""%type of tool%"" is %id of tool%."

Time

Type: Type

Patterns: * ##:##

  • ##[:##][ ]am/pm

A time is a point in a minecraft day's time (i.e. ranges from 0:00 to 23:59), which can vary per world.See date and timespan for the other time types of Skript.

Examples

at 20:00:     time is 8 pm     broadcast "It's %time%"

Timeperiod

Type: Type

Patterns: * ##:## - ##:##

  • dusk/day/dawn/night

A period of time between two times. Mostly useful since you can use this to test for whether it's day, night, dusk or dawn in a specific world.This type might be removed in the future as you can use 'time of world is between x and y' as a replacement.

Examples

time in world is night

Timespan

Type: Type

Patterns: * [minecraft/mc/real/rl/irl] ticks/seconds/minutes/hours/days/weeks/months/years [[,/and] <more...>]

  • [###:]##:##[.####] ([hours:]minutes:seconds[.milliseconds])

A timespan is a difference of two different dates or times, e.g '10 minutes'. Timespans are always displayed as real life time, but can be defined as minecraft time, e.g. '5 minecraft days and 12 hours'.NOTE: Months always have the value of 30 days, and years of 365 days.See date and time for the other time types of Skript.

Examples

every 5 minecraft days:     wait a minecraft second and 5 ticks every 10 mc days and 12 hours:     halt for 12.7 irl minutes, 12 hours and 120.5 seconds

Transform Reason

Type: Type

Patterns: * infection, magma slime split, villager infection, tadpole metamorphosis, drowning, creeper super charge, unknown, split, tadpole converting, metamorphosis, skeleton converting to stray, lightning, slime split, entity drowning, slime splitting, zombie drowning, zombie curing, skeleton freeze, entity freezing, zombie converting to drowned, curing, entity freeze, skeleton freezing, mooshroom shear, zombie cure, tadpole converting to frog, mooshroom shearing, magma slime splitting, piglin zombification

Represents a transform reason of an entity transform event.

Examples

Missing examples.

Tree Type

Type: Type

Patterns: * [any] <general tree/mushroom type>, e.g. tree/any jungle tree/etc.

  • <specific tree/mushroom species>, e.g. red mushroom/small jungle tree/big regular tree/etc.

A tree type represents a tree species or a huge mushroom species. These can be generated in a world with the generate tree effect.

Examples

grow any regular tree at the block grow a huge red mushroom above the block

Type

Type: Type

Patterns: * See the type name patterns of all types - including this one

Represents a type, e.g. number, object, item type, location, block, world, entity type, etc.This is mostly used for expressions like 'event-', '-argument', 'loop-', etc., e.g. event-world, number-argument and loop-player.

Examples

{variable} is a number # check whether the variable contains a number, e.g. -1 or 5.5 {variable} is a type # check whether the variable contains a type, e.g. number or player {variable} is an object # will always succeed if the variable is set as everything is an object, even types. disable PvP in the event-world kill the loop-entity

Unleash Reason

Type: Type

Patterns: * player unleashed, distance, unleashed by player, player unleash, holder (gone|disappeared), unknown

Represents an unleash reason of an unleash event.

Examples

Missing examples.

Vector

Type: Type

Patterns: * vector(x, y, z)

Vector is a collection of numbers. In Minecraft, 3D vectors are used to express velocities of entities.

Examples

Missing examples.

Villager Profession

Type: Type

Patterns: * armorer, armorer profession, butcher, butcher profession, cartographer, cartographer profession, cleric, cleric profession, farmer, farmer profession, fisherman, fisherman profession, fletcher, fletcher profession, leatherworker, leatherworker profession, librarian, librarian profession, mason, mason profession, nitwit, nitwit profession, no profession, none, none profession, shepherd, shepherd profession, toolsmith, toolsmith profession, unemployed, weaponsmith, weaponsmith profession

Represents the different professions of villagers.

Examples

Missing examples.

Villager Type

Type: Type

Patterns: * desert, jungle, plains, savanna, snow, swamp, taiga

Represents the different types of villagers. These are usually the biomes a villager can be from.

Examples

Missing examples.

Visual Effect

Type: Type

Patterns: * smoke, potion break, ender signal, mobspawner flames, arrow particles, jumping rabbit, hurt, wolf smoke, wolf hearts, wolf shaking, sheep eating, iron golem offering rose, witch magic, zombie turning to a villager, firework explosion, love hearts, squid rotation reset, entity poof, guardian target, block with shield, shield break, armor stand hit, hurt by thorns, iron golem sheathing rose, resurrection by totem, hurt by drowning, hurt by explosion, poof, large explosion, explosion emitter, firework, bubble, splash, water wake, underwater, critical hit, enchanted hit, smoke, large smoke, effect, instant effect, entity effect, witch, dripping water, dripping lava, angry villager, happy villager, mycelium, note, portal, enchant, flame, lava pop, cloud, dust, snowball, slime, heart, item, block, rain, elder guardian, dragon breath, end rod, damage indicator, sweep attack, falling dust, totem of undying, spit, squid ink, bubble pop, current down, bubble column up, nautilus, dolphin, sneeze, campfire cosy smoke, campfire signal smoke, composter, flash, falling lava, landing lava, falling water, dripping honey, falling honey, landing honey, falling nectar, soul fire flame, ash, crimson spore, warped spore, soul, dripping obsidian tear, falling obsidian tear, landing obsidian tear, reverse portal, white ash, dust color transition, vibration, falling spore blossom, spore blossom air, small flame, snowflake, dripping dripstone lava, falling dripstone lava, dripping dripstone water, falling dripstone water, glow squid ink, glow, wax on, wax off, electric spark, scrape, sonic boom, sculk soul, sculk charge, sculk charge pop, shriek, cherry leaves, egg crack, dust plume, white smoke, gust, small gust, large gust emitter, small gust emitter, trial spawner detection, ominous trial spawner detection, vault connection, infested, cobweb, dust pillar, ominous spawning, raid omen, block marker

A visible effect, e.g. particles.

Examples

show wolf hearts on the clicked wolf play mob spawner flames at the targeted block to the player

Weather Type

Type: Type

Patterns: * clear/sun/sunny, rain/rainy/raining, and thunder/thundering/thunderstorm

The weather types sunny, rainy, and thundering.

Examples

is raining is sunny in the player's world message "It is %weather in the argument's world% in %world of the argument%"

Wolf Variant

Type: Type

Patterns: * ashen, black, chestnut, pale, rusty, snowy, spotted, striped, woods

Represents the variant of a wolf entity.NOTE: Minecraft namespaces are supported, ex: 'minecraft:ashen'.

Examples

Missing examples.

World

Type: Type

Patterns: * "world_name", e.g. "world"

One of the server's worlds. Worlds can be put into scripts by surrounding their name with double quotes, e.g. "world_nether", but this might not work reliably as text uses the same syntax.

Examples

broadcast "Hello!" to the world "world_nether"

World Environment

Type: Type

Patterns: * normal, nether, the end, the overworld, custom, the nether, end, overworld

Represents the environment of a world.

Examples

Missing examples.

abs

Type: Function

Patterns: * abs(n: number)

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

Examples

abs(3) = 3 abs(-2) = 2

acos

Type: Function

Patterns: * acos(n: number)

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

Examples

acos(0) = 90 acos(1) = 0 acos(0.5) = 30

asin

Type: Function

Patterns: * asin(n: number)

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

Examples

asin(0) = 0 asin(1) = 90 asin(0.5) = 30

atan

Type: Function

Patterns: * atan(n: number)

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

Examples

atan(0) = 0 atan(1) = 45 atan(10000) = 89.9943

atan2

Type: Function

Patterns: * atan2(x: number, y: number)

Similar to atan, but requires two coordinates and returns values from -180 to 180.The returned angle is measured counterclockwise in a standard mathematical coordinate system (x to the right, y to the top).

Examples

atan2(0, 1) = 0 atan2(10, 0) = 90 atan2(-10, 5) = -63.4349

axisAngle

Type: Function

Patterns: * axisAngle(angle: number, axis: vector)

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

Examples

axisangle(90, (vector from player's facing))

calcExperience

Type: Function

Patterns: * calcExperience(level: long)

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

Examples

Missing examples.

case_equals

Type: Function

Patterns: * case_equals(strs: strings)

Checks if the contents of a list of strings are strictly equal with case sensitivity.

Examples

caseEquals("hi", "Hi") = false caseEquals("text", "text", "text") = true caseEquals({some list variable::*})

ceil

Type: Function

Patterns: * ceil(n: number)

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

Examples

ceil(2.34) = 3 ceil(2) = 2 ceil(2.99) = 3

ceiling

Type: Function

Patterns: * ceiling(n: number)

Alias of ceil.

Examples

ceiling(2.34) = 3 ceiling(2) = 2 ceiling(2.99) = 3

clamp

Type: Function

Patterns: * clamp(values: numbers, min: number, max: number)

Clamps one or more values between two numbers.

Examples

clamp(5, 0, 10) = 5 clamp(5.5, 0, 5) = 5 clamp(0.25, 0, 0.5) = 0.25 clamp(5, 7, 10) = 7 clamp((5, 0, 10, 9, 13), 7, 10) = (7, 7, 10, 9, 10) set {_clamped::*} to clamp({_values::*}, 0, 10)

concat

Type: Function

Patterns: * concat(texts: objects)

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

Examples

concat("hello ", "there") # hello there concat("foo ", 100, " bar") # foo 100 bar

cos

Type: Function

Patterns: * cos(n: number)

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

Examples

cos(0) = 1 cos(90) = 0

date

Type: Function

Patterns: * date(year: number, month: number, day: number, hour: number = 0, minute: number = 0, second: number = 0, millisecond: number = 0, zone_offset: number = NaN, dst_offset: number = NaN)

Creates a date from a year, month, and day, and optionally also from hour, minute, second and millisecond.A time zone and DST offset can be specified as well (in minutes), if they are left out the server's time zone and DST offset are used (the created date will not retain this information).

Examples

date(2014, 10, 1) # 0:00, 1st October 2014 date(1990, 3, 5, 14, 30) # 14:30, 5th May 1990 date(1999, 12, 31, 23, 59, 59, 999, -3*60, 0) # almost year 2000 in parts of Brazil (-3 hours offset, no DST)

exp

Type: Function

Patterns: * exp(n: number)

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

Examples

exp(0) = 1 exp(1) = 2.7183

file_separator

Type: Function

Patterns: * file_separator()

Returns the real (platform-dependent) file separator: typically / for UN*X or \ for Windows.

Examples

file_separator() = "/"

floor

Type: Function

Patterns: * floor(n: number)

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

Examples

floor(2.34) = 2 floor(2) = 2 floor(2.99) = 2

formatNumber

Type: Function

Patterns: * formatNumber(number: number, format: string = )

Converts numbers to human-readable format. By default, '###,###' (e.g. '123,456,789') will be used for whole numbers and '###,###.##' (e.g. '123,456,789.00) will be used for decimal numbers. A hashtag '#' represents a digit, a comma ',' is used to separate numbers, and a period '.' is used for decimals. Will return none if the format is invalid.For further reference, see this article.

Examples

command /balance:     aliases: bal     executable by: players     trigger:         set {_money} to formatNumber({money::%sender's uuid%})         send "Your balance: %{_money}%" to sender

isNaN

Type: Function

Patterns: * isNaN(n: number)

Returns true if the input is NaN (not a number).

Examples

isNaN(0) # false isNaN(0/0) # true isNaN(sqrt(-1)) # true

line_separator

Type: Function

Patterns: * line_separator()

Returns the real (platform-dependent) line separator: typically line feed for UN*X or carriage return line feed for Windows.

Examples

broadcast "hello" + line_separator() + "world"

ln

Type: Function

Patterns: * ln(n: number)

The natural logarithm. You probably don't need this if you don't know what this is.Returns NaN (not a number) if the argument is negative.

Examples

ln(1) = 0 ln(exp(5)) = 5 ln(2) = 0.6931

location

Type: Function

Patterns: * location(x: number, y: number, z: number, world: world = event-world, yaw: number = 0, pitch: number = 0)

Creates a location from a world and 3 coordinates, with an optional yaw and pitch.If for whatever reason the world is not found, it will fallback to the server's main world.

Examples

# TELEPORTING teleport player to location(1,1,1, world "world") teleport player to location(1,1,1, world "world", 100, 0) teleport player to location(1,1,1, world "world", yaw of player, pitch of player) teleport player to location(1,1,1, world of player) teleport player to location(1,1,1, world("world")) teleport player to location({_x}, {_y}, {_z}, {_w}, {_yaw}, {_pitch}) # SETTING BLOCKS set block at location(1,1,1, world "world") to stone set block at location(1,1,1, world "world", 100, 0) to stone set block at location(1,1,1, world of player) to stone set block at location(1,1,1, world("world")) to stone set block at location({_x}, {_y}, {_z}, {_w}) to stone # USING VARIABLES set {_l1} to location(1,1,1) set {_l2} to location(10,10,10) set blocks within {_l1} and {_l2} to stone if player is within {_l1} and {_l2}: # OTHER kill all entities in radius 50 around location(1,65,1, world "world") delete all entities in radius 25 around location(50,50,50, world "world_nether") ignite all entities in radius 25 around location(1,1,1, world of player)

log

Type: Function

Patterns: * log(n: number, base: number = 10)

A logarithm, with base 10 if none is specified. This is the inverse operation to exponentiation (for positive bases only), i.e. log(base ^ exponent, base) = exponent for any positive number 'base' and any number 'exponent'.Another useful equation is base ^ log(a, base) = a for any numbers 'base' and 'a'.Please note that due to how numbers are represented in computers, these equations do not hold for all numbers, as the computed values may slightly differ from the correct value.Returns NaN (not a number) if any of the arguments are negative.

Examples

log(100) = 2 # 10^2 = 100 log(16, 2) = 4 # 2^4 = 16

max

Type: Function

Patterns: * max(ns: numbers)

Returns the maximum number from a list of numbers.

Examples

max(1) = 1 max(1, 2, 3, 4) = 4 max({some list variable::*})

min

Type: Function

Patterns: * min(ns: numbers)

Returns the minimum number from a list of numbers.

Examples

min(1) = 1 min(1, 2, 3, 4) = 1 min({some list variable::*})

mod

Type: Function

Patterns: * mod(d: number, m: number)

Returns the modulo of the given arguments, i.e. the remainder of the division d/m, where d and m are the arguments of this function.The returned value is always positive. Returns NaN (not a number) if the second argument is zero.

Examples

mod(3, 2) = 1 mod(256436, 100) = 36 mod(-1, 10) = 9

offlineplayer

Type: Function

Patterns: * offlineplayer(nameOrUUID: string, allowLookups: boolean = true)

Returns a offline player from their name or UUID. This function will still return the player if they're online. If Paper 1.16.5+ is used, the 'allowLookup' parameter can be set to false to prevent this function from doing a web lookup for players who have not joined before. Lookups can cause lag spikes of up to multiple seconds, so use offline players with caution.

Examples

set {_p} to offlineplayer("Notch") set {_p} to offlineplayer("069a79f4-44e9-4726-a5be-fca90e38aaf5") set {_p} to offlineplayer("Notch", false)

player

Type: Function

Patterns: * player(nameOrUUID: string, getExactPlayer: boolean = false)

Returns an online player from their name or UUID, if player is offline function will return nothing.Setting 'getExactPlayer' parameter to true will return the player whose name is exactly equal to the provided name instead of returning a player that their name starts with the provided name.

Examples

set {_p} to player("Notch") # will return an online player whose name is or starts with 'Notch' set {_p} to player("Notch", true) # will return the only online player whose name is 'Notch' set {_p} to player("069a79f4-44e9-4726-a5be-fca90e38aaf5") # &amp;lt;none&amp;gt; if player is offline

product

Type: Function

Patterns: * product(ns: numbers)

Calculates the product of a list of numbers.

Examples

product(1) = 1 product(2, 3, 4) = 24 product({some list variable::*}) product(2, {_v::*}, and the player's y-coordinate)

quaternion

Type: Function

Patterns: * quaternion(w: number, x: number, y: number, z: number)

Returns a quaternion from the given W, X, Y and Z parameters.

Examples

quaternion(1, 5.6, 45.21, 10)

rgb

Type: Function

Patterns: * rgb(red: long, green: long, blue: long, alpha: long = 255)

Returns a RGB color from the given red, green and blue parameters. Alpha values can be added optionally, but these only take affect in certain situations, like text display backgrounds.

Examples

dye player's leggings rgb(120, 30, 45) set the colour of a text display to rgb(10, 50, 100, 50)

round

Type: Function

Patterns: * round(n: number, d: number = 0)

Rounds a number, i.e. returns the closest integer to the argument. Place a second argument to define the decimal placement.

Examples

round(2.34) = 2 round(2) = 2 round(2.99) = 3 round(2.5) = 3

sin

Type: Function

Patterns: * sin(n: number)

The sine function. It starts at 0° with a value of 0, goes to 1 at 90°, back to 0 at 180°, to -1 at 270° and then repeats every 360°. Uses degrees, not radians.

Examples

sin(90) = 1 sin(60) = 0.866

sqrt

Type: Function

Patterns: * sqrt(n: number)

The square root, which is the inverse operation to squaring a number (for positive numbers only). This is the same as (argument) ^ (1/2) – other roots can be calculated via number ^ (1/root), e.g. set {_l} to {_volume}^(1/3).Returns NaN (not a number) if the argument is negative.

Examples

sqrt(4) = 2 sqrt(2) = 1.4142 sqrt(-1) = NaN

sum

Type: Function

Patterns: * sum(ns: numbers)

Sums a list of numbers.

Examples

sum(1) = 1 sum(2, 3, 4) = 9 sum({some list variable::*}) sum(2, {_v::*}, and the player's y-coordinate)

tan

Type: Function

Patterns: * tan(n: number)

The tangent function. This is basically sin(arg)/cos(arg). Uses degrees, not radians.

Examples

tan(0) = 0 tan(45) = 1 tan(89.99) = 5729.5779

vector

Type: Function

Patterns: * vector(x: number, y: number, z: number)

Creates a new vector, which can be used with various expressions, effects and functions.

Examples

vector(0, 0, 0)

world

Type: Function

Patterns: * world(name: string)

Gets a world from its name.

Examples

set {_nether} to world("%{_world}%_nether")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment