Syntaxes for Skript 2.16.0-pre1
No results were found.
abs Function
Section titled “abs Function ”Returns the absolute value of the argument, i.e. makes the argument positive.
abs(3) = 3abs(-2) = 2Absorbed blocks Expression
Section titled “Absorbed blocks Expression ”The blocks absorbed by a sponge block.
[the] absorbed blocksthe absorbed blocksacos Function
Section titled “acos Function ”The inverse of the cosine, also called arccos. Returns result in degrees, not radians. Only returns values from 0 to 180.
acos(0) = 90acos(1) = 0acos(0.5) = 30Action Bar Effect
Section titled “Action Bar Effect ”Sends an action bar message to an audience.
send action bar "Hello player!" to playerActive Item Expression
Section titled “Active Item Expression ”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.
on damage of player: if victim's active tool is a bow: interrupt player's active item useActive Item Use Time Expression
Section titled “Active Item Use Time Expression ”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.
on right click: broadcast player's remaining item use time wait 1 second broadcast player's item use timeAffected Entities Expression
Section titled “Affected Entities Expression ”The affected entities in the area cloud effect event.
[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-valueAge of Block/Entity Expression
Section titled “Age of Block/Entity Expression ”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.
# 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 secondsAliases Structure
Section titled “Aliases Structure ”Used for registering custom aliases for a script.
aliases# Example aliases for a scriptaliases: blacklisted items = TNT, bedrock, obsidian, mob spawner, lava, lava bucket shiny swords = golden sword, iron sword, diamond swordAll Banned Players/IPs Expression
Section titled “All Banned Players/IPs Expression ”Obtains the list of all banned players or IP addresses.
[all [[of] the]|the] banned (players|(ips|ip addresses))command /banlist: trigger: send all the banned playersAll commands Expression
Section titled “All commands Expression ”Returns all registered commands or all script commands.
[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%"All Groups Expression
Section titled “All Groups Expression ”All the groups a player can have. This expression requires Vault and a compatible permissions plugin to be installed.
all groupscommand /group <text>: trigger: if argument is "list": send "%all groups%"All Operators Expression
Section titled “All Operators Expression ”The list of operators on the server.
[all [[of] the]|the] [server] [non(-| )]op[erator]sset {_ops::*} to all operatorsAll Permissions Expression
Section titled “All Permissions Expression ”Returns all permissions of the defined player(s). Note that the modifications to resulting list do not actually change permissions.
set {_permissions::*} to all permissions of the playerAll Persistent Data Keys Expression
Section titled “All Persistent Data Keys Expression ”Returns all persistent data keys stored in the specified objects. This is not limited to tags set by Skript, but includes all keys regardless of their origin.
set {_keys::*} to persistent data keys of player's toolif size of {_keys::*} > 0: broadcast "The tool has the following persistent data keys: %{_keys::*}%"else: broadcast "The tool has no persistent data keys."for each {_key} in persistent data keys of player's tool: broadcast "Persistent data tag %{_key}%: %data tag {_key} of player's tool%"All Scripts Expression
Section titled “All Scripts Expression ”Returns all of the scripts, or just the enabled or disabled ones.
[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 playerAll Scripts Expression
Section titled “All Scripts Expression ”Returns all of the scripts, or just the enabled or disabled ones.
[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 playerAll Tags of a Type Expression
Section titled “All Tags of a Type Expression ”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".
[all [[of] the]|the] [minecraft|datapack|paper|(custom|skript)] [item|block|entity [type]] tagsbroadcast minecraft tagssend paper entity tagsbroadcast all block tagsAllay Can Duplicate Condition
Section titled “Allay Can Duplicate Condition ”Checks to see if an allay is able to duplicate naturally.
if last spawned allay can duplicate: disallow last spawned to duplicateAllay Duplicate Effect
Section titled “Allay Duplicate Effect ”Set whether an allay can or cannot duplicate itself. This is not the same as breeding allays.
allow all allays to duplicateprevent all allays from duplicatingAllay Duplication Cooldown Expression
Section titled “Allay Duplication Cooldown Expression ”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.
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 allayAllay Target Jukebox Expression
Section titled “Allay Target Jukebox Expression ”The location of the jukebox an allay is set to.
set {_loc} to the target jukebox of last spawned allayAllow / Prevent Leash Drop Effect
Section titled “Allow / Prevent Leash Drop Effect ”Allows or prevents the leash from being dropped in an unleash event.
(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 dropAllow Aging Effect
Section titled “Allow Aging Effect ”Sets whether or not living entities will be able to age.
on spawn of animal: allow aging of entityAlpha/Red/Green/Blue Color Value Expression
Section titled “Alpha/Red/Green/Blue Color Value Expression ”The alpha, red, green, or blue value of colors. Ranges from 0 to 255. Alpha represents opacity.
broadcast red value of rgb(100, 0, 50) # sends '100'set {_red} to red's red value + 10Alphabetical Sort Expression
Section titled “Alphabetical Sort Expression ”Sorts given strings in alphabetical order.
set {_list::*} to alphabetically sorted {_strings::*}Alphanumeric Condition
Section titled “Alphanumeric Condition ”Checks if the given string is alphanumeric.
if the argument is not alphanumeric: send "Invalid name!"Altitude Expression
Section titled “Altitude Expression ”Effectively an alias of 'y-coordinate of …', it represents the height of some location within the world.
on damage: altitude of the attacker is higher than the altitude of the victim set damage to damage * 1.2Amount Expression
Section titled “Amount Expression ”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::*}'.
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:Amount Property
Section titled “Amount Property ”The amount of something, say the number of items in a stack or in a queue.
Amount of Items Expression
Section titled “Amount of Items Expression ”Counts how many of a particular item type are in a given inventory.
message "You have %number of tag values of minecraft tag "diamond_ores" in the player's inventory% diamond ores in your inventory."An Eternity Expression
Section titled “An Eternity Expression ”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.
[an] eternityforever[an] (indefinite|infinite) (duration|timespan)set fire to the player for an eternityAngle Expression
Section titled “Angle Expression ”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.
set {_angle} to 90 degrees{_angle} is 90 # true180 degrees is pi # truepi radians is 180 degrees # trueAnvil Repair Cost Expression
Section titled “Anvil Repair Cost Expression ”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.
on inventory click: if {AnvilRepairSaleActive} = true: wait a tick # recommended, to avoid client bugs set anvil repair cost to anvil repair cost * 50% send "Anvil repair sale is ON!" to playeron inventory click: player have permission "anvil.repair.max.bypass" set max repair cost of event-inventory to 99999Anvil Text Input Expression
Section titled “Anvil Text Input Expression ”An expression to get the name to be applied to an item in an anvil inventory.
on inventory click: type of event-inventory is anvil inventory if the anvil text input of the event-inventory is "FREE OP": ban playerAny Named Thing Type
Section titled “Any Named Thing Type ”Something that has a name (e.g. an item).
The name of the thing, as text. Can be set if supported.
{thing}'s nameAny Numbered/Sized Thing Type
Section titled “Any Numbered/Sized Thing Type ”Something that has an amount or size.
the size of {thing}the amount of {thing}Any Of Expression
Section titled “Any Of Expression ”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.
if any of {_numbers::*} are 1:if any of {teamA::*} are within location(0, 0, 0) and location(10, 10, 10):Any Valued Thing Type
Section titled “Any Valued Thing Type ”Something that has a value.
The value of something. Can be set.
the text of {node}Anything with Contents Type
Section titled “Anything with Contents Type ”Something that contains other things.
AnyContains can contain other things depending on its type.
{a} contains {b}Applied Beacon Effect Expression
Section titled “Applied Beacon Effect Expression ”The type of effect applied by a beacon.
[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"Applied Enchantments Expression
Section titled “Applied Enchantments Expression ”The applied enchantments in an enchant event. Deleting or removing the applied enchantments will prevent the item's enchantment.
[the] applied enchant[ment]son enchant: set the applied enchantments to sharpness 10 and fire aspect 5Apply Bone Meal Effect
Section titled “Apply Bone Meal Effect ”Applies bone meal to a crop, sapling, or composter
apply 3 bone meal to event-blockApply Fishing Lure Effect
Section titled “Apply Fishing Lure Effect ”Sets whether the lure enchantment should be applied, which reduces the wait time.
(reel|pull) in [the] hook[ed] entityon fishing line cast: apply lure enchantment bonusApply Fishing Lure Effect
Section titled “Apply Fishing Lure Effect ”Sets whether the lure enchantment should be applied, which reduces the wait time.
apply [the] lure enchantment bonusremove [the] lure enchantment bonuson fishing line cast: apply lure enchantment bonusApply Potion Effect Effect
Section titled “Apply Potion Effect Effect ”Applies a potion effect to an entity.
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 playerArgument Expression
Section titled “Argument Expression ”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.
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 argumentArithmetic Expression
Section titled “Arithmetic Expression ”Arithmetic expressions, e.g. 1 + 2, (health of player - 2) / 3, etc.
set the player's health to 10 - the player's healthloop (argument + 2) / 5 times: message "Two useless numbers: %loop-num * 2 - 5%, %2^loop-num - 1%"message "You have %health of player * 2% half hearts of HP!"Armor Change Item Expression
Section titled “Armor Change Item Expression ”Get the unequipped or equipped armor item from a 'armor change' event.
[the] (old|unequipped) armo[u]r item[the] (new|equipped) armo[u]r itemon armor change broadcast the old armor itemArmor Slot Expression
Section titled “Armor Slot Expression ”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
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 pluginArrow Attached Block Expression
Section titled “Arrow Attached Block Expression ”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.
set hit block of last shot arrow to diamond blockon projectile hit: wait 1 tick break attached blocks of event-projectile kill event-projectileArrow Knockback Strength Expression
Section titled “Arrow Knockback Strength Expression ”An arrow's knockback strength.
on shoot: event-projectile is an arrow set arrow knockback strength of event-projectile to 10Arrows Stuck Expression
Section titled “Arrows Stuck Expression ”The number of arrows stuck in a living entity.
set arrows stuck in player to 5asin Function
Section titled “asin Function ”The inverse of the sine, also called arcsin. Returns result in degrees, not radians. Only returns values from -90 to 90.
asin(0) = 0asin(1) = 90asin(0.5) = 30At Time Event
Section titled “At Time Event ”An event that occurs at a given minecraft time in every world or only in specific worlds.
atan Function
Section titled “atan Function ”The inverse of the tangent, also called arctan. Returns result in degrees, not radians. Only returns values from -90 to 90.
atan(0) = 0atan(1) = 45atan(10000) = 89.9943atan2 Function
Section titled “atan2 Function ”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).
atan2(0, 1) = 0atan2(10, 0) = 90atan2(-10, 5) = -63.4349Attack Cooldown Expression
Section titled “Attack Cooldown Expression ”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.
on damage: if attack cooldown of attacker < 1: set damage to 0 send "Your hit was too weak! wait until your weapon is fully charged next time." to attackerAttacked Expression
Section titled “Attacked Expression ”The victim of a damage event, e.g. when a player attacks a zombie this expression represents the zombie.
[the] (attacked|damaged|victim) [<(.+)>]on damage: victim is a creeper damage the attacked by 1 heartAttacker Expression
Section titled “Attacker Expression ”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.
[the] (attacker|damager)on damage: attacker is a player health of attacker is less than or equal to 2 damage victim by 1 heartAttribute Type Type
Section titled “Attribute Type 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'.
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 reinforcementsAudience Type
Section titled “Audience Type ”An audience is a receiver of media, such as individual players, the console, or groups of players (such as those on a team or in a world).
send "Hello world!" to the playersend action bar "ALERT! A horde of zombies has overrun the central village." to the worldAuto Reload Structure
Section titled “Auto Reload Structure ”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.
auto[matically] reload [(this|the) script]auto reloadauto reload: recipients: "SkriptDev", "61699b2e-d327-4a01-9f1e-0ea8c3f06bc6" and "Njol" permission: "skript.reloadnotify"axisAngle Function
Section titled “axisAngle Function ”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.
axisangle(90, (vector from player's facing))Axolotl Entity Data
Section titled “Axolotl Entity Data ”[(baby|young)|(adult|grown(-| )up)] axolotl[s]axolotl (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] lucy axolotl[s]lucy axolotl (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] wild axolotl[s]wild axolotl (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] gold axolotl[s]gold axolotl (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] cyan axolotl[s]cyan axolotl (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] blue axolotl[s]blue axolotl (kid[s]|child[ren])Ban Effect
Section titled “Ban Effect ”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.
ban [and kick] %strings/offlineplayers% [(by reason of|because [of]|on account of|due to) %textcomponent%] [for %timespan%]ban [and kick] %players% by ip [(by reason of|because [of]|on account of|due to) %textcomponent%] [for %timespan%]ip(-| )ban [and kick] %players% [(by reason of|because [of]|on account of|due to) %textcomponent%] [for %timespan%]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 daysBanner Pattern Expression
Section titled “Banner Pattern Expression ”Creates a new banner pattern.
set {_pattern} to a creeper banner pattern colored redadd {_pattern} to banner patterns of {_banneritem}remove {_pattern} from banner patterns of {_banneritem}set the 1st banner pattern of block at location(0,0,0) to {_pattern}clear the 1st banner pattern of block at location(0,0,0)Banner Pattern Item Expression
Section titled “Banner Pattern Item Expression ”Gets the item from a banner pattern type. Note that not all banner pattern types have an item.
set {_item} to creeper charged banner pattern itemset {_item} to snout banner pattern itemset {_item} to thing banner pattern itemBanner Pattern Type Type
Section titled “Banner Pattern Type Type ”Represents the various banner patterns that can be applied to a banner.
base, base banner pattern, border, border banner pattern, bordure banner pattern, bordure indented banner pattern, bottom left square banner pattern, bottom right square banner pattern, bottom stripe banner pattern, bottom triangle banner pattern, bricks, bricks banner pattern, center stripe banner pattern, circle, circle banner pattern, creeper, creeper banner pattern, creeper charged banner pattern, cross, cross banner pattern, curly border, curly border banner pattern, diagonal left, diagonal right, diagonal up left, diagonal up left banner pattern, diagonal up right, diagonal up right banner pattern, down left stripe banner pattern, down right stripe banner pattern, field masoned banner pattern, flow, flow banner pattern, flower, flower banner pattern, globe, globe banner pattern, gradient, gradient banner pattern, gradient up, gradient up banner pattern, guster, guster banner pattern, half horizontal, half horizontal bottom, half vertical, half vertical right, horizontal bottom half banner pattern, horizontal half banner pattern, left diagonal banner pattern, left stripe banner pattern, middle stripe banner pattern, mojang, mojang banner pattern, piglin, piglin banner pattern, rhombus, rhombus banner pattern, right diagonal banner pattern, right stripe banner pattern, right vertical half banner pattern, skull, skull banner pattern, small stripes, small stripes banner pattern, snout banner pattern, square bottom left, square bottom right, square top left, square top right, straight cross, straight cross banner pattern, stripe bottom, stripe center, stripe downleft, stripe downright, stripe left, stripe middle, stripe right, stripe top, tbottom triangles banner pattern, thing banner pattern, top left square banner pattern, top right square banner pattern, top stripe banner pattern, top triangle banner pattern, top triangles banner pattern, triangle bottom, triangle top, triangles bottom, triangles top, vertical half banner patternBanner Patterns Expression
Section titled “Banner Patterns Expression ”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.
broadcast banner patterns of {_banneritem}broadcast 1st banner pattern of block at location(0,0,0)clear banner patterns of {_banneritem}Barter Drops Expression
Section titled “Barter Drops Expression ”The items dropped by the piglin in a piglin bartering event.
[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!"Barter Input Expression
Section titled “Barter Input Expression ”The item picked up by the piglin in a piglin bartering event.
[the] [piglin] barter[ing] inputon piglin barter: if the bartering input is a gold ingot: broadcast "my precious..."Beacon Effects Expression
Section titled “Beacon Effects Expression ”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.
set primary beacon effect of {_block} to hasteset secondary effect of {_block} to resistanceBeacon Range Expression
Section titled “Beacon Range Expression ”The range of a beacon's effects, in blocks.
if the beacon tier of the clicked block is 4: set the beacon effect range of the clicked block to 100Beacon Tier Expression
Section titled “Beacon Tier Expression ”The tier of a beacon. Ranges from 0 to 4.
if the beacon tier of the clicked block is 4: send "This is a max tier beacon!"Bed Expression
Section titled “Bed Expression ”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.
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 locationBee Entity Data
Section titled “Bee Entity Data ”[(baby|young)|(adult|grown(-| )up)] bee[s][(baby|young)|(adult|grown(-| )up)] bee[s] with(out| no) nectar[(baby|young)|(adult|grown(-| )up)] bee[s] with nectar[(baby|young)|(adult|grown(-| )up)] happy bee[s][(baby|young)|(adult|grown(-| )up)] happy bee[s] with nectar[(baby|young)|(adult|grown(-| )up)] happy bee[s] with(out| no) nectar[(baby|young)|(adult|grown(-| )up)] angry bee[s][(baby|young)|(adult|grown(-| )up)] angry bee[s] with(out| no) nectar[(baby|young)|(adult|grown(-| )up)] angry bee[s] with nectarBeehive Honey Level Expression
Section titled “Beehive Honey Level Expression ”The current or max honey level of a beehive. The max level is 5, which cannot be changed.
set the honey level of {_beehive} to the max honey level of {_beehive}Beehive Is Sedated Condition
Section titled “Beehive Is Sedated Condition ”Checks if a beehive is sedated from a nearby campfire.
if {_beehive} is sedated:Beehive Target Flower Expression
Section titled “Beehive Target Flower Expression ”The flower a beehive has selected to pollinate from.
set the target flower of {_beehive} to location(0, 0, 0)clear the target flower of {_beehive}Bell Is Resonating Condition
Section titled “Bell Is Resonating Condition ”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.
target block is resonatingBell Is Ringing Condition
Section titled “Bell Is Ringing Condition ”Checks to see if a bell is currently ringing. A bell typically rings for 50 game ticks.
target block is ringingBiome Expression
Section titled “Biome Expression ”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).
# damage player in deserts constantlyevery real minute: loop all players: biome at loop-player is desert damage the loop-player by 1Biome Type
Section titled “Biome Type ”All possible biomes Minecraft uses to generate a world. NOTE: Minecraft namespaces are supported, ex: 'minecraft:basalt_deltas'.
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 desertBlank Equippable Component Expression
Section titled “Blank Equippable Component Expression ”Gets a blank equippable component. NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.
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}Block Expression
Section titled “Block Expression ”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'.
[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 blockBlock Expression
Section titled “Block Expression ”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'.
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 blockBlock Type
Section titled “Block Type ”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.
The custom name of the block, if it has one. Only TileEntities like chests and furnaces can have names. Can be set or reset.
Block Break Speed Expression
Section titled “Block Break Speed Expression ”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.
on left click using diamond pickaxe: event-block is set send "Break Speed: %break speed for player%" to playerBlock Data Expression
Section titled “Block Data Expression ”Get the block data associated with a block. This data can also be used to set blocks.
set {_data} to block data of target blockset block at player to {_data}set block data of target block to oak_stairs[facing=south;waterlogged=true]Block Data Type
Section titled “Block Data Type ”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.
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]Block Hardness Expression
Section titled “Block Hardness Expression ”Obtains the block's hardness level (also known as "strength"). This number is used to calculate the time required to break each block.
set {_hard} to block hardness of target blockif block hardness of target block > 5:Block Sound Expression
Section titled “Block Sound Expression ”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.
play sound (break sound of dirt) at all playersset {_sounds::*} to place sounds of dirt, grass block, blue wool and stoneBlock Sphere Expression
Section titled “Block Sphere Expression ”All blocks in a sphere around a center, mostly useful for looping.
loop blocks in radius 5 around the player: set loop-block to airBlocks Expression
Section titled “Blocks Expression ”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.
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 airBlocks in Region Expression
Section titled “Blocks in Region Expression ”All blocks in a region. This expression requires a supported regions plugin to be installed.
loop all blocks in the region {arena.%{faction.%player%}%}: clear the loop-blockBlocks of Region Expression skript-worldguard
Section titled “Blocks of Region Expression skript-worldguard”An expression that returns all of the blocks in the given regions.
command /fillregion <text> <material>: trigger: set {_region} to the region text-argument in the player's world set the blocks of {_region} to material-argumentBook Author Expression
Section titled “Book Author Expression ”The author of a book.
on book sign: broadcast "A new book has been created by %author of event-item%"Book Pages Expression
Section titled “Book Pages Expression ”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.
on book sign: if the number of pages of event-item is greater than 1: message "The second page of the authored book is: %page 2 of event-item%"set page 1 of the player's held item to "This page was written with Skript!"Book Title Expression
Section titled “Book Title Expression ”The title of a book.
on book sign: message "You finished your book titled %title of event-item%"Boolean Type
Section titled “Boolean Type ”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.
true/yes/on or false/no/offset {config.%player%.use mod} to falseBoss Bar Flags Effect
Section titled “Boss Bar Flags Effect ”Makes a boss bar have or not have a flag. The `play boss music` flag does not actually play any sound or do anything. However you can use a resource pack to play your own custom sound.
broadcast "The boss has entered a new phase! Watch out for the fog..."make {_bossbar} create fogwait 30 secondsbroadcast "The fog has subsided... for now"make {_bossbar} no longer create fogBoss Bar From Boss Expression
Section titled “Boss Bar From Boss Expression ”Returns a boss bar from one or more bosses.
on spawn of wither: set title of boss bar of event-entity to "<red>Angry Wither"Boss Bar From Key Expression
Section titled “Boss Bar From Key Expression ”Obtains a keyed boss bar from the specified key.
set {_bar} to a keyed red boss bar with key "example": set title of event-bossbar to "My Test Title" set color of event-bossbar to red set progress of event-bossbar to 86% set style of event-bossbar to 6 notches
// some structure later on and you need to access itset the title of the boss bar with the key "example" to "My Updated Test Title"6 notches, notched with 6 segments, ten segments, twenty notches, notched with ten segments, 10 segments, twelve segments, no notches, twenty segments, 10 notches, six notches, notched with 20 segments, six segments, 12 notches, solid, 12 segments, 20 segments, notched with 10 segments, 6 segments, notched with six segments, ten notches, progress, notched with twelve segments, notched with 12 segments, notched with twenty segments, twelve notches, 20 notchesBossBar Type
Section titled “BossBar Type ”Represents a boss bar. A boss bar is displayed at the top of a players screen and can have its title, progress, style, color, and viewers changed.
The name of a boss bar.
The progress of a boss bar. Ranges from 0 to 1.
The style of a boss bar.
The title of a boss bar.
The viewers of a boss bar. If you remove a player from viewers of a boss bar they will no longer see the bossbar or be affected by its flags.
Break Block Effect
Section titled “Break Block Effect ”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)
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 pickaxeBreeding Family Expression
Section titled “Breeding Family Expression ”Represents family members within a breeding event.
[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 breederBrewing Results Expression
Section titled “Brewing Results Expression ”The resulting items in an 'on brew complete' event.
[the] brewing resultson brew complete: set {_results::*} to the brewing resultsBrewing Stand Fuel Level Expression
Section titled “Brewing Stand Fuel Level Expression ”The fuel level of a brewing stand. The fuel level is decreased by one at the start of brewing each potion.
set the brewing stand fuel level of {_block} to 10clear the brewing stand fuel level of {_block}Brewing Stand Slot Expression
Section titled “Brewing Stand Slot Expression ”A slot of a brewing stand, i.e. the first, second, or third bottle slot, the fuel slot or the ingredient slot.
set the 1st bottle slot of {_block} to potion of waterclear the brewing stand second bottle slot of {_block}Brewing Time Expression
Section titled “Brewing Time Expression ”The remaining brewing time of a brewing stand.
set the brewing time of {_block} to 10 secondsclear the remaining brewing time of {_block}Brewing Will Consume Fuel Condition
Section titled “Brewing Will Consume Fuel Condition ”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.
[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 fuelBroadcast Effect
Section titled “Broadcast Effect ”Broadcasts a message to the server.
broadcast "Welcome %player% to the server!"broadcast "Woah! It's a message!"Broadcast Message Expression
Section titled “Broadcast Message Expression ”The message broadcasted in a broadcast event.
[the] broadcast(-|[ed] )messageon broadcast: set broadcast message to "<light green>[BROADCAST] %broadcast message%"Brushing Stage Expression
Section titled “Brushing Stage Expression ”Represents how far the block has been uncovered. The only blocks that can currently be "brushed" are Suspicious Gravel and Suspicious Sand. 0 means the block is untouched, the max (usually 3) means nearly fulled brushed. Resetting this value will set it to 0.
# prevent dusting past level 1on player change block: if dusting progress of future event-blockdata > 1: cancel event# draw particles when dusting is complete!on player change block: if brushing progress of event-block is max brushing stage of event-block: draw 20 totem of undying particles at event-blockBuried Item Expression
Section titled “Buried Item Expression ”Represents the item that is uncovered when dusting. The only blocks that can currently be "dusted" are Suspicious Gravel and Suspicious Sand.
send target block's brushable itemset {_gravel}'s brushable item to emeraldcalcExperience Function
Section titled “calcExperience Function ”Calculates the total amount of experience needed to achieve given level from scratch in Minecraft.
Camel Is Dashing Condition
Section titled “Camel Is Dashing Condition ”Checks whether a camel is currently using its dash ability.
if last spawned camel is dashing: kill last spawned camelCan Age Condition
Section titled “Can Age Condition ”Checks whether or not an entity will be able to age/grow up.
on breeding: entity can't age broadcast "An immortal has been born!" to playerCan Breed Condition
Section titled “Can Breed Condition ”Checks whether or not a living entity can 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 playerCan Build Condition
Section titled “Can Build Condition ”Tests whether a player is allowed to build at a certain location. This condition requires a supported regions plugin to be installed.
command /setblock <material>: description: set the block at your crosshair to a different type trigger: player cannot build at the targeted block: message "You do not have permission to change blocks there!" stop set the targeted block to argumentCan Build In Regions Condition skript-worldguard
Section titled “Can Build In Regions Condition skript-worldguard”A condition to test whether a player can build in a region or at a specific location.
%players% (isn't|is not|aren't|are not) allowed to build (%directions% %locations%|[in] %worldguardregions%)command /setblock <material>: description: Sets your targeted block to a different type. trigger: if the player cannot build at the targeted block: message "<red>You do not have permission to modify your targeted block!" else: set the targeted block to the material-argumentCan Despawn Condition
Section titled “Can Despawn Condition ”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.
if last spawned entity can despawn on chunk unload: make last spawned entity not despawn on chunk unloadCan Hold Condition
Section titled “Can Hold Condition ”Tests whether a player or a chest can hold the given item.
%inventories% (can(no|')t hold|(ha(s|ve) not|ha(s|ve)n't|do[es]n't have) [enough] space (for|to hold)) %itemtypes%block can hold 200 cobblestoneplayer has enough space for 64 feathersCan Pick Up Items Condition
Section titled “Can Pick Up Items Condition ”Whether living entities are able to pick up items off the ground or not.
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 playerCan See Condition
Section titled “Can See Condition ”Checks whether the given players can see the provided entities.
if sender can't see the player-argument: message "who dat?"if the player can see the last spawned entity: message "hello there!"Can See Chat Colors Condition
Section titled “Can See Chat Colors Condition ”Checks whether a player can see chat colors.
if player can see chat colors: send "Find the red word in <red>this<reset> message."else: send "You cannot partake in finding the colored word."Can See Messages Condition
Section titled “Can See Messages Condition ”Checks whether a player can see specific message types 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!"Cancel Active Item Effect
Section titled “Cancel Active Item Effect ”Interrupts the action entities may be trying to complete. For example, interrupting eating, or drawing back a bow.
on damage of player: if the victim's active tool is a bow: interrupt the usage of the player's active itemCancel Command Cooldown Effect
Section titled “Cancel Command Cooldown Effect ”Only usable in commands. Makes it so the current command usage isn't counted towards the cooldown.
(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-1Cancel Drops Effect
Section titled “Cancel Drops Effect ”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.
On Death ,
(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 dropsCancel Event Effect
Section titled “Cancel Event Effect ”Cancels the event (e.g. prevent blocks from being placed, or damage being taken).
cancel [the] eventuncancel [the] eventon damage: victim is a player victim has the permission "skript.god" cancel the eventCase Text Expression
Section titled “Case Text Expression ”Copy of given text in Lowercase, Uppercase, Proper Case, camelCase, PascalCase, Snake_Case, and Kebab-Case
"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?Cat Entity Data
Section titled “Cat Entity Data ”[(baby|young)|(adult|grown(-| )up)] [%cattype%] cat[s]tamed [(baby|young)|(adult|grown(-| )up)] ocelot[s][%cattype%] kitten[s]Cat Type Type
Section titled “Cat Type Type ”Represents the race/type of a cat entity. NOTE: Minecraft namespaces are supported, ex: 'minecraft:british_shorthair'.
all black, black, british shorthair, calico, jellie, persian, ragdoll, red, siamese, tabby, whiteCatch Runtime Errors Section
Section titled “Catch Runtime Errors Section ”Catch any runtime errors produced by code within the section. This is an in progress feature.
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)ceil Function
Section titled “ceil Function ”Rounds a number up, i.e. returns the closest integer larger than or equal to the argument.
ceil(2.34) = 3ceil(2) = 2ceil(2.99) = 3ceiling(2.34) = 3ceiling(2) = 2ceiling(2.99) = 3Center of World Border Expression
Section titled “Center of World Border Expression ”The center of a world border.
set world border center of {_worldborder} to location(10, 0, 20)Chance Condition
Section titled “Chance Condition ”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.
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*"Change: Set/Add/Remove/Remove All/Delete/Reset Effect
Section titled “Change: Set/Add/Remove/Remove All/Delete/Reset Effect ”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.
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 blockCharacter Codepoint Expression
Section titled “Character Codepoint Expression ”Returns the Unicode codepoint of a character
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 trueCharacter from Codepoint Expression
Section titled “Character from Codepoint Expression ”Returns the character at the specified codepoint
function chars_between(lower: string, upper: string) :: strings: set {_lower} to codepoint of {_lower} return {_none} if {_lower} is not set
set {_upper} to codepoint of {_upper} return {_none} if {_upper} is not set
loop integers between {_lower} and {_upper}: add character from codepoint loop-value to {_chars::*} return {_chars::*}Characters Between Expression
Section titled “Characters Between Expression ”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.
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"Charge Entity Effect
Section titled “Charge Entity Effect ”Charges or uncharges a creeper or wither skull. A creeper is charged when it has been struck by lightning.
on spawn of creeper: charge the event-entityChat Format Expression
Section titled “Chat Format Expression ”Can be used to modify the chat format. The sender of a message is represented by player. The message is represented by message.
[the] (message|chat) format[ting]set the chat format to "<yellow>%player%<light gray>: <green>%message%"[the] [chat( |-)]messageon chat: player has permission "admin" set the message to "<light red>%message%"Chat Recipients Expression
Section titled “Chat Recipients Expression ”The recipients of a chat event
[the] [chat( | -)]recipientschat recipientsChicken Entity Data
Section titled “Chicken Entity Data ”[(baby|young)|(adult|grown(-| )up)] [%chickenvariant%] chicken[s][%chickenvariant%] chick[s]Chicken Variant Type
Section titled “Chicken Variant Type ”Represents the variant of a chicken entity. NOTE: Minecraft namespaces are supported, ex: 'minecraft:warm'.
cold, temperate, warmChunk Expression
Section titled “Chunk Expression ”Returns the chunk of a block, location or entity is in, or a list of the loaded chunks of a world.
add the chunk at the player to {protected chunks::*}set {_chunks::*} to the loaded chunks of the player's worldChunk Type
Section titled “Chunk Type ”A chunk is a cuboid of 16×16×128 (x×z×y) blocks. Chunks are spread on a fixed rectangular grid in their world.
clamp Function
Section titled “clamp Function ”Clamps one or more values between two numbers. This function retains indices
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)Clear Entity Storage Effect
Section titled “Clear Entity Storage Effect ”Clear the stored entities of an entity block storage (i.e. beehive).
clear the stored entities of {_beehive}Click Type Type
Section titled “Click Type Type ”Click type, mostly for inventory events. Tells exactly which keys/buttons player pressed, assuming that default keybindings are used in client side.
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 actionClicked Block/Entity/Inventory/Slot Expression
Section titled “Clicked Block/Entity/Inventory/Slot Expression ”The clicked block, entity, inventory, inventory slot, inventory click type or inventory action.
[the] (clicked [enchant[ment]] (button|option)|clicked (block|%itemtype/entitydata%)|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"Color from Hex Code Expression
Section titled “Color from Hex Code Expression ”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.
send color from hex code "#FFBBA7"send color from hex code "FFBBA7"send color from hex code "#AAFFBBA7"Color Items Effect
Section titled “Color Items Effect ”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.
dye player's helmet bluecolor the player's tool redColor of Expression
Section titled “Color of Expression ”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.
[the] colo[u]r[s] of %blocks/itemtypes/entities/fireworkeffects/potioneffecttypes/displays/bossbars%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 blackColored/Formatted/Uncolored Expression
Section titled “Colored/Formatted/Uncolored Expression ”Parses or removes colors and, optionally, chat styles in/from a message.
on chat: set message to colored message # only safe tags, such as colors, will be parsedcommand /fade <player>: trigger: set the display name of the player-argument to the uncolored display name of the player-argumentcommand /format <text>: trigger: message formatted text-argument # parses all tags, but this is okay as the output is sent back to the executorcombinations Function
Section titled “combinations Function ”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.
combinations(10, 8) = 45combinations(5, 3) = 10combinations(size of {some list::*}, 2)Command Structure
Section titled “Command Structure ”Used for registering custom commands.
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 argumentCommand Effect
Section titled “Command Effect ”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.
make player execute command "/home"execute console command "/say Hello everyone!"execute player bungeecord command "/alert &6Testing Announcement!"Command Expression
Section titled “Command Expression ”The command that caused an 'on command' event (excluding the leading slash and all arguments)
[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 eventCommand Block Command Expression
Section titled “Command Block Command Expression ”Gets or sets the command associated with a command block or minecart with command block.
send command of {_block}set command of {_cmdMinecart} to "say asdf"Command Info Expression
Section titled “Command Info Expression ”Get information about a command.
main command label of command "skript"description of command "help"label of command "pl"usage of command "help"aliases of command "bukkit:help"permission of command "/op"command "op"'s permission messagecommand "sk"'s plugin ownercommand /greet <player>: usage: /greet <target> trigger: if arg-1 is sender: send "&cYou can't greet yourself! Usage: %the usage%" stop send "%sender% greets you!" to arg-1 send "You greeted %arg-1%!"Command Sender Expression
Section titled “Command Sender Expression ”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%
[the] [command['s]] (sender|executor)make the command sender execute "/say hi!"on command: log "%executor% used command /%command% %arguments%" to "commands.log"Command Sender Type
Section titled “Command Sender Type ”A player or the console.
A command sender's name, as text. Cannot be changed.
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-1Comparison Condition
Section titled “Comparison Condition ”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.
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 dragonCompass Target Expression
Section titled “Compass Target Expression ”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.
# 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%}concat Function
Section titled “concat Function ”Joins the provided texts (and other things) into a single text.
concat("hello ", "there") # hello thereconcat("foo ", 100, " bar") # foo 100 barConditional / Unconditional Effect
Section titled “Conditional / Unconditional Effect ”Sets whether the provided command blocks are conditional or not.
make command block {_block} conditionalmake command block {_block} unconditional if {_block} is conditionalConditionals Section
Section titled “Conditionals Section ”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
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]<.+>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 sectionConfig Expression
Section titled “Config Expression ”The Skript config. This can be reloaded, or navigated to retrieve options.
[the] [skript] configset {_node} to node "language" in the skript configif text value of {_node} is "french": broadcast "Bonjour!"Config Type
Section titled “Config Type ”A configuration (or code) loaded by Skript, such as the config.sk or aliases. Configs can be reloaded or navigated to find options.
The filename of the Config, as text.
the skript configConnect Effect
Section titled “Connect Effect ”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`.
connect all players to proxy server "hub"transfer player to server "my.server.com"transfer player to server "localhost" on port 25566Console Expression
Section titled “Console Expression ”Represents the server's console which can receive messages and execute commands
[the] (console|server)execute console command "/stop"send "message to console" to the consoleConsume Boosting Firework Effect
Section titled “Consume Boosting Firework Effect ”Prevent the firework used in an 'elytra boost' event to be consumed.
(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 consumeConsume Brewing Fuel Effect
Section titled “Consume Brewing Fuel Effect ”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.
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 fuelConsumed Item Expression
Section titled “Consumed Item Expression ”Represents the item consumed within an entity shoot bow and item consume event.
[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 carrotContains Property
Section titled “Contains Property ”Something that can contain other things, such as an inventory or a string.
Contains (Property) Condition
Section titled “Contains (Property) Condition ”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}`.
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 stickContinue Effect
Section titled “Continue Effect ”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.
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)"Converging Particle Effect Type
Section titled “Converging Particle Effect Type ”A particle effect where particles converge towards a point.
Cooldown Time/Remaining Time/Elapsed Time/Last Usage/Bypass Permission Expression
Section titled “Cooldown Time/Remaining Time/Elapsed Time/Last Usage/Bypass Permission Expression ”Only usable in command events. Represents the cooldown time, the remaining time, the elapsed time, the last usage date, or the cooldown bypass permission.
[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%}Copy Into Variable Effect
Section titled “Copy Into Variable Effect ”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.
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!"cos Function
Section titled “cos Function ”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.
cos(0) = 1cos(90) = 0Cow Entity Data
Section titled “Cow Entity Data ”[(baby|young)|(adult|grown(-| )up)] [%cowvariant%] cow[s][%cowvariant%] cal(f|ves)Cow Variant Type
Section titled “Cow Variant Type ”Represents the variant of a cow entity. NOTE: Minecraft namespaces are supported, ex: 'minecraft:warm'.
cold, temperate, warmCreate Boss Bar Expression
Section titled “Create Boss Bar Expression ”Creates a new boss bar. Boss bars can be pink/blue/red/green/yellow/purple/white, and will pick the closest valid color to the one you provide. Boss bars can have viewers removed or added to them. Making the boss bar 'keyed' will add it to the persistent storage of the server and will be editable by commands and restored after restart.
on join: set {_bar} to a boss bar: set color of event-bossbar to white set title of event-bossbar to "<green>Welcome %player%!" set progress of event-bossbar to 50% set style of event-bossbar to 6 notches make event-bossbar darken the sky add player to viewers of {_bar} wait 5 seconds remove player from viewers of {_bar}Create Loot Context Expression
Section titled “Create Loot Context Expression ”Create a loot context.
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}Create Region Effect skript-worldguard
Section titled “Create Region Effect skript-worldguard”An effect to create a WorldGuard region. A temporary region is a region that will not be saved, meaning it is lost when the server restarts. A global region is a region that has no boundaries, meaning it covers the entire world. A cuboid region is the traditional WorldGuard region. It has two points to determine the boundaries. A polygonal region comprises many points. These points are used to draw a two-dimensional shape. Then, with the provided heights, the shape is extended vertically to form the region. At least three points must be provided to create a polygonal region. Note that if you do not specify the world for a region, you must be sure that the locations provided all have the same world. Note that Region IDs are only valid if they contain letters, numbers, underscores, commas, single quotation marks, dashes, pluses, and forward slashes. Note that if you attempt to create a region in a world where a region with the same ID already exists, that region will be replaced. Note that if you do not specify the minimum and maximum heights for a polygonal region, those values will be calculated from the points.
create a temporary global region named "temporary_global_region" in the player's worldcreate region "cuboid_region" in player's world between the location (0, 60, 0) and the location (10, 70, 10)create a polygonal region named "polygonal_region" with a minimum height of 10 and a maximum height of 20 with points {points::*}Create WorldBorder Expression
Section titled “Create WorldBorder Expression ”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.
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 5Created Damage Source Expression
Section titled “Created Damage Source Expression ”Get the created damage source being created/modified in a 'custom damage source' section.
[the] created damage sourceset {_source} to a custom damage source: set the damage type of the created damage source to magicCreated Potion Effect Expression
Section titled “Created Potion Effect Expression ”An expression to obtain the potion effect being made in a potion effect creation section.
[the] [created] [potion] effectset {_potion} to a potion effect of speed 2 for 10 minutes: hide the effect's icon hide the effect's particlesCreature/Entity/Player/Projectile/Villager/Powered Creeper/etc. Expression
Section titled “Creature/Entity/Player/Projectile/Villager/Powered Creeper/etc. Expression ”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'.
[the] [event-]<.+>give a diamond sword of sharpness 3 to the playerkill the creeperkill all powered creepers in the wolf's worldprojectile is an arrowCreeper Entity Data
Section titled “Creeper Entity Data ”creeper[s](powered|charged) creeper[s]un(powered|charged) creeper[s]Cursor Slot Expression
Section titled “Cursor Slot Expression ”The item which the player has on their inventory cursor. This slot is always empty if player has no inventory open.
cursor slot of player is dirtset cursor slot of player to 64 diamondsCustom Chest Inventory Expression
Section titled “Custom Chest Inventory Expression ”Returns a chest inventory with the given amount of rows and the name. Use the open inventory effect to open it.
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 playerCustom Model Data Expression
Section titled “Custom Model Data Expression ”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.
set 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)Damage Expression
Section titled “Damage Expression ”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.
[the] damageon item damage: event-item is any tool clear damage # unbreakable tools as the damage will be 0on damage: increase the damage by 2Damage Amount of World Border Expression
Section titled “Damage Amount of World Border Expression ”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.
set world border damage amount of {_worldborder} to 1Damage Buffer of World Border Expression
Section titled “Damage Buffer of World Border Expression ”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.
set world border damage buffer of {_worldborder} to 10Damage Cause Condition
Section titled “Damage Cause Condition ”Tests what kind of damage caused a damage event. Refer to the Damage Cause type for a list of all possible causes.
# 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 dropsDamage Cause Expression
Section titled “Damage Cause Expression ”The damage cause of a damage event. Please click on the link for more information.
[the] damage causedamage cause is lava, fire or burningDamage Cause Type
Section titled “Damage Cause Type ”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.
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 breathDamage Source Expression
Section titled “Damage Source Expression ”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.
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 * 2Damage Source Type
Section titled “Damage Source Type ”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.
Damage Source - Causing Entity Expression
Section titled “Damage Source - Causing Entity Expression ”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.
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)on damage: set {_causing} to the causing entity of event-damage sourceDamage Source - Damage Location Expression
Section titled “Damage Source - Damage Location Expression ”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.
damage 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 sourceDamage Source - Damage Type Expression
Section titled “Damage Source - Damage Type Expression ”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.
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 death: set {_type} to the damage type of event-damage sourceDamage Source - Direct Entity Expression
Section titled “Damage Source - Direct Entity Expression ”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.
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 death: set {_direct} to the direct entity of event-damage sourceDamage Source - Does Scale With Difficulty Condition
Section titled “Damage Source - Does Scale With Difficulty Condition ”Whether the damage from a damage source scales with the difficulty of the server.
on death: if event-damage source scales damage with difficulty:Damage Source - Food Exhaustion Expression
Section titled “Damage Source - Food Exhaustion Expression ”The amount of hunger exhaustion caused by a damage source.
on damage: if the food exhaustion of event-damage source is 10:Damage Source - Source Location Expression
Section titled “Damage Source - Source Location Expression ”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.
on death: set {_location} to the source location of event-damage sourceDamage Source - Was Indirectly Caused Condition
Section titled “Damage Source - Was Indirectly Caused Condition ”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.
on damage: if event-damage source was indirectly caused:Damage Sources Experiment
Section titled “Damage Sources Experiment ”Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more.
damage source[s]damage 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)Damage Type Type
Section titled “Damage Type Type ”References a damage type of a damage source.
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 skullDamage Value/Durability Expression
Section titled “Damage Value/Durability Expression ”The damage value/durability of an item.
set damage value of player's tool to 10reset the durability of {_item}set durability of player's held item to 0Damage/Heal/Repair Effect
Section titled “Damage/Heal/Repair Effect ”Damage, heal, or repair an entity or item. Servers running Spigot 1.20.4+ can optionally choose to specify a fake damage cause.
damage player by 5 heartsdamage player by 3 hearts with fake cause fallheal the playerrepair tool of playerDamaged Item Expression
Section titled “Damaged Item Expression ”Directly damages an item. In MC versions 1.12.2 and lower, this can be used to apply data values to items/blocks
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"Dance Effect
Section titled “Dance Effect ”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.
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 hoursdate Function
Section titled “date Function ”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).
optional
minuteoptional
secondoptional
millisecondoptional
zone_offsetoptional
dst_offsetoptional
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)Date Type
Section titled “Date Type ”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.
set {_yesterday} to nowsubtract a day from {_yesterday}# now {_yesterday} represents the date 24 hours before nowDate Ago/Later Expression
Section titled “Date Ago/Later Expression ”A date the specified timespan before/after another date.
set {_yesterday} to 1 day agoset {_hourAfter} to 1 hour after {someOtherDate}set {_hoursBefore} to 5 hours before {someOtherDate}De-queue Queue (Experimental) Expression
Section titled “De-queue Queue (Experimental) Expression ”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.
set {queue} to a new queueadd "hello" and "there" to {queue}set {list::*} to dequeued {queue}Death Message Expression
Section titled “Death Message Expression ”The message sent to all online players when a player dies.
[the] death( |-)messageon death of player: set the death message to "%player% died!"Debug Info Expression
Section titled “Debug Info Expression ”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.
broadcast debug info of {list::*}Default Value Expression
Section titled “Default Value Expression ”A shorthand expression for giving things a default value. If the first thing isn't set, the second thing will be returned.
broadcast {score::%player's uuid%} otherwise "%player% has no score!"Delay Section
Section titled “Delay Section ”Delays the script's execution by a given timespan.
When used as an effect, all code after the wait runs once the delay elapses. The whole trigger pauses until the wait finishes.
When used as a section, only the code within the section is deferred. Code after the section continues immediately, and the body runs on the same event once the delay elapses. This is useful for scheduling follow-up work without blocking the rest of the trigger.
Note that delays are not persistent. For example, ban player → wait 7 days → unban player will not resume if the server restarts during the delay.
Inside a section body, outer loop-values are not available because the body is parsed as a separate trigger. Event values (like player) still work. If you need a value from before the delay, copy it to a local variable. Local variables are snapshotted when the section is scheduled, so subsequent changes aren't reflected.
wait 2 minuteshalt for 5 minecraft hourswait a tick# Section form: outer continues immediately, body runs 3 seconds later.send "hello" to playerwait 3 seconds: send "...and goodbye" to playersend "This runs first!" to playerwait 1 seconds: send "This runs third! (one second later)" to playersend "This runs second!" to playerDetonate Entities Effect
Section titled “Detonate Entities Effect ”Immediately detonates an entity. Accepted entities are fireworks, TNT minecarts, primed TNT, wind charges and creepers.
detonate last launched fireworkDifference Expression
Section titled “Difference Expression ”The difference between two values Supported types include numbers, dates and times.
if difference between {command::%player%::lastuse} and now is smaller than a minute: message "You have to wait a minute before using this command again!"Difficulty Expression
Section titled “Difficulty Expression ”The difficulty of a world.
set the difficulty of "world" to hardnormal, medium, hard, easy, peacefulDirection Expression
Section titled “Direction Expression ”A helper expression for the direction type.
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 playerDirection Type
Section titled “Direction Type ”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.
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 waterDirectional Particle Effect Type
Section titled “Directional Particle Effect Type ”A particle effect which can be given a directional velocity.
Display Entity Data
Section titled “Display Entity Data ”display[s]display entit(y|ies)block display[s] [of %blockdata/itemtype%]block display entit(y|ies) [of %blockdata/itemtype%]%blockdata/itemtype% block display[s]%blockdata/itemtype% block display entit(y|ies)item display[s] [of %itemtype%]item display entit(y|ies) [of %itemtype%]%itemtype% item display[s]%itemtype% item display entit(y|ies)text display[s]text display entit(y|ies)Display Billboard Expression
Section titled “Display Billboard Expression ”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'.
set billboard of the last spawned text display to centerDisplay Billboard Type
Section titled “Display Billboard Type ”Represents the billboard setting of a display.
vertical pivot, horizontal, middle, horizontal pivot, center pivot, center, fixed, verticalDisplay Brightness Expression
Section titled “Display Brightness Expression ”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.
set sky light override of the last spawned text display to 7subtract 3 from the block light level override of the last spawned text displayif sky light level override of {_display} is 5: clear brightness override of {_display}Display Entity Type
Section titled “Display Entity Type ”A text, block or item display entity.
The scale multipliers to use for a displays. The x, y, and z scales of the display will be multiplied by the respective components of the vector.
Display Glow Color Override Expression
Section titled “Display Glow Color Override Expression ”Returns or changes the glowing color override of displays. This overrides whatever color is already set for the scoreboard team of the displays.
set glow color override of the last spawned text display to blueDisplay Height/Width Expression
Section titled “Display Height/Width Expression ”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.
set display height of the last spawned text display to 2.5Display Interpolation Delay/Duration Expression
Section titled “Display Interpolation Delay/Duration Expression ”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.
set interpolation delay of the last spawned text display to 2 ticksDisplay Name Expression
Section titled “Display Name Expression ”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.
on join: player has permission "name.red" set the player's display name to "<red>[admin] <gold>%name of player%"Display Name Property
Section titled “Display Name Property ”A more prominently displayed name, such as a player's display name or an entity's custom name. Often more easily changed than the regular name.
Display Shadow Radius/Strength Expression
Section titled “Display Shadow Radius/Strength Expression ”Returns or changes the shadow radius/strength of displays.
set shadow radius of the last spawned text display to 1.75Display Teleport Duration Expression
Section titled “Display Teleport Duration Expression ”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.
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}%"Display Text Alignment Type
Section titled “Display Text Alignment Type ”Represents the text alignment setting of a text display.
middle aligned, centered, right aligned, center aligned, left alignedDisplay Transformation Rotation Expression
Section titled “Display Transformation Rotation Expression ”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.
set left transformation rotation of last spawned block display to quaternion(1, 0, 0, 0) # reset block displayDisplay Transformation Scale/Translation Expression
Section titled “Display Transformation Scale/Translation Expression ”Returns or changes the transformation scale or translation of displays.
set transformation translation of display to vector from -0.5, -0.5, -0.5 # Center the display in the same position as a blockDisplay View Range Expression
Section titled “Display View Range Expression ”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.
set view range of the last spawned text display to 2.9Distance Expression
Section titled “Distance Expression ”The distance between two points.
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"Do Respawn Anchors Work Condition
Section titled “Do Respawn Anchors Work Condition ”Checks whether or not respawn anchors work in a world.
respawn anchors work in world "world_nether"on death of creeper: drop 1 TNTDropped Item Entity Data
Section titled “Dropped Item Entity Data ”dropped item[s]dropped %itemtypes%dropped item entit(y|ies)Dropped Item Owner Expression
Section titled “Dropped Item Owner Expression ”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.
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:Dropped Item Thrower Expression
Section titled “Dropped Item Thrower Expression ”The uuid of the entity or player that threw/dropped the dropped item.
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}Drops Expression
Section titled “Drops Expression ”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.
[the] dropsclear dropsremove 4 planks from the dropsDrops Of Block Expression
Section titled “Drops Of Block Expression ”A list of the items that will drop when a block is broken.
on break of block: give drops of block using player's tool to playerEgg Will Hatch Condition
Section titled “Egg Will Hatch Condition ”Whether the egg will hatch in a Player Egg Throw event.
[the] egg (will|will not|won't) hatchon player egg throw: if an entity won't hatch: send "Better luck next time!" to the playerElements Expression
Section titled “Elements Expression ”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
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}Enable/Disable/Unload/Reload Script Effect
Section titled “Enable/Disable/Unload/Reload Script Effect ”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.
reload script "test"enable script file "testing"unload script file "script.sk"set {_script} to the script "MyScript.sk"reload {_script}Enchant Item Expression
Section titled “Enchant Item Expression ”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.
[the] enchant[ed] itemon enchant: set the enchanted item to a diamond chestplateon enchant prepare: set the enchant item to a wooden swordEnchant/Disenchant Effect
Section titled “Enchant/Disenchant Effect ”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.
enchant the player's tool with sharpness 5enchant the player's tool at level 30disenchant the player's toolEnchanting Experience Cost Expression
Section titled “Enchanting Experience Cost Expression ”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.
[the] [displayed] ([e]xp[erience]|enchanting) coston enchant: send "Cost: %the displayed enchanting cost%" to playerEnchantment Type
Section titled “Enchantment Type ”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'. This also supports custom enchantments using namespaces, ex: 'myenchants:explosive'.
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 burstEnchantment Bonus Expression
Section titled “Enchantment Bonus Expression ”The enchantment bonus in an enchant prepare event. This represents the number of bookshelves affecting/surrounding the enchantment table.
[the] enchant[ment] bonuson enchant: send "There are %enchantment bonus% bookshelves surrounding this enchantment table!" to playerEnchantment Hint Expression
Section titled “Enchantment Hint Expression ”The enchantment hint in an enchant event. This is the enchantment that was shown to the player when they hovered over the enchantment offer that they eventually selected.
[the] enchant[ment] hinton enchant: send "You got at least %the enchantment hint%!"Enchantment Level Expression
Section titled “Enchantment Level Expression ”The level of a particular enchantment on an item.
player's tool is a sword of sharpness: message "You have a sword of sharpness %level of sharpness of the player's tool% equipped"Enchantment Offer Expression
Section titled “Enchantment Offer Expression ”The enchantment offer in enchant prepare events.
on enchant prepare: send "Your enchantment offers are: %the enchantment offers%" to playerEnchantment Offer Type
Section titled “Enchantment Offer Type ”The enchantmentoffer in an enchant prepare event.
on enchant prepare: set enchant offer 1 to sharpness 1 set the cost of enchant offer 1 to 10 levelsEnchantment Offer Cost Expression
Section titled “Enchantment Offer Cost Expression ”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.
set cost of enchantment offer 1 to 50Enchantment Type Type
Section titled “Enchantment Type Type ”An enchantment with an optional level, e.g. 'sharpness 2' or 'fortune'.
<enchantment> [<level>]enchant the player's tool with sharpness 5helmet is enchanted with waterbreathingEnder Chest Expression
Section titled “Ender Chest Expression ”The ender chest of a player.
open the player's ender chest to the playerEnderman Entity Data
Section titled “Enderman Entity Data ”enderm(a|e)n [(carrying|holding) %itemtype%]Enderman Carrying BlockData Expression
Section titled “Enderman Carrying BlockData Expression ”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.
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}Enderman Has Been Stared At Condition
Section titled “Enderman Has Been Stared At Condition ”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.
if last spawned enderman has been stared at:Enderman Teleport Effect
Section titled “Enderman Teleport Effect ”Make an enderman teleport randomly or towards an entity. Teleporting towards an entity teleports in the direction to the entity and not to them.
make last spawned enderman teleport randomlyloop 10 times: make all endermen teleport towards playerEnforce Whitelist Effect
Section titled “Enforce Whitelist Effect ”Enforces or un-enforce a server's whitelist. All non-whitelisted players will be kicked upon enforcing the whitelist.
[un]enforce [the] [server] white[ ]listenforce the whitelistunenforce the whitelistEntities Expression
Section titled “Entities Expression ”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.
[all [[of] the]|the] entities of type[s] %entitydatas% [(in|of) (world[s] %worlds%|%worlds/chunks%)][all [[of] the]|the] %entitydatas% (within|[with]in radius) %number% [block[s]|met(er|re)[s]] (of|around) %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}}entity Function
Section titled “entity Function ”Returns an entity from a given UUID. If the entity is unloaded or an offline player, the function will return nothing.
set {_entity} to entity({uuid})kill entity({uuid})set {_type} to type of entity({uuid})Entity Type
Section titled “Entity Type ”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.
The entity's custom name, if it has one, as text. Can be set or reset.
The entity's name, if it has one, as text.Note that the regular name cannot be changed, meaning the entity's custom (display) name will be changed instead.
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 playerEntity AI Expression
Section titled “Entity AI Expression ”Returns whether an entity has AI.
set artificial intelligence of target entity to falseEntity Attribute Expression
Section titled “Entity Attribute Expression ”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.
on damage of player: send "You are wounded!" to victim set victim's attack speed attribute to 2Entity Despawn Effect
Section titled “Entity Despawn Effect ”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.
make all entities not despawnable on chunk unloadspawn zombie at location(0, 0, 0): force event-entity to not despawn when far awayEntity Effect Type
Section titled “Entity Effect Type ”Various entity effects that can be played for entities, like wolf howling, or villager happy.
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, kinetic weapon hit effect, 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 effectEntity Fire Burn Duration Expression
Section titled “Entity Fire Burn Duration Expression ”How much time an entity will be burning for.
send "You will stop burning in %fire time of player%"send the max burn time of targetEntity is in Liquid Condition
Section titled “Entity is in Liquid Condition ”Checks whether an entity is in rain, lava, water or a bubble column.
if player is in rain:if player is in water:player is in lava:player is in bubble columnEntity Is Sheared Condition
Section titled “Entity Is Sheared Condition ”Checks whether entities are sheared.
if targeted entity of player is sheared: send "This entity has nothing left to shear!" to playerEntity is Wet Condition
Section titled “Entity is Wet Condition ”Checks whether an entity is wet or not (in water, rain or a bubble column).
if player is wet:Entity Owner Expression
Section titled “Entity Owner Expression ”The owner of a tameable entity (i.e. horse or wolf).
set owner of last spawned wolf to player if the owner of last spawned wolf is player:Entity Size Expression
Section titled “Entity Size Expression ”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.
spawn a slime at player: set entity size of event-entity to 5 set name of event-entity to "King Slime Jorg"Entity Snapshot Expression
Section titled “Entity Snapshot Expression ”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.
spawn a pig at location(0, 0, 0): set the max health of entity to 20 set the health of entity to 20 set {_snapshot} to the entity snapshot of entity clear entityspawn {_snapshot} at location(0, 0, 0)Entity Snapshot Type
Section titled “Entity Snapshot Type ”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.
Entity Sound Expression
Section titled “Entity Sound Expression ”Gets the sound that a given entity will make in a specific scenario.
[the] [(tall|high)|(low|normal)] fall damage sound[s] [from [[a] height [of]] %number%] of %livingentities%%livingentities%'[s] [(tall|high)|(low|normal)] fall [damage] sound[s] [from [[a] height [of]] %number%]play sound (hurt sound of player) at playerset {_sounds::*} to death sounds of (all mobs in radius 10 of player)Entity Storage Entity Count Expression
Section titled “Entity Storage Entity Count Expression ”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.
broadcast the stored entity count of {_beehive}set the maximum entity count of {_beehive} to 20Entity Storage Is Full Condition
Section titled “Entity Storage Is Full Condition ”Checks to see if the an entity block storage (i.e beehive) is full.
if the entity storage of {_beehive} is full: release the entity storage of {_beehive}Entity Type Type
Section titled “Entity Type Type ”The type of an entity, e.g. player, wolf, powered creeper, etc.
<i>Detailed usage will be added eventually</i>victim is a cowspawn a creeperEntity Type with Amount Type
Section titled “Entity Type with Amount Type ”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.
<<a href='#number'>number</a>> <entity type>spawn 5 creepers behind the playerEntity Visibility Effect
Section titled “Entity Visibility Effect ”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.
on spawn: if event-entity is a chicken: hide event-entityreveal hidden players of playersEntity/Player/World from UUID Expression
Section titled “Entity/Player/World from UUID Expression ”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.
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}Equip Effect
Section titled “Equip Effect ”Equips or unequips an entity with the given itemtypes (usually armor). This effect will replace any armor that the entity is already wearing.
equip player with diamond helmetequip player with diamond leggings, diamond chestplate, and diamond bootsunequip diamond chestplate from playerunequip player's armorEquipment Slot Type
Section titled “Equipment Slot Type ”Represents an equipment slot of an entity.
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 armourEquippable Component Expression
Section titled “Equippable Component Expression ”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.
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}Equippable Component - Allowed Entities Expression
Section titled “Equippable Component - Allowed Entities Expression ”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.
set the allowed entities of {_item} to a zombie and a skeletonset {_component} to the equippable component of {_item}clear the allowed entities of {_component}Equippable Component - Camera Overlay Expression
Section titled “Equippable Component - Camera Overlay Expression ”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.
set 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"Equippable Component - Can Be Dispensed Condition
Section titled “Equippable Component - Can Be Dispensed Condition ”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.
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 dispensedEquippable Component - Can Be Sheared Off Condition
Section titled “Equippable Component - Can Be Sheared Off Condition ”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.
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 offEquippable Component - Can Equip On Entities Condition
Section titled “Equippable Component - Can Equip On Entities Condition ”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.
if {_item} can be equipped on entities:Equippable Component - Can Swap Equipment Condition
Section titled “Equippable Component - Can Swap Equipment Condition ”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.
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} swappableEquippable Component - Dispense Effect
Section titled “Equippable Component - Dispense Effect ”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.
allow {_item} to be dispensedset {_component} to the equippable component of {_item}prevent {_component} from being dispensedEquippable Component - Equip On Entities Effect
Section titled “Equippable Component - Equip On Entities Effect ”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.
allow {_item} to be equipped onto entitiesEquippable Component - Equip Sound Expression
Section titled “Equippable Component - Equip Sound Expression ”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.
set 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"Equippable Component - Equipment Slot Expression
Section titled “Equippable Component - Equipment Slot Expression ”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.
set the equipment slot of {_item} to chest slotset {_component} to the equippable component of {_item}set the equipment slot of {_component} to boots slotEquippable Component - Lose Durability Effect
Section titled “Equippable Component - Lose Durability Effect ”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.
(make|let) %equippablecomponents% (lose durability|be damaged) (on [wearer['s]] injury|when [[the] wearer [is]] (hurt|injured|damaged))(allow|force) %equippablecomponents% to (lose durability|be damaged) (on [wearer['s]] injury|when [[the] wearer [is]] (hurt|injured|damaged))make %equippablecomponents% not (lose durability|be damaged) (on [wearer['s]] injury|when [[the] wearer [is]] (hurt|injured|damaged))(disallow|prevent) %equippablecomponents% 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 injuryEquippable Component - Model Expression
Section titled “Equippable Component - Model Expression ”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.
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"Equippable Component - Shear Off Effect
Section titled “Equippable Component - Shear Off Effect ”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.
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 entitiesEquippable Component - Shear Sound Expression
Section titled “Equippable Component - Shear Sound Expression ”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.
set 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"Equippable Component - Swap Equipment Effect
Section titled “Equippable Component - Swap Equipment Effect ”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.
(block|prevent|disallow) %equippablecomponents% from swapping 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 clickEquippable Component - Will Lose Durability Condition
Section titled “Equippable Component - Will Lose Durability Condition ”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.
%equippablecomponents% will (lose durability|be damaged) (on [wearer['s]] injury|when [[the] wearer [is]] (hurt|injured|damaged))%equippablecomponents% (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 injuredEquippable Components Type
Section titled “Equippable Components Type ”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.
Equippable Components Experiment
Section titled “Equippable Components Experiment ”Equippable components allow retrieving and changing the data of an item in the usage as equipment/armor.
equippable componentsset {_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}Event Structure
Section titled “Event Structure ”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.
[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 lastEvent Cancelled Condition
Section titled “Event Cancelled Condition ”Checks whether or not the event is cancelled.
[the] event is cancel[l]ed[the] event (is not|isn't) cancel[l]edon click: if event is cancelled: broadcast "no clicks allowed!"Exact Item Expression
Section titled “Exact Item Expression ”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.
set {_item} to exact item of block at location(0, 0, 0)Examples Experiment
Section titled “Examples Experiment ”A section used to provide examples inside code.
examplesexample: kick the player due to "You are not allowed here!"Except Expression
Section titled “Except Expression ”Filter a list by providing objects to be excluded.
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 ingotExecutable Type
Section titled “Executable Type ”Something that can be executed (run) and may accept arguments, e.g. a function. This may also return a result.
run {_function} with arguments 1 and trueExhaustion Expression
Section titled “Exhaustion Expression ”The exhaustion of a player. This is mainly used to determine the rate of hunger depletion.
set exhaustion of all players to 1Exists/Is Set Condition
Section titled “Exists/Is Set Condition ”Checks whether a given expression or variable is set.
{teams::%player's uuid%::preferred-team} is not seton damage: projectile exists broadcast "%attacker% used a %projectile% to attack %victim%!"Exit Effect
Section titled “Exit Effect ”Exits a given amount of loops and conditionals, or the entire trigger.
(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 waterexp Function
Section titled “exp Function ”The exponential function. You probably don't need this if you don't know what this is.
exp(0) = 1exp(1) = 2.7183Expand/Shrink World Border Effect
Section titled “Expand/Shrink World Border Effect ”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.
(expand|grow) [[the] (diameter|radius) of] %worldborders% (by|to) %number% [over [a period of] %timespan%](contract|shrink) [[the] (diameter|radius) of] %worldborders% (by|to) %number% [over [a period of] %timespan%](contract|shrink) %worldborders%['s (diameter|radius)] (by|to) %number% [over [a period of] %timespan%]expand world border of player by 100 over 5 secondsshrink world border of world "world" to 100 over 10 secondsExperience Expression
Section titled “Experience Expression ”How much experience was spawned in an experience spawn or block break event. Can be changed.
[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 experienceExperience Type
Section titled “Experience Type ”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.
[<number>] ([e]xp|experience [point[s]])give 10 xp to the playerExperience Cooldown Change Reason Expression
Section titled “Experience Cooldown Change Reason Expression ”The experience change reason within an experience cooldown change event.
[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 orbExperience Cooldown Change Reason Type
Section titled “Experience Cooldown Change Reason Type ”Represents a change reason of an experience cooldown change event.
plugin, pickup orb, orb pickupExperience Pickup Cooldown Expression
Section titled “Experience Pickup Cooldown Expression ”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.
send experience cooldown of playerset the xp pickup cooldown of player to 1 hourif exp collection cooldown of player >= 10 minutes: clear the experience pickup cooldown of playerExplode Creeper Effect
Section titled “Explode Creeper Effect ”Starts the explosion process of a creeper or instantly explodes it.
start explosion of the last spawned creeperstop ignition of the last spawned creeperExploded Blocks Expression
Section titled “Exploded Blocks Expression ”Get all the blocks that were destroyed in an explode event. Supports add/remove/set/clear/delete blocks.
[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 blocksExplosion Effect
Section titled “Explosion Effect ”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.
[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 an explosion of force 10 at the playercreate an explosion of force 0 at the victimExplosion Block Yield Expression
Section titled “Explosion Block Yield Expression ”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.
[the] [explosion['s]] block (yield|amount)[the] percentage of blocks droppedon explode: set the explosion's block yield to 10%Explosion Yield Expression
Section titled “Explosion Yield Expression ”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
[the] explosion (yield|radius|size)[the] (yield|radius|size) of [the] explosionon explosion prime: set the yield of the explosion to 10Explosive Yield Expression
Section titled “Explosive Yield Expression ”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.
on spawn of a creeper: set the explosive yield of the event-entity to 10Facing Expression
Section titled “Facing Expression ”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')
# makes a bridgeloop blocks from the block below the player in the horizontal facing of the player: set loop-block to cobblestonefactorial Function
Section titled “factorial Function ”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.
factorial(0) = 1factorial(3) = 3*2*1 = 6factorial(5) = 5*4*3*2*1 = 120factorial(171) = InfinityFall Distance Expression
Section titled “Fall Distance Expression ”The distance an entity has fallen for.
set all entities' fall distance to 10on damage: send "%victim's fall distance%" to victimFalling Block Entity Data
Section titled “Falling Block Entity Data ”falling block[s]falling %itemtype% [block[s]]feed all playersfeed the player by 5 beefsFertilized Blocks Expression
Section titled “Fertilized Blocks Expression ”The blocks fertilized in block fertilize events.
[all] [the] fertilized blocksthe fertilized blocksFilter Section
Section titled “Filter Section ”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.
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 10Filter Expression
Section titled “Filter Expression ”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.
send "congrats on being staff!" to all players where [player input has permission "staff"]loop (all blocks in radius 5 of player) where [block input is not air]:Final Damage Expression
Section titled “Final Damage Expression ”How much damage is done in a damage event, considering all types of damage reduction. Can NOT be changed.
[the] final damagesend "%final damage%" to victimFirework Effect Expression
Section titled “Firework Effect Expression ”Represents a 'firework effect' which can be used in the launch firework effect.
(|flickering|trailing|flickering trailing|trailing flickering) %fireworktype% [firework [effect]] colo[u]red %colors%(|flickering|trailing|flickering trailing|trailing flickering) %fireworktype% [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 1Firework Effect Type
Section titled “Firework Effect Type ”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.
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 1small, ball, star shaped, large, star, creeper face, small ball, large ball, burst, ball large, creeperFirst Empty Slot in Inventory Expression
Section titled “First Empty Slot in Inventory Expression ”Returns the first empty slot in an inventory. If no empty slot is found, it returns nothing.
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 playerFishing Approach Angle Expression
Section titled “Fishing Approach Angle Expression ”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.
(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 eventFishing Bite Time Expression
Section titled “Fishing Bite Time Expression ”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.
fish[ing] bit(e|ing) [wait] timeon fish approach: set fishing bite time to 5 secondsFishing Hook Expression
Section titled “Fishing Hook Expression ”The fishing hook in a fishing event.
[the] fish[ing] (hook|bobber)on fish line cast: wait a second teleport player to fishing hookFishing Hooked Entity Expression
Section titled “Fishing Hooked Entity Expression ”Returns the hooked entity in the hooked event.
[the] hook[ed] entityon entity hooked: if hooked entity is a player: teleport hooked entity to playerFishing Lure Applied Condition
Section titled “Fishing Lure Applied Condition ”Checks if the lure enchantment is applied to the current fishing event.
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 eventFishing State Type
Section titled “Fishing State Type ”Represents the different states of a fishing event.
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 caughtFishing Wait Time Expression
Section titled “Fishing Wait Time Expression ”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.
(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 secondsFlight Mode Expression
Section titled “Flight Mode Expression ”Whether the player(s) are allowed to fly. Use Make Fly effect to force player(s) to fly.
set flight mode of player to truesend "%flying state of all players%"floor Function
Section titled “floor Function ”Rounds a number down, i.e. returns the closest integer smaller than or equal to the argument.
floor(2.34) = 2floor(2) = 2floor(2.99) = 2Food Level Expression
Section titled “Food Level Expression ”The food level of a player from 0 to 10. Has several aliases: food/hunger level/meter/bar.
set the player's food level to 10For Each Loop Section
Section titled “For Each Loop Section ”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.
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}%"For Loops Experiment
Section titled “For Loops Experiment ”A new kind of loop syntax that stores the loop index and value in variables for convenience. This can be used to avoid confusion when nesting multiple loops inside each other. All existing loop features are also available in this section.
for [each] loop[s]for {_index}, {_value} in {my list::*}: broadcast "%{_index}%: %{_value}%"for each {_player} in all players: send "Hello %{_player}%!" to {_player}Force Attack Effect
Section titled “Force Attack Effect ”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.
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 2Force Eating Effect
Section titled “Force Eating Effect ”Make a panda or horse type (horse, camel, donkey, llama, mule) start/stop eating.
if last spawned panda is eating: make last spawned panda stop eatingForce Enchantment Glint Effect
Section titled “Force Enchantment Glint Effect ”Forces the items to glint or not, or removes its existing enchantment glint enforcement.
force {_items::*} to glintforce the player's tool to stop glintingForce Panda On Back Effect
Section titled “Force Panda On Back Effect ”Make a panda get on/off its back.
if last spawned panda is on its back: make last spawned panda get off its backForce Respawn Effect
Section titled “Force Respawn Effect ”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.
on death of player: force event-player to respawnformatNumber Function
Section titled “formatNumber Function ”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.
command /balance: aliases: bal executable by: players trigger: set {_money} to formatNumber({money::%sender's uuid%}) send "Your balance: %{_money}%" to senderFormatted Date Expression
Section titled “Formatted Date Expression ”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.
command /date: trigger: send "Full date: %now formatted human-readable%" to sender send "Short date: %now formatted as "yyyy-MM-dd"%" to senderFormer/Future State Expression
Section titled “Former/Future State Expression ”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.
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 weatherFox Entity Data
Section titled “Fox Entity Data ”[(baby|young)|(adult|grown(-| )up)] fox[es]fox (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] red fox[es]red fox (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] snow fox[es]snow fox (kid[s]|child[ren])Free / Max / Total Memory Expression
Section titled “Free / Max / Total Memory Expression ”The free, max or total memory of the server in Megabytes.
[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 ticksFreeze Time Expression
Section titled “Freeze Time Expression ”How much time an entity has been in powdered snow for.
player's freeze time is less than 3 seconds: send "you're about to freeze!" to the playerFrog Entity Data
Section titled “Frog Entity Data ”[(baby|young)|(adult|grown(-| )up)] frog[s]frog (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] temperate frog[s]temperate frog (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] warm frog[s]warm frog (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] cold frog[s]cold frog (kid[s]|child[ren])Frog Variant Type
Section titled “Frog Variant Type ”Represents the variant of a frog entity. NOTE: Minecraft namespaces are supported, ex: 'minecraft:warm'.
cold, temperate, warmfromBase Function
Section titled “fromBase Function ”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.
# /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::*}Function Structure
Section titled “Function Structure ”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
[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}%}Function Expression
Section titled “Function Expression ”Obtain a function by name, which can be executed.
set {_function} to the function named "myFunction"run {_function} with arguments 13 and trueFunction Type
Section titled “Function Type ”A function loaded by Skript. This can be executed (with arguments) and may return a result.
The function's name, as text.
run {_function} with arguments 1 and trueset {_result} to the result of {_function}Furnace Event Items Expression
Section titled “Furnace Event Items Expression ”Represents the different items in furnace events. Only 'smelting item' can be changed.
[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 itemFurnace Slot Expression
Section titled “Furnace Slot Expression ”A slot of a furnace, i.e. either the ore, fuel or result slot.
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 timeFurnace Times Expression
Section titled “Furnace Times Expression ”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.
set the cooking time of {_block} to 10set the total cooking time of {_block} to 50set the fuel burning time of {_block} to 100on smelt: if the fuel slot is charcoal: add 5 seconds to the fuel burn timeGame Effect Type
Section titled “Game Effect Type ”Various game effects that can be played for players, like record disc songs, splash potions breaking, or fake bone meal effects.
close door sound effectzombie infection sound effectlava dripping into cauldron sound effectzombie converting villager sound effectender dragon shoot sound effectzombie chewing on wooden door sound effectuse grindstone sound effectextinguish fire sound effectstop jukebox song sound effectcomplete end portal sound effectender eye launch sound effecteye of ender launch sound effectgust dust effectzombie attacking wooden door sound effectender dragon growl sound effectsponge dry out effectmenu click sound effectclose iron trapdoor sound effectend gateway spawn effectcharge shot sound effectfire bow sound effectlava dripping sound effectturn page sound effectdragon death sound effectwither shoot sound effectzombie chewing on iron door sound effectwater dripping into cauldron sound effectclose trapdoor sound effecteye of ender break effectgui click sound effectapply wax effectsculk shriek effectdragon growl sound effectspawner flames effectdragon breaking block effectcrafter craft sound effectvault eject item effectredstone torch burnout effectscrape oxidised copper effectchorus flower growing sound effectwater dripping sound effecttoggle fence gate sound effectzombie destroying door sound effectremove wax effectclose fence gate sound effectender dragon death sound effectdispenser shoot sound effectblaze shoot sound effectcrafter fail sound effectegg crack effectbrewing sound effectdragon shoot sound effectbat take off sound effectghast shriek sound effectdispenser click sound effectfill end portal frame effectwither breaking block sound effectuse smithing table sound effectextinguish sound effecttoggle iron door sound effecttoggle iron trapdoor sound effectender eye break effectdragon breath effecthusk converting to zombie sound effectender dragon breaking block effectcreate end portal sound effectspawn wither sound effecttoggle trapdoor sound effectghast shoot sound effectchorus flower death sound effectdragon's breath effectpointed dripstone land effectzombie attacking iron door sound effectmob spawner flames effectbreak anvil sound effectnether portal travel sound effectanvil land sound effectzombie destroy door sound effectclose iron door sound effectphantom bite sound effecttoggle door sound effecttrial spawner eject item effectskeleton converting to stray sound effectspawn cobweb effectshoot bow sound effectzombie converting to drowned sound effectuse anvil sound effectlava interaction effectGame Effects with Data Expression
Section titled “Game Effects with Data Expression ”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.
compost[er] [fill[ing]] (succe(ss|ed)|fail[ure|ed]) sound [effect](electric|lightning[ rod]|copper) spark effect [(in|using|along) the (x|y|z) axis][ominous] trial spawner spawn[ing] [mob] effect[ominous] trial spawner spawn[ing] [mob] effect with sound[ominous] [trial] vault activate effect[ominous] [trial] vault deactivate effecttrial spawner become[ing] [not] ominous effect[ominous] trial spawner spawn[ing] item effectplay compost success sound effect to playerGame Mode Expression
Section titled “Game Mode Expression ”The gamemode of a player. See Gamemodes
player's gamemode is survivalset the player's gamemode to creativeset gamemode of player to adventureGame Mode Type
Section titled “Game Mode Type ”The game modes survival, creative, adventure and spectator.
adventure, survival, spectator, creativeplayer's gamemode is survivalset the player argument's game mode to creativeGamerule Type
Section titled “Gamerule Type ”A gamerule
A gamerule's name, as text. Cannot be changed.
minecraft:entity_drops, minecraft:universal_anger, minecraft:spawn_patrols, minecraft:log_admin_commands, minecraft:keep_inventory, minecraft:raids, minecraft:fire_damage, minecraft:respawn_radius, minecraft:advance_time, minecraft:immediate_respawn, minecraft:block_drops, minecraft:projectiles_can_break_blocks, minecraft:elytra_movement_check, minecraft:block_explosion_drop_decay, minecraft:command_blocks_work, minecraft:spawn_phantoms, minecraft:natural_health_regeneration, minecraft:pvp, minecraft:mob_explosion_drop_decay, minecraft:player_movement_check, minecraft:fire_spread_radius_around_player, minecraft:max_command_sequence_length, minecraft:random_tick_speed, minecraft:spread_vines, minecraft:lava_source_conversion, minecraft:spawn_mobs, minecraft:fall_damage, minecraft:limited_crafting, minecraft:max_command_forks, minecraft:drowning_damage, minecraft:spawn_wardens, minecraft:send_command_feedback, minecraft:forgive_dead_players, minecraft:freeze_damage, minecraft:ender_pearls_vanish_on_death, minecraft:max_snow_accumulation_height, minecraft:players_sleeping_percentage, minecraft:mob_drops, minecraft:mob_griefing, minecraft:tnt_explosion_drop_decay, minecraft:water_source_conversion, minecraft:global_sound_events, minecraft:spectators_generate_chunks, minecraft:advance_weather, minecraft:show_death_messages, minecraft:allow_entering_nether_using_portals, minecraft:spawn_monsters, minecraft:spawner_blocks_work, minecraft:max_block_modifications, minecraft:show_advancement_messages, minecraft:command_block_output, minecraft:locator_bar, minecraft:players_nether_portal_creative_delay, minecraft:players_nether_portal_default_delay, minecraft:max_entity_cramming, minecraft:reduced_debug_info, minecraft:spawn_wandering_traders, minecraft:tnt_explodes, minecraft:max_minecart_speedGamerule Value Expression
Section titled “Gamerule Value Expression ”The gamerule value of a world.
set the gamerule commandBlockOutput of world "world" to falseGamerule Value Type
Section titled “Gamerule Value Type ”A wrapper for the value of a gamerule for a world.
Gene Type
Section titled “Gene Type ”Represents a Panda's main or hidden gene. See genetics for more info.
normal, lazy, happy, worried, worrisome, aggressive, brown, brownish, savage, playful, wild, weakGenerate Loot Effect
Section titled “Generate Loot Effect ”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.
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}Gliding State Expression
Section titled “Gliding State Expression ”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.
set gliding of player to offGlowing Expression
Section titled “Glowing Expression ”Indicates if targeted entity is glowing (new 1.9 effect) or not. Glowing entities can be seen through walls.
set glowing of player to trueGoat Entity Data
Section titled “Goat Entity Data ”[(baby|young)|(adult|grown(-| )up)] goat[s]goat (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] screaming goat[s]screaming goat (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] quiet goat[s]quiet goat (kid[s]|child[ren])Goat Has Horns Condition
Section titled “Goat Has Horns Condition ”Checks to see if a goat has or does not have a left, right, or both horns.
%livingentities% (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 hornGoat Horns Effect
Section titled “Goat Horns Effect ”Make a goat have or not have a left, right, or both horns.
remove the left horn of last spawned goatregrow {_goat}'s hornsremove both horns of all goatsGravity Expression
Section titled “Gravity Expression ”If entity is affected by gravity or not, i.e. if it has Minecraft 1.10+ NoGravity flag.
set gravity of player offGroup Expression
Section titled “Group Expression ”The primary group or all groups of a player. This expression requires Vault and a compatible permissions plugin to be installed. If you have LuckPerms, ensure you have vault integration enabled in the luck perms configurations.
on join: broadcast "%group of player%" # this is the player's primary group broadcast "%groups of player%" # this is all of the player's groupsHandedness Effect
Section titled “Handedness Effect ”Make mobs left or right-handed. This does not affect players.
spawn skeleton at spawn of world "world": make entity left handedmake all zombies in radius 10 of player right handedHanging Entity/Remover Expression
Section titled “Hanging Entity/Remover Expression ”Returns the hanging entity or remover in hanging break and place events.
[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 removertarget entity has aiHas Boss Bar Flag Condition
Section titled “Has Boss Bar Flag Condition ”Checks whether a boss bar has a specific flag. There are three flags: - 'darken the sky' - 'create fog' - 'play boss music'
if {_mybar} does darken the sky: broadcast "It's getting dark around here.."Has Chat Filtering Condition
Section titled “Has Chat Filtering Condition ”Checks whether a player has chat filtering enabled.
if player doesn't have chat filtering enabled: send "<gray>This server may contain mature chat messages. You have been warned!" to playerHas Client Weather Condition
Section titled “Has Client Weather Condition ”Checks whether the given players have a custom client weather
if the player has custom weather: message "Your custom weather is %player's weather%"Has Custom Model Data Condition
Section titled “Has Custom Model Data Condition ”Check if an item has a custom model data tag
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 coloursHas Glowing Text Condition
Section titled “Has Glowing Text Condition ”Checks whether a sign (either a block or an item) has glowing text
if target block has glowing textHas Item Cooldown Condition
Section titled “Has Item Cooldown Condition ”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.
if player has player's tool on cooldown: send "You can't use this item right now. Wait %item cooldown of player's tool for player%"Has Item Tooltips Condition
Section titled “Has Item Tooltips Condition ”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).
send true if entire tooltip of player's tool is shownif additional tooltip of {_item} is hidden:Has Line of Sight Condition
Section titled “Has Line of Sight Condition ”Checks whether living entities have an unobstructed line of sight to other entities or 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 playerHas Loot Table Condition
Section titled “Has Loot Table Condition ”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.
set event-block to chestif event-block has a loot table: # this will never happen, because it doesn't have a loot table.
set loot table of event-block to "minecraft:chests/simple_dungeon"if event-block has a loot table: # this will happen, because it now has a loot table.Has Metadata Condition
Section titled “Has Metadata Condition ”Checks whether a metadata holder has a metadata tag.
if player has metadata value "healer":Has Permission Condition
Section titled “Has Permission Condition ”Test whether a player has a certain permission.
player has permission "skript.tree"victim has the permission "admin": send "You're attacking an admin!" to attackerHas Persistent Data Tag Condition
Section titled “Has Persistent Data Tag Condition ”Checks if the specified objects have persistent data tags with the given keys. Keys should be in the format "namespace:key" or "key". If a namespace is omitted, "minecraft" will be used instead. If a key is invalid, it will be ignored and a warning will be logged.
if player has persistent data tag "koth:capturePoint": add 1 to {points::%{team::%player%}%}if player's tool has persistent data tags "custom:damage" and "custom:owner": if data tag "custom:owner" of player's tool is not player: broadcast "You are not the owner of this tool!" stop if data tag "custom:damage" of player's tool > 10: broadcast "Your tool is heavily damaged!" else: broadcast "Your tool is in good condition."Has Played Before Condition
Section titled “Has Played Before Condition ”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.
%offlineplayers% (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 beforeHas Potion Effect Condition
Section titled “Has Potion Effect Condition ”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.
%livingentities% (doesn't|does not|do not|don't) have ([any|a[n]] [active] potion effect[s]|[any|a] potion effect[s] 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!"Has Resource Pack Condition
Section titled “Has Resource Pack Condition ”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.
if the player has a resource pack loaded:Has Scoreboard Tag Condition
Section titled “Has Scoreboard Tag Condition ”Checks whether the given entities has the given scoreboard tags.
if the targeted armor stand has the scoreboard tag "test tag":Hash Expression
Section titled “Hash Expression ”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.
set {_hash} to "hello world" hashed with SHA-256Hatching Entity Type Expression
Section titled “Hatching Entity Type Expression ”The type of the entity that will be hatched in a Player Egg Throw event.
[the] hatching entity [type]on player egg throw: set the hatching entity type to a primed tntHatching Number Expression
Section titled “Hatching Number Expression ”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.
[the] hatching numberon player egg throw: set the hatching number to 10Head location Expression
Section titled “Head location Expression ”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.
set the block at the player's head to airset the block in front of the player's eyes to glassloop blocks in front of the player's head:Heal Amount Expression
Section titled “Heal Amount Expression ”The amount of health healed in a heal event.
[the] heal[ing] amounton player healing: increase the heal amount by 2 remove 0.5 from the healing amount[the] (regen|health regain|heal[ing]) (reason|cause)on heal: heal reason is satiated send "You ate enough food and gained full health back!"Heal Reason Type
Section titled “Heal Reason Type ”The health regain reason in a heal event.
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 regenHealth Expression
Section titled “Health Expression ”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).
message "You have %health% HP left."Hex Code Expression
Section titled “Hex Code Expression ”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.
send formatted "<#%hex code of rgb(100, 10, 10)%>darker red" to all playersHidden Players Expression
Section titled “Hidden Players Expression ”The players hidden from a player that were hidden using the entity visibility effect.
message "<light red>You are currently hiding: <light gray>%hidden players of the player%"Hide Player from Server List Effect
Section titled “Hide Player from Server List Effect ”Hides a player from the hover list and decreases the online players count (only if the player count wasn't changed before).
on server list ping: hide {vanished::*} from the server listHorse Domestication Expression
Section titled “Horse Domestication Expression ”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).
function domesticateAndTame(horse: entity, p: offline player, i: int = 10): add {_i} to domestication level of {_horse} if domestication level of {_horse} >= max domestication level of {_horse}: tame {_horse} set tamer of {_horse} to {_p}Hostname Expression
Section titled “Hostname Expression ”The hostname used by the connecting player to connect to the server in a connect event.
[the] (host|domain)[ ][name]on connect: hostname is "testers.example.com" send "Welcome back tester!"Hotbar Button Expression
Section titled “Hotbar Button Expression ”The hotbar button clicked in an inventory click event.
[the] hotbar buttonon inventory click: send "You clicked the hotbar button %hotbar button%!"Hotbar Slot Expression
Section titled “Hotbar Slot Expression ”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.
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 playerHover List Expression
Section titled “Hover List Expression ”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.
[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 listHumidity Expression
Section titled “Humidity Expression ”Humidity of given blocks.
set {_humidity} to event-block's humidityIgnite/Extinguish Effect
Section titled “Ignite/Extinguish Effect ”Lights entities on fire or extinguishes them.
ignite the playerextinguish the playerIgnition Process Condition
Section titled “Ignition Process Condition ”Checks if a creeper is going to explode.
[creeper[s]] %livingentities% ((is|are)|(isn't|is not|aren't|are not)) in the (ignition|explosion) processif the last spawned creeper is going to explode: loop all players in radius 3 of the last spawned creeper send "RUN!!!" to the loop-playerIn The Past/Future Condition
Section titled “In The Past/Future Condition ”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.
set {_date} to nowwait 5 secondsif {_date} is in the past: # this will be trueif now is in the future: # this will be falseset {_dates::*} to 1 day from now, 12 days from now, and 1 year from nowif {_dates::*} are in the future: # this will be trueif {_dates::*} have passed: # this will be falseIndices of List Expression
Section titled “Indices of List Expression ”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.
set {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, firstIndices of Value Expression
Section titled “Indices of Value Expression ”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.
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 4Infinity Expression
Section titled “Infinity Expression ”A number representing positive infinity.
positive (infinity|∞) [value]∞ [value]infinity valuevalue of [positive] (infinity|∞)if {_number} is infinity:Initiator Inventory Expression
Section titled “Initiator Inventory Expression ”Returns the initiator inventory in an on inventory item move event.
[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%!"Input Expression
Section titled “Input Expression ”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.
send "congrats on being staff!" to all players where [input has permission "staff"]sort {_list::*} based on length of input indexInput Key Type
Section titled “Input Key Type ”Represents a movement input key that is pressed by a player.
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 keyInsert Entity Storage Effect
Section titled “Insert Entity Storage Effect ”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+.
add last spawned bee into the entity storage of {_beehive}Interaction Height/Width Expression
Section titled “Interaction Height/Width Expression ”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
set interaction height of last spawned interaction to 5.3set interaction width of last spawned interaction to 2Inventory Expression
Section titled “Inventory Expression ”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.
add a plank to the player's inventoryclear the player's inventoryremove 5 wool from the inventory of the clicked blockInventory Type
Section titled “Inventory Type ”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).
Inventories can contain items.
The name of the inventory. Can be set or reset.
Whether the inventory contains no items (all slots contain air).
The name of the inventory. Can be set or reset.
The viewers of the inventory.
Inventory Action Expression
Section titled “Inventory Action Expression ”The inventory action of an inventory event. Please click on the link for more information.
[the] inventory actioninventory action is pickup allInventory Action Type
Section titled “Inventory Action Type ”What player just did in inventory event. Note that when in creative game mode, most actions do not work correctly.
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 swapInventory Close Reason Expression
Section titled “Inventory Close Reason Expression ”The inventory close reason of an inventory close event.
[the] inventory clos(e|ing) (reason|cause)on inventory close: inventory close reason is teleport send "Your inventory closed due to teleporting!" to playerInventory Close Reasons Type
Section titled “Inventory Close Reasons Type ”The inventory close reason in an inventory close event.
disconnect, death, teleport, cannot use, new opened, unknown, can't use, unloaded, disconnected, plugin, can not use, open new, playerInventory Holder/Viewers/Rows/Slots Expression
Section titled “Inventory Holder/Viewers/Rows/Slots Expression ”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.
event-inventory's amount of rowsholder of player's top inventory{_inventory}'s viewersInventory Slot Expression
Section titled “Inventory Slot Expression ”Represents a slot in an inventory. It can be used to change the item in an inventory too.
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 playerInventory Type Type
Section titled “Inventory Type Type ”Minecraft has several different inventory types with their own use cases.
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 inventoryInverse Boolean Expression
Section titled “Inverse Boolean Expression ”An expression to obtain the inverse value of a boolean
set {_gravity} to inverse of player's flight modeIP Expression
Section titled “IP Expression ”The IP address of a player, or the connected player in a connect event, or the pinger in a server list ping event.
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 consoleIs a Skript command Condition
Section titled “Is a Skript command Condition ”Checks whether a command/string is a custom Skript command.
on command: command is a skript commandIs Adult Condition
Section titled “Is Adult Condition ”Checks whether or not a living entity is an adult.
on drink: event-entity is not an adult kill event-entityIs Alive Condition
Section titled “Is Alive Condition ”Checks whether an entity is alive. Works for non-living entities too.
if {villager-buddy::%player's uuid%} is not dead:on shoot: while the projectile is alive:Is Baby Condition
Section titled “Is Baby Condition ”Checks whether or not a living entity is a baby.
on drink: event-entity is a baby kill event-entityIs Banned Condition
Section titled “Is Banned Condition ”Checks whether a player or IP is banned.
player is bannedvictim is not IP-banned"127.0.0.1" is bannedIs Bed/Anchor Spawn Condition
Section titled “Is Bed/Anchor Spawn Condition ”Checks what the respawn location of a player in the respawn event is.
[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!"Is Block Condition
Section titled “Is Block Condition ”Checks whether an item is a block.
player's held item is a block{list::*} are blocksIs Block Redstone Powered Condition
Section titled “Is Block Redstone Powered Condition ”Checks if a block is indirectly or directly powered by redstone
if clicked block is redstone powered: send "This block is well-powered by redstone!"if clicked block is indirectly redstone powered: send "This block is indirectly redstone powered."Is Blocking Condition
Section titled “Is Blocking Condition ”Checks whether a player is blocking with their shield.
on damage of player: victim is blocking damage attacker by 0.5 heartsIs Burning Condition
Section titled “Is Burning Condition ”Checks whether an entity is on fire, e.g. a zombie due to being in sunlight, or any entity after falling into lava.
# increased attack against burning targetsvictim is burning: increase damage by 2Is Charged Condition
Section titled “Is Charged Condition ”Checks if a creeper, wither, or wither skull is charged (powered).
if the last spawned creeper is charged: broadcast "A charged creeper is at %location of last spawned creeper%"Is Charging Fireball Condition
Section titled “Is Charging Fireball Condition ”Check whether a ghast is charging a fireball.
if last spawned ghast is charging fireball: kill last spawned ghastIs Climbing Condition
Section titled “Is Climbing Condition ”Whether a living entity is climbing, such as a spider up a wall or a player on a ladder.
spawn a spider at location of spawnwait a secondif the last spawned spider is climbing: message "The spider is now climbing!"Is Conditional Condition
Section titled “Is Conditional Condition ”Checks whether a command block is conditional or not.
if {_block} is conditional: make {_block} unconditionalIs Custom Name Visible Condition
Section titled “Is Custom Name Visible Condition ”Checks if an entity's custom name is visible.
send true if target's custom name is visibleIs Dancing Condition
Section titled “Is Dancing Condition ”Checks to see if an entity is dancing, such as allays, parrots, or piglins.
if last spawned allay is dancing: broadcast "Dance Party!"Is Eating Condition
Section titled “Is Eating Condition ”Whether a panda or horse type (horse, camel, donkey, llama, mule) is eating.
if last spawned panda is eating: force last spawned panda to stop eatingIs Edible Condition
Section titled “Is Edible Condition ”Checks whether an item is edible.
cooked beef is edibleplayer's tool is edibleIs Empty Condition
Section titled “Is Empty Condition ”Checks whether something is empty.
player's inventory is emptyIs Enchanted Condition
Section titled “Is Enchanted Condition ”Checks whether an item is enchanted. Enchants must match the exact level by default, unless 'or better' or 'or worse' are used.
%itemtypes% (is|are) enchanted [with %enchantmenttypes% [or ((better|greater|higher|above)|(worse|lesser|lower|below))]]%itemtypes% (isn't|is not|aren't|are not) enchanted [with %enchantmenttypes% [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 protectionIs Evenly Divisible By Condition
Section titled “Is Evenly Divisible By Condition ”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.
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:Is Fire Resistant Condition
Section titled “Is Fire Resistant Condition ”Checks whether an item is fire resistant.
if player's tool is fire resistant:if {_items::*} aren't resistant to fire:Is Fish Hook in Open Water Condition
Section titled “Is Fish Hook in Open Water Condition ”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.
on fish catch: if fish hook is in open water: send "You will catch a shark soon!"Is Flammable Condition
Section titled “Is Flammable Condition ”Checks whether an item is flammable.
send whether the tag contents of minecraft tag "planks" are flammableplayer's tool is flammableIs Flying Condition
Section titled “Is Flying Condition ”Checks whether a player is flying.
player is not flyingIs From A Mob Spawner Condition
Section titled “Is From A Mob Spawner Condition ”Checks if an entity was spawned from a mob spawner.
send whether target is from a mob spawnerIs Frozen Condition
Section titled “Is Frozen Condition ”Checks whether an entity is frozen.
if player is frozen: kill playerIs Fuel Condition
Section titled “Is Fuel Condition ”Checks whether an item can be used as fuel in a furnace.
on right click on furnace: if player's tool is not fuel: send "Please hold a valid fuel item in your hand" cancel eventIs Gliding Condition
Section titled “Is Gliding Condition ”Checks whether a living entity is gliding.
if player is glidingIs Hand Raised Condition
Section titled “Is Hand Raised Condition ”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).
on damage of player: if victim's main hand is raised: drop player's tool at player set player's tool to airIs Holding Condition
Section titled “Is Holding Condition ”Checks whether a player is holding a specific item. Cannot be used with endermen, use 'entity is [not] an enderman holding <item type>' instead.
player is holding a stickvictim isn't holding a diamond sword of sharpnessIs In Love Condition
Section titled “Is In Love Condition ”Checks whether or not a living entity is in love.
on spawn of living entity: if entity is in love: broadcast "That was quick!"Is Incendiary Condition
Section titled “Is Incendiary Condition ”Checks if an entity will create fire when it explodes. This condition is also usable in an explosion prime event.
on explosion prime: if the explosion is fiery: broadcast "A fiery explosive has been ignited!"Is Infinite Condition
Section titled “Is Infinite Condition ”Checks whether potion effects or timespans are infinite.
all of the active potion effects of the player are infiniteif timespan argument is infinite:Is Interactable Condition
Section titled “Is Interactable Condition ”Checks wether or not a block is interactable.
on block break: if event-block is interactable: cancel event send "You cannot break interactable blocks!"Is Invisible Condition
Section titled “Is Invisible Condition ”Checks whether a living entity is invisible.
target entity is invisibleIs Invulnerable Condition
Section titled “Is Invulnerable Condition ”Checks whether an entity or a gamemode is invulnerable. For gamemodes, Paper and Minecraft 1.20.6 are required
target entity is invulnerableloop all gamemodes: if loop-value is not invulnerable: broadcast "the gamemode %loop-value% is vulnerable!"Is Jumping Condition
Section titled “Is Jumping Condition ”Checks whether a living entity is jumping. This condition does not work on players.
on spawn of zombie: while event-entity is not jumping: wait 5 ticks push event-entity upwardsIs Leashed Condition
Section titled “Is Leashed Condition ”Checks to see if an entity is currently leashed.
target entity is leashedIs Loaded Condition
Section titled “Is Loaded Condition ”Checks whether a world, chunk or script is loaded. 'chunk at 1, 1' uses chunk coordinates, which are location coords divided by 16.
if chunk at {home::%player's uuid%} is loaded:if chunk 1, 10 in world "world" is loaded:if world("lobby") is loaded:if script named "MyScript.sk" is loaded:Is Lootable Condition
Section titled “Is Lootable Condition ”Checks whether an entity or block is lootable. Lootables are entities or blocks that can have a loot table.
spawn a pig at event-locationset {_pig} to last spawned entityif {_pig} is lootable: set loot table of {_pig} to "minecraft:entities/cow" # the pig will now drop the loot of a cow when killed, because it is indeed a lootable entity.set block at event-location to chestif block at event-location is lootable: set loot table of block at event-location to "minecraft:chests/simple_dungeon" # the chest will now generate the loot of a simple dungeon when opened, because it is indeed a lootable block.set block at event-location to white woolif block at event-location is lootable: # uh oh, nothing will happen because a wool is not a lootable block.Is Member/Owner of Region Condition
Section titled “Is Member/Owner of Region Condition ”Checks whether a player is a member or owner of a particular region. This condition requires a supported regions plugin to be installed.
on region enter: player is the owner of the region message "Welcome back to %region%!" send "%player% just entered %region%!" to all members of the regionIs Normalized Condition
Section titled “Is Normalized Condition ”Checks whether a vector is normalized i.e. length of 1
vector of player's location is normalizedIs Occluding Condition
Section titled “Is Occluding Condition ”Checks whether an item is a block and completely blocks vision.
player's tool is occludingIs of Type Condition
Section titled “Is of Type Condition ”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').
tool is of type {selected type}victim is of type {villager type}Is on Ground Condition
Section titled “Is on Ground Condition ”Checks whether an entity is on ground.
player is not on groundIs Online Condition
Section titled “Is Online Condition ”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.
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 tickIs Operator Condition
Section titled “Is Operator Condition ”Checks whether a player is a server operator.
player is an operatorIs Parent Region Condition skript-worldguard
Section titled “Is Parent Region Condition skript-worldguard”A condition to test whether a region is a parent region of another.
command /printchildren <text>: trigger: set {_parent} to the region text-argument message "Children of %{_parent}%:" loop all regions: if {_parent} is a parent region of loop-region: message "- %loop-region%"Is Passable Condition
Section titled “Is Passable Condition ”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.
if player's targeted block is passableIs Pathfinding Condition
Section titled “Is Pathfinding Condition ”Checks whether living entities are pathfinding. Can only be a living entity that is a Mob.
make {_entity} pathfind to {_location} at speed 2while {_entity} is pathfinding wait a secondlaunch flickering trailing burst firework colored red at location of {_entity}subtract 10 from {defence::tower::health}clear entity within {_entity}Is Persistent Condition
Section titled “Is Persistent Condition ”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.
on spawn: if event-entity is persistent: make event-entity not persistentIs Playing Dead Condition
Section titled “Is Playing Dead Condition ”Checks to see if an axolotl is playing dead.
if last spawned axolotl is playing dead: make last spawned axolotl stop playing deadIs Plugin Enabled Condition
Section titled “Is Plugin Enabled Condition ”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.
if plugin "Vault" is enabled:if plugin "WorldGuard" is not enabled:if plugins "Essentials" and "Vault" are enabled:if plugin "MyBrokenPlugin" is disabled:Is Poisoned Condition
Section titled “Is Poisoned Condition ”Checks whether an entity is poisoned.
if the player is poisoned: cure the player from poison message "You have been cured!" to the playerIs Preferred Tool Condition
Section titled “Is Preferred Tool Condition ”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.
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 eventIs Pressing Key Condition
Section titled “Is Pressing Key Condition ”Checks if a player is pressing a certain input key.
on player input: if player is pressing forward movement key: send "You are moving forward!"Is Region Member/Owner Condition skript-worldguard
Section titled “Is Region Member/Owner Condition skript-worldguard”A condition to test whether a player/group is a member/owner of a region.
%offlineplayers/strings% (isn't|is not|aren't|are not) ([a] member|[the|an] owner) of %worldguardregions%on region enter: player is the owner of the region message "Welcome back to %region%" message "%player's name% just entered %region%" to the members of the regionIs Region Temporary Condition skript-worldguard
Section titled “Is Region Temporary Condition skript-worldguard”A condition to test whether a region is temporary. Temporary regions are those that are removed when the server restarts.
on region enter: if the region is temporary: message "Be ready! This protected region will expire when the server restarts."Is Region Type Condition skript-worldguard
Section titled “Is Region Type Condition skript-worldguard”A condition to test what type/shape a region is.
on region enter: if the region is polygonal: message "Welcome to my wacky region!"Is Responsive Condition
Section titled “Is Responsive Condition ”Checks whether an interaction is responsive or not. Responsiveness determines whether clicking the entity will cause the clicker's arm to swing.
if last spawned interaction is responsive:if last spawned interaction is unresponsive:Is Riding Condition
Section titled “Is Riding Condition ”Tests whether an entity is riding any entity, a specific entity type, or a specific entity.
if player is riding:if player is riding an entity:if player is riding a saddled pig:if player is riding last spawned horse:Is Riptiding Condition
Section titled “Is Riptiding Condition ”Checks to see if an entity is currently using the Riptide enchantment.
target entity is riptidingIs Saddled Condition
Section titled “Is Saddled Condition ”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.
send whether {_horse} is saddledIs Screaming Condition
Section titled “Is Screaming Condition ”Check whether a goat or enderman is screaming.
if last spawned goat is not screaming: make last spawned goat scream if {_enderman} is screaming: force {_enderman} to stop screamingIs Script Loaded Condition
Section titled “Is Script Loaded Condition ”Check if the current script, or another script, is currently loaded.
script is loadedscript "example.sk" is loadedIs Silent Condition
Section titled “Is Silent Condition ”Checks whether an entity is silent i.e. its sounds are disabled.
target entity is silentIs Sleeping Condition
Section titled “Is Sleeping Condition ”Checks whether an entity is sleeping.
if player is sleeping: make player wake up without spawn location updateif last spawned fox is sleeping: make last spawned fox stop sleepingIs Slime Chunk Condition
Section titled “Is Slime Chunk Condition ”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.
command /slimey: trigger: if chunk at player is a slime chunk: send "Yeah, it is!" else: send "Nope, it isn't"Is Sneaking Condition
Section titled “Is Sneaking Condition ”Checks whether a player is 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 eventIs Solid Condition
Section titled “Is Solid Condition ”Checks whether an item is solid.
grass block is solidplayer's tool isn't solidIs Spawnable Condition
Section titled “Is Spawnable Condition ”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.
if a pig is spawnable in world "world": # trueif a monster can be spawned in {_world}: # falseIs Sprinting Condition
Section titled “Is Sprinting Condition ”Checks whether a player is sprinting.
player is not sprintingIs Stackable Condition
Section titled “Is Stackable Condition ”Checks whether an item is stackable.
diamond axe is stackablebirch wood is stackabletorch is stackableIs Swimming Condition
Section titled “Is Swimming Condition ”Checks whether a living entity is swimming.
player is swimmingIs Tagged Condition
Section titled “Is Tagged Condition ”Checks whether an item, block, entity, or entitydata is tagged with the given tag.
if player's tool is tagged with minecraft tag "enchantable/sharp_weapon": enchant player's tool with sharpness 1if all logs are tagged with tag "minecraft:logs"Is Tameable Condition
Section titled “Is Tameable Condition ”Check if an entity is tameable.
on damage: if victim is tameable: cancel eventIs Tamed Condition
Section titled “Is Tamed Condition ”Check if a tameable entity is tamed (horse, parrot, cat, etc.).
send true if {_horse} is tamedtame {_horse} if {_horse} is untamedIs Ticking Condition
Section titled “Is Ticking Condition ”Checks if an entity is ticking.
send true if target is tickingIs Transparent Condition
Section titled “Is Transparent Condition ”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.
player's tool is transparent.Is Unbreakable Condition
Section titled “Is Unbreakable Condition ”Checks whether an item is unbreakable.
if event-item is unbreakable: send "This item is unbreakable!" to playerif tool of {_p} is breakable: send "Your tool is breakable!" to {_p}Is Using Experimental Feature Condition
Section titled “Is Using Experimental Feature Condition ”Checks whether a script is using an experimental feature by name.
the script is using "example feature"on load: if the script is using "example feature": broadcast "You're using an experimental feature!"Is Valid Condition
Section titled “Is Valid Condition ”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.
if event-entity is validIs Valid Region ID Condition skript-worldguard
Section titled “Is Valid Region ID Condition skript-worldguard”A condition to test whether a string is a valid region ID. Valid region IDs only contain letters, numbers, underscores, commas, single quotation marks, dashes, pluses, or forward slashes.
command /createregion <text>: if the text-argument is not a valid region id: message "<red>'%text-argument%' is not a valid region ID") # here is where the rest of the command would go :)Is Wearing Condition
Section titled “Is Wearing Condition ”Checks whether an entity is wearing some items (usually armor).
player is wearing an iron chestplate and iron leggingstarget is wearing wolf armorIs Whitelisted Condition
Section titled “Is Whitelisted Condition ”Whether or not the server or a player is whitelisted, or the server is whitelist enforced.
[the] server (is|(isn't|is not)) (in white[ ]list mode|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:Is Within Condition
Section titled “Is Within Condition ”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.
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 diamondIs Within Radius Condition
Section titled “Is Within Radius Condition ”Checks whether a location is within a certain radius of another location.
on damage: if attacker's location is within 10 blocks around {_spawn}: cancel event send "You can't PVP in spawn."isNaN Function
Section titled “isNaN Function ”Returns true if the input is NaN (not a number).
isNaN(0) # falseisNaN(0/0) # trueisNaN(sqrt(-1)) # trueItem Expression
Section titled “Item Expression ”The item involved in an event, e.g. in a drop, dispense, pickup or craft event.
[the] itemon dispense: item is a clock set the time to 6:00Item Type
Section titled “Item Type ”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.
The number of items in this stack. Can be set.
<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 torchItem Amount Expression
Section titled “Item Amount Expression ”The amount of an item stack.
send "You have got %item amount of player's tool% %player's tool% in your hand!" to playerItem Component Type
Section titled “Item Component Type ”Represents an item component for items. i.e. equippable components.
Item Component - Copy Expression
Section titled “Item Component - Copy Expression ”Grab a copy of an item component of an item. Any changes made to the copy will not be present on the item.
set {_component} to the item component copy of (the equippable component of {_item})Item Cooldown Expression
Section titled “Item Cooldown Expression ”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.
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 playersItem Despawn Effect
Section titled “Item Despawn Effect ”Prevent a dropped item from naturally despawning through Minecraft's timer.
prevent all dropped items from naturally despawningallow all dropped items to naturally despawnItem Display Transform Expression
Section titled “Item Display Transform Expression ”Returns or changes the item display transform of item displays.
set the item transform of the last spawned item display to first person left handedset the item transform of the last spawned item display to no transform # Reset to defaultItem Display Transforms Type
Section titled “Item Display Transforms Type ”Represents the transform setting of an item display.
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 handedItem Enchantments Expression
Section titled “Item Enchantments Expression ”All the enchantments an item type has.
clear enchantments of event-itemItem Flag Type
Section titled “Item Flag Type ”Represents flags that may be applied to hide certain attributes of an item.
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 dyeItem Flags Expression
Section titled “Item Flags Expression ”The item flags of an item. Can be modified.
set item flags of player's tool to hide enchants and hide attributesadd hide potion effects to item flags of player's held itemremove hide enchants from item flags of {legendary sword}Item Has Enchantment Glint Override Condition
Section titled “Item Has Enchantment Glint Override Condition ”Checks whether an item has the enchantment glint overridden, or is forced to glint or not.
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 playerItem of an Entity Expression
Section titled “Item of an Entity Expression ”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. For arrows, it gets the item that will be picked up when retrieving the arrow. Note that setting the item may not change the displayed model, and that setting a spectral arrow to a non-spectral arrow or vice-versa will not affect the effects of the projectile. Other entities do not have items associated with them.
item of event-entityset the item inside of event-entity to a diamond sword named "Example"Item Tooltips Effect
Section titled “Item Tooltips Effect ”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.
hide the entire tooltip of player's toolhide {_item}'s additional tool tipItem Type Type
Section titled “Item Type 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.
The amount of items in the stack this type represents. E.g. 5 for '5 stone swords'. Can be set.
An item type's custom name, if set. Can be set or reset.
An item type's custom name, if set. Can be set or reset.
An item's title. This currently only applies to signed books.
[<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 farmlandItem with Custom Model Data Expression
Section titled “Item with Custom Model Data Expression ”Get an item with custom model data.
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)Item with Enchantment Glint Expression
Section titled “Item with Enchantment Glint Expression ”Get an item with or without enchantment glint.
set {_item with glint} to diamond with enchantment glintset {_item without glint} to diamond without enchantment glintItem with Item Flags Expression
Section titled “Item with Item Flags Expression ”Creates a new item with the specified item flags.
give player diamond sword with item flags hide enchants and hide attributesset {_item} to player's tool with item flag hide additional tooltipgive player torch with hide placed on item flagset {_item} to diamond sword with all item flagsItem with Lore Expression
Section titled “Item with Lore Expression ”Returns a copy of an item with with new lore. If passing multiple components, each with be a line of lore.
set {_item} to stone with lore "line 1" and "line 2"give {_item} to playerItem with Tooltip Expression
Section titled “Item with Tooltip Expression ”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.
set {_item with additional tooltip} to diamond with additional tooltipset {_item without entire tooltip} to diamond without entire tooltipItems Expression
Section titled “Items Expression ”Items or blocks of a specific type, useful for looping.
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 playerItems In Expression
Section titled “Items In Expression ”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.
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 inventoryJoin & Split Expression
Section titled “Join & Split Expression ”Joins several texts with a common delimiter (e.g. ", "), or splits a text into multiple texts at a given delimiter.
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 ","Join Message Expression
Section titled “Join Message Expression ”The message sent to all online players when a player joins the server.
[the] (join|log[ ]in)( |-)messageon first join: set the join message to "Welcome %player% to our awesome server!"on join: player has played before set the join message to "Welcome back, %player%!"Keep Inventory / Experience Effect
Section titled “Keep Inventory / Experience Effect ”Keeps the inventory or/and experiences of the dead player in a death event.
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 experiencesKey Of Boss Bar Expression
Section titled “Key Of Boss Bar Expression ”Returns the key of a keyed boss bar. Does not return anything for normal boss bars.
broadcast the boss bar key of {_mybar}Keyed Expression
Section titled “Keyed Expression ”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.
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 4on place of TNT, lava, or obsidian: kick the player due to "You may not place %block%!" cancel the eventKick Message Expression
Section titled “Kick Message Expression ”The message sent to all online players when a player is kicked from server.
[the] kick( |-)messageon kick: set the kick message to "%player% was booted from the server! They won't be missed..."Kill Effect
Section titled “Kill Effect ”Kills an entity.
kill the playerkill all creepers in the player's worldkill all endermen, witches and batsKnockback Effect
Section titled “Knockback Effect ”Apply the same velocity as a knockback to living entities in a direction. Mechanics such as knockback resistance will be factored in.
knockback player northknock victim (vector from attacker to victim) with strength 10Language Expression
Section titled “Language Expression ”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.
message player's current languageLast Attacker Expression
Section titled “Last Attacker Expression ”The last block or entity that attacked an entity.
send "%last attacker of event-entity%"Last Caught Errors Expression
Section titled “Last Caught Errors Expression ”Gets the last caught runtime errors from a 'catch runtime errors' section.
[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)Last Damage Expression
Section titled “Last Damage Expression ”The last damage that was done to an entity. Note that changing it doesn't deal more/less damage.
set last damage of event-entity to 2Last Damage Cause Expression
Section titled “Last Damage Cause Expression ”Cause of last damage done to an entity
set last damage cause of event-entity to fire tickLast Death Location Expression
Section titled “Last Death Location Expression ”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.
set {_loc} to the last death location of playerteleport player to last death location of (random element out of all players)Last Interaction Date Expression
Section titled “Last Interaction Date Expression ”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.
if the last time {_interaction} was clicked < 5 seconds agoLast Interaction Player Expression
Section titled “Last Interaction Player Expression ”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.
kill the last player that attacked the last spawned interactionfeed the last player who interacted with {_i}Last Loaded Server Icon Expression
Section titled “Last Loaded Server Icon Expression ”Returns the last loaded server icon with the load server icon effect.
[the] [last[ly]] loaded server iconset {server-icon} to the last loaded server iconLast Resource Pack Response Expression
Section titled “Last Resource Pack Response Expression ”Returns the last resource pack response received from a player.
if player's last resource pack response is deny or download fail:Last Spawned Entity Expression
Section titled “Last Spawned Entity Expression ”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.
[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 fireworkLast/First Login Time Expression
Section titled “Last/First Login Time Expression ”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.
command /onlinefor: trigger: send "You have been online for %difference between player's last login and now%." send "You first joined the server %difference between player's first login and now% ago."Launch firework Effect
Section titled “Launch firework Effect ”Launch firework effects at the given location(s).
(launch|deploy) [[a] firework [with effect[s]]] %fireworkeffects% 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 1Leash entities Effect
Section titled “Leash entities Effect ”Leash entities to other entities, or unleash them. Most mobs, iron golems, snow golems, and boats can be leashed.
on right click: leash event-entity to player send "&aYou leashed &2%event-entity%!" to playerLeash Holder Expression
Section titled “Leash Holder Expression ”The leash holder of an entity.
set {_example} to the leash holder of the target mobLeash Will Drop Condition
Section titled “Leash Will Drop Condition ”Checks whether the leash item will drop during the leash detaching in an unleash event.
[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 dropLeft Handed Condition
Section titled “Left Handed Condition ”Checks if living entities or players are left or right-handed. Armor stands are neither right nor left-handed.
on damage of player: if victim is left handed: cancel eventLength Expression
Section titled “Length Expression ”The length of a text, in number of characters.
set {_l} to length of the string argumentLevel Expression
Section titled “Level Expression ”The experience level of a player.
reduce 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}%!"Level Progress Expression
Section titled “Level Progress Expression ”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%.
# 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 eventLid Is Open/Closed Condition
Section titled “Lid Is Open/Closed Condition ”Check to see whether lidded blocks (chests, shulkers, etc.) are open or closed.
if the lid of {_chest} is closed: open the lid of {_block}Light Level Expression
Section titled “Light Level Expression ”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.
# 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 secondsLightning Effect
Section titled “Lightning Effect ”Strike lightning at a given location. Can use 'lightning effect' to create a lightning that does not harm entities or start fires.
strike lightning at the playerstrike lightning effect at the victimLiving Entity Type
Section titled “Living Entity Type ”A living entity, i.e. a mob or player, not inanimate entities like projectiles or dropped items.
see <a href='#entity'>entity</a>, but ignore inanimate objectsspawn 5 powered creepersshoot a zombie from the creeperLlama Entity Data
Section titled “Llama Entity Data ”[(baby|young)|(adult|grown(-| )up)] llama[s]llama cria[s][(baby|young)|(adult|grown(-| )up)] creamy llama[s]creamy llama cria[s][(baby|young)|(adult|grown(-| )up)] white llama[s]white llama cria[s][(baby|young)|(adult|grown(-| )up)] brown llama[s]brown llama cria[s][(baby|young)|(adult|grown(-| )up)] gray llama[s]gray llama cria[s][(baby|young)|(adult|grown(-| )up)] trader llama[s]trader llama cria[s][(baby|young)|(adult|grown(-| )up)] creamy trader llama[s]creamy trader llama cria[s][(baby|young)|(adult|grown(-| )up)] white trader llama[s]white trader llama cria[s][(baby|young)|(adult|grown(-| )up)] brown trader llama[s]brown trader llama cria[s][(baby|young)|(adult|grown(-| )up)] gray trader llama[s]gray trader llama cria[s]ln Function
Section titled “ln Function ”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.
ln(1) = 0ln(exp(5)) = 5ln(2) = 0.6931Load Server Icon Effect
Section titled “Load Server Icon Effect ”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.
on load: clear {server-icons::*} loop 5 times: load server icon from file "icons/%loop-number%.png" add the last loaded server icon to {server-icons::*}
on server list ping: set the icon to a random server icon out of {server-icons::*}Load World Effect
Section titled “Load World Effect ”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
load world "world_nether" with environment netherload the world "myCustomWorld"unload "world_nether"unload "world_the_end" without savingunload all worldsLoaded Plugins Expression
Section titled “Loaded Plugins Expression ”An expression to obtain a list of the names of the server's loaded plugins.
[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 playerLocally Suppress Warning Effect
Section titled “Locally Suppress Warning Effect ”Suppresses target warnings from the current script.
[local[ly]] suppress [the] (conflict|variable save|[missing] conjunction|starting [with] expression[s]|variable[ name][s] contain[s|ing] colon[s]|deprecated syntax|unreachable code|constant condition[s]) warning[s]locally suppress missing conjunction warningssuppress the variable save warningslocation Function
Section titled “location Function ”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.
optional
yawoptional
pitchoptional
# 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)Location Expression
Section titled “Location Expression ”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).
[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 playerLocation Expression
Section titled “Location Expression ”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).
drop 5 apples at the event-location # exactly the same as writing 'drop 5 apples'set {_loc} to the location 1 meter above the playerLocation Expression
Section titled “Location Expression ”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.
set {home::%uuid of player%} to the location of the playermessage "You home was set to %player's location% in %player's world%."Location Type
Section titled “Location Type ”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.
The X, Y, or Z coordinate of the location.
teleport player to location at 0, 69, 0set {home::%uuid of player%} to location of the playerLocation At Expression
Section titled “Location At Expression ”Allows to create a location from three coordinates and a 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 200Location with Yaw/Pitch Expression
Section titled “Location with Yaw/Pitch Expression ”Returns the given locations with the specified yaw and/or pitch.
set {_location} to player's location with yaw 0 and pitch 0log Function
Section titled “log Function ”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.
log(100) = 2 # 10^2 = 100log(16, 2) = 4 # 2^4 = 16Log Effect
Section titled “Log Effect ”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.
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 warningLook At Effect
Section titled “Look At Effect ”Forces the mob(s) or player(s) to look at an entity, vector or location. Vanilla max head pitches range from 10 to 50.
(force|make) %livingentities% [to] (face [towards]|look [at|towards]) %entity%'s (feet|eyes) [(at|with) [head] [rotation] speed %number%] [[and] max[imum] [head] pitch %number%](force|make) %livingentities% [to] (face [towards]|look [at|towards]) [the] (feet|eyes) of %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 -40Loop Section
Section titled “Loop Section ”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 *).
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 playersLoop Iteration Expression
Section titled “Loop Iteration Expression ”Returns the loop's current iteration count (for both normal and while loops).
while player is online: give player 1 stone wait 5 ticks if loop-counter > 30: stop looploop {top-balances::*}: if loop-iteration <= 10: broadcast "#%loop-iteration% %loop-index% has $%loop-value%"Loop value Expression
Section titled “Loop value Expression ”Returns the previous, current, or next looped value.
[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 playersLoot Expression
Section titled “Loot Expression ”The loot that will be generated in a 'loot generate' event.
[the] looton loot generate: chance of 10% add 64 diamonds to loot send "You hit the jackpot!!"Loot Context Expression
Section titled “Loot Context Expression ”The loot context involved in the context create section.
[the] loot[ ]contextset {_context} to a new loot context at {_location}: broadcast loot contextLoot Context Type
Section titled “Loot Context Type ”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
Loot Location of Loot Context Expression
Section titled “Loot Location of Loot Context Expression ”Returns the loot location of a loot context.
set {_player} to playerset {_context} to a loot context at player: if {_player} is in "world_nether": set loot location to location of last spawned pigsend loot location of {_context} to playerLoot of Loot Table Expression
Section titled “Loot of Loot Table Expression ”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.
set {_items::*} to loot 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 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 contextLoot Table Expression
Section titled “Loot Table Expression ”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.
set loot table of event-entity to "minecraft:entities/ghast"# this will set the loot table of the entity to a ghast's loot table, thus dropping ghast tears and gunpowderset loot table of event-block to "minecraft:chests/simple_dungeon"Loot Table Type
Section titled “Loot Table Type ”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
Loot Table from Key Expression
Section titled “Loot Table from Key Expression ”Returns the loot table from a namespaced key.
set {_table} to loot table "minecraft:chests/simple_dungeon"Looted Entity of Loot Context Expression
Section titled “Looted Entity of Loot Context Expression ”Returns the looted entity of a loot context.
set {_entity} to looted entity of {_context}set {_context} to a loot context at player: set loot luck value to 10 set looter to player set looted entity to last spawned pigLooter of Loot Context Expression
Section titled “Looter of Loot Context Expression ”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.
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 pigLore Expression
Section titled “Lore Expression ”Returns the lore of an item.
set the 1st line of the item's lore to "<orange>Excalibur 2.0"Love Time Expression
Section titled “Love Time Expression ”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.
on right click: send "%event-entity% has been in love for %love time of event-entity% more than you!" to playerLowest/Highest Solid Block Expression
Section titled “Lowest/Highest Solid Block Expression ”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.
teleport the player to the block above the highest block at the playerset the highest solid block at the player's location to the lowest solid block at the player's locationLuck of Loot Context Expression
Section titled “Luck of Loot Context Expression ”Returns the luck of a loot context as a float. This represents the luck potion effect that an entity can have.
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 pigMake Adult/Baby Effect
Section titled “Make Adult/Baby Effect ”Force a animal to become an adult or baby.
on spawn of mob: entity is not an adult make entity an adultMake Allay Duplicate Effect
Section titled “Make Allay Duplicate Effect ”Make an allay duplicate itself. This effect will always make an allay duplicate regardless of whether the duplicate attribute is disabled.
make all allays duplicateMake Breedable Effect
Section titled “Make Breedable Effect ”Sets whether or not entities will be able to breed. Only works on animals.
on spawn of animal: make entity unbreedableMake Disturbance Effect
Section titled “Make Disturbance Effect ”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.
make last spawned warden sense a disturbance at location(0, 0, 0)Make Egg Hatch Effect
Section titled “Make Egg Hatch Effect ”Makes the egg hatch in a Player Egg Throw event.
make [the] egg [not] hatchon player egg throw: # EGGS FOR DAYZ! make the egg hatchMake Entity Scream Effect
Section titled “Make Entity Scream Effect ”Make a goat or enderman start or stop screaming.
make last spawned goat start screaming force last spawned goat to stop screaming make {_enderman} scream force {_enderman} to stop screamingMake Fire Resistant Effect
Section titled “Make Fire Resistant Effect ”Makes items fire resistant.
make player's tool fire resistantmake {_items::*} not resistant to fireMake Fly Effect
Section titled “Make Fly Effect ”Forces a player to start/stop flying.
make player flyforce all players to stop flyingMake Goat Ram Effect
Section titled “Make Goat Ram Effect ”Make a goat ram an entity. Ramming does have a cooldown and currently no way to change it.
make all goats ram playerMake Incendiary Effect
Section titled “Make Incendiary Effect ”Sets if an entity's explosion will leave behind fire. This effect is also usable in an explosion prime event.
on explosion prime: make the explosion fieryMake Interaction Responsive Effect
Section titled “Make Interaction Responsive Effect ”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.
make last spawned interaction responsiveMake Invisible Effect
Section titled “Make Invisible Effect ”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.
make target entity invisibleMake Invulnerable Effect
Section titled “Make Invulnerable Effect ”Makes an entity invulnerable/not invulnerable.
make target entity invulnerableMake Panda Roll Effect
Section titled “Make Panda Roll Effect ”Make a panda start/stop rolling.
if last spawned panda is not rolling: make last spawned panda start rollingMake Panda Sneeze Effect
Section titled “Make Panda Sneeze Effect ”Make a panda start/stop sneezing.
if last spawned panda is not sneezing: make last spawned panda start sneezingMake Say Effect
Section titled “Make Say Effect ”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.
make the player say "Hello."force all players to send the message "I love this server"Make Sign Glow Effect
Section titled “Make Sign Glow Effect ”Makes a sign (either a block or item) have glowing text or normal text
make target block of player have glowing textMatches Condition
Section titled “Matches Condition ”Checks whether the defined strings match the input regexes (Regular expressions).
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!"max Function
Section titled “max Function ”Returns the maximum number from a list of numbers.
max(1) = 1max(1, 2, 3, 4) = 4max({some list variable::*})Max Durability Expression
Section titled “Max Durability Expression ”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+
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 toolMax Health Expression
Section titled “Max Health Expression ”The maximum health of an entity, e.g. 10 for a player.
on join: set the maximum health of the player to 100spawn a giantset the last spawned entity's max health to 1000Max Item Use Time Expression
Section titled “Max Item Use Time Expression ”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.
on right click: broadcast max usage duration of player's toolMax Minecart Speed Expression
Section titled “Max Minecart Speed Expression ”The maximum speed of a minecart.
on right click on minecart: set max minecart speed of event-entity to 1Max Players Expression
Section titled “Max Players Expression ”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.
[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)Maximum Double Value Expression
Section titled “Maximum Double Value Expression ”A number representing the maximum value of a double number type.
[the] max[imum] double valueif {_number} >= maximum double value:Maximum Float Value Expression
Section titled “Maximum Float Value Expression ”A number representing the maximum value of a float number type.
[the] max[imum] float valueif {_number} >= maximum float value:Maximum Freeze Time Expression
Section titled “Maximum Freeze Time Expression ”The maximum amount of time an entity can spend in powdered snow before taking damage.
difference between player's freeze time and player's max freeze time is less than 1 second: send "you're about to freeze!" to the playerMaximum Integer Value Expression
Section titled “Maximum Integer Value Expression ”A number representing the maximum value of an integer number type.
[the] max[imum] integer valueif {_number} >= maximum integer value:Maximum Long Value Expression
Section titled “Maximum Long Value Expression ”A number representing the maximum value of a long number type.
[the] max[imum] long valueif {_number} >= maximum long value:Maximum Stack Size Expression
Section titled “Maximum Stack Size Expression ”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.
send "You can hold %max stack size of player's tool% of %type of player's tool% in a slot." to playerset the maximum stack size of inventory of all players to 16add 8 to the maximum stack size of player's toolreset the maximum stack size of {_gui}Me Expression
Section titled “Me Expression ”A 'me' expression that can be used in players' effect commands only.
memy[self]!heal me!kick myself!give a diamond axe to memean Function
Section titled “mean Function ”Get the mean (average) of a list of numbers. You cannot get the mean of a set of numbers that includes infinity or NaN.
mean(1, 2, 3) = 2mean(0, 5, 10) = 5mean(13, 97, 376, 709) = 298.75median Function
Section titled “median Function ”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.
median(1, 2, 3, 4, 5) = 3median(1, 2, 3, 4, 5, 6) = 3.5median(0, 123, 456, 789) = 289.5Mending Repair Amount Expression
Section titled “Mending Repair Amount Expression ”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.
[the] [mending] repair amounton item mend: set the mending repair amount to 100Message Effect
Section titled “Message Effect ”Sends a message to an audience, such as a player or the console. Only styles written in given string or in formatted expressions will be parsed.
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%!"Message of the Day Expression
Section titled “Message of the Day Expression ”The message of the day in the server list. This can be changed in a server list ping event only. Use 'default MOTD' to obtain the default MOTD set through the server configuration. This cannot be changed.
[the] [default|shown|displayed] (motd|message of [the] day)on server ling ping: set the motd to "<red>Join our server today!"Metadata Expression
Section titled “Metadata Expression ”Metadata is a way to store temporary data on entities, blocks and more that disappears after a server restart.
set metadata value "healer" of player to truebroadcast "%metadata value "healer" of player%"clear metadata value "healer" of playerMetadata Holder Type
Section titled “Metadata Holder Type ”Something that can hold metadata (e.g. an entity or block)
set metadata value "super cool" of player to trueMiddle of Location Expression
Section titled “Middle of Location Expression ”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.
command /stuck: executable by: players trigger: teleport player to the center of player's location send "You're no longer stuck."Midpoint Expression
Section titled “Midpoint Expression ”Get the midpoint between two vectors or two locations in the same world.
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)min Function
Section titled “min Function ”Returns the minimum number from a list of numbers.
min(1) = 1min(1, 2, 3, 4) = 1min({some list variable::*})Minecart Entity Data
Section titled “Minecart Entity Data ”[mine]cart[s]regular [mine]cart[s]storage [mine]cart[s][mine]cart[s] with chest[s]powered [mine]cart[s][mine]cart[s] with furnace[s]hopper [mine]cart[s][mine]cart[s] with hopper[s]explosive [mine]cart[s][mine]cart[s] with tnt[s][monster|mob] spawner [mine]cart[s][mine]cart[s] with [monster|mob] spawner[s]command [block] [mine]cart[s][mine]cart[s] with command block[s]Minecart Derailed / Flying Velocity Expression
Section titled “Minecart Derailed / Flying Velocity Expression ”The velocity of a minecart as soon as it has been derailed or as soon as it starts flying.
on right click on minecart: set derailed velocity of event-entity to vector 2, 10, 2Minecraft Tag Type
Section titled “Minecraft Tag Type ”A tag that classifies a material, or entity.
Minimum Double Value Expression
Section titled “Minimum Double Value Expression ”A number representing the minimum value of a double number type.
[the] min[imum] double valueif {_number} <= minimum double value:Minimum Float Value Expression
Section titled “Minimum Float Value Expression ”A number representing the minimum value of a float number type.
[the] min[imum] float valueif {_number} <= minimum float value:Minimum Integer Value Expression
Section titled “Minimum Integer Value Expression ”A number representing the minimum value of an integer number type.
[the] min[imum] integer valueif {_number} <= minimum integer value:Minimum Long Value Expression
Section titled “Minimum Long Value Expression ”A number representing the minimum value of a long number type.
[the] min[imum] long valueif {_number} <= minimum long value:Minimum/Maximum Enchantment Level Expression
Section titled “Minimum/Maximum Enchantment Level Expression ”The minimum or maximum allowed level in Minecraft of a particular enchantment. The minimum starting level is 1 for all existing enchantments as of 26.1.2.
set {_maximum} to the maximum enchantment level of sharpnessif the level of sharpness of the player's tool is greater than {_maximum}: send "<gold>Your tool's sharpness level was capped out at the maximum allowed level.</gold>" set the level of sharpness of the player's tool to {_maximum}set {_min} to the minimum enchantment level of sharpnessset {_max} to the maximum enchantment level of sharpnessloop integers between {_min} and {_max}: set slot loop-counter of {_gui} to enchanted book named "Sharpness %loop-value%" with lore "<reset>Click to enchant!"mod Function
Section titled “mod Function ”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.
mod(3, 2) = 1mod(256436, 100) = 36mod(-1, 10) = 9Money Expression
Section titled “Money Expression ”How much virtual money a player has (can be changed).
message "You have %player's money%" # the currency name will be added automaticallyremove 20$ from the player's balance # replace '$' by whatever currency you useadd 200 to the player's account # or omit the currency altogetherMoney Type
Section titled “Money Type ”A certain amount of money. Please note that this differs from numbers as it includes a currency symbol or name, but usually the two are interchangeable, e.g. you can both add 100$ to the player's balance and add 100 to the player's balance.
<number> $ or $ <number>, where '$' is your server's currency, e.g. '10 rupees' or '£5.00'add 10£ to the player's accountremove Fr. 9.95 from the player's moneyset the victim's money to 0increase the attacker's balance by the level of the victim * 100