Syntaxes for Skript 2.14.0
No results were found.
Function abs
Section titled “ Function abs”Returns the absolute value of the argument, i.e. makes the argument positive.
Since 2.2 Return Type
Number
abs(n: number)abs(3) = 3abs(-2) = 2Expression Absorbed blocks
Section titled “ Expression Absorbed blocks”The blocks absorbed by a sponge block.
Since 2.5 Return Type
Block
Applicable EventsOn Sponge Absorb
[the] absorbed blocksthe absorbed blocksFunction acos
Section titled “ Function acos”The inverse of the cosine, also called arccos. Returns result in degrees, not radians. Only returns values from 0 to 180.
Since 2.2 Return Type
Number
acos(n: number)acos(0) = 90acos(1) = 0acos(0.5) = 30Effect Action Bar
Section titled “ Effect Action Bar”Sends an action bar message to the given player(s).
Since 2.3
send [the] action[ ]bar [with text] %text% [to %players%]send action bar "Hello player!" to playerExpression Active Item
Section titled “ Expression Active Item”Returns the item the entities are currently using (ie: the food they're eating, the bow they're drawing back, etc.). This cannot be changed. If an entity is not using any item, this will return null.
Since 2.8.0 Return Type
Item
[the] (raised|active) (tool|item|weapon) of %living entities%%living entities%'[s] (raised|active) (tool|item|weapon)on damage of player: if victim's active tool is a bow: interrupt player's active item useExpression Active Item Use Time
Section titled “ Expression Active Item Use 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.
Since 2.8.0 Return Type
Timespan
[the] [elapsed|remaining] (item|tool) us[ag]e time of %living entities%%living entities%'[s] [elapsed|remaining] (item|tool) us[ag]e timeon right click: broadcast player's remaining item use time wait 1 second broadcast player's item use timeExpression Affected Entities
Section titled “ Expression Affected Entities”The affected entities in the area cloud effect event.
Since 2.4 Return Type
Living Entity
[the] affected entitieson area cloud effect: loop affected entities: if loop-value is a player: send "WARNING: you've step on an area effect cloud!" to loop-valueExpression Age of Block/Entity
Section titled “ Expression Age of Block/Entity”Returns the age or maximum age of blocks and age for entities (there in no maximum age for entities).
For blocks, 'Age' represents the different growth stages that a crop-like block can go through. A value of 0 indicates that the crop was freshly planted, whilst a value equal to 'maximum age' indicates that the crop is ripe and ready to be harvested.
For entities, 'Age' represents the time left for them to become adults and it's in minus increasing to be 0 which means they're adults, e.g. A baby cow needs 20 minutes to become an adult which equals to 24,000 ticks so their age will be -24000 once spawned.
Since 2.7 Return Type
Number
[the] [max[imum]] age of %blocks/entities%%blocks/entities%'[s] [max[imum]] age# 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 secondsStructure Aliases
Section titled “ Structure Aliases”Used for registering custom aliases for a script.
Since 1.0
aliases# Example aliases for a scriptaliases: blacklisted items = TNT, bedrock, obsidian, mob spawner, lava, lava bucket shiny swords = golden sword, iron sword, diamond swordExpression All Banned Players/IPs
Section titled “ Expression All Banned Players/IPs”Obtains the list of all banned players or IP addresses.
Since 2.7 Return Type
Object
[all [[of] the]|the] banned (players|(ips|ip addresses))command /banlist: trigger: send all the banned playersExpression All commands
Section titled “ Expression All commands”Returns all registered commands or all script commands.
Since 2.6 Return Type
Text
[(all|the|all [of] the)] [registered] [script] commandssend "Number of all commands: %size of all commands%"send "Number of all script commands: %size of all script commands%"Expression All Operators
Section titled “ Expression All Operators”The list of operators on the server.
Since 2.7 Return Type
Offline Player
[all [[of] the]|the] [server] [non(-| )]op[erator]sset {_ops::*} to all operatorsExpression All Permissions
Section titled “ Expression All Permissions”Returns all permissions of the defined player(s). Note that the modifications to resulting list do not actually change permissions.
Since 2.2-dev33 Return Type
Text
[(all [[of] the]|the)] permissions (from|of) %players%[(all [[of] the]|the)] %players%'[s] permissionsset {_permissions::*} to all permissions of the playerExpression All Scripts
Section titled “ Expression All Scripts”Returns all of the scripts, or just the enabled or disabled ones.
Since 2.5 Return Type
Text
[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)]command /scripts: trigger: send "All Scripts: %scripts%" to player send "Loaded Scripts: %enabled scripts%" to player send "Unloaded Scripts: %disabled scripts%" to playerExpression All Scripts
Section titled “ Expression All Scripts”Returns all of the scripts, or just the enabled or disabled ones.
Since 2.10 Return Type
Script
[all [[of] the]|the] scripts[all [[of] the]|the] (enabled|loaded) scripts[all [[of] the]|the] (disabled|unloaded) scriptscommand /scripts: trigger: send "All Scripts: %scripts%" to player send "Loaded Scripts: %enabled scripts%" to player send "Unloaded Scripts: %disabled scripts%" to playerExpression All Tags of a Type
Section titled “ Expression All Tags of a Type”Returns all the tags.
`minecraft tag` will return only the vanilla tags, `datapack tag` will return only datapack-provided tags, `paper tag` will return only Paper's custom tags (if you are running Paper), and `custom tag` will look in the "skript" namespace for custom tags you've registered.
You can also filter by tag types using "item", "block", or "entity".
Since 2.10 Return Type
Minecraft Tag
[all [[of] the]|the] [minecraft|datapack|paper|(custom|skript)] [item|block|entity [type]] tagsbroadcast minecraft tagssend paper entity tagsbroadcast all block tagsCondition Allay Can Duplicate
Section titled “ Condition Allay Can Duplicate”Checks to see if an allay is able to duplicate naturally.
Since 2.11
%living entities% can (duplicate|clone)%living entities% (can't|cannot|can not) (duplicate|clone)if last spawned allay can duplicate: disallow last spawned to duplicateEffect Allay Duplicate
Section titled “ Effect Allay Duplicate”Set whether an allay can or cannot duplicate itself.
This is not the same as breeding allays.
Since 2.11
allow %living entities% to (duplicate|clone)prevent %living entities% from (duplicating|cloning)allow all allays to duplicateprevent all allays from duplicatingExpression Allay Duplication Cooldown
Section titled “ Expression Allay Duplication Cooldown”The cooldown time until an allay can duplicate again naturally.
Resetting the cooldown time will set the cooldown time to the same amount of time after an allay has duplicated.
Since 2.11 Return Type
Timespan
[the] (duplicat(e|ing|ion)|clon(e|ing)) cool[ ]down [time] [of %living entities%]%living entities%'[s] (duplicat(e|ing|ion)|clon(e|ing)) cool[ ]down [time]set {_time} to the duplicate cooldown of last spawned allayadd 5 seconds to the duplication cool down time of last spawned allayremove 3 seconds from the duplicating cooldown time of last spawned allayclear the clone cool down of last spawned allayreset the cloning cool down time of last spawned allayExpression Allay Target Jukebox
Section titled “ Expression Allay Target Jukebox”The location of the jukebox an allay is set to.
Since 2.11 Return Type
Location
[the] target jukebox [of %living entities%]%living entities%'[s] target jukeboxset {_loc} to the target jukebox of last spawned allayEffect Allow / Prevent Leash Drop
Section titled “ Effect Allow / Prevent Leash Drop”Allows or prevents the leash from being dropped in an unleash event.
Since 2.10 Applicable Events
On Leash / Unleash
(force|allow) [the] (lead|leash) [item] to drop(block|disallow|prevent) [the] (lead|leash) [item] from droppingon unleash: if player is not set: prevent the leash from dropping else if player is op: allow the leash to dropEffect Allow Aging
Section titled “ Effect Allow Aging”Sets whether or not living entities will be able to age.
Since 2.10
lock age of %living entities%prevent aging of %living entities%prevent %living entities% from agingunlock age of %living entities%allow aging of %living entities%allow %living entities% to ageon spawn of animal: allow aging of entityExpression Alpha/Red/Green/Blue Color Value
Section titled “ Expression Alpha/Red/Green/Blue Color Value”The alpha, red, green, or blue value of colors. Ranges from 0 to 255.
Alpha represents opacity.
Since 2.10 Return Type
Number
[the] (alpha|red|green|blue) (value|component) of %colors%%colors%'[s] (alpha|red|green|blue) (value|component)broadcast red value of rgb(100, 0, 50) # sends '100'set {_red} to red's red value + 10Expression Alphabetical Sort
Section titled “ Expression Alphabetical Sort”Sorts given strings in alphabetical order.
Since 2.2-dev18b, 2.14 (retain indices when looping) Return Type
Text
alphabetically sorted %texts%set {_list::*} to alphabetically sorted {_strings::*}Condition Alphanumeric
Section titled “ Condition Alphanumeric”Checks if the given string is alphanumeric.
Since 2.4
%texts% (is|are) alphanumeric%texts% (isn't|is not|aren't|are not) alphanumericif the argument is not alphanumeric: send "Invalid name!"Expression Altitude
Section titled “ Expression Altitude”Effectively an alias of 'y-coordinate of …', it represents the height of some location within the world.
Since 1.4.3 Return Type
Number
[the] altitude[s] of %locations%%locations%'[s] altitude[s]on damage: altitude of the attacker is higher than the altitude of the victim set damage to damage * 1.2Expression Amount
Section titled “ Expression Amount”The amount of something. Using 'amount of {list::*}' will return the length of the list, so if you want the amounts of the things inside the lists, use 'amounts of {list::*}'.
Since 1.0, 2.13 (amounts of) Return Type
Object
[the] amount[s] of %objects%%objects%'[s] amount[s]message "There are %amount of all players% players online!"if amount of player's tool > 5:if amounts of player's tool and player's offhand tool > 5:Expression Amount of Items
Section titled “ Expression Amount of Items”Counts how many of a particular item type are in a given inventory.
Since 2.0 Return Type
Number
[the] (amount|number) of %item types% (in|of) %inventories%message "You have %number of tag values of minecraft tag "diamond_ores" in the player's inventory% diamond ores in your inventory."Expression An Eternity
Section titled “ Expression An Eternity”Represents a timespan with an infinite duration. An eternity is also created when arithmetic results in a timespan larger than about 292 million years.
Infinite timespans generally follow the rules of infinity, where most math operations do nothing. However, operations that would return NaN with numbers will instead return a timespan of 0 seconds.
Note that an eternity will often be treated as the longest duration something supports, rather than a true eternity.
Since 2.12 Return Type
Timespan
[an] eternityforever[an] (indefinite|infinite) (duration|timespan)set fire to the player for an eternityExpression Angle
Section titled “ Expression Angle”Represents the passed number value in degrees.
If radians is specified, converts the passed value to degrees. This conversion may not be entirely accurate, due to floating point precision.
Since 2.10 Return Type
Number
%number% [in] deg[ree][s]%number% [in] rad[ian][s]%numbers% in deg[ree][s]%numbers% in rad[ian][s]set {_angle} to 90 degrees{_angle} is 90 # true180 degrees is pi # truepi radians is 180 degrees # trueExpression Anvil Repair Cost
Section titled “ Expression Anvil 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.
Since 2.8.0 Return Type
Number
[the] [anvil] [item] [max[imum]] repair cost [of %inventories%]%inventories%'[s] [anvil] [item] [max[imum]] repair coston 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 99999Expression Anvil Text Input
Section titled “ Expression Anvil Text Input”An expression to get the name to be applied to an item in an anvil inventory.
Since 2.7 Return Type
Text
[the] anvil [inventory] (rename|text) input of %inventories%%inventories%'[s] anvil [inventory] (rename|text) inputon inventory click: type of event-inventory is anvil inventory if the anvil text input of the event-inventory is "FREE OP": ban playerType Any Named Thing
Section titled “ Type Any Named Thing”Something that has a name (e.g. an item).
Since 2.10
{thing}'s nameType Any Numbered/Sized Thing
Section titled “ Type Any Numbered/Sized Thing”Something that has an amount or size.
Since 2.10
the size of {thing}the amount of {thing}Expression Any Of
Section titled “ Expression Any Of”Returns an 'or list' composed of the given objects. For example, `any of (1, 2, and 3)` is equivalent to `1, 2, or 3`
Useful when doing comparisons with variable lists.
Return Type
Object
(any [one]|one) of [the] %objects%if any of {_numbers::*} are 1:if any of {teamA::*} are within location(0, 0, 0) and location(10, 10, 10):the text of {node}Type Anything with Contents
Section titled “ Type Anything with Contents”Something that contains other things.
Since 2.10
{a} contains {b}Expression Applied Beacon Effect
Section titled “ Expression Applied Beacon Effect”The type of effect applied by a beacon.
Since 2.10 Return Type
Potion Effect Type
Applicable EventsOn Beacon Effect
[the] applied [beacon] effecton beacon effect: if the applied effect is primary beacon effect: broadcast "Is Primary" else if applied effect = secondary effect: broadcast "Is Secondary"Expression Applied Enchantments
Section titled “ Expression Applied Enchantments”The applied enchantments in an enchant event.
Deleting or removing the applied enchantments will prevent the item's enchantment.
Since 2.5 Return Type
Enchantment Type
Applicable EventsOn Enchant
[the] applied enchant[ment]son enchant: set the applied enchantments to sharpness 10 and fire aspect 5Effect Apply Bone Meal
Section titled “ Effect Apply Bone Meal”Applies bone meal to a crop, sapling, or composter
Since 2.8.0
apply [%number%] bone[ ]meal[s] [to %blocks%]apply 3 bone meal to event-blockEffect Apply Fishing Lure
Section titled “ Effect Apply Fishing Lure”Sets whether the lure enchantment should be applied, which reduces the wait time.
Since 2.10 Applicable Events
On Fishing
apply [the] lure enchantment bonusremove [the] lure enchantment bonuson fishing line cast: apply lure enchantment bonusEffect Apply Potion Effect
Section titled “ Effect Apply Potion Effect”Applies a potion effect to an entity.
Since 2.0, 2.14 (syntax rework)
(apply|grant) %skriptpotioneffects% to %living entities% [for %time span%](affect|afflict) %living entities% with %skriptpotioneffects% [for %time span%]apply swiftness 2 to the playercommand /strengthboost: trigger: apply strength 10 to the player for 5 minutesapply the potion effects of the player's tool to the playerExpression Argument
Section titled “ Expression Argument”Usable in script commands and command events. Holds the value of an argument given to the command, e.g. if the command "/tell <player> <text>" is used like "/tell Njol Hello Njol!" argument 1 is the player named "Njol" and argument 2 is "Hello Njol!".
One can also use the type of the argument instead of its index to address the argument, e.g. in the above example 'player-argument' is the same as 'argument 1'.
Please note that specifying the argument type is only supported in script commands.
Since 1.0, 2.7 (support for command events) Return Type
Object
[the] last arg[ument][the] arg[ument](-| )<(\d+)>[the] <(\d*1)st|(\d*2)nd|(\d*3)rd|(\d*[4-90])th> arg[ument][s][(all [[of] the]|the)] arg[ument][s][the] %*type%( |-)arg[ument][( |-)<\d+>][the] arg[ument]( |-)%*type%[( |-)<\d+>]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 argumentExpression Arithmetic
Section titled “ Expression Arithmetic”Arithmetic expressions, e.g. 1 + 2, (health of player - 2) / 3, etc.
Since 1.4.2 Return Type
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%[ ]-[ ]%object%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!"Expression Armor Change Item
Section titled “ Expression Armor Change Item”Get the unequipped or equipped armor item from a 'armor change' event.
Since 2.11 Return Type
Item
Applicable EventsOn Armor Change
[the] (old|unequipped) armo[u]r item[the] (new|equipped) armo[u]r itemon armor change broadcast the old armor itemExpression Armor Slot
Section titled “ Expression Armor Slot”Equipment of living entities, i.e. the boots, leggings, chestplate or helmet.
Body armor is a special slot that can only be used for:
- Horses: Horse armour (doesn't work on zombie or skeleton horses)
- Wolves: Wolf Armor
- Llamas (regular or trader): Carpet
- Happy Ghasts: Harness
Saddle is a special slot that can only be used for: pigs, striders and horse types (horse, camel, llama, mule, donkey).
Since 1.0, 2.8.0 (armor), 2.10 (body armor), 2.12 (saddle), 2.12.1 (happy ghast) Return Type
Slot
[the] (%*equipment slots%|[the] armo[u]r[s]) [item[s]] of %living entities%%living entities%'[s] (%*equipment slots%|[the] armo[u]r[s]) [item[s]]set chestplate of the player to a diamond chestplatehelmet of player is neither tag values of tag "paper:helmets" nor air # player is wearing a block, e.g. from another pluginExpression Arrow Attached Block
Section titled “ Expression Arrow Attached Block”Returns the attached block of an arrow.
If running Paper 1.21.4+, the plural version of the expression should be used as it is more reliable compared to the single version.
Since 2.8.0, 2.12 (multiple blocks) Return Type
Block
[the] (attached|hit) block[s] of %projectiles%%projectiles%'[s] (attached|hit) block[s]set hit block of last shot arrow to diamond blockon projectile hit: wait 1 tick break attached blocks of event-projectile kill event-projectileExpression Arrow Knockback Strength
Section titled “ Expression Arrow Knockback Strength”An arrow's knockback strength.
Since 2.5.1 Return Type
Number
[the] arrow knockback strength of %projectiles%%projectiles%'[s] arrow knockback strengthon shoot: event-projectile is an arrow set arrow knockback strength of event-projectile to 10Expression Arrows Stuck
Section titled “ Expression Arrows Stuck”The number of arrows stuck in a living entity.
Since 2.5 Return Type
Number
[number of] arrow[s] stuck in %living entities%set arrows stuck in player to 5Function asin
Section titled “ Function asin”The inverse of the sine, also called arcsin. Returns result in degrees, not radians. Only returns values from -90 to 90.
Since 2.2 Return Type
Number
asin(n: number)asin(0) = 0asin(1) = 90asin(0.5) = 30Event At Time
Section titled “ Event At Time”An event that occurs at a given minecraft time in every world or only in specific worlds.
Since 1.3.4
at %time% [in %worlds%]at 18:00at 7am in "world"Function atan
Section titled “ Function atan”The inverse of the tangent, also called arctan. Returns result in degrees, not radians. Only returns values from -90 to 90.
Since 2.2 Return Type
Number
atan(n: number)atan(0) = 0atan(1) = 45atan(10000) = 89.9943Function atan2
Section titled “ Function atan2”Similar to atan, but requires two coordinates and returns values from -180 to 180.
The returned angle is measured counterclockwise in a standard mathematical coordinate system (x to the right, y to the top).
Since 2.2 Return Type
Number
atan2(x: number, y: number)atan2(0, 1) = 0atan2(10, 0) = 90atan2(-10, 5) = -63.4349Expression Attack Cooldown
Section titled “ Expression 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.
Since 2.6.1 Return Type
Number
[the] attack cooldown of %players%%players%'[s] attack cooldownon 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 attackerExpression Attacked
Section titled “ Expression Attacked”The victim of a damage event, e.g. when a player attacks a zombie this expression represents the zombie. When using Minecraft 1.11+, this also covers the hit entity in a projectile hit event.
Since 1.3, 2.6.1 (projectile hit event) Return Type
Entity
Applicable EventsOn Damage
On Death
On Projectile Hit
[the] (attacked|damaged|victim) [<(.+)>]on damage: victim is a creeper damage the attacked by 1 heartExpression Attacker
Section titled “ Expression Attacker”The attacker of a damage event, e.g. when a player attacks a zombie this expression represents the player.
Please note that the attacker can also be a block, e.g. a cactus or lava, but this expression will not be set in these cases.
Since 1.3 Return Type
Entity
Applicable EventsOn Damage
On Death
On Vehicle Destroy
[the] (attacker|damager)on damage: attacker is a player health of attacker is less than or equal to 2 damage victim by 1 heartType Attribute Type
Section titled “ Type Attribute Type”Represents the type of an attribute. Note that this type does not contain any numerical values.See attribute types for more info.
NOTE: Minecraft namespaces are supported, ex: 'minecraft:generic.attack_damage'.
Since 2.5
armor, armor toughness, armour, armour toughness, attack damage, attack knockback, attack speed, block break speed, block interaction range, burning time, camera distance, entity interaction range, explosion knockback resistance, fall damage multiplier, flying speed, follow range, generic armor, generic armor toughness, generic armour, generic armour toughness, generic attack damage, generic attack knockback, generic attack speed, generic burning time, generic explosion knockback resistance, generic fall damage multiplier, generic flying speed, generic follow range, generic gravity, generic jump strength, generic knockback resistance, generic luck, generic max absorption, generic max health, generic movement efficiency, generic movement speed, generic oxygen bonus, generic safe fall distance, generic scale, generic step height, generic tempt range, generic water movement efficiency, gravity, horse jump strength, jump strength, knockback resistance, luck, max absorption, max health, mining efficiency, movement efficiency, movement speed, oxygen bonus, player block break speed, player block interaction range, player entity interaction range, player mining efficiency, player sneaking speed, player submerged mining speed, player sweeping damage ratio, safe fall distance, scale, sneaking speed, spawn reinforcements, step height, submerged mining speed, sweeping damage ratio, tempt range, water movement efficiency, waypoint receive range, waypoint transmit range, zombie spawn reinforcementsStructure Auto Reload
Section titled “ Structure Auto Reload”Place at the top of a script file to enable and configure automatic reloading of the script. When the script is saved, Skript will automatically reload the script. The config.sk node 'script loader thread size' must be set to a positive number (async or parallel loading) for this to be enabled. available optional nodes: recipients: The players to send reload messages to. Defaults to console. permission: The permission required to receive reload messages. 'recipients' will override this node.
Since 2.13
auto[matically] reload [(this|the) script]auto reloadauto reload: recipients: "SkriptDev", "61699b2e-d327-4a01-9f1e-0ea8c3f06bc6" and "Njol" permission: "skript.reloadnotify"Function axisAngle
Section titled “ Function axisAngle”Returns a quaternion from the given angle (in degrees) and axis (as a vector). This represents a rotation around the given axis by the given angle.
Since 2.10 Return Type
Quaternion
axisAngle(angle: number, axis: vector)axisangle(90, (vector from player's facing))Effect Ban
Section titled “ Effect Ban”Bans or unbans a player or an IP address.
If a reason is given, it will be shown to the player when they try to join the server while banned.
A length of ban may also be given to apply a temporary ban. If it is absent for any reason, a permanent ban will be used instead.
We recommend that you test your scripts so that no accidental permanent bans are applied.
Note that banning people does not kick them from the server.
You can optionally use 'and kick' or consider using the kick effect after applying a ban.
Since 1.4, 2.1.1 (ban reason), 2.5 (timespan), 2.9.0 (kick)
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 IPIP(-| )ban [and kick] %players% [(by reason of|because [of]|on account of|due to) %text%] [for %time span%](IP(-| )unban|un[-]IP[-]ban) %players%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 daysExpression Banner Pattern
Section titled “ Expression Banner Pattern”Creates a new banner pattern.
Since 2.10 Return Type
Banner Pattern
[a] %banner pattern type% colo[u]red %color%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)Expression Banner Pattern Item
Section titled “ Expression Banner Pattern Item”Gets the item from a banner pattern type.
Note that not all banner pattern types have an item.
Since 2.10 Return Type
Item Type
[a[n]] %*banner pattern types% item[s]set {_item} to creeper charged banner pattern itemset {_item} to snout banner pattern itemset {_item} to thing banner pattern itemExpression Banner Patterns
Section titled “ Expression Banner Patterns”Gets or sets the banner patterns of a banner.
In order to set a specific position of a banner, there needs to be that many patterns already on the banner.
This expression will add filler patterns to the banner to allow the specified position to be set.
For Example, setting the 3rd banner pattern of a banner that has no patterns on it, will internally add 3 base patterns, allowing the 3rd banner pattern to be set.
Since 2.10 Return Type
Banner Pattern
[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] patternbroadcast banner patterns of {_banneritem}broadcast 1st banner pattern of block at location(0,0,0)clear banner patterns of {_banneritem}Expression Barter Drops
Section titled “ Expression Barter Drops”The items dropped by the piglin in a piglin bartering event.
Since 2.10 Return Type
Item Type
[the] [piglin] barter[ing] dropson piglin barter: if the bartering drops contain a jack o lantern: remove jack o lantern from bartering output broadcast "it's not halloween yet!"Expression Barter Input
Section titled “ Expression Barter Input”The item picked up by the piglin in a piglin bartering event.
Since 2.10 Return Type
Item Type
[the] [piglin] barter[ing] inputon piglin barter: if the bartering input is a gold ingot: broadcast "my precious..."Expression Beacon Effects
Section titled “ Expression Beacon Effects”The active effects of a beacon.
The secondary effect can be set to anything, but the icon in the GUI will not display correctly.
The secondary effect can only be set when the beacon is at max tier.
The primary and secondary effect can not be the same, primary will always retain the potion type and secondary will be cleared.
Since 2.10 Return Type
Potion Effect Type
Applicable EventsOn Beacon Effect
On Beacon Toggle
On Beacon Change Effect
[the] (primary|secondary) [beacon] effect [of %blocks%]%blocks%'[s] (primary|secondary) [beacon] effectset primary beacon effect of {_block} to hasteset secondary effect of {_block} to resistanceExpression Beacon Range
Section titled “ Expression Beacon Range”The range of a beacon's effects, in blocks.
Since 2.10 Return Type
Number
[the] beacon [effect] range of %blocks%%blocks%'[s] beacon [effect] rangeif the beacon tier of the clicked block is 4: set the beacon effect range of the clicked block to 100Expression Beacon Tier
Section titled “ Expression Beacon Tier”The tier of a beacon. Ranges from 0 to 4.
Since 2.10 Return Type
Number
[the] beacon tier of %blocks%%blocks%'[s] beacon tierif the beacon tier of the clicked block is 4: send "This is a max tier beacon!"Expression Bed
Section titled “ Expression Bed”Returns the bed location of a player, i.e. the spawn point of a player if they ever slept in a bed and the bed still exists and is unobstructed however, you can set the unsafe bed location of players and they will respawn there even if it has been obstructed or doesn't exist anymore and that's the default behavior of this expression otherwise you will need to be specific i.e. safe bed location.
NOTE: Offline players can not have their bed location changed, only online players.
Since 2.0, 2.7 (offlineplayers, safe bed) Return Type
Location
[the] [((safe|valid)|(unsafe|invalid))] bed[s] [location[s]] of %offline players%%offline players%'[s] [((safe|valid)|(unsafe|invalid))] bed[s] [location[s]]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 locationExpression Beehive Honey Level
Section titled “ Expression Beehive Honey Level”The current or max honey level of a beehive.
The max level is 5, which cannot be changed.
Since 2.11 Return Type
Number
[the] [max[imum]] honey level [of %blocks%]%blocks%'[s] [max[imum]] honey levelset the honey level of {_beehive} to the max honey level of {_beehive}Condition Beehive Is Sedated
Section titled “ Condition Beehive Is Sedated”Checks if a beehive is sedated from a nearby campfire.
Since 2.11
%blocks% (is|are) sedated%blocks% (isn't|is not|aren't|are not) sedatedif {_beehive} is sedated:Expression Beehive Target Flower
Section titled “ Expression Beehive Target Flower”The flower a beehive has selected to pollinate from.
Since 2.11 Return Type
Location
[the] target flower [of %blocks%]%blocks%'[s] target flowerset the target flower of {_beehive} to location(0, 0, 0)clear the target flower of {_beehive}Condition Bell Is Resonating
Section titled “ Condition Bell Is 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.
Since 2.9.0
%blocks% (is|are) resonating%blocks% (isn't|is not|aren't|are not) resonatingtarget block is resonatingCondition Bell Is Ringing
Section titled “ Condition Bell Is Ringing”Checks to see if a bell is currently ringing. A bell typically rings for 50 game ticks.
Since 2.9.0
%blocks% (is|are) ringing%blocks% (isn't|is not|aren't|are not) ringingtarget block is ringingType Biome
Section titled “ Type Biome”All possible biomes Minecraft uses to generate a world.
NOTE: Minecraft namespaces are supported, ex: 'minecraft:basalt_deltas'.
Since 1.4.4
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 mountainsbiome at the player is desertExpression Biome
Section titled “ Expression 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).
Since 1.4.4, 2.6.1 (3D biomes) Return Type
Biome
[the] biome [(of|%direction%) %locations%]%locations%'[s] biome# damage player in deserts constantlyevery real minute: loop all players: biome at loop-player is desert damage the loop-player by 1Expression Blank Equippable Component
Section titled “ Expression Blank Equippable Component”Gets a blank equippable component. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.
Since 2.13 Return Type
Equippable Components
a (blank|empty) equippable componentset {_component} to a blank equippable component: set the camera overlay to "custom_overlay" set the allowed entities to a zombie and a skeleton set the equip sound to "block.note_block.pling" set the equipped model id to "custom_model" set the shear sound to "ui.toast.in" set the equipment slot to chest slot allow event-equippable component to be damage when hurt allow event-equippable component to be dispensed allow event-equippable component to be equipped onto entities allow event-equippable component to be sheared off allow event-equippable component to swap equipmentset the equippable component of {_item} to {_component}Type Block
Section titled “ Type Block”A block in a world. It has a location and a type, and can also have a direction (mostly a facing), an inventory, or other special properties.
Since 1.0
Expression Block
Section titled “ Expression Block”The block involved in the event, e.g. the clicked block or the placed block.
Can optionally include a direction as well, e.g. 'block above' or 'block in front of the player'.
Since 1.0 Return Type
Block
[the] [event-]blockblock is iron 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 blockExpression Block
Section titled “ Expression Block”The block involved in the event, e.g. the clicked block or the placed block.
Can optionally include a direction as well, e.g. 'block above' or 'block in front of the player'.
Since 1.0 Return Type
Block
[the] block %direction% [%location%]block is iron 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 blockExpression Block Break Speed
Section titled “ Expression Block Break Speed”Gets the speed at which the given player would break this block, taking into account tools, potion effects, whether or not the player is in water, enchantments, etc. The returned value is the amount of progress made in breaking the block each tick. When the total breaking progress reaches 1.0, the block is broken. Note that the break speed can change in the course of breaking a block, e.g. if a potion effect is applied or expires, or the player jumps/enters water.
Since 2.7 Return Type
Number
[the] break speed[s] [of %blocks%] [for %players%]%block%'[s] break speed[s] [for %players%]on left click using diamond pickaxe: event-block is set send "Break Speed: %break speed for player%" to playerType Block Data
Section titled “ Type Block Data”Block data is the detailed information about a block, referred to in Minecraft as BlockStates, allowing for the manipulation of different aspects of the block, including shape, waterlogging, direction the block is facing, and so much more. Information regarding each block's optional data can be found on Minecraft's Wiki. Find the block you're looking for and scroll down to 'Block States'. Different states must be separated by a semicolon (see examples). The 'minecraft:' namespace is optional, as well as are underscores.
Since 2.5
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]Expression Block Data
Section titled “ Expression Block Data”Get the block data associated with a block.
This data can also be used to set blocks.
Since 2.5, 2.5.2 (set), 2.10 (block displays) Return Type
Block Data
[the] block[ ]data of %blocks/displays/entities%%blocks/displays/entities%'[s] block[ ]dataset {_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]Expression Block Hardness
Section titled “ Expression 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.
Since 2.6 Return Type
Number
[the] [block] hardness of %item types%%item types%'[s] [block] hardnessset {_hard} to block hardness of target blockif block hardness of target block > 5:Expression Block Sound
Section titled “ Expression Block Sound”Gets the sound that a given block, blockdata, or itemtype will use in a specific scenario.
This will return a string in the form of "SOUND_EXAMPLE", which can be used in the play sound syntax.
Check out this website for a list of sounds in Minecraft, or this one to go to the Sounds wiki page.
Since 2.10 Return Type
Text
[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]play sound (break sound of dirt) at all playersset {_sounds::*} to place sounds of dirt, grass block, blue wool and stoneExpression Block Sphere
Section titled “ Expression Block Sphere”All blocks in a sphere around a center, mostly useful for looping.
Since 1.0 Return Type
Block
[(all [[of] the]|the)] blocks in radius %number% [(of|around) %location%][(all [[of] the]|the)] blocks around %location% in radius %number%loop blocks in radius 5 around the player: set loop-block to airExpression Blocks
Section titled “ Expression Blocks”Blocks relative to other blocks or between other blocks.
Can be used to get blocks relative to other blocks or for looping.
Blocks from/to and between will return a straight line whereas blocks within will return a cuboid.
Since 1.0, 2.5.1 (within/cuboid/chunk) Return Type
Block
[(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%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 airExpression Book Author
Section titled “ Expression Book Author”The author of a book.
Since 2.2-dev31 Return Type
Text
[the] [book] (author|writer|publisher) of %item types%%item types%'[s] [book] (author|writer|publisher)on book sign: message "Book Title: %author of event-item%"Expression Book Pages
Section titled “ Expression Book Pages”The pages of a book (Supports Skript's chat format)
Note: In order to modify the pages of a new written book, you must have the title and author
of the book set. Skript will do this for you, but if you want your own, please set those values.
Since 2.2-dev31, 2.7 (changers) Return Type
Text
[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%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"Expression Book Title
Section titled “ Expression Book Title”The title of a book.
Since 2.2-dev31 Return Type
Text
[the] book (name|title) of %item types%%item types%'[s] book (name|title)on book sign: message "Book Title: %title of event-item%"Type Boolean
Section titled “ Type Boolean”A boolean is a value that is either true or false. Other accepted names are 'on' and 'yes' for true, and 'off' and 'no' for false.
Since 1.0
true/yes/on or false/no/offset {config.%player%.use mod} to falseEffect Break Block
Section titled “ Effect Break Block”Breaks the block and spawns items as if a player had mined it
You can add a tool, which will spawn items based on how that tool would break the block
(ie: When using a hand to break stone, it drops nothing, whereas with a pickaxe it drops cobblestone)
Since 2.4
break %blocks% [naturally] [using %item type%]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 pickaxeExpression Breeding Family
Section titled “ Expression Breeding Family”Represents family members within a breeding event.
Since 2.10 Return Type
Living Entity
[the] breeding mother[the] breeding father[the] [bred] (offspring|child)[the] breederon breeding: send "When a %breeding mother% and %breeding father% love each other very much, they make a %bred offspring%" to breederExpression Brewing Results
Section titled “ Expression Brewing Results”The resulting items in an 'on brew complete' event.
Since 2.13 Return Type
Item
Applicable EventsOn Brewing Complete
[the] brewing resultson brew complete: set {_results::*} to the brewing resultsExpression Brewing Stand Fuel Level
Section titled “ Expression Brewing Stand Fuel Level”The fuel level of a brewing stand. The fuel level is decreased by one at the start of brewing each potion.
Since 2.13 Return Type
Number
[the] brewing [stand] fuel (level|amount) [of %blocks%]%blocks%'[s] brewing [stand] fuel (level|amount)set the brewing stand fuel level of {_block} to 10clear the brewing stand fuel level of {_block}Expression Brewing Stand Slot
Section titled “ Expression Brewing Stand Slot”A slot of a brewing stand, i.e. the first, second, or third bottle slot, the fuel slot or the ingredient slot.
Since 2.13 Return Type
Slot
[the] [brewing stand['s]] (first|1st) bottle slot[s] [of %blocks%]%blocks%'[s] [brewing stand['s]] (first|1st) bottle slot[s][the] [brewing stand['s]] (second|2nd) bottle slot[s] [of %blocks%]%blocks%'[s] [brewing stand['s]] (second|2nd) bottle slot[s][the] [brewing stand['s]] (third|3rd) bottle slot[s] [of %blocks%]%blocks%'[s] [brewing stand['s]] (third|3rd) bottle slot[s][the] brewing [stand] ingredient slot[s] [of %blocks%]%blocks%'[s] brewing [stand] ingredient slot[s][the] brewing [stand] fuel slot[s] [of %blocks%]%blocks%'[s] brewing [stand] fuel slot[s]set the 1st bottle slot of {_block} to potion of waterclear the brewing stand second bottle slot of {_block}Expression Brewing Time
Section titled “ Expression Brewing Time”The remaining brewing time of a brewing stand.
Since 2.13 Return Type
Timespan
[the] [current|remaining] brewing time [of %blocks%]%blocks%'[s] [current|remaining] brewing timeset the brewing time of {_block} to 10 secondsclear the remaining brewing time of {_block}Condition Brewing Will Consume Fuel
Section titled “ Condition Brewing Will Consume Fuel”Checks if the 'brewing fuel' event will consume fuel. Preventing the fuel from being consumed will keep the fuel item and still add to the fuel level of the brewing stand.
Since 2.13 Applicable Events
On Brewing Fuel
[the] brewing stand will consume [the] fuel[the] brewing stand (will not|won't) consume [the] fuelon brewing fuel: if the brewing stand will consume the fuel: prevent the brewing stand from consuming the fuelEffect Broadcast
Section titled “ Effect Broadcast”Broadcasts a message to the server.
Since 1.0, 2.6 (broadcasting objects), 2.6.1 (using advanced formatting)
broadcast %objects% [(to|in) %worlds%]broadcast "Welcome %player% to the server!"broadcast "Woah! It's a message!"Expression Buried Item
Section titled “ Expression Buried Item”Represents the item that is uncovered when dusting.
The only blocks that can currently be "dusted" are Suspicious Gravel and Suspicious Sand.
Since 2.12 Return Type
Item
[the] (brushable|buried) item of %blocks%%blocks%'[s] (brushable|buried) itemsend target block's brushable itemset {_gravel}'s brushable item to emeraldFunction calcExperience
Section titled “ Function calcExperience”Calculates the total amount of experience needed to achieve given level from scratch in Minecraft.
Since 2.2-dev32 Return Type
calcExperience(level: long)Condition Camel Is Dashing
Section titled “ Condition Camel Is Dashing”Checks whether a camel is currently using its dash ability.
Since 2.11
%living entities% (is|are) dashing%living entities% (isn't|is not|aren't|are not) dashingif last spawned camel is dashing: kill last spawned camelCondition Can Age
Section titled “ Condition Can Age”Checks whether or not an entity will be able to age/grow up.
Since 2.10
%living entities% can (age|grow (up|old[er]))%living entities% (can't|cannot|can not) (age|grow (up|old[er]))on breeding: entity can't age broadcast "An immortal has been born!" to playerCondition Can Breed
Section titled “ Condition Can Breed”Checks whether or not a living entity can be bred.
Since 2.10
%living entities% can (breed|be bred)%living entities% (can't|cannot|can not) (breed|be bred)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 playerCondition Can Despawn
Section titled “ Condition Can Despawn”Check if an entity can despawn when the chunk they're located at is unloaded.
More information on what and when entities despawn can be found at reference.
Since 2.11
%living entities% can despawn (on chunk unload|when far away)%living entities% (can't|cannot|can not) despawn (on chunk unload|when far away)if last spawned entity can despawn on chunk unload: make last spawned entity not despawn on chunk unload%players% can fly%players% (can't|cannot|can not) flyplayer can flyCondition Can Hold
Section titled “ Condition Can Hold”Tests whether a player or a chest can hold the given item.
Since 1.0
%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%block can hold 200 cobblestoneplayer has enough space for 64 feathersCondition Can Pick Up Items
Section titled “ Condition Can Pick Up Items”Whether living entities are able to pick up items off the ground or not.
Since 2.8.0
%living entities% can pick([ ]up items| items up)%living entities% (can't|cannot|can not) pick([ ]up items| items up)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 playerCondition Can See
Section titled “ Condition Can See”Checks whether the given players can see the provided entities.
Since 2.3, 2.10 (entities)
%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%if sender can't see the player-argument: message "who dat?"if the player can see the last spawned entity: message "hello there!"Condition Can See Chat Colors
Section titled “ Condition Can See Chat Colors”Checks whether a player can see chat colors.
Since 2.10
%players% can see chat colo[u]r[s|ing]%players% (can't|cannot|can not) see chat colo[u]r[s|ing]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."Condition Can See Messages
Section titled “ Condition Can See Messages”Checks whether a player can see specific message types in chat.
Since 2.10
%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]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!"Effect Cancel Active Item
Section titled “ Effect Cancel Active Item”Interrupts the action entities may be trying to complete.
For example, interrupting eating, or drawing back a bow.
Since 2.8.0
(cancel|interrupt) [the] us[ag]e of %living entities%'[s] [active|current] itemon damage of player: if the victim's active tool is a bow: interrupt the usage of the player's active itemEffect Cancel Command Cooldown
Section titled “ Effect Cancel Command Cooldown”Only usable in commands. Makes it so the current command usage isn't counted towards the cooldown.
Since 2.2-dev34
(cancel|ignore) [the] [current] [command] cooldownun(cancel|ignore) [the] [current] [command] cooldowncommand /nick <text>: executable by: players cooldown: 10 seconds trigger: if length of arg-1 is more than 16: # Makes it so that invalid arguments don't make you wait for the cooldown again cancel the cooldown send "Your nickname may be at most 16 characters." stop set the player's display name to arg-1Effect Cancel Drops
Section titled “ Effect Cancel Drops”Cancels drops of items in a death, block break, block drop, and block harvest events.
The dropped experience can be cancelled in a death and block break events.
Please note that using this in a death event doesn't keep items or experience of a dead player. If you want to do that, use the Keep Inventory / Experience effect.
Since 2.4, 2.12 (harvest event) Applicable Events
On Death
On Break / Mine
On Block Drop
On Harvest Block
(cancel|clear|delete) [the] drops [of (items|[e]xp[erience][s])](cancel|clear|delete) [the] (item|[e]xp[erience]) dropson death of a zombie: if name of the entity is "&cSpecial": cancel drops of itemson break of a coal ore: cancel the experience dropson player block harvest: cancel the item dropsEffect Cancel Event
Section titled “ Effect Cancel Event”Cancels the event (e.g. prevent blocks from being placed, or damage being taken).
Since 1.0
cancel [the] eventuncancel [the] eventon damage: victim is a player victim has the permission "skript.god" cancel the eventExpression Case Text
Section titled “ Expression Case Text”Copy of given text in Lowercase, Uppercase, Proper Case, camelCase, PascalCase, Snake_Case, and Kebab-Case
Since 2.2-dev16 (lowercase and uppercase), 2.5 (advanced cases) Return Type
Text
%texts% in (upper|lower)[ ]case(upper|lower)[ ]case %texts%capitali(s|z)ed %texts%%texts% in [(lenient|strict) ](proper|title)[ ]case[(lenient|strict) ](proper|title)[ ]case %texts%%texts% in [(lenient|strict) ]camel[ ]case[(lenient|strict) ]camel[ ]case %texts%%texts% in [(lenient|strict) ]pascal[ ]case[(lenient|strict) ]pascal[ ]case %texts%%texts% in [(lower|upper|capital|screaming)[ ]]snake[ ]case[(lower|upper|capital|screaming)[ ]]snake[ ]case %texts%%texts% in [(lower|upper|capital)[ ]]kebab[ ]case[(lower|upper|capital)[ ]]kebab[ ]case %texts%"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?Type Cat Type
Section titled “ Type Cat Type”Represents the race/type of a cat entity.
NOTE: Minecraft namespaces are supported, ex: 'minecraft:british_shorthair'.
Since 2.4
all black, black, british shorthair, calico, jellie, persian, ragdoll, red, siamese, tabby, whiteSection Catch Runtime Errors
Section titled “ Section Catch Runtime Errors”Catch any runtime errors produced by code within the section. This is an in progress feature.
Since 2.12
catch [run[ ]time] error[s]catch runtime errors: set worldborder center of {_border} to location(0, 0, NaN value)if last caught runtime errors contains "Your location can't have a NaN value as one of its components": set worldborder center of {_border} to location(0, 0, 0)Function ceil
Section titled “ Function ceil”Rounds a number up, i.e. returns the closest integer larger than or equal to the argument.
Since 2.2 Return Type
ceil(n: number)ceil(2.34) = 3ceil(2) = 2ceil(2.99) = 3ceiling(n: number)ceiling(2.34) = 3ceiling(2) = 2ceiling(2.99) = 3Expression Center of World Border
Section titled “ Expression Center of World Border”The center of a world border.
Since 2.11 Return Type
Location
[the] world[ ]border (center|middle) [of %worldborders%]%worldborders%'[s] world[ ]border (center|middle)set world border center of {_worldborder} to location(10, 0, 20)Condition Chance
Section titled “ Condition Chance”A condition that randomly succeeds or fails. Valid values are between 0% and 100%, or if the percent sign is omitted, between 0 and 1.
Since 1.0, 2.14 (chance fails)
chance of %number%[(\%)] [(fails|failed)]chance of 50%: drop a diamond at location(100, 100, 100, "world')chance of {chance}% # {chance} between 0 and 100chance of {chance} # {chance} between 0 and 1if chance of 99% fails: broadcast "Haha loser! *points and laughs*"Effect Change: Set/Add/Remove/Remove All/Delete/Reset
Section titled “ Effect Change: Set/Add/Remove/Remove All/Delete/Reset”A general effect that can be used for changing many expressions.
Some expressions can only be set and/or deleted, while others can also have things added to or removed from them.
Since 1.0 (set, add, remove, delete), 2.0 (remove all)
(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%set the player's display name to "<red>%name of player%"set the block above the victim to lavaadd 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 1remove 2 pickaxes from the victimsubtract 2.5 from {points::%uuid of player%}remove every iron tool from the playerremove all minecarts from {entitylist::*}delete the block below the playerclear dropsdelete {variable}reset walk speed of playerreset chunk at the targeted blockExpression Character Codepoint
Section titled “ Expression Character Codepoint”Returns the Unicode codepoint of a character
Since 2.9.0 Return Type
Number
[the] [unicode|character] code([ ]point| position) of %texts%%texts%'[s] [unicode|character] code([ ]point| position)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 trueExpression Character from Codepoint
Section titled “ Expression Character from Codepoint”Returns the character at the specified codepoint
Since 2.9.0 Return Type
Text
character (from|at|with) code([ ]point| position) %integer%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::*}Expression Characters Between
Section titled “ Expression Characters Between”All characters between two given characters, useful for generating random strings. This expression uses the Unicode numerical code of a character to determine which characters are between the two given characters. The ASCII table linked here shows this ordering for the first 256 characters.
If you would like only alphanumeric characters you can use the 'alphanumeric' option in the expression.
If strings of more than one character are given, only the first character of each is used.
Since 2.8.0 Return Type
Text
[(all [[of] the]|the)] [alphanumeric] characters (between|from) %text% (and|to) %text%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"Effect Charge Entity
Section titled “ Effect Charge Entity”Charges or uncharges a creeper or wither skull. A creeper is charged when it has been struck by lightning.
Since 2.5, 2.10 (wither skulls)
make %entities% [(un|not |non[-| ])](charged|powered)[un](charge|power) %entities%on spawn of creeper: charge the event-entityExpression Chat Format
Section titled “ Expression Chat Format”Can be used to get/retrieve the chat format. The sender of a message is represented by [player] or [sender], and the message by [message] or [msg].
Since 2.2-dev31 Return Type
Text
[the] (message|chat) format[ting]set the chat format to "<yellow>[player]<light gray>: <green>[message]"Expression Chat Recipients
Section titled “ Expression Chat Recipients”Recipients of chat events where this is called.
Since 2.2-Fixes-v7, 2.2-dev35 (clearing recipients) Return Type
Player
[chat][( |-)]recipientschat recipientsType Chicken Variant
Section titled “ Type Chicken Variant”Represents the variant of a chicken entity.
NOTE: Minecraft namespaces are supported, ex: 'minecraft:warm'.
Since 2.12
cold, temperate, warmType Chunk
Section titled “ Type Chunk”A chunk is a cuboid of 16×16×128 (x×z×y) blocks. Chunks are spread on a fixed rectangular grid in their world.
Since 2.0
Expression Chunk
Section titled “ Expression Chunk”Returns the chunk of a block, location or entity is in, or a list of the loaded chunks of a world.
Since 2.0, 2.8.0 (loaded chunks) Return Type
Chunk
[(all [[of] the]|the)] chunk[s] (of|%directions%) %locations%%locations%'[s] chunk[s][(all [[of] the]|the)] loaded chunks (of|in) %worlds%add the chunk at the player to {protected chunks::*}set {_chunks::*} to the loaded chunks of the player's worldFunction clamp
Section titled “ Function clamp”Clamps one or more values between two numbers.
This function retains indices
Since 2.8.0 Return Type
Number
clamp(values: numbers, min: number, max: number)clamp(5, 0, 10) = 5clamp(5.5, 0, 5) = 5clamp(0.25, 0, 0.5) = 0.25clamp(5, 7, 10) = 7clamp((5, 0, 10, 9, 13), 7, 10) = (7, 7, 10, 9, 10)set {_clamped::*} to clamp({_values::*}, 0, 10)Effect Clear Entity Storage
Section titled “ Effect Clear Entity Storage”Clear the stored entities of an entity block storage (i.e. beehive).
Since 2.11
(clear|empty) the (stored entities|entity storage) of %blocks%clear the stored entities of {_beehive}Type Click Type
Section titled “ Type Click Type”Click type, mostly for inventory events. Tells exactly which keys/buttons player pressed, assuming that default keybindings are used in client side.
Since 2.2-dev16b, 2.2-dev35 (renamed to click type)
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 actionExpression Clicked Block/Entity/Inventory/Slot
Section titled “ Expression Clicked Block/Entity/Inventory/Slot”The clicked block, entity, inventory, inventory slot, inventory click type or inventory action.
Since 1.0, 2.2-dev35 (more clickable things) Return Type
Object
Applicable EventsOn Click
On Inventory Click
[the] (clicked [enchant[ment]] (button|option)|clicked (block|%*item type/entity type%)|clicked slot|clicked inventory|click (type|action)|inventory action)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 playerblack, 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/indigocolor of the sheep is red or blackset the color of the block to greenmessage "You're holding a <%color of tool%>%color of tool%<reset> wool block"Expression Color from Hex Code
Section titled “ Expression Color from Hex Code”Returns a proper argb color from a hex code string. The hex code must contain RRGGBB values, but can also contain a leading # or AARRGGBB format. Invalid codes will cause runtime errors.
Since 2.14 Return Type
Color
[the] colo[u]r[s] (from|of) hex[adecimal] code[s] %texts%send color from hex code "#FFBBA7"send color from hex code "FFBBA7"send color from hex code "#AAFFBBA7"Effect Color Items
Section titled “ Effect Color Items”Colors items in a given color. You can also use RGB codes if you feel limited with the 16 default colors. RGB codes are three numbers from 0 to 255 in the order (red, green, blue), where (0,0,0) is black and (255,255,255) is white. Armor is colorable for all Minecraft versions. With Minecraft 1.11 or newer you can also color potions and maps. Note that the colors might not look exactly how you'd expect.
Since 2.0, 2.2-dev26 (maps and potions)
(dye|colo[u]r|paint) %item types% %color%(dye|colo[u]r|paint) %item types% \(%number%, %number%, %number%\)dye player's helmet bluecolor the player's tool redExpression Color of
Section titled “ Expression Color of”The color of an item, entity, block, firework effect, or text display.
This can also be used to color chat messages with "<%color of ...%>this text is colored!".
Do note that firework effects support setting, adding, removing, resetting, and deleting; text displays support setting and resetting; and items, entities, and blocks only support setting, and only for very few items/blocks.
Since 1.2, 2.10 (displays) Return Type
Color
[the] colo[u]r[s] of %blocks/item types/entities/firework effects/potion effect types/displays%%blocks/item types/entities/firework effects/potion effect types/displays%'[s] colo[u]r[s]on click on wool: if event-block is tagged with minecraft tag "wool": message "This wool block is <%color of block%>%color of block%<reset>!" set the color of the block to blackExpression Colored / Uncolored
Section titled “ Expression Colored / Uncolored”Parses <color>s and, optionally, chat styles in a message or removes
any colors and chat styles from the message. Parsing all
chat styles requires this expression to be used in same line with
the send effect.
Since 2.0 Return Type
Text
(colo[u]r-|colo[u]red )%texts%(format-|formatted )%texts%(un|non)[-](colo[u]r-|colo[u]red |format-|formatted )%texts%on chat: set message to colored message # Safe; only colors get parsedcommand /fade <player>: trigger: set display name of the player-argument to uncolored display name of the player-argumentcommand /format <text>: trigger: message formatted text-argument # Safe, because we're sending to whoever used this commandFunction combinations
Section titled “ Function combinations”Get the number of possible sets from 1 to 'options' with each set having a size equal to 'selected'
For example, a combination with 3 options and a set size of 1, returns 3: (1), (2), (3)
A combination of 3 options with a set size of 2 returns 3: (1, 2), (1, 3), (2, 3)
Note that the bigger the 'options' and lower the 'selected' may result in approximations or even infinity values.
Combinations differ from permutations in that combinations focus on unique sets, ignoring the order of elements, whereas permutations account for the arrangement of elements within the set.
Example: (1, 2) and (2, 1) represent a single combination since order doesn't matter in combinations, but they are two distinct permutations because permutations consider the order.
Since 2.11 Return Type
Number
combinations(options: number, selected: number)combinations(10, 8) = 45combinations(5, 3) = 10combinations(size of {some list::*}, 2)Structure Command
Section titled “ Structure Command”Used for registering custom commands.
Since 1.0
command <.+>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 argumentEffect Command
Section titled “ Effect Command”Executes a command. This can be useful to use other plugins in triggers.
If the command is a bungeecord side command, you can use the [bungeecord] option to execute command on the proxy.
Since 1.0, 2.8.0 (bungeecord command)
[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%make player execute command "/home"execute console command "/say Hello everyone!"execute player bungeecord command "/alert &6Testing Announcement!"Expression Command
Section titled “ Expression Command”The command that caused an 'on command' event (excluding the leading slash and all arguments)
Since 2.0, 2.7 (support for script commands) Return Type
Text
Applicable EventsOn Command
[the] (full|complete|whole) command[the] command [(label|alias)]# 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 eventExpression Command Block Command
Section titled “ Expression Command Block Command”Gets or sets the command associated with a command block or minecart with command block.
Since 2.10 Return Type
Text
[the] [command[ ]block] command of %blocks/entities%%blocks/entities%'[s] [command[ ]block] commandsend command of {_block}set command of {_cmdMinecart} to "say asdf"Expression Command Info
Section titled “ Expression Command Info”Get information about a command.
Since 2.6 Return Type
Text
[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]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%!"use <a href='#LitConsole'>the console</a> for the consolesee <a href='#player'>player</a> for players.command /push [<player>]: trigger: if arg-1 is not set: if command sender is console: send "You can't push yourself as a console :\" to sender stop push sender upwards with force 2 send "Yay!" else: push arg-1 upwards with force 2 send "Yay!" to sender and arg-1Expression Command Sender
Section titled “ Expression Command Sender”The player or the console who sent a command. Mostly useful in commands and command events.
If the command sender is a command block, its location can be retrieved by using %block's location%
Since 2.0 Return Type
Command Sender
Applicable EventsOn Command
[the] [command['s]] (sender|executor)make the command sender execute "/say hi!"on command: log "%executor% used command /%command% %arguments%" to "commands.log"Condition Comparison
Section titled “ Condition Comparison”A very general condition, it simply compares two values. Usually you can only compare for equality (e.g. block is/isn't of <type>), but some values can also be compared using greater than/less than. In that case you can also test for whether an object is between two others.
Note: This is the only element where not all patterns are shown. It has actually another two sets of similar patters, but with (was|were) or will be instead of (is|are) respectively, which check different time states of the first expression.
Since 1.0
[(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%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 dragonExpression Compass Target
Section titled “ Expression Compass Target”The location a player's compass is pointing at.
As of Minecraft 1.21.4, the compass is controlled by the resource pack and by default will not point to this compass target when used outside of the overworld dimension.
Since 2.0 Return Type
Location
[the] compass target of %players%%players%'[s] compass target# 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%}Function concat
Section titled “ Function concat”Joins the provided texts (and other things) into a single text.
Since 2.9.0 Return Type
Text
concat(texts: objects)concat("hello ", "there") # hello thereconcat("foo ", 100, " bar") # foo 100 barEffect Conditional / Unconditional
Section titled “ Effect Conditional / Unconditional”Sets whether the provided command blocks are conditional or not.
Since 2.10
make command block[s] %blocks% [(un|not )]conditionalmake command block {_block} conditionalmake command block {_block} unconditional if {_block} is conditionalSection Conditionals
Section titled “ Section Conditionals”Conditional sections
if: executed when its condition is true
else if: executed if all previous chained conditionals weren't executed, and its condition is true
else: executed if all previous chained conditionals weren't executed
parse if: a special case of 'if' condition that its code will not be parsed if the condition is not true
else parse if: another special case of 'else if' condition that its code will not be parsed if all previous chained conditionals weren't executed, and its condition is true
Since 1.0
elseelse [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:<.+>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 sectionType Config
Section titled “ Type Config”A configuration (or code) loaded by Skript, such as the config.sk or aliases.
Configs can be reloaded or navigated to find options.
Since 2.10
the skript configExpression Config
Section titled “ Expression Config”The Skript config.
This can be reloaded, or navigated to retrieve options.
Since 2.10 Return Type
Config
[the] [skript] configset {_node} to node "language" in the skript configif text value of {_node} is "french": broadcast "Bonjour!"Effect Connect
Section titled “ Effect Connect”Connect a player to a server running on your proxy, or any server supporting transfers. Read below for more information.
If the server is running Minecraft 1.20.5 or above, you may specify an IP and Port to transfer a player over to that server.
When transferring players using an IP, the transfer will not complete if the `accepts-transfers` option isn't enabled in `server.properties` for the server specified.
If the port is not provided, it will default to `25565`.
Since 2.3, 2.10 (transfer)
connect %players% to [proxy|bungeecord] [server] %text%send %players% to [proxy|bungeecord] server %text%transfer %players% to server %text% [on port %number%]connect all players to proxy server "hub"transfer player to server "my.server.com"transfer player to server "localhost" on port 25566Expression Console
Section titled “ Expression Console”Represents the server's console which can receive messages and execute commands
Since 1.3.1 Return Type
Command Sender
[the] (console|server)execute console command "/stop"send "message to console" to the consoleEffect Consume Boosting Firework
Section titled “ Effect Consume Boosting Firework”Prevent the firework used in an 'elytra boost' event to be consumed.
Since 2.10
(prevent|disallow) [the] (boosting|used) firework from being consumedallow [the] (boosting|used) firework to be consumedon elytra boost: if the used firework will be consumed: prevent the used firework from being consumeEffect Consume Brewing Fuel
Section titled “ Effect Consume Brewing Fuel”Makes the brewing stand in a brewing fuel event consume its fuel. Preventing the fuel from being consumed will keep the fuel item and still add to the fuel level of the brewing stand.
Since 2.13 Applicable Events
On Brewing Fuel
make [the] brewing stand consume [its|the] fuelprevent [the] brewing stand from consuming [its|the] fuelon brewing fuel consumption: prevent the brewing stand from consuming the fuelExpression Consumed Item
Section titled “ Expression Consumed Item”Represents the item consumed within an entity shoot bow and item consume event.
Since 2.11 Return Type
Item
[the] consumed itemon player or skeleton shoot projectile: if the consumed item is an arrow: cancel event send "You're now allowed to shoot your arrows." to shooteron player consume: if the consumed item is cooked porkchop: send "Well aren't you just a little piggy wiggly!" to player if player has scoreboard tag "vegetarian": set the consumed item to a carrotCondition Contains (Property)
Section titled “ Condition Contains (Property)”Checks whether a type or list contains certain elements. When checking if a list contains a specific element, use '{list::*} contains {x}'. When checking if a single type contains something, use `player's inventory contains {x}`. When checking if many types contain something, use '{inventories::*} contain {x}` or `contents of {inventories::*} contain {x}`.
%objects% contain[s] %objects%%objects% (doesn't|does not|do not|don't) contain %objects%contents of %objects% contain %objects%contents of %objects% (do not|don't) contain %objects%%inventories% (has|have) %item types% [in [(the[ir]|his|her|its)] inventory]%inventories% (doesn't|does not|do not|don't) have %item types% [in [(the[ir]|his|her|its)] inventory]block contains 20 cobblestoneplayer has 4 flint and 2 iron ingots{list::*} contains 5names of {list::*} contain "prefix"contents of the inventories of all players contain 1 stickEffect Continue
Section titled “ Effect Continue”Moves the loop to the next iteration. You may also continue an outer loop from an inner one. The loops are labelled from 1 until the current loop, starting with the outermost one.
Since 2.2-dev37, 2.7 (while loops), 2.8.0 (outer loops)
continue [this loop|[the] [current] loop]continue [the] <-?\d+(_\d+)*>(st|nd|rd|th) loop# 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)"Type Converging Particle Effect
Section titled “ Type Converging Particle Effect”A particle effect where particles converge towards a point.
Since 2.14
Expression Cooldown Time/Remaining Time/Elapsed Time/Last Usage/Bypass Permission
Section titled “ Expression Cooldown Time/Remaining Time/Elapsed Time/Last Usage/Bypass Permission”Only usable in command events. Represents the cooldown time, the remaining time, the elapsed time,
the last usage date, or the cooldown bypass permission.
Since 2.2-dev33 Return Type
Object
[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]]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%}Effect Copy Into Variable
Section titled “ Effect Copy Into Variable”Copies objects into a variable. When copying a list over to another list, the source list and its sublists are also copied over.
Note: Copying a value into a variable/list will overwrite the existing data.
Since 2.8.0
copy %~objects% [in]to %~objects%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!"Function cos
Section titled “ Function cos”The cosine function. This is basically the sine shifted by 90°, i.e. cos(a) = sin(a + 90°), for any number a. Uses degrees, not radians.
Since 2.2 Return Type
Number
cos(n: number)cos(0) = 1cos(90) = 0Type Cow Variant
Section titled “ Type Cow Variant”Represents the variant of a cow entity.
NOTE: Minecraft namespaces are supported, ex: 'minecraft:warm'.
Since 2.12
cold, temperate, warmExpression Create Loot Context
Section titled “ Expression Create Loot Context”Create a loot context.
Since 2.10 Return Type
Loot Context
[a] loot context %direction% %location%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}Expression Create WorldBorder
Section titled “ Expression Create WorldBorder”Creates a new, unused world border. World borders can be assigned to either worlds or specific players.
Borders assigned to worlds apply to all players in that world.
Borders assigned to players apply only to those players, and different players can have different borders.
Since 2.11 Return Type
World Border
a [virtual] world[ ]borderon join: set {_location} to location of player set worldborder of player to a virtual worldborder: set worldborder radius to 25 set world border center of event-worldborder to {_location}on load: set worldborder of world "world" to a worldborder: set worldborder radius of event-worldborder to 200 set worldborder center of event-worldborder to location(0, 64, 0) set worldborder warning distance of event-worldborder to 5Expression Created Damage Source
Section titled “ Expression Created Damage Source”Get the created damage source being created/modified in a 'custom damage source' section.
Since 2.12 Return Type
Damage Source
[the] created damage sourceset {_source} to a custom damage source: set the damage type of the created damage source to magicExpression Created Potion Effect
Section titled “ Expression Created Potion Effect”An expression to obtain the potion effect being made in a potion effect creation section.
Since 2.14 Return Type
Object
[the] [created] [potion] effectset {_potion} to a potion effect of speed 2 for 10 minutes: hide the effect's icon hide the effect's particlesExpression Creature/Entity/Player/Projectile/Villager/Powered Creeper/etc.
Section titled “ Expression Creature/Entity/Player/Projectile/Villager/Powered Creeper/etc.”The entity involved in an event (an entity is a player, a creature or an inanimate object like ignited TNT, a dropped item or an arrow).
You can use the specific type of the entity that's involved in the event, e.g. in a 'death of a creeper' event you can use 'the creeper' instead of 'the entity'.
Since 1.0 Return Type
Entity
[the] [event-]<.+>give a diamond sword of sharpness 3 to the playerkill the creeperkill all powered creepers in the wolf's worldprojectile is an arrowExpression Cursor Slot
Section titled “ Expression Cursor Slot”The item which the player has on their inventory cursor. This slot is always empty if player has no inventory open.
Since 2.2-dev17 Return Type
Slot
[the] cursor slot of %players%%players%'[s] cursor slotcursor slot of player is dirtset cursor slot of player to 64 diamondsExpression Custom Chest Inventory
Section titled “ Expression Custom Chest Inventory”Returns a chest inventory with the given amount of rows and the name. Use the open inventory effect to open it.
Since 2.2-dev34, 2.8.0 (chat format) Return Type
Inventory
[a] [new] chest inventory (named|with name) %text% [with %number% row[s]][a] [new] chest inventory with %number% row[s] [(named|with name) %text%]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 playerExpression Custom Model Data
Section titled “ Expression Custom Model Data”Get/set the custom model data of an item. Using just `custom model data` will return an integer. Items without model data will return 0.
Since 1.21.4, custom model data instead consists of a list of numbers (floats), a list of booleans (flags), a list of strings, and a list of colours. Accessing and modifying these lists can be done type-by-type, or all at once with `complete custom model data`. This is the more accurate and recommended method of using custom model data.
Since 2.5, 2.12 (floats/flags/strings/colours/full model data) Return Type
Object
[the] [custom] model data of %item types%%item types%'[s] [custom] model data[the] [custom] model data (floats|flags|strings|colo[u]rs) of %item type%%item type%'[s] [custom] model data (floats|flags|strings|colo[u]rs)[the] ((complete|full)) [custom] model data of %item type%%item type%'[s] ((complete|full)) [custom] model dataset custom model data of player's tool to 3set {_model} to custom model data of player's toolset custom model data colours of {_flag} to red, white, and blueadd 10.5 to the model data floats of {_flag}set the full custom model data of {_item} to 10, "sword", and rgb(100, 200, 30)Expression Damage
Section titled “ Expression 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.
Since 1.3.5, 2.8.0 (item damage event) Return Type
Number
Applicable EventsOn Damage
On Vehicle Damage
On Item Damage
[the] damageon item damage: event-item is any tool clear damage # unbreakable tools as the damage will be 0on damage: increase the damage by 2Expression Damage Amount of World Border
Section titled “ Expression Damage Amount of World Border”The amount of damage a player takes per second for each block they are outside the border plus the border buffer.
Players only take damage when outside of the world's world border, and the damage value cannot be less than 0.
Since 2.11 Return Type
Number
[the] world[ ]border damage amount [of %worldborders%]%worldborders%'[s] world[ ]border damage amountset world border damage amount of {_worldborder} to 1Expression Damage Buffer of World Border
Section titled “ Expression Damage Buffer of World Border”The amount of blocks a player may safely be outside the border before taking damage.
Players only take damage when outside of the world's world border, and the damage buffer distance cannot be less than 0.
Since 2.11 Return Type
Number
[the] world[ ]border damage buffer [of %worldborders%]%worldborders%'[s] world[ ]border damage bufferset world border damage buffer of {_worldborder} to 10Type Damage Cause
Section titled “ Type Damage Cause”The cause/type of a damage event, e.g. lava, fall, fire, drowning, explosion, poison, etc.
Please note that support for this type is very rudimentary, e.g. lava, fire and burning, as well as projectile and attack are considered different types.
Since 2.0
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 breathCondition Damage Cause
Section titled “ Condition Damage Cause”Tests what kind of damage caused a damage event. Refer to the Damage Cause type for a list of all possible causes.
Since 2.0
[the] damage (was|is|has)[n('|o)t] [been] (caused|done|made) by %damage cause%# 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 dropsExpression Damage Cause
Section titled “ Expression Damage Cause”The damage cause of a damage event. Please click on the link for more information.
Since 2.0 Return Type
Damage Cause
[the] damage causedamage cause is lava, fire or burningType Damage Source
Section titled “ Type Damage Source”Represents the source from which an entity was damaged.
Cannot change any attributes of the damage source from an 'on damage' or 'on death' event.
Since 2.12
Expression Damage Source
Section titled “ Expression Damage Source”Create a custom damage source and change the attributes.
When setting a 'causing entity' you must also set a 'direct entity'.
Attributes of a damage source cannot be changed once created, only while within the 'custom damage source' section.
Since 2.12 Return Type
Damage Source
[a] custom damage source [(with|using) [the|a] [damage type [of]] %damage type%]set {_source} to a custom damage source: set the damage type to magic set the causing entity to {_player} set the direct entity to {_arrow} set the damage location to location(0, 0, 10)damage all players by 5 using {_source}on damage: if the damage type of event-damage source is magic: set the damage to damage * 2Expression Damage Source - Causing Entity
Section titled “ Expression Damage Source - Causing Entity”The causing entity of a damage source.
The causing entity is the entity that ultimately caused the damage. (e.g. the entity that shot an arrow)
When setting a 'causing entity' you must also set a 'direct entity'.
Attributes of a damage source cannot be changed once created, only while within the 'custom damage source' section.
Since 2.12 Return Type
Entity
[the] (causing|responsible) entity [of %damage sources%]%damage sources%'[s] (causing|responsible) entityset {_source} to a custom damage source: set the damage type to magic set the causing entity to {_player} set the direct entity to {_arrow} set the damage location to location(0, 0, 10)on damage: set {_causing} to the causing entity of event-damage sourceExpression Damage Source - Damage Location
Section titled “ Expression Damage Source - Damage Location”The location where the damage was originated from.
The 'damage location' on vanilla damage sources will be set if an entity did not cause the damage.
Attributes of a damage source cannot be changed once created, only while within the 'custom damage source' section.
Since 2.12 Return Type
Location
[the] damage location [of %damage sources%]%damage sources%'[s] damage locationdamage all players by 5 using a custom damage source: set the damage type to magic set the causing entity to {_player} set the direct entity to {_arrow} set the damage location to location(0, 0, 10)on death: set {_location} to the damage location of event-damage sourceExpression Damage Source - Damage Type
Section titled “ Expression Damage Source - Damage Type”The type of damage of a damage source.
Attributes of a damage source cannot be changed once created, only while within the 'custom damage source' section.
Since 2.12 Return Type
Damage Type
[the] damage type [of %damage sources%]%damage sources%'[s] damage typeset {_source} to a custom damage source: set the damage type to magic set the causing entity to {_player} set the direct entity to {_arrow} set the damage location to location(0, 0, 10)damage all players by 5 using {_source}on death: set {_type} to the damage type of event-damage sourceExpression Damage Source - Direct Entity
Section titled “ Expression Damage Source - Direct Entity”The direct entity of a damage source.
The direct entity is the entity that directly caused the damage. (e.g. the arrow that was shot)
Attributes of a damage source cannot be changed once created, only while within the 'custom damage source' section.
Since 2.12 Return Type
Entity
[the] direct entity [of %damage sources%]%damage sources%'[s] direct entityset {_source} to a custom damage source: set the damage type to magic set the causing entity to {_player} set the direct entity to {_arrow} set the damage location to location(0, 0, 10)damage all players by 5 using {_source}on death: set {_direct} to the direct entity of event-damage sourceCondition Damage Source - Does Scale With Difficulty
Section titled “ Condition Damage Source - Does Scale With Difficulty”Whether the damage from a damage source scales with the difficulty of the server.
Since 2.12
%damage sources% ((does|do) scale|scales) damage with difficulty%damage sources% (do not|don't|does not|doesn't) scale damage with difficulty%damage sources%'[s] damage ((does|do) scale|scales) with difficulty%damage sources%'[s] damage (do not|don't|does not|doesn't) scale with difficultyon death: if event-damage source scales damage with difficulty:Expression Damage Source - Food Exhaustion
Section titled “ Expression Damage Source - Food Exhaustion”The amount of hunger exhaustion caused by a damage source.
Since 2.12 Return Type
Number
[the] food exhaustion [of %damage sources%]%damage sources%'[s] food exhaustionon damage: if the food exhaustion of event-damage source is 10:Expression Damage Source - Source Location
Section titled “ Expression Damage Source - Source Location”The final location where the damage was originated from.
The 'source location' for vanilla damage sources will retrieve the 'damage location' if set. If 'damage location' is not set, will attempt to grab the location of the 'causing entity', otherwise, null.
Since 2.12 Return Type
Location
[the] source location [of %damage sources%]%damage sources%'[s] source locationon death: set {_location} to the source location of event-damage sourceCondition Damage Source - Was Indirectly Caused
Section titled “ Condition Damage Source - Was Indirectly Caused”Whether the damage from a damage source was indirectly caused.
Vanilla damage sources are considered indirect if the 'causing entity' and the 'direct entity' are not the same. For example, taking damage from an arrow that was shot by an entity.
Since 2.12
%damage sources% (was|were) ([in]directly caused|caused [in]directly)%damage sources% (was not|wasn't|were not|weren't) ([in]directly caused|caused [in]directly)on damage: if event-damage source was indirectly caused:Type Damage Type
Section titled “ Type Damage Type”References a damage type of a damage source.
Since 2.12
arrow, bad respawn point, cactus, campfire, cramming, dragon breath, drown, drowning, dry out, ender pearl, entity cramming, explosion, fall, falling anvil, falling block, falling stalactite, fireball, fireworks, fly into wall, freeze, generic, generic kill, hot floor, in fire, in wall, indirect magic, lava, lightning, lightning bolt, llama spit, mace smash, magic, mob attack, mob attack no aggro, mob projectile, on fire, out of world, outside border, player attack, player explosion, sonic boom, spear, spit, stalagmite, starve, sting, suffocation, sweet berry bush, thorns, thrown, trident, unattributed fireball, void, wind charge, wither, wither skullExpression Damage Value/Durability
Section titled “ Expression Damage Value/Durability”The damage value/durability of an item.
Since 1.2, 2.7 (durability reversed) Return Type
Number
[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))set damage value of player's tool to 10reset the durability of {_item}set durability of player's held item to 0Effect Damage/Heal/Repair
Section titled “ Effect Damage/Heal/Repair”Damage, heal, or repair an entity or item.
Servers running Spigot 1.20.4+ can optionally choose to specify a fake damage cause.
Since 1.0, 2.10 (damage cause)
damage %living entities/item types/slots% by %number% [heart[s]]damage %living entities% by %number% [heart[s]] with [fake] [damage] cause %damage cause%damage %living entities% by %number% [heart[s]] (using|with) %damage source% [as the source]heal %living entities% [by %number% [heart[s]]]repair %item types/slots% [by %number%]damage player by 5 heartsdamage player by 3 hearts with fake cause fallheal the playerrepair tool of playerExpression Damaged Item
Section titled “ Expression Damaged Item”Directly damages an item. In MC versions 1.12.2 and lower, this can be used to apply data values to items/blocks
Since 2.4 Return Type
Item Type
%item type% with (damage|data) [value] %number%%item type% damaged by %number%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"Effect Dance
Section titled “ Effect Dance”Make an allay or piglin start or stop dancing.
Providing a location only applies to allays. They will check to see if the the block at the location is a jukebox and playing music. If it isn't, they will stop dancing. If no location is provided, the allay will dance indefinitely.
Providing a timespan only applies for piglins. It determines the length of time they will dance for. If no timespan is provided, they will dance indefinitely.
Since 2.11
make %living entities% (start dancing|dance) [%direction% %location%] [for %time span%]make %living entities% (stop dancing|not dance)if last spawned allay is not dancing: make last spawned allay start dancingif block at location(0, 0, 0) is a jukebox: make all allays dance at location(0, 0, 0)make last spawned piglin start dancingmake all piglins dance for 5 hoursFunction date
Section titled “ Function date”Creates a date from a year, month, and day, and optionally also from hour, minute, second and millisecond.
A time zone and DST offset can be specified as well (in minutes), if they are left out the server's time zone and DST offset are used (the created date will not retain this information).
Since 2.2 Return Type
Date
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)date(2014, 10, 1) # 0:00, 1st October 2014date(1990, 3, 5, 14, 30) # 14:30, 5th May 1990date(1999, 12, 31, 23, 59, 59, 999, -3*60, 0) # almost year 2000 in parts of Brazil (-3 hours offset, no DST)Type Date
Section titled “ Type Date”A date is a certain point in the real world's time which can be obtained with now expression, unix date expression and date function.
See time and timespan for the other time types of Skript.
Since 1.4
set {_yesterday} to nowsubtract a day from {_yesterday}# now {_yesterday} represents the date 24 hours before nowExpression Date Ago/Later
Section titled “ Expression Date Ago/Later”A date the specified timespan before/after another date.
Since 2.2-dev33 Return Type
Date
%time span% (ago|in the past|before [the] [date] %date%)%time span% (later|(from|after) [the] [date] %date%)set {_yesterday} to 1 day agoset {_hourAfter} to 1 hour after {someOtherDate}set {_hoursBefore} to 5 hours before {someOtherDate}Expression De-queue Queue (Experimental)
Section titled “ Expression De-queue Queue (Experimental)”Requires the using queues experimental feature flag to be enabled.
Unrolls a queue into a regular list of values, which can be stored in a list variable.
The order of the list will be the same as the order of the elements in the queue.
If a list variable is set to this, it will use numerical indices.
The original queue will not be changed.
Since 2.10 (experimental) Return Type
Object
(de|un)queued %queue%unrolled %queue%set {queue} to a new queueadd "hello" and "there" to {queue}set {list::*} to dequeued {queue}Expression Debug Info
Section titled “ Expression Debug Info”Returns a string version of the given objects, but with their type attached: debug info of 1, "a", 0.5 -> 1 (long), "a" (string), 0.5 (double) This is intended to make debugging easier, not as a reliable method of getting the type of a value.
Since 2.13 Return Type
Text
[the] debug info[rmation] of %objects%%objects%'[s] debug info[rmation]broadcast debug info of {list::*}Expression Default Value
Section titled “ Expression Default Value”A shorthand expression for giving things a default value. If the first thing isn't set, the second thing will be returned.
Since 2.2-dev36 Return Type
Object
%objects% (otherwise|?) %objects%broadcast {score::%player's uuid%} otherwise "%player% has no score!"Effect Delay
Section titled “ Effect Delay”Delays the script's execution by a given timespan. Please note that delays are not persistent, e.g. trying to create a tempban script with ban player → wait 7 days → unban player will not work if you restart your server anytime within these 7 days. You also have to be careful even when using small delays!
Since 1.4
(wait|halt) [for] %time span%wait 2 minuteshalt for 5 minecraft hourswait a tickEffect Detonate Entities
Section titled “ Effect Detonate Entities”Immediately detonates an entity. Accepted entities are fireworks, TNT minecarts, primed TNT, wind charges and creepers.
Since 2.10
detonate %entities%detonate last launched fireworkExpression Difference
Section titled “ Expression Difference”The difference between two values
Supported types include numbers, dates and times.
Since 1.4 Return Type
Object
difference (between|of) %object% and %object%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!"normal, medium, hard, easy, peacefulExpression Difficulty
Section titled “ Expression Difficulty”The difficulty of a world.
Since 2.3 Return Type
Difficulty
[the] difficult(y|ies) of %worlds%%worlds%'[s] difficult(y|ies)set the difficulty of "world" to hardType Direction
Section titled “ Type Direction”A direction, e.g. north, east, behind, 5 south east, 1.3 meters to the right, etc.
Locations and some blocks also have a direction, but without a length.
Please note that directions have changed extensively in the betas and might not work perfectly. They can also not be used as command arguments.
Since 2.0
see <a href='#ExprDirection'>direction (expression)</a>set the block below the victim to a chestloop blocks from the block infront of the player to the block 10 below the player: set the block behind the loop-block to waterExpression Direction
Section titled “ Expression Direction”A helper expression for the direction type.
Since 1.0 (basic), 2.0 (extended) Return Type
Direction
[%number% [(block|met(er|re))[s]] [to the]] (north[[(-| )](east|west)][(ward[(s|ly)]|er[(n|ly)])] [of]|south[[(-| )](east|west)][(ward[(s|ly)]|er[(n|ly)])] [of]|(east|west)[(ward[(s|ly)]|er[(n|ly)])] [of]|above|over|(up|down)[ward[(s|ly)]]|below|under[neath]|beneath) [%direction%][%number% [(block|met(er|re))[s]]] in [the] (direction|horizontal direction|facing|horizontal facing) of %entity/block% [(of|from)][%number% [(block|met(er|re))[s]]] in %entity/block%'[s] (direction|horizontal direction|facing|horizontal facing) [(of|from)][%number% [(block|met(er|re))[s]]] (in[ ]front [of]|forward[s]|behind|backwards|[to the] (right|left) [of])[%number% [(block|met(er|re))[s]]] horizontal[ly] (in[ ]front [of]|forward[s]|behind|backwards|to the (right|left) [of])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 playerType Directional Particle Effect
Section titled “ Type Directional Particle Effect”A particle effect which can be given a directional velocity.
Since 2.14
Type Display Billboard
Section titled “ Type Display Billboard”Represents the billboard setting of a display.
Since 2.10
vertical pivot, horizontal, middle, horizontal pivot, center pivot, center, fixed, verticalExpression Display Billboard
Section titled “ Expression Display Billboard”Returns or changes the billboard setting of displays.
This describes the axes/points around which the display can pivot.
Displays spawn with the 'fixed' billboard by default. Resetting this expression will also set it to 'fixed'.
Since 2.10 Return Type
Display Billboard
[the] bill[ |-]board[ing] [setting] [of %displays%]%displays%'[s] bill[ |-]board[ing] [setting]set billboard of the last spawned text display to centerExpression Display Brightness
Section titled “ Expression Display Brightness”Returns or changes the brightness override of displays.
Unmodified displays will not have a brightness override value set. Resetting or deleting this value will remove the override.
Use the 'block' or 'sky' options to get/change specific values or get both values as a list by using neither option.
NOTE: setting only one of the sky/block light overrides of a display without an existing override will set both sky and block light to the given value. Make sure to set both block and sky levels to your desired values for the best results. Likewise, you can only clear the brightness override, you cannot clear/reset the sky/block values individually.
Since 2.10 Return Type
Number
[the] [block|sky] (light [level]|brightness) override[s] of %displays%%displays%'[s] [block|sky] (light [level]|brightness) override[s]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}Type Display Entity
Section titled “ Type Display Entity”A text, block or item display entity.
Since 2.10
Expression Display Glow Color Override
Section titled “ Expression Display Glow Color Override”Returns or changes the glowing color override of displays.
This overrides whatever color is already set for the scoreboard team of the displays.
Since 2.10 Return Type
Color
[the] glow[ing] colo[u]r[s] override[s] [of %displays%]%displays%'[s] glow[ing] colo[u]r[s] override[s]set glow color override of the last spawned text display to blueExpression Display Height/Width
Section titled “ Expression 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.
Since 2.10 Return Type
Number
[the] display (height|width) [of %displays%]%displays%'[s] display (height|width)set display height of the last spawned text display to 2.5Expression Display Interpolation Delay/Duration
Section titled “ Expression Display Interpolation Delay/Duration”Returns or changes the interpolation delay/duration of displays.
Interpolation duration is the amount of time a display will take to interpolate, or shift, between its current state and a new state.
Interpolation delay is the amount of ticks before client-side interpolation will commence.Setting to 0 seconds will make it immediate.
Resetting either value will return that value to 0.
Since 2.10 Return Type
Timespan
[the] interpolation (delay|duration)[s] [of %displays%]%displays%'[s] interpolation (delay|duration)[s]set interpolation delay of the last spawned text display to 2 ticksExpression Display Name
Section titled “ Expression Display Name”Represents the display name of a player, or the custom name of an item, entity, block, or inventory.
Players: The name of the player that is displayed in messages. This name can be changed freely and can include color codes, and is shared among all plugins (e.g. chat plugins will use the display name).
Entities: The custom name of the entity. Can be changed, which will also enable custom name visibility of the entity so name tag of the entity will be visible always.
Items: The custom name of the item (not the Minecraft locale name). Can be changed.
Inventories: The name/title of the inventory. Changing name of an inventory means opening the same inventory with the same contents but with a different name to its current viewers.
Since before 2.1, 2.2-dev20 (inventory name), 2.4 (non-living entity support, changeable inventory name) Return Type
Object
[the] (display|nick|chat|custom)[ ]name[s] of %objects%%objects%'[s] (display|nick|chat|custom)[ ]name[s]on join: player has permission "name.red" set the player's display name to "<red>[admin] <gold>%name of player%"Expression Display Shadow Radius/Strength
Section titled “ Expression Display Shadow Radius/Strength”Returns or changes the shadow radius/strength of displays.
Since 2.10 Return Type
Number
[the] shadow (radius|strength) [of %displays%]%displays%'[s] shadow (radius|strength)set shadow radius of the last spawned text display to 1.75Expression Display Teleport Duration
Section titled “ Expression Display Teleport Duration”The teleport duration of displays is the amount of time it takes to get between locations.
0 means that updates are applied immediately.
1 means that the display entity will move from current position to the updated one over one tick.
Higher values spread the movement over multiple ticks. Max of 59 ticks.
Since 2.10 Return Type
Timespan
[the] teleport[ation] duration[s] [of %displays%]%displays%'[s] teleport[ation] duration[s]set teleport duration of the last spawned text display to 2 ticksteleport last spawned text display to {_location}wait 2 ticksmessage "display entity has arrived at %{_location}%"Type Display Text Alignment
Section titled “ Type Display Text Alignment”Represents the text alignment setting of a text display.
Since 2.10
middle aligned, centered, right aligned, center aligned, left alignedExpression Display Transformation Rotation
Section titled “ Expression Display Transformation Rotation”Returns or changes the transformation rotation of displays.
The left rotation is applied first, with the right rotation then being applied based on the rotated axis.
Since 2.10 Return Type
Quaternion
[the] (left|right) [transformation] rotation [of %displays%]%displays%'[s] (left|right) [transformation] rotationset left transformation rotation of last spawned block display to quaternion(1, 0, 0, 0) # reset block displayExpression Display Transformation Scale/Translation
Section titled “ Expression Display Transformation Scale/Translation”Returns or changes the transformation scale or translation of displays.
Since 2.10 Return Type
Vector
[the] (display|[display] transformation) (scale|translation) of %displays%%displays%'[s] (display|[display] transformation) (scale|translation)set transformation translation of display to vector from -0.5, -0.5, -0.5 # Center the display in the same position as a blockExpression Display View Range
Section titled “ Expression Display View Range”Returns or changes the view range of displays.
Default value is 1.0. This value is then multiplied by 64 and the player's entity view distance setting to determine the actual range.
For example, a player with 150% entity view distance will see a block display with a view range of 1.2 at 1.2 * 64 * 150% = 115.2 blocks away.
Since 2.10 Return Type
Number
[the] [display] view (range|radius) [of %displays%]%displays%'[s] [display] view (range|radius)set view range of the last spawned text display to 2.9Expression Distance
Section titled “ Expression Distance”The distance between two points.
Since 1.0 Return Type
Number
[the] distance between %location% and %location%if the distance between the player and {home::%uuid of player%} is smaller than 20: message "You're very close to your home!"<.+> if <.+>on join: give a diamond to the player if the player has permission "rank.vip"Condition Do Respawn Anchors Work
Section titled “ Condition Do Respawn Anchors Work”Checks whether or not respawn anchors work in a world.
Since 2.7
respawn anchors [do[(n't| not)]] work in %worlds%respawn anchors work in world "world_nether"drop %item types/experience points% [%directions% %locations%] [without velocity]on death of creeper: drop 1 TNTExpression Dropped Item Owner
Section titled “ Expression Dropped Item Owner”The uuid of the owner of the dropped item. Setting the owner of a dropped item means only that entity or player can pick it up. Dropping an item does not automatically make the entity or player the owner.
Since 2.11 Return Type
UUID
[the] uuid of [the] [dropped] item owner [of %itementities%][the] [dropped] item owner's uuid [of %itementities%] set the uuid of the dropped item owner of last dropped item to player if the uuid of the dropped item owner of last dropped item is uuid of player:Expression Dropped Item Thrower
Section titled “ Expression Dropped Item Thrower”The uuid of the entity or player that threw/dropped the dropped item.
Since 2.11 Return Type
UUID
[the] uuid of [the] [dropped] item thrower [of %itementities%][the] [dropped] item thrower's uuid [of %itementities%]set the uuid of the dropped item thrower of {_dropped item} to playerif the uuid of the dropped item thrower of {_dropped item} is uuid of player:clear the item thrower of {_dropped item}Expression Drops
Section titled “ Expression Drops”This expression only works in death and harvest events.
In a death event, will hold the drops of the dying creature.
Drops can be prevented by removing them with "remove ... from drops", e.g. "remove all pickaxes from the drops", or "clear drops" if you don't want any drops at all.
Since 1.0 Return Type
Item Type
Applicable EventsOn Death
[the] dropsclear dropsremove 4 planks from the dropsExpression Drops Of Block
Section titled “ Expression Drops Of Block”A list of the items that will drop when a block is broken.
Since 2.5.1 Return Type
Item Type
[(all|the|all [of] the)] drops of %blocks% [(using|with) %item type% [(as %entity%)]]%blocks%'s drops [(using|with) %item type% [(as %entity%)]]on break of block: give drops of block using player's tool to playerExpression Dusted Stage
Section titled “ Expression Dusted Stage”Represents how far the block has been uncovered.
The only blocks that can currently be "dusted" are Suspicious Gravel and Suspicious Sand.
Since 2.12 Return Type
Number
[the] [max[imum]] dust[ed|ing] (value|stage|progress[ion]) of %blocks/block datas%%blocks/block datas%'[s] [max[imum]] dust[ed|ing] (value|stage|progress[ion])send target block's maximum dusted stageset {_sand}'s dusted stage to 2Condition Egg Will Hatch
Section titled “ Condition Egg Will Hatch”Whether the egg will hatch in a Player Egg Throw event.
Since 2.7 Applicable Events
On Egg Throw
[the] egg (will|will not|won't) hatchon player egg throw: if an entity won't hatch: send "Better luck next time!" to the playerExpression Elements
Section titled “ Expression Elements”The first, last, range or a random element of a set, e.g. a list variable, or a queue.
Asking for elements from a queue will also remove them from the queue, see the new queue expression for more information.
See also: random expression
Since 2.0, 2.7 (relative to last element), 2.8.0 (range of elements) Return Type
Object
[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%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}Effect Enable/Disable/Unload/Reload Script
Section titled “ Effect Enable/Disable/Unload/Reload Script”Enables, disables, unloads, or reloads a script. Disabling a script unloads it and prepends - to its name so it will not be loaded the next time the server restarts. If the script reflection experiment is enabled: unloading a script terminates it and removes it from memory, but does not alter the file.
Since 2.4, 2.10 (unloading)
((enable|load)|reload|disable|unload) script [file|named] %text% [with errors]((enable|load)|reload|disable|unload) skript file %text% [with errors]((enable|load)|reload|disable|unload) %scripts% [with errors]reload script "test"enable script file "testing"unload script file "script.sk"set {_script} to the script "MyScript.sk"reload {_script}Expression Enchant Item
Section titled “ Expression Enchant 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.
Since 2.5 Return Type
Item Type
Applicable EventsOn Enchant Prepare
On Enchant
[the] enchant[ed] itemon enchant: set the enchanted item to a diamond chestplateon enchant prepare: set the enchant item to a wooden swordEffect Enchant/Disenchant
Section titled “ Effect Enchant/Disenchant”Enchant or disenchant an existing item. Enchanting at a specific level will act as if an enchanting table was used, and will apply the enchantments randomly chosen at that level. Treasure enchantments, like mending, can optionally be allowed. Note that enchanting a book at a specific level will turn it into an enchanted book, rather than a book with enchantments.
Since 2.0, 2.13 (at level)
enchant %~item types% with %enchantment types%[naturally|randomly] enchant %~item types% at level %number%[[,] allowing treasure enchant[ment]s]disenchant %~item types%enchant the player's tool with sharpness 5enchant the player's tool at level 30disenchant the player's toolExpression Enchanting Experience Cost
Section titled “ Expression Enchanting Experience 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.
Since 2.5 Return Type
Number
Applicable EventsOn Enchant
[the] [displayed] ([e]xp[erience]|enchanting) coston enchant: send "Cost: %the displayed enchanting cost%" to playerType Enchantment
Section titled “ Type Enchantment”An enchantment, e.g. 'sharpness' or 'fortune'. Unlike enchantment type this type has no level, but you usually don't need to use this type anyway.
NOTE: Minecraft namespaces are supported, ex: 'minecraft:basalt_deltas'.
As of Minecraft 1.21 this will also support custom enchantments using namespaces, ex: 'myenchants:explosive'.
Since 1.4.6
aqua affinity, bane of arthropods, binding curse, blast protection, breach, channeling, channelling, curse of binding, curse of vanishing, density, depth strider, efficiency, feather falling, fire aspect, fire protection, flame, fortune, frost walker, impaling, infinity, knockback, looting, loyalty, luck of the sea, lunge, lure, mending, multi-shot, multishot, piercing, power, projectile protection, protection, punch, quick charge, respiration, riptide, sharpness, silk touch, smite, soul speed, sweeping edge, swift sneak, thorns, unbreaking, vanishing curse, wind burstExpression Enchantment Bonus
Section titled “ Expression Enchantment Bonus”The enchantment bonus in an enchant prepare event. This represents the number of bookshelves affecting/surrounding the enchantment table.
Since 2.5 Return Type
Number
Applicable EventsOn Enchant Prepare
[the] enchantment bonuson enchant: send "There are %enchantment bonus% bookshelves surrounding this enchantment table!" to playerExpression Enchantment Level
Section titled “ Expression Enchantment Level”The level of a particular enchantment on an item.
Since 2.0 Return Type
Number
[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%player's tool is a sword of sharpness: message "You have a sword of sharpness %level of sharpness of the player's tool% equipped"Type Enchantment Offer
Section titled “ Type Enchantment Offer”The enchantmentoffer in an enchant prepare event.
Since 2.5
on enchant prepare: set enchant offer 1 to sharpness 1 set the cost of enchant offer 1 to 10 levelsExpression Enchantment Offer
Section titled “ Expression Enchantment Offer”The enchantment offer in enchant prepare events.
Since 2.5 Return Type
Enchantment Offer
Applicable EventsOn Enchant Prepare
[all [of]] [the] enchant[ment] offersenchant[ment] offer[s] %numbers%[the] %number%(st|nd|rd|th) enchant[ment] offeron enchant prepare: send "Your enchantment offers are: %the enchantment offers%" to playerExpression Enchantment Offer Cost
Section titled “ Expression Enchantment Offer 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.
Since 2.5 Return Type
Number
[the] [enchant[ment]] cost of %enchantment offers%%enchantment offers%'[s] [enchant[ment]] costset cost of enchantment offer 1 to 50Type Enchantment Type
Section titled “ Type Enchantment Type”An enchantment with an optional level, e.g. 'sharpness 2' or 'fortune'.
Since 1.4.6
<enchantment> [<level>]enchant the player's tool with sharpness 5helmet is enchanted with waterbreathingExpression Ender Chest
Section titled “ Expression Ender Chest”The ender chest of a player.
Since 2.0 Return Type
Inventory
[the] ender[ ]chest[s] of %players%%players%'[s] ender[ ]chest[s]open the player's ender chest to the playerExpression Enderman Carrying BlockData
Section titled “ Expression Enderman Carrying BlockData”The block data an enderman is carrying.
Custom attributes such as NBT or names do not transfer over.
Blocks, blockdatas and items are acceptable objects to change the carrying block.
Since 2.11 Return Type
Block Data
[the] carr(ied|ying) block[[ ]data] of %living entities%%living entities%'[s] carr(ied|ying) block[[ ]data]broadcast the carrying blockdata of last spawned endermanset the carried block of last spawned enderman to an oak logset the carrying block data of {_enderman} to oak stairs[facing=north]set the carried blockdata of {_enderman} to {_item}clear the carried blockdata of {_enderman}Condition Enderman Has Been Stared At
Section titled “ Condition Enderman Has Been Stared At”Checks to see if an enderman has been stared at.
This will return true as long as the entity that stared at the enderman is still alive.
Since 2.11
%living entities% (has|have) been stared at%living entities% (doesn't|does not|do not|don't) have been stared atif last spawned enderman has been stared at:Effect Enderman Teleport
Section titled “ Effect Enderman Teleport”Make an enderman teleport randomly or towards an entity.
Teleporting towards an entity teleports in the direction to the entity and not to them.
Since 2.11
make %living entities% (randomly teleport|teleport randomly)force %living entities% to (randomly teleport|teleport randomly)make %living entities% teleport [randomly] towards %entity%force %living entities% to teleport [randomly] towards %entity%make last spawned enderman teleport randomlyloop 10 times: make all endermen teleport towards playerEffect Enforce Whitelist
Section titled “ Effect Enforce Whitelist”Enforces or un-enforce a server's whitelist.
All non-whitelisted players will be kicked upon enforcing the whitelist.
Since 2.9.0
[un]enforce [the] [server] white[ ]listenforce the whitelistunenforce the whitelistExpression Entities
Section titled “ Expression Entities”All entities in all worlds, in a specific world, in a chunk, in a radius around a certain location or within two locations. e.g. all players, all creepers in the player's world, or players in radius 100 of the player.
Since 1.2.1, 2.5 (chunks), 2.10 (within) Return Type
Entity
[(all [[of] the]|the)] %*entity types% [(in|of) (world[s] %worlds%|%worlds/chunks%)][(all [[of] the]|the)] entities of type[s] %entity types% [(in|of) (world[s] %worlds%|%worlds/chunks%)][(all [[of] the]|the)] %*entity types% (within|[with]in radius) %number% [(block[s]|met(er|re)[s])] (of|around) %location%[(all [[of] the]|the)] entities of type[s] %entity types% in radius %number% (of|around) %location%[(all [[of] the]|the)] %*entity types% within %location% and %location%[(all [[of] the]|the)] entities of type[s] %entity types% within %location% and %location%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}}Type Entity
Section titled “ Type Entity”An entity is something in a world that's not a block, e.g. a player, a skeleton, or a zombie, but also projectiles like arrows, fireballs or thrown potions, or special entities like dropped items, falling blocks or paintings.
Since 1.0
player, op, wolf, tamed ocelot, powered creeper, zombie, unsaddled pig, fireball, arrow, dropped item, item frame, etc.entity is a zombie or creeperplayer is an opprojectile is an arrowshoot a fireball from the playerExpression Entity AI
Section titled “ Expression Entity AI”Returns whether an entity has AI.
Since 2.5 Return Type
Boolean
[the] (ai|artificial intelligence) of %living entities%%living entities%'[s] (ai|artificial intelligence)set artificial intelligence of target entity to falseExpression Entity Attribute
Section titled “ Expression Entity Attribute”The numerical value of an entity's particular attribute.
Note that the movement speed attribute cannot be reliably used for players. For that purpose, use the speed expression instead.
Resetting an entity's attribute is only available in Minecraft 1.11 and above.
Since 2.5, 2.6.1 (final attribute value) Return Type
Number
[the] %attribute type% [((total|final|modified))] attribute [value] of %entities%%entities%'[s] %attribute type% [((total|final|modified))] attribute [value]on damage of player: send "You are wounded!" to victim set victim's attack speed attribute to 2Effect Entity Despawn
Section titled “ Effect Entity Despawn”Make a living entity despawn when the chunk they're located at is unloaded.
Setting a custom name on a living entity automatically makes it not despawnable.
More information on what and when entities despawn can be found at reference.
Since 2.11
make %living entities% despawn[able] (on chunk unload|when far away)force %living entities% to despawn (on chunk unload|when far away)prevent %living entities% from despawning [on chunk unload|when far away]make all entities not despawnable on chunk unloadspawn zombie at location(0, 0, 0): force event-entity to not despawn when far awayType Entity Effect
Section titled “ Type Entity Effect”Various entity effects that can be played for entities, like wolf howling, or villager happy.
Since 2.14
hit entity effect, drown damage effect, break chestplate effect, villager angry effect, ravager attack animation, squid rotation reset, firework explode animation, break boots effect, love hearts effect, ocelot distrust effect, reset spawner minecart delay effect, break saddle effect, protected from death effect, ignite tnt minecart animation, hurt berry bush effect (non-functional), fed dolphin effect, zoglin attack animation, iron golem rose animation, cat tame fail effect (non-functional), player bad omen raid effect, sheep eating grass animation, hoglin attack animation, taming succeeded effect, zombie transform sound effect, wolf shake animation, rabbit jump animation, ocelot trust effect, drowning damage effect, ravager roared effect, egg break effect, iron golem attack animation, break body armour effect, ender teleport effect, tipped arrow particles effect, break helmet effect, iron golem sheath animation, honey block fall effect, villager happy effect, snowball break effect, cat tame success effect (non-functional), evoker fang attack animation, fox chew effect, death animation, stop wolf shake animation, witch magic effect, warden sonic attack animation, break body armor effect, honey block slide effect, break main hand effect, damage animation (non-functional), shield break sound effect, armadillo peek animation, projectile crack effect, sniffer dig sound effect, goat lowering head animation, villager sweat effect, break off hand effect, entity attack animation, swap hands effect, entity poof effect, explosion damage effect (non-functional), guardian target sound effect (non-functional), thorns hurt effect (non-functional), warden attack animation, armor stand hit effect, break leggings effect, shield block sound effect, goat raising head animation, spawn in smoke effect, warden tendril shake animation, taming failed effect, stunned ravager effect, creaking shake animation, villager heart effectExpression Entity Fire Burn Duration
Section titled “ Expression Entity Fire Burn Duration”How much time an entity will be burning for.
Since 2.7, 2.10 (maximum) Return Type
Timespan
[the] [max[imum]] (burn[ing]|fire) (time|duration) of %entities%%entities%'[s] [max[imum]] (burn[ing]|fire) (time|duration)send "You will stop burning in %fire time of player%"send the max burn time of targetCondition Entity is in Liquid
Section titled “ Condition Entity is in Liquid”Checks whether an entity is in rain, lava, water or a bubble column.
Since 2.6.1
%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)if player is in rain:if player is in water:player is in lava:player is in bubble columnCondition Entity Is Sheared
Section titled “ Condition Entity Is Sheared”Checks whether entities are sheared.
Since 2.8.0
%living entities% (is|are) (sheared|shorn)%living entities% (isn't|is not|aren't|are not) (sheared|shorn)if targeted entity of player is sheared: send "This entity has nothing left to shear!" to playerCondition Entity is Wet
Section titled “ Condition Entity is Wet”Checks whether an entity is wet or not (in water, rain or a bubble column).
Since 2.6.1
%entities% (is|are) wet%entities% (isn't|is not|aren't|are not) wetif player is wet:Expression Entity Owner
Section titled “ Expression Entity Owner”The owner of a tameable entity (i.e. horse or wolf).
Since 2.5 Return Type
Offline Player
[the] (owner|tamer) of %living entities%%living entities%'[s] (owner|tamer) set owner of last spawned wolf to player if the owner of last spawned wolf is player:Expression Entity Size
Section titled “ Expression Entity Size”Changes the entity size of slimes and phantoms. This is not the same as changing the scale attribute of an entity.
When changing the size of a slime, its health is fully resorted and will have changes done to its max health, movement speed and attack damage.
The default minecraft size of a slime is anywhere between 0 and 2, with a maximum of 126.
The default minecraft size of a phantom is 0 with a maximum size of 64.
Since 2.11 Return Type
Number
[the] entity size of %living entities%%living entities%'[s] entity sizespawn a slime at player: set entity size of event-entity to 5 set name of event-entity to "King Slime Jorg"Type Entity Snapshot
Section titled “ Type Entity Snapshot”Represents a snapshot of an entity's data.
This includes all of the data associated with an entity (its name, health, attributes, etc.), at the time this expression is used. Essentially, these are a way to create templates for entities.
Individual attributes of a snapshot cannot be modified or retrieved.
Since 2.10
Expression Entity Snapshot
Section titled “ Expression 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.
Since 2.10 Return Type
Entity Snapshot
[the] entity snapshot of %entities/entity types%%entities/entity types%'[s] entity snapshotspawn 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)Expression Entity Sound
Section titled “ Expression Entity Sound”Gets the sound that a given entity will make in a specific scenario.
Since 2.10 Return Type
Text
[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]play sound (hurt sound of player) at playerset {_sounds::*} to death sounds of (all mobs in radius 10 of player)Expression Entity Storage Entity Count
Section titled “ Expression Entity Storage Entity Count”The current number of entities stored inside an entity block storage (i.e. beehive).
The maximum amount of entities an entity block storage can hold.
Since 2.11 Return Type
Number
[the] [max[imum]] [stored] entity count [of %blocks%]%blocks%'[s] [max[imum]] [stored] entity countbroadcast the stored entity count of {_beehive}set the maximum entity count of {_beehive} to 20Condition Entity Storage Is Full
Section titled “ Condition Entity Storage Is Full”Checks to see if the an entity block storage (i.e beehive) is full.
Since 2.11
[the] entity storage of %blocks% (is|are) full%blocks%'[s] entity storage (is|are) full[the] entity storage of %blocks% (isn't|is not|aren't|are not) full%blocks%'[s] entity storage (isn't|is not|aren't|are not) fullif the entity storage of {_beehive} is full: release the entity storage of {_beehive}Type Entity Type
Section titled “ Type Entity Type”The type of an entity, e.g. player, wolf, powered creeper, etc.
Since 1.3
<i>Detailed usage will be added eventually</i>victim is a cowspawn a creeperType Entity Type with Amount
Section titled “ Type Entity Type with Amount”An entity type with an amount, e.g. '2 zombies'. I might remove this type in the future and make a more general 'type' type, i.e. a type that has a number and a type.
Since 1.3
<<a href='#number'>number</a>> <entity type>spawn 5 creepers behind the playerEffect Entity Visibility
Section titled “ Effect Entity Visibility”Change visibility of the given entities for the given players.
If no players are given, will hide the entities from all online players.
When reveal is used in combination of the hidden players expression and the viewers are not specified, this will default it to the given player in the hidden players expression.
Note: all previously hidden entities (including players) will be visible when a player leaves and rejoins.
Since 2.3, 2.10 (entities)
hide %entities% [(from|for) %players%]reveal %entities% [(to|for|from) %players%]on spawn: if event-entity is a chicken: hide event-entityreveal hidden players of playersExpression Entity/Player/World from UUID
Section titled “ Expression Entity/Player/World from UUID”Get an entity, player, offline player or world from a UUID.
Unloaded entities or players that are offline (when using 'player from %uuid%') will return nothing.
Since 2.11 Return Type
Object
[offline[ ]]player[s] from %uuids%entit(y|ies) from %uuids%world[s] from %uuids%set {_player} to player from "a0789aeb-7b46-43f6-86fb-cb671fed5775" parsed as uuidset {_offline player} to offline player from {_some uuid}set {_entity} to entity from {_some uuid}set {_world} to world from {_some uuid}Effect Equip
Section titled “ Effect Equip”Equips or unequips an entity with the given itemtypes (usually armor).
This effect will replace any armor that the entity is already wearing.
Since 1.0, 2.7 (multiple entities, unequip), 2.10 (wolves), 2.12.1 (happy ghasts)
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)equip player with diamond helmetequip player with diamond leggings, diamond chestplate, and diamond bootsunequip diamond chestplate from playerunequip player's armorType Equipment Slot
Section titled “ Type Equipment Slot”Represents an equipment slot of an entity.
Since 2.11
feet, chestplate slot, saddle slot, body slots, body armors, boots slot, body slot, leggings slots, off hand slot, helmet slots, legs slot, legs, body armour slots, body armor slot, body armor slots, leggings, helmets, chestplates, hand slot, body armour slot, helmet slot, boots slots, chest slots, tool slot, main hand slots, off hand slots, main hands, head slot, saddle slots, head slots, feet slots, shoes slot, hand slots, chestplate slots, helmet, body armours, boots, legs slots, off haands, chest slot, off hand, main hand slot, feet slot, leggings slot, shoes, chestplate, tool slots, body armor, main hand, body armourExpression Equippable Component
Section titled “ Expression Equippable Component”The equippable component of an item. Any changes made to the equippable component will be present on the item. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.
Since 2.13 Return Type
Equippable Components
[the] equippable component[s] of %slots/item types%%slots/item types%'[s] equippable component[s]set {_component} to the equippable component of {_item}set the equipment slot of {_component} to helmet slotclear the equippable component of {_item}reset the equippable component of {_item}Expression Equippable Component - Allowed Entities
Section titled “ Expression Equippable Component - Allowed Entities”The entities allowed to wear the item. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.
Since 2.13 Return Type
Entity Type
[the] allowed entities [of %equippable components%]%equippable components%'[s] allowed entitiesset the allowed entities of {_item} to a zombie and a skeletonset {_component} to the equippable component of {_item}clear the allowed entities of {_component}Expression Equippable Component - Camera Overlay
Section titled “ Expression Equippable Component - Camera Overlay”The camera overlay for the player when the item is equipped. Example: The jack-o'-lantern view when having a jack-o'-lantern equipped as a helmet. The camera overlay is represented as a namespaced key. A namespaced key can be formatted as 'namespace:id' or 'id'. It can only contain one ':' to separate the namespace and the id. Only alphanumeric characters, periods, underscores, and dashes can be used. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.
Since 2.13 Return Type
Text
[the] camera overlay [of %equippable components%]%equippable components%'[s] camera overlayset the camera overlay of {_item} to "custom_overlay"set {_component} to the equippable component of {_item}set the camera overlay of {_component} to "custom_overlay"Condition Equippable Component - Can Be Dispensed
Section titled “ Condition Equippable Component - Can Be Dispensed”Whether an item can be dispensed by a dispenser. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.
Since 2.13
%equippable components% can be dispensed%equippable components% (can't|cannot|can not) be dispensed%equippable components% (is|are) (able to be dispensed|dispensable)%equippable components% (isn't|is not|aren't|are not) (able to be dispensed|dispensable)if {_item} can be dispensed: add "Dispensable" to lore of {_item}set {_component} to the equippable component of {_item}if {_component} is not able to be dispensed: allow {_component} to be dispensedCondition Equippable Component - Can Be Sheared Off
Section titled “ Condition Equippable Component - Can Be Sheared Off”Whether an item can be sheared off of an entity. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.
Since 2.13
%equippable components% can be sheared off [of entities]%equippable components% (can't|cannot|can not) be sheared off [of entities]if {_item} can be sheared off: add "Shearable" to lore of {_item}set {_component} to the equippable component of {_item}if {_component} can not be sheared off: allow {_component} to be sheared offCondition Equippable Component - Can Equip On Entities
Section titled “ Condition Equippable Component - Can Equip On Entities”Whether an entity should equip the item when right clicking on the entity with the item. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.
Since 2.13
%equippable components% can be (equipped|put) on[to] entities%equippable components% (can't|cannot|can not) be (equipped|put) on[to] entitiesif {_item} can be equipped on entities:Condition Equippable Component - Can Swap Equipment
Section titled “ Condition Equippable Component - Can Swap Equipment”Whether an item can swap equipment by right clicking with it in your hand. The item will swap places of the set 'equipment slot' of the item. If an equipment slot is not set, defaults to helmet. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work aas intended.
Since 2.13
%equippable components% can swap equipment [on right click|when right clicked]%equippable components% (can't|cannot|can not) swap equipment [on right click|when right clicked]if {_item} can swap equipment: add "Swappable" to lore of {_item}set {_component} to the equippable component of {_item}if {_component} can not be equipped when right clicked: make {_component} swappableEffect Equippable Component - Dispense
Section titled “ Effect Equippable Component - Dispense”Whether the item can be dispensed by a dispenser. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.
Since 2.13
allow %equippable components% to be dispensedmake %equippable components% dispensablelet %equippable components% be dispensed(block|prevent|disallow) %equippable components% from being dispensedmake %equippable components% not dispensableallow {_item} to be dispensedset {_component} to the equippable component of {_item}prevent {_component} from being dispensedEffect Equippable Component - Equip On Entities
Section titled “ Effect Equippable Component - Equip On Entities”Whether an entity should equip the item when right clicking on the entity with the item. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.
Since 2.13
allow %equippable components% to be equipped on[to] entitiesmake %equippable components% equippable on[to] entitieslet %equippable components% be equipped on[to] entities(block|prevent|disallow) %equippable components% from being equipped on[to] entitiesmake %equippable components% not equippable on[to] entitiesallow {_item} to be equipped onto entitiesExpression Equippable Component - Equip Sound
Section titled “ Expression Equippable Component - Equip Sound”The sound to be played when the item is equipped. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.
Since 2.13 Return Type
Text
[the] equip sound [of %equippable components%]%equippable components%'[s] equip soundset the equip sound of {_item} to "entity.experience_orb.pickup"set {_component} to the equippable component of {_item}set the equip sound of {_component} to "block.note_block.pling"Expression Equippable Component - Equipment Slot
Section titled “ Expression Equippable Component - Equipment Slot”The equipment slot an item can be equipped to. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.
Since 2.13 Return Type
Equipment Slot
[the] equipment slot [of %equippable components%]%equippable components%'[s] equipment slotset the equipment slot of {_item} to chest slotset {_component} to the equippable component of {_item}set the equipment slot of {_component} to boots slotEffect Equippable Component - Lose Durability
Section titled “ Effect Equippable Component - Lose Durability”Whether the item should take damage when the wearer gets injured. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.
Since 2.13
(make|let) %equippable components% (lose durability|be damaged) (on [wearer['s]] injury|when [[the] wearer [is]] (hurt|injured|damaged))(allow|force) %equippable components% to (lose durability|be damaged) (on [wearer['s]] injury|when [[the] wearer [is]] (hurt|injured|damaged))make %equippable components% not (lose durability|be damaged) (on [wearer['s]] injury|when [[the] wearer [is]] (hurt|injured|damaged))(disallow|prevent) %equippable components% from (lose durability|being damaged) (on [wearer['s]] injury|when [[the] wearer [is]] (hurt|injured|damaged))make {_item} lose durability when hurtset {_component} to the equippable component of {_item}if {_component} will lose durability when injured: make {_component} lose durability on injuryExpression Equippable Component - Model
Section titled “ Expression Equippable Component - Model”The model of the item when equipped. The model key is represented as a namespaced key. A namespaced key can be formatted as 'namespace:id' or 'id'. It can only contain one ':' to separate the namespace and the id. Only alphanumeric characters, periods, underscores, and dashes can be used. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.
Since 2.13 Return Type
Text
[the] equipped (model|asset) (key|id) [of %equippable components%]%equippable components%'[s] equipped (model|asset) (key|id)set the equipped model key of {_item} to "custom_model"set {_component} to the equippable component of {_item}set the equipped model id of {_component} to "custom_model"Effect Equippable Component - Shear Off
Section titled “ Effect Equippable Component - Shear Off”Whether the item can be sheared off of entities. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.
Since 2.13
allow %equippable components% to be sheared off [of entities](disallow|prevent) %equippable components% from being sheared off [of entities]allow {_item} to be sheared offset {_component} to the equippable component of {_item}if {_component} can be sheared off of entities: prevent {_component} from being sheared off of entitiesExpression Equippable Component - Shear Sound
Section titled “ Expression Equippable Component - Shear Sound”The sound to be played when the item is sheared off of an entity. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.
Since 2.13 Return Type
Text
[the] shear[ed [off]] sound [of %equippable components%]%equippable components%'[s] shear[ed [off]] soundset the shear sound of {_item} to "entity.experience_orb.pickup"set {_component} to the equippable component of {_item}set the shear sound of {_component} to "block.note_block.pling"Effect Equippable Component - Swap Equipment
Section titled “ Effect Equippable Component - Swap Equipment”Whether the item can be swapped by right clicking with it in your hand. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.
Since 2.13
(allow|force) %equippable components% to swap equipment [on right click|when right clicked](make|let) %equippable components% swap equipment [on right click|when right clicked](block|prevent|disallow) %equippable components% from swapping equipment [on right click|when right clicked]make %equippable components% not swap equipment [on right click|when right clicked]allow {_item} to swap equipmentset {_component} to the equippable component of {_item}prevent {_component} from swapping equipment on right clickCondition Equippable Component - Will Lose Durability
Section titled “ Condition Equippable Component - Will Lose Durability”Whether an item will be damaged when the wearer gets injured. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.
Since 2.13
%equippable components% will (lose durability|be damaged) (on [wearer['s]] injury|when [[the] wearer [is]] (hurt|injured|damaged))%equippable components% (will not|won't) (lose durability|be damaged) (on [wearer['s]] injury|when [[the] wearer [is]] (hurt|injured|damaged))if {_item} will lose durability when hurt: add "Damageable on injury" to lore of {_item}set {_component} to the equippable component of {_item}if {_component} won't lose durability on injury: make {_component} lose durability when injuredType Equippable Components
Section titled “ Type Equippable Components”Represents an equippable component used for items. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.
Since 2.13
Structure Event
Section titled “ Structure Event”The structure used for listening to events. Optionally allows specifying whether to listen to events that have been cancelled, and allows specifying with which priority to listen to events. Events are called in the following order of priorities. ``` lowest -> low -> normal -> high -> highest -> monitor ``` Modifying event-values or cancelling events is not supported when using the 'monitor' priority. It should only be used for monitoring the outcome of an event.
Since 1.0, 2.6 (per-event priority), 2.9 (listening to cancellable events)
[on] [uncancelled|cancelled|(any|all)] <.+> [with priority ((lowest|low|normal|high|highest|monitor))]on load: broadcast "loading!"on join: if {first-join::%player's uuid%} is not set: set {first-join::%player's uuid%} to nowcancelled block break: send "<red>You can't break that here" to playeron join with priority lowest: # called first
on join: # called second
on join with priority highest: # called lastCondition Event Cancelled
Section titled “ Condition Event Cancelled”Checks whether or not the event is cancelled.
Since 2.2-dev36
[the] event is cancel[l]ed[the] event (is not|isn't) cancel[l]edon click: if event is cancelled: broadcast "no clicks allowed!"Expression Exact Item
Section titled “ Expression Exact Item”Get an exact item representation of a block, carrying over any data. For example, using this expression on a chest block with items stored inside will return a chest item with the exact same items in its inventory as the chest block.
Since 2.12 Return Type
Item
[the] exact item[s] of %blocks%%blocks%'[s] exact item[s]set {_item} to exact item of block at location(0, 0, 0)Expression Except
Section titled “ Expression Except”Filter a list by providing objects to be excluded.
Since 2.12 Return Type
Object
%objects% (except|excluding|not including) %objects%spawn zombie at location(0, 0, 0): hide entity from all players except {_player}set {_items::*} to a copper ingot, an iron ingot and a gold ingotset {_except::*} to {_items::*} excluding copper ingotType Executable
Section titled “ Type Executable”Something that can be executed (run) and may accept arguments, e.g. a function.
This may also return a result.
Since 2.10
run {_function} with arguments 1 and trueExpression Exhaustion
Section titled “ Expression Exhaustion”The exhaustion of a player. This is mainly used to determine the rate of hunger depletion.
Since 2.2-dev35 Return Type
Number
[the] exhaustion of %players%%players%'[s] exhaustionset exhaustion of all players to 1Condition Exists/Is Set
Section titled “ Condition Exists/Is Set”Checks whether a given expression or variable is set.
Since 1.2
%~objects% (exist[s]|(is|are) set)%~objects% (do[es](n't| not) exist|(is|are)(n't| not) set){teams::%player's uuid%::preferred-team} is not seton damage: projectile exists broadcast "%attacker% used a %projectile% to attack %victim%!"Effect Exit
Section titled “ Effect Exit”Exits a given amount of loops and conditionals, or the entire trigger.
Since unknown (before 2.1)
(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)sloop blocks above the player: loop-block is not air: exit 2 sections set loop-block to waterFunction exp
Section titled “ Function exp”The exponential function. You probably don't need this if you don't know what this is.
Since 2.2 Return Type
Number
exp(n: number)exp(0) = 1exp(1) = 2.7183Effect Expand/Shrink World Border
Section titled “ Effect Expand/Shrink World Border”Expand or shrink the size of a world border.
Using `by` adds/subtracts from the current size of the world border.
Using `to` sets to the specified size.
Since 2.11
(expand|grow) [[the] (diameter|radius) of] %worldborders% (by|to) %number% [over [a period of] %time span%](expand|grow) %worldborders%['s (diameter|radius)] (by|to) %number% [over [a period of] %time span%](contract|shrink) [[the] (diameter|radius) of] %worldborders% (by|to) %number% [over [a period of] %time span%](contract|shrink) %worldborders%['s (diameter|radius)] (by|to) %number% [over [a period of] %time span%]expand world border of player by 100 over 5 secondsshrink world border of world "world" to 100 over 10 secondsType Experience
Section titled “ Type Experience”Experience points. Please note that Bukkit only allows to give XP, but not remove XP from players. You can however change a player's level and level progress freely.
Since 2.0
[<number>] ([e]xp|experience [point[s]])give 10 xp to the playerExpression Experience
Section titled “ Expression Experience”How much experience was spawned in an experience spawn or block break event. Can be changed.
Since 2.1, 2.5.3 (block break event), 2.7 (experience change event), 2.10 (breeding, fishing) Return Type
Experience
Applicable EventsOn Experience Spawn
On Break / Mine
On Experience Change
On Entity Breed
[the] [(spawned|dropped)] [e]xp[erience] [orb[s]]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 experienceType Experience Cooldown Change Reason
Section titled “ Type Experience Cooldown Change Reason”Represents a change reason of an experience cooldown change event.
Since 2.10
plugin, pickup orb, orb pickupExpression Experience Cooldown Change Reason
Section titled “ Expression Experience Cooldown Change Reason”The experience change reason within an experience cooldown change event.
Since 2.10 Return Type
Experience Cooldown Change Reason
[the] (experience|[e]xp) cooldown change (reason|cause|type)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 orbExpression Experience Pickup Cooldown
Section titled “ Expression Experience Pickup 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.
Since 2.10 Return Type
Timespan
[the] (experience|[e]xp) [pickup|collection] cooldown of %players%%players%'[s] (experience|[e]xp) [pickup|collection] cooldownsend 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 playerEffect Explode Creeper
Section titled “ Effect Explode Creeper”Starts the explosion process of a creeper or instantly explodes it.
Since 2.5
instantly explode [creeper[s]] %living entities%explode [creeper[s]] %living entities% instantlyignite creeper[s] %living entities%start (ignition|explosion) [process] of [creeper[s]] %living entities%stop (ignition|explosion) [process] of [creeper[s]] %living entities%start explosion of the last spawned creeperstop ignition of the last spawned creeperExpression Exploded Blocks
Section titled “ Expression Exploded Blocks”Get all the blocks that were destroyed in an explode event. Supports add/remove/set/clear/delete blocks.
Since 2.5, 2.8.6 (modify blocks) Return Type
Block
Applicable EventsOn Explode
[the] exploded blockson 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 blocksEffect Explosion
Section titled “ Effect Explosion”Creates an explosion of a given force. The Minecraft Wiki has an article on explosions which lists the explosion forces of TNT, creepers, etc.
Hint: use a force of 0 to create a fake explosion that does no damage whatsoever, or use the explosion effect introduced in Skript 2.0.
Starting with Bukkit 1.4.5 and Skript 2.0 you can use safe explosions which will damage entities but won't destroy any blocks.
Since 1.0
[(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%]create an explosion of force 10 at the playercreate an explosion of force 0 at the victimExpression Explosion Block Yield
Section titled “ Expression Explosion Block Yield”The percentage of exploded blocks dropped in an explosion event.
When changing the yield, a value greater than 1 will function the same as using 1.
Attempting to change the yield to a value less than 0 will have no effect.
Since 2.5 Return Type
Number
Applicable EventsOn Explode
[the] [explosion['s]] block (yield|amount)[the] percentage of blocks droppedon explode: set the explosion's block yield to 10%Expression Explosion Yield
Section titled “ Expression Explosion Yield”The yield of the explosion in an explosion prime event. This is how big the explosion is.
When changing the yield, values less than 0 will be ignored.
Read this wiki page for more information
Since 2.5 Return Type
Number
Applicable EventsOn Explosion Prime
[the] explosion (yield|radius|size)[the] (yield|radius|size) of [the] explosionon explosion prime: set the yield of the explosion to 10Expression Explosive Yield
Section titled “ Expression Explosive Yield”The yield of an explosive (creeper, ghast, primed tnt, fireball, etc.). This is how big of an explosion is caused by the entity.
Read this wiki page for more information.
The yield of ghasts can only be set to between 0 and 127.
Since 2.5, 2.11 (ghasts) Return Type
Number
[the] explosive (yield|radius|size|power) of %entities%%entities%'[s] explosive (yield|radius|size|power)on spawn of a creeper: set the explosive yield of the event-entity to 10Expression Facing
Section titled “ Expression 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')
Since 1.4 Return Type
Direction
[the] [(horizontal)] facing of %living entities/blocks%%living entities/blocks%'[s] [(horizontal)] facing# makes a bridgeloop blocks from the block below the player in the horizontal facing of the player: set loop-block to cobblestoneFunction factorial
Section titled “ Function factorial”Get the factorial of a number.
Getting the factorial of any number above 21 will return an approximation, not an exact value.
Any number after 170 will always return Infinity.
Should not be used to calculate permutations or combinations manually.
Since 2.11 Return Type
Number
factorial(number: number)factorial(0) = 1factorial(3) = 3*2*1 = 6factorial(5) = 5*4*3*2*1 = 120factorial(171) = InfinityExpression Fall Distance
Section titled “ Expression Fall Distance”The distance an entity has fallen for.
Since 2.5 Return Type
Number
[the] fall[en] (distance|height) of %entities%%entities%'[s] fall[en] (distance|height)set all entities' fall distance to 10on damage: send "%victim's fall distance%" to victimfeed [the] %players% [by %number% [beef[s]]]feed all playersfeed the player by 5 beefsExpression Fertilized Blocks
Section titled “ Expression Fertilized Blocks”The blocks fertilized in block fertilize events.
Since 2.5 Return Type
Block
Applicable EventsOn Block Fertilize
[all] [the] fertilized blocksthe fertilized blocksSection Filter
Section titled “ Section Filter”Filters a variable list based on the supplied conditions. Unlike the filter expression, this effect maintains the indices of the filtered list.
It also supports filtering based on meeting any of the given criteria, rather than all, like multi-line if statements.
Since 2.10
filter %~objects% to match [any|all]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 10Expression Filter
Section titled “ Expression Filter”Filters a list based on a condition.
For example, if you ran 'broadcast "something" and "something else" where [string input is "something"]',
only "something" would be broadcast as it is the only string that matched the condition.
Since 2.2-dev36, 2.10 (parenthesis pattern) Return Type
Object
%objects% (where|that match) \[<.+>\]%objects% (where|that match) \(<.+>\)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]:Expression Final Damage
Section titled “ Expression Final Damage”How much damage is done in a damage event, considering all types of damage reduction. Can NOT be changed.
Since 2.2-dev19 Return Type
Number
Applicable EventsOn Damage
[the] final damagesend "%final damage%" to victimType Firework Effect
Section titled “ Type Firework Effect”A configuration of effects that defines the firework when exploded
which can be used in the launch firework effect.
See the firework effect expression for detailed patterns.
Since 2.4
See <a href='/#FireworkType'>Firework Types</a>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 1Expression Firework Effect
Section titled “ Expression Firework Effect”Represents a 'firework effect' which can be used in the launch firework effect.
Since 2.4 Return Type
Firework Effect
[(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%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 1small, ball, star shaped, large, star, creeper face, small ball, large ball, burst, ball large, creeperExpression First Empty Slot in Inventory
Section titled “ Expression First Empty Slot in Inventory”Returns the first empty slot in an inventory. If no empty slot is found, it returns nothing.
Since 2.12 Return Type
Slot
[the] first empty slot[s] of %inventories%%inventories%'[s] first empty slot[s][the] first empty slot[s] in %inventories%set the first empty slot in player's inventory to 5 diamondsif the first empty slot in player's inventory is not set: message "No empty slot available in your inventory!" to playerExpression Fishing Approach Angle
Section titled “ Expression Fishing Approach 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.
Since 2.10 Return Type
Number
Applicable EventsOn Fishing
(min[imum]|max[imum]) fish[ing] approach[ing] angleon 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 eventExpression Fishing Bite Time
Section titled “ Expression Fishing Bite 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.
Since 2.10 Return Type
Timespan
Applicable EventsOn Fishing
fish[ing] bit(e|ing) [wait] timeon fish approach: set fishing bite time to 5 secondsExpression Fishing Hook
Section titled “ Expression Fishing Hook”The fishing hook in a fishing event.
Since 2.10 Return Type
Entity
Applicable EventsOn Fishing
[the] fish[ing] (hook|bobber)on fish line cast: wait a second teleport player to fishing hookExpression Fishing Hooked Entity
Section titled “ Expression Fishing Hooked Entity”Returns the hooked entity in the hooked event.
Since 2.10 Return Type
Entity
Applicable EventsOn Fishing
hook[ed] entityon entity hooked: if hooked entity is a player: teleport hooked entity to playerCondition Fishing Lure Applied
Section titled “ Condition Fishing Lure Applied”Checks if the lure enchantment is applied to the current fishing event.
Since 2.10 Applicable Events
On Fishing
lure enchantment bonus is (applied|active)lure enchantment bonus is(n't| not) (applied|active)on fishing line cast: if lure enchantment bonus is applied: cancel eventType Fishing State
Section titled “ Type Fishing State”Represents the different states of a fishing event.
Since 2.11
lured, bobber in ground, fish escaped, entity caught, fishing, fish lured, fishing rod cast, reel in, caught fish, caught entity, fishing line cast, fish escape, fish bite, bite, rod cast, in ground, failed attempt, fish caughtExpression Fishing Wait Time
Section titled “ Expression Fishing Wait 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.
Since 2.10 Return Type
Timespan
Applicable EventsOn Fishing
(min[imum]|max[imum]) fish[ing] wait[ing] timeon fishing line cast: set min fish waiting time to 10 seconds set max fishing waiting time to 20 secondsExpression Flight Mode
Section titled “ Expression Flight Mode”Whether the player(s) are allowed to fly. Use Make Fly effect to force player(s) to fly.
Since 2.2-dev34 Return Type
Boolean
[the] fl(y[ing]|ight) (mode|state) of %players%%players%'[s] fl(y[ing]|ight) (mode|state)set flight mode of player to truesend "%flying state of all players%"Function floor
Section titled “ Function floor”Rounds a number down, i.e. returns the closest integer smaller than or equal to the argument.
Since 2.2 Return Type
floor(n: number)floor(2.34) = 2floor(2) = 2floor(2.99) = 2Expression Food Level
Section titled “ Expression Food Level”The food level of a player from 0 to 10. Has several aliases: food/hunger level/meter/bar.
Since 1.0 Return Type
Number
[the] (food|hunger)[[ ](level|met(er|re)|bar)] [of %players%]%players%'[s] (food|hunger)[[ ](level|met(er|re)|bar)]set the player's food level to 10Section For Each Loop
Section titled “ Section For Each Loop”A specialised loop section run for each element in a list. Unlike the basic loop, this is designed for extracting the key & value from pairs. The loop element's key/index and value can be stored in a variable for convenience. When looping a simple (non-indexed) set of values, e.g. all players, the index will be the loop counter number.
Since 2.10, 2.14 (stable release)
(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%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}%"Effect Force Attack
Section titled “ Effect Force Attack”Makes a living entity attack an entity with a melee attack.
Using 'attack' will make the attacker use the item in their main hand and will apply extra data from the item, including enchantments and attributes.
Using 'damage' with a number of hearts will not account for the item in the main hand and will always be the number provided.
Since 2.5.1, 2.13 (multiple, amount)
make %living entities% attack %entities%force %living entities% to attack %entities%make %living entities% damage %entities% by %number% [heart[s]]force %living entities% to damage %entities% by %number% [heart[s]]spawn a wolf at location(0, 0, 0)make last spawned wolf attack all playersspawn a zombie at location(0, 0, 0)make player damage last spawned zombie by 2Effect Force Eating
Section titled “ Effect Force Eating”Make a panda or horse type (horse, camel, donkey, llama, mule) start/stop eating.
Since 2.11
make %living entities% (start|stop) eatingforce %living entities% to (start|stop) eatingif last spawned panda is eating: make last spawned panda stop eatingEffect Force Enchantment Glint
Section titled “ Effect Force Enchantment Glint”Forces the items to glint or not, or removes its existing enchantment glint enforcement.
Since 2.10
(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 overrideforce {_items::*} to glintforce the player's tool to stop glintingEffect Force Panda On Back
Section titled “ Effect Force Panda On Back”Make a panda get on/off its back.
Since 2.11
make %living entities% get (on|off) (its|their) back[s]force %living entities% to get (on|off) (its|their) back[s]if last spawned panda is on its back: make last spawned panda get off its backEffect Force Respawn
Section titled “ Effect Force 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.
Since 2.2-dev21
force %players% to respawnon death of player: force event-player to respawnFunction formatNumber
Section titled “ Function formatNumber”Converts numbers to human-readable format. By default, '###,###' (e.g. '123,456,789') will be used for whole numbers and '###,###.##' (e.g. '123,456,789.00) will be used for decimal numbers. A hashtag '#' represents a digit, a comma ',' is used to separate numbers, and a period '.' is used for decimals.
Will return none if the format is invalid.
For further reference, see this article.
Since 2.10 Return Type
Text
formatNumber(number: number, format: string = )command /balance: aliases: bal executable by: players trigger: set {_money} to formatNumber({money::%sender's uuid%}) send "Your balance: %{_money}%" to senderExpression Formatted Date
Section titled “ Expression Formatted Date”Converts date to human-readable text format. By default, 'yyyy-MM-dd HH:mm:ss z' (e.g. '2018-03-30 16:03:12 +01') will be used. For reference, see this Wikipedia article.
Since 2.2-dev31, 2.7 (support variables in format) Return Type
Text
%dates% formatted [human-readable] [(with|as) %text%][human-readable] formatted %dates% [(with|as) %text%]command /date: trigger: send "Full date: %now formatted human-readable%" to sender send "Short date: %now formatted as "yyyy-MM-dd"%" to senderExpression Former/Future State
Section titled “ Expression Former/Future State”Represents the value of an expression before an event happened or the value it will have directly after the event, e.g. the old or new level respectively in a level change event.
Note: The past, future and present states of an expression are sometimes called 'time states' of an expression.
Note 2: If you don't specify whether to use the past or future state of an expression that has different values, its default value will be used which is usually the value after the event.
Since 1.1 Return Type
Object
[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)])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 weatherExpression Free / Max / Total Memory
Section titled “ Expression Free / Max / Total Memory”The free, max or total memory of the server in Megabytes.
Since 2.8.0 Return Type
Number
[the] [server] (free|max[imum]|total) (memory|ram)while player is online: send action bar "Memory left: %free memory%/%max memory%MB" to player wait 5 ticksExpression Freeze Time
Section titled “ Expression Freeze Time”How much time an entity has been in powdered snow for.
Since 2.7 Return Type
Timespan
[the] freeze time of %entities%%entities%'[s] freeze timeplayer's freeze time is less than 3 seconds: send "you're about to freeze!" to the playerType Frog Variant
Section titled “ Type Frog Variant”Represents the variant of a frog entity.
NOTE: Minecraft namespaces are supported, ex: 'minecraft:warm'.
Since 2.13
cold, temperate, warmFunction fromBase
Section titled “ Function fromBase”Turns a text version of a number in a specific base (decimal, hexadecimal, octal) into an actual number. For example, converting "20" in hexadecimal (base 16) would be 'fromBase("20", 16)', which would return 32. You can use any base between 2 and 36.
Since 2.14 Return Type
fromBase(string value: objects, base: integer between 2 and 36)# /binaryText 01110011 01101011 01110010 01101001 01110000 01110100 00100001# sends "skript!"command binaryText <text>: trigger: set {_characters::*} to argument split at " " without trailing empty string transform {_characters::*} with fromBase(input, 2) # convert to codepoints transform {_characters::*} with character from codepoint input # convert to characters send join {_characters::*}Type Function
Section titled “ Type Function”A function loaded by Skript.
This can be executed (with arguments) and may return a result.
Since 2.10
run {_function} with arguments 1 and trueset {_result} to the result of {_function}Structure Function
Section titled “ Structure Function”Functions are structures that can be executed with arguments/parameters to run code.
They can also return a value to the trigger that is executing the function.
Note that local functions come before global functions execution
Since 2.2, 2.7 (local functions)
[local] function <.+>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}%}Expression Function
Section titled “ Expression Function”Obtain a function by name, which can be executed.
Since 2.10 Return Type
Function
[the|a] function [named] %text% [(in|from) %script%][the] functions [named] %texts% [(in|from) %script%][all [[of] the]|the] functions (in|from) %script%set {_function} to the function named "myFunction"run {_function} with arguments 13 and trueExpression Furnace Event Items
Section titled “ Expression Furnace Event Items”Represents the different items in furnace events.
Only 'smelting item' can be changed.
Since 2.10 Return Type
Item
Applicable EventsOn Smelt
On Fuel Burn
On Start Smelt
On Furnace Item Extract
[the] (smelted item|result[ item])[the] extracted item[s][the] smelting item[the] burned (fuel|item)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 itemExpression Furnace Slot
Section titled “ Expression Furnace Slot”A slot of a furnace, i.e. either the ore, fuel or result slot.
Since 1.0, 2.8.0 (syntax rework) Return Type
Slot
Applicable EventsOn Smelt
On Fuel Burn
[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]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 timeExpression Furnace Times
Section titled “ Expression Furnace Times”The cook time, total cook time, and burn time of a furnace. Can be changed.
- cook time: The amount of time an item has been smelting for.
- total cook time: The amount of time required to finish smelting an item.
- burn time: The amount of time left for the current fuel until consumption of another fuel item.
Since 2.10 Return Type
Timespan
[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] timeset 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 timeType Game Effect
Section titled “ Type Game Effect”Various game effects that can be played for players, like record disc songs, splash potions breaking, or fake bone meal effects.
Since 2.14
CLICK2CLICK1BOW_FIREDOOR_TOGGLEIRON_DOOR_TOGGLETRAPDOOR_TOGGLEIRON_TRAPDOOR_TOGGLEFENCE_GATE_TOGGLEDOOR_CLOSEIRON_DOOR_CLOSETRAPDOOR_CLOSEIRON_TRAPDOOR_CLOSEFENCE_GATE_CLOSEEXTINGUISHGHAST_SHRIEKGHAST_SHOOTBLAZE_SHOOTZOMBIE_CHEW_WOODEN_DOORZOMBIE_CHEW_IRON_DOORZOMBIE_DESTROY_DOORENDER_SIGNALMOBSPAWNER_FLAMESBREWING_STAND_BREWCHORUS_FLOWER_GROWCHORUS_FLOWER_DEATHPORTAL_TRAVELENDEREYE_LAUNCHFIREWORK_SHOOTDRAGON_BREATHANVIL_BREAKANVIL_USEANVIL_LANDENDERDRAGON_SHOOTWITHER_BREAK_BLOCKWITHER_SHOOTZOMBIE_INFECTZOMBIE_CONVERTED_VILLAGERBAT_TAKEOFFEND_GATEWAY_SPAWNENDERDRAGON_GROWLPHANTOM_BITEZOMBIE_CONVERTED_TO_DROWNEDHUSK_CONVERTED_TO_ZOMBIEGRINDSTONE_USEBOOK_PAGE_TURNSMITHING_TABLE_USEPOINTED_DRIPSTONE_LANDPOINTED_DRIPSTONE_DRIP_LAVA_INTO_CAULDRONPOINTED_DRIPSTONE_DRIP_WATER_INTO_CAULDRONSKELETON_CONVERTED_TO_STRAYLAVA_INTERACTREDSTONE_TORCH_BURNOUTEND_PORTAL_FRAME_FILLDRIPPING_DRIPSTONEENDER_DRAGON_DESTROY_BLOCKSPONGE_DRYCOPPER_WAX_ONCOPPER_WAX_OFFOXIDISED_COPPER_SCRAPEWITHER_SPAWNEDENDER_DRAGON_DEATHEND_PORTAL_CREATED_IN_OVERWORLDSOUND_STOP_JUKEBOX_SONGCRAFTER_CRAFTCRAFTER_FAILPARTICLES_SCULK_SHRIEKPARTICLES_EGG_CRACKGUST_DUSTTRIAL_SPAWNER_EJECT_ITEMVAULT_EJECT_ITEMSPAWN_COBWEBSOUND_WITH_CHARGE_SHOTExpression Game Effects with Data
Section titled “ Expression Game Effects with Data”Creates game effects that require some extra information, such as colors, particle counts, or block data. Game effects consist of combinations particles and/or sounds that are used in Minecraft, such as the bone meal particles, the sound of footsteps on a specific block, or the particles and sound of breaking a splash potion. Game effects not present here do not require data and can be found in the Game Effect type. Data requirements vary from version to version, so these docs are only accurate for the most recent Minecraft version at time of release.
Since 2.14 Return Type
Game Effect
[record] song (of|using) %item type%[dispenser] black smoke effect [(in|with|using) [the] direction] %direction%[dispenser] white smoke effect [(in|with|using) [the] direction] %direction%%item type/block data% [foot]step[s] sound [effect]%color% [splash] potion break effect%color% instant [splash] potion break effectcompost[er] [fill[ing]] (succe(ss|ed)|fail[ure|ed]) sound [effect]villager plant grow[th] effect [(with|using) %number% particles][fake] bone meal effect [(with|using) %number% particles](electric|lightning[ rod]|copper) spark effect [(in|using|along) the (x|y|z) axis]sculk (charge|spread) effect [(with|using) data %integer%][finish] brush[ing] %item type/block data% effecttrial spawner detect[ing|s] [%number%] player[s] effectominous trial spawner detect[ing|s] [%number%] player[s] effect[ominous] trial spawner spawn[ing] [mob] effect[ominous] trial spawner spawn[ing] [mob] effect with soundbee growth effect [(with|using) %number% particles][ominous] [trial] vault activate effect[ominous] [trial] vault deactivate effecttrial spawner become[ing] [not] ominous effect[ominous] trial spawner spawn[ing] item effectplace turtle egg effect [(with|using) %number% particles][mace] smash attack effect [(with|using) %number% particles]play compost success sound effect to playerType Game Mode
Section titled “ Type Game Mode”The game modes survival, creative, adventure and spectator.
Since 1.0
adventure, survival, spectator, creativeplayer's gamemode is survivalset the player argument's game mode to creativeExpression Game Mode
Section titled “ Expression Game Mode”The gamemode of a player. (Gamemodes)
Since 1.0 Return Type
Game Mode
[the] game[ ]mode of %players%%players%'[s] game[ ]modeplayer's gamemode is survivalset the player's gamemode to creativeminecraft:entity_drops, universal_anger, spawn_patrols, log_admin_commands, keep_inventory, raids, fire_damage, respawn_radius, advance_time, immediate_respawn, block_drops, projectiles_can_break_blocks, elytra_movement_check, block_explosion_drop_decay, command_blocks_work, spawn_phantoms, natural_health_regeneration, pvp, mob_explosion_drop_decay, player_movement_check, fire_spread_radius_around_player, max_command_sequence_length, random_tick_speed, spread_vines, lava_source_conversion, spawn_mobs, fall_damage, limited_crafting, max_command_forks, drowning_damage, spawn_wardens, send_command_feedback, forgive_dead_players, freeze_damage, ender_pearls_vanish_on_death, max_snow_accumulation_height, players_sleeping_percentage, mob_drops, mob_griefing, tnt_explosion_drop_decay, water_source_conversion, global_sound_events, spectators_generate_chunks, advance_weather, show_death_messages, allow_entering_nether_using_portals, spawn_monsters, spawner_blocks_work, max_block_modifications, show_advancement_messages, command_block_output, locator_bar, players_nether_portal_creative_delay, players_nether_portal_default_delay, max_entity_cramming, reduced_debug_info, spawn_wandering_traders, tnt_explodes, max_minecart_speedType Gamerule Value
Section titled “ Type Gamerule Value”A wrapper for the value of a gamerule for a world.
Since 2.5
Expression Gamerule Value
Section titled “ Expression Gamerule Value”The gamerule value of a world.
Since 2.5 Return Type
Gamerule Value
[the] gamerule %gamerule% of %worlds%set the gamerule commandBlockOutput of world "world" to falseType Gene
Section titled “ Type Gene”Represents a Panda's main or hidden gene. See genetics for more info.
Since 2.4
normal, lazy, happy, worried, worrisome, aggressive, brown, brownish, savage, playful, wild, weakEffect Generate Loot
Section titled “ Effect Generate Loot”Generates the loot in the specified inventories from a loot table using a loot context. Not specifying a loot context will use a loot context with a location at the world's origin.
Note that if the inventory is full, it will cause warnings in the console due to over-filling the inventory.
Since 2.10
generate [the] loot (of|using) %loot table% [(with|using) %loot context%] in %inventories%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}Expression Gliding State
Section titled “ Expression Gliding 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.
Since 2.2-dev21 Return Type
Boolean
[the] (gliding|glider) [state] of %living entities%%living entities%'[s] (gliding|glider) [state]set gliding of player to offExpression Glowing
Section titled “ Expression Glowing”Indicates if targeted entity is glowing (new 1.9 effect) or not. Glowing entities can be seen through walls.
Since 2.2-dev18 Return Type
Boolean
[the] glowing of %entities%%entities%'[s] glowingset glowing of player to trueCondition Goat Has Horns
Section titled “ Condition Goat Has Horns”Checks to see if a goat has or does not have a left, right, or both horns.
Since 2.11
%living entities% (has|have) ((any|a) horn|[a] left horn[s]|[a] right horn[s]|both horns)%living entities% (doesn't|does not|do not|don't) have ((any|a) horn|[a] left horn[s]|[a] right horn[s]|both horns) if last spawned goat does not have both horns: make last spawned goat have both horns if {_goat} has a right horn: force {_goat} to not have a right hornEffect Goat Horns
Section titled “ Effect Goat Horns”Make a goat have or not have a left, right, or both horns.
Since 2.11
remove [the] (left horn[s]|right horn[s]|both horns) of %living entities%remove %living entities%'[s] (left horn[s]|right horn[s]|horns)(regrow|replace) [the] (left horn[s]|right horn[s]|both horns) of %living entities%(regrow|replace) %living entities%'[s] (left horn[s]|right horn[s]|horns)remove the left horn of last spawned goatregrow {_goat}'s hornsremove both horns of all goatsExpression Gravity
Section titled “ Expression Gravity”If entity is affected by gravity or not, i.e. if it has Minecraft 1.10+ NoGravity flag.
Since 2.2-dev21 Return Type
Boolean
[the] gravity of %entities%%entities%'[s] gravityset gravity of player offEffect Handedness
Section titled “ Effect Handedness”Make mobs left or right-handed. This does not affect players.
Since 2.8.0
make %living entities% (left|right)( |-)handedspawn skeleton at spawn of world "world": make entity left handedmake all zombies in radius 10 of player right handedExpression Hanging Entity/Remover
Section titled “ Expression Hanging Entity/Remover”Returns the hanging entity or remover in hanging break and place events.
Since 2.6.2 Return Type
Entity
[the] hanging (entity|remover)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%living entities% (has|have) (ai|artificial intelligence)%living entities% (doesn't|does not|do not|don't) have (ai|artificial intelligence)target entity has aiCondition Has Chat Filtering
Section titled “ Condition Has Chat Filtering”Checks whether a player has chat filtering enabled.
Since 2.10
%players% (has|have) (chat|text) filtering (on|enabled)%players% (doesn't|does not|do not|don't) have (chat|text) filtering (on|enabled)if player doesn't have chat filtering enabled: send "<gray>This server may contain mature chat messages. You have been warned!" to playerCondition Has Client Weather
Section titled “ Condition Has Client Weather”Checks whether the given players have a custom client weather
Since 2.3
%players% (has|have) [a] (client|custom) weather [set]%players% (doesn't|does not|do not|don't) have [a] (client|custom) weather [set]if the player has custom weather: message "Your custom weather is %player's weather%"Condition Has Custom Model Data
Section titled “ Condition Has Custom Model Data”Check if an item has a custom model data tag
Since 2.5, 2.12 (expanded data types)
%item types% (has|have) [custom] model data [floats|flags|strings|colo[u]rs]%item types% (doesn't|does not|do not|don't) have [custom] model data [floats|flags|strings|colo[u]rs]player's tool has custom model dataif player's tool has custom model data flags: loop custom model data flags of player's tool: send "Flag %loop-index%: %loop-value%"set {_coloured} to whether player's tool has model data coloursCondition Has Glowing Text
Section titled “ Condition Has Glowing Text”Checks whether a sign (either a block or an item) has glowing text
Since 2.8.0
%blocks/item types% (has|have) glowing text%blocks/item types% (doesn't|does not|do not|don't) have glowing textif target block has glowing textCondition Has Item Cooldown
Section titled “ Condition Has Item Cooldown”Checks whether a cooldown is active on the specified item for a specific player. If the provided item has a cooldown group component specified, the cooldown group will take priority. Otherwise, the cooldown of the item material will be used.
Since 2.8.0, 2.12 (cooldown group)
%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)] cooldownif 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%"Condition Has Item Tooltips
Section titled “ Condition Has Item Tooltips”Whether the entire or additional tooltip of an item is shown or hidden.
The 'entire tooltip' is what shows to the player when they hover an item (i.e. name, lore, etc.).
The 'additional tooltip' hides certain information from certain items (potions, maps, books, fireworks, and banners).
Since 2.9.0
[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)send true if entire tooltip of player's tool is shownif additional tooltip of {_item} is hidden:Condition Has Line of Sight
Section titled “ Condition Has Line of Sight”Checks whether living entities have an unobstructed line of sight to other entities or locations.
Since 2.8.0
%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%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 playerCondition Has Loot Table
Section titled “ Condition Has 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.
Since 2.10
%blocks/entities% (has|have) [a] loot[ ]table%blocks/entities% (doesn't|does not|do not|don't) have [a] loot[ ]tableset 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.Condition Has Metadata
Section titled “ Condition Has Metadata”Checks whether a metadata holder has a metadata tag.
Since 2.2-dev36
%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%if player has metadata value "healer":Condition Has Permission
Section titled “ Condition Has Permission”Test whether a player has a certain permission.
Since 1.0
%command senders% (has|have) [the] permission[s] %texts%%command senders% (doesn't|does not|do not|don't) have [the] permission[s] %texts%player has permission "skript.tree"victim has the permission "admin": send "You're attacking an admin!" to attackerCondition Has Played Before
Section titled “ Condition Has Played Before”Checks whether a player has played on this server before. You can also use on first join if you want to make triggers for new players.
Since 1.4, 2.7 (multiple players)
%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)player has played on this server beforeplayer hasn't played beforeCondition Has Potion Effect
Section titled “ Condition Has Potion Effect”Checks whether an entity has a potion effect with certain properties.
An entity is considered having a potion effect if it has a potion effect with at least the specified properties.
For example, if an entity has an 'ambient speed 5' effect, they would be considered as having 'speed 5'.
For exact comparisons, consider using the Potion Effect of Entity/Item expression in an 'is' comparison.
Since 2.6.1, 2.14 (support for potion effects)
%living entities% (has|have) ([any|a[n]] [active] potion effect[s]|[any|a] potion effect[s] active)%living entities% (doesn't|does not|do not|don't) have ([any|a[n]] [active] potion effect[s]|[any|a] potion effect[s] active)%living entities% (has|have) %skriptpotioneffects% [active]%living entities% (doesn't|does not|do not|don't) have %skriptpotioneffects% [active]if the player has a potion effect of speed: message "You are sonic!"if all players have speed and haste active: broadcast "This server is ready to mine!"Condition Has Resource Pack
Section titled “ Condition Has Resource Pack”Checks whether the given players have a server resource pack loaded. Please note that this can't detect player's own resource pack, only the resource pack that sent by the server.
Since 2.4
%players% (has|have) [a] resource pack [(loaded|installed)]%players% (doesn't|does not|do not|don't) have [a] resource pack [(loaded|installed)]if the player has a resource pack loaded:Condition Has Scoreboard Tag
Section titled “ Condition Has Scoreboard Tag”Checks whether the given entities has the given scoreboard tags.
Since 2.3
%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%if the targeted armor stand has the scoreboard tag "test tag":Expression Hash
Section titled “ Expression Hash”Hashes the given text using the MD5 or SHA algorithms. Each algorithm is suitable for different use cases.
These hashing algorithms are not suitable for hashing passwords.
If handling passwords, use a hashing algorithm specifically designed for passwords.
MD5 is deprecated and may be removed in a future release. It is provided mostly for backwards compatibility, as it is outdated and not secure.
SHA is more secure, but is not suitable for hashing passwords (even with salting).
When hashing data, you must specify algorithms that will be used for security reasons!
Please note that a hash cannot be reversed under normal circumstances. You will not be able to get original value from a hash with Skript.
Since 2.0, 2.2-dev32 (SHA-256 algorithm), 2.12 (SHA-384, SHA-512) Return Type
Text
%texts% hash[ed] with ((MD5|SHA-256|SHA-384|SHA-512))set {_hash} to "hello world" hashed with SHA-256Expression Hatching Entity Type
Section titled “ Expression Hatching Entity Type”The type of the entity that will be hatched in a Player Egg Throw event.
Since 2.7 Return Type
Entity Type
Applicable EventsOn Egg Throw
[the] hatching entity [type]on player egg throw: set the hatching entity type to a primed tntExpression Hatching Number
Section titled “ Expression 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.
Since 2.7 Return Type
Number
Applicable EventsOn Egg Throw
[the] hatching numberon player egg throw: set the hatching number to 10Expression Head location
Section titled “ Expression Head location”The location of an entity's head, mostly useful for players and e.g. looping blocks in the player's line of sight.
Please note that this location is only accurate for entities whose head is exactly above their center, i.e. players, endermen, zombies, skeletons, etc., but not sheep, pigs or cows.
Since 2.0 Return Type
Location
[the] (head|eye[s]) [location[s]] of %living entities%%living entities%'[s] (head|eye[s]) [location[s]]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:Expression Heal Amount
Section titled “ Expression Heal Amount”The amount of health healed in a heal event.
Since 2.5.1 Return Type
Number
Applicable EventsOn Heal
[the] heal[ing] amounton player healing: increase the heal amount by 2 remove 0.5 from the healing amountType Heal Reason
Section titled “ Type Heal Reason”The health regain reason in a heal event.
Since 2.5
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 regenExpression Heal Reason
Section titled “ Expression Heal Reason”The heal reason of a heal event.
Since 2.5 Return Type
Heal Reason
Applicable EventsOn Heal
[the] (regen|health regain|heal[ing]) (reason|cause)on heal: heal reason is satiated send "You ate enough food and gained full health back!"Expression Health
Section titled “ Expression 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).
Since 1.0 Return Type
Number
Applicable EventsOn Damage
[the] health of %living entities%%living entities%'[s] healthmessage "You have %health% HP left."Expression Hex Code
Section titled “ Expression Hex Code”Returns the hexadecimal value representing the given color(s). The hex value of a colour does not contain a leading #, just the RRGGBB value. For those looking for hex values of numbers, see the asBase and fromBase functions.
Since 2.14 Return Type
Text
[the] hex[adecimal] code of %colors%%colors%'[s] hex[adecimal] codesend formatted "<#%hex code of rgb(100, 10, 10)%>darker red" to all playersExpression Hidden Players
Section titled “ Expression Hidden Players”The players hidden from a player that were hidden using the entity visibility effect.
Since 2.3 Return Type
Player
[(all [[of] the]|the)] hidden players (of|for) %players%[(all [[of] the]|the)] players hidden (from|for|by) %players%message "<light red>You are currently hiding: <light gray>%hidden players of the player%"Effect Hide Player from Server List
Section titled “ Effect Hide Player from Server List”Hides a player from the hover list and decreases the online players count (only if the player count wasn't changed before).
Since 2.3
hide %players% (in|on|from) [the] server listhide %players%'[s] info[rmation] (in|on|from) [the] server liston server list ping: hide {vanished::*} from the server listExpression Horse Domestication
Section titled “ Expression Horse Domestication”Gets and/or sets the (max) domestication of a horse.
The domestication of a horse is how close a horse is to becoming tame - the higher the domestication, the closer they are to becoming tame (must be between 1 and the max domestication level of the horse).
The max domestication of a horse is how long it will take for a horse to become tame (must be greater than 0).
Since 2.10 Return Type
Number
[the] [max[imum]] domestication level of %living entities%%living entities%'[s] [max[imum]] domestication levelfunction 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}Expression Hostname
Section titled “ Expression Hostname”The hostname used by the connecting player to connect to the server in a connect event.
Since 2.6.1 Return Type
Text
[the] (host|domain)[ ][name]on connect: hostname is "testers.example.com" send "Welcome back tester!"Expression Hotbar Button
Section titled “ Expression Hotbar Button”The hotbar button clicked in an inventory click event.
Since 2.5 Return Type
Number
[the] hotbar buttonon inventory click: send "You clicked the hotbar button %hotbar button%!"Expression Hotbar Slot
Section titled “ Expression Hotbar Slot”The currently selected hotbar slot.
To retrieve its number use Slot Index expression.
Use future and past tense to grab the previous slot in an item change event, see example.
Since 2.2-dev36 Return Type
Slot
[the] [([currently] selected|current)] hotbar slot[s] [of %players%]%players%'[s] [([currently] selected|current)] hotbar slot[s]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 playerExpression Hover List
Section titled “ Expression Hover 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.
Since 2.3 Return Type
Text
Applicable EventsOn Server List Ping
[the] [custom] [player|server] (hover|sample) ([message] list|message)[the] [custom] player [hover|sample] liston 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 listExpression Humidity
Section titled “ Expression Humidity”Humidity of given blocks.
Since 2.2-dev35 Return Type
Number
[the] humidit(y|ies) of %blocks%%blocks%'[s] humidit(y|ies)set {_humidity} to event-block's humidityEffect Ignite/Extinguish
Section titled “ Effect Ignite/Extinguish”Lights entities on fire or extinguishes them.
Since 1.4
(ignite|set fire to) %entities% [for %time span%](set|light) %entities% on fire [for %time span%]extinguish %entities%ignite the playerextinguish the playerCondition Ignition Process
Section titled “ Condition Ignition Process”Checks if a creeper is going to explode.
Since 2.5
[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) processcreeper[s] %living entities% ((is|are)|(isn't|is not|aren't|are not)) ignitedif the last spawned creeper is going to explode: loop all players in radius 3 of the last spawned creeper send "RUN!!!" to the loop-playerCondition In The Past/Future
Section titled “ Condition In The Past/Future”Checks whether a date is in the past or future.
Note that using the 'now' expression will not be in the past or future when used directly in the condition.
Since 2.10
%dates% (is|are)[(n't| not)] in the (past|future)%dates% ha(s|ve)[(n't| not)] passedset {_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 falseExpression Indices of List
Section titled “ Expression Indices of List”Returns all the indices of a list variable, optionally sorted by their values.
To sort the indices, all objects in the list must be comparable;
Otherwise, this expression will just return the unsorted indices.
Since 2.4 (indices), 2.6.1 (sorting) Return Type
Text
[(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) orderset {l::*} to "some", "cool" and "values"broadcast "%indices of {l::*}%" # result is 1, 2 and 3", "set {_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, firstExpression Indices of Value
Section titled “ Expression Indices of Value”Get the first, last or all positions of a character (or text) in another text using 'positions of %texts% in %text%'. Nothing is returned when the value does not occur in the text. Positions range from 1 to the length of the text (inclusive).
Using 'indices/positions of %objects% in %objects%', you can get the indices or positions of a list where the value at that index is the provided value. Indices are only supported for keyed expressions (e.g. variable lists) and will return the string indices of the given value. Positions can be used with any list and will return the numerical position of the value in the list, counting up from 1. Additionally, nothing is returned if the value is not found in the list.
Whether string comparison is case-sensitive or not can be configured in Skript's config file.
Since 2.1, 2.12 (indices, positions of list) Return Type
Object
[the] [first|last|all] (position[s]|indices|index[es]) of [[the] value] %texts% in %text%[the] [first|last|all] position[s] of [[the] value] %objects% in %~objects%[the] [first|last|all] (indices|index[es]) of [[the] value] %objects% in %~objects%set {_first} to the first position of "@" in the text argumentif {_s} contains "abc": set {_s} to the first (position of "abc" in {_s} + 3) characters of {_s} # removes everything after the first "abc" from {_s}set {_list::*} to 1, 2, 3, 1, 2, 3set {_indices::*} to indices of the value 1 in {_list::*}# {_indices::*} is now "1" and "4"
set {_indices::*} to all indices of the value 2 in {_list::*}# {_indices::*} is now "2" and "5"
set {_positions::*} to all positions of the value 3 in {_list::*}# {_positions::*} is now 3 and 6set {_otherlist::bar} to 100set {_otherlist::hello} to "hi"set {_otherlist::burb} to 100set {_otherlist::tud} to "hi"set {_otherlist::foo} to 100
set {_indices::*} to the first index of the value 100 in {_otherlist::*}# {_indices::*} is now "bar"
set {_indices::*} to the last index of the value 100 in {_otherlist::*}# {_indices::*} is now "foo"
set {_positions::*} to all positions of the value 100 in {_otherlist::*}# {_positions::*} is now 1, 3 and 5
set {_positions::*} to all positions of the value "hi" in {_otherlist::*}# {_positions::*} is now 2 and 4Expression Infinity
Section titled “ Expression Infinity”A number representing positive infinity.
Since 2.2-dev32d Return Type
Number
positive (infinity|∞) [value]∞ [value]infinity valuevalue of [positive] (infinity|∞)if {_number} is infinity:Expression Initiator Inventory
Section titled “ Expression Initiator Inventory”Returns the initiator inventory in an on inventory item move event.
Since 2.8.0 Return Type
Inventory
Applicable EventsOn Inventory Item Move
[the] [event-]initiator[( |-)inventory]on inventory item move: holder of event-initiator-inventory is a chest broadcast "Item transport happening at %location at holder of event-initiator-inventory%!"Expression Input
Section titled “ Expression Input”Represents the input in a filter expression or sort effect.
For example, if you ran 'broadcast "something" and "something else" where [input is "something"]
the condition would be checked twice, using "something" and "something else" as the inputs.
The 'input index' pattern can be used when acting on a variable to access the index of the input.
Since 2.2-dev36, 2.9.0 (input index) Return Type
Object
input%*type% inputinput indexsend "congrats on being staff!" to all players where [input has permission "staff"]sort {_list::*} based on length of input indexType Input Key
Section titled “ Type Input Key”Represents a movement input key that is pressed by a player.
Since 2.10
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 keyEffect Insert Entity Storage
Section titled “ Effect Insert Entity Storage”Add an entity into the entity storage of a block (e.g. beehive).
The entity must be of the right type for the block (e.g. bee for beehive).
Due to unstable behavior on older versions, adding entities to an entity storage requires Minecraft version 1.21+.
Since 2.11
(add|insert) %living entities% [in[ ]]to [the] (stored entities|entity storage) of %block%add last spawned bee into the entity storage of {_beehive}Expression Interaction Height/Width
Section titled “ Expression Interaction Height/Width”Returns the height or width of an interaction entity's hitbox. Both default to 1. The width of the hitbox determines the x/z widths
Since 2.14 Return Type
Number
[the] interaction (height|width)[s] [of %entities%]%entities%'[s] interaction (height|width)[s]set interaction height of last spawned interaction to 5.3set interaction width of last spawned interaction to 2Type Inventory
Section titled “ Type Inventory”An inventory of a player or block. Inventories have many effects and conditions regarding the items contained.
An inventory has a fixed amount of slots which represent a specific place in the inventory, e.g. the helmet slot for players (Please note that slot support is still very limited but will be improved eventually).
Since 1.0
Expression Inventory
Section titled “ Expression Inventory”The inventory of a block or player. You can usually omit this expression and can directly add or remove items to/from blocks or players.
Since 1.0 Return Type
Object
[the] inventor(y|ies) of %inventoryholders/item types%%inventoryholders/item types%'[s] inventor(y|ies)add a plank to the player's inventoryclear the player's inventoryremove 5 wool from the inventory of the clicked blockType Inventory Action
Section titled “ Type Inventory Action”What player just did in inventory event. Note that when in creative game mode, most actions do not work correctly.
Since 2.2-dev16
drop stack from slot, swap items with hotbar, pickup all into bundle, place items from bundle, swap cursor stack, pickup single item, pickup some, drop all from cursor, move to other inventory, drop cursor stack, pickup all items into bundle, pickup from bundle, pickup all, place some into bundle, swap with hotbar, nothing, drop all from slot, swap cursor, drop cursor, place from bundle, pickup all items, drop slot item, place all, drop cursor item, drop slot stack, drop single item from slot, swap with cursor, place some, pickup one item, drop single item from cursor, pickup some items into bundle, collect items to cursor, unknown, clone stack, drop stack from cursor, drop one item from slot, pickup some into bundle, drop one item from cursor, unsupported, do nothing, place some items into bundle, drop one from cursor, pickup half, drop items from slot, swap stack with cursor, place all items, place all items into bundle, collect to cursor, pickup some items, drop slot, drop items from cursor, hotbar move and readd, shift move, custom, place all into bundle, pickup single, pickup items from bundle, place one item, hotbar swap items, drop one from slot, place some items, place one, pickup half stack, instant move, hotbar swapExpression Inventory Action
Section titled “ Expression Inventory Action”The inventory action of an inventory event. Please click on the link for more information.
Since 2.2-dev16 Return Type
Inventory Action
[the] inventory actioninventory action is pickup allExpression Inventory Close Reason
Section titled “ Expression Inventory Close Reason”The inventory close reason of an inventory close event.
Since 2.8.0 Return Type
Inventory Close Reasons
Applicable EventsOn Inventory Close
[the] inventory clos(e|ing) (reason|cause)on inventory close: inventory close reason is teleport send "Your inventory closed due to teleporting!" to playerType Inventory Close Reasons
Section titled “ Type Inventory Close Reasons”The inventory close reason in an inventory close event.
Since 2.8.0
disconnect, death, teleport, cannot use, new opened, unknown, can't use, unloaded, disconnected, plugin, can not use, open new, playerExpression Inventory Holder/Viewers/Rows/Slots
Section titled “ Expression Inventory Holder/Viewers/Rows/Slots”Gets the amount of rows/slots, viewers and holder of an inventory.
NOTE: 'Viewers' expression returns a list of players viewing the inventory. Note that a player is considered to be viewing their own inventory and internal crafting screen even when said inventory is not open.
Since 2.2-dev34, 2.5 (slots) Return Type
Object
(holder[s]|viewers|[amount of] rows|[amount of] slots) of %inventories%%inventories%'[s] (holder[s]|viewers|[amount of] rows|[amount of] slots)event-inventory's amount of rowsholder of player's top inventory{_inventory}'s viewersExpression Inventory Slot
Section titled “ Expression Inventory Slot”Represents a slot in an inventory. It can be used to change the item in an inventory too.
Since 2.2-dev24 Return Type
Slot
[the] slot[s] %numbers% of %inventory%%inventory%'[s] slot[s] %numbers%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 playerType Inventory Type
Section titled “ Type Inventory Type”Minecraft has several different inventory types with their own use cases.
Since 2.2-dev32
barrel inventory, a loom inventory, a blast furnace inventory, workbench inventory, ender chest inventory, loom inventory, bookshelf inventory, a workbench inventory, hopper inventory, decorated pot inventory, a merchant inventory, a hopper inventory, an ender chest inventory, new smithing table, a jukebox, beacon inventory, shulker box inventory, a barrel inventory, a shulker box inventory, lectern inventory, chest inventory, a villager inventory, a smoker inventory, a brewing stand inventory, a smithing inventory, chiseled bookshelf inventory, grindstone inventory, a crafter inventory, a crafting table inventory, a player inventory, furnace inventory, a creative inventory, blast furnace inventory, upgrade gear, a composter inventory, an enchanting table inventory, jukebox, shelf inventory, a dropper inventory, a cartography table inventory, a upgrade gear, smoker inventory, composter inventory, a chest inventory, upgrade gear table, a upgrade gear table, dispenser inventory, player inventory, stonecutter inventory, a stonecutter inventory, a lectern inventory, merchant inventory, cartography table inventory, a new smithing table, a chiseled bookshelf inventory, a furnace inventory, anvil inventory, a shelf inventory, a bookshelf inventory, a dispenser inventory, a grindstone inventory, a decorated pot inventory, smithing inventory, dropper inventory, brewing stand inventory, villager inventory, enchanting table inventory, a beacon inventory, crafter inventory, creative inventory, crafting table inventory, an anvil inventoryExpression Inverse Boolean
Section titled “ Expression Inverse Boolean”An expression to obtain the inverse value of a boolean
Since 2.12 Return Type
Boolean
[the] (inverse|opposite)[s] of %booleans (yes/no)%set {_gravity} to inverse of player's flight modeExpression IP
Section titled “ Expression IP”The IP address of a player, or the connected player in a connect event, or the pinger in a server list ping event.
Since 1.4, 2.2-dev26 (when used in connect event), 2.3 (when used in server list ping event) Return Type
Text
IP[s][( |-)address[es]] of %players%%players%'[s] IP[s][( |-)address[es]]IP[( |-)address]ban the IP address of the player")broadcast "Banned the IP %IP of player%"on connect: log "[%now%] %player% (%ip%) is connected to the server."on server list ping: send "%IP-address%" to the consoleCondition Is a Skript command
Section titled “ Condition Is a Skript command”Checks whether a command/string is a custom Skript command.
Since 2.6
%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)on command: command is a skript commandCondition Is Adult
Section titled “ Condition Is Adult”Checks whether or not a living entity is an adult.
Since 2.10
%living entities% (is|are) [an] adult%living entities% (isn't|is not|aren't|are not) [an] adulton drink: event-entity is not an adult kill event-entityCondition Is Alive
Section titled “ Condition Is Alive”Checks whether an entity is alive. Works for non-living entities too.
Since 2.0, 2.4-alpha4 (non-living entity support)
%entities% (is|are) (alive|dead)%entities% (isn't|is not|aren't|are not) (alive|dead)if {villager-buddy::%player's uuid%} is not dead:on shoot: while the projectile is alive:Condition Is Baby
Section titled “ Condition Is Baby”Checks whether or not a living entity is a baby.
Since 2.10
%living entities% (is|are) a (child|baby)%living entities% (isn't|is not|aren't|are not) a (child|baby)on drink: event-entity is a baby kill event-entityCondition Is Banned
Section titled “ Condition Is Banned”Checks whether a player or IP is banned.
Since 1.4
%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[(-| )]bannedplayer is bannedvictim is not IP-banned"127.0.0.1" is bannedCondition Is Bed/Anchor Spawn
Section titled “ Condition Is Bed/Anchor Spawn”Checks what the respawn location of a player in the respawn event is.
Since 2.7 Applicable Events
On Respawn
[the] respawn location (was|is)[(n'| no)t] [a] (bed|respawn anchor)on respawn: the respawn location is a bed broadcast "%player% is respawning in their bed! So cozy!"%item types% (is|are) ([a] block|blocks)%item types% (isn't|is not|aren't|are not) ([a] block|blocks)player's held item is a block{list::*} are blocksCondition Is Block Redstone Powered
Section titled “ Condition Is Block Redstone Powered”Checks if a block is indirectly or directly powered by redstone
Since 2.5
%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 poweredif 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."Condition Is Blocking
Section titled “ Condition Is Blocking”Checks whether a player is blocking with their shield.
Since unknown (before 2.1)
%players% (is|are) (blocking|defending) [with [a] shield]%players% (isn't|is not|aren't|are not) (blocking|defending) [with [a] shield]on damage of player: victim is blocking damage attacker by 0.5 heartsCondition Is Burning
Section titled “ Condition Is Burning”Checks whether an entity is on fire, e.g. a zombie due to being in sunlight, or any entity after falling into lava.
Since 1.4.4
%entities% (is|are) (burning|ignited|on fire)%entities% (isn't|is not|aren't|are not) (burning|ignited|on fire)# increased attack against burning targetsvictim is burning: increase damage by 2Condition Is Charged
Section titled “ Condition Is Charged”Checks if a creeper, wither, or wither skull is charged (powered).
Since 2.5, 2.10 (withers, wither skulls)
%entities% (is|are) (charged|powered)%entities% (isn't|is not|aren't|are not) (charged|powered)if the last spawned creeper is charged: broadcast "A charged creeper is at %location of last spawned creeper%"Condition Is Charging Fireball
Section titled “ Condition Is Charging Fireball”Check whether a ghast is charging a fireball.
Since 2.11
%living entities% (is|are) charging [a] fireball%living entities% (isn't|is not|aren't|are not) charging [a] fireballif last spawned ghast is charging fireball: kill last spawned ghastCondition Is Climbing
Section titled “ Condition Is Climbing”Whether a living entity is climbing, such as a spider up a wall or a player on a ladder.
Since 2.8.0
%living entities% (is|are) climbing%living entities% (isn't|is not|aren't|are not) climbingspawn a spider at location of spawnwait a secondif the last spawned spider is climbing: message "The spider is now climbing!"Condition Is Conditional
Section titled “ Condition Is Conditional”Checks whether a command block is conditional or not.
Since 2.10
%blocks% (is|are) [un]conditional%blocks% (isn't|is not|aren't|are not) [un]conditionalif {_block} is conditional: make {_block} unconditionalCondition Is Custom Name Visible
Section titled “ Condition Is Custom Name Visible”Checks if an entity's custom name is visible.
Since 2.10
%entities%'[s] custom name[s] (is|are) visible%entities%'[s] custom name[s] (isn't|is not|are not|aren't) visiblecustom name of %entities% (is|are) visiblecustom name of %entities% (isn't|is not|are not|aren't) visiblesend true if target's custom name is visibleCondition Is Dancing
Section titled “ Condition Is Dancing”Checks to see if an entity is dancing, such as allays, parrots, or piglins.
Since 2.11
%living entities% (is|are) dancing%living entities% (isn't|is not|aren't|are not) dancingif last spawned allay is dancing: broadcast "Dance Party!"Condition Is Eating
Section titled “ Condition Is Eating”Whether a panda or horse type (horse, camel, donkey, llama, mule) is eating.
Since 2.11
%living entities% (is|are) eating%living entities% (isn't|is not|aren't|are not) eatingif last spawned panda is eating: force last spawned panda to stop eatingCondition Is Edible
Section titled “ Condition Is Edible”Checks whether an item is edible.
Since 2.2-dev36
%item types% (is|are) edible%item types% (isn't|is not|aren't|are not) ediblecooked beef is edibleplayer's tool is edibleCondition Is Empty
Section titled “ Condition Is Empty”Checks whether something is empty.
Since unknown (before 2.1)
%objects% (is|are) empty%objects% (isn't|is not|aren't|are not) emptyplayer's inventory is emptyCondition Is Enchanted
Section titled “ Condition Is Enchanted”Checks whether an item is enchanted. Enchants must match the exact level by default, unless 'or better' or 'or worse' are used.
Since 1.4.6, 2.12 ('or better')
%item types% (is|are) enchanted [with %enchantment types% [or ((better|greater|higher|above)|(worse|lesser|lower|below))]]%item types% (isn't|is not|aren't|are not) enchanted [with %enchantment types% [or ((better|greater|higher|above)|(worse|lesser|lower|below))]]tool of the player is enchanted with efficiency 2if player's helmet or player's boots are enchanted with protection 3 or better:if player's chestplate is enchanted with protectionCondition Is Evenly Divisible By
Section titled “ Condition Is Evenly Divisible By”Checks if a number is evenly divisible by another number. An optional tolerance can be provided to counteract floating point error. The default tolerance is 1e-10. Any input smaller than the tolerance is considered to be 0. This means divisors that are too small will always return false, and dividends that are too small will always return true.
Since 2.10, 2.12 (tolerance)
%numbers% (is|are) evenly divisible by %number% [with [a] tolerance [of] %number%]%numbers% (isn't|is not|aren't|are not) evenly divisible by %number% [with [a] tolerance [of] %number%]%numbers% can be evenly divided by %number% [with [a] tolerance [of] %number%]%numbers% (can't|can[ ]not) be evenly divided by %number% [with [a] tolerance [of] %number%]if 5 is evenly divisible by 5:if 11 cannot be evenly divided by 10:if 0.3 can be evenly divided by 0.1 with a tolerance of 0.0000001:Condition Is Fire Resistant
Section titled “ Condition Is Fire Resistant”Checks whether an item is fire resistant.
Since 2.9.0
%item types% (is|are) (fire resistant|resistant to fire)%item types% (isn't|is not|aren't|are not) (fire resistant|resistant to fire)if player's tool is fire resistant:if {_items::*} aren't resistant to fire:Condition Is Fish Hook in Open Water
Section titled “ Condition Is Fish Hook in Open Water”Checks whether the fish hook is in open water.
Open water is defined by a 5x4x5 area of water, air and lily pads. If in open water, treasure items may be caught.
Since 2.10 Applicable Events
On Fishing
%entities% (is|are) in open water[s]%entities% (isn't|is not|aren't|are not) in open water[s]on fish catch: if fish hook is in open water: send "You will catch a shark soon!"Condition Is Flammable
Section titled “ Condition Is Flammable”Checks whether an item is flammable.
Since 2.2-dev36
%item types% (is|are) flammable%item types% (isn't|is not|aren't|are not) flammablesend whether the tag contents of minecraft tag "planks" are flammableplayer's tool is flammableCondition Is Flying
Section titled “ Condition Is Flying”Checks whether a player is flying.
Since 1.4.4
%players% (is|are) flying%players% (isn't|is not|aren't|are not) flyingplayer is not flyingCondition Is From A Mob Spawner
Section titled “ Condition Is From A Mob Spawner”Checks if an entity was spawned from a mob spawner.
Since 2.10
%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] spawnersend whether target is from a mob spawnerCondition Is Frozen
Section titled “ Condition Is Frozen”Checks whether an entity is frozen.
Since 2.7
%entities% (is|are) frozen%entities% (isn't|is not|aren't|are not) frozenif player is frozen: kill playerCondition Is Fuel
Section titled “ Condition Is Fuel”Checks whether an item can be used as fuel in a furnace.
Since 2.5.1
%item types% (is|are) [furnace] fuel%item types% (isn't|is not|aren't|are not) [furnace] fuelon right click on furnace: if player's tool is not fuel: send "Please hold a valid fuel item in your hand" cancel eventCondition Is Gliding
Section titled “ Condition Is Gliding”Checks whether a living entity is gliding.
Since 2.7
%living entities% (is|are) gliding%living entities% (isn't|is not|aren't|are not) glidingif player is glidingCondition Is Hand Raised
Section titled “ Condition Is Hand 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).
Since 2.8.0
%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) raisedoff[ |-]hand[s] of %living entities% (is|are) raisedoff[ |-]hand[s] of %living entities% (isn't|is not|aren't|are not) raisedon damage of player: if victim's main hand is raised: drop player's tool at player set player's tool to airCondition Is Holding
Section titled “ Condition Is Holding”Checks whether a player is holding a specific item. Cannot be used with endermen, use 'entity is [not] an enderman holding <item type>' instead.
Since 1.0
[%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[(-| )]handplayer is holding a stickvictim isn't holding a diamond sword of sharpnessCondition Is In Love
Section titled “ Condition Is In Love”Checks whether or not a living entity is in love.
Since 2.10
%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]on spawn of living entity: if entity is in love: broadcast "That was quick!"Condition Is Incendiary
Section titled “ Condition Is Incendiary”Checks if an entity will create fire when it explodes. This condition is also usable in an explosion prime event.
Since 2.5
%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)on explosion prime: if the explosion is fiery: broadcast "A fiery explosive has been ignited!"Condition Is Infinite
Section titled “ Condition Is Infinite”Checks whether potion effects or timespans are infinite.
Since 2.7
%potion effects/time spans% (is|are) infinite%potion effects/time spans% (isn't|is not|aren't|are not) infiniteall of the active potion effects of the player are infiniteif timespan argument is infinite:Condition Is Interactable
Section titled “ Condition Is Interactable”Checks wether or not a block is interactable.
Since 2.5.2
%item types% (is|are) interactable%item types% (isn't|is not|aren't|are not) interactableon block break: if event-block is interactable: cancel event send "You cannot break interactable blocks!"Condition Is Invisible
Section titled “ Condition Is Invisible”Checks whether a living entity is invisible.
Since 2.7
%living entities% (is|are) (invisible|visible)%living entities% (isn't|is not|aren't|are not) (invisible|visible)target entity is invisibleCondition Is Invulnerable
Section titled “ Condition Is Invulnerable”Checks whether an entity or a gamemode is invulnerable. For gamemodes, Paper and Minecraft 1.20.6 are required
Since 2.5, 2.10 (gamemode)
%entities/gamemodes% (is|are) (invulnerable|invincible)%entities/gamemodes% (isn't|is not|aren't|are not) (invulnerable|invincible)target entity is invulnerableloop all gamemodes: if loop-value is not invulnerable: broadcast "the gamemode %loop-value% is vulnerable!"Condition Is Jumping
Section titled “ Condition Is Jumping”Checks whether a living entity is jumping. This condition does not work on players.
Since 2.8.0
%living entities% (is|are) jumping%living entities% (isn't|is not|aren't|are not) jumpingon spawn of zombie: while event-entity is not jumping: wait 5 ticks push event-entity upwardsCondition Is Leashed
Section titled “ Condition Is Leashed”Checks to see if an entity is currently leashed.
Since 2.5
%living entities% (is|are) leashed%living entities% (isn't|is not|aren't|are not) leashedtarget entity is leashedCondition Is Loaded
Section titled “ Condition Is Loaded”Checks whether a world, chunk or script is loaded.
'chunk at 1, 1' uses chunk coordinates, which are location coords divided by 16.
Since 2.3, 2.5 (revamp with chunk at location/coords), 2.10 (Scripts)
chunk[s] %directions% [%locations%] (is|are)[((n't| not))] loadedchunk [at] %number%, %number% (in|of) [world] %world% is[((n't| not))] loaded%scripts/worlds% (is|are)[(n't| not)] loadedscript[s] %scripts% (is|are)[(n't| not)] loadedworld[s] %worlds% (is|are)[(n't| not)] loadedif 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:Condition Is Lootable
Section titled “ Condition Is Lootable”Checks whether an entity or block is lootable. Lootables are entities or blocks that can have a loot table.
Since 2.10
%blocks/entities% (is|are) lootable%blocks/entities% (isn't|is not|aren't|are not) lootablespawn 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 white woolif block at event-location is lootable: # uh oh, nothing will happen because a wool is not a lootable block.Condition Is Normalized
Section titled “ Condition Is Normalized”Checks whether a vector is normalized i.e. length of 1
Since 2.5.1
%vectors% (is|are) normalized%vectors% (isn't|is not|aren't|are not) normalizedvector of player's location is normalizedCondition Is Occluding
Section titled “ Condition Is Occluding”Checks whether an item is a block and completely blocks vision.
Since 2.5.1
%item types% (is|are) occluding%item types% (isn't|is not|aren't|are not) occludingplayer's tool is occludingCondition Is of Type
Section titled “ Condition Is of Type”Checks whether an item or an entity is of the given type. This is mostly useful for variables, as you can use the general 'is' condition otherwise (e.g. 'victim is a creeper').
Since 1.4
%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%tool is of type {selected type}victim is of type {villager type}Condition Is on Ground
Section titled “ Condition Is on Ground”Checks whether an entity is on ground.
Since 2.2-dev26
%entities% (is|are) on [the] ground%entities% (isn't|is not|aren't|are not) on [the] groundplayer is not on groundCondition Is Online
Section titled “ Condition Is Online”Checks whether a player is online. The 'connected' pattern will return false once this player leaves the server, even if they rejoin. Be aware that using the 'connected' pattern with a variable will not have this special behavior. Use the direct event-player or other non-variable expression for best results.
Since 1.4
%offline players% (is|are) (online|offline|connected)%offline players% (isn't|is not|aren't|are not) (online|offline|connected)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 tickCondition Is Operator
Section titled “ Condition Is Operator”Checks whether a player is a server operator.
Since 2.7
%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]player is an operatorCondition Is Passable
Section titled “ Condition Is 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.
Since 2.5.1
%blocks% (is|are) passable%blocks% (isn't|is not|aren't|are not) passableif player's targeted block is passableCondition Is Pathfinding
Section titled “ Condition Is Pathfinding”Checks whether living entities are pathfinding.
Can only be a living entity that is a Mob.
Since 2.9.0
%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%]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}Condition Is Persistent
Section titled “ Condition Is Persistent”Whether entities, players, or leaves are persistent.
Persistence of entities is whether they are retained through server restarts.
Persistence of leaves is whether they should decay when not connected to a log block within 6 meters.
Persistence of players is if the player's playerdata should be saved when they leave the server. Players' persistence is reset back to 'true' when they join the server.
Passengers inherit the persistence of their vehicle, meaning a persistent zombie put on a non-persistent chicken will become non-persistent. This does not apply to players.
By default, all entities are persistent.
Since 2.11
%entities/blocks% (is|are) persistent%entities/blocks% (isn't|is not|aren't|are not) persistenton spawn: if event-entity is persistent: make event-entity not persistentCondition Is Playing Dead
Section titled “ Condition Is Playing Dead”Checks to see if an axolotl is playing dead.
Since 2.11
%living entities% (is|are) playing dead%living entities% (isn't|is not|aren't|are not) playing deadif last spawned axolotl is playing dead: make last spawned axolotl stop playing deadCondition Is Plugin Enabled
Section titled “ Condition Is Plugin Enabled”Check if a plugin is enabled/disabled on the server.
Plugin names can be found in the plugin's 'plugin.yml' file or by using the '/plugins' command, they are NOT the name of the plugin's jar file.
When checking if a plugin is not enabled, this will return true if the plugin is either disabled or not on the server.
When checking if a plugin is disabled, this will return true if the plugin is on the server and is disabled.
Since 2.6
plugin[s] %texts% (is|are) enabledplugin[s] %texts% (is|are)(n't| not) enabledplugin[s] %texts% (is|are) disabledif plugin "Vault" is enabled:if plugin "WorldGuard" is not enabled:if plugins "Essentials" and "Vault" are enabled:if plugin "MyBrokenPlugin" is disabled:Condition Is Poisoned
Section titled “ Condition Is Poisoned”Checks whether an entity is poisoned.
Since 1.4.4
%living entities% (is|are) poisoned%living entities% (isn't|is not|aren't|are not) poisonedif the player is poisoned: cure the player from poison message "You have been cured!" to the playerCondition Is Preferred Tool
Section titled “ Condition Is Preferred Tool”Checks whether an item is the preferred tool for a block. A preferred tool is one that will drop the block's item when used. For example, a wooden pickaxe is a preferred tool for grass and stone blocks, but not for iron ore.
Since 2.7
%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%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 eventCondition Is Pressing Key
Section titled “ Condition Is Pressing Key”Checks if a player is pressing a certain input key.
Since 2.10
%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%on player input: if player is pressing forward movement key: send "You are moving forward!"Condition Is Responsive
Section titled “ Condition Is Responsive”Checks whether an interaction is responsive or not. Responsiveness determines whether clicking the entity will cause the clicker's arm to swing.
Since 2.14
%entities% (is|are) (responsive|unresponsive)%entities% (isn't|is not|aren't|are not) (responsive|unresponsive)if last spawned interaction is responsive:if last spawned interaction is unresponsive:Condition Is Riding
Section titled “ Condition Is Riding”Tests whether an entity is riding any entity, a specific entity type, or a specific entity.
Since 2.0, 2.11 (entities)
%entities% (is|are) riding [%entity types/entities%]%entities% (isn't|is not|aren't|are not) riding [%entity types/entities%]if player is riding:if player is riding an entity:if player is riding a saddled pig:if player is riding last spawned horse:Condition Is Riptiding
Section titled “ Condition Is Riptiding”Checks to see if an entity is currently using the Riptide enchantment.
Since 2.5
%living entities% (is|are) riptiding%living entities% (isn't|is not|aren't|are not) riptidingtarget entity is riptidingCondition Is Saddled
Section titled “ Condition Is 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.
Since 2.10
%living entities% (is|are) [properly] saddled%living entities% (isn't|is not|aren't|are not) [properly] saddledsend whether {_horse} is saddledCondition Is Screaming
Section titled “ Condition Is Screaming”Check whether a goat or enderman is screaming.
Since 2.11
%living entities% (is|are) screaming%living entities% (isn't|is not|aren't|are not) screaming if last spawned goat is not screaming: make last spawned goat scream if {_enderman} is screaming: force {_enderman} to stop screamingCondition Is Script Loaded
Section titled “ Condition Is Script Loaded”Check if the current script, or another script, is currently loaded.
Since 2.2-dev31
script[s] [%texts%] (is|are) loadedscript[s] [%texts%] (isn't|is not|aren't|are not) loadedscript is loadedscript "example.sk" is loadedCondition Is Silent
Section titled “ Condition Is Silent”Checks whether an entity is silent i.e. its sounds are disabled.
Since 2.5
%entities% (is|are) silent%entities% (isn't|is not|aren't|are not) silenttarget entity is silentCondition Is Sleeping
Section titled “ Condition Is Sleeping”Checks whether an entity is sleeping.
Since 1.4.4, 2.11 (living entities)
%living entities% (is|are) sleeping%living entities% (isn't|is not|aren't|are not) sleepingif player is sleeping: make player wake up without spawn location updateif last spawned fox is sleeping: make last spawned fox stop sleepingCondition Is Slime Chunk
Section titled “ Condition Is Slime Chunk”Tests whether a chunk is a so-called slime chunk.
Slimes can generally spawn in the swamp biome and in slime chunks.
For more info, see the Minecraft wiki.
Since 2.3
%chunk% (is|are) ([a] slime chunk|slime chunks|slimey)%chunk% (isn't|is not|aren't|are not) ([a] slime chunk|slime chunks|slimey)command /slimey: trigger: if chunk at player is a slime chunk: send "Yeah, it is!" else: send "Nope, it isn't"Condition Is Sneaking
Section titled “ Condition Is Sneaking”Checks whether a player is sneaking.
Since 1.4.4
%players% (is|are) sneaking%players% (isn't|is not|aren't|are not) sneaking# 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 eventCondition Is Solid
Section titled “ Condition Is Solid”Checks whether an item is solid.
Since 2.2-dev36
%item types% (is|are) solid%item types% (isn't|is not|aren't|are not) solidgrass block is solidplayer's tool isn't solidCondition Is Spawnable
Section titled “ Condition Is Spawnable”Whether an entity type can be spawned in a world. Any general types such as 'monster, mob, entity, living entity' etc. will never be spawnable.
Since 2.13
%entity types% is spawnable [in [the [world]] %world%]%entity types% can be spawned [in [the [world]] %world%]%entity types% (isn't|is not) spawnable [in [the [world]] %world%]%entity types% (can't|can not) be spawned [in [the [world]] %world%]if a pig is spawnable in world "world": # trueif a monster can be spawned in {_world}: # falseCondition Is Sprinting
Section titled “ Condition Is Sprinting”Checks whether a player is sprinting.
Since 1.4.4
%players% (is|are) sprinting%players% (isn't|is not|aren't|are not) sprintingplayer is not sprintingCondition Is Stackable
Section titled “ Condition Is Stackable”Checks whether an item is stackable.
Since 2.7
%item stacks% (is|are) stackable%item stacks% (isn't|is not|aren't|are not) stackablediamond axe is stackablebirch wood is stackabletorch is stackableCondition Is Swimming
Section titled “ Condition Is Swimming”Checks whether a living entity is swimming.
Since 2.3
%living entities% (is|are) swimming%living entities% (isn't|is not|aren't|are not) swimmingplayer is swimmingCondition Is Tagged
Section titled “ Condition Is Tagged”Checks whether an item, block, entity, or entitydata is tagged with the given tag.
Since 2.10
%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%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"Condition Is Tameable
Section titled “ Condition Is Tameable”Check if an entity is tameable.
Since 2.5
%living entities% (is|are) tameable%living entities% (isn't|is not|aren't|are not) tameableon damage: if victim is tameable: cancel eventCondition Is Tamed
Section titled “ Condition Is Tamed”Check if a tameable entity is tamed (horse, parrot, cat, etc.).
Since 2.10
%entities% (is|are) (tamed|domesticated)%entities% (isn't|is not|aren't|are not) (tamed|domesticated)send true if {_horse} is tamedtame {_horse} if {_horse} is untamedCondition Is Ticking
Section titled “ Condition Is Ticking”Checks if an entity is ticking.
Since 2.10
%entities% (is|are) ticking%entities% (isn't|is not|aren't|are not) tickingsend true if target is tickingCondition Is Transparent
Section titled “ Condition Is 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.
Since 2.2-dev36
%item types% (is|are) transparent%item types% (isn't|is not|aren't|are not) transparentplayer's tool is transparent.Condition Is Unbreakable
Section titled “ Condition Is Unbreakable”Checks whether an item is unbreakable.
Since 2.5.1, 2.9.0 (breakable)
%item types% (is|are) [un]breakable%item types% (isn't|is not|aren't|are not) [un]breakableif event-item is unbreakable: send "This item is unbreakable!" to playerif tool of {_p} is breakable: send "Your tool is breakable!" to {_p}Condition Is Using Experimental Feature
Section titled “ Condition Is Using Experimental Feature”Checks whether a script is using an experimental feature by name.
Since 2.9.0
%script% is using %texts%%scripts% are using %texts%%script% is(n't| not) using %texts%%scripts% are(n't| not) using %texts%the script is using "example feature"on load: if the script is using "example feature": broadcast "You're using an experimental feature!"Condition Is Valid
Section titled “ Condition Is 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.
Since 2.7, 2.10 (Scripts & Configs)
%entities/scripts% (is|are) valid%entities/scripts% (isn't|is not|aren't|are not) validif event-entity is validCondition Is Wearing
Section titled “ Condition Is Wearing”Checks whether an entity is wearing some items (usually armor).
Since 1.0
%living entities% (is|are) wearing %item types%%living entities% (isn't|is not|aren't|are not) wearing %item types%player is wearing an iron chestplate and iron leggingstarget is wearing wolf armorCondition Is Whitelisted
Section titled “ Condition Is Whitelisted”Whether or not the server or a player is whitelisted, or the server is whitelist enforced.
Since 2.5.2, 2.9.0 (enforce, offline players)
[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)) enforcedif the player is whitelisted:if the server is whitelisted:if the server whitelist is enforced:Condition Is Within
Section titled “ Condition Is Within”Whether a location is within something else. The "something" can be a block, an entity, a chunk, a world, or a cuboid formed by two other locations.
Note that using the is between condition will refer to a straight line between locations, while this condition will refer to the cuboid between locations.
Since 2.7, 2.11 (world borders)
%locations% (is|are) within %location% and %location%%locations% (isn't|is not|aren't|are not) within %location% and %location%%locations% (is|are) (within|in[side [of]]) %entities/chunks/worlds/worldborders/blocks%%locations% (isn't|is not|aren't|are not) (within|in[side [of]]) %entities/chunks/worlds/worldborders/blocks%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 victimif player is in world "world1" or world "world2": kill playerif player is in world "world" and chunk at location(0, 0, 0): give player 1 diamondCondition Is Within Radius
Section titled “ Condition Is Within Radius”Checks whether a location is within a certain radius of another location.
Since 2.7
%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%on damage: if attacker's location is within 10 blocks around {_spawn}: cancel event send "You can't PVP in spawn."Function isNaN
Section titled “ Function isNaN”Returns true if the input is NaN (not a number).
Since 2.8.0 Return Type
Boolean
isNaN(n: number)isNaN(0) # falseisNaN(0/0) # trueisNaN(sqrt(-1)) # trueType Item
Section titled “ Type Item”An item, e.g. a stack of torches, a furnace, or a wooden sword of sharpness 2. Unlike item type an item can only represent exactly one item (e.g. an upside-down cobblestone stair facing west), while an item type can represent a whole range of items (e.g. any cobble stone stairs regardless of direction).
You don't usually need this type except when you want to make a command that only accepts an exact item.
Please note that currently 'material' is exactly the same as 'item', i.e. can have an amount & enchantments.
Since 1.0
<code>[<number> [of]] <alias> [of <enchantment> <level>]</code>, Where <alias> must be an alias that represents exactly one item (i.e cannot be a general alias like 'sword' or 'plant')set {_item} to type of the targeted block{_item} is a torchExpression Item
Section titled “ Expression Item”The item involved in an event, e.g. in a drop, dispense, pickup or craft event.
Since unknown (before 2.1) Return Type
Item
[the] itemon dispense: item is a clock set the time to 6:00Expression Item Amount
Section titled “ Expression Item Amount”The amount of an item stack.
Since 2.2-dev24 Return Type
Number
[the] item[[ ]stack] (amount|size|number) of %slots/item types/item stacks%%slots/item types/item stacks%'[s] item[[ ]stack] (amount|size|number)send "You have got %item amount of player's tool% %player's tool% in your hand!" to playerType Item Component
Section titled “ Type Item Component”Represents an item component for items. i.e. equippable components.
Since 2.13
Expression Item Component - Copy
Section titled “ Expression Item Component - Copy”Grab a copy of an item component of an item. Any changes made to the copy will not be present on the item.
Since 2.13 Return Type
Item Component
[the|a[n]] [item] component copy of %item components%[the] [item] component copies of %item components%set {_component} to the item component copy of (the equippable component of {_item})Expression Item Cooldown
Section titled “ Expression Item Cooldown”Gets the current cooldown of a provided item for a player. If the provided item has a cooldown group component specified the cooldown of the group will be prioritized. Otherwise the cooldown of the item material will be used.
Since 2.8.0, 2.12 (cooldown group) Return Type
Timespan
[the] [item] cooldown of %item types% for %players%%players%'[s] [item] cooldown for %item types%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 playersEffect Item Despawn
Section titled “ Effect Item Despawn”Prevent a dropped item from naturally despawning through Minecraft's timer.
Since 2.11
(prevent|disallow) %itementities% from (naturally despawning|despawning naturally)allow natural despawning of %itementities%allow %itementities% to (naturally despawn|despawn naturally)prevent all dropped items from naturally despawningallow all dropped items to naturally despawnExpression Item Display Transform
Section titled “ Expression Item Display Transform”Returns or changes the item display transform of item displays.
Since 2.10 Return Type
Item Display Transforms
[the] item [display] transform [of %displays%]%displays%'[s] item [display] transformset 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 defaultType Item Display Transforms
Section titled “ Type Item Display Transforms”Represents the transform setting of an item display.
Since 2.10
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 handedExpression Item Enchantments
Section titled “ Expression Item Enchantments”All the enchantments an item type has.
Since 2.2-dev36 Return Type
Enchantment Type
[the] enchantments of %item types%%item types%'[s] enchantmentsclear enchantments of event-itemType Item Flag
Section titled “ Type Item Flag”Represents flags that may be applied to hide certain attributes of an item.
Since 2.10
hide unbreakable, hide unbreakable status, hide destroys, hide additional tooltip, destroys hidden, hide enchants, stored enchantments hidden, hidden destroys, hidden stored enchants, dye hidden, stored enchants hidden, hidden enchants, hidden unbreakable status, hide armour trim, hidden stored enchantments, hide stored enchants, hide stored enchantments, hide attributes, hidden additional tooltip, hidden armor trim, hidden placed on, additional tooltip hidden, enchants hidden, enchantments hidden, attributes hidden, unbreakable status hidden, hidden dye color, hidden armour trim, unbreakable hidden, dye color hidden, hide enchantments, armour trim hidden, hidden unbreakable, hide dye color, hidden attributes, armor trim hidden, hide destroyable blocks, hide placed on, hidden dye, hide armor trim, hide breakable blocks, placed on hidden, hide dyeExpression Item Flags
Section titled “ Expression Item Flags”The item flags of an item. Can be modified.
Since 2.10 Return Type
Item Flag
[the] item flags of %item types%%item types%'[s] item flagsset 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}Condition Item Has Enchantment Glint Override
Section titled “ Condition Item Has Enchantment Glint Override”Checks whether an item has the enchantment glint overridden, or is forced to glint or not.
Since 2.10
%item types% (is|are) forced to [not] glint%item types% (isn't|is not|aren't|are not) forced to [not] glintif 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 playerCondition Item Has Enchantment Glint Override
Section titled “ Condition Item Has Enchantment Glint Override”Checks whether an item has the enchantment glint overridden, or is forced to glint or not.
Since 2.10
%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)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 playerExpression Item of an Entity
Section titled “ Expression Item of an Entity”An item associated with an entity. For dropped item entities, it gets the item that was dropped.
For item frames, the item inside the frame is returned.
For throwable projectiles (snowballs, enderpearls etc.) or item displays, it gets the displayed item.
Other entities do not have items associated with them.
Since 2.2-dev35, 2.2-dev36 (improved), 2.5.2 (throwable projectiles), 2.10 (item displays) Return Type
Slot
[the] item [inside] of %entities%%entities%'[s] item [inside]item of event-entityset the item inside of event-entity to a diamond sword named "Example"Effect Item Tooltips
Section titled “ Effect Item Tooltips”Show or hide the tooltip of an item.
If changing the 'entire' tooltip of an item, nothing will show up when a player hovers over it.
If changing the 'additional' tooltip, only specific parts (which change per item) will be hidden.
Since 2.9.0
(show|reveal|hide) %item types%'[s] [entire|additional] tool[ ]tip(show|reveal|hide) [the] [entire|additional] tool[ ]tip of %item types%hide the entire tooltip of player's toolhide {_item}'s additional tool tipType Item Type
Section titled “ Type Item Type”An item type is an alias that can result in different items when added to an inventory, and unlike items they are well suited for checking whether an inventory contains a certain item or whether a certain item is of a certain type.
An item type can also have one or more enchantments with or without a specific level defined, and can optionally start with 'all' or 'every' to make this item type represent all types that the alias represents, including data ranges.
Since 1.0
[<number> [of]] [all/every] <alias> [of <enchantment> [<level>] [,/and <more enchantments...>]]give 4 torches to the playeradd oak slab to the inventory of the blockplayer's tool is a diamond sword of sharpnessblock is dirt or farmlandExpression Item with Custom Model Data
Section titled “ Expression Item with Custom Model Data”Get an item with custom model data.
Since 2.5, 2.12 (boolean/string/color support) Return Type
Item Type
%item type% with [custom] model data %numbers/booleans (yes/no)/texts/colors%give player a diamond sword with custom model data 2set slot 1 of inventory of player to wooden hoe with custom model data 357give player a diamond hoe with custom model data 2, true, true, "scythe", and rgb(0,0,100)Expression Item with Enchantment Glint
Section titled “ Expression Item with Enchantment Glint”Get an item with or without enchantment glint.
Since 2.10 Return Type
Item Type
%item types% with[out] [enchant[ment]] glintset {_item with glint} to diamond with enchantment glintset {_item without glint} to diamond without enchantment glintExpression Item with Item Flags
Section titled “ Expression Item with Item Flags”Creates a new item with the specified item flags.
Since 2.10, 2.11 (all itemflags) Return Type
Item Type
%item types% with [the] item flag[s] %item flags%%item types% with [the] %item flags% item flag[s]%item types% with all [the] item flagsgive 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 flagsExpression Item with Lore
Section titled “ Expression Item with Lore”Returns the given item type with the specified lore added to it.
If multiple strings are passed, each of them will be a separate line in the lore.
Since 2.3 Return Type
Item Type
%item type% with [(a|the)] lore %texts% set {_test} to stone with lore "line 1" and "line 2" give {_test} to playerExpression Item with Tooltip
Section titled “ Expression Item with Tooltip”Get an item with or without entire/additional tooltip.
If changing the 'entire' tooltip of an item, nothing will show up when a player hovers over it.
If changing the 'additional' tooltip, only specific parts (which change per item) will be hidden.
Since 2.11 Return Type
Item Type
%item types% with[out] [entire|additional] tool[ ]tip[s]set {_item with additional tooltip} to diamond with additional tooltipset {_item without entire tooltip} to diamond without entire tooltipExpression Items
Section titled “ Expression Items”Items or blocks of a specific type, useful for looping.
Since 1.0 pre-5 Return Type
Item Type
[all [[of] the]|the] block[[ ]type]severy 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%loop tag values of tag "diamond_ores" and tag values of tag "oak_logs": block contains loop-item message "Theres at least one %loop-item% in this block"drop all blocks at the player # drops one of every block at the playerExpression Items In
Section titled “ Expression Items In”All items or specific type(s) of items in an inventory. Useful for looping or storing in a list variable.
Please note that the positions of the items in the inventory are not saved, only their order is preserved.
Since 2.0, 2.8.0 (specific types of items) Return Type
Slot
[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%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 inventoryExpression Join & Split
Section titled “ Expression Join & Split”Joins several texts with a common delimiter (e.g. ", "), or splits a text into multiple texts at a given delimiter.
Since 2.1, 2.5.2 (regex support), 2.7 (case sensitivity), 2.10 (without trailing string) Return Type
Text
(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)]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 ","Effect Keep Inventory / Experience
Section titled “ Effect Keep Inventory / Experience”Keeps the inventory or/and experiences of the dead player in a death event.
Since 2.4 Applicable Events
On Death
keep [the] (inventory|items) [(and [e]xp[erience][s] [point[s]])]keep [the] [e]xp[erience][s] [point[s]] [(and (inventory|items))]on death of a player: if the victim is an op: keep the inventory and experiencesExpression Keyed
Section titled “ Expression Keyed”This expression is used to explicitly pass the keys of an expression alongside its values.
For example, when setting a list variable or passing an expression to a function.
Since 2.12 Return Type
Object
(keyed|indexed) %~objects%set {_first::foo} to "value1"set {_first::bar} to "value2"set {_second::*} to keyed {_first::*}# {_second::foo} is "value1" and {_second::bar} is "value2"function indices(objects: objects) returns strings: return indices of {_objects::*}
on load: set {_list::foo} to "value1" set {_list::bar} to "value2" set {_list::baz} to "value3"
broadcast indices({_list::*}) # "1", "2", "3" broadcast indices(keyed {_list::*}) # "foo", "bar", "baz"function plusOne(numbers: numbers) returns numbers: loop {_numbers::*}: set {_numbers::%loop-index%} to loop-value + 1 return {_numbers::*}
on load: set {_numbers::foo} to 1 set {_numbers::bar} to 2 set {_numbers::baz} to 3
set {_result::*} to keyed plusOne(keyed {_numbers::*}) # {_result::foo} is 2, {_result::bar} is 3, {_result::baz} is 4kick %players% [(by reason of|because [of]|on account of|due to) %text%]on place of TNT, lava, or obsidian: kick the player due to "You may not place %block%!" cancel the eventEffect Kill
Section titled “ Effect Kill”Kills an entity.
Since 1.0, 2.10 (ignoring totem of undying)
kill %entities%kill the playerkill all creepers in the player's worldkill all endermen, witches and batsEffect Knockback
Section titled “ Effect Knockback”Apply the same velocity as a knockback to living entities in a direction. Mechanics such as knockback resistance will be factored in.
Since 2.7
(apply knockback to|knock[back]) %living entities% [%direction%] [with (strength|force) %number%]knockback player northknock victim (vector from attacker to victim) with strength 10Expression Language
Section titled “ Expression Language”Currently selected game language of a player. The value of the language is not defined properly.
The vanilla Minecraft client will use lowercase language / country pairs separated by an underscore, but custom resource packs may use any format they wish.
Since 2.3 Return Type
Text
[the] [([currently] selected|current)] [game] (language|locale) [setting] of %players%%players%'[s] [([currently] selected|current)] [game] (language|locale) [setting]message player's current languageExpression Last Attacker
Section titled “ Expression Last Attacker”The last block or entity that attacked an entity.
Since 2.5.1 Return Type
Entity
[the] last attacker of %entity%%entity%'[s] last attackersend "%last attacker of event-entity%"Expression Last Caught Errors
Section titled “ Expression Last Caught Errors”Gets the last caught runtime errors from a 'catch runtime errors' section.
Since 2.12 Return Type
Text
[the] last caught [run[ ]time] errorscatch runtime errors: set worldborder center of {_border} to location(0, 0, NaN value)if last caught runtime errors contains "Your location can't have a NaN value as one of its components": set worldborder center of {_border} to location(0, 0, 0)Expression Last Damage
Section titled “ Expression Last Damage”The last damage that was done to an entity. Note that changing it doesn't deal more/less damage.
Since 2.5.1 Return Type
Number
[the] last damage of %living entities%%living entities%'[s] last damageset last damage of event-entity to 2Expression Last Damage Cause
Section titled “ Expression Last Damage Cause”Cause of last damage done to an entity
Since 2.2-Fixes-V10 Return Type
Damage Cause
[the] last damage (cause|reason|type) of %living entities%%living entities%'[s] last damage (cause|reason|type)set last damage cause of event-entity to fire tickExpression Last Death Location
Section titled “ Expression Last Death Location”Gets the last death location of a player, or offline player, if available.
Can also be set, reset, and deleted if the player is online.
Since 2.10 Return Type
Location
[the] [last] death location[s] of %offline players%%offline players%'[s] [last] death location[s]set {_loc} to the last death location of playerteleport player to last death location of (random element out of all players)Expression Last Interaction Date
Section titled “ Expression Last Interaction Date”Returns the date of the last attack (left click), or interaction (right click) on an interaction entity Using 'clicked on' will return the latest attack or interaction, whichever was more recent.
Since 2.14 Return Type
Date
[the] last (date|time)[s] [that|when] %entities% (were|was) (attacked|interacted with|clicked [on])if the last time {_interaction} was clicked < 5 seconds agoExpression Last Interaction Player
Section titled “ Expression Last Interaction Player”Returns the last player to attack (left click), or interact (right click) with an interaction entity. If 'click on' or 'clicked on' are used, this will return the last player to either attack or interact with the entity whichever was most recent.
Since 2.14 Return Type
Offline Player
[the] last player[s] to (attack|interact with|click [on]) %entities%[the] last player[s] (who|that) (attacked|interacted with|clicked [on]) %entities%kill the last player that attacked the last spawned interactionfeed the last player who interacted with {_i}Expression Last Loaded Server Icon
Section titled “ Expression Last Loaded Server Icon”Returns the last loaded server icon with the load server icon effect.
Since 2.3 Return Type
Server Icon
[the] [last[ly]] loaded server iconset {server-icon} to the last loaded server iconExpression Last Resource Pack Response
Section titled “ Expression Last Resource Pack Response”Returns the last resource pack response received from a player.
Since 2.4 Return Type
Resource Pack State
[the] [last] resource pack response[s] of %players%%players%'[s] [last] resource pack response[s]if player's last resource pack response is deny or download fail:Expression Last Spawned Entity
Section titled “ Expression Last Spawned Entity”Holds the entity that was spawned most recently with the spawn effect (section), dropped with the drop effect, shot with the shoot effect or created with the lightning effect. Please note that even though you can spawn multiple mobs simultaneously (e.g. with 'spawn 5 creepers'), only the last spawned mob is saved and can be used. If you spawn an entity, shoot a projectile and drop an item you can however access all them together.
Since 1.3 (spawned entity), 2.0 (shot entity), 2.2-dev26 (dropped item), 2.7 (struck lightning, firework) Return Type
Entity
[the] [last[ly]] (spawned|shot) %*entity type%[the] [last[ly]] dropped (item)[the] [last[ly]] (created|struck) (lightning)[the] [last[ly]] (launched|deployed) (firework)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 fireworkExpression Last/First Login Time
Section titled “ Expression Last/First Login Time”When a player last/first logged in the server. 'last login' requires paper to get the last login, otherwise it will get the last time they were seen on the server.
Since 2.5 Return Type
Date
[the] (last|first) login of %offline players%%offline players%'[s] (last|first) logincommand /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."Effect Launch firework
Section titled “ Effect Launch firework”Launch firework effects at the given location(s).
Since 2.4
(launch|deploy) [[a] firework [with effect[s]]] %firework effects% at %locations% [([with] (duration|power)|timed) %number%]launch ball large colored red, purple and white fading to light green and black at player's location with duration 1Effect Leash entities
Section titled “ Effect Leash 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.
Since 2.3
(leash|lead) %living entities% to %entity%make %entity% (leash|lead) %living entities%un(leash|lead) [holder of] %living entities%on right click: leash event-entity to player send "&aYou leashed &2%event-entity%!" to playerExpression Leash Holder
Section titled “ Expression Leash Holder”The leash holder of a living entity.
Since 2.3 Return Type
Entity
[the] leash holder[s] of %living entities%%living entities%'[s] leash holder[s]set {_example} to the leash holder of the target mobCondition Leash Will Drop
Section titled “ Condition Leash Will Drop”Checks whether the leash item will drop during the leash detaching in an unleash event.
Since 2.10 Applicable Events
On Leash / Unleash
[the] (lead|leash) [item] (will|(won't|will not)) (drop|be dropped)on unleash: if the leash will drop: prevent the leash from dropping else: allow the leash to dropCondition Left Handed
Section titled “ Condition Left Handed”Checks if living entities or players are left or right-handed. Armor stands are neither right nor left-handed.
Since 2.8.0
%living entities% (is|are) (left|right)( |-)handed%living entities% (isn't|is not|aren't|are not) (left|right)( |-)handedon damage of player: if victim is left handed: cancel eventExpression Length
Section titled “ Expression Length”The length of a text, in number of characters.
Since 2.1 Return Type
Number
[the] length of %texts%%texts%'[s] lengthset {_l} to length of the string argumentExpression Level
Section titled “ Expression Level”The experience level of a player.
Since unknown (before 2.1), 2.13.2 (allow player default) Return Type
Number
Applicable EventsOn Level Change
[the] [xp|exp[erience]] level [of %players%]%players%'[s] [xp|exp[erience]] levelreduce the victim's level by 1set the player's level to 0on level change: set {_diff} to future xp level - past exp level broadcast "%player%'s level changed by %{_diff}%!"Expression Level Progress
Section titled “ Expression 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%.
Since 2.0 Return Type
Number
Applicable EventsOn Level Change
[the] level progress of %players%%players%'[s] level progress# 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 eventCondition Lid Is Open/Closed
Section titled “ Condition Lid Is Open/Closed”Check to see whether lidded blocks (chests, shulkers, etc.) are open or closed.
Since 2.10
[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])if the lid of {_chest} is closed: open the lid of {_block}Expression Light Level
Section titled “ Expression Light Level”Gets the light level at a certain location which ranges from 0 to 15.
It can be separated into sunlight (15 = direct sunlight, 1-14 = indirect) and block light (torches, glowstone, etc.). The total light level of a block is the maximum of the two different light types.
Since 1.3.4 Return Type
Number
[(sky|sun|block)[ ]]light[ ]level [(of|%direction%) %location%]# 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 secondsEffect Lightning
Section titled “ Effect Lightning”Strike lightning at a given location. Can use 'lightning effect' to create a lightning that does not harm entities or start fires.
Since 1.4
(create|strike) lightning[([ ]effect)] %directions% %locations%strike lightning at the playerstrike lightning effect at the victimType Living Entity
Section titled “ Type Living Entity”A living entity, i.e. a mob or player, not inanimate entities like projectiles or dropped items.
Since 1.0
see <a href='#entity'>entity</a>, but ignore inanimate objectsspawn 5 powered creepersshoot a zombie from the creeperFunction ln
Section titled “ Function ln”The natural logarithm. You probably don't need this if you don't know what this is.
Returns NaN (not a number) if the argument is negative.
Since 2.2 Return Type
Number
ln(n: number)ln(1) = 0ln(exp(5)) = 5ln(2) = 0.6931Effect Load Server Icon
Section titled “ Effect Load Server Icon”Loads server icons from the given files. You can get the loaded icon using the
last loaded server icon expression.
Please note that the image must be 64x64 and the file path starts from the server folder.
Since 2.3
load [the] server icon (from|of) [the] [image] [file] %text%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::*}Effect Load World
Section titled “ Effect Load World”Load your worlds or unload your worlds
The load effect will create a new world if world doesn't already exist.
When attempting to load a normal vanilla world you must define it's environment i.e "world_nether" must be loaded with nether environment
Since 2.8.0
load [the] world[s] %texts% [with environment %environment%]unload [[the] world[s]] %worlds% [without saving]load world "world_nether" with environment netherload the world "myCustomWorld"unload "world_nether"unload "world_the_end" without savingunload all worldsExpression Loaded Plugins
Section titled “ Expression Loaded Plugins”An expression to obtain a list of the names of the server's loaded plugins.
Since 2.7 Return Type
Text
[(all [[of] the]|the)] [loaded] pluginsif the loaded plugins contains "Vault": broadcast "This server uses Vault plugin!"send "Plugins (%size of loaded plugins%): %plugins%" to playerEffect Locally Suppress Warning
Section titled “ Effect Locally Suppress Warning”Suppresses target warnings from the current script.
Since 2.3
[local[ly]] suppress [the] (conflict|variable save|[missing] conjunction|starting [with] expression[s]|deprecated syntax|unreachable code|constant condition[s]) warning[s]locally suppress missing conjunction warningssuppress the variable save warningsFunction location
Section titled “ Function location”Creates a location from a world and 3 coordinates, with an optional yaw and pitch.
If for whatever reason the world is not found, it will fallback to the server's main world.
Since 2.2 Return Type
Location
location(x: number, y: number, z: number, world: optional world, yaw: optional number, pitch: optional number)# TELEPORTINGteleport 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 BLOCKSset block at location(1,1,1, world "world") to stoneset block at location(1,1,1, world "world", 100, 0) to stoneset block at location(1,1,1, world of player) to stoneset block at location(1,1,1, world("world")) to stoneset block at location({_x}, {_y}, {_z}, {_w}) to stone
# USING VARIABLESset {_l1} to location(1,1,1)set {_l2} to location(10,10,10)set blocks within {_l1} and {_l2} to stoneif player is within {_l1} and {_l2}:
# OTHERkill 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)Type Location
Section titled “ Type Location”A location in a world. Locations are world-specific and even store a direction, e.g. if you save a location and later teleport to it you will face the exact same direction you did when you saved the location.
Since 1.0
teleport player to location at 0, 69, 0set {home::%uuid of player%} to location of the playerExpression Location
Section titled “ Expression 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).
Since 2.0 Return Type
Location
[the] [event-](location|position)drop 5 apples at the event-location # exactly the same as writing 'drop 5 apples'set {_loc} to the location 1 meter above the playerExpression Location
Section titled “ Expression 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).
Since 2.0 Return Type
Location
[the] (location|position) %directions% [%location%]drop 5 apples at the event-location # exactly the same as writing 'drop 5 apples'set {_loc} to the location 1 meter above the playerExpression Location
Section titled “ Expression Location”The location of a block or entity. This not only represents the x, y and z coordinates of the location but also includes the world and the direction an entity is looking (e.g. teleporting to a saved location will make the teleported entity face the same saved direction every time).
Please note that the location of an entity is at it's feet, use head location to get the location of the head.
Since Return Type
Location
(location|position) of %location%%location%'[s] (location|position)set {home::%uuid of player%} to the location of the playermessage "You home was set to %player's location% in %player's world%."Expression Location At
Section titled “ Expression Location At”Allows to create a location from three coordinates and a world.
Since 2.0 Return Type
Location
[the] (location|position) [at] [\(][x[ ][=[ ]]]%number%, [y[ ][=[ ]]]%number%, [and] [z[ ][=[ ]]]%number%[\)] [[(in|of) [[the] world]] %world%]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 200Function log
Section titled “ Function log”A logarithm, with base 10 if none is specified. This is the inverse operation to exponentiation (for positive bases only), i.e. log(base ^ exponent, base) = exponent for any positive number 'base' and any number 'exponent'.
Another useful equation is base ^ log(a, base) = a for any numbers 'base' and 'a'.
Please note that due to how numbers are represented in computers, these equations do not hold for all numbers, as the computed values may slightly differ from the correct value.
Returns NaN (not a number) if any of the arguments are negative.
Since 2.2 Return Type
Number
log(n: number, base: number = 10)log(100) = 2 # 10^2 = 100log(16, 2) = 4 # 2^4 = 16Effect Log
Section titled “ Effect Log”Writes text into a .log file. Skript will write these files to /plugins/Skript/logs.
NB: Using 'server.log' as the log file will write to the default server log. Omitting the log file altogether will log the message as '[Skript] [<script>.sk] <message>' in the server log.
Since 2.0, 2.9.0 (severities)
log %texts% [(to|in) [file[s]] %texts%] [with [the|a] severity [of] (warning|severe)]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 warningEffect Look At
Section titled “ Effect Look At”Forces the mob(s) or player(s) to look at an entity, vector or location. Vanilla max head pitches range from 10 to 50.
Since 2.7
(force|make) %living entities% [to] (face [towards]|look [(at|towards)]) %entity%'s (feet|eyes) [(at|with) [head] [rotation] speed %number%] [[and] max[imum] [head] pitch %number%](force|make) %living entities% [to] (face [towards]|look [(at|towards)]) [the] (feet|eyes) of %entity% [(at|with) [head] [rotation] speed %number%] [[and] max[imum] [head] pitch %number%](force|make) %living entities% [to] (face [towards]|look [(at|towards)]) %vector/location/entity% [(at|with) [head] [rotation] speed %number%] [[and] max[imum] [head] pitch %number%]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 -40Section Loop
Section titled “ Section Loop”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-send "hello" to loop-player. When a condition inside a loop is not fulfilled the loop will start over with the next element of the loop. You can however use stop loop to exit the loop completely and resume code execution after the end of the loop.
Loopable Values
All expressions that represent more than one value, e.g. ‘all players’, ‘worlds’, etc., as well as list variables, can be looped. You can also use a list of expressions, e.g. loop the victim and the attacker, to execute the same code for only a few values.
List Variables
When looping list variables, you can also use loop-index in addition to loop-value inside the loop. loop-value is the value of the currently looped variable, and loop-index is the last part of the variable's name (the part where the list variable has its asterisk *).
Since 1.0
loop %objects%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 playersExpression Loop Iteration
Section titled “ Expression Loop Iteration”Returns the loop's current iteration count (for both normal and while loops).
Since 2.8.0 Return Type
Number
[the] loop(-| )(counter|iteration)[-%*number%]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%"Expression Loop value
Section titled “ Expression Loop value”Returns the previous, current, or next looped value.
Since 1.0, 2.8.0 (loop-counter), 2.10 (previous, next) Return Type
Object
[the] [current] loop-<.+>[the] next loop-<.+>[the] previous loop-<.+># 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 playersExpression Loot
Section titled “ Expression Loot”The loot that will be generated in a 'loot generate' event.
Since 2.7 Return Type
Item
[the] looton loot generate: chance of %10 add 64 diamonds to loot send "You hit the jackpot!!"Type Loot Context
Section titled “ Type Loot Context”Represents additional information a loot table can use to modify its generated loot.
Some loot tables will require some values (i.e. looter, location, looted entity) in a loot context when generating loot whereas others may not.
For example, the loot table of a simple dungeon chest will only require a location, whereas the loot table of a cow will require a looting player, looted entity, and location.
You can find more information about this in https://minecraft.wiki/w/Loot_context
Since 2.10
Expression Loot Context
Section titled “ Expression Loot Context”The loot context involved in the context create section.
Since 2.10 Return Type
Loot Context
[the] loot[ ]contextset {_context} to a new loot context at {_location}: broadcast loot contextExpression Loot Location of Loot Context
Section titled “ Expression Loot Location of Loot Context”Returns the loot location of a loot context.
Since 2.10 Return Type
Location
[the] loot[ing] [context] location [of %loot contexts%]%loot contexts%'[s] loot[ing] [context] locationset {_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 playerExpression Loot of Loot Table
Section titled “ Expression Loot of Loot Table”Returns the items of a loot table using a loot context. Not specifying a loot context will use a loot context with a location at the world's origin.
Since 2.10 Return Type
Item
[the] loot of %loot tables% [(with|using) %loot context%]%loot tables%'[s] loot [(with|using) %loot context%]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 contextType Loot Table
Section titled “ Type Loot Table”Loot tables represent what items should be in naturally generated containers, what items should be dropped when killing a mob, or what items can be fished.
You can find more information about this in https://minecraft.wiki/w/Loot_table
Since 2.10
Expression Loot Table
Section titled “ Expression Loot Table”Returns the loot table of an entity or block.
Setting the loot table of a block will update the block state, and once opened will generate loot of the specified loot table. Please note that doing so may cause warnings in the console due to over-filling the chest.
Please note that resetting/deleting the loot table of an ENTITY will reset the entity's loot table to its default.
Since 2.10 Return Type
Loot Table
[the] loot[ ]table[s] of %entities/blocks%%entities/blocks%'[s] loot[ ]table[s]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"Expression Loot Table from Key
Section titled “ Expression Loot Table from Key”Returns the loot table from a namespaced key.
Since 2.10 Return Type
Loot Table
[the] loot[ ]table[s] %texts%set {_table} to loot table "minecraft:chests/simple_dungeon"Expression Looted Entity of Loot Context
Section titled “ Expression Looted Entity of Loot Context”Returns the looted entity of a loot context.
Since 2.10 Return Type
Entity
[the] looted entity [of %loot contexts%]%loot contexts%'[s] looted entityset {_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 pigExpression Looter of Loot Context
Section titled “ Expression Looter of Loot Context”Returns the looter of a loot context. Note that setting the looter will read the looter's tool enchantments (e.g. looting) when generating loot.
Since 2.10 Return Type
Player
[the] (looter|looting player) [of %loot contexts%]%loot contexts%'[s] (looter|looting player)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[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] loreset the 1st line of the item's lore to "<orange>Excalibur 2.0"Expression Love Time
Section titled “ Expression Love 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.
Since 2.10 Return Type
Timespan
[the] love[d] time of %living entities%%living entities%'[s] love[d] timeon right click: send "%event-entity% has been in love for %love time of event-entity% more than you!" to playerExpression Lowest/Highest Solid Block
Section titled “ Expression Lowest/Highest 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.
Since 2.2-dev34, 2.9.0 (lowest solid block, 'non-air' option removed, additional syntax option) Return Type
Block
[the] (highest|lowest) [solid] block (at|of) %locations%%locations%'[s] (highest|lowest) [solid] blockteleport 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 locationExpression Luck of Loot Context
Section titled “ Expression Luck of Loot Context”Returns the luck of a loot context as a float. This represents the luck potion effect that an entity can have.
Since 2.10 Return Type
Number
[the] loot[ing] [context] luck [value|factor] [of %loot contexts%]%loot contexts%'[s] loot[ing] [context] luck [value|factor]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 pigEffect Make Adult/Baby
Section titled “ Effect Make Adult/Baby”Force a animal to become an adult or baby.
Since 2.10
make %living entities% [a[n]] (adult|baby|child)force %living entities% to be[come] a[n] (adult|baby|child)on spawn of mob: entity is not an adult make entity an adultEffect Make Allay Duplicate
Section titled “ Effect Make Allay Duplicate”Make an allay duplicate itself.
This effect will always make an allay duplicate regardless of whether the duplicate attribute is disabled.
Since 2.11
make %living entities% (duplicate|clone)make all allays duplicateEffect Make Breedable
Section titled “ Effect Make Breedable”Sets whether or not entities will be able to breed. Only works on animals.
Since 2.10
make %living entities% breedableunsterilize %living entities%make %living entities% (not |non(-| )|un)breedablesterilize %living entities%on spawn of animal: make entity unbreedableEffect Make Disturbance
Section titled “ Effect Make Disturbance”Make a warden sense a disturbance at a location, causing the warden to investigate that area.
The warden will not investigate if the warden is aggressive towards an entity.
This effect does not add anger to the warden.
Since 2.11
make %living entities% sense [a] disturbance %direction% %location%make last spawned warden sense a disturbance at location(0, 0, 0)Effect Make Egg Hatch
Section titled “ Effect Make Egg Hatch”Makes the egg hatch in a Player Egg Throw event.
Since 2.7 Applicable Events
On Egg Throw
make [the] egg [not] hatchon player egg throw: # EGGS FOR DAYZ! make the egg hatchEffect Make Entity Scream
Section titled “ Effect Make Entity Scream”Make a goat or enderman start or stop screaming.
Since 2.11
make %living entities% (start screaming|scream)force %living entities% to (start screaming|scream)make %living entities% stop screamingforce %living entities% to stop screaming make last spawned goat start screaming force last spawned goat to stop screaming make {_enderman} scream force {_enderman} to stop screamingEffect Make Fire Resistant
Section titled “ Effect Make Fire Resistant”Makes items fire resistant.
Since 2.9.0
make %item types% [not] (fire resistant|resistant to fire)make player's tool fire resistantmake {_items::*} not resistant to fireEffect Make Fly
Section titled “ Effect Make Fly”Forces a player to start/stop flying.
Since 2.2-dev34
force %players% to [(start|stop)] fly[ing]make %players% (start|stop) flyingmake %players% flymake player flyforce all players to stop flyingEffect Make Goat Ram
Section titled “ Effect Make Goat Ram”Make a goat ram an entity.
Ramming does have a cooldown and currently no way to change it.
Since 2.11
make %living entities% ram %living entity%force %living entities% to ram %living entity%make all goats ram playerEffect Make Incendiary
Section titled “ Effect Make Incendiary”Sets if an entity's explosion will leave behind fire. This effect is also usable in an explosion prime event.
Since 2.5
make %entities% [not] incendiarymake %entities%'[s] explosion [not] (incendiary|fiery)make [the] [event(-| )]explosion [not] (incendiary|fiery)on explosion prime: make the explosion fieryEffect Make Interaction Responsive
Section titled “ Effect Make Interaction Responsive”Makes an interaction either responsive or unresponsive. This determines whether clicking the entity will cause the clicker's arm to swing. Interactions default to unresponsive.
Since 2.14
make %entities% responsivemake %entities% (not |un)responsivemake last spawned interaction responsiveEffect Make Invisible
Section titled “ Effect Make 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.
Since 2.7
make %living entities% (invisible|not visible)make %living entities% (visible|not invisible)make target entity invisibleEffect Make Invulnerable
Section titled “ Effect Make Invulnerable”Makes an entity invulnerable/not invulnerable.
Since 2.5
make %entities% (invulnerable|invincible)make %entities% (not (invulnerable|invincible)|vulnerable|vincible)make target entity invulnerableEffect Make Panda Roll
Section titled “ Effect Make Panda Roll”Make a panda start/stop rolling.
Since 2.11
make %living entities% ((start rolling|roll)|stop rolling)force %living entities% to (start|stop) rollingif last spawned panda is not rolling: make last spawned panda start rollingEffect Make Panda Sneeze
Section titled “ Effect Make Panda Sneeze”Make a panda start/stop sneezing.
Since 2.11
make %living entities% ((start sneezing|sneeze)|stop sneezing)force %living entities% to (start|stop) sneezingif last spawned panda is not sneezing: make last spawned panda start sneezingEffect Make Say
Section titled “ Effect Make Say”Forces a player to send a message to the chat. If the message starts with a slash it will force the player to use command.
Since 2.3
make %players% (say|send [the] message[s]) %texts%force %players% to (say|send [the] message[s]) %texts%make the player say "Hello."force all players to send the message "I love this server"Effect Make Sign Glow
Section titled “ Effect Make Sign Glow”Makes a sign (either a block or item) have glowing text or normal text
Since 2.8.0
make %blocks/item types% have glowing textmake %blocks/item types% have (normal|non[-| ]glowing) textmake target block of player have glowing textCondition Matches
Section titled “ Condition Matches”Checks whether the defined strings match the input regexes (Regular expressions).
Since 2.5.2
%texts% (match[es]|do[es](n't| not) match) %texts%%texts% (partially match[es]|do[es](n't| not) partially match) %texts%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!"Function max
Section titled “ Function max”Returns the maximum number from a list of numbers.
Since 2.2 Return Type
Number
max(ns: numbers)max(1) = 1max(1, 2, 3, 4) = 4max({some list variable::*})Expression Max Durability
Section titled “ Expression Max Durability”The maximum durability of an item. Changing requires Minecraft 1.20.5+
Note: 'delete' will remove the max durability from the item (making it a non-damageable item). Delete requires Paper 1.21+
Since 2.5, 2.9.0 (change) Return Type
Number
[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)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 toolExpression Max Health
Section titled “ Expression Max Health”The maximum health of an entity, e.g. 10 for a player.
Since 2.0 Return Type
Number
Applicable EventsOn Damage
On Death
[the] max[imum] health of %living entities%%living entities%'[s] max[imum] healthon join: set the maximum health of the player to 100spawn a giantset the last spawned entity's max health to 1000Expression Max Item Use Time
Section titled “ Expression Max Item Use Time”Returns the max duration an item can be used for before the action completes. E.g. it takes 1.6 seconds to drink a potion, or 1.4 seconds to load an unenchanted crossbow.
Some items, like bows and shields, do not have a limit to their use. They will return 1 hour.
Since 2.8.0 Return Type
Timespan
[the] max[imum] [item] us(e|age) (time|duration) of %item stacks%%item stacks%'[s] max[imum] [item] us(e|age) (time|duration)on right click: broadcast max usage duration of player's toolExpression Max Minecart Speed
Section titled “ Expression Max Minecart Speed”The maximum speed of a minecart.
Since 2.5.1 Return Type
Number
[the] max[imum] minecart (speed|velocity) of %entities%%entities%'[s] max[imum] minecart (speed|velocity)on right click on minecart: set max minecart speed of event-entity to 1Expression Max Players
Section titled “ Expression Max 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.
Since 2.3, 2.7 (modify max real players) Return Type
Number
[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 playerson server list ping: set the max players count to (online players count + 1)Expression Maximum Double Value
Section titled “ Expression Maximum Double Value”A number representing the maximum value of a double number type.
Since 2.13 Return Type
Number
[the] max[imum] double valueif {_number} >= maximum double value:Expression Maximum Float Value
Section titled “ Expression Maximum Float Value”A number representing the maximum value of a float number type.
Since 2.13 Return Type
Number
[the] max[imum] float valueif {_number} >= maximum float value:Expression Maximum Freeze Time
Section titled “ Expression Maximum Freeze Time”The maximum amount of time an entity can spend in powdered snow before taking damage.
Since 2.7 Return Type
Timespan
[the] max[imum] freeze time of %entities%%entities%'[s] max[imum] freeze timedifference between player's freeze time and player's max freeze time is less than 1 second: send "you're about to freeze!" to the playerExpression Maximum Integer Value
Section titled “ Expression Maximum Integer Value”A number representing the maximum value of an integer number type.
Since 2.13 Return Type
Number
[the] max[imum] integer valueif {_number} >= maximum integer value:Expression Maximum Long Value
Section titled “ Expression Maximum Long Value”A number representing the maximum value of a long number type.
Since 2.13 Return Type
Number
[the] max[imum] long valueif {_number} >= maximum long value:Expression Maximum Stack Size
Section titled “ Expression Maximum 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.
Since 2.1, 2.10 (changeable, inventories) Return Type
Number
[the] max[imum] stack[[ ]size] of %item types/inventories%%item types/inventories%'[s] max[imum] stack[[ ]size]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}Expression Me
Section titled “ Expression Me”A 'me' expression that can be used in players' effect commands only.
Since 2.1.1 Return Type
Player
memy[self]!heal me!kick myself!give a diamond axe to meFunction mean
Section titled “ Function mean”Get the mean (average) of a list of numbers.
You cannot get the mean of a set of numbers that includes infinity or NaN.
Since 2.11 Return Type
Number
mean(numbers: numbers)mean(1, 2, 3) = 2mean(0, 5, 10) = 5mean(13, 97, 376, 709) = 298.75Function median
Section titled “ Function median”Get the middle value of a sorted list of numbers. If the list has an even number of values, the median is the average of the two middle numbers.
You cannot get the median of a set of numbers that includes NaN.
Since 2.11 Return Type
Number
median(numbers: numbers)median(1, 2, 3, 4, 5) = 3median(1, 2, 3, 4, 5, 6) = 3.5median(0, 123, 456, 789) = 289.5Expression Mending Repair Amount
Section titled “ Expression 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.
Since 2.5.1 Return Type
Number
[the] [mending] repair amounton item mend: set the mending repair amount to 100Effect Message
Section titled “ Effect Message”Sends a message to the given player. Only styles written
in given string or in formatted expressions will be parsed.
Adding an optional sender allows the messages to be sent as if a specific player sent them.
This is useful with Minecraft 1.16.4's new chat ignore system, in which players can choose to ignore other players,
but for this to work, the message needs to be sent from a player.
Since 1.0, 2.2-dev26 (advanced features), 2.5.2 (optional sender), 2.6 (sending objects)
(message|send [message[s]]) %objects% [to %command senders%] [from %player%]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 playerExpression Message
Section titled “ Expression 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.
Since 1.4.6 (chat message), 1.4.9 (join & quit messages), 2.0 (death message), 2.9.0 (clear message), 2.10 (broadcasted message) Return Type
Text
Applicable EventsOn Chat
On Join
On Quit
On Death
On Broadcast
[the] [chat( |-)]message[the] (join|log[ ]in)( |-)message[the] (quit|leave|log[ ]out|kick)( |-)message[the] death( |-)message[the] broadcast(-|[ed] )messageon 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%"Expression Metadata
Section titled “ Expression Metadata”Metadata is a way to store temporary data on entities, blocks and more that disappears after a server restart.
Since 2.2-dev36, 2.10 (add, remove) Return Type
Object
metadata [(value|tag)[s]] %texts% of %metadata holders%%metadata holders%'[s] metadata [(value|tag)[s]] %text%set metadata value "healer" of player to truebroadcast "%metadata value "healer" of player%"clear metadata value "healer" of playerType Metadata Holder
Section titled “ Type Metadata Holder”Something that can hold metadata (e.g. an entity or block)
Since 2.2-dev36
set metadata value "super cool" of player to trueExpression Middle of Location
Section titled “ Expression Middle of Location”Returns the middle/center of a location. In other words, returns the middle of the X, Z coordinates and the floor value of the Y coordinate of a location.
Since 2.6.1 Return Type
Location
[the] (middle|center) [point] of %location%%location%'[s] (middle|center) [point]command /stuck: executable by: players trigger: teleport player to the center of player's location send "You're no longer stuck."Expression Midpoint
Section titled “ Expression Midpoint”Get the midpoint between two vectors or two locations in the same world.
Since 2.13 Return Type
Object
[the] mid[-]point (of|between) %object% and %object%set {_center} to the midpoint between location(0, 0, 0) and location(10, 10, 10)set {_centerBlock} to the block at {_center}set {_midpoint} to the mid-point of vector(20, 10, 5) and vector(3, 6, 9)Function min
Section titled “ Function min”Returns the minimum number from a list of numbers.
Since 2.2 Return Type
Number
min(ns: numbers)min(1) = 1min(1, 2, 3, 4) = 1min({some list variable::*})Expression Minecart Derailed / Flying Velocity
Section titled “ Expression Minecart Derailed / Flying Velocity”The velocity of a minecart as soon as it has been derailed or as soon as it starts flying.
Since 2.5.1 Return Type
Vector
[the] [minecart] (derailed|flying) velocity of %entities%%entities%'[s] [minecart] (derailed|flying) velocityon right click on minecart: set derailed velocity of event-entity to vector 2, 10, 2Type Minecraft Tag
Section titled “ Type Minecraft Tag”A tag that classifies a material, or entity.
Since 2.10
Expression Minimum Double Value
Section titled “ Expression Minimum Double Value”A number representing the minimum value of a double number type.
Since 2.13 Return Type
Number
[the] min[imum] double valueif {_number} <= minimum double value:Expression Minimum Float Value
Section titled “ Expression Minimum Float Value”A number representing the minimum value of a float number type.
Since 2.13 Return Type
Number
[the] min[imum] float valueif {_number} <= minimum float value:Expression Minimum Integer Value
Section titled “ Expression Minimum Integer Value”A number representing the minimum value of an integer number type.
Since 2.13 Return Type
Number
[the] min[imum] integer valueif {_number} <= minimum integer value:Expression Minimum Long Value
Section titled “ Expression Minimum Long Value”A number representing the minimum value of a long number type.
Since 2.13 Return Type
Number
[the] min[imum] long valueif {_number} <= minimum long value:Function mod
Section titled “ Function mod”Returns the modulo of the given arguments, i.e. the remainder of the division d/m, where d and m are the arguments of this function.
The returned value is always positive. Returns NaN (not a number) if the second argument is zero.
Since 2.2 Return Type
Number
mod(d: number, m: number)mod(3, 2) = 1mod(256436, 100) = 36mod(-1, 10) = 9last quarter, waning crescent, waxing gibbous, full moon, waning gibbous, waxing crescent, new moon, first quarterExpression Moon Phase
Section titled “ Expression Moon Phase”The current moon phase of a world.
Since 2.7 Return Type
Moon Phase
[the] (lunar|moon) phase[s] of %worlds%%worlds%'[s] (lunar|moon) phase[s]if moon phase of player's world is full moon: send "Watch for the wolves!"Expression MOTD
Section titled “ Expression MOTD”The message of the day in the server list. This can be changed in a server list ping event only.
'default MOTD' returns the default MOTD always and can't be changed.
Since 2.3 Return Type
Text
[the] [(default)|(shown|displayed)] (MOTD|message of [the] day)on server list ping: set the motd to "Join now!"Expression Moved blocks
Section titled “ Expression Moved blocks”Blocks which are moved in a piston event. Cannot be used outside of piston events.
Since 2.2-dev27 Return Type
Block
[the] moved blocksthe moved blocksExpression Name
Section titled “ Expression Name”Represents the Minecraft account name of a player, or the custom name of an item, entity, block, inventory, gamerule, world, script or function.
Players: The Minecraft account name of the player. Can't be changed.
Entities: The custom name of the entity. Can be changed. But for living entities, the players will have to target the entity to see its name tag. For non-living entities, the name will not be visible at all. To prevent this, use 'display name'.
Items: The custom name of the item (not the Minecraft locale name). Can be changed.
Inventories: The name/title of the inventory. Changing name of an inventory means opening the same inventory with the same contents but with a different name to its current viewers.
Gamerules: The name of the gamerule. Cannot be changed.
Worlds: The name of the world. Cannot be changed.
Scripts: The name of a script, excluding its file extension.
Since before 2.1, 2.2-dev20 (inventory name), 2.4 (non-living entity support, changeable inventory name), 2.7 (worlds) Return Type
Object
[the] name[s] of %objects%%objects%'[s] name[s]on join: player has permission "name.red" set the player's display name to "<red>[admin] <gold>%name of player%"set the name of the player's tool to "Legendary Sword of Awesomeness"Type Nameable
Section titled “ Type Nameable”A variety of Bukkit types that can have names, such as entities and some blocks.
Since 2.13
Expression Named Item/Inventory
Section titled “ Expression Named Item/Inventory”Directly names an item/inventory, useful for defining a named item/inventory in a script. If you want to (re)name existing items/inventories you can either use this expression or use set name of <item/inventory> to <text>.
Since 2.0, 2.2-dev34 (inventories) Return Type
Object
%item type/inventory type% (named|with name[s]) %text%give a diamond sword of sharpness 100 named "<gold>Excalibur" to the playerset tool of player to the player's tool named "<gold>Wand"set the name of the player's tool to "<gold>Wand"open hopper inventory named "Magic Hopper" to playerExpression NaN
Section titled “ Expression NaN”A number representing an undefined value. NaN occurs as a result of illegal math, like dividing 0 by 0.
NaN is deliberately not equal to any other number, including itself.
Since 2.2-dev32d Return Type
Number
NaN [value]value of NaNif {_number} is not {_number}:if isNaN({_number}) is true:Expression Nearest Entity
Section titled “ Expression Nearest Entity”Gets the entity nearest to a location or another entity.
Since 2.7 Return Type
Entity
[the] (nearest|closest) %*entity types% [[relative] to %entity/location%][the] %*entity types% (nearest|closest) [to %entity/location%]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 pigExpression Negative Infinity
Section titled “ Expression Negative Infinity”A number representing negative infinity.
Since 2.2-dev32d Return Type
Number
(-|minus |negative )(infinity|∞) [value]value of (-|minus |negative )(infinity|∞)if {_number} is -infinity:Expression New Line
Section titled “ Expression New Line”Returns a line break separator.
Since 2.5 Return Type
Text
nlnew[ ]lineline[ ]breaksend "Hello%nl%Goodbye!" to playerExpression New Potion Effect
Section titled “ Expression New Potion Effect”Create a new potion effect that can be applied to an entity or item type.
Since 2.5.2, 2.14 (syntax changes, infinite duration support) Return Type
Object
[a[n]] [ambient] potion effect of %potion effect type% [[of tier] %number%] [for %time span%][an] (infinite|permanent) [ambient] potion effect of %potion effect type% [[of tier] %number%][an] (infinite|permanent) [ambient] %potion effect type% [[of tier] %number%] [potion [effect]][a] potion effect [of %potion effect type%] (from|using|based on) %potion effect%set {_potion} to a potion effect of speed 2 for 10 minutes: hide the effect's icon hide the effect's particlesadd strength 5 to the potion effects of the player's toolapply invisibility to the player for 5 minutes: hide the effect's particlesadd a potion effect of speed 1 to the potion effects of the player# creates a potion effect with the properties of an existing potion effectset {_potion} to a potion effect of slowness based on the player's speed effectExpression New Potion Effect
Section titled “ Expression New Potion Effect”Create a new potion effect that can be applied to an entity or item type.
Since 2.5.2, 2.14 (syntax changes, infinite duration support) Return Type
Object
%*potion effect type% %*number%set {_potion} to a potion effect of speed 2 for 10 minutes: hide the effect's icon hide the effect's particlesadd strength 5 to the potion effects of the player's toolapply invisibility to the player for 5 minutes: hide the effect's particlesadd a potion effect of speed 1 to the potion effects of the player# creates a potion effect with the properties of an existing potion effectset {_potion} to a potion effect of slowness based on the player's speed effectExpression No Damage Ticks
Section titled “ Expression No Damage Ticks”The number of ticks that an entity is invulnerable to damage for.
Since 2.5, 2.11 (deprecated) Return Type
Number
[the] (invulnerability|invincibility|no damage) tick[s] [of %living entities%]%living entities%'[s] (invulnerability|invincibility|no damage) tick[s]on damage: set victim's invulnerability ticks to 20 #Victim will not take damage for the next secondExpression No Damage Time
Section titled “ Expression No Damage Time”The amount of time an entity is invulnerable to any damage.
Since 2.11 Return Type
Timespan
[the] (invulnerability|invincibility|no damage) time[[ ]span] [of %living entities%]%living entities%'[s] (invulnerability|invincibility|no damage) time[[ ]span]on damage: set victim's invulnerability time to 20 ticks #Victim will not take damage for the next secondif the no damage timespan of {_entity} is 0 seconds: set the invincibility time span of {_entity} to 1 minuteType Node
Section titled “ Type Node”A node (entry) from a script config file.
This may have navigable children.
Since 2.10
the current scriptExpression Node
Section titled “ Expression Node”Returns a node inside a config (or another section-node).
Nodes in Skript configs are written in the format `key: value`.
Section nodes can contain other nodes.
Since 2.10 Return Type
Node
[the] node %text% (of|in) %node%%node%'[s] node %text%[the] nodes (of|in) %nodes%%node%'[s] nodesset {_node} to node "language" in the skript configif text value of {_node} is "french": broadcast "Bonjour!"set {_script} to the current scriptloop nodes of the current script: broadcast name of loop-valueExpression Now
Section titled “ Expression Now”The current system time of the server. Use time to get the Minecraft time of a world.
Since 1.4 Return Type
Date
nowbroadcast "Current server time: %now%"Type Number
Section titled “ Type Number”A number, e.g. 2.5, 3, -9812454, 30 degrees or 3.14 radians.
Please note that many expressions only need integers, i.e. will discard any fractional parts of any numbers without producing an error.
Radians will be converted to degrees.
Since 1.0
[-]###[.###] [e[+|-]###] [[in ](rad[ian][s]|deg[ree][s])]set the player's health to 5.5set {_temp} to 2*{_temp} - 2.5set {_angle} to 3.14 in radians # will be converted to degreesExpression Number Of
Section titled “ Expression Number Of”The number of something. Using 'number of {list::*}' will return the length of the list, so if you want the numbers of the things inside the lists, use 'numbers of {list::*}'.
Since 1.0, 2.13 (numbers of) Return Type
Object
[the] number[s] of %objects%%objects%'[s] number[s]message "There are %number of all players% players online!"Expression Number of Characters
Section titled “ Expression Number of Characters”The number of uppercase, lowercase, or digit characters in a string.
Since 2.5 Return Type
Number
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%#Simple Chat Filteron chat: if number of uppercase chars in message / length of message > 0.5 cancel event send "<red>Your message has to many caps!" to playerExpression Numbers
Section titled “ Expression Numbers”All numbers between two given numbers, useful for looping.
Use 'numbers' if your start is not an integer and you want to keep the fractional part of the start number constant, or use 'integers' if you only want to loop integers.
You may also use 'decimals' if you want to use the decimal precision of the start number.
You may want to use the 'times' expression instead, for instance 'loop 5 times:'
Since 1.4.6 (integers & numbers), 2.5.1 (decimals) Return Type
Number
[(all [[of] the]|the)] (numbers|integers|decimals) (between|from) %number% (and|to) %number%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, 4Type Object
Section titled “ Type Object”The supertype of all types, meaning that if %object% is used in e.g. a condition it will accept all kinds of expressions.
Since 1.0
Type Offline Player
Section titled “ Type Offline Player”A player that is possibly offline. See player for more information. Please note that while all effects and conditions that require a player can be used with an offline player as well, they will not work if the player is not actually online.
Since 2.0 beta 8
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.set {_p} to "Notch" parsed as an offlineplayer # returns Notch even if they're offlineExpression Offline players
Section titled “ Expression Offline players”All players that have ever joined the server. This includes the players currently online.
Since 2.2-dev35 Return Type
Offline Player
[(all [[of] the]|the)] offline[ ]playerssend "Size of all players who have joined the server: %size of all offline players%"Function offlineplayer
Section titled “ Function offlineplayer”Returns a offline player from their name or UUID. This function will still return the player if they're online. If Paper 1.16.5+ is used, the 'allowLookup' parameter can be set to false to prevent this function from doing a web lookup for players who have not joined before. Lookups can cause lag spikes of up to multiple seconds, so use offline players with caution.
Since 2.8.0, 2.9.0 (prevent lookups) Return Type
Offline Player
offlineplayer(nameOrUUID: string, allowLookups: boolean = true)set {_p} to offlineplayer("Notch")set {_p} to offlineplayer("069a79f4-44e9-4726-a5be-fca90e38aaf5")set {_p} to offlineplayer("Notch", false)Event On Anvil Damage
Section titled “ Event On Anvil Damage”Called when an anvil is damaged/broken from being used to repair/rename items.
Note: this does not include anvil damage from falling.
Since 2.7
anvil damag(e|ing)on anvil damage: cancel the eventEvent On Anvil Prepare
Section titled “ Event On Anvil Prepare”Called when an item is put in a slot for repair by an anvil. Please note that this event is called multiple times in a single item slot move.
Since 2.7
anvil prepar(e|ing)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 playerEvent On AoE Cloud Effect
Section titled “ Event On AoE Cloud Effect”Called when area effect cloud applies its potion effect. This happens every 5 ticks by default.
Since 2.2-dev21
(area|AoE) [cloud] effecton area cloud effect:Event On Arm Swing
Section titled “ Event On Arm Swing”Called when a player swings their arm.
Since 2.5.1
[player] arm swingon arm swing: send "You swung your arm!"Event On Armor Change
Section titled “ Event On Armor Change”Called when armor pieces of a player are changed.
Since 2.5, 2.11 (equipment slots)
[player] armo[u]r change[d][player] %equipment slot% change[d]on armor change: broadcast the old armor itemon helmet change:Event On Bat Toggle Sleep
Section titled “ Event On Bat Toggle Sleep”Called when a bat attempts to go to sleep or wakes up.
Since 2.11
bat toggle sleepon bat toggle sleep:Event On Beacon Change Effect
Section titled “ Event On Beacon Change Effect”Called when a player changes the effects of a beacon.
Since 2.10
beacon change effectbeacon effect changeplayer chang(e[s]|ing) [of] beacon effecton beacon effect change: broadcast event-player broadcast event-block broadcast primary beacon effect broadcast secondary beacon effecton beacon change effect:on player change beacon effect:Event On Beacon Effect
Section titled “ Event On Beacon Effect”Called when a player gets an effect from a beacon.
Since 2.10
[primary|secondary] beacon effect [of %potion effect types%]application of [primary|secondary] beacon effect [of %potion effect types%][primary|secondary] beacon effect apply [of %potion effect types%]on beacon effect: broadcast applied effect broadcast event-player broadcast event-blockon primary beacon effect apply of haste:on application of secondary beacon effect:on beacon effect of speed:Event On Beacon Toggle
Section titled “ Event On Beacon Toggle”Called when a beacon is activated or deactivated.
Since 2.10
beacon togglebeacon activat(e|ion)beacon deactivat(e|ion)on beacon toggle:on beacon activate:on beacon deactivate:Event On Bed Enter
Section titled “ Event On Bed Enter”Called when a player starts sleeping.
Since 1.0
bed enter[ing][player] enter[ing] [a] bedon bed enter:bed leav(e|ing)[player] leav(e|ing) [a] bedon player leaving a bed:Event On Bell Resonate
Section titled “ Event On Bell Resonate”Called when a bell resonates, highlighting nearby raiders.
Since 2.9.0
bell resonat(e|ing)on bell resonate: send "<red>Raiders are nearby!" to all players in radius 32 around event-blockbell ring[ing]on bell ring: send "<gold>Ding-dong!<reset>" to all players in radius 10 of event-blockEvent On Block Damage
Section titled “ Event On Block Damage”Called when a player starts to break a block. You can usually just use the leftclick event for this.
Since 1.0
block damag(ing|e)on block damaging: if block is tagged with minecraft tag "logs": send "You can't break the holy log!"Event On Block Drop
Section titled “ Event On Block Drop”Called when a block broken by a player drops something.
- event-player: The player that broke the block
- past event-block: The block that was broken
- event-block: The block after being broken
- event-items (or drops): The drops of the block
- event-entities: The entities of the dropped items
If the breaking of the block leads to others being broken, such as torches, they will appearin "event-items" and "event-entities".
Since 2.10
block drop[ping] [[of] %item types/block datas%]on block drop: broadcast event-player broadcast past event-block broadcast event-block broadcast event-items broadcast event-entitieson block drop of oak log:Event On Block Fertilize
Section titled “ Event On Block Fertilize”Called when a player fertilizes blocks.
Since 2.5
[block] fertilizeon block fertilize: send "Fertilized %size of fertilized blocks% blocks got fertilized."Event On Block Growth
Section titled “ Event On Block Growth”Called when a crop grows. Alternative to new form of generic grow event.
Since 2.2-Fixes-V10
(plant|crop|block) grow[(th|ing)] [[of] %item types%]on crop growth:Event On Book Edit
Section titled “ Event On Book Edit”Called when a player edits a book.
Since 2.2-dev31
book (edit|change|write)on book edit:Event On Book Sign
Section titled “ Event On Book Sign”Called when a player signs a book.
Since 2.2-dev31
book sign[ing]on book sign:Event On Break / Mine
Section titled “ Event On Break / Mine”Called when a block is broken by a player. If you use 'on mine', only events where the broken block dropped something will call the trigger.
Since 1.0 (break), unknown (mine), 2.6 (BlockData support)
[block] (break[ing]|min(e|ing)) [[of] %item types/block datas%]on mine:on break of stone:on break of chest[facing=north]:on break of potatoes[age=7]:Event On Brewing Complete
Section titled “ Event On Brewing Complete”Called when a brewing stand finishes brewing an ingredient and changes the potions.
Since 2.13
brew[ing] [complet(e[d]|ion)|finish[ed]] [(of|for) %item types/potion effect types%]on brew: broadcast event-itemon brewing of speed potion:on brew finished for speed 2 potion:Event On Brewing Fuel
Section titled “ Event On Brewing Fuel”Called when a brewing stand is about to use an item to increase its fuel level.
Since 2.13
brew[ing [stand]] consum(e|ing) fuel [of %item types%]brew[ing [stand]] fuel consumption [of %item types%]on brewing consume fuel: prevent the brewing stand from consuming fuelon brewing fuel consumption of blaze powder:Event On Brewing Start
Section titled “ Event On Brewing Start”Called when a brewing stand starts brewing.
Since 2.13
brew[ing] start[ed|ing]on brewing start: set the brewing time to 1 secondEvent On Broadcast
Section titled “ Event On Broadcast”Called when a message is broadcasted.
Since 2.10
broadcaston broadcast: set broadcast-message to "&c[BROADCAST] %broadcasted message%"bucket (catch[ing]|captur(e|ing)) [[of] %entity types%]Event On Bucket Empty
Section titled “ Event On Bucket Empty”Called when a player empties a bucket. You can also use the place event with a check for water or lava.
Since 1.0
bucket empty[ing][player] empty[ing] [a] bucketon bucket empty:Event On Bucket fill
Section titled “ Event On Bucket fill”Called when a player fills a bucket.
Since 1.0
bucket fill[ing][player] fill[ing] [a] bucketon player filling a bucket:Event On Burn
Section titled “ Event On Burn”Called when a block is destroyed by fire.
Since 1.0, 2.6 (BlockData support)
[block] burn[ing] [[of] %item types/block datas%]on burn:on burn of oak wood, oak fences, or chests:on burn of oak_log[axis=y]:Event On Can Build Check
Section titled “ Event On 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.
Since 1.0 (basic), 2.0 ([un]cancellable)
[block] can build checkon block can build check: cancel eventEvent On Chat
Section titled “ Event On Chat”Called whenever a player chats.
Use chat format to change message format.
Use chat recipients to edit chat recipients.
Since 1.4.1
chaton chat: if player has permission "owner": set chat format to "<red>[player]<light gray>: <light red>[message]" else if player has permission "admin": set chat format to "<light red>[player]<light gray>: <orange>[message]" else: #default message format set chat format to "<orange>[player]<light gray>: <white>[message]"Event On Chunk Generate
Section titled “ Event On Chunk Generate”Called after a new chunk was generated.
Since 1.0
chunk (generat|populat)(e|ing)on chunk generate:Event On Chunk Load
Section titled “ Event On Chunk Load”Called when a chunk loads. The chunk might or might not contain mobs when it's loaded.
Since 1.0
chunk load[ing]on chunk load:Event On Chunk Unload
Section titled “ Event On Chunk Unload”Called when a chunk is unloaded due to not being near any player.
Since 1.0
chunk unload[ing]on chunk unload:Event On Click
Section titled “ Event On Click”Called when a user clicks on a block, an entity or air with or without an item in their hand.
Please note that rightclick events with an empty hand while not looking at a block are not sent to the server, so there's no way to detect them.
Also note that a leftclick on an entity is an attack and thus not covered by the 'click' event, but the 'damage' event.
Since 1.0, 2.10 (blockdata)
[(right|left)[( |-)]][mouse[( |-)]]click[ing] [on %entity type/item type/block data%] [(with|using|holding) %item type%][(right|left)[( |-)]][mouse[( |-)]]click[ing] (with|using|holding) %item type% on %entity type/item type/block data%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]:Event On Combust
Section titled “ Event On Combust”Called when an entity is set on fire, e.g. by fire or lava, a fireball, or by standing in direct sunlight (zombies, skeletons).
Since 1.0
combust[ing]on combust:Event On Command
Section titled “ Event On Command”Called when a player enters a command (not necessarily a Skript command) but you can check if command is a skript command, see Is a Skript command condition.
Since 2.0
command [%texts%]on command:on command "/stop":on command "pm Njol ":Event On Connect
Section titled “ Event On Connect”Called when the player connects to the server. This event is called before the player actually joins the server, so if you want to prevent players from joining you should prefer this event over on join.
Since 2.0
[player] connect[ing]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."Event On Consume
Section titled “ Event On Consume”Called when a player is done eating/drinking something, e.g. an apple, bread, meat, milk or a potion.
Since 2.0
[player] ((eat|drink)[ing]|consum(e|ing)) [[of] %item types%]on consume:Event On Craft
Section titled “ Event On Craft”Called when a player crafts an item.
Since unknown (before 2.1)
[player] craft[ing] [[of] %item types%]on craft:Event On Creeper Power
Section titled “ Event On Creeper Power”Called when a creeper is struck by lighting and gets powered. Cancel the event to prevent the creeper from being powered.
Since 1.0
creeper poweron creeper power:Event On Damage
Section titled “ Event On Damage”Called when an entity receives damage, e.g. by an attack from another entity, lava, fire, drowning, fall, suffocation, etc.
Since 1.0, 2.7 (by entity)
damag(e|ing) [of %entity type%] [by %entity type%]on damage:on damage of a player:on damage of player by zombie:Event On Death
Section titled “ Event On Death”Called when a living entity (including players) dies.
Since 1.0
death [of %entity types%]on death:on death of player:on death of a wither or ender dragon: broadcast "A %entity% has been slain in %world%!"Event On Dispense
Section titled “ Event On Dispense”Called when a dispenser dispenses an item.
Since unknown (before 2.1)
dispens(e|ing) [[of] %item types%]on dispense of iron block: send "that'd be 19.99 please!"Event On Drop
Section titled “ Event On Drop”Called when a player drops an item from their inventory, or an entity drops an item, such as a chicken laying an egg.
Since unknown (before 2.1), 2.7 (entity)
[player|entity] drop[ping] [[of] %item types%]on drop: if event-item is compass: cancel eventon entity drop of an egg: if event-entity is a chicken: set item of event-dropped item to a diamondEvent On Egg Throw
Section titled “ Event On 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.
Since 1.0
throw[ing] [of] [an] egg[player] egg throwon throw of an egg:Event On Elytra Boost
Section titled “ Event On Elytra Boost”Called when a player uses a firework to boost their fly speed when flying with an elytra.
Since 2.10
elytra booston elytra boost: if the used firework will be consumed: prevent the used firework from being consumeEvent On Enchant
Section titled “ Event On Enchant”Called when a player successfully enchants an item.
To get the enchanted item, see the enchant item expression
Since 2.5
[item] enchanton enchant: if the clicked button is 1: # offer 1 set the applied enchantments to sharpness 10 and unbreaking 10Event On Enchant Prepare
Section titled “ Event On 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
Since 2.5
[item] enchant prepareon enchant prepare: set enchant offer 1 to sharpness 1 set the cost of enchant offer 1 to 10 levelsEvent On Enderman Enrage
Section titled “ Event On Enderman Enrage”Called when an enderman gets mad because a player looked at them.
Note: This does not stop enderman from targeting the player as a result of getting damaged.
Since 2.9.0
enderman (enrage|anger)# Stops endermen from getting angry players with the permission "safeFrom.enderman"on enderman enrage: if player has permission "safeFrom.enderman": cancel eventEvent On Enderman/Sheep/Silverfish/Falling Block
Section titled “ Event On Enderman/Sheep/Silverfish/Falling Block”Called when an enderman places or picks up a block, a sheep eats grass, a silverfish boops into/out of a block or a falling block lands and turns into a block respectively.
event-block represents the old block and event-blockdata represents the new replacement that'll be applied to the block.
Since unknown, 2.5.2 (falling block), 2.8.0 (any entity support)
enderman placeenderman pickupsheep eatsilverfish entersilverfish exitfalling block fall[ing]falling block land[ing](entity|%*-entitydatas%) chang(e|ing) block[s]on sheep eat: kill event-entity broadcast "A sheep stole some grass!"on falling block land: event-entity is a falling dirt cancel eventEvent On Entity Breed
Section titled “ Event On Entity Breed”Called whenever two animals begin to conceive a child. The type can be specified.
Since 2.10
[entity] breed[ing] [of %entity types%]on breeding of llamas: send "When a %breeding mother% and %breeding father% love each other very much they make %offspring%" to breederEvent On Entity Dismount
Section titled “ Event On Entity Dismount”Called when an entity dismounts.
Since 2.2-dev13b
dismount[ing]on dismount: kill event-entityentity jump[ing]on entity jump: if entity is a wither skeleton: cancel eventEvent On Entity Mount
Section titled “ Event On Entity Mount”Called when entity starts riding another.
Since 2.2-dev13b
mount[ing]on mount: cancel eventEvent On Entity Potion Effect
Section titled “ Event On Entity Potion Effect”Called when an entity's potion effect is modified.
Since 2.10, 2.14 (action support)
entity potion effect [modif[y|ication]] [[of] %potion effect types%] [%potion actions%] [due to %potion causes%]on entity potion effect modification: broadcast "A potion effect was added to %event-entity%!"on entity potion effect of night vision added: message "You can now see in the dark!"on entity potion effect of strength removed: message "You're now weaker!"Event On Entity Shoot Bow
Section titled “ Event On Entity Shoot Bow”Called when an entity shoots a bow. event-entity refers to the shot projectile/entity.
Since 2.11
%entity types% shoot[ing] (bow|projectile)on player shoot bow: chance of 30%: damage event-slot by 10 send "Your bow has taken increased damage!" to shooter
on stray shooting bow: set {_e} to event-entity spawn a cow at {_e}: set velocity of entity to velocity of {_e} set event-entity to last spawned entityEvent On Entity Transform
Section titled “ Event On Entity Transform”Called when an entity is about to be replaced by another entity.
Examples when it's called include; when a zombie gets cured and a villager spawns, an entity drowns in water like a zombie that turns to a drown, an entity that gets frozen in powder snow, a mooshroom that when sheared, spawns a new cow.
Since 2.8.0
(entit(y|ies)|%*-entitydatas%) transform[ing] [due to %transform reasons%]on a zombie transforming due to curing:on mooshroom transforming:on zombie, skeleton or slime transform:Event On Experience Change
Section titled “ Event On Experience Change”Called when a player's experience changes.
Since 2.7
[player] (level progress|[e]xp|experience) (change|update|increase|decrease)on level progress change: set {_xp} to event-experience broadcast "%{_xp}%"Event On Experience Cooldown Change
Section titled “ Event On Experience 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.
Since 2.10
player (experience|[e]xp) cooldown changeon player experience cooldown change: broadcast event-player broadcast event-timespan broadcast past event-timespan broadcast xp cooldown change reasonEvent On Experience Spawn
Section titled “ Event On Experience Spawn”Called whenever experience is about to spawn.
Please note that this event will not fire for xp orbs spawned by plugins (including Skript) with Bukkit.
Since 2.0
[e]xp[erience] [orb] spawnspawn of [a[n]] [e]xp[erience] [orb]on xp spawn: world is "minigame_world" cancel eventEvent On Explode
Section titled “ Event On Explode”Called when an entity (a primed TNT or a creeper) explodes.
Since 1.0
explo(d(e|ing)|sion)on explosion:Event On Explosion Prime
Section titled “ Event 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.
Since 1.0
explosion primeon explosion prime:Event On Fade
Section titled “ Event On Fade”Called when a block 'fades away', e.g. ice or snow melts.
Since 1.0, 2.6 (BlockData support)
[block] fad(e|ing) [[of] %item types/block datas%]on fade of snow or blue ice:on fade of snow[layers=2]Event On Firework Explode
Section titled “ Event On Firework Explode”Called when a firework explodes.
Since 2.4
[a] firework explo(d(e|ing)|sion) [colo[u]red %colors%]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%!"Event On First Join
Section titled “ Event On First Join”Called when a player joins the server for the first time.
Since 1.3.7
first (join|login)on first join: broadcast "Welcome %player% to the server!"Event On Fishing
Section titled “ Event On Fishing”Called when a player triggers a fishing event.
An entity hooked event is triggered when an entity gets caught by a fishing rod.
A fish escape event is called when the player fails to click on time, and the fish escapes.
A fish approaching event is when the bobber is waiting to be hooked, and a fish is approaching.
A fishing state change event is triggered whenever the fishing state changes.
Since 2.10, 2.11 (state change)
[fishing] (line|rod) castfish (caught|catch)entity (hook[ed]|caught|catch)(bobber|hook) (in|hit) groundfish (escape|get away)[fishing] (rod|line) reel infish bit(e|ing)(fish approach[ing]|(bobber|hook) lure[d])fishing state change[d]on fishing line cast: send "You caught a fish!" to playeron entity caught: push event-entity vector from entity to playeron fishing state change: if event-fishing state is fish caught: broadcast "A fish has been caught!"Event On Flight Toggle
Section titled “ Event On Flight Toggle”Called when a players stops/starts flying.
Since 2.2-dev36
[player] flight toggl(e|ing)[player] toggl(e|ing) flighton flight toggle: if {game::%player%::playing} exists: cancel eventEvent On Flow
Section titled “ Event On Flow”Called when a blocks flows or teleports to another block. This not only applies to water and lava, but teleporting dragon eggs as well.
Since 1.0
[block] flow[ing]block mov(e|ing)on block flow: if event-block is water: broadcast "Build more dams! It's starting to get wet in here"Event On Form
Section titled “ Event On Form”Called when a block is created, but not by a player, e.g. snow forms due to snowfall, water freezes in cold biomes. This isn't called when block spreads (mushroom growth, water physics etc.), as it has its own event (see spread event).
Since 1.0, 2.6 (BlockData support)
[block] form[ing] [[of] %item types/block datas%]on form of snow:Event On Fuel Burn
Section titled “ Event On Fuel Burn”Called when a furnace burns an item from its fuel slot.
Since 1.0, 2.10 (specific item)
[furnace] fuel burn[ing] [of %item types%]on fuel burning: broadcast fuel burned if burned fuel is coal: add 20 seconds to burn timeEvent On Furnace Item Extract
Section titled “ Event On Furnace Item Extract”Called when a player takes any item out of the furnace.
Since 2.10
furnace [item] extract[ion] [of %item types%]on furnace extract: if event-items is an iron ingot: remove event-items from event-player's inventoryEvent On Gamemode Change
Section titled “ Event On Gamemode Change”Called when a player's gamemode changes.
Since 1.0
game[ ]mode change [to %gamemode%]on gamemode change:on gamemode change to adventure:Event On Gliding State Change
Section titled “ Event On Gliding State Change”Called when an entity toggles glider on or off, or when server toggles gliding state of an entity forcibly.
Since 2.2-dev21
(gliding state change|toggl(e|ing) gliding)on toggling gliding: cancel the event # bad idea, but you CAN do it!Event On Grow
Section titled “ Event On Grow”Called when a tree, giant mushroom or plant grows to next stage.
"of" matches any grow event, "from" matches only the old state, "into" matches only the new state,and "from into" requires matching both the old and new states.
Using "and" lists in this event is equivalent to using "or" lists. The event will trigger if any one of the elements is what grew.
Since 1.0, 2.2-dev20 (plants), 2.8.0 (from, into, blockdata)
grow[th] [of (%tree types%|%item types/block datas%)]grow[th] from %item types/block datas%grow[th] [in]to (%tree types%|%item types/block datas%)grow[th] from %item types/block datas% [in]to (%tree types%|%item types/block datas%)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]:Event On Hand Item Swap
Section titled “ Event On Hand Item Swap”Called whenever a player swaps the items in their main- and offhand slots.
Works also when one or both of the slots are empty.
The event is called before the items are actually swapped,
so when you use the player's tool or player's offtool expressions,
they will return the values before the swap -
this enables you to cancel the event before anything happens.
Since 2.3
swap[ping of] [(hand|held)] item[s]on swap hand items: event-player's tool is a diamond sword cancel eventEvent On Harvest Block
Section titled “ Event On Harvest Block”Called when a player harvests a block. A block being harvested is when a block drops items and the state of the block is changed, but the block is not broken. An example is harvesting berries from a berry bush.
Since 2.12
[player] [block|crop] harvest[ing] [of %item types/block datas%]on player block harvest: send "You have harvested %event-block% that dropped %event-items% using your %item of event-slot% in your %event-equipment slot%"
on crop harvesting of sweet berry bush: chance 5%: set drops to a diamond chance 1% cancel the dropsEvent On Heal
Section titled “ Event On Heal”Called when an entity is healed, e.g. by eating (players), being fed (pets), or by the effect of a potion of healing (overworld mobs) or harm (nether mobs).
Since 1.0, 2.9.0 (by reason)
heal[ing] [of %entity types%] [(from|due to|by) %heal reasons%]%entity types% heal[ing] [(from|due to|by) %heal reasons%]on heal:on player healing from a regeneration potion:on healing of a zombie, cow or a wither: heal reason is healing potion cancel eventhorse jumpon horse jump: push event-entity upwards at speed 2Event On Hunger Meter Change
Section titled “ Event On Hunger Meter Change”Called when the hunger bar of a player changes, i.e. either increases by eating or decreases over time.
Since 1.4.4
(food|hunger) (level|met(er|re)|bar) chang(e|ing)on food bar change:Event On Ignition
Section titled “ Event On Ignition”Called when a block starts burning, i.e. a fire block is placed next to it and this block is flammable.
The burn event will be called when the block is about do be destroyed by the fire.
Since 1.0
[block] ignit(e|ion)on block ignite: if event-block is a ladder: cancel eventEvent On Inventory Click
Section titled “ Event On Inventory Click”Called when clicking on inventory slot.
Since 2.2-Fixes-V10
[player] inventory(-| )click[ing] [[at] %item types%]on inventory click: if event-item is stone: give player 1 stone remove 20$ from player's balanceEvent On Inventory Close
Section titled “ Event On Inventory Close”Called when player's currently viewed inventory is closed.
Since 2.2-dev21
inventory clos(ing|e[d])on inventory close: if player's location is {location}: send "You exited the shop!"Event On Inventory Drag
Section titled “ Event On Inventory Drag”Called when a player drags an item in their cursor across the inventory.
Since 2.7
inventory drag[ging]on inventory drag: if player's current inventory is {_gui}: send "You can't drag your items here!" to player cancel eventEvent On Inventory Item Move
Section titled “ Event On Inventory Item Move”Called when an entity or block (e.g. hopper) tries to move items directly from one inventory to another.
When this event is called, the initiator may have already removed the item from the source inventory and is ready to move it into the destination inventory.
If this event is cancelled, the items will be returned to the source inventory.
Since 2.8.0
inventory item (move|transport)inventory (mov(e|ing)|transport[ing]) [an] itemon inventory item move: broadcast "%holder of past event-inventory% is transporting %event-item% to %holder of event-inventory%!"Event On Inventory Open
Section titled “ Event On Inventory Open”Called when an inventory is opened for player.
Since 2.2-dev21
inventory open[ed]on inventory open: close player's inventoryEvent On Inventory Pickup
Section titled “ Event On Inventory Pickup”Called when an inventory (a hopper, a hopper minecart, etc.) picks up an item
Since 2.5.1
inventory pick[ ]upon inventory pickup:Event On Inventory Slot Change
Section titled “ Event On Inventory Slot Change”Called when a slot in a player's inventory is changed.
Warning: setting the event-slot to a new item can result in an infinite loop.
Since 2.7
[player] inventory slot chang(e|ing)on inventory slot change: if event-item is a diamond: send "You obtained a diamond!" to playerEvent On Item Break
Section titled “ Event On Item Break”Called when a player breaks their tool because its damage reached the maximum value.
This event cannot be cancelled.
Since 2.1.1
[player] tool break[ing][player] break[ing] [(a|the)] toolon tool break:Event On Item Damage
Section titled “ Event On Item Damage”Called when an item is damaged. Most tools are damaged by using them; armor is damaged when the wearer takes damage.
Since 2.5
item damag(e|ing)on item damage: cancel eventEvent On Item Despawn
Section titled “ Event On Item Despawn”Called when an item is about to be despawned from the world, usually 5 minutes after it was dropped.
Since 2.2-dev35
(item[ ][stack]|[item] %item types%) despawn[ing][item[ ][stack]] despawn[ing] [[of] %item types%]on item despawn of diamond: send "Not my precious!" cancel eventEvent On Item Mend
Section titled “ Event On Item Mend”Called when a player has an item repaired via the Mending enchantment.
Since 2.5.1
item mend[ing]on item mend: chance of 50%: cancel the event send "Oops! Mending failed!" to playerEvent On Item Merge
Section titled “ Event On Item Merge”Called when dropped items merge into a single stack. event-entity will be the entity which is trying to merge, and future event-entity will be the entity which is being merged into.
Since 2.2-dev35
(item[ ][stack]|[item] %item types%) merg(e|ing)item[ ][stack] merg(e|ing) [[of] %item types%]on item merge of gold blocks: cancel eventEvent On Item Spawn
Section titled “ Event On Item Spawn”Called whenever an item stack is spawned in a world, e.g. as drop of a block or mob, a player throwing items out of their inventory, or a dispenser dispensing an item (not shooting it).
Since unknown (before 2.1)
item spawn[ing] [[of] %item types%]on item spawn of iron sword: broadcast "Someone dropped an iron sword!"Event On Join
Section titled “ Event On Join”Called when the player joins the server. The player is already in a world when this event is called, so if you want to prevent players from joining you should prefer on connect over this event.
Since 1.0
[player] (login|logging in|join[ing])on join: message "Welcome on our awesome server!" broadcast "%player% just joined the server!"Event On Jump
Section titled “ Event On Jump”Called whenever a player jumps.
This event requires PaperSpigot.
Since 2.3
[player] jump[ing]on jump: event-player does not have permission "jump" cancel eventEvent On Kick
Section titled “ Event On Kick”Called when a player is kicked from the server. You can change the kick message or cancel the event entirely.
Since 1.0
[player] (kick|being kicked)on kick:Event On Language Change
Section titled “ Event On Language Change”Called after a player changed their language in the game settings. You can use the language expression to get the current language of the player.
Since 2.3
[player] (language|locale) chang(e|ing)[player] chang(e|ing) (language|locale)on language change: if player's language starts with "en": send "Hello!"Event On Leash / Unleash
Section titled “ Event On Leash / Unleash”Called when an entity is leashed or unleashed. Cancelling these events will prevent the leashing or unleashing from occurring.
Since 2.10
[player] [un]leash[ing] [of %entity types%]on player leash of a sheep: send "Baaaaa--" to playeron player leash: send "<%event-entity%> Let me go!" to playeron unleash: broadcast "<%event-entity%> I'm free"on player unleash: send "<%event-entity%> Thanks for freeing me!" to playerEvent On Leaves Decay
Section titled “ Event On Leaves Decay”Called when a leaf block decays due to not being connected to a tree.
Since 1.0
leaves decay[ing]on leaves decay:Event On Level Change
Section titled “ Event On Level Change”Called when a player's level changes, e.g. by gathering experience or by enchanting something.
Since 1.0, 2.4 (level up/down)
[player] level (change|up|down)on level change:Event On Lightning Strike
Section titled “ Event On Lightning Strike”Called when lightning strikes.
Since 1.0
lightning [strike]on lightning: spawn a zombie at location of event-entityEvent On Loot Generate
Section titled “ Event On Loot Generate”Called when a loot table of an inventory is generated in the world.
For example, when opening a shipwreck chest.
Since 2.7
loot generat(e|ing)on loot generate: chance of 10% add 64 diamonds to the loot send "You hit the jackpot at %event-location%!"Event On Love Mode Enter
Section titled “ Event On Love Mode Enter”Called whenever an entity enters a state of being in love.
Since 2.10
[entity] enter[s] love mode[entity] love mode [enter]on love mode enter: cancel event # No one is allowed love hereEvent On Move / Rotate
Section titled “ Event On Move / Rotate”Called when a player or entity moves or rotates their head.
NOTE: Move event will only be called when the entity/player moves position, keyword 'turn around' is for orientation (ie: looking around), and the combined syntax listens for both.
NOTE: These events can be performance heavy as they are called quite often.
Since 2.6, 2.8.0 (turn around)
%entity type% (move|walk|step|(turn[ing] around|rotate))%entity type% (move|walk|step) or (turn[ing] around|rotate)%entity type% (turn[ing] around|rotate) or (move|walk|step)on player move: if player does not have permission "player.can.move": cancel eventon skeleton move: if event-entity is not in world "world": kill event-entityon player turning around: send action bar "You are currently turning your head around!" to playerEvent On Move On
Section titled “ Event On Move On”Called when a player moves onto a certain type of block.
Please note that using this event can cause lag if there are many players online.
Since 2.0
(step|walk)[ing] (on|over) %*item types%on walking on dirt or grass:on stepping on stone:Event On Physics
Section titled “ Event On 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.
Since 1.4.6
[block] physics# prevents sand from fallingon block physics: block is sand cancel eventEvent On Pick Up
Section titled “ Event On Pick Up”Called when a player/entity picks up an item. Please note that the item is still on the ground when this event is called.
Since unknown (before 2.1), 2.5 (entity)
[(player|entity)] (pick[ ]up|picking up) [[of] %item types%]on pick up:on entity pickup of wheat:Event On Pig Zap
Section titled “ Event On Pig Zap”Called when a pig is stroke by lightning and transformed into a zombie pigman. Cancel the event to prevent the transformation.
Since 1.0
pig[ ]zapon pig zap:Event On Piglin Barter
Section titled “ Event On Piglin Barter”Called when a piglin finishes bartering. A piglin may start bartering after picking up an item on its bartering list.
Cancelling will prevent piglins from dropping items, but will still make them pick up the input.
Since 2.10
piglin (barter[ing]|trad(e|ing))on piglin barter: if barter drops contain diamond: send "Diamonds belong in the money pit!" to player cancel eventEvent On Piston Extend
Section titled “ Event On Piston Extend”Called when a piston is about to extend.
Since 1.0
piston extend[ing]on piston extend: broadcast "A piston is extending!"Event On Piston Retract
Section titled “ Event On Piston Retract”Called when a piston is about to retract.
Since 1.0
piston retract[ing]on piston retract: broadcast "A piston is retracting!"Event On Place
Section titled “ Event On Place”Called when a player places a block.
Since 1.0, 2.6 (BlockData support)
[block] (plac(e|ing)|build[ing]) [[of] %item types/block datas%]on place:on place of a furnace, crafting table or chest:on break of chest[type=right] or chest[type=left]Event On Player Chunk Enter
Section titled “ Event On Player Chunk Enter”Called when a player enters a chunk. Note that this event is based on 'player move' event, and may be called frequent internally.
Since 2.7
[player] (enter[s] [a] chunk|chunk enter[ing])on player enters a chunk: send "You entered a chunk: %past event-chunk% -> %event-chunk%!" to playerEvent On Player Deep Sleep
Section titled “ Event On Player Deep Sleep”Called when a player has slept long enough to count as passing the night/storm.
Cancelling this event will prevent the player from being counted as deeply sleeping unless they exit and re-enter the bed.
Since 2.7
[player] deep sleep[ing]on player deep sleeping: send "Zzzz.." to playerEvent On Player Input
Section titled “ Event On Player Input”Called when a player sends an updated input to the server.
Note: The input keys event value is the set of keys the player is currently pressing, not the keys that were pressed or released.
Since 2.10
[player] (toggle|toggling|press[ing]|release|releasing) of (%input keys%|(an|any) input key)([player] %input keys%|[an|player] input key) (toggle|toggling|press[ing]|release|releasing)on input key press: send "You are pressing: %event-inputkeys%" to playerEvent On Player Pickup Arrow
Section titled “ Event On Player Pickup Arrow”Called when a player picks up an arrow from the ground.
Since 2.8.0
[player] (pick[ing| ]up [an] arrow|arrow pick[ing| ]up)on arrow pickup: cancel the event teleport event-projectile to block 5 above event-projectileEvent On Player Trade
Section titled “ Event On Player Trade”Called when a player has traded with a villager.
Since 2.7
player trad(e|ing)on player trade: chance of 50%: cancel event send "The trade was somehow denied!" to playerEvent On Player World Change
Section titled “ Event On Player World Change”Called when a player enters a world. Does not work with other entities!
Since 2.2-dev28
[player] world chang(ing|e[d])on player world change: world is "city" send "Welcome to the City!"Event On Portal
Section titled “ Event On Portal”Called when a player or an entity uses a nether or end portal. Note that 'on entity portal' event does not apply to players.
Cancel the event to prevent the entity from teleporting.
Since 1.0, 2.5.3 (entities), 2.13 (location changers)
[player] portalentity portalon portal: broadcast "%player% has entered a portal!"on player portal: player's world is world("wilderness") set world of event-location to player's world add 9000 to x-pos of event-locationon entity portal: broadcast "A %type of event-entity% has entered a portal!Event On Portal Create
Section titled “ Event On Portal Create”Called when a portal is created, either by a player or mob lighting an obsidian frame on fire, or by a nether portal creating its teleportation target in the nether/overworld.
In Minecraft 1.14+, you can use the player in this event.
Please note that there may not always be a player (or other entity) in this event.
Since 1.0, 2.5.3 (event-entity support)
portal creat(e|ion)on portal create:Event On Portal Enter
Section titled “ Event On Portal Enter”Called when an entity enters a nether portal or an end portal. Please note that this event will be fired many times for a nether portal.
Since 1.0
portal enter[ing]entering [a] portalon portal enter:Event On Prepare Craft
Section titled “ Event On Prepare Craft”Called just before displaying crafting result to player. Note that setting the result item might or might not work due to Bukkit bugs.
Since 2.2-Fixes-V10
[player] (preparing|beginning) craft[ing] [[of] %item types%]on preparing craft of torch:Event On Pressure Plate / Trip
Section titled “ Event On Pressure Plate / Trip”Called when a player steps on a pressure plate or tripwire respectively.
Since 1.0 (pressure plate), 1.4.4 (tripwire)
[step[ping] on] [a] [pressure] plate(trip|[step[ping] on] [a] tripwire)on step on pressure plate:Event On Projectile Collide
Section titled “ Event On Projectile Collide”Called when a projectile collides with an entity.
Since 2.5
projectile collideon projectile collide: teleport shooter of event-projectile to event-entityEvent On Projectile Hit
Section titled “ Event On Projectile Hit”Called when a projectile hits an entity or a block.
Since 1.0
projectile hiton projectile hit: if victim's health <= 3: delete event-projectileEvent On Quit
Section titled “ Event On Quit”Called when a player leaves the server.
Since 1.0 (simple disconnection)
(quit[ting]|disconnect[ing]|log[ ]out|logging out|leav(e|ing))on quit:on disconnect:Event On Ready Arrow
Section titled “ Event On Ready Arrow”Called when a player is firing a bow and the server is choosing an arrow to use.
Cancelling this event will skip the current arrow item and fire a new event for the next arrow item.
The arrow and bow in the event can be accessed with the Readied Arrow/Bow expression.
Since 2.8.0
[player] ((ready|choose|draw|load) arrow|arrow (choose|draw|load))on player ready arrow: selected bow's name is "Spectral Bow" if selected arrow is not a spectral arrow: cancel eventEvent On Redstone
Section titled “ Event On Redstone”Called when the redstone current of a block changes. This event is of not much use yet.
Since 1.0
redstone [current] [chang(e|ing)]on redstone change: send "someone is using redstone" to consoleEvent On Resource Pack Request Response
Section titled “ Event On Resource Pack Request Response”Called when a player takes action on a resource pack request sent via the
send resource pack effect.
The resource pack condition can be used
to check the resource pack state.
This event will be triggered once when the player accepts or declines the resource pack request,
and once when the resource pack is successfully installed or failed to download.
Since 2.4
resource pack [request] responseresource pack [request] %resource pack states%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!"Event On Respawn
Section titled “ Event On Respawn”Called when a player respawns via death or entering the end portal in the end. You should prefer this event over the death event as the player is technically alive when this event is called.
Since 1.0
[player] respawn[ing]on respawn:Event On Resurrect Attempt
Section titled “ Event On Resurrect Attempt”Called when an entity dies, always. If they are not holding a totem, this is cancelled - you can, however, uncancel it.
Since 2.2-dev28
[entity] resurrect[ion] [attempt]on resurrect attempt: entity is player entity has permission "admin.undying" uncancel the eventEvent On Riptide
Section titled “ Event On Riptide”Called when the player activates the riptide enchantment, using their trident to propel them through the air.
Note: the riptide action is performed client side, so manipulating the player in this event may have undesired effects.
Since 2.5
[use of] riptide [enchant[ment]]on riptide: send "You are riptiding!"Event On Script Load/Unload
Section titled “ Event On Script Load/Unload”Called directly after the trigger is loaded, or directly before the whole script is unloaded.
The keyword 'async' indicates the trigger can be ran asynchronously,
Since 2.0
[async] [script] (load|init|enable)[async] [script] (unload|stop|disable)on load: set {running::%script%} to trueon unload: set {running::%script%} to falseEvent On Send Command List
Section titled “ Event On Send Command List”Called when the server sends a list of commands to the player. This usually happens on join. The sent commands can be modified via the sent commands expression.
Modifications will affect what commands show up for the player to tab complete. They will not affect what commands the player can actually run.
Adding new commands to the list is illegal behavior and will be ignored.
Since 2.8.0
send[ing] [of [the]] [server] command[s] list[server] command list sendon send command list: set command list to command list where [input does not contain ":"] remove "help" from command listEvent On Server List Ping
Section titled “ Event 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.
Since 2.3
server [list] pingon 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::*}Event On Server Start/Stop
Section titled “ Event On Server Start/Stop”Called when the server starts or stops (actually, when Skript starts or stops, so a /reload will trigger these events as well).
Since 2.0
(server|skript) (start|load|enable)(server|skript) (stop|unload|disable)on skript start:on server stop:Event On Sheep Regrow Wool
Section titled “ Event On Sheep Regrow Wool”Called when sheep regrows its sheared wool back.
Since 2.2-dev21
sheep [re]grow[ing] woolon sheep grow wool: cancel eventEvent On Shoot
Section titled “ Event On Shoot”Called whenever a projectile is shot. Use the shooter expression to get who shot the projectile.
Since 1.0
[projectile] (shoot|launch)on shoot: if projectile is an arrow: send "you shot an arrow!" to shooterEvent On Sign Change
Section titled “ Event On Sign Change”As signs are placed empty, this event is called when a player is done editing a sign.
Since 1.0
sign (chang[e]|edit)[ing][player] (chang[e]|edit)[ing] [a] signon sign change: line 2 is empty set line 1 to "<red>%line 1%"Event On Slime Split
Section titled “ Event On Slime Split”Called when a slime splits. Usually this happens when a big slime dies.
Since 2.2-dev26
slime split[ting]on slime split:Event On Smelt
Section titled “ Event On Smelt”Called when a furnace smelts an item in its input slot.
Since 1.0, 2.10 (specific item)
[furnace] [ore] smelt[ed|ing] [of %item types%][furnace] smelt[ed|ing] of oreon smelt: clear the smelted itemon smelt of raw iron: broadcast smelted item set the smelted item to iron blockEvent On Sneak Toggle
Section titled “ Event On Sneak Toggle”Called when a player starts or stops sneaking. Use is sneaking to get whether the player was sneaking before the event was called.
Since 1.0
[player] toggl(e|ing) sneak[player] sneak toggl(e|ing)# make players that stop sneaking jumpon sneak toggle: player is sneaking push the player upwards at speed 0.5Event On Spawn
Section titled “ Event On Spawn”Called when an entity spawns (excluding players).
Since 1.0, 2.5.1 (non-living entities)
spawn[ing] [of %entity types%]on spawn of a zombie:on spawn of an ender dragon: broadcast "A dragon has been sighted in %world%!"Event On Spawn Change
Section titled “ Event On Spawn Change”Called when the spawn point of a world changes.
Since 1.0
[world] spawn changeon spawn change: broadcast "someone changed the spawn!"Event On Spectate
Section titled “ Event On Spectate”Called with a player starts, stops or swaps spectating an entity.
Since 2.7
[player] stop spectating [(of|from) %*entity types%][player] (swap|switch) spectating [(of|from) %*entity types%][player] start spectating [of %*entity types%]on player start spectating of a zombie:Event On Sponge Absorb
Section titled “ Event On Sponge Absorb”Called when a sponge absorbs blocks.
Since 2.5
sponge absorbon sponge absorb: loop absorbed blocks: broadcast "%loop-block% was absorbed by a sponge"!Event On Spread
Section titled “ Event On Spread”Called when a new block forms as a result of a block that can spread, e.g. water or mushrooms.
Since 1.0
spread[ing]on spread:Event On Sprint Toggle
Section titled “ Event On Sprint Toggle”Called when a player starts or stops sprinting. Use is sprinting to get whether the player was sprinting before the event was called.
Since 1.0
[player] toggl(e|ing) sprint[player] sprint toggl(e|ing)on sprint toggle: player is not sprinting send "Run!"Event On Start Smelt
Section titled “ Event On Start Smelt”Called when a furnace starts smelting an item in its ore slot.
Since 2.10
[furnace] start [of] smelt[ing] [[of] %item types%][furnace] smelt[ing] start [of %item types%]on smelting start: if the smelting item is raw iron: set total cook time to 1 secondon smelting start of raw iron: add 20 seconds to total cook timeEvent On Stonecutter Recipe Select
Section titled “ Event On Stonecutter Recipe Select”Called when a player selects a recipe in a stonecutter.
Since 2.8.0
stonecutting [[of] %item types%]on stonecutting stone slabs cancel the eventon stonecutting: broadcast "%player% is using stonecutter to craft %event-item%!"Event On Stop Using Item
Section titled “ Event On Stop Using Item”Called when a player stops using an item. For example, when the player releases the interact button when holding a bow, an edible item, or a spyglass.
Note that event-timespan will return the time the item was used for.
Since 2.8.0
[player] (stop|end) (using item|item use)on player stop using item: broadcast "%player% used %event-item% for %event-timespan%."Event On Swim Toggle
Section titled “ Event On Swim Toggle”Called when an entity swims or stops swimming.
Since 2.3
[entity] toggl(e|ing) swim[entity] swim toggl(e|ing)on swim toggle: event-entity does not have permission "swim" cancel eventEvent On System Time
Section titled “ Event On System Time”Called when the local time of the system the server is running on reaches the provided real-life time.
Since 2.11
at %times% [in] real timeat 14:20 in real time:at 2:30am real time:at 6:10 pm in real time:at 5:00 am and 5:00 pm in real time:at 5:00 and 17:00 in real time:Event On Tame
Section titled “ Event On Tame”Called when a player tames a wolf or ocelot. Can be cancelled to prevent the entity from being tamed.
Since 1.0
[entity] tam(e|ing)on tame:Event On Target
Section titled “ Event On Target”Called when a mob starts/stops following/attacking another entity, usually a player.
Since 1.0
[entity] target[entity] un[-]targeton entity target: target is a playerEvent On Teleport
Section titled “ Event On Teleport”This event can be used to listen to teleports from non-players or player entities respectively.
When teleporting entities, the event may also be called due to a result of natural causes, such as an enderman or shulker teleporting, or wolves teleporting to players.
When teleporting players, the event can be called by teleporting through a nether/end portal, or by other means (e.g. plugins).
Since 1.0, 2.9.0 (entity teleport)
[%entity types%] teleport[ing]on teleport:on player teleport:on creeper teleport:Event On Tool Change
Section titled “ Event On Tool Change”Called whenever a player changes their held item by selecting a different slot (e.g. the keys 1-9 or the mouse wheel), not by dropping or replacing the item in the current slot.
Since 1.0
[player['s]] (tool|item held|held item) chang(e|ing)on player's held item change:Event On Vault Display Item
Section titled “ Event On Vault Display Item”Called when a vault in a trial chamber is about to display an item.
Since 2.12
vault display[ing] itemon vault display item: set event-item to a netherite ingotEvent On Vehicle Collision
Section titled “ Event On Vehicle Collision”Called when a vehicle collides with a block or entity.
Since 2.10
vehicle collision [(with|of) [a[n]] %item types/block datas/entity types%]vehicle block collision [(with|of) [a[n]] %item types/block datas%]vehicle entity collision [(with|of) [a[n]] %entity types%]on vehicle collision:on vehicle collision with obsidian:on vehicle collision with a zombie:Event On Vehicle Create
Section titled “ Event On Vehicle Create”Called when a new vehicle is created, e.g. when a player places a boat or minecart.
Since 1.0
vehicle createcreat(e|ing|ion of) [a] vehicleon vehicle create:Event On Vehicle Damage
Section titled “ Event On Vehicle Damage”Called when a vehicle gets damage. Too much damage will destroy the vehicle.
Since 1.0
vehicle damagedamag(e|ing) [a] vehicleon vehicle damage:Event On Vehicle Destroy
Section titled “ Event On Vehicle Destroy”Called when a vehicle is destroyed. Any passenger will be ejected and the vehicle might drop some item(s).
Since 1.0
vehicle destroydestr(oy[ing]|uction of) [a] vehicleon vehicle destroy: cancel eventEvent On Vehicle Enter
Section titled “ Event On Vehicle Enter”Called when an entity enters a vehicle, either deliberately (players) or by falling into them (mobs).
Since 1.0
vehicle enterenter[ing] [a] vehicleon vehicle enter: entity is a player cancel eventEvent On Vehicle Exit
Section titled “ Event On Vehicle Exit”Called when an entity exits a vehicle.
Since 1.0
vehicle exitexit[ing] [a] vehicleon vehicle exit: if event-entity is a spider: kill event-entityEvent On Vehicle Move
Section titled “ Event 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
Since 2.10
vehicle moveon vehicle move: broadcast past event-location broadcast event-locationEvent On Villager Career Change
Section titled “ Event On Villager Career Change”Called when a villager changes its career. Can be caused by being employed or losing their job.
Since 2.12
villager career chang(e[d]|ing)on villager career change: if all: event-career change reason is employment event-villager profession is armorer profession then: cancel eventEvent On Weather Change
Section titled “ Event On Weather Change”Called when a world's weather changes.
Since 1.0
weather change [to %weather types%]on weather change:on weather change to sunny:Event On World Border Bounds Change
Section titled “ Event On World Border Bounds Change”Called when a world border changes its bounds, either over time, or instantly.
This event does not get called for virtual borders.
Since 2.11
world[ ]border [bounds] chang(e|ing)on worldborder bounds change: broadcast "The diameter of %event-worldborder% is changing from %past event-number% to %event-number% over the next %event-timespan%"Event On World Border Bounds Finish Change
Section titled “ Event On World Border Bounds Finish Change”Called when a moving world border has finished its move.
This event does not get called for virtual borders.
Since 2.11
world[ ]border [bounds] finish chang(e|ing)on worldborder bounds finish change: broadcast "Over the past %event-timespan%, the diameter of %event-worldborder% went from %past event-number% to %event-number%"Event On World Border Center Change
Section titled “ Event On World Border Center Change”Called when a world border's center has changed.
This event does not get called for virtual borders.
Since 2.11
world[ ]border center chang(e|ing)on worldborder center change: broadcast "The center of %event-worldborder% has moved from %past event-location% to %event-location%"Event On World Init
Section titled “ Event On World Init”Called when a world is initialized. As all default worlds are initialized before
any scripts are loaded, this event is only called for newly created worlds.
World management plugins might change the behaviour of this event though.
Since 1.0, 2.8.0 (defining worlds)
world init[ialization] [of %worlds%]on world init of "world_the_end":Event On World Load
Section titled “ Event On World Load”Called when a world is loaded. As with the world init event, this event will not be called for the server's default world(s).
Since 1.0, 2.8.0 (defining worlds)
world load[ing] [of %worlds%]on world load of "world_nether": broadcast "The world %event-world% has been loaded!"Event On World Save
Section titled “ Event On World Save”Called when a world is saved to disk. Usually all worlds are saved simultaneously, but world management plugins could change this.
Since 1.0, 2.8.0 (defining worlds)
world sav(e|ing) [of %worlds%]on world save of "world": broadcast "The world %event-world% has been saved"Event On World Unload
Section titled “ Event On World Unload”Called when a world is unloaded. This event will never be called if you don't have a world management plugin.
Since 1.0, 2.8.0 (defining worlds)
world unload[ing] [of %worlds%]on world unload: broadcast "the %event-world% has been unloaded!"Event On Zombie Break Door
Section titled “ Event On Zombie Break Door”Called when a zombie is done breaking a wooden door. Can be cancelled to prevent the zombie from breaking the door.
Since 1.0
zombie break[ing] [a] [wood[en]] dooron zombie breaking a wood door:Expression On-screen Kick Message
Section titled “ Expression On-screen Kick Message”The kick message that is displayed on-screen when a player is kicked.
Since 2.12 Return Type
Text
Applicable EventsOn Kick
[the] on-screen kick messageon kick: on-screen kick message is "Invalid hotbar selection (Hacking?)" cancel eventExpression Online Player Count
Section titled “ Expression Online Player Count”The amount of online players. This can be changed in a server list ping event only to show fake online player amount.
real online player count always return the real count of online players and can't be changed.
Since 2.3 Return Type
Number
[the] [((real|default)|(fake|shown|displayed))] [online] player (count|amount|number)[the] [((real|default)|(fake|shown|displayed))] (count|amount|number|size) of online playerson 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)[de[-]]op %offline players%op the playerdeop all playersEffect Open Book
Section titled “ Effect Open Book”Opens a written book to a player.
Since 2.5.1
(open|show) book %item type% (to|for) %players%open book player's tool to playerEffect Open/Close Inventory
Section titled “ Effect Open/Close Inventory”Opens an inventory to a player. The player can then access and modify the inventory as if it was a chest that he just opened.
Please note that currently 'show' and 'open' have the same effect, but 'show' will eventually show an unmodifiable view of the inventory in the future.
Since 2.0, 2.1.1 (closing), 2.2-Fixes-V10 (anvil), 2.4 (hopper, dropper, dispenser
(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]show the victim's inventory to the playeropen the player's inventory for the playerEffect Open/Close Lid
Section titled “ Effect Open/Close Lid”Open or close the lid of the block(s).
Since 2.10
(open|close) [the] lid[s] (of|for) %blocks%(open|close) %blocks%'[s] lid[s]open the lid of {_chest}close the lid of {_blocks::*}Expression Opened Inventory
Section titled “ Expression Opened Inventory”Return the currently opened inventory of a player.
If no inventory is open, it returns the own player's crafting inventory.
Since 2.2-dev24, 2.2-dev35 (Just 'current inventory' works in player events) Return Type
Inventory
[the] (current|open|top) inventory [of %players%]%players%'[s] (current|open|top) inventoryset slot 1 of player's current inventory to diamond swordStructure Options
Section titled “ Structure 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.
Since 1.0
optionsoptions: 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!"Expression Panda Gene
Section titled “ Expression Panda Gene”The main or hidden gene of a panda.
Since 2.11 Return Type
Gene
[the] (main|hidden) gene[s] of %living entities%%living entities%'[s] (main|hidden) gene[s]if the main gene of last spawned panda is lazy: set the main gene of last spawned panda to playfulCondition Panda Is On Its Back
Section titled “ Condition Panda Is On Its Back”Whether a panda is on its back.
Since 2.11
%living entities% (is|are) on (its|their) back[s]%living entities% (isn't|is not|aren't|are not) on (its|their) back[s]if last spawned panda is on its back: make last spawned panda get off its backCondition Panda Is Rolling
Section titled “ Condition Panda Is Rolling”Whether a panda is rolling.
Since 2.11
%living entities% (is|are) rolling%living entities% (isn't|is not|aren't|are not) rollingif last spawned panda is rolling: make last spawned panda stop rollingCondition Panda Is Scared
Section titled “ Condition Panda Is Scared”Whether a panda is scared.
Since 2.11
%living entities% (is|are) scared%living entities% (isn't|is not|aren't|are not) scaredif last spawned panda is scared:Condition Panda Is Sneezing
Section titled “ Condition Panda Is Sneezing”Whether a panda is sneezing.
Since 2.11
%living entities% (is|are) sneezing%living entities% (isn't|is not|aren't|are not) sneezingif last spawned panda is sneezing: make last spawned panda stop sneezingExpression Parse
Section titled “ Expression Parse”Parses text as a given type, or as a given pattern.
This expression can be used in two different ways: One which parses the entire text as a single instance of a type, e.g. as a number, and one that parses the text according to a pattern.
If the given text could not be parsed, this expression will return nothing and the parse error will be set if some information is available.
Some notes about parsing with a pattern:
- The pattern must be a Skript pattern, e.g. percent signs are used to define where to parse which types, e.g. put a %number% or %items% in the pattern if you expect a number or some items there.
- You have to save the expression's value in a list variable, e.g. set {parsed::*} to message parsed as "...".
- The list variable will contain the parsed values from all %types% in the pattern in order. If a type was plural, e.g. %items%, the variable's value at the respective index will be a list variable, e.g. the values will be stored in {parsed::1::*}, not {parsed::1}.
Since 2.0 Return Type
Object
%text% parsed as (%*type%|"<.*>")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 playerExpression Parse Error
Section titled “ Expression 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.
Since 2.0 Return Type
Text
[the] [last] [parse] errorset {var} to line 1 parsed as integerif {var} is not set: parse error is set: message "<red>Line 1 is invalid: %last parse error%" else: message "<red>Please put an integer on line 1!"crimson spore particledripping obsidian tear particlesdripping water particlea falling obsidian tear particlea nautilus particlea damage indicator particlea glow particlesweep attack particlesculk soul particlea gust particledripstone dripping water particlewhite ash particlesa sweep attack particlecampfire cosy smoke particlesreverse portal particleselder guardian particlessmoke particleslarge smoke particlesmall flame particlesdripping honey particlesenchanting particlean ash particlecomposter particlesdamage indicator particlea bubble particlesnowflake particlea dripping honey particlebubble pop particlecampfire cosy smoke particledust plume particlessplash particledripstone dripping lava particleinfested particlewarped spore particlesculk charge pop particleangry villager particlean enchanted hit particlean elder guardian particleenchanted hit particlea warped spore particleinfested particlesfirefly particleexplosion particlesa small gust particlea vault connection particlesmall gust particlesenchanting particlesominous spawning particleswhite smoke particlecrit particlean explosion emitter particlespit particlenautilus particlesfalling obsidian tear particlecherry leaves particlecomposter particleominous trial spawner detection particlea raid omen particlea dripstone dripping lava particleunderwater particlesa portal particlea lava particlea downward current particlea campfire signal smoke particlepoof particledownward current particleglow particlesdamage indicator particlesvault connection particlean explosion particlefalling honey particletotem of undying particlessneeze particlessmall gust particleominous spawning particlea falling water particlecrimson spore particlespale oak leaves particlesdripping water particlesa dripstone dripping water particlea wax off particlea white ash particlebubble column particlessmoke particledolphin particlesculk charge pop particleslarge gust emitter particleunderwater particlefalling dripstone water particlea trial omen particlea falling dripstone lava particlefalling nectar particlea sonic boom particlea dripping obsidian tear particletrial spawner detection particlean cobweb item particlea sculk soul particlea bubble pop particlea falling honey particlefalling dripstone water particlesa sneeze particlecampfire signal smoke particlelanding lava particlesa falling lava particlecloud particleexplosion particlea splash particlehappy villager particlesa falling dripstone water particlea spore blossom air particlesnowball item particlesa happy villager particlenote particlea large smoke particlea crit particlefishing particlesportal particleheart particleswitch particleash particlesa scrape particleash particlea landing obsidian tear particlewax on particlea dripping water particlecobweb item particlesmall gust emitter particlean end rod particlebubble pop particlescopper flame particleslava particlesa ominous trial spawner detection particlefalling lava particlesspore blossom air particlenautilus particlea sculk charge pop particlea landing lava particlea poof particlefalling water particlesscrape particlesa snowflake particlea falling spore blossom particlea dust plume particlea heart particlecampfire signal smoke particleshappy villager particlewax on particlesa small gust emitter particlesonic boom particlesdust plume particlea trial spawner detection particlelanding honey particlea underwater particletrial omen particlerain particlebubble particlesmall gust emitter particlesangry villager particlesscrape particledripstone dripping water particlesan enchanting particlefalling obsidian tear particlesspore blossom air particlesdripstone dripping lava particlessnowball item particlesonic boom particlefalling dripstone lava particlea dolphin particledripping lava particleswax off particlefalling nectar particlesa flame particledripping obsidian tear particleelectric spark particlefirefly particleselectric spark particlesbubble particlescloud particlesa large gust emitter particlea firework particlean snowball item particlea spit particlefalling spore blossom particleslanding obsidian tear particlean infested particleportal particlessoul particlesa white smoke particlea soul particledripping lava particlea note particleraid omen particleswitch particlesa glow squid ink particleegg crack particlesglow squid ink particlesnote particlesrain particlesfishing particleenchanted hit particlesa falling nectar particlea dripping lava particlea pale oak leaves particleraid omen particlea rain particleegg crack particlepale oak leaves particleslime item particlesa landing honey particleflame particlessplash particlesfalling honey particlesdripping honey particlea copper flame particlecopper flame particleflame particleexplosion emitter particlesdownward current particlescobweb item particlessoul fire flame particlelanding obsidian tear particleswhite smoke particlesan ominous spawning particlelarge gust emitter particleslarge smoke particlesheart particlespit particlesdolphin particlesglow squid ink particlefalling dripstone lava particlestrial omen particlesreverse portal particlebubble column particlecrit particlesexplosion emitter particlefirework particlefalling lava particlelanding honey particlesa soul fire flame particlea smoke particlea bubble column particlesoul fire flame particlesa fishing particlemycelium particlesan egg crack particlesculk soul particlesa cherry leaves particleend rod particlesominous trial spawner detection particlessquid ink particlea squid ink particletotem of undying particlea small flame particlean electric spark particlesweep attack particlesfalling water particlean slime item particlesneeze particlewarped spore particleswhite ash particlean angry villager particlea firefly particlesmall flame particleend rod particlea cloud particlea reverse portal particlea wax on particleslime item particlefirework particleselder guardian particlelanding lava particlesquid ink particlesglow particlemycelium particlevault connection particlesa totem of undying particlesoul particletrial spawner detection particlesa composter particlea mycelium particlegust particlefalling spore blossom particlecherry leaves particlesa witch particlea campfire cosy smoke particlea crimson spore particlewax off particlessnowflake particlesgust particleslava particlepoof particlesExpression Particle Count
Section titled “ Expression Particle Count”Sets how many particles to draw. Particle count has an influence on how the 'offset' and 'extra' values of a particle apply. Offsets are treated as distributions if particle count is greater than 0. Offsets are treated as velocity or some other special behavior if particle count is 0. This means that setting the particle count may change how your particle behaves. Be careful! More detailed information on particle behavior can be found at Paper's particle documentation.
Since 2.14 Return Type
Number
[the] particle count of %particles%%particles%'[s] particle countdraw 7 blue dust particles at playerExpression Particle Distribution
Section titled “ Expression Particle Distribution”Determines the normal distribution that particles may be drawn within. The distribution is defined by a vector of x, y, and z standard deviations. Particles will be randomly drawn based on these values, clustering towards the center. 68% of particles will be within 1 standard deviation, 95% within 2, and 99.7% within three. The area the particles will spawn in can be roughly estimated as being within 2 times the standard deviation in each axis. For example, a distribution of 1, 2, and 1 would spawn particles within roughly 2 blocks on the x and z axes, and within 4 blocks on the y axis. Please note that distributions only take effect if the particle count is greater than 0! Particles with counts of 0 do not have distributions. If the particle count is 0, the offset is treated differently depending on the particle. More detailed information on particle behavior can be found at Paper's particle documentation.
Since 2.14 Return Type
Vector
[the] particle distribution of %particles%%particles%'[s] particle distributionset the particle distribution of {_my-particle} to vector(1, 2, 1)Expression Particle Offset
Section titled “ Expression Particle Offset”Determines the offset value for a particle. Offsets are treated as distributions if particle count is greater than 0. Offsets are treated as velocity or some other special behavior if particle count is 0. Setting distribution/velocity with this method may change the particle count to 1/0 respectively. More detailed information on particle behavior can be found at Paper's particle documentation.
Since 2.14 Return Type
Vector
[the] particle offset of %particles%%particles%'[s] particle offsetset the particle offset of {_my-particle} to vector(1, 2, 1)Expression Particle Speed/Extra Value
Section titled “ Expression Particle Speed/Extra Value”Determines the specific 'speed' or 'extra' value of a particle. This value is used in different ways depending on the particle, but in general it: * acts as the speed at which the particle moves if the particle count is greater than 0. * acts as a multiplier to the particle's offset if the particle count is 0. More detailed information on particle behavior can be found at Paper's particle documentation.
Since 2.14 Return Type
Number
[the] (particle speed [value]|extra value) of %particles%%particles%'[s] (particle speed [value]|extra value)set the extra value of {_my-flame-particle} to 2set the particle speed of {_my-flame-particle} to 0Expression Particle with Offset/Distribution/Velocity
Section titled “ Expression Particle with Offset/Distribution/Velocity”Applies a specific offset to a particle. Offsets are treated as distributions if particle count is greater than 0. Offsets are treated as velocity or some other special behavior if particle count is 0. Setting distribution/velocity with this method may change the particle count to 1/0 respectively. More detailed information on particle behavior can be found at Paper's particle documentation.
Since 2.14 Return Type
Particle
%particles% with [an] offset [of] %vector%%particles% with [a] distribution [of] %vector%%directional particles% with [a] velocity [of] %vector%draw an electric spark particle with a velocity of vector(1,2,3) at playerdraw 12 red dust particles with a distribution of vector(1,2,1) at player's head locationExpression Particle with Speed/Extra Value
Section titled “ Expression Particle with Speed/Extra Value”Applies a specific 'speed' or 'extra' value to a particle. This value is used in different ways depending on the particle, but in general it: * acts as the speed at which the particle moves if the particle count is greater than 0. * acts as a multiplier to the particle's offset if the particle count is 0. More detailed information on particle behavior can be found at Paper's particle documentation.
Since 2.14 Return Type
Particle
%particles% with ([a] particle speed [value]|[an] extra value) [of] %number%draw an electric spark particle with a speed of 0 at playerdraw 12 red dust particles with an extra value of 0.4 at player's head locationExpression Particles with Data
Section titled “ Expression Particles with Data”Creates particles that require some extra information, such as colors, locations, or block data. Particles not present here do not require data and can be found in the Particle type. Data requirements vary from version to version, so these docs are only accurate for the most recent Minecraft version at time of release. For example, between 1.21.8 and 1.21.9, the 'flash' particle became colourable and now requires a colour data.
Since 2.14 Return Type
Particle
[%*number%|a[n]] %color% effect particle[s] (of|with) power %number%[%*number%|a[n]] %color% instant effect particle[s] (of|with) power %number%[%*number%|a[n]] %color% flash particle[s][%*number%|a[n]] %color% (potion|entity) effect particle[s][%*number%|a[n]] %color% tinted leaves particle[s][%*number%|a[n]] %color% dust particle[s] [of size %number%][%*number%|a[n]] %color% dust particle[s] [of size %number%] that transitions to %color%[%*number%|a[n]] %item type/block data% block particle[s][%*number%|a[n]] %item type/block data% [block] crumble particle[s][%*number%|a[n]] %item type/block data% [block] marker particle[s][%*number%|a[n]] %item type/block data% dust pillar particle[s][%*number%|a[n]] falling %item type/block data% dust particle[s][%*number%|a[n]] %item type% item particle[s][%*number%|a[n]] sculk charge particle[s] [with [a] roll angle [of] %number%][%*number%|a[n]] shriek particle[s] [delayed by %time span%][%*number%|a[n]] vibration particle[s] moving to[wards] %entity/location% [over [a duration of] %time span%][%*number%|a[n]] %color% trail particle[s] moving to[wards] %location% [over [a duration of] %time span%][%*number%|a[n]] dragon breath particle[s] [of power %number%]set {blood-effect} to a red dust particle of size 1draw 3 blue trail particles moving to player's target over 3 seconds at playerExpression Passenger
Section titled “ Expression Passenger”The passenger of a vehicle, or the rider of a mob.
For 1.11.2 and above, it returns a list of passengers and you can use all changers in it.
See also: vehicle
Since 2.0, 2.2-dev26 (Multiple passengers for 1.11.2+) Return Type
Entity
[the] passenger[s] of %entities%%entities%'[s] passenger[s]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 boatEffect Pathfind
Section titled “ Effect Pathfind”Make an entity pathfind towards a location or another entity. Not all entities can pathfind. If the pathfinding target is another entity, the entities may or may not continuously follow the target.
Since 2.7
make %living entities% (pathfind|move) to[wards] %living entity/location% [at speed %number%]make %living entities% stop (pathfinding|moving)make all creepers pathfind towards playermake all cows stop pathfindingmake event-entity pathfind towards player at speed 1Expression Percent of
Section titled “ Expression Percent of”Returns a percentage of one or more numbers.
Since 2.8.0 Return Type
Number
%number%(\%| percent) of %numbers%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 experienceevery %time span%every 2 seconds:every minecraft hour:every tick: # can cause lag depending on the code inside the eventevery minecraft days:every %time span% in [world[s]] %worlds%every 2 seconds in "world":every minecraft hour in "flatworld":every tick in "world": # can cause lag depending on the code inside the eventevery minecraft days in "plots":Function permutations
Section titled “ Function permutations”Get the number of possible ordered arrangements from 1 to 'options' with each arrangement having a size equal to 'selected'
For example, permutations with 3 options and an arrangement size of 1, returns 3: (1), (2), (3)
Permutations with 3 options and an arrangement size of 2 returns 6: (1, 2), (1, 3), (2, 1), (2, 3), (3, 1), (3, 2)
Note that the bigger the 'options' and lower the 'selected' may result in approximations or even infinity values.
Permutations differ from combinations in that permutations account for the arrangement of elements within the set, whereas combinations focus on unique sets and ignore the order of elements.
Example: (1, 2) and (2, 1) are two distinct permutations because the positions of '1' and '2' are different, but they represent a single combination since order doesn't matter in combinations.
Since 2.11 Return Type
Number
permutations(options: number, selected: number)permutations(10, 2) = 90permutations(10, 4) = 5040permutations(size of {some list::*}, 2)Effect Persistent
Section titled “ Effect Persistent”Make entities, players, or leaves be persistent.
Persistence of entities is whether they are retained through server restarts.
Persistence of leaves is whether they should decay when not connected to a log block within 6 meters.
Persistence of players is if the player's playerdata should be saved when they leave the server. Players' persistence is reset back to 'true' when they join the server.
Passengers inherit the persistence of their vehicle, meaning a persistent zombie put on a non-persistent chicken will become non-persistent. This does not apply to players.
By default, all entities are persistent.
Since 2.11
make %entities/blocks% [not] persist[ent]force %entities/blocks% to [not] persistprevent %entities/blocks% from persistingprevent all entities from persistingforce {_leaves} to persistcommand /kickcheater <cheater: player>: permission: op trigger: prevent {_cheater} from persisting kick {_cheater}Expression Pi
Section titled “ Expression Pi”Returns the mathematical constant pi. (approx. 3.1415926535)
Since 2.7 Return Type
Number
(pi|π)set {_tau} to pi * 2Expression Pickup Delay
Section titled “ Expression Pickup Delay”The amount of time before a dropped item can be picked up by an entity.
Since 2.7 Return Type
Timespan
[the] pick[ ]up delay of %entities%%entities%'[s] pick[ ]up delaydrop diamond sword at {_location} without velocityset pickup delay of last dropped item to 5 secondsType Pig Variant
Section titled “ Type Pig Variant”Represents the variant of a pig entity.
NOTE: Minecraft namespaces are supported, ex: 'minecraft:warm'.
Since 2.12
cold, temperate, warmExpression Ping
Section titled “ Expression 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).
Since 2.2-dev36 Return Type
Number
[the] ping of %players%%players%'[s] pingcommand /ping <player=%player%>: trigger: send "%arg-1%'s ping is %arg-1's ping%"Expression Plain Item
Section titled “ Expression Plain Item”A plain item is an item with no modifications. It can be used to convert items to their default state or to match with other default items.
Since 2.6 Return Type
Item Type
[a[n]] (plain|unmodified) %item type%if the player's tool is a plain diamond: # check if player's tool has no modifications send "You are holding a plain diamond!"Effect Play Dead
Section titled “ Effect Play Dead”Make an axolotl start or stop playing dead.
Since 2.11
make %living entities% (start playing|play) deadforce %living entities% to (start playing|play) deadmake %living entities% (stop playing|not play) deadforce %living entities% to (stop playing|not play) deadmake last spawned axolotl play deadEffect Play or Draw an Effect
Section titled “ Effect Play or Draw an Effect”Plays or draws a specific effect at a location, to a player, or on an entity. Effects can be: * Particles. * Game effects, which consist of combinations of particles and sounds, like the bone meal particles, the sound of footsteps on a specific block, or the particles and sound of breaking a splash potion. * Entity effects, which are particles or animations that are entity-specific and can only be played on a compatible entity. For example, the ravager attack animation can be played with this effect. All effects vary significantly in availability from version to version, and some may simply not function on your version of Minecraft. Some effects, like the death animation entity effect, may cause client glitches and should be used carefully!
[force] (play|show|draw) %game effects/particles% [%directions% %locations%] [as %player%][force] (play|draw) %game effects/particles% [%directions% %locations%] (for|to) %players% [as %player%](play|show|draw) %game effects% [%directions% %locations%] (in|with) [a] [view] (radius|range) [of] %number%(play|show|draw) %entity effects% on %entities%draw 2 smoke particles at playerforce draw 10 red dust particles of size 3 for playerplay blue instant splash potion break effect with a view radius of 10play ravager attack animation on player's targetEffect Play Sound
Section titled “ Effect Play Sound”Plays a sound at given location for everyone or just for given players, or plays a sound to specified players. Both Minecraft sound names and Spigot sound names are supported. Playing resource pack sounds are supported too. The sound category is 'master' by default.
When running 1.19+, playing a sound from an entity directly will result in the sound coming from said entity, even while moving.
If the sound is custom, a location emitter will follow the entity. Do note that pitch and volume
are reflected based on the entity, and Minecraft may not use the values from this syntax.
Minecraft sometimes has a set of sounds under one sound ID that will randomly play. To counter this, you can directly state which seed to use.
Please note that sound names can get changed in any Minecraft or Spigot version, or even removed from Minecraft itself.
Since 2.2-dev28, 2.4 (sound categories), 2.9 (sound seed & entity emitter)
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%]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 playerFunction player
Section titled “ Function player”Returns an online player from their name or UUID, if player is offline function will return nothing.
Setting 'getExactPlayer' parameter to true will return the player whose name is exactly equal to the provided name instead of returning a player that their name starts with the provided name.
Since 2.8.0 Return Type
Player
player(nameOrUUID: text, getExactPlayer: optional boolean (yes/no))set {_p} to player("Notch") # will return an online player whose name is or starts with 'Notch'set {_p} to player("Notch", true) # will return the only online player whose name is 'Notch'set {_p} to player("069a79f4-44e9-4726-a5be-fca90e38aaf5") # <none> if player is offlineType Player
Section titled “ Type Player”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:
Since 1.0
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.set {_p} to "Notch" parsed as a player # returns <none> unless Notch is actually online or starts with Notch like Notchanset {_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.Expression Player Chat Completions
Section titled “ Expression Player Chat Completions”The custom chat completion suggestions. You can add, set, remove, and clear them. Removing the names of online players with this expression is ineffective.
This expression will not return anything due to Bukkit limitations.
Since 2.10 Return Type
Text
[the] [custom] chat completion[s] of %players%%players%'[s] [custom] chat completion[s]add "Skript" and "Njol" to chat completions of all playersremove "text" from {_p}'s chat completionsclear player's chat completionsEffect Player Info Visibility
Section titled “ Effect Player Info Visibility”Sets whether all player related information is hidden in the server list.
The Vanilla Minecraft client will display ??? (dark gray) instead of player counts and will not show the
hover hist when hiding player info.
The version string can override the ???.
Also the Online Players Count and
Max Players expressions will return -1 when hiding player info.
Since 2.3 Applicable Events
On Server List Ping
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]hide player infohide player related information in the server listreveal all player related infoExpression Player Input Keys
Section titled “ Expression Player Input Keys”Get the current input keys of a player.
Since 2.10 Return Type
Input Key
[the] [current] (inputs|input keys) of %players%%players%'[s] [current] (inputs|input keys)broadcast "%player% is pressing %current input keys of player%"Expression Player Protocol Version
Section titled “ Expression Player Protocol Version”Player's protocol version. For more information and list of protocol versions visit wiki.vg.
Since 2.6.2 Return Type
Number
[the] protocol version of %players%%players%'[s] protocol versioncommand /protocolversion <player>: trigger: send "Protocol version of %arg-1%: %protocol version of arg-1%"Expression Player Skull
Section titled “ Expression Player Skull”Gets a skull item representing a player. Skulls for other entities are provided by the aliases.
Since 2.0 Return Type
Item Type
[the] skull of %offline players%%offline players%'[s] skullgive the victim's skull to the attackerset the block at the entity to the entity's skullEffect Poison/Cure
Section titled “ Effect Poison/Cure”Poison or cure an entity. If the entity is already poisoned, the duration may be overwritten.
Since 1.3.2
poison %living entities% [for %time span%](cure|unpoison) %living entities% [(from|of) poison]poison the playerpoison the victim for 20 secondscure the player from of poisonExpression Portal
Section titled “ Expression Portal”The blocks associated with a portal in the portal creation event.
Since 2.4 Return Type
Block
Applicable EventsOn Portal Create
[the] portal['s] blocks[the] blocks of [the] portalon portal creation: loop portal blocks: broadcast "%loop-block% is part of a portal!"Expression Portal Cooldown
Section titled “ Expression 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.
Since 2.8.0 Return Type
Timespan
[the] portal cooldown of %entities%%entities%'[s] portal cooldownon portal: wait 1 tick set portal cooldown of event-entity to 5 secondsType Potion Effect
Section titled “ Type Potion Effect”A potion effect, including the potion effect type, tier and duration.
Since 2.5.2
speed of tier 1 for 10 secondsEffect Potion Effect - Ambient
Section titled “ Effect Potion Effect - Ambient”Modify whether a potion effect is ambient.
That is, whether the potion effect produces more, translucent, particles.
Since 2.14
make %skriptpotioneffects% [not] ambientmake the player's potion effects ambientExpression Potion Effect - Amplifier
Section titled “ Expression Potion Effect - Amplifier”An expression to obtain the amplifier of a potion effect.
Since 2.7, 2.14 (support for potion effect objects, changing) Return Type
Number
[the] ([potion] amplifier|potion tier|potion level)[s] [of %skriptpotioneffects%]%skriptpotioneffects%'[s] ([potion] amplifier|potion tier|potion level)[s]set the amplifier of {_potion} to 10add 10 to the amplifier of the player's speed effectExpression Potion Effect - Duration
Section titled “ Expression Potion Effect - Duration”An expression to obtain the duration of a potion effect.
Since 2.14 Return Type
Timespan
[the] ([potion] duration|potion length)[s] [of %skriptpotioneffects%]%skriptpotioneffects%'[s] ([potion] duration|potion length)[s]set the duration of {_potion} to 10 secondsadd 10 seconds to the duration of the player's speed effectCondition Potion Effect - Has Icon
Section titled “ Condition Potion Effect - Has Icon”Checks whether a potion effect has an icon.
Since 2.14
%skriptpotioneffects% (has|have) ([an] icon|icons)%skriptpotioneffects% (doesn't|does not|do not|don't) have ([an] icon|icons)on entity potion effect modification: if the potion effect has an icon: hide the icon of event-potioneffecttype for event-entityCondition Potion Effect - Has Particles
Section titled “ Condition Potion Effect - Has Particles”Checks whether a potion effect has particles.
Since 2.14
%skriptpotioneffects% (has|have) particles%skriptpotioneffects% (doesn't|does not|do not|don't) have particleson entity potion effect modification: if the potion effect has particles: hide the particles of event-potioneffecttype for event-entityEffect Potion Effect - Icon
Section titled “ Effect Potion Effect - Icon”Modify whether a potion effect shows an icon.
Since 2.14
(show|hide) [the] [potion] icon[s] [(of|for) %skriptpotioneffects%](show|hide) %skriptpotioneffects%'[s] icon[s]hide the icon for the player's potion effectsEffect Potion Effect - Infinite
Section titled “ Effect Potion Effect - Infinite”Modify whether a potion effect is infinite.
That is, whether the potion effect will ever expire.
Since 2.14
make %skriptpotioneffects% [not] (infinite|permanent)make the player's potion effects infiniteCondition Potion Effect - Is Ambient
Section titled “ Condition Potion Effect - Is Ambient”Checks whether a potion effect is ambient.
That is, whether the potion effect produces more, translucent, particles.
Since 2.14
%skriptpotioneffects% (is|are) ambient%skriptpotioneffects% (isn't|is not|aren't|are not) ambienton entity potion effect modification: if the potion effect is ambient: message "It's particle time!"Effect Potion Effect - Particles
Section titled “ Effect Potion Effect - Particles”Modify whether a potion effect shows particles.
Since 2.14
(show|hide) [the] [potion] particles [(of|for) %skriptpotioneffects%](show|hide) %skriptpotioneffects%'[s] particleshide the particles for the player's potion effectsType Potion Effect Event Action
Section titled “ Type Potion Effect Event Action”Represents the action being performed in an 'entity potion effect' event.
'added' indicates the entity does not already have a potion effect of the event potion effect type.
'changed' indicates the entity already has a potion effect of the event potion effect type, but some property about the potion effect is changing.
'cleared' indicates that the effect is being removed because all of the entity's effects are being removed.
'removed' indicates that the event potion effect type has been specifically removed from the entity.
Since 2.14
add, removed, added, change, clear, removal, cleared, remove, changedon entity potion effect: if the event-potion effect action is removal: message "One of your existing potion effects was removed!"Type Potion Effect Event Cause
Section titled “ Type Potion Effect Event Cause”Represents the cause of an 'entity potion effect' event. For example, an arrow hitting an entity or a command being executed.
Since 2.10
patrol captain, axolotl, death, removal by resurrection, beacon effect, potion drunk, illusion, unknown, drinking potion, expired, pillager captain, attack, villager trade, nautilus potion causes, spawned spider, wither rose infliction, conversion, enter area effect cloud, conduit effect, command, food, drinking milk, plugin, converted, spider spawn, splash potion, warden, expiration, potion splash, dolphin boost, arrow infliction, turtle helmet effecton entity potion effect: if the event-potion effect cause is arrow affliction: message "You were hit by a tipped arrow!"Expression Potion Effect of Entity/Item
Section titled “ Expression Potion Effect of Entity/Item”An expression to obtain a specific potion effect type of an entity or item.
When an entity is affected by a potion effect but already has a weaker version of that effect type, the weaker version becomes hidden. If the weaker version has a longer duration, it returns after the stronger version expires.
NOTE: Hidden effects are not able to be changed.
Since 2.14 Return Type
Object
[the] [active|hidden|(active and hidden|hidden and active)] %potion effect types% [potion] effect[s] of %living entities/item types%%living entities/item types%'[s] [active|hidden|(active and hidden|hidden and active)] %potion effect types% [potion] effect[s]set {_effect} to the player's active speed effectadd 10 seconds to the player's slowness effectclear the player's hidden strength effectsreset the player's weakness effectsdelete the player's active jump boost effectType Potion Effect Type
Section titled “ Type Potion Effect Type”A potion effect type, e.g. 'strength' or 'swiftness'.
Since 2.0 beta 3
absorption, bad luck, bad omen, blindness, breath of the nautilus, conduit power, confusion, damage, damage resistance, darkness, dolphin's grace, dolphins grace, fast digging, fast mining, fire immunity, fire resistance, floating, glowing, haste, health, health boost, hero of the village, hunger, increase damage, increased damage, infested, instant damage, instant health, invisibility, jump, jump boost, levitation, luck, max health boost, maximum health boost, mining fatigue, nausea, night vision, oozing, poison, raid omen, reduce damage, reduced damage, regeneration, resistance, saturation, slow, slow digging, slow fall, slow falling, slow mining, slowness, speed, strength, swiftness, trial omen, unluck, water breathing, weakness, weaving, wind charged, wither, wither effect, wither potion effectapply swiftness 5 to the playerapply potion of speed 2 to the player for 60 secondsremove invisibility from the victimCondition Potion Effect Type - Is Instant
Section titled “ Condition Potion Effect Type - Is Instant”Checks whether a potion effect type is instant.
That is, whether the effect happens once/immediately.
Since 2.14
%potion effect types% (is|are) instant%potion effect types% (isn't|is not|aren't|are not) instantif any of the potion effects of the player's tool are instant: message "Use your tool for immediate benefits!"Type Potion Effect Type Category
Section titled “ Type Potion Effect Type Category”Represents the type of effect a potion effect type has on an entity.
Since 2.14
beneficial, neutral, harmfulExpression Potion Effect Type Category
Section titled “ Expression Potion Effect Type Category”An expression to obtain the category of a potion effect type.
That is, whether the potion effect type is beneficial, harmful, or neutral.
Since 2.14 Return Type
Potion Effect Type Category
[the] potion [effect [type]] category of %potion effect types%%potion effect types%'[s] potion [effect [type]] categoryon entity potion effect modification: if the potion effect type category is harmful: message "You have been afflicted with %potion effect type%"Expression Potion Effects of Entity/Item
Section titled “ Expression Potion Effects of Entity/Item”An expression to obtain the active or hidden potion effects of an entity or item.
When an entity is affected by a potion effect but already has a weaker version of that effect type, the weaker version becomes hidden. If the weaker version has a longer duration, it returns after the stronger version expires.
NOTE: Hidden effects are not able to be changed.
NOTE: Clearing the base potion effects of a potion item is not possible. If you wish to do so, just set the item to a water bottle.
Since 2.5.2, 2.14 (active/hidden support, more change modes) Return Type
Object
[the] [active|hidden|(active and hidden|hidden and active)] potion effects of %living entities/item types%%living entities/item types%'[s] [active|hidden|(active and hidden|hidden and active)] potion effectsset {_effects::*} to the active potion effects of the playerclear the player's hidden potion effectsadd the potion effects of the player to the potion effects of the player's toolreset the potion effects of the player's toolremove speed and night vision from the potion effects of the playerFunction product
Section titled “ Function product”Calculates the product of a list of numbers.
Since 2.2 Return Type
Number
product(ns: numbers)product(1) = 1product(2, 3, 4) = 24product({some list variable::*})product(2, {_v::*}, and the player's y-coordinate)Type Projectile
Section titled “ Type Projectile”A projectile, e.g. an arrow, snowball or thrown potion.
Since 1.0
arrow, fireball, snowball, thrown potion, etc.projectile is a snowballshoot an arrow at speed 5 from the playerExpression Projectile Critical State
Section titled “ Expression Projectile Critical State”A projectile's critical state. The only currently accepted projectiles are arrows and tridents.
Since 2.5.1 Return Type
Boolean
[the] (projectile|arrow) critical (state|ability|mode) of %projectiles%%projectiles%'[s] (projectile|arrow) critical (state|ability|mode)on shoot: event-projectile is an arrow set projectile critical mode of event-projectile to trueExpression Projectile Force
Section titled “ Expression Projectile Force”Returns the force at which a projectile was shot within an entity shoot bow event.
Since 2.11 Return Type
Number
[the] projectile forceon entity shoot projectile: set the velocity of shooter to vector(0,1,0) * projectile forceExpression Protocol Version
Section titled “ Expression Protocol Version”The protocol version that will be sent as the protocol version of the server in a server list ping event. For more information and list of protocol versions visit wiki.vg.
If this protocol version doesn't match with the protocol version of the client, the client will see the version string.
But please note that, this expression has no visual effect over the version string. For example if the server uses PaperSpigot 1.12.2, and you make the protocol version 107 (1.9),
the version string will not be "Paper 1.9", it will still be "Paper 1.12.2".
But then you can customize the version string as you wish.
Also if the protocol version of the player is higher than protocol version of the server, it will say
"Server out of date!", and if vice-versa "Client out of date!" when you hover on the ping bars.
This can be set in a server list ping event only
(increase and decrease effects cannot be used because that wouldn't make sense).
Since 2.3 Return Type
Number
Applicable EventsOn Server List Ping
[the] [server] [(sent|required|fake)] protocol version [number]on server list ping: set the version string to "<light green>Version: <orange>%minecraft version%" set the protocol version to 0 # 13w41a (1.7) - so the player will see the custom version string almost alwaysEffect Pull In Hooked Entity
Section titled “ Effect Pull In Hooked Entity”Pull the hooked entity to the player.
Since 2.10 Applicable Events
On Fishing
(reel|pull) in hook[ed] entityon fishing state of caught entity: pull in hooked entityEffect Push
Section titled “ Effect Push”Push entities in a given direction or towards a specific location.
Since 1.4.6, 2.12 (push towards)
(push|thrust|pull) %entities% [along] %direction% [(at|with) [a] (speed|velocity|force) [of] %number%](push|thrust|pull) %entities% (towards|away from) %location% [(at|with) [a] (speed|velocity|force) [of] %number%]push the player upwardspush the victim downwards at speed 0.5push player towards player's target at speed 2pull player along vector(1,1,1) at speed 1.5enable PvP [in %worlds%]disable PVP [in %worlds%]enable PvP #(current world only)disable PvP in all worlds(is PvP|PvP is) enabled [in %worlds%](is PvP|PvP is) disabled [in %worlds%]PvP is enabledPvP is disabled in "world"Function quaternion
Section titled “ Function quaternion”Returns a quaternion from the given W, X, Y and Z parameters.
Since 2.10 Return Type
Quaternion
quaternion(w: number, x: number, y: number, z: number)quaternion(1, 5.6, 45.21, 10)Type Quaternion
Section titled “ Type Quaternion”Quaternions are four dimensional vectors, often used for representing rotations.
Since 2.10
Type Queue
Section titled “ Type Queue”A queued list of values. Entries are removed from a queue when they are queried.
Since 2.10
set {queue} to a new queueadd "hello" to {queue}broadcast the 1st element of {queue}Expression Queue (Experimental)
Section titled “ Expression Queue (Experimental)”Requires the using queues experimental feature flag to be enabled.
Creates a new queue.
A queue is a set of elements that can have things removed from the start and added to the end.
Any value can be added to a queue. Adding a non-existent value (e.g. `{variable that isn't set}`) will have no effect.
This means that removing an element from the queue will always return a value unless the queue is empty.
Requesting an element from a queue (e.g. `the 1st element of {queue}`) also removes it from the queue.
Since 2.10 (experimental) Return Type
Queue
[a] [new] queue [(of|with) %objects%]set {queue} to a new queueadd "hello" and "there" to {queue}broadcast the first element of {queue} # hellobroadcast 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'Expression Queue Start/End (Experimental)
Section titled “ Expression Queue Start/End (Experimental)”Requires the using queues experimental feature flag to be enabled.
The first or last element in a queue. Asking for this does not remove the element from the queue.
This is designed for use with the add changer: to add or remove elements from the start or the end of the queue.
Since 2.10 (experimental) Return Type
Object
[the] (start|end) of %queue%%queue%'[s] (start|end)set {queue} to a new queueadd "hello" to {queue}add "foo" to the start of {queue}broadcast the first element of {queue} # foobroadcast the first element of {queue} # hello# queue is now emptyType Quit Reason
Section titled “ Type Quit Reason”Represents a quit reason from a player quit server event.
Since 2.8.0
disconnected, erroneous state, kicked, quit, timed out, erroneousExpression Quit Reason
Section titled “ Expression Quit Reason”The quit reason as to why a player disconnected in a quit event.
Since 2.8.0 Return Type
Quit Reason
[the] (quit|disconnect) (cause|reason)on quit: quit reason was kicked player is banned clear {server::player::%uuid of player%::*}Expression Random
Section titled “ Expression Random”Gets a random item out of a set, e.g. a random player out of all players online.
Since 1.4.9 Return Type
Object
[a] random %*type% [out] of %objects%give a diamond to a random player out of all playersgive a random item out of all items to the playerExpression Random Character
Section titled “ Expression Random Character”One or more random characters between two given characters. Use 'alphanumeric' if you want only alphanumeric characters.
This expression uses the Unicode numerical code of a character to determine which characters are between the two given characters.
If strings of more than one character are given, only the first character of each is used.
Since 2.8.0 Return Type
Text
[a|%integer%] random [alphanumeric] character[s] (from|between) %text% (to|and) %text%set {_captcha} to join (5 random characters between "a" and "z") with ""send 3 random alphanumeric characters between "0" and "z"Expression Random Numbers
Section titled “ Expression Random Numbers”A given amount of random numbers or integers between two given numbers. Use 'number' if you want any number with decimal parts, or use use 'integer' if you only want whole numbers.
Please note that the order of the numbers doesn't matter, i.e. random number between 2 and 1 will work as well as random number between 1 and 2.
Since 1.4, 2.10 (Multiple random numbers) Return Type
Number
[a|%integer%] random (integer|number)[s] (from|between) %number% (to|and) %number%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.5Expression Random UUID
Section titled “ Expression Random UUID”Returns a random UUID.
Since 2.5.1, 2.11 (return UUIDs) Return Type
UUID
[a] random uuidset {_uuid} to random uuidExpression Raw Name
Section titled “ Expression Raw Name”The raw Minecraft material name of the given item. Note that this is not guaranteed to give same results on all servers.
Since unknown (2.2) Return Type
Text
(raw|minecraft|vanilla) name[s] of %item types%raw name of tool of playerExpression Raw String
Section titled “ Expression Raw String”Returns the string without formatting (colors etc.) and without stripping them from it, e.g. raw "&aHello There!" would output &aHello There!
Since 2.7 Return Type
Text
raw %texts%send raw "&aThis text is unformatted!" to all playersExpression Readied Arrow/Bow
Section titled “ Expression Readied Arrow/Bow”The bow or arrow in a Ready Arrow event.
Since 2.8.0 Return Type
Item
Applicable EventsOn Ready Arrow
[the] (readied|selected|drawn) (arrow|bow)on player ready arrow: selected bow's name is "Spectral Bow" if selected arrow is not a spectral arrow: cancel eventExpression Recursive
Section titled “ Expression Recursive”Returns all values of an expression, including those in nested structures such as lists of lists.
Since 2.14 Return Type
Object
recursive %~objects%on load: set {_data::a::b::c} to "value1" set {_data::a::b::d} to "value2" set {_data::a::e} to "value3" set {_data::f} to "value4"
broadcast recursive {_data::*} # broadcasts "value1", "value2", "value3", "value4"
broadcast recursive indices of {_data::*} # broadcasts "a::b::c", "a::b::d", "a::e", "f"Expression Recursive Size
Section titled “ Expression Recursive Size”The recursive size of list.
Returns the recursive size of the list with sublists included, e.g.
{list::*} Structure
├──── {list::1}: 1
├──── {list::2}: 2
│ ├──── {list::2::1}: 3
│ │ └──── {list::2::1::1}: 4
│ └──── {list::2::2}: 5
└──── {list::3}: 6
Where using %size of {list::*}% will only return 3 (the first layer of indices only), while %recursive size of {list::*}% will return 6 (the entire list)
Please note that getting a list's recursive size can cause lag if the list is large, so only use this expression if you need to!
Since 1.0 Return Type
Number
[the] recursive (amount|number|size) of %objects%if recursive size of {player-data::*} > 1000:Expression Redstone Block Power
Section titled “ Expression Redstone Block Power”Power of a redstone block
Since 2.5 Return Type
Number
[the] redstone power of %blocks%%blocks%'[s] redstone powerif redstone power of targeted block is 15: send "This block is very powerful!"Effect Register Tag
Section titled “ Effect Register Tag”Registers a new tag containing either items or entity datas. Note that items will NOT keep any information other than their type, so adding `diamond sword named "test"` to a tag is the same as adding `diamond sword`
Item tags should be used for contexts where the item is not placed down, while block tags should be used for contexts where the item is placed. For example, and item tag could be "skript:edible", while a block tag would be "skript:needs_water_above".
All custom tags will be given the namespace "skript", followed by the name you give it. The name must only include the characters A to Z, 0 to 9, and '/', '.', '_', and '-'. Otherwise, the tag will not register.
Please note that two tags can share a name if they are of different types. Registering a new tag of the same name and type will overwrite the existing tag. Tags will reset on server shutdown.
Since 2.10
register [a[n]] [custom] (item|block|entity [type]) tag named %text% (containing|using) %entity types/item types%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 heartEffect Release From Entity Storage
Section titled “ Effect Release From Entity Storage”Releases the stored entities in an entity block storage (i.e. beehive).
When using beehives, providing a timespan will prevent the released bees from re-entering the beehive for that amount of time.
Due to unstable behaviour on older versions, this effect requires Minecraft version 1.21+.
Since 2.11
(release|evict) [the] (stored entities|entity storage) of %blocks% [for %time span%]release the stored entities of {_beehive}release the entity storage of {_hive} for 5 secondsExpression Remaining Air
Section titled “ Expression Remaining Air”How much time a player has left underwater before starting to drown.
Since 2.0 Return Type
Timespan
[the] remaining air of %living entities%%living entities%'[s] remaining airif the player's remaining air is less than 3 seconds: send "hurry, get to the surface!" to the playerExpression Repeat String
Section titled “ Expression Repeat String”Repeats inputted strings a given amount of times.
Since 2.8.0 Return Type
Text
%texts% repeated %integer% time[s]broadcast nl and nl repeated 200 timesbroadcast "Hello World " repeated 5 timesif "aa" repeated 2 times is "aaaa": broadcast "Ahhhh" repeated 100 timesEffect Replace
Section titled “ Effect Replace”Replaces all occurrences of a given text or regex with another text. Please note that you can only change variables and a few expressions, e.g. a message or a line of a sign.
Since 2.0, 2.2-dev24 (multiple strings, items in inventory), 2.5 (replace first, case sensitivity), 2.10 (regex)
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%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 "(idiot|noob)" 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 diamondExpression Resonating Time
Section titled “ Expression Resonating 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.
Since 2.9.0 Return Type
Timespan
[the] resonat(e|ing) time of %block%%block%'[s] resonat(e|ing) timebroadcast "The bell has been resonating for %resonating time of target block%"Condition Resource Pack
Section titled “ Condition Resource Pack”Checks state of the resource pack in a resource pack request response event.
Since 2.4 Applicable Events
On Resource Pack Request Response
[the] resource pack (was|is|has) [been] %resource pack state%[the] resource pack (was|is|has)(n't| not) [been] %resource pack state%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!"Type Resource Pack State
Section titled “ Type Resource Pack State”The state in a resource pack request response event.
Since 2.4
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 urlExpression Respawn Anchor Charges
Section titled “ Expression Respawn Anchor Charges”The charges of a respawn anchor.
Since 2.7 Return Type
Number
[the] [max[imum]] charge[s] of %blocks%%blocks%'[s] [max[imum]] charge[s]set the charges of event-block to 3Expression Respawn location
Section titled “ Expression Respawn location”The location that a player should respawn at. This is used within the respawn event.
Since 2.2-dev35 Return Type
Location
[the] respawn locationon respawn: set respawn location to {example::spawn}Type Respawn Reason
Section titled “ Type Respawn Reason”The respawn reason in a respawn event.
Since 2.14
death, plugin, end portalExpression Respawn Reason
Section titled “ Expression Respawn Reason”The respawn reason in a respawn event.
Since 2.14 Return Type
Respawn Reason
[the] respawn[ing] reasonon respawn: if respawn reason is end portal: broadcast "%player% took the end portal to the overworld!"Expression Result
Section titled “ Expression Result”Runs something (like a function) and returns its result.
If the thing is expected to return multiple values, use 'results' instead of 'result'.
Since 2.10 Return Type
Object
[the] result[s] of [running|executing] %executable% [with arg[ument]s %objects%]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 trueEffect Return
Section titled “ Effect Return”Makes a trigger or a section (e.g. a function) return a value
Since 2.2, 2.8.0 (returns aliases)
return %objects%function double(i: number) :: number: return 2 * {_i}function divide(i: number) returns number: return {_i} / 2Expression Reversed List
Section titled “ Expression Reversed List”Reverses given list.
Since 2.4, 2.14 (retain indices when looping) Return Type
Object
reversed %objects%set {_list::*} to reversed {_list::*}Function rgb
Section titled “ Function rgb”Returns a RGB color from the given red, green and blue parameters. Alpha values can be added optionally, but these only take affect in certain situations, like text display backgrounds.
Since 2.5, 2.10 (alpha) Return Type
Color
rgb(red: long, green: long, blue: long, alpha: long = 255)dye player's leggings rgb(120, 30, 45)set the colour of a text display to rgb(10, 50, 100, 50)Effect Ring Bell
Section titled “ Effect Ring Bell”Causes a bell to ring.
Optionally, the entity that rang the bell and the direction the bell should ring can be specified.
A bell can only ring in two directions, and the direction is determined by which way the bell is facing.
By default, the bell will ring in the direction it is facing.
Since 2.9.0
ring %blocks% [from [the]] [%direction%](make|let) %entity% ring %blocks% [from [the]] [%direction%]make player ring target-blockExpression Ringing Time
Section titled “ Expression Ringing Time”Returns the ringing time of a bell.
A bell typically rings for 50 game ticks.
Since 2.9.0 Return Type
Timespan
[the] ring[ing] time of %block%%block%'[s] ring[ing] timebroadcast "The bell has been ringing for %ringing time of target block%"Function root
Section titled “ Function root”Calculates the nth root of a number.
Since 2.11 Return Type
Number
root(n: number, number: number)root(2, 4) = 2 # same as sqrt(4)root(4, 16) = 2root(-4, 16) = 0.5 # same as 16^(-1/4)Effect Rotate
Section titled “ Effect Rotate”Rotates displays, quaternions, or vectors around an axis a set amount of degrees, or around all 3 axes at once.
Vectors can only be rotated around the global X/Y/Z axes, or an arbitrary vector axis.
Quaternions are more flexible, allowing rotation around the global or local X/Y/Z axes, arbitrary vectors, or all 3 local axes at once.
Global axes are the ones in the Minecraft world. Local axes are relative to how the quaternion is already oriented.
Rotating a display is a shortcut for rotating its left rotation. If the right rotation needs to be modified, it should be acquired, rotated, and re-set.
Note that rotating a quaternion/display around a vector results in a rotation around the local vector, so results may not be what you expect. For example, rotating quaternions/displays around vector(1, 0, 0) is the same as rotating around the local X axis.
The same applies to rotations by all three axes at once. In addition, rotating around all three axes of a quaternion/display at once will rotate in ZYX order, meaning the Z rotation will be applied first and the X rotation last.
Since 2.2-dev28, 2.10 (quaternions, displays)
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%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 135Expression Rotated Quaternion/Vector
Section titled “ Expression Rotated Quaternion/Vector”Rotates a quaternion or vector around an axis a set amount of degrees, or around all 3 axes at once.
Vectors can only be rotated around the global X/Y/Z axes, or an arbitrary vector axis.
Quaternions are more flexible, allowing rotation around the global or local X/Y/Z axes, arbitrary vectors, or all 3 local axes at once.
Global axes are the ones in the Minecraft world. Local axes are relative to how the quaternion is already oriented.
Note that rotating a quaternion around a vector results in a rotation around the local vector, so results may not be what you expect. For example, rotating around vector(1, 0, 0) is the same as rotating around the local X axis.
The same applies to rotations by all three axes at once. In addition, rotating around all three axes of a quaternion/display at once will rotate in ZYX order, meaning the Z rotation will be applied first and the X rotation last.
Since 2.10 Return Type
Object
%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%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 135Expression Rotation Axis/Angle
Section titled “ Expression Rotation Axis/Angle”Returns the axis or angle that a quaternion will rotate by/around.
All quaternions can be represented by a rotation of some amount around some axis, so this expression provides the ability to get that angle/axis.
Since 2.10 Return Type
Object
[the] rotation (angle|axis) of %quaternions%%quaternions%'[s] rotation (angle|axis)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)Function round
Section titled “ Function round”Rounds a number, i.e. returns the closest integer to the argument. Place a second argument to define the decimal placement.
Since 2.2, 2.7 (decimal placement) Return Type
Number
round(n: number, d: number = 0)round(2.34) = 2round(2) = 2round(2.99) = 3round(2.5) = 3Expression Rounding
Section titled “ Expression Rounding”Rounds numbers normally, up (ceiling) or down (floor) respectively.
Since 2.0 Return Type
Number
[a|the] (round[ed] down|floored) %numbers%%numbers% (round[ed] down|floored)[a|the] round[ed] %numbers%%numbers% round[ed][a|the] (round[ed] up|ceil[ing]ed) %numbers%%numbers% (round[ed] up|ceil[ing]ed)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 healthEffect Run
Section titled “ Effect Run”Executes a task (a function). Any returned result is discarded.
Since 2.10
run %executable% [with arg[ument]s %objects%]execute %executable% [with arg[ument]s %objects%]set {_function} to the function named "myFunction"run {_function}run {_function} with arguments {_things::*}Condition Running Minecraft
Section titled “ Condition Running Minecraft”Checks if current Minecraft version is given version or newer.
Since 2.5
running [below] minecraft %text%running minecraft "1.14"Expression Saturation
Section titled “ Expression Saturation”The saturation of a player. If used in a player event, it can be omitted and will default to event-player.
Since 2.2-Fixes-v10, 2.2-dev35 (fully modifiable), 2.6.2 (syntax pattern changed) Return Type
Number
[the] saturation of %players%%players%'[s] saturationset saturation of player to 20Effect Save World
Section titled “ Effect Save World”Save all worlds or a given world manually.
Note: saving many worlds at once may possibly cause the server to freeze.
Since 2.8.0
save [[the] world[s]] %worlds%save "world_nether"save all worldsType Scalable Particle Effect
Section titled “ Type Scalable Particle Effect”A particle effect which can be scaled up or down.
Since 2.14
Expression Scale
Section titled “ Expression Scale”Represents the physical size/scale of something.
For example, the scale of a display entity would be a vector containing multipliers on its size in the x, y, and z axis.
For a particle effect like the sweeping edge particle, scale is a number determining how large the particle should be.
Since 2.14 Return Type
Object
[the] scale[s] of %objects%%objects%'[s] scale[s]set the scale of {_display} to vector(0,2,0)set the scale of {_particle} to 1.5Expression Scoreboard Tags
Section titled “ Expression 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).
Since 2.3 Return Type
Text
[(all [[of] the]|the)] scoreboard tags of %entities%%entities%'[s] scoreboard tagson spawn of a monster: if the spawn reason is mob spawner: add "spawned by a spawner" to the scoreboard tags of event-entity
on death of a monster: if the attacker is a player: if the victim doesn't have the scoreboard tag "spawned by a spawner": add 1$ to attacker's balanceType Script
Section titled “ Type Script”A script loaded by Skript.
Disabled scripts will report as being empty since their content has not been loaded.
Since 2.10
the current scriptExpression Script
Section titled “ Expression Script”The current script, or a script from its (file) name.
If the script is enabled or disabled (or reloaded) this reference will become invalid.
Therefore, it is recommended to obtain a script reference when needed.
Since 2.0 Return Type
Script
[the] [current] script[the] script[s] [named] %texts%[the] scripts in [directory|folder] %text%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-valueExpression Sea Level
Section titled “ Expression Sea Level”Gets the sea level of a world.
Since 2.5.1 Return Type
Number
[the] sea level of %worlds%%worlds%'[s] sea levelsend "The sea level in your world is %sea level in player's world%"Expression Sea Pickles
Section titled “ Expression Sea Pickles”An expression to obtain or modify data relating to the pickles of a sea pickle block.
Since 2.7 Return Type
Number
[the] [(min|max)[imum]] [sea] pickle(s| (count|amount)) of %blocks%%blocks%'[s] [(min|max)[imum]] [sea] pickle(s| (count|amount))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!!"Expression Seed of Loot Table
Section titled “ Expression Seed of Loot Table”Returns the seed of a loot table. Setting the seed of a block or entity that does not have a loot table will not do anything.
Since 2.10 Return Type
Number
[the] loot[[ ]table] seed[s] of %entities/blocks%%entities/blocks%'[s] loot[[ ]table] seed[s]set {_seed} loot table seed of blockset loot table seed of entity to 123456789Effect Send Block Change
Section titled “ Effect Send Block Change”Makes a player see a block as something else or as the original.
Since 2.2-dev37c, 2.5.1 (block data support), 2.12 (as original)
make %players% see %locations% as %item type/block data%make %players% see %locations% as [the|its] (original|normal|actual) [block]make player see block at player as dirtmake player see player's target block as campfire[facing=south]make all players see (blocks in radius 5 of location(0, 0, 0)) as bedrockmake all players see (blocks in radius 5 of location(0, 0, 0)) as originalEffect Send Resource Pack
Section titled “ Effect Send Resource Pack”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
The resource pack request action can be used to check
status of the sent resource pack request.
Since 2.4
send [the] resource pack [from [[the] URL]] %text% to %players%send [the] resource pack [from [[the] URL]] %text% with hash %text% to %players%on join: send the resource pack from "URL" with hash "hash" to the playerExpression Sent Command List
Section titled “ Expression Sent Command 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.
Since 2.8.0 Return Type
Text
Applicable EventsOn Send Command List
[the] [sent] [server] command[s] liston send command list: set command list to command list where [input does not contain ":"] remove "help" from command listType Server Icon
Section titled “ Type Server Icon”A server icon that was loaded using the load server icon effect.
Since 2.3
Expression Server Icon
Section titled “ Expression Server Icon”Icon of the server in the server list. Can be set to an icon that loaded using the
load server icon effect,
or can be reset to the default icon in a server list ping.
'default server icon' returns the default server icon (server-icon.png) always and cannot be changed.
Since 2.3 Return Type
Server Icon
[the] [((default)|(shown|sent))] [server] iconon script load: set {server-icons::default} to the default server iconExpression Sets
Section titled “ Expression Sets”Returns a list of all the values of a type. Useful for looping.
Since 1.0 pre-5, 2.7 (classinfo) Return Type
Object
[all [[of] the]|the|every] %*type%loop all attribute types: set loop-value attribute of player to 10 message "Set attribute %loop-value% to 10!"Effect Shear
Section titled “ Effect Shear”Shears or un-shears a shearable entity with drops by shearing and a 'sheared' sound. Using with 'force' will force this effect despite the entity's 'shear state'.
Please note that..:
- Force-shearing or un-shearing on a sheared mushroom cow is not possible
Since 2.0 (cows, sheep & snowmen), 2.8.0 (all shearable entities)
[force] shear %living entities%un[-]shear %living entities%on rightclick on a sheep holding a sword: shear the clicked sheep chance of 10% force shear the clicked sheepSection Shoot
Section titled “ Section Shoot”Shoots a projectile (or any other entity) from a given entity or location.
Since 2.10
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%]shoot arrow from all players at speed 2shoot a pig from all players: add event-entity to {_projectiles::*}Expression Shooter
Section titled “ Expression Shooter”The shooter of a projectile.
Since 1.3.7, 2.11 (entity shoot bow event) Return Type
Living Entity
[the] shooter [of %projectile%]shooter is a skeletonExpression Shuffled List
Section titled “ Expression Shuffled List”Shuffles given list randomly.
Since 2.2-dev32, 2.14 (retain indices when looping) Return Type
Object
shuffled %objects%set {_list::*} to shuffled {_list::*}Expression Sign Text
Section titled “ Expression Sign Text”A line of text on a sign. Can be changed, but remember that there is a 16 character limit per line (including color codes that use 2 characters each).
Since 1.3 Return Type
Text
[the] line %number% [of %block%][the] (1st|first|2nd|second|3rd|third|4th|fourth) line [of %block%]on rightclick on sign: line 2 of the clicked block is "[Heal]": heal the player set line 3 to "%player%"Effect Silence Entity
Section titled “ Effect Silence Entity”Controls whether or not an entity is silent.
Since 2.5
silence %entities%unsilence %entities%make %entities% silentmake %entities% not silentmake target entity silentExpression Simulation Distance
Section titled “ Expression Simulation Distance”The simulation distance of a world or a player.
Simulation distance is the minimum distance in chunks for entities to tick.
Simulation distance is capped to the current view distance of the world or player.
The view distance is capped between 2 and 32 chunks.
Since 2.11 Return Type
Number
[the] simulation distance[s] of %worlds/players%%worlds/players%'[s] simulation distance[s]set simulation distance of player to 10add 50 to the simulation distance of world "world"reset the simulation distance of playerclear the simulation distance of world "world"Function sin
Section titled “ Function sin”The sine function. It starts at 0° with a value of 0, goes to 1 at 90°, back to 0 at 180°, to -1 at 270° and then repeats every 360°. Uses degrees, not radians.
Since 2.2 Return Type
Number
sin(n: number)sin(90) = 1sin(60) = 0.866Expression Size
Section titled “ Expression Size”The size of something. Using 'size of {list::*}' will return the length of the list, so if you want the sizes of the things inside the lists, use 'sizes of {list::*}'.
Since 1.0, 2.13 (sizes of) Return Type
Object
[the] size[s] of %objects%%objects%'[s] size[s]message "There are %size of all players% players online!"Expression Size of World Border
Section titled “ Expression Size of World Border”The size of a world border.
The size can not be smaller than 1.
Since 2.11 Return Type
Number
[the] world[ ]border (size|diameter|radius) [of %worldborders%]%worldborders%'[s] world[ ]border (size|diameter|radius)set world border radius of {_worldborder} to 10Expression Skull Owner
Section titled “ Expression Skull Owner”The skull owner of a player skull.
Since 2.9.0, 2.10 (of items) Return Type
Offline Player
[the] (head|skull) owner of %slots/item types/item stacks/blocks%%slots/item types/item stacks/blocks%'[s] (head|skull) ownerset {_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}Type Slot
Section titled “ Type Slot”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.
set tool of player to dirtdelete helmet of the victimset the color of the player's tool to greenenchant the player's chestplate with projectile protection 5Expression Slot Index
Section titled “ Expression Slot 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
Since 2.2-dev35, 2.8.0 (raw index) Return Type
Number
[the] [(raw|unique)] index of %slots%%slots%'[s] [(raw|unique)] indexif 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 eventEffect Sort
Section titled “ Effect Sort”Sorts a list variable using either the natural ordering of the contents or the results of the given expression.
Be warned, this will overwrite the indices of the list variable.
When using the full sort %~objects% (by|based on) <expression> pattern,
the input expression can be used to refer to the current item being sorted.
(See input expression for more information.)
Since 2.9.0, 2.10 (sort order)
sort %~objects% [in (descending|ascending) order] [(by|based on) <.+>]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 valueExpression Sorted List
Section titled “ Expression Sorted List”Sorts given list in natural order. All objects in list must be comparable; if they're not, this expression will return nothing.
Since 2.2-dev19, 2.14 (retain indices when looping) Return Type
Object
sorted %objects%set {_sorted::*} to sorted {_players::*}command /leaderboard: trigger: loop reversed sorted {most-kills::*}: send "%loop-counter%. %loop-index% with %loop-value% kills" to senderType Sound Category
Section titled “ Type Sound Category”The category of a sound, they are used for sound options of Minecraft. See the play sound and stop sound effects.
Since 2.4
hostile creatures category, speech category, records category, friendly creature category, noteblock category, hostile creature category, note block category, voice category, ambient category, ui, noteblocks category, note blocks category, weather category, block category, friendly mob category, jukebox category, hostile mob category, master category, master volume category, hostile category, record category, user interface, blocks category, environment category, jukeboxes category, player category, players category, hostile mobs category, friendly mobs category, music category, friendly creatures category, neutral categoryExpression Source Block
Section titled “ Expression Source Block”The source block in a spread event.
Since 2.7 Return Type
Block
Applicable EventsOn Spread
[the] source blockon spread: if the source block is a grass block: set the source block to dirtSection Spawn
Section titled “ Section Spawn”Spawns entities. This can be used as an effect and as a section.
If it is used as a section, the section is run before the entity is added to the world.
You can modify the entity in this section, using for example 'event-entity' or 'cow'.
Do note that other event values, such as 'player', won't work in this section.
If you're spawning a display and want it to be empty on initialization, like not having a block display be stone, set hidden config node 'spawn empty displays' to true.
Note that when spawning an entity via entity snapshots, the code within the section will not run instantaneously as compared to spawning normally (via 'a zombie').
Since 1.0, 2.6.1 (with section), 2.8.6 (dropped items), 2.10 (entity snapshots)
(spawn|summon) %entity types/entity snapshots% [%directions% %locations%](spawn|summon) %number% of %entity types/entity snapshots% [%directions% %locations%]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 axisExpression Spawn
Section titled “ Expression Spawn”The spawn point of a world.
Since 1.4.2 Return Type
Location
[the] spawn[s] [(point|location)[s]] [of %worlds%]%worlds%'[s] spawn[s] [(point|location)[s]]teleport all players to spawnset the spawn point of "world" to the player's locationExpression Spawn Egg Entity
Section titled “ Expression Spawn Egg Entity”Gets or sets the entity snapshot that the provided spawn eggs will spawn when used.
Since 2.10 Return Type
Entity Snapshot
[the] spawn egg entity of %item stacks/item types/slots%%item stacks/item types/slots%'[s] spawn egg entityset {_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 zombiedispense egg, egg, village defense, ocelot baby, silverfish trap, village invading, trap, dispensing egg, shoulder, drowned, metamorphosis, lightning, silverfish reveal, spell, built iron golem, natural, trial mob spawner, village invasion, frozen, mount, rehydration, build wither, built wither, iron golem defense, ender pearl, creature spawner, reinforcements, build snowman, build iron golem, rehydrated, breeding, raid, ominous item spawner, built copper golem, infection, customized, reanimate spawn reasons, potion effect, spawn egg, jockey, beehive, default, release from bucket, golem defense, patrol, slime split, infected, sheared, mob spawner, nether portal, trial spawner, shear, perching, custom, built snowman, chunk generation, breed, command, duplication, explosion, spawner, cured, enchantment, trial creature spawner, customised, piglin zombification, build copper golemExpression Spawn Reason
Section titled “ Expression Spawn Reason”The spawn reason in a spawn event.
Since 2.3 Return Type
Spawn Reason
[the] spawn[ing] reasonon spawn: spawn reason is reinforcements or breeding cancel eventExpression Spawner Type
Section titled “ Expression Spawner Type”The entity type of a spawner (mob spawner). Change the entity type, reset it (pig) or clear it (Minecraft 1.20.0+).
Since 2.4, 2.9.2 (trial spawner), 2.12 (delete) Return Type
Entity Type
[the] (spawner|entity|creature) type[s] of %blocks%%blocks%'[s] (spawner|entity|creature) type[s]on right click: if event-block is a spawner: send "Spawner's type if %spawner type of event-block%" to playerset the creature type of {_spawner} to a trader llamareset {_spawner}'s entity type # Pigclear the spawner type of {_spawner} # Minecraft 1.20.0+Expression Spectator Target
Section titled “ Expression Spectator Target”Grabs the spectator target entity of the players.
Since 2.4-alpha4, 2.7 (Paper Spectator Event) Return Type
Entity
spectator target [of %players%]%players%'[s] spectator targeton 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 skeletonExpression Speed
Section titled “ Expression 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.
Since unknown (before 2.1) Return Type
Number
[the] (walk[ing]|fl(y[ing]|ight))[( |-)]speed of %players%%players%'[s] (walk[ing]|fl(y[ing]|ight))[( |-)]speedset the player's walk speed to 1increase the argument's fly speed by 0.1Effect Sprinting
Section titled “ Effect Sprinting”Make a player start or stop sprinting.
If the player is not moving when this effect is used, they will be put in sprint mode for a tick and then stopped (this causes the FOV to change). Using it a second time, without the player manually sprinting in between, causes the player to stay in sprint mode, with some quirks.
- Particles may not be produced under the player's feet.
- The player will not exit the sprinting state if they stop moving.
- Restrictions like low hunger will not prevent the player from sprinting
- The player pressing shift will stop them sprinting, and pressing sprint will re-assert normal sprinting behavior
Using this effect two or more consecutive times on a stationary player produces undefined behavior and should not be relied on.
Since 2.11
make %players% (start sprinting|sprint)force %players% to (start sprinting|sprint)make %players% (stop sprinting|not sprint)force %players% to (stop sprinting|not sprint)make player start sprintingforce player to start sprintingFunction sqrt
Section titled “ Function sqrt”The square root, which is the inverse operation to squaring a number (for positive numbers only). This is the same as (argument) ^ (1/2) – other roots can be calculated via number ^ (1/root), e.g. set {_l} to {_volume}^(1/3).
Returns NaN (not a number) if the argument is negative.
Since 2.2 Return Type
Number
sqrt(n: number)sqrt(4) = 2sqrt(2) = 1.4142sqrt(-1) = NaNCondition Starts/Ends With
Section titled “ Condition Starts/Ends With”Checks if a text starts or ends with another.
Since 2.2-dev36, 2.5.1 (multiple strings support)
%texts% (start|end)[s] with %texts%%texts% (doesn't|does not|do not|don't) (start|end) with %texts%if the argument starts with "test" or "debug": send "Stop!"Effect Stop Server
Section titled “ Effect Stop 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.
Since 2.5
(stop|shut[ ]down) [the] serverrestart [the] serverstop the serverrestart serverEffect Stop Sound
Section titled “ Effect Stop Sound”Stops specific or all sounds from playing to a group of players. Both Minecraft sound names and Spigot sound names are supported. Resource pack sounds are supported too. The sound category is 'master' by default. A sound can't be stopped from a different category.
Please note that sound names can get changed in any Minecraft or Spigot version, or even removed from Minecraft itself.
Since 2.4, 2.7 (stop all sounds)
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%]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 categoryCondition Strider Is Shivering
Section titled “ Condition Strider Is Shivering”Whether a strider is shivering.
Since 2.12
%living entities% (is|are) shivering%living entities% (isn't|is not|aren't|are not) shiveringif last spawned strider is shivering: make last spawned strider stop shiveringEffect Strider Shivering
Section titled “ Effect Strider Shivering”Make a strider start/stop shivering.
Since 2.12
make %living entities% start shiveringforce %living entities% to start shiveringmake %living entities% stop shiveringforce %living entities% to stop shiveringif last spawned strider is shivering: make last spawned strider stop shiveringExpression String Colors
Section titled “ Expression String Colors”Retrieve the first, the last, or all of the color objects or color codes of a string.
The retrieved color codes of the string will be formatted with the color symbol.
Since 2.11 Return Type
Object
[all [of the|the]|the] string colo[u]r[s] [code[s]] of %texts%[the] first string colo[u]r[s] [code[s]] of %texts%[the] last string colo[u]r[s] [code[s]] of %texts%set {_colors::*} to the string colors of "<red>hey<blue>yo"set {_color} to the first string color code of "&aGoodbye!"send "%{_color}%Howdy!" to all playersExpression Substring
Section titled “ Expression Substring”Extracts part of a text. You can either get the first <x> characters, the last <x> characters, the character at index <x>, or the characters between indices <x> and <y>. The indices <x> and <y> should be between 1 and the length of the text (other values will be fit into this range).
Since 2.1, 2.5.2 (character at, multiple strings support) Return Type
Text
[the] (part|sub[ ](text|string)) of %texts% (between|from) [ind(ex|ices)|character[s]] %number% (and|to) [(index|character)] %number%[the] (first|last) [%number%] character[s] of %texts%[the] %number% (first|last) characters of %texts%[the] character[s] at [(index|position|indexes|indices|positions)] %numbers% (in|of) %texts%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' namessum(ns: numbers)sum(1) = 1sum(2, 3, 4) = 9sum({some list variable::*})sum(2, {_v::*}, and the player's y-coordinate)Effect Suppress Type Hints (Experimental)
Section titled “ Effect Suppress Type Hints (Experimental)”An effect to suppress local variable type hint errors for the syntax lines that follow this effect.
NOTE: Suppressing type hints also prevents syntax from providing new type hints. For example, with type hints suppressed, 'set {_x} to true' would not provide 'boolean' as a type hint for '{_x}'
Since 2.12
[un]suppress [local variable] type hints(start|stop) suppressing [local variable] type hints start suppressing local variable type hints # potentially unsafe code goes here stop suppressing local variable type hintsEffect Swing Hand
Section titled “ Effect Swing Hand”Makes an entity swing their hand. This does nothing if the entity does not have an animation for swinging their hand.
Since 2.5.1
make %living entities% swing [their] [main] handmake %living entities% swing [their] off[ ]handmake player swing their main handExpression Tab List Name
Section titled “ Expression Tab List Name”Represents the name of a player that shows up in the tab list.
Since before 2.1 Return Type
Text
[the] (player|tab)[ ]list name[s] of %players%%players%'[s] (player|tab)[ ]list name[s]on join: player has permission "name.red" set the player's tab list name to "<green>%player's name%"Expression Tablisted Players
Section titled “ Expression Tablisted Players”The players shown in the tab lists of the specified players.
`delete` will remove all the online players from the tab list.
`reset` will reset the tab list to the default state, which makes all players visible again.
Since 2.13 Return Type
Player
[the] (tablist[ed]|listed) players [of %players%]%players%'[s] (tablist[ed]|listed) playerstablist players of playerExpression Tag
Section titled “ Expression Tag”Represents a tag which can be used to classify items, blocks, or entities.
Tags are composed of a value and an optional namespace: "minecraft:oak_logs".
If you omit the namespace, one will be provided for you, depending on what kind of tag you're using. For example, `tag "doors"` will be the tag "minecraft:doors", while `paper tag "doors"` will be "paper:doors".
`minecraft tag` will search through the vanilla tags, `datapack tag` will search for datapack-provided tags (a namespace is required here!), `paper tag` will search for Paper's custom tags if you are running Paper, and `custom tag` will look in the "skript" namespace for custom tags you've registered.
You can also filter by tag types using "item", "block", or "entity".
Since 2.10 Return Type
Minecraft Tag
[minecraft|datapack|paper|(custom|skript)] [item|block|entity [type]] tag %texts%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_withExpression Tag Namespaced Key
Section titled “ Expression Tag Namespaced Key”The namespaced key of a minecraft tag. This takes the form of "namespace:key", e.g. "minecraft:dirt".
Since 2.10 Return Type
Text
[the] [namespace[d]] key[s] of %minecraft tags%%minecraft tags%'[s] [namespace[d]] key[s]broadcast namespaced keys of the tags of player's toolif the key of {_my-tag} is "minecraft:stone": return trueExpression Tags Contents
Section titled “ Expression Tags Contents”Returns all the values that a tag contains.
For item and block tags, this will return items. For entity tags, it will return entity datas (a creeper, a zombie).
Since 2.10 Return Type
Object
[the] tag (contents|values) of %minecraft tag%%minecraft tag%'[s] tag (contents|values)broadcast tag values of minecraft tag "dirt"broadcast (first element of player's tool's block tags)'s tag contentsExpression Tags of X
Section titled “ Expression Tags of X”Returns all the tags of an item, block, or entity.
`minecraft tag` will return only the vanilla tags, `datapack tag` will return only datapack-provided tags, `paper tag` will return only Paper's custom tags (if you are running Paper), and `custom tag` will look in the "skript" namespace for custom tags you've registered.
You can also filter by tag types using "item", "block", or "entity".
Since 2.10 Return Type
Minecraft Tag
[all [[of] the]|the] [minecraft|datapack|paper|(custom|skript)] [item|block|entity [type]] tags of %item type/entity/entity type%%item type/entity/entity type%'[s] [minecraft|datapack|paper|(custom|skript)] [item|block|entity [type]] tagsbroadcast minecraft tags of dirtsend true if paper item tags of target block contains paper tag "doors"broadcast the block tags of player's toolEffect Tame / Untame
Section titled “ Effect Tame / Untame”Tame a tameable entity (horse, parrot, cat, etc.).
Since 2.10
[un](tame|domesticate) %entities%tame {_horse}untame {_horse}Expression Tamer
Section titled “ Expression Tamer”The tamer of an entity. Can only be used in entity tame events. You can use 'event-entity' to refer tamed entity itself.
Since 2.2-dev25 Return Type
Player
[the] tameron tame: if the tamer is a player: send "someone tamed something!" to consoleFunction tan
Section titled “ Function tan”The tangent function. This is basically sin(arg)/cos(arg). Uses degrees, not radians.
Since 2.2 Return Type
Number
tan(n: number)tan(0) = 0tan(45) = 1tan(89.99) = 5729.5779Expression Target
Section titled “ Expression Target”For players this is the entity at the crosshair.
For mobs and experience orbs this is the entity they are attacking/following (if any).
The 'ray size' and 'ignoring blocks' options are only valid for players' targets.
The 'ray size' option effectively increases the area around the crosshair an entity can be in. It does so by expanding the hitboxes of entities by the given amount. Display entities have a hit box of 0, so using the 'ray size' option can be helpful when targeting them.
May grab entities in unloaded chunks.
Since 1.4.2, 2.7 (Reset), 2.8.0 (ignore blocks, ray size) Return Type
Entity
[the] target[[ed] %*entity type%] [of %living entities%] [ignoring blocks] [[with|at] [a] ray[ ]size [of] %number%]%living entities%'[s] target[[ed] %*entity type%] [ignoring blocks] [[with|at] [a] ray[ ]size [of] %number%]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-lessExpression Targeted Block
Section titled “ Expression Targeted Block”The block at the crosshair. This regards all blocks that are not air as fully solid, e.g. torches will be like a solid stone block for this expression.
The actual target block will regard the actual hit box of the block.
Since 1.0, 2.9.0 (actual/exact) Return Type
Block
[the] [(actual[ly]|exact)] target[ed] block[s] [of %living entities%]%living entities%'[s] [(actual[ly]|exact)] target[ed] block[s]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 playerEffect Teleport
Section titled “ Effect Teleport”Teleport an entity to a specific location.
This effect is delayed by default on Paper, meaning certain syntax such as the return effect for functions cannot be used after this effect.
The keyword 'force' indicates this effect will not be delayed,
which may cause lag spikes or server crashes when using this effect to teleport entities to unloaded chunks.
Teleport flags are settings to retain during a teleport. Such as direction, passengers, x coordinate, etc.
Since 1.0, 2.10 (flags)
[force] teleport %entities% (to|%direction%) %location% [[while] retaining %teleport flags%]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 passengersType Teleport Cause
Section titled “ Type Teleport Cause”The teleport cause in a teleport event.
Since 2.2-dev35
bed exit, nether portal, ender gateway, exiting bed, consumable effect, ender portal, command, unknown, plugin, dismounted, ender pearl, spectator, spectate, end gateway, exit bed, gateway, dismount, end portalExpression Teleport Cause
Section titled “ Expression Teleport Cause”The teleport cause within a player teleport event.
Since 2.2-dev35 Return Type
Teleport Cause
[the] teleport (cause|reason|type)on teleport: teleport cause is nether portal, end portal or end gateway cancel eventType Teleport Flag
Section titled “ Type Teleport Flag”Teleport Flags are settings to retain during a teleport.
Since 2.10
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 velocityExpression Temperature
Section titled “ Expression Temperature”Temperature at given block.
Since 2.2-dev35 Return Type
Number
[the] temperature[s] of %blocks%%blocks%'[s] temperature[s]message "%temperature of the targeted block%"Expression Ternary
Section titled “ Expression Ternary”A shorthand expression for returning something based on a condition.
Since 2.2-dev36 Return Type
Object
%objects% if <.+>[,] (otherwise|else) %objects%set {points} to 500 if {admin::%player's uuid%} is set else 100Type Text
Section titled “ Type Text”Text is simply text, i.e. a sequence of characters, which can optionally contain expressions which will be replaced with a meaningful representation (e.g. %player% will be replaced with the player's name).
Because scripts are also text, you have to put text into double quotes to tell Skript which part of the line is an effect/expression and which part is the text.
Please read the article on Texts and Variable Names to learn more.
Since 1.0
simple: "..."quotes: "...""..."expressions: "...%expression%..."percent "...%%..."broadcast "Hello World!"message "Hello %player%"message "The id of ""%type of tool%"" is %id of tool%."Expression Text Display Alignment
Section titled “ Expression Text Display Alignment”Returns or changes the alignment setting of text displays.
Since 2.10 Return Type
Display Text Alignment
[the] text alignment[s] [of %displays%]%displays%'[s] text alignment[s]set text alignment of the last spawned text display to left alignedEffect Text Display Drop Shadow
Section titled “ Effect Text Display Drop Shadow”Applies or removes drop shadow from the displayed text on a text display.
Since 2.10
(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] textapply drop shadow to last spawned text displayif {_display} has drop shadow: remove drop shadow from the text of {_display}Condition Text Display Has Drop Shadow
Section titled “ Condition Text Display Has Drop Shadow”Returns whether the text of a display has drop shadow applied.
Since 2.10
[[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) shadowif {_display} has drop shadow: remove drop shadow from the text of {_display}Expression Text Display Line Width
Section titled “ Expression Text Display Line Width”Returns or changes the line width of text displays. Default is 200.
Since 2.10 Return Type
Number
[the] line width [of %displays%]%displays%'[s] line widthset the line width of the last spawned text display to 300Expression Text Display Opacity
Section titled “ Expression Text Display Opacity”Returns or changes the text opacity of text displays. The default is 255, fully opaque. Values are between 0 and 255. 0 to 3 are treated the same as 255, meaning fully opaque. Values from 4 to 26 are fully transparent, and opacity increases linearly from there up to 255. For backwards compatability, setting negative values between -1 and -128 wrap around, so -1 is the same as 255 and -128 is the same as 128. Adding or subtracting values will adjust the opacity within the bounds of 0-255, so subtracting 300 wil always result in an opacity of 0.
Since 2.10, 2.14 (0-255) Return Type
Number
[the] [display] [text] opacity [of %displays%]%displays%'[s] [display] [text] opacityset the text opacity of the last spawned text display to 0 # fully opaqueset text opacity of all text displays to 255 # fully opaqueset text opacity of all text displays to 128 # semi-transparentset text opacity of all text displays to 4 # fully transparentEffect Text Display See Through Blocks
Section titled “ Effect Text Display See Through Blocks”Forces a text display to either be or not be visible through blocks.
Since 2.10
make %displays% visible through (blocks|walls)force %displays% to be visible through (blocks|walls)(prevent|block) %displays% from being (visible|seen) through (blocks|walls)force last spawned text display to be visible through wallsprevent all text displays from being visible through wallsCondition Text Display Visible Through Blocks
Section titled “ Condition Text Display Visible Through Blocks”Returns whether text displays can be seen through blocks or not.
Since 2.10
%displays% (is|are) visible through (blocks|walls)%displays% (isn't|is not|aren't|are not) visible through (blocks|walls)if last spawned text display is visible through walls: prevent last spawned text display from being visible through wallsExpression Text Of
Section titled “ Expression Text Of”Returns or changes the text/string of displays.
Note that currently you can only use Skript chat codes when running Paper.
Since 2.10 Return Type
Text
[the] text[s] of %displays%%displays%'[s] text[s]set text of the last spawned text display to "example"Expression The Egg
Section titled “ Expression The Egg”The egg thrown in a Player Egg Throw event.
Since 2.7 Return Type
Projectile
Applicable EventsOn Egg Throw
[the] [thrown] eggspawn an egg at the eggType Time
Section titled “ Type Time”A time is a point in a minecraft day's time (i.e. ranges from 0:00 to 23:59), which can vary per world.
See date and timespan for the other time types of Skript.
Since 1.0
##:####[##][ ]am/pmat 20:00: time is 8 pm broadcast "It's %time%"Condition Time
Section titled “ Condition Time”Tests whether a given real time was more or less than some time span ago.
Since 2.0
%date% (was|were)( more|(n't| not) less) than %time span% [ago]%date% (was|were)((n't| not) more| less) than %time span% [ago]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 ...Expression Time
Section titled “ Expression Time”The time of a world.
Use the "minecraft timespan" syntax to change the time according to Minecraft's time intervals.
Since Minecraft uses discrete intervals for time (ticks), changing the time by real-world minutes or real-world seconds only changes it approximately.
Removing an amount of time from a world's time will move the clock forward a day.
Since 1.0 Return Type
Time
[the] time[s] [([with]in|of) %worlds%]%worlds%'[s] time[s]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 hourExpression Time Lived of Entity
Section titled “ Expression Time Lived of Entity”Returns the total amount of time the entity has lived. Note: This does not reset when a player dies.
Since 2.13 Return Type
Timespan
[the] time (alive|lived) of %entities%%entities%'[s] time (alive|lived)clear all entities where [input's time lived > 1 hour]on right click on entity: send "%entity% has lived for %time lived of entity%" to playerExpression Time Played
Section titled “ Expression 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 <none>.
Since 2.5, 2.7 (offline players) Return Type
Timespan
[the] (time played|play[ ]time) of %offline players%%offline players%'[s] (time played|play[ ]time)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 secondsExpression Time Since/Until
Section titled “ Expression Time Since/Until”The time since a date has passed or the time until a date will pass.
This expression will return 0 seconds if the time since or time until would be negative, e.g. if one tries to get the time since a future date.
Since 2.5, 2.10 (time until) Return Type
Timespan
[the] time since %dates%[the] (time [remaining]|remaining time) until %dates%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 playerType Timeperiod
Section titled “ Type Timeperiod”A period of time between two times. Mostly useful since you can use this to test for whether it's day, night, dusk or dawn in a specific world.
This type might be removed in the future as you can use 'time of world is between x and y' as a replacement.
Since 1.0
##:## - ##dusk/day/dawn/nighttime in world is nightType Timespan
Section titled “ Type Timespan”A timespan is a difference of two different dates or times, e.g '10 minutes'. Timespans are always displayed as real life time, but can be defined as minecraft time, e.g. '5 minecraft days and 12 hours'.
NOTE: Months always have the value of 30 days, and years of 365 days.
See date and time for the other time types of Skript.
Since 1.0, 2.6.1 (weeks, months, years)
<number> [minecraft/mc/real/rl/irl] ticks/seconds/minutes/hours/days/weeks/months/years [[,/and] <more...>][]##:##[.####] ([]minutes:seconds[.milliseconds])every 5 minecraft days: wait a minecraft second and 5 ticksevery 10 mc days and 12 hours: halt for 12.7 irl minutes, 12 hours and 120.5 secondsExpression Timespan Details
Section titled “ Expression Timespan Details”Retrieve specific information of a timespan such as hours/minutes/etc.
Since 2.9.0 Return Type
Number
[the] ((tick|second|minute|hour|day|week|month|year))s of %time spans%%time spans%'[s] ((tick|second|minute|hour|day|week|month|year))sset {_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."Effect Title - Reset
Section titled “ Effect Title - Reset”Resets the title of the player to the default values.
Since 2.3
reset [the] title[s] [of %players%]reset [the] %players%'[s] title[s]reset the titles of all playersreset the titleEffect Title - Send
Section titled “ Effect Title - Send”Sends a title/subtitle to the given player(s) with optional fadein/stay/fadeout times for Minecraft versions 1.11 and above.
If you're sending only the subtitle, it will be shown only if there's a title displayed at the moment, otherwise it will be sent with the next title. To show only the subtitle, use: send title " " with subtitle "yourtexthere" to player.
Note: if no input is given for the times, it will keep the ones from the last title sent, use the reset title effect to restore the default values.
Since 2.3
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%]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 playersFunction toBase
Section titled “ Function toBase”Turns a number in a string using a specific base (decimal, hexadecimal, octal). For example, converting 32 to hexadecimal (base 16) would be 'toBase(32, 16)', which would return "20". You can use any base between 2 and 36.
Since 2.14 Return Type
Text
toBase(n: objects, base: integer between 2 and 36)send "Decode this binary number for a prize! %toBase({_guess}, 2)%"Effect Toggle
Section titled “ Effect Toggle”Toggle the state of a block or boolean.
Since 1.4, 2.12 (booleans)
(open|turn on|activate) %blocks%(close|turn off|de[-]activate) %blocks%(toggle|switch) [[the] state of] %blocks/booleans (yes/no)%# use arrows to toggle switches, doors, etc.on projectile hit: projectile is arrow toggle the block at the arrow# With booleanstoggle gravity of playerEffect Toggle Custom Name Visibility
Section titled “ Effect Toggle Custom Name Visibility”Toggles the custom name visibility of an entity.
Since 2.10
(show|hide) [the] (custom|display)[ ]name of %entities%(show|hide) %entities%'[s] (custom|display)[ ]nameshow the custom name of event-entityhide target's display nameEffect Toggle Flight
Section titled “ Effect Toggle Flight”Toggle the flight mode of a player.
Since 2.3
(allow|enable) (fly|flight) (for|to) %players%(disallow|disable) (fly|flight) (for|to) %players%allow flight to event-playerEffect Toggle Picking Up Items
Section titled “ Effect Toggle Picking Up Items”Determines whether living entities are able to pick up items or not
Since 2.8.0
allow %living entities% to pick([ ]up items| items up)(forbid|disallow) %living entities% (from|to) pick([ing | ]up items|[ing] items up)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 itemsExpression Tool
Section titled “ Expression Tool”The item an entity is holding in their main or off hand.
Since 1.0 Return Type
Slot
[the] (tool|held item|weapon) [of %living entities%]%living entities%'[s] (tool|held item|weapon)[the] off[ ]hand (tool|item) [of %living entities%]%living entities%'[s] off[ ]hand (tool|item)player's tool is tagged with minecraft tag "pickaxes"player's off hand tool is a shieldset tool of all players to a diamond swordset offhand tool of target entity to a bowExpression Total Experience
Section titled “ Expression 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.
Since 2.7 Return Type
Number
[the] [total] experience of %entities%%entities%'[s] [total] experienceset 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 diamondExpression TPS (ticks per second)
Section titled “ Expression TPS (ticks per second)”Returns the 3 most recent TPS readings, like the /tps command. This expression is only supported on some server software (PaperSpigot).
Since 2.2-dev36 Return Type
Number
tps from [the] last ([1] minute|1[ ]m[inute])tps from [the] last 5[ ]m[inutes]tps from [the] last 15[ ]m[inutes][the] tpsbroadcast "%tps%"Effect Transform List
Section titled “ Effect Transform List”Transforms (or 'maps') a list's values using a given expression. This is akin to looping over the list and setting each value to a modified version of itself.
Evaluates the given expression for each element in the list, replacing the original element with the expression's result.
If the given expression returns a single value, the indices of the list will not change. If the expression returns multiple values, then then indices will be reset as a single index cannot contain multiple values.
Only variable lists can be transformed with this effect. For other lists, see the transform expression.
Since 2.10
(transform|map) %~objects% (using|with) <.+>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::*} with 0Type Transform Reason
Section titled “ Type Transform Reason”Represents a transform reason of an entity transform event.
Since 2.8.0
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 zombificationExpression Transform Reason
Section titled “ Expression Transform Reason”The transform reason within an entity entity transform event.
Since 2.8.0 Return Type
Transform Reason
[the] transform[ing] (cause|reason|type)on entity transform: transform reason is infection, drowned or frozenExpression Transformed List
Section titled “ Expression Transformed List”Transforms (or 'maps') a list's values using a given expression. This is akin to looping over the list and getting a modified version of each value.
If the given expression returns a single value, the indices of the list will not change. If the expression returns multiple values, then then indices will be reset as a single index cannot contain multiple values.
Since 2.10 Return Type
Object
%objects% (transformed|mapped) (using|with) \[<.+>\]%objects% (transformed|mapped) (using|with) \(<.+>\)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 keyed {clans::*} transformed using [{clans::%input index%::size}]# using the 'keyed' expression retains the indices of the clans listEffect Tree
Section titled “ Effect Tree”Creates a tree.
This may require that there is enough space above the given location and that the block below is dirt/grass, but it is possible that the tree will just grow anyways, possibly replacing every block in its path.
Since 1.0
(grow|create|generate) tree [of type %tree type%] %directions% %locations%(grow|create|generate) %tree type% %directions% %locations%grow a tall redwood tree above the clicked blockType Tree Type
Section titled “ Type Tree Type”A tree type represents a tree species or a huge mushroom species. These can be generated in a world with the generate tree effect.
[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.grow any regular tree at the blockgrow a huge red mushroom above the blockType Type
Section titled “ Type Type”Represents a type, e.g. number, object, item type, location, block, world, entity type, etc.
This is mostly used for expressions like 'event-
Since 2.0
See the type name patterns of all types - including this one{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-worldkill the loop-entityExpression Type of
Section titled “ Expression Type of”Type of a block, item, entity, inventory, potion effect or enchantment type.
Types of items, blocks and block datas are item types similar to them but have amounts
of one, no display names and, on Minecraft 1.13 and newer versions, are undamaged.
Types of entities and inventories are entity types and inventory types known to Skript.
Types of potion effects are potion effect types.
Types of enchantment types are enchantments.
Since 1.4, 2.5.2 (potion effect), 2.7 (block datas), 2.10 (enchantment type) Return Type
Object
[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] typeon rightclick on an entity: message "This is a %type of clicked entity%!"Expression Unbreakable Items
Section titled “ Expression Unbreakable Items”Creates breakable or unbreakable copies of given items.
Since 2.2-dev13b, 2.9.0 (breakable) Return Type
Item Type
[un]breakable %item types%set {_item} to unbreakable iron swordgive breakable {_weapon} to all playersExpression Unix Date
Section titled “ Expression Unix Date”Converts given Unix timestamp to a date. The Unix timespan represents the number of seconds elapsed since 1 January 1970.
Since 2.5 Return Type
Date
[the] unix date of %numbers%%numbers%'[s] unix dateunix date of 946684800 #1 January 2000 12:00 AM (UTC Time)Expression Unix Timestamp
Section titled “ Expression Unix Timestamp”Converts given date to Unix timestamp. This is roughly how many seconds have elapsed since 1 January 1970.
Since 2.2-dev31 Return Type
Number
[the] unix timestamp of %dates%%dates%'[s] unix timestampunix timestamp of nowType Unleash Reason
Section titled “ Type Unleash Reason”Represents an unleash reason of an unleash event.
Since 2.10
player unleashed, distance, unleashed by player, player unleash, holder (gone|disappeared), unknownExpression Unleash Reason
Section titled “ Expression Unleash Reason”The unleash reason in an unleash event.
Since 2.10 Return Type
Unleash Reason
Applicable EventsOn Leash / Unleash
[the] unleash[ing] reasonif the unleash reason is distance: broadcast "The leash was snapped in half."Effect Update Block
Section titled “ Effect Update Block”Updates the blocks by setting them to a selected block
Using 'without physics' will not send updates to the surrounding blocks of the blocks being set.
Example: Updating a block next to a sand block in the air 'without physics' will not cause the sand block to fall.
Since 2.10
update %blocks% (as|to be) %block data% [without [neighbo[u]r[ing]|adjacent] [physics] update[s]]update {_blocks::*} as gravelupdate {_blocks::*} to be sand without physics updatesupdate {_blocks::*} as stone without neighbouring updatesStructure Using Experimental Feature
Section titled “ Structure Using Experimental Feature”Place at the top of a script file to enable an optional experimental feature.
Experimental features may change behavior in Skript and may contain bugs. Use at your own discretion.
A list of the available experimental features can be found in the changelog for your version of Skript.
Since 2.9.0
using [[the] experiment] <.+>using 1.21using the experiment my-cool-addon-featureFunction uuid
Section titled “ Function uuid”Returns a UUID from the given string. The string must be in the format of a UUID.
Since 2.11 Return Type
UUID
uuid(uuid: string)uuid("069a79f4-44e9-4726-a5be-fca90e38aaf5")Type UUID
Section titled “ Type UUID”UUIDs are unique identifiers that ensure things can be reliably distinguished from each other. They are generated in a way that makes it practically impossible for duplicates to occur.
Read more about UUIDs and how they are used in Minecraft in the wiki entry about UUIDs.
Since 2.11
Expression UUID
Section titled “ Expression UUID”The UUID of a player, entity or world.
Since 2.1.2, 2.2 (offline players' uuids), 2.2-dev24 (other entities' uuids) Return Type
UUID
[the] UUID of %offline players/worlds/entities%%offline players/worlds/entities%'[s] UUID# 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 playercommand /what-is-my-uuid: trigger: set {_uuid} to uuid of player send "Your UUID is '%string within {_uuid}%'"Expression Value
Section titled “ Expression Value”Returns the value of something that has a value, e.g. a node in a config.
The value is automatically converted to the specified type (e.g. text, number) where possible.
Since 2.10 Return Type
Object
[the] [%*type%] value of %objects%%objects%'[s] [%*type%] valueset {_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)Expression Value of Subnode
Section titled “ Expression Value of Subnode”Returns the value of an sub-node of the given node, following the provided path.
The value is automatically converted to the specified type (e.g. text, number) where possible.
Since 2.10 Return Type
Object
[the] %*type% value [at] %text% (from|in) %node%set {_node} to node "language" in the skript configbroadcast the text value of {_node}Expression Value Within
Section titled “ Expression Value Within”Gets the value within objects. Usually used with variables to get the value they store rather than the variable itself, or with lists to get the values of a type.
Since 2.7 Return Type
Object
[the] (%*type%|value[s]) (within|in) %~objects%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"Structure Variables
Section titled “ Structure 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.
Since 1.0
variablesvariables: {joins} = 0 {balance::%player%} = 0on join: add 1 to {joins} message "Your balance is %{balance::%player%}%"Function vector
Section titled “ Function vector”Creates a new vector, which can be used with various expressions, effects and functions.
Since 2.2-dev23 Return Type
Vector
vector(x: number, y: number, z: number)vector(0, 0, 0)Type Vector
Section titled “ Type Vector”Vector is a collection of numbers. In Minecraft, 3D vectors are used to express velocities of entities.
Since 2.2-dev23
vector(x, y, z)Expression Vectors - Angle Between
Section titled “ Expression Vectors - Angle Between”Gets the angle between two vectors.
Since 2.2-dev28 Return Type
Number
[the] angle between [[the] vectors] %vector% and %vector%send "%the angle between vector 1, 0, 0 and vector 0, 1, 1%"Expression Vectors - Create from Direction
Section titled “ Expression Vectors - Create from Direction”Creates vectors from given directions.
Relative directions are relative to the origin, (0, 0, 0). Therefore, the vector from the direction 'forwards' is (0, 0, 1).
Since 2.8.0 Return Type
Vector
vector[s] [from] %directions%%directions% vector[s]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 westExpression Vectors - Create from XYZ
Section titled “ Expression Vectors - Create from XYZ”Creates a vector from x, y and z values.
Since 2.2-dev28 Return Type
Vector
[a] [new] vector [(from|at|to)] %number%,[ ]%number%(,[ ]| and )%number%set {_v} to vector 0, 1, 0Expression Vectors - Create Location from Vector
Section titled “ Expression Vectors - Create Location from Vector”Creates a location from a vector in a world.
Since 2.2-dev28 Return Type
Location
%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%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 90Expression Vectors - Cross Product
Section titled “ Expression Vectors - Cross Product”Gets the cross product between two vectors.
Since 2.2-dev28 Return Type
Vector
%vector% cross %vector%send "%vector 1, 0, 0 cross vector 0, 1, 0%"Expression Vectors - Cylindrical Shape
Section titled “ Expression Vectors - Cylindrical Shape”Forms a 'cylindrical shaped' vector using yaw to manipulate the current point.
Since 2.2-dev28 Return Type
Vector
[a] [new] cylindrical vector [from|with] [radius] %number%, [yaw] %number%(,[ and]| and) [height] %number%loop 360 times: set {_v} to cylindrical vector radius 1, yaw loop-value, height 2set {_v} to cylindrical vector radius 1, yaw 90, height 2Expression Vectors - Dot Product
Section titled “ Expression Vectors - Dot Product”Gets the dot product between two vectors.
Since 2.2-dev28 Return Type
Number
%vector% dot %vector%set {_dot} to {_v1} dot {_v2}Expression Vectors - Length
Section titled “ Expression Vectors - Length”Gets or sets the length of a vector.
Since 2.2-dev28 Return Type
Number
[the] (vector|standard|normal) length[s] of %vectors%%vectors%'[s] (vector|standard|normal) length[s]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}%"Expression Vectors - Location Vector Offset
Section titled “ Expression Vectors - Location Vector Offset”Returns the location offset by vectors. Supports both global and local axes. When using local axes, the vector is applied relative to the direction the location is facing.
Since 2.2-dev28, 2.14 (local axes) Return Type
Location
%location% offset by [[the] vectors] %vectors% [using local axes]%location%[ ]~[~][ ]%vectors%set {_loc} to {_loc} ~ {_v}# spawn a tnt 5 blocks in front of playerset {_l} to player's location offset by vector(0, 1, 5) using local axesspawn tnt at {_l}Expression Vectors - Normalized
Section titled “ Expression Vectors - Normalized”Returns the same vector but with length 1.
Since 2.2-dev28 Return Type
Vector
normalize[d] %vector%%vector% normalizedset {_v} to normalized {_v}Expression Vectors - Random Vector
Section titled “ Expression Vectors - Random Vector”Creates a random unit vector.
Since 2.2-dev28, 2.7 (signed components) Return Type
Vector
[a] random vectorset {_v} to a random vectorExpression Vectors - Spherical Shape
Section titled “ Expression Vectors - Spherical Shape”Forms a 'spherical shaped' vector using yaw and pitch to manipulate the current point.
Since 2.2-dev28 Return Type
Vector
[a] [new] spherical vector [(from|with)] [radius] %number%, [yaw] %number%(,[ and]| and) [pitch] %number%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 90Expression Vectors - Squared Length
Section titled “ Expression Vectors - Squared Length”Gets the squared length of a vector.
Since 2.2-dev28 Return Type
Number
[the] squared length[s] of %vectors%%vectors%'[s] squared length[s]send "%squared length of vector 1, 2, 3%"Expression Vectors - Vector Between Locations
Section titled “ Expression Vectors - Vector Between Locations”Creates a vector between two locations.
Since 2.2-dev28 Return Type
Vector
[the] vector (from|between) %location% (to|and) %location%set {_v} to vector between {_loc1} and {_loc2}Expression Vectors - Vector from Location
Section titled “ Expression Vectors - Vector from Location”Creates a vector from a location.
Since 2.2-dev28 Return Type
Vector
[the] vector (of|from|to) %location%%location%'s vectorset {_v} to vector of {_loc}Expression Vectors - Vector from Yaw and Pitch
Section titled “ Expression Vectors - Vector from Yaw and Pitch”Creates a vector from a yaw and pitch value.
Since 2.2-dev28 Return Type
Vector
[a] [new] vector (from|with) yaw %number% and pitch %number%[a] [new] vector (from|with) pitch %number% and yaw %number%set {_v} to vector from yaw 45 and pitch 45Expression Vectors - Vector Projection
Section titled “ Expression Vectors - Vector Projection”An expression to get the vector projection of two vectors.
Since 2.8.0 Return Type
Vector
[vector] projection [of] %vector% on[to] %vector%set {_projection} to vector projection of vector(1, 2, 3) onto vector(4, 4, 4)Effect Vehicle
Section titled “ Effect Vehicle”Makes an entity ride another entity, e.g. a minecart, a saddled pig, an arrow, etc.
Since 2.0
(make|let|force) %entities% [to] (ride|mount) [(in|on)] %entity/entity type%(make|let|force) %entities% [to] (dismount|(dismount|leave) [(from|of)] [(any|the[ir]|his|her)] vehicle[s])(eject|dismount) [(any|the)] passenger[s] (of|from) %entities%make the player ride a saddled pigmake the attacker ride the victimExpression Vehicle
Section titled “ Expression Vehicle”The vehicle an entity is in, if any.
This can actually be any entity, e.g. spider jockeys are skeletons that ride on a spider, so the spider is the 'vehicle' of the skeleton.
See also: passenger
Since 2.0 Return Type
Entity
[the] vehicle[s] [of %entities%]%entities%'[s] vehicle[s]set the vehicle of {game::players::*} to a saddled piggive {game::players::*} a carrot on a stickon vehicle enter: vehicle is a horse add 1 to {statistics::horseMounting::%uuid of player%}Expression Velocity
Section titled “ Expression Velocity”Gets or changes velocity of an entity or particle.
Setting the velocity of a particle will remove its random dispersion and force it to be a single particle.
Since 2.2-dev31 Return Type
Vector
[the] velocit(y|ies) of %entities/directional particles%%entities/directional particles%'[s] velocit(y|ies)set player's velocity to {_v}set the velocity of {_particle} to vector(0, 1, 0)if the vector length of the player's velocity is greater than 5: send "You're moving fast!" to the playerExpression Version
Section titled “ Expression Version”The version of Bukkit, Minecraft or Skript respectively.
Since 2.0 Return Type
Text
([craft]bukkit|minecraft|skript)( |-)versionmessage "This server is running Minecraft %minecraft version% on Bukkit %bukkit version%"message "This server is powered by Skript %skript version%"Expression Version String
Section titled “ Expression Version String”The text to show if the protocol version of the server doesn't match with protocol version of the client. You can check the protocol version expression for more information about this.
This can only be set in a server list ping event.
Since 2.3 Return Type
Text
Applicable EventsOn Server List Ping
[the] [shown|custom] version [string|text]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 "<light green>Version: <orange>%minecraft version%"Expression View Distance
Section titled “ Expression View Distance”The view distance of a world or a player.
The view distance of a player is the distance in chunks sent by the server to the player. This has nothing to do with client side view distance settings.
View distance is capped between 2 to 32 chunks.
Since 2.4, 2.11 (worlds) Return Type
Number
[the] view distance[s] of %players/worlds%%players/worlds%'[s] view distance[s]set view distance of player to 10add 50 to the view distance of world "world"reset the view distance of playerclear the view distance of world "world"Expression View Distance of Client
Section titled “ Expression View Distance of Client”The view distance of the client. Can not be changed. This differs from the server side view distance of player as this will retrieve the view distance the player has set on their client.
Since 2.5 Return Type
Number
[the] client view distance[s] of %players%%players%'[s] client view distance[s]set {_clientView} to the client view distance of playerset view distance of player to client view distance of playerType Villager Career Change Reason
Section titled “ Type Villager Career Change Reason”Represents a reason why a villager changed its career.
Since 2.12
losing job, employmentExpression Villager Level/Experience
Section titled “ Expression 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
Since 2.10 Return Type
Number
[the] villager (level|experience) of %living entities%%living entities%'[s] villager (level|experience)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 100Type Villager Profession
Section titled “ Type Villager Profession”Represents the different professions of villagers.
Since 2.10
armorer, armorer profession, armourer, armourer profession, butcher, butcher profession, cartographer, cartographer profession, cleric, cleric profession, farmer, farmer profession, fisherman, fisherman profession, fletcher, fletcher profession, leatherworker, leatherworker profession, librarian, librarian profession, mason, mason profession, nitwit, nitwit profession, no profession, none, none profession, shepherd, shepherd profession, toolsmith, toolsmith profession, unemployed, weaponsmith, weaponsmith professionExpression Villager Profession
Section titled “ Expression Villager Profession”Represents the profession of a villager/zombie villager.
Since 2.10 Return Type
Villager Profession
[the] villager profession of %living entities%%living entities%'[s] villager professionset {_p} to villager profession of event-entityvillager profession of event-entity = nitwit professionset villager profession of {_villager} to librarian professiondelete villager profession of event-entityType Villager Type
Section titled “ Type Villager Type”Represents the different types of villagers. These are usually the biomes a villager can be from.
Since 2.10
desert, jungle, plains, savanna, snow, swamp, taigaExpression Villager Type
Section titled “ Expression Villager Type”Represents the type of a villager/zombie villager. This usually represents the biome the villager is from.
Since 2.10 Return Type
Villager Type
[the] villager type of %living entities%%living entities%'[s] villager typeset {_type} to villager type of {_villager}villager type of {_villager} = plainsset villager type of event-entity to plainsEffect Wake And Sleep
Section titled “ Effect Wake And Sleep”Make bats and foxes sleep or wake up.
Make villagers sleep by providing a location of a bed.
Make players sleep by providing a location of a bed. Using 'with force' will bypass "nearby monsters" ,the max distance, allowing players to sleep even if the bed is far away, and lets players sleep in the nether and end. Does not work if the location of the bed is not in the world the player is currently in.
Using 'without spawn location update' will make players wake up without setting their spawn location to the bed.
Since 2.11
make %living entities% (start sleeping|[go to] sleep) [%direction% %location%]force %living entities% to (start sleeping|[go to] sleep) [%direction% %location%]make %players% (start sleeping|[go to] sleep) %direction% %location% (with force)force %players% to (start sleeping|[go to] sleep) %direction% %location% (with force)make %living entities% (stop sleeping|wake up)force %living entities% to (stop sleeping|wake up)make %players% (stop sleeping|wake up) (without spawn [location] update)force %players% to (stop sleeping|wake up) (without spawn [location] update)make {_fox} go to sleepmake {_bat} stop sleepingmake {_villager} start sleeping at location(0, 0, 0)make player go to sleep at location(0, 0, 0) with forcemake player wake up without spawn location updateExpression Warden Anger Level
Section titled “ Expression Warden Anger Level”The anger level a warden feels towards an entity.
A warden can be angry towards multiple entities with different anger levels.
If an entity reaches an anger level of 80+, the warden will pursue it.
Anger level maxes out at 150.
Since 2.11 Return Type
Number
[the] anger level [of] %living entities% towards %living entities%%living entities%'[s] anger level towards %living entities%set the anger level of last spawned warden towards player to 20clear the last spawned warden's anger level towards playerExpression Warden Most Angered At
Section titled “ Expression Warden Most Angered At”The entity a warden is most angry at.
A warden can be angry towards multiple entities with different anger levels.
Since 2.11 Return Type
Living Entity
[the] most angered entity of %living entities%%living entities%'[s] most angered entityif the most angered entity of last spawned warden is not player: set the most angered entity of last spawned warden to playerExpression Warning Distance of World Border
Section titled “ Expression Warning Distance of World Border”The warning distance of a world border. The player's screen will be tinted red when they are within this distance of the border.
Players only see a red tint when approaching a world's worldborder and the warning distance has to be an integer greater than or equal to 0.
Since 2.11 Return Type
Number
[the] world[ ]border warning distance [of %worldborders%]%worldborders%'[s] world[ ]border warning distanceset world border warning distance of {_worldborder} to 1Expression Warning Time of World Border
Section titled “ Expression Warning Time of World Border”The warning time of a world border. If the border is shrinking, the player's screen will be tinted red once the border will catch the player within this time period.
Since 2.11 Return Type
Timespan
[the] world[ ]border warning time [of %worldborders%]%worldborders%'[s] world[ ]border warning timeset world border warning time of {_worldborder} to 1 secondExpression Weather
Section titled “ Expression Weather”The weather of a world or player.
Clearing or resetting the weather of a player will make the player's weather match the weather of the world.
Clearing or resetting the weather of a world will make the weather clear.
Since 1.0 Return Type
Weather Type
Applicable EventsOn Weather Change
[the] weather [(in|of) %players/worlds%][the] (custom|client) weather [of %players%]%players/worlds%'[s] weather%players%'[s] (custom|client) weatherset weather to clearweather in "world" is rainyreset custom weather of playerset weather of player to clearType Weather Type
Section titled “ Type Weather Type”The weather types sunny, rainy, and thundering.
Since 1.0
clear/sun/sunny, rain/rainy/raining, and thunder/thundering/thunderstormis rainingis sunny in the player's worldmessage "It is %weather in the argument's world% in %world of the argument%"Expression Whether
Section titled “ Expression Whether”A shorthand for returning the result of a condition (true or false). This is functionally identical to using `true if
Since 2.9.0 Return Type
Boolean
whether <.+>set {fly} to whether player can flybroadcast "Flying: %whether player is flying%"Section While Loop
Section titled “ Section While Loop”While Loop sections are loops that will just keep repeating as long as a condition is met.
Since 2.0, 2.6 (do while)
[do] while <.+>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 crashExpression Whitelist
Section titled “ Expression Whitelist”An expression for obtaining and modifying the server's whitelist.
Players may be added and removed from the whitelist.
The whitelist can be enabled or disabled by setting the whitelist to true or false respectively.
Since 2.5.2, 2.9.0 (delete) Return Type
Offline Player
[the] white[ ]listset the whitelist to falseadd all players to whitelistreset the whitelistCondition Will Consume Boosting Firework
Section titled “ Condition Will Consume Boosting Firework”Checks to see if the firework used in an 'elytra boost' event will be consumed.
Since 2.10
[the] (boosting|used) firework will be consumed[the] (boosting|used) firework (will not|won't) be consumedon elytra boost: if the used firework will be consumed: prevent the used firework from being consumedCondition Will Despawn
Section titled “ Condition Will Despawn”Checks if the dropped item will be despawned naturally through Minecraft's timer.
Since 2.11
%itementities% can (despawn naturally|naturally despawn)%itementities% (can't|cannot|can not) (despawn naturally|naturally despawn)if all dropped items can despawn naturally: prevent all dropped items from naturally despawningCondition Will Despawn
Section titled “ Condition Will Despawn”Checks if the dropped item will be despawned naturally through Minecraft's timer.
Since 2.11
%itementities% will (despawn naturally|naturally despawn)%itementities% (will (not|neither)|won't) (despawn naturally|naturally despawn)if all dropped items can despawn naturally: prevent all dropped items from naturally despawningExpression With Fire Resistance
Section titled “ Expression With Fire Resistance”Creates a copy of an item with (or without) fire resistance.
Since 2.9.0 Return Type
Item Type
%item type% with[out] fire[ ]resistancefire resistant %item type%set {_x} to diamond sword with fire resistanceequip player with netherite helmet without fire resistancedrop fire resistant stone at playerType Wolf Variant
Section titled “ Type Wolf Variant”Represents the variant of a wolf entity.
NOTE: Minecraft namespaces are supported, ex: 'minecraft:ashen'.
Since 2.10
ashen, black, chestnut, pale, rusty, snowy, spotted, striped, woodsFunction world
Section titled “ Function world”Gets a world from its name.
Since 2.2 Return Type
World
world(name: string)set {_nether} to world("%{_world}%_nether")Type World
Section titled “ Type 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.
Since 1.0, 2.2 (alternate syntax)
<code>"world_name"</code>, e.g. "world"broadcast "Hello!" to the world "world_nether"Expression World
Section titled “ Expression World”The world the event occurred in.
Since 1.0 Return Type
World
[the] world [of %locations/entities/chunk%]%locations/entities/chunk%'[s] worldworld 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-chunkType World Border
Section titled “ Type World Border”Represents the border of a world or player.
Since 2.11
Expression World Border
Section titled “ Expression World Border”Get the border of a world or a player.
A player's world border is not persistent. Restarts, quitting, death or changing worlds will reset the border.
Since 2.11 Return Type
World Border
[the] world[ ]border [of %worlds/players%]%worlds/players%'[s] world[ ]borderset {_border} to world border of player's worldType World Environment
Section titled “ Type World Environment”Represents the environment of a world.
Since 2.7
normal, nether, the end, the overworld, custom, the nether, end, overworldExpression World Environment
Section titled “ Expression World Environment”The environment of a world
Since 2.7 Return Type
World Environment
[the] [world] environment of %worlds%%worlds%'[s] [world] environmentif environment of player's world is nether: apply fire resistance to player for 10 minutesExpression World from Name
Section titled “ Expression World from Name”Returns the world from a string.
Since 2.6.1 Return Type
World
[the] world [(named|with name)] %text%world named {game::world-name}the world "world"Expression World Seed
Section titled “ Expression World Seed”The seed of given world. Note that it will be returned as Minecraft internally treats seeds, not as you specified it in world configuration.
Since 2.2-dev35 Return Type
Number
[the] seed[s] (from|of) %worlds%%worlds%'[s] seed[s]broadcast "Seed: %seed of player's world%"Expression Worlds
Section titled “ Expression Worlds”All worlds of the server, useful for looping.
Since 1.0 Return Type
World
[(all [[of] the]|the)] worldsloop all worlds: broadcast "You're in %loop-world%" to loop-worldExpression X of Item/Entity Type
Section titled “ Expression X of Item/Entity Type”An expression for using an item or entity type with a different amount.
Since 1.2 Return Type
Object
%number% of %item stacks/item types/entity types/particles%give level of player of iron pickaxes to the playerExpression X Times
Section titled “ Expression X Times”Integers between 1 and X, used in loops to loop X times.
Since 1.4.6 Return Type
Number
%number% time[s]oncetwicethriceloop 20 times: broadcast "%21 - loop-number% seconds left.." wait 1 secondExpression Yaw / Pitch
Section titled “ Expression 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.
Since 2.0, 2.2-dev28 (vector yaw/pitch), 2.9.0 (entity changers) Return Type
Number
[the] (yaw|pitch) of %entities/locations/vectors%%entities/locations/vectors%'[s] (yaw|pitch)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 themselvesType Zombie Nautilus Variant
Section titled “ Type Zombie Nautilus Variant”Represents the variant of a zombie nautilus.
Since 2.14
temperate, warmEffect Zombify Villager
Section titled “ Effect Zombify Villager”Turn a villager into a zombie villager. Cure a zombie villager immediately or after specified amount of time.
This effect removes the old entity and creates a new entity.
Zombifying a villager stored in a variable will update the variable to the new zombie villager.
Curing a zombie villager does not update the variable.
Since 2.11
zombify %living entities%unzombify %living entities% [(in|after) %time span%]zombify last spawned villagerset {_villager} to last spawned villagerzombify {_villager}if {_villager} is a zombie villager: # This will pass because '{_villager}' gets changed to the new zombie villagerset {_villager} to last spawned villagerzombify last spawned villagerif {_villager} is a zombie villager: # This will fail because the variable was not provided when zombifyingunzombify {_zombieVillager}unzombify {_zombieVillager} after 2 seconds