Skript Syntaxes
No results were found.
absFunction
Returns the absolute value of the argument, i.e. makes the argument positive.
abs(3) = 3abs(-2) = 2[the] absorbed blocksthe absorbed blocksacosFunction
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 BarEffect
Sends an action bar message to an audience.
send action bar "Hello player!" to playerActive ItemExpression
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 TimeExpression
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 time[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/EntityExpression
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# 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/IPsExpression
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 players[all [[of] the]|the] [registered] [script] commandssend "Number of all commands: %size of all commands%"send "Number of all script commands: %size of all script commands%"All GroupsExpression
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 [[of] the]|the] [server] [non(-| )]op[erator]sset {_ops::*} to all operatorsAll PermissionsExpression
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 KeysExpression
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 [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 player[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 Tags of a TypeExpression
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 tagsif last spawned allay can duplicate: disallow last spawned to duplicateAllay DuplicateEffect
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 CooldownExpression
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 allayset {_loc} to the target jukebox of last spawned allayAllow / Prevent Leash DropEffect
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 dropon spawn of animal: allow aging of entityAlpha/Red/Green/Blue Color ValueExpression
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 SortExpression
Sorts given strings in alphabetical order.
set {_list::*} to alphabetically sorted {_strings::*}if the argument is not alphanumeric: send "Invalid name!"AltitudeExpression
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.2AmountExpression
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 of ItemsExpression
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 EternityExpression
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 eternityAngleExpression
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 CostExpression
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 InputExpression
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 ThingType
Something that has a name (e.g. an item).
The name of the thing, as text. Can be set if supported.
{thing}'s namethe size of {thing}the amount of {thing}Any OfExpression
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 ThingType
Something that has a value.
The value of something. Can be set.
the text of {node}Anything with ContentsType
Something that contains other things.
AnyContains can contain other things depending on its type.
{a} contains {b}[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 EnchantmentsExpression
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 MealEffect
Applies bone meal to a crop, sapling, or composter
apply 3 bone meal to event-blockApply Fishing LureEffect
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 Fishing LureEffect
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 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 playerArgumentExpression
A user provided value in a command execution.
For example, if the command “/tell
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 argumentArithmeticExpression
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!"[the] (old|unequipped) armo[u]r item[the] (new|equipped) armo[u]r itemon armor change broadcast the old armor itemArmor SlotExpression
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 BlockExpression
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-projectileon shoot: event-projectile is an arrow set arrow knockback strength of event-projectile to 10set arrows stuck in player to 5asinFunction
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 TimeEvent
An event that occurs at a given minecraft time in every world or only in specific worlds.
atanFunction
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.9943atan2Function
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 CooldownExpression
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 attackerAttackedExpression
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 heartAttackerExpression
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 TypeType
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’.
air drag modifier, armor, armor toughness, armour, armour toughness, attack damage, attack knockback, attack speed, below name distance, block break speed, block interaction range, bounciness, burning time, camera distance, entity interaction range, explosion knockback resistance, fall damage multiplier, flying speed, follow range, friction modifier, 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, name tag distance, name tag score visibility distance, name tag visibility distance, nameplate score visibility distance, nameplate visibility distance, 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 reinforcementsAudienceType
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 ReloadStructure
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"AxolotlEntity 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])BanEffect
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 daysset {_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 ItemExpression
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 TypeType
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 PatternsExpression
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}[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!"[the] [piglin] barter[ing] inputon piglin barter: if the bartering input is a gold ingot: broadcast "my precious..."Beacon EffectsExpression
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 resistanceif the beacon tier of the clicked block is 4: set the beacon effect range of the clicked block to 100if the beacon tier of the clicked block is 4: send "This is a max tier beacon!"BedExpression
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 locationBeeEntity 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 LevelExpression
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}if {_beehive} is sedated:Beehive Target FlowerExpression
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 ResonatingCondition
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 RingingCondition
Checks to see if a bell is currently ringing. A bell typically rings for 50 game ticks.
target block is ringingBiomeExpression
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 1BiomeType
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, dappled 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, sulfur caves, 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 ComponentSection 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}BlockExpression
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 blockBlockExpression
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 blockBlockType
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 SpeedExpression
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 DataExpression
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 DataType
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 HardnessExpression
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 SoundExpression
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 SphereExpression
All blocks in a sphere around a center, mostly useful for looping.
loop blocks in radius 5 around the player: set loop-block to airBlocksExpression
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 RegionExpression
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 RegionExpressionskript-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-argumenton book sign: broadcast "A new book has been created by %author of event-item%"Book PagesExpression
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!"on book sign: message "You finished your book titled %title of event-item%"BooleanType
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 FlagsEffect
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 fogon spawn of wither: set title of boss bar of event-entity to "<red>Angry Wither"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 notchesBossBarType
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. Note that due to Bukkit limitations formatting like shadow, sprites or fonts will not work.
The progress of a boss bar. Ranges from 0 to 1.
The style of a boss bar.
The title of a boss bar. Note that due to Bukkit limitations formatting like shadow, sprites or fonts will not work.
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 BlockEffect
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 pickaxe[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 breeder[the] brewing resultson brew complete: set {_results::*} to the brewing resultsBrewing Stand Fuel LevelExpression
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 SlotExpression
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}set the brewing time of {_block} to 10 secondsclear the remaining brewing time of {_block}Brewing Will Consume FuelCondition
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 fuelBroadcastEffect
Broadcasts a message to the server.
broadcast "Welcome %player% to the server!"broadcast "Woah! It's a message!"[the] broadcast(-|[ed] )messageon broadcast: set broadcast message to "<light green>[BROADCAST] %broadcast message%"Brushing StageExpression
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 ItemExpression
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 emeraldcalcExperienceFunction
Calculates the total amount of experience needed to achieve given level from scratch in Minecraft.
if last spawned camel is dashing: kill last spawned camelon breeding: entity can't age broadcast "An immortal has been born!" to playeron 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 BuildCondition
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 RegionsConditionskript-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 DespawnCondition
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 unload%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 ItemsCondition
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 SeeCondition
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!"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."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 ItemEffect
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 CooldownEffect
Only usable in commands. Makes it so the current command usage isn’t counted towards the cooldown.
[un](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 DropsEffect
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.
(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 EventEffect
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 TextExpression
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 TypeType
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 ErrorsSection
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)ceilFunction
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) = 3set world border center of {_worldborder} to location(10, 0, 20)ChanceCondition
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/ResetEffect
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 blockChanged Sign SideCondition
Checks whether a side was changed in a sign change event.
[the] (front|back) [side] (is|was) changed[the] (front|back) [side] (is not|isn't|was not|wasn't) changed[the] changed side (is|was) [the] (front|back)[the] changed side (is not|isn't|was not|wasn't) [the] (front|back)on sign change: the back side was changed cancel the event send "<red>It is not possible to change the back side of a sign!" to the playerfunction 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 CodepointExpression
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 BetweenExpression
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 EntityEffect
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 FormatExpression
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%"[the] [chat( | -)]recipientschat recipientsChicken VariantType
Represents the variant of a chicken entity. NOTE: Minecraft namespaces are supported, ex: ‘minecraft:warm’.
cold, temperate, warmChoice ArgumentExpression
Represents the literal argument out of a choice group selected by the command sender. Choice arguments, just like regular arguments, are numbered in order of occurrence (left to right). This expression also supports optional literal arguments.
[the] choice arg[ument] <(\d+)>[the] (first|second|third|<(\d*1)st|(\d*2)nd|(\d*3)rd|(\d*[4-90])th>) choice arg[ument][s][the] [last] choice arg[ument]command /alert (restart|giveaway): trigger: if the choice argument is "restart": broadcast "<red>The server is restarting in 5 minutes!" else: # must be giveaway broadcast "<aqua>A giveaway is starting soon at spawn!"ChunkExpression
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 worldclampFunction
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 StorageEffect
Clear the stored entities of an entity block storage (i.e. beehive).
clear the stored entities of {_beehive}Click TypeType
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/SlotExpression
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 CodeExpression
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 ItemsEffect
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 ofExpression
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/UncoloredExpression
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 executorcombinationsFunction
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)CommandStructure
Used for registering custom commands.
command <.+>command /broadcast <string>: aliases: /bc executable by: players and console usage: A command for broadcasting a message to all players. permission: skript.command.broadcast 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 /home: subcommand set <name: text>: trigger: set {homes::%player%::%{_name}%} to the player's location subcommand <name: text>: suggestions: loop {homes::%player%::*}: add formatted "<ttp:'Location: %loop-value%'>%loop-index%" to the suggestions for the text argument trigger: teleport the player to {homes::%player%::%{_name}%}CommandEffect
Executes a command. This can be useful to use other plugin in triggers. If the command is a BungeeCord side command, you can use the ‘[bungeecord]’ keyword option to execute the command on the proxy.
make player execute command "/home"execute console command "/say Hello everyone!"execute player bungeecord command "/alert &6Testing Announcement!"CommandExpression
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 CommandExpression
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 ExecutorExpression
The executor of a command. This differs from the command sender in that the executor may not be the thing that triggered/initiated the command. The executor of a command is often changed to be different from the command sender by using a vanilla command such as “/execute”.
[the] [command['s]] executorcommand /balance: # This works if you do "/execute as <player> run balance" # It will send the output to the command sender, but it will be as if "<player>" was the thing executing it. send "Your balance is %{balance::%uuid of the executor%}%" to the sendermain 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 "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 SenderExpression
The sender of a command. This differs from the command executor in that this is always the thing that originally triggered/initiated the command. It cannot be changed by commands like “/execute”.
[the] [command['s]] sendermake the command sender execute "/say hi!"on command: log "%sender% used command /%command% %arguments%" to "commands.log"Command SenderType
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-1ComparisonCondition
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 TargetExpression
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("hello ", "there") # hello thereconcat("foo ", 100, " bar") # foo 100 barConditional / UnconditionalEffect
Sets whether the provided command blocks are conditional or not.
make command block {_block} conditionalmake command block {_block} unconditional if {_block} is conditionalConditionalsSection
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 sectionConfigExpression
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!"ConfigType
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 configConnectEffect
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 25566ConsoleExpression
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 FireworkEffect
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 FuelEffect
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 ItemExpression
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 carrotContainsProperty
Something that can contain other things, such as an inventory or a string.
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}orcontents of {inventories::*} contain {x}`.
Text,
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 stickContinueEffect
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)"Copy Into VariableEffect
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!"cosFunction
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 VariantType
Represents the variant of a cow entity. NOTE: Minecraft namespaces are supported, ex: ‘minecraft:warm’.
cold, temperate, warmCreate Boss BarSection 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}command /createkeyedbar: trigger: set {_bar} to a keyed red bossbar with title "<red>My persistent red bar": set progress of event-bossbar to 14% set style of event-bossbar to 20 notches loop all operators: add loop-value to viewers of {_bar}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 RegionEffectskript-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 WorldBorderSection 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 SourceExpression
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 EffectExpression
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
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 arrowCursor SlotExpression
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 InventoryExpression
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 DataExpression
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)DamageExpression
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 BorderExpression
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 BorderExpression
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 CauseCondition
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 CauseExpression
The damage cause of a damage event. Please click on the link for more information.
[the] damage causedamage cause is lava, fire or burningDamage CauseType
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 SourceSection 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 - Causing EntityExpression
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 LocationExpression
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 TypeExpression
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 EntityExpression
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 DifficultyCondition
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 ExhaustionExpression
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 LocationExpression
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 CausedCondition
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 SourcesExperiment
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)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, hot sulfur cube, in fire, in wall, indirect magic, lava, lightning, lightning bolt, llama spit, mace smash, magic, magma sulfur cube, 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, sulfur cube hot, sweet berry bush, thorns, thrown, trident, unattributed fireball, void, wind charge, wither, wither skullDamage Value/DurabilityExpression
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/RepairEffect
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 ItemExpression
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"DanceEffect
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 hoursdateFunction
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)DateType
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/LaterExpression
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
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}[the] death( |-)messageon death of player: set the death message to "%player% died!"Debug InfoExpression
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 ValueExpression
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!"DelayEffect 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 EntitiesEffect
Immediately detonates an entity. Accepted entities are fireworks, TNT minecarts, primed TNT, wind charges and creepers.
detonate last launched fireworkDifferenceExpression
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!"set the difficulty of "world" to hardnormal, medium, hard, easy, peacefulDirectionExpression
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 playerDirectionType
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 waterDisplayEntity 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 BillboardExpression
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 centervertical pivot, horizontal, middle, horizontal pivot, center pivot, center, fixed, verticalDisplay BrightnessExpression
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 Glow Color OverrideExpression
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/WidthExpression
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/DurationExpression
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 NameExpression
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 Shadow Radius/StrengthExpression
Returns or changes the shadow radius/strength of displays.
set shadow radius of the last spawned text display to 1.75Display Teleport DurationExpression
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}%"middle aligned, centered, right aligned, center aligned, left alignedDisplay Transformation RotationExpression
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/TranslationExpression
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 RangeExpression
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.9if 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 WorkCondition
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 OwnerExpression
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 ThrowerExpression
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}DropsExpression
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 BlockExpression
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 HatchCondition
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 playerElementsExpression
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 ScriptEffect
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 ItemExpression
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/DisenchantEffect
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 CostExpression
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 playerEnchantmentType
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 BonusExpression
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 HintExpression
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%!"player's tool is a sword of sharpness: message "You have a sword of sharpness %level of sharpness of the player's tool% equipped"on enchant prepare: send "Your enchantment offers are: %the enchantment offers%" to playeron enchant prepare: set enchant offer 1 to sharpness 1 set the cost of enchant offer 1 to 10 levelsEnchantment Offer CostExpression
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 TypeType
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 waterbreathingopen the player's ender chest to the playerEnderman Carrying BlockDataExpression
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 AtCondition
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 TeleportEffect
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 WhitelistEffect
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 whitelistEntitiesExpression
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}}entityFunction
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})EntityType
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 playerset artificial intelligence of target entity to falseEntity AttributeExpression
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 DespawnEffect
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 EffectType
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, hurt berry bush effect (non-functional), ignite tnt minecart animation, boat sink animation, 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, totem resurrection effect, 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, boat launching animation, 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, totem resurrect effect, goat lowering head animation, villager sweat effect, break off hand effect, entity attack animation, boat launch animation, swap hands effect, entity poof effect, explosion damage effect (non-functional), guardian target sound effect (non-functional), boat sinking animation, 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 DurationExpression
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 LiquidCondition
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 columnif targeted entity of player is sheared: send "This entity has nothing left to shear!" to playerEntity is WetCondition
Checks whether an entity is wet or not (in water, rain or a bubble column).
if player is wet: set owner of last spawned wolf to player if the owner of last spawned wolf is player:Entity SizeExpression
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 SnapshotExpression
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 SnapshotType
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 SoundExpression
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 CountExpression
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 FullCondition
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}victim is a cowspawn a creeper<number> <entity type>spawn 5 creepers behind the playerEntity VisibilityEffect
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 UUIDExpression
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}EquipEffect
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 armorfeet, 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 ComponentExpression
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 EntitiesExpression
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 OverlayExpression
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 DispensedCondition
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 OffCondition
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 EntitiesCondition
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 EquipmentCondition
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 - DispenseEffect
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 EntitiesEffect
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 SoundExpression
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 SlotExpression
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 DurabilityEffect
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 - ModelExpression
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 OffEffect
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 SoundExpression
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 EquipmentEffect
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 DurabilityCondition
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 ComponentsExperiment
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}EventStructure
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 -> monitorModifying 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 last[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 ItemExpression
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)examplesexample: kick the player due to "You are not allowed here!"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 ingotExecutableType
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 trueExhaustionExpression
The exhaustion of a player. This is mainly used to determine the rate of hunger depletion.
set exhaustion of all players to 1{teams::%player's uuid%::preferred-team} is not seton damage: projectile exists broadcast "%attacker% used a %projectile% to attack %victim%!"ExitEffect
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 waterexpFunction
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 BorderEffect
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 secondsExperienceExpression
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 experienceExperienceType
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 ReasonExpression
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 ReasonType
Represents a change reason of an experience cooldown change event.
plugin, pickup orb, orb pickupExperience Pickup CooldownExpression
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 playerstart explosion of the last spawned creeperstop ignition of the last spawned creeperExploded BlocksExpression
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 blocksExplosionEffect
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 YieldExpression
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 YieldExpression
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 YieldExpression
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 10FacingExpression
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 cobblestonefactorialFunction
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) = InfinityFail Command ExecutionEffect
Causes a command to fail execution with an error message displayed to the executor.
command /withdraw <number>: trigger: if the number argument is greater than the player's balance: fail the command execution with the error message "Your balance is less than $%number argument%!"set all entities' fall distance to 10on damage: send "%victim's fall distance%" to victimfeed all playersfeed the player by 5 beefsFertilized BlocksExpression
The blocks fertilized in block fertilize events.
[all] [the] fertilized blocksthe fertilized blocksFilterSection
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 10FilterExpression
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 DamageExpression
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 EffectExpression
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 EffectType
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 InventoryExpression
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 AngleExpression
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 TimeExpression
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 seconds[the] fish[ing] (hook|bobber)on fish line cast: wait a second teleport player to fishing hook[the] hook[ed] entityon entity hooked: if hooked entity is a player: teleport hooked entity to playerFishing Lure AppliedCondition
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 eventlured, 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 TimeExpression
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 ModeExpression
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%"floorFunction
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 LevelExpression
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 LoopSection
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 LoopsExperiment
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 AttackEffect
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 EatingEffect
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 GlintEffect
Forces the items to glint or not, or removes its existing enchantment glint enforcement.
force {_items::*} to glintforce the player's tool to stop glintingif last spawned panda is on its back: make last spawned panda get off its backForce RespawnEffect
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 respawnformatNumberFunction
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 DateExpression
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 StateExpression
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 weatherFree / Max / Total MemoryExpression
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 ticksplayer's freeze time is less than 3 seconds: send "you're about to freeze!" to the playerFrogEntity 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 VariantType
Represents the variant of a frog entity. NOTE: Minecraft namespaces are supported, ex: ‘minecraft:warm’.
cold, temperate, warmfromBaseFunction
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::*}FunctionStructure
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}%}set {_function} to the function named "myFunction"run {_function} with arguments 13 and trueFunctionType
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 ItemsExpression
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 itemset 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 TimesExpression
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 EffectType
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 effectspell potion splash sound effectender dragon growl effectzombie chewing on wooden door sound effectuse grindstone sound effectcomplete end portal sound effectender eye launch sound effecteye of ender launch sound effectdispenser fail effectgust dust effectzombie attacking wooden door sound effectdispenser projectile launch effectsponge dry out effectclose iron trapdoor sound effectend gateway spawn effectlava dripping sound effectturn page sound effectdragon death sound effectwither shoot sound effectdispenser failure to dispense effectdispenser fail to dispense effectmusic disc stop effectzombie chewing on iron door sound effectwater dripping into cauldron sound effectclose trapdoor sound effecteye of ender break effectapply wax effectsculk shriek 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 converted to villager effectzombie destroying door sound effectremove wax effectender dragon shoot effectclose fence gate sound effectender dragon growling effectender dragon death sound effectzombie villager cured effectdispenser shoot sound effectblaze shoot sound effectcrafter fail sound effectegg crack effectbrewing sound effectbat take off sound effectender dragon shoots fireball effectghast shriek sound effectfill end portal frame effectwither breaking block sound effectuse smithing table sound effecttoggle iron door sound effecttoggle iron trapdoor sound effectender eye break effecthusk converting to zombie sound effectender dragon breaking block effectcreate end portal sound effectspawn wither sound effecttoggle trapdoor sound effectsulfur spike land effectinstant potion splash sound effectghast shoot sound effectchorus flower death sound effectpointed dripstone land effectzombie attacking iron door sound effectbreak anvil sound effectmob spawner flames effectnether portal travel sound effectanvil land sound effectzombie destroy door sound effectwind charge shoot effectclose iron door sound effectphantom bite sound effecttoggle door sound effecttrial spawner eject item effectskeleton converting to stray sound effectspawn cobweb effectzombie converting to drowned sound effectrecord stop effectuse anvil sound effectlava interaction effectdispenser dispense effectGame Effects with DataExpression
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 playerplayer's gamemode is survivalset the player's gamemode to creativeset gamemode of player to adventureadventure, survival, spectator, creativeplayer's gamemode is survivalset the player argument's game mode to creativeGameruleType
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_speedset the gamerule commandBlockOutput of world "world" to falseGeneType
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 LootEffect
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 StateExpression
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 offGlowingExpression
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 Has HornsCondition
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 hornremove the left horn of last spawned goatregrow {_goat}'s hornsremove both horns of all goatsGravityExpression
If entity is affected by gravity or not, i.e. if it has Minecraft 1.10+ NoGravity flag.
set gravity of player offGroupExpression
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 groupsspawn skeleton at spawn of world "world": make entity left handedmake all zombies in radius 10 of player right handedHanging Entity/RemoverExpression
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 FlagCondition
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.."if player doesn't have chat filtering enabled: send "<gray>This server may contain mature chat messages. You have been warned!" to playerif the player has custom weather: message "Your custom weather is %player's weather%"Has Custom Model DataCondition
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 TextCondition
Checks whether a sign (either a block or an item) has glowing text. If a sign side is not specified, the front side will be used by default.
if target block has glowing textHas Item CooldownCondition
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 TooltipsCondition
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 SightCondition
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 TableCondition
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.if player has metadata value "healer":player has permission "skript.tree"victim has the permission "admin": send "You're attacking an admin!" to attackerHas Persistent Data TagCondition
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 BeforeCondition
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 EffectCondition
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 PackCondition
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 TagCondition
Checks whether the given entities has the given scoreboard tags.
if the targeted armor stand has the scoreboard tag "test tag":HashExpression
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 TypeExpression
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 NumberExpression
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 locationExpression
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:[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!"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 regenHealthExpression
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 CodeExpression
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 PlayersExpression
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 ListEffect
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 DomesticationExpression
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}HostnameExpression
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!"[the] hotbar buttonon inventory click: send "You clicked the hotbar button %hotbar button%!"Hotbar SlotExpression
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 ListExpression
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 player count% &conline players!" to the hover listset {_humidity} to event-block's humidityignite the playerextinguish the player[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/FutureCondition
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 ListExpression
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 ValueExpression
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 4positive (infinity|∞) [value]∞ [value]infinity valuevalue of [positive] (infinity|∞)if {_number} is infinity:[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%!"InputExpression
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 KeyType
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 StorageEffect
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/WidthExpression
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 2InventoryExpression
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 blockInventoryType
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 ActionExpression
The inventory action of an inventory event. Please click on the link for more information.
[the] inventory actioninventory action is pickup allInventory ActionType
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 swap[the] inventory clos(e|ing) (reason|cause)on inventory close: inventory close reason is teleport send "Your inventory closed due to teleporting!" to playerdisconnect, death, teleport, cannot use, new opened, unknown, can't use, unloaded, disconnected, plugin, can not use, open new, playerInventory Holder/Viewers/Rows/SlotsExpression
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 SlotExpression
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 TypeType
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 BooleanExpression
An expression to obtain the inverse value of a boolean
set {_gravity} to inverse of player's flight modeIPExpression
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 Script CommandCondition
Checks whether a command (string label) is a script command (one registered in a script).
on command: command is not a script command # do something only for non-custom commandson drink: event-entity is not an adult kill event-entityIs AliveCondition
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:on drink: event-entity is a baby kill event-entityplayer is bannedvictim is not IP-banned"127.0.0.1" is bannedIs Bed/Anchor SpawnCondition
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!"player's held item is a block{list::*} are blocksIs Block Redstone PoweredCondition
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 BlockingCondition
Checks whether a player is blocking with their shield.
on damage of player: victim is blocking damage attacker by 0.5 heartsIs BurningCondition
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 ChargedCondition
Checks if a creeper, wither, or wither skull is charged (powered). Please note that it is not possible to change whether a wither is charged.
if the last spawned creeper is charged: broadcast "A charged creeper is at %location of last spawned creeper%"if last spawned ghast is charging fireball: kill last spawned ghastIs ClimbingCondition
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!"if {_block} is conditional: make {_block} unconditionalsend true if target's custom name is visibleIs DancingCondition
Checks to see if an entity is dancing, such as allays, parrots, or piglins. Please note that it is not possible to change whether a parrot is dancing.
if last spawned allay is dancing: broadcast "Dance Party!"Is EatingCondition
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 eatingcooked beef is edibleplayer's tool is edibleplayer's inventory is emptyIs EnchantedCondition
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 ByCondition
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 ResistantCondition
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 WaterCondition
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!"send whether the tag contents of minecraft tag "planks" are flammableplayer's tool is flammableplayer is not flyingsend whether target is from a mob spawnerif player is frozen: kill playeron right click on furnace: if player's tool is not fuel: send "Please hold a valid fuel item in your hand" cancel eventif player is glidingIs Hand RaisedCondition
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 HoldingCondition
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 sharpnesson spawn of living entity: if entity is in love: broadcast "That was quick!"Is IncendiaryCondition
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!"all of the active potion effects of the player are infiniteif timespan argument is infinite:on block break: if event-block is interactable: cancel event send "You cannot break interactable blocks!"target entity is invisibleIs InvulnerableCondition
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 JumpingCondition
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 LeashedCondition
Checks to see if an entity is currently leashed.
target entity is leashedIs LoadedCondition
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 LootableCondition
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 RegionCondition
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 regionvector of player's location is normalizedvector in direction of player is normalisedplayer's tool is occludingIs of TypeCondition
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}player is not on groundIs OnlineCondition
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 tickplayer is an operatorIs Parent RegionConditionskript-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 PassableCondition
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 PathfindingCondition
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 PersistentCondition
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 persistentif last spawned axolotl is playing dead: make last spawned axolotl stop playing deadIs Plugin EnabledCondition
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:if the player is poisoned: cure the player from poison message "You have been cured!" to the playerIs Preferred ToolCondition
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 KeyCondition
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/OwnerConditionskript-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 TemporaryConditionskript-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."on region enter: if the region is polygonal: message "Welcome to my wacky region!"Is ResponsiveCondition
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 RidingCondition
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 RiptidingCondition
Checks to see if an entity is currently using the Riptide enchantment.
target entity is riptidingIs SaddledCondition
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 saddled if last spawned goat is not screaming: make last spawned goat scream if {_enderman} is screaming: force {_enderman} to stop screamingIs Script LoadedCondition
Check if the current script, or another script, is currently loaded.
script is loadedscript "example.sk" is loadedtarget entity is silentif player is sleeping: make player wake up without spawn location updateif last spawned fox is sleeping: make last spawned fox stop sleepingIs Slime ChunkCondition
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"# 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 eventgrass block is solidplayer's tool isn't solidIs SpawnableCondition
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}: # falseplayer is not sprintingdiamond axe is stackablebirch wood is stackabletorch is stackableplayer is swimmingIs TaggedCondition
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"on damage: if victim is tameable: cancel eventsend true if {_horse} is tamedtame {_horse} if {_horse} is untamedsend true if target is tickingIs TransparentCondition
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.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 FeatureCondition
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 ValidCondition
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 IDConditionskript-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 :)player is wearing an iron chestplate and iron leggingstarget is wearing wolf armorIs WhitelistedCondition
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 WithinCondition
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 RadiusCondition
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(0) # falseisNaN(0/0) # trueisNaN(sqrt(-1)) # trueItemExpression
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:00ItemType
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 torchsend "You have got %item amount of player's tool% %player's tool% in your hand!" to playerItem Component - CopyExpression
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 CooldownExpression
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 DespawnEffect
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 TransformExpression
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 defaultfirst 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 handedclear enchantments of event-itemhide 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 dyeset 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 OverrideCondition
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 ModelExpression
The item model of an item. Accepts a Namespaced Key which takes the form of “namespace:key”, e.g. “minecraft:dirt”. See this article for more detail.
set the item model of player's held item to "diamond"set the item model of {_item} to "minecraft:dirt"Item of an EntityExpression
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"set the item rarity of player's tool to epicset the item rarity of {_item} to uncommonset {_rarity} to item rarity of player's held itemcommon rarity, uncommon, uncommon rarity, common, rare, epic rarity, epic, rare rarityItem TooltipsEffect
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 TypeType
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 DataExpression
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 GlintExpression
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 FlagsExpression
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 LoreExpression
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 ModelExpression
Returns a copy of an item with a custom item model. Accepts a Namespaced Key which takes the form of “namespace:key”, e.g. “minecraft:dirt”. See this article for more detail.
set {_item} to emerald with model "minecraft:diamond" named "fake diamond"'give {_item} to playerItem with TooltipExpression
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 tooltiploop 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 InExpression
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 & SplitExpression
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 ","[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 / ExperienceEffect
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 BarExpression
Returns the key of a keyed boss bar. Does not return anything for normal boss bars.
broadcast the boss bar key of {_mybar}KeyedExpression
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 event[the] kick( |-)messageon kick: set the kick message to "%player% was booted from the server! They won't be missed..."kill the playerkill all creepers in the player's worldkill all endermen, witches and batsKnockbackEffect
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 10LanguageExpression
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 languagesend "%last attacker of event-entity%"Last Caught ErrorsExpression
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 DamageExpression
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 2set last damage cause of event-entity to fire tickLast Death LocationExpression
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 DateExpression
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 PlayerExpression
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 IconExpression
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 ResponseExpression
Returns the last resource pack response received from a player.
if player's last resource pack response is deny or download fail:Last Spawned EntityExpression
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 TimeExpression
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|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 entitiesEffect
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 HolderExpression
The leash holder of an entity.
set {_example} to the leash holder of the target mobLeash Will DropCondition
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 HandedCondition
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 eventset {_l} to length of the string argumentLevelExpression
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 ProgressExpression
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/ClosedCondition
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 LevelExpression
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 secondsLightningEffect
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 EntityType
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 creeperLlamaEntity 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]lnFunction
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 IconEffect
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 WorldEffect
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 PluginsExpression
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 WarningEffect Section
Suppresses target warnings from the current script.
[local[ly]] [un]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][start|stop] [local[ly]] suppressing [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 warningslocationFunction
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.
# 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)LocationExpression
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 playerLocationExpression
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 playerLocationExpression
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%."LocationType
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 AtExpression
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/PitchExpression
Returns the given locations with the specified yaw and/or pitch.
set {_location} to player's location with yaw 0 and pitch 0logFunction
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 = 16LogEffect
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 AtEffect
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 -40LoopSection
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 IterationExpression
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 valueExpression
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 players[the] looton loot generate: chance of 10% add 64 diamonds to loot send "You hit the jackpot!!"[the] loot[ ]contextset {_context} to a new loot context at {_location}: broadcast loot contextLoot ContextType
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 ContextExpression
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 TableExpression
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 TableExpression
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 TableType
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
set {_table} to loot table "minecraft:chests/simple_dungeon"Looted Entity of Loot ContextExpression
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 ContextExpression
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 pigset the 1st line of the item's lore to "<orange>Excalibur 2.0"Love TimeExpression
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 BlockExpression
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 ContextExpression
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 pigon spawn of mob: entity is not an adult make entity an adultMake Allay DuplicateEffect
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 BreedableEffect
Sets whether or not entities will be able to breed. Only works on animals.
on spawn of animal: make entity unbreedableMake DisturbanceEffect
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 [the] egg [not] hatchon player egg throw: # EGGS FOR DAYZ! make the egg hatch make last spawned goat start screaming force last spawned goat to stop screaming make {_enderman} scream force {_enderman} to stop screamingmake player's tool fire resistantmake {_items::*} not resistant to firemake player flyforce all players to stop flyingMake Goat RamEffect
Make a goat ram an entity. Ramming does have a cooldown and currently no way to change it.
make all goats ram playerMake IncendiaryEffect
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 ResponsiveEffect
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 InvisibleEffect
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 target entity invulnerableif last spawned panda is not rolling: make last spawned panda start rollingif last spawned panda is not sneezing: make last spawned panda start sneezingMake SayEffect
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 GlowEffect
Makes a sign (either a block or item) have glowing text or normal text. If a sign side is not specified, the front side will be used by default.
make target block of player have glowing textMatchesCondition
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(1) = 1max(1, 2, 3, 4) = 4max({some list variable::*})Max DurabilityExpression
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 toolon join: set the maximum health of the player to 100spawn a giantset the last spawned entity's max health to 1000Max Item Use TimeExpression
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 toolon right click on minecart: set max minecart speed of event-entity to 1Max PlayersExpression
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 ValueExpression
A number representing the maximum value of a double number type.
[the] max[imum] double valueif {_number} >= maximum double value:Maximum Float ValueExpression
A number representing the maximum value of a float number type.
[the] max[imum] float valueif {_number} >= maximum float value:Maximum Freeze TimeExpression
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 ValueExpression
A number representing the maximum value of an integer number type.
[the] max[imum] integer valueif {_number} >= maximum integer value:Maximum Long ValueExpression
A number representing the maximum value of a long number type.
[the] max[imum] long valueif {_number} >= maximum long value:Maximum Stack SizeExpression
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}MeExpression
A ‘me’ expression that can be used in players’ effect commands only.
memy[self]!heal me!kick myself!give a diamond axe to memeanFunction
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.75medianFunction
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 AmountExpression
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 100MessageEffect
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 DayExpression
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!"MetadataExpression
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 playerset metadata value "super cool" of player to trueMiddle of LocationExpression
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."MidpointExpression
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(1) = 1min(1, 2, 3, 4) = 1min({some list variable::*})MinecartEntity 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 VelocityExpression
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, 2Minimum Double ValueExpression
A number representing the minimum value of a double number type.
[the] min[imum] double valueif {_number} <= minimum double value:Minimum Float ValueExpression
A number representing the minimum value of a float number type.
[the] min[imum] float valueif {_number} <= minimum float value:Minimum Integer ValueExpression
A number representing the minimum value of an integer number type.
[the] min[imum] integer valueif {_number} <= minimum integer value:Minimum Long ValueExpression
A number representing the minimum value of a long number type.
[the] min[imum] long valueif {_number} <= minimum long value:Minimum/Maximum Enchantment LevelExpression
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!"MoneyExpression
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 altogetherMoneyType
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 * 100if moon phase of player's world is full moon: send "Watch for the wolves!"last quarter, waning crescent, waxing gibbous, full moon, waning gibbous, waxing crescent, new moon, first quarterMooshroomEntity Data
[(baby|young)|(adult|grown(-| )up)] (mooshroom[ cow]|mushroom cow)[s]mooshroom (kid[s]|child[ren])(mooshroom|mushroom) cal(f|ves)[(baby|young)|(adult|grown(-| )up)] red (mooshroom[ cow]|mushroom cow)[s]red mooshroom (kid[s]|child[ren])red (mooshroom|mushroom) cal(f|ves)[(baby|young)|(adult|grown(-| )up)] brown (mooshroom[ cow]|mushroom cow)[s]brown mooshroom (kid[s]|child[ren])brown (mooshroom|mushroom) cal(f|ves)Moved blocksExpression
Blocks which are moved in a piston event. Cannot be used outside of piston events.
[the] moved blocksthe moved blocksNameExpression
Represents the Minecraft account name of a player, or the custom name of an item, entity, block, inventory, gamerule, world, script or function.
Players: The Minecraft account name of the player. Can’t be changed.
Entities: The custom name of the entity. Can be changed. But for living entities, the players will have to target the entity to see its name tag. For non-living entities, the name will not be visible at all. To prevent this, use ‘display name’.
Items: The custom name of the item (not the Minecraft locale name). Can be changed.
Inventories: The name/title of the inventory. Changing name of an inventory means opening the same inventory with the same contents but with a different name to its current viewers.
Gamerules: The name of the gamerule. Cannot be changed.
Worlds: The name of the world. Cannot be changed.
Scripts: The name of a script, excluding its file extension.
on join: player has permission "name.red" set the player's display name to "<red>[admin] <gold>%name of player%" set the name of the player's tool to "Legendary Sword of Awesomeness"Named Item/InventoryExpression
Directly names an item/inventory, useful for defining a named item/inventory in a script. If you want to (re)name existing items/inventories you can either use this expression or use set name of <item/inventory> to <text>.
give a diamond sword of sharpness 100 named "<gold>Excalibur" to the playerset tool of player to the player's tool named "<gold>Wand"set the name of the player's tool to "<gold>Wand"open hopper inventory named "Magic Hopper" to playerNaNExpression
A number representing an undefined value. NaN occurs as a result of illegal math, like dividing 0 by 0. NaN is deliberately not equal to any other number, including itself.
nan [value]value of nanif {_number} is not {_number}:if isNaN({_number}) is true:Nearest EntityExpression
Gets the entity nearest to a location or another entity.
kill the nearest pig and cow relative to playerteleport player to the nearest cow relative to playerteleport player to the nearest entity relative to playeron click: kill nearest pig(-|minus |negative )(infinity|∞) [value]value of (-|minus |negative )(infinity|∞)if {_number} is -infinity:nlnew[ ]lineline[ ]breaksend "Hello%nl%Goodbye!" to playerNew Potion EffectSection Expression
Create a new potion effect that can be applied to an entity or item type.
set {_potion} to a potion effect of speed 2 for 10 minutes: hide the effect's icon hide the effect's particlesadd strength 5 to the potion effects of the player's toolapply invisibility to the player for 5 minutes: hide the effect's particlesadd a potion effect of speed 1 to the potion effects of the player# creates a potion effect with the properties of an existing potion effectset {_potion} to a potion effect of slowness based on the player's speed effectNew Potion EffectSection Expression
Create a new potion effect that can be applied to an entity or item type.
set {_potion} to a potion effect of speed 2 for 10 minutes: hide the effect's icon hide the effect's particlesadd strength 5 to the potion effects of the player's toolapply invisibility to the player for 5 minutes: hide the effect's particlesadd a potion effect of speed 1 to the potion effects of the player# creates a potion effect with the properties of an existing potion effectset {_potion} to a potion effect of slowness based on the player's speed effectNo Damage TicksExpression
The number of ticks that an entity is invulnerable to damage for.
on damage: set victim's invulnerability ticks to 20 #Victim will not take damage for the next secondNo Damage TimeExpression
The amount of time an entity is invulnerable to any damage.
on damage: set victim's invulnerability time to 20 ticks #Victim will not take damage for the next secondif the no damage timespan of {_entity} is 0 seconds: set the invincibility time span of {_entity} to 1 minuteNodeExpression
Returns a node inside a config (or another section-node).
Nodes in Skript configs are written in the format key: value.
Section nodes can contain other nodes.
set {_node} to node "language" in the skript configif text value of {_node} is "french": broadcast "Bonjour!"set {_script} to the current scriptloop nodes of the current script: broadcast name of loop-valueNodeType
A node (entry) from a script config file. This may have navigable children.
The key of the node, as text.
The value of the node, if it is an entry node, as text.
the current scriptNowExpression
The current system time of the server. Use time to get the Minecraft time of a world.
nowbroadcast "Current server time: %now%"NumberType
A number, e.g. 2.5, 3, -9812454, 30 degrees or 3.14 radians. Please note that many expressions only need integers, i.e. will discard any fractional parts of any numbers without producing an error. Radians will be converted to degrees.
[-]###[.###] [e[+|-]###] [[in ](rad[ian][s]|deg[ree][s])]set the player's health to 5.5set {_temp} to 2*{_temp} - 2.5set {_angle} to 3.14 in radians # will be converted to degreesNumber OfExpression
The number of something. Using ‘number of {list::}’ will return the length of the list, so if you want the numbers of the things inside the lists, use ‘numbers of {list::}’.
message "There are %number of all players% players online!"Number of CharactersExpression
The number of uppercase, lowercase, or digit characters in a string.
#Simple Chat Filteron chat: if number of uppercase chars in message / length of message > 0.5 cancel event send "<red>Your message has to many caps!" to playerNumbersExpression
All numbers between two given numbers, useful for looping. Use ‘numbers’ if your start is not an integer and you want to keep the fractional part of the start number constant, or use ‘integers’ if you only want to loop integers. You may also use ‘decimals’ if you want to use the decimal precision of the start number. You may want to use the ‘times’ expression instead, for instance ‘loop 5 times:’
loop numbers from 2.5 to 5.5: # loops 2.5, 3.5, 4.5, 5.5loop integers from 2.9 to 5.1: # same as '3 to 5', i.e. loops 3, 4, 5loop decimals from 3.94 to 4: # loops 3.94, 3.95, 3.96, 3.97, 3.98, 3.99, 4Offline PlayerType
A player that is possibly offline. See player for more information. Please note that while all effects and conditions that require a player can be used with an offline player as well, they will not work if the player is not actually online.
The name of an offline player, as text. Cannot be changed.
Parsing an offline player as a player (online) will return nothing (none), for that case you would need to parse as offlineplayer which only returns nothing (none) if player doesn't exist in Minecraft databases (name not taken) otherwise it will return the player regardless of their online status.set {_p} to "Notch" parsed as an offlineplayer # returns Notch even if they're offlineOffline playersExpression
All players that have ever joined the server. This includes the players currently online.
[all [[of] the]|the] offline[ ]playerssend "Size of all players who have joined the server: %size of all offline players%"offlineplayerFunction
Returns a offline player from their name or UUID. This function will still return the player if they’re online. If Paper 1.16.5+ is used, the ‘allowLookup’ parameter can be set to false to prevent this function from doing a web lookup for players who have not joined before. Lookups can cause lag spikes of up to multiple seconds, so use offline players with caution.
set {_p} to offlineplayer("Notch")set {_p} to offlineplayer("069a79f4-44e9-4726-a5be-fca90e38aaf5")set {_p} to offlineplayer("Notch", false)On Anvil DamageEvent
Called when an anvil is damaged/broken from being used to repair/rename items. Note: this does not include anvil damage from falling.
anvil damag(e|ing)on anvil damage: cancel the eventOn Anvil PrepareEvent
Called when an item is put in a slot for repair by an anvil. Please note that this event is called multiple times in a single item slot move.
anvil prepar(e|ing)on anvil prepare: event-item is set # result item chance of 5%: set repair cost to repair cost * 50% send "You're LUCKY! You got 50% discount." to playerOn AoE Cloud EffectEvent
Called when area effect cloud applies its potion effect. This happens every 5 ticks by default.
(area|aoe) [cloud] effecton area cloud effect:[player] arm swingon arm swing: send "You swung your arm!"On Armor ChangeEvent
Called when armor pieces of a player are changed.
[player] armo[u]r change[d]on armor change: broadcast the old armor itemon helmet change:On Attempt AttackEvent
Called when a player attempts to attack an entity. The event will be cancelled as soon as it is fired for non-living entities. Cancelling this event will prevent the attack and any sounds from being played when attacking. Any damage events will not be called if this is cancelled.
attack attempton attack attempt: if event is cancelled: broadcast "%attacker% failed to attack %victim%!" else: broadcast "%attacker% damaged %victim%!"on attempt to attack an animal: cancel eventon attempting to attack an entity: if victim is a creeper: cancel eventon attempt to attack a zombie or creeper: attacker isn't holding a diamond sword cancel eventOn Bat Toggle SleepEvent
Called when a bat attempts to go to sleep or wakes up.
bat toggle sleepon bat toggle sleep:beacon change effectbeacon effect changeplayer chang(e[s]|ing) [of] beacon effecton beacon effect change: broadcast event-player broadcast event-block broadcast primary beacon effect broadcast secondary beacon effecton beacon change effect:on player change beacon effect:on beacon effect: broadcast applied effect broadcast event-player broadcast event-blockon primary beacon effect apply of haste:on application of secondary beacon effect:on beacon effect of speed:beacon togglebeacon activat(e|ion)beacon deactivat(e|ion)on beacon toggle:on beacon activate:on beacon deactivate:bed enter[ing][player] enter[ing] [a] bedon bed enter:bed leav(e|ing)[player] leav(e|ing) [a] bedon player leaving a bed:bell resonat(e|ing)on bell resonate: send "<red>Raiders are nearby!" to all players in radius 32 around event-blockbell ring[ing]on bell ring: send "<gold>Ding-dong!<reset>" to all players in radius 10 of event-blockOn Block DamageEvent
Called when a player starts to break a block. You can usually just use the leftclick event for this.
block damag(ing|e)on block damaging: if block is tagged with minecraft tag "logs": send "You can't break the holy log!"On Block DropEvent
Called when a block broken by a player drops something.
- event-player: The player that broke the block
- past event-block: The block that was broken
- event-block: The block after being broken
- event-items (or drops): The drops of the block
- event-entities: The entities of the dropped items
If the breaking of the block leads to others being broken, such as torches, they will appearin “event-items” and “event-entities”.
on block drop: broadcast event-player broadcast past event-block broadcast event-block broadcast event-items broadcast event-entitieson block drop of oak log:[block] fertilizeon block fertilize: send "Fertilized %size of fertilized blocks% blocks got fertilized."on crop growth:book (edit|change|write)on book edit:book sign[ing]on book sign:On Break / MineEvent
Called when a block is broken by a player. If you use ‘on mine’, only events where the broken block dropped something will call the trigger.
on mine:on break of stone:on break of chest[facing=north]:on break of potatoes[age=7]:On Brewing CompleteEvent
Called when a brewing stand finishes brewing an ingredient and changes the potions.
on brew: broadcast event-itemon brewing of speed potion:on brew finished for speed 2 potion:on brewing consume fuel: prevent the brewing stand from consuming fuelon brewing fuel consumption of blaze powder:brew[ing] start[ed|ing]on brewing start: set the brewing time to 1 secondbroadcaston broadcast: set broadcast-message to "&c[BROADCAST] %broadcasted message%"On Bucket EmptyEvent
Called when a player empties a bucket. You can also use the place event with a check for water or lava.
bucket empty[ing][player] empty[ing] [a] bucketon bucket empty:bucket fill[ing][player] fill[ing] [a] bucketon player filling a bucket:On BurnEvent
Called when a block is destroyed by fire.
on burn:on burn of oak wood, oak fences, or chests:on burn of oak_log[axis=y]:On Can Build CheckEvent
Called when a player rightclicks on a block while holding a block or a placeable item. You can either cancel the event to prevent the block from being built, or uncancel it to allow it. Please note that the data value of the block to be placed is not available in this event, only its ID.
[block] can build checkon block can build check: cancel eventOn ChatEvent
Called whenever a player chats. Use chat format to change message format. Use chat recipients to edit chat recipients.
chaton chat: if the player has permission "owner": set the chat format to "<red>[player]<light gray>: <light red>[message]" else if the player has permission "admin": set the chat format to "<light red>[player]<light gray>: <orange>[message]" else: # default message format set the chat format to "<orange>[player]<light gray>: <white>[message]"chunk (generat|populat)(e|ing)on chunk generate:On Chunk LoadEvent
Called when a chunk loads. The chunk might or might not contain mobs when it’s loaded.
chunk load[ing]on chunk load:On Chunk UnloadEvent
Called when a chunk is unloaded due to not being near any player.
chunk unload[ing]on chunk unload:On ClickEvent
Called when a user clicks on a block, an entity or air with or without an item in their hand. Please note that rightclick events with an empty hand while not looking at a block are not sent to the server, so there’s no way to detect them. Also note that a leftclick on an entity is an attack and thus not covered by the ‘click’ event, but the ‘damage’ event.
[(right|left)(| |-)][mouse(| |-)]click[ing] [on %entitydata/itemtype/blockdata%] [(with|using|holding) %itemtype%][(right|left)(| |-)][mouse(| |-)]click[ing] (with|using|holding) %itemtype% on %entitydata/itemtype/blockdata%on click:on rightclick holding a fishing rod:on leftclick on a stone or obsidian:on rightclick on a creeper:on click with a sword:on click on chest[facing=north]:on click on campfire[lit=true]:On CombustEvent
Called when an entity is set on fire, e.g. by fire or lava, a fireball, or by standing in direct sunlight (zombies, skeletons).
combust[ing]on combust:On CommandEvent
Called when a player enters a command. You can check whether the command is a script command using the ‘Is a Script Command’ condition.
on command: the player is in water cancel the event send "<red>Commands cannot be executed in water!" to the playerOn ConnectEvent
Called when the player connects to the server. This event is called before the player actually joins the server, so if you want to prevent players from joining you should prefer this event over on join.
[player] connect[ing]on connect: player doesn't have permission "VIP" number of players is greater than 15 kick the player due to "The last 5 slots are reserved for VIP players."On ConsumeEvent
Called when a player is done eating/drinking something, e.g. an apple, bread, meat, milk or a potion.
on consume:on craft:On Creeper PowerEvent
Called when a creeper is struck by lighting and gets powered. Cancel the event to prevent the creeper from being powered.
creeper poweron creeper power:On DamageEvent
Called when an entity receives damage, e.g. by an attack from another entity, lava, fire, drowning, fall, suffocation, etc.
on damage:on damage of a player:on damage of player by zombie:on death:on death of player:on death of a wither or ender dragon: broadcast "A %entity% has been slain in %world%!"on dispense of iron block: send "that'd be 19.99 please!"On DropEvent
Called when a player drops an item from their inventory, or an entity drops an item, such as a chicken laying an egg.
on drop: if event-item is compass: cancel eventon entity drop of an egg: if event-entity is a chicken: set item of event-dropped item to a diamondOn Egg ThrowEvent
Called when a player throws an egg and it lands. You can just use the shoot event in most cases. However, this event allows modification of properties like the hatched entity type and the number of entities to hatch.
throw[ing] [of] [an] egg[player] egg throwon throw of an egg:On Elytra BoostEvent
Called when a player uses a firework to boost their fly speed when flying with an elytra.
elytra booston elytra boost: if the used firework will be consumed: prevent the used firework from being consumeOn EnchantEvent
Called when a player successfully enchants an item. To get the enchanted item, see the enchant item expression
[item] enchanton enchant: if the clicked button is 1: # offer 1 set the applied enchantments to sharpness 10 and unbreaking 10On Enchant PrepareEvent
Called when a player puts an item into enchantment table. This event may be called multiple times. To get the enchant item, see the enchant item expression
[item] enchant prepareon enchant prepare: set enchant offer 1 to sharpness 1 set the cost of enchant offer 1 to 10 levelsOn Enderman EnrageEvent
Called when an enderman gets mad because a player looked at them. Note: This does not stop enderman from targeting the player as a result of getting damaged.
enderman (enrage|anger)# Stops endermen from getting angry players with the permission "safeFrom.enderman"on enderman enrage: if player has permission "safeFrom.enderman": cancel eventOn Enderman/Sheep/Silverfish/Falling BlockEvent
Called when an enderman places or picks up a block, a sheep eats grass, a silverfish boops into/out of a block or a falling block lands and turns into a block respectively. event-block represents the old block and event-blockdata represents the new replacement that’ll be applied to the block.
enderman placeenderman pickupsheep eatsilverfish entersilverfish exitfalling block fall[ing]falling block land[ing]on sheep eat: kill event-entity broadcast "A sheep stole some grass!"on falling block land: event-entity is a falling dirt cancel eventOn Entity BreedEvent
Called whenever two animals begin to conceive a child. The type can be specified.
on breeding of llamas: send "When a %breeding mother% and %breeding father% love each other very much they make %offspring%" to breederdismount[ing]on dismount: kill event-entityentity jump[ing]on entity jump: if entity is a wither skeleton: cancel eventmount[ing]on mount: cancel eventOn Entity Potion EffectEvent
Called when an entity’s potion effect is modified.
entity potion effect [modif[y|ication]] [[of] %potioneffecttypes%] [%potionactions%] [due to %potioncauses%]on entity potion effect modification: broadcast "A potion effect was added to %event-entity%!"on entity potion effect of night vision added: message "You can now see in the dark!"on entity potion effect of strength removed: message "You're now weaker!"On Entity Shoot BowEvent
Called when an entity shoots a bow. event-entity refers to the shot projectile/entity.
on player shoot bow: chance of 30%: damage event-slot by 10 send "Your bow has taken increased damage!" to shooter
on stray shooting bow: set {_e} to event-entity spawn a cow at {_e}: set velocity of entity to velocity of {_e} set event-entity to last spawned entityOn Entity TransformEvent
Called when an entity is about to be replaced by another entity. Examples when it’s called include; when a zombie gets cured and a villager spawns, an entity drowns in water like a zombie that turns to a drown, an entity that gets frozen in powder snow, a mooshroom that when sheared, spawns a new cow.
on a zombie transforming due to curing:on mooshroom transforming:on zombie, skeleton or slime transform:[player] (level progress|[e]xp|experience) (change|update|increase|decrease)on level progress change: set {_xp} to event-experience broadcast "%{_xp}%"On Experience Cooldown ChangeEvent
Called when a player’s experience cooldown changes. Experience cooldown is how long until a player can pick up another orb of experience.
player (experience|[e]xp) cooldown changeon player experience cooldown change: broadcast event-player broadcast event-timespan broadcast past event-timespan broadcast xp cooldown change reasonOn Experience SpawnEvent
Called whenever experience is about to spawn. Please note that this event will not fire for xp orbs spawned by plugins (including Skript) with Bukkit.
[e]xp[erience] [orb] spawnspawn of [a[n]] [e]xp[erience] [orb]on xp spawn: world is "minigame_world" cancel eventOn ExplodeEvent
Called when an entity (a primed TNT or a creeper) explodes. When the mob griefing gamerule is false, this is not called for entities.
explo(d(e|ing)|sion)on explosion:On Explosion PrimeEvent
Called when an explosive is primed, i.e. an entity will explode shortly. Creepers can abort the explosion if the player gets too far away, while TNT will explode for sure after a short time.
explosion primeon explosion prime:on fade of snow or blue ice:on fade of snow[layers=2]on firework explode: if event-colors contains red:on firework exploding colored red, light green and black:on firework explosion colored rgb 0, 255, 0: broadcast "A firework colored %colors% was exploded at %location%!"first (join|login)on first join: broadcast "Welcome %player% to the server!"On FishingEvent
Called when a player triggers a fishing event. An entity hooked event is triggered when an entity gets caught by a fishing rod. A fish escape event is called when the player fails to click on time, and the fish escapes. A fish approaching event is when the bobber is waiting to be hooked, and a fish is approaching. A fishing state change event is triggered whenever the fishing state changes.
[fishing] (line|rod) castfish (caught|catch)entity (hook[ed]|caught|catch)(bobber|hook) (in|hit) groundfish (escape|get away)[fishing] (rod|line) reel infish bit(e|ing)(fish approach[ing]|(bobber|hook) lure[d])fishing state change[d]on fishing line cast: send "You caught a fish!" to playeron entity caught: push event-entity vector from entity to playeron fishing state change: if event-fishing state is fish caught: broadcast "A fish has been caught!"[player] flight toggl(e|ing)[player] toggl(e|ing) flighton flight toggle: if {game::%player%::playing} exists: cancel eventOn FlowEvent
Called when a blocks flows or teleports to another block. This not only applies to water and lava, but teleporting dragon eggs as well.
[block] flow[ing]block mov(e|ing)on block flow: if event-block is water: broadcast "Build more dams! It's starting to get wet in here"On FormEvent
Called when a block is created, but not by a player, e.g. snow forms due to snowfall, water freezes in cold biomes. This isn’t called when block spreads (mushroom growth, water physics etc.), as it has its own event (see spread event).
on form of snow:On Fuel BurnEvent
Called when a furnace burns an item from its fuel slot.
on fuel burning: broadcast fuel burned if burned fuel is coal: add 20 seconds to burn timeon furnace extract: if event-items is an iron ingot: remove event-items from event-player's inventoryOn Gliding State ChangeEvent
Called when an entity toggles glider on or off, or when server toggles gliding state of an entity forcibly.
(gliding state change|toggl(e|ing) gliding)on toggling gliding: cancel the event # bad idea, but you CAN do it!On GrowEvent
Called when a tree, giant mushroom or plant grows to next stage. “of” matches any grow event, “from” matches only the old state, “into” matches only the new state,and “from into” requires matching both the old and new states. Using “and” lists in this event is equivalent to using “or” lists. The event will trigger if any one of the elements is what grew.
on grow:on grow of tree:on grow of wheat[age=7]:on grow from a sapling:on grow into tree:on grow from a sapling into tree:on grow of wheat, carrots, or potatoes:on grow into tree, giant mushroom, cactus:on grow from wheat[age=0] to wheat[age=1] or wheat[age=2]:On Hand Item SwapEvent
Called whenever a player swaps the items in their main- and offhand slots. Works also when one or both of the slots are empty. The event is called before the items are actually swapped, so when you use the player’s tool or player’s offtool expressions, they will return the values before the swap - this enables you to cancel the event before anything happens.
swap[ping of] [hand|held] item[s]on swap hand items: event-player's tool is a diamond sword cancel eventOn Harvest BlockEvent
Called when a player harvests a block. A block being harvested is when a block drops items and the state of the block is changed, but the block is not broken. An example is harvesting berries from a berry bush.
on player block harvest: send "You have harvested %event-block% that dropped %event-items% using your %item of event-slot% in your %event-equipment slot%"
on crop harvesting of sweet berry bush: chance 5%: set drops to a diamond chance 1% cancel the dropsOn HealEvent
Called when an entity is healed, e.g. by eating (players), being fed (pets), or by the effect of a potion of healing (overworld mobs) or harm (nether mobs).
on heal:on player healing from a regeneration potion:on healing of a zombie, cow or a wither: heal reason is healing potion cancel eventhorse jumpon horse jump: push event-entity upwards at speed 2On Hunger Meter ChangeEvent
Called when the hunger bar of a player changes, i.e. either increases by eating or decreases over time.
(food|hunger) (level|met(er|re)|bar) chang(e|ing)on food bar change:On IgnitionEvent
Called when a block starts burning, i.e. a fire block is placed next to it and this block is flammable. The burn event will be called when the block is about do be destroyed by the fire.
[block] ignit(e|ion)on block ignite: if event-block is a ladder: cancel eventOn Inventory ClickEvent
Called when clicking on inventory slot.
on inventory click: if event-item is stone: give player 1 stone remove 20$ from player's balanceinventory clos(ing|e[d])on inventory close: if player's location is {location}: send "You exited the shop!"On Inventory DragEvent
Called when a player drags an item in their cursor across the inventory.
inventory drag[ging]on inventory drag: if player's current inventory is {_gui}: send "You can't drag your items here!" to player cancel eventOn Inventory Item MoveEvent
Called when an entity or block (e.g. hopper) tries to move items directly from one inventory to another. When this event is called, the initiator may have already removed the item from the source inventory and is ready to move it into the destination inventory. If this event is cancelled, the items will be returned to the source inventory.
inventory item (move|transport)inventory (mov(e|ing)|transport[ing]) [an] itemon inventory item move: broadcast "%holder of past event-inventory% is transporting %event-item% to %holder of event-inventory%!"inventory open[ed]on inventory open: close player's inventoryOn Inventory PickupEvent
Called when an inventory (a hopper, a hopper minecart, etc.) picks up an item
inventory pick[ ]upon inventory pickup:On Inventory Slot ChangeEvent
Called when a slot in a player’s inventory is changed. Warning: setting the event-slot to a new item can result in an infinite loop.
[player] inventory slot chang(e|ing)on inventory slot change: if event-item is a diamond: send "You obtained a diamond!" to playerOn Item BreakEvent
Called when a player breaks their tool because its damage reached the maximum value. This event cannot be cancelled.
[player] tool break[ing][player] break[ing] (a|the|) toolon tool break:On Item DamageEvent
Called when an item is damaged. Most tools are damaged by using them; armor is damaged when the wearer takes damage.
item damag(e|ing)on item damage: cancel eventOn Item DespawnEvent
Called when an item is about to be despawned from the world, usually 5 minutes after it was dropped.
on item despawn of diamond: send "Not my precious!" cancel eventOn Item MendEvent
Called when a player has an item repaired via the Mending enchantment.
item mend[ing]on item mend: chance of 50%: cancel the event send "Oops! Mending failed!" to playerOn Item MergeEvent
Called when dropped items merge into a single stack. event-entity will be the entity which is trying to merge, and future event-entity will be the entity which is being merged into.
on item merge of gold blocks: cancel eventOn Item SpawnEvent
Called whenever an item stack is spawned in a world, e.g. as drop of a block or mob, a player throwing items out of their inventory, or a dispenser dispensing an item (not shooting it).
on item spawn of iron sword: broadcast "Someone dropped an iron sword!"On JoinEvent
Called when the player joins the server. The player is already in a world when this event is called, so if you want to prevent players from joining you should prefer on connect over this event.
[player] (login|logging in|join[ing])on join: message "Welcome on our awesome server!" broadcast "%player% just joined the server!"[player] jump[ing]on jump: event-player does not have permission "jump" cancel eventOn KickEvent
Called when a player is kicked from the server. You can change the kick message or cancel the event entirely.
[player] (kick|being kicked)on kick:On Language ChangeEvent
Called after a player changed their language in the game settings. You can use the language expression to get the current language of the player.
[player] (language|locale) chang(e|ing)[player] chang(e|ing) (language|locale)on language change: if player's language starts with "en": send "Hello!"On Leash / UnleashEvent
Called when an entity is leashed or unleashed. Cancelling these events will prevent the leashing or unleashing from occurring.
on player leash of a sheep: send "Baaaaa--" to playeron player leash: send "<%event-entity%> Let me go!" to playeron unleash: broadcast "<%event-entity%> I'm free"on player unleash: send "<%event-entity%> Thanks for freeing me!" to playerOn Leaves DecayEvent
Called when a leaf block decays due to not being connected to a tree.
leaves decay[ing]on leaves decay:On Level ChangeEvent
Called when a player’s level changes, e.g. by gathering experience or by enchanting something.
[player] level (change|up|down)on level change:lightning [strike]on lightning: spawn a zombie at location of event-entityOn Loot GenerateEvent
Called when a loot table of an inventory is generated in the world. For example, when opening a shipwreck chest.
loot generat(e|ing)on loot generate: chance of 10% add 64 diamonds to the loot send "You hit the jackpot at %event-location%!"[entity] enter[s] love mode[entity] love mode [enter]on love mode enter: cancel event # No one is allowed love hereOn Move / RotateEvent
Called when a player or entity moves or rotates their head. NOTE: Move event will only be called when the entity/player moves position, keyword ‘turn around’ is for orientation (ie: looking around), and the combined syntax listens for both. NOTE: These events can be performance heavy as they are called quite often.
Supports Set
Supports Set
on player move: if player does not have permission "player.can.move": cancel eventon skeleton move: if event-entity is not in world "world": kill event-entityon player turning around: send action bar "You are currently turning your head around!" to playerOn Move OnEvent
Called when a player moves onto a certain type of block. Please note that using this event can cause lag if there are many players online.
Supports Set
Supports Set
on walking on dirt or grass:on stepping on stone:[entity] [start[s]] pathfind[ing]on pathfind: broadcast "%event-entity% is about to move to %event-location%!"On PhysicsEvent
Called when a physics check is done on a block. By cancelling this event you can prevent some things from happening, e.g. sand falling, dirt turning into grass, torches dropping if their supporting block is destroyed, etc.Please note that using this event might cause quite some lag since it gets called extremely often.
[block] physics# prevents sand from fallingon block physics: block is sand cancel eventOn Pick UpEvent
Called when a player/entity picks up an item. Please note that the item is still on the ground when this event is called.
on pick up:on entity pickup of wheat:On Pig ZapEvent
Called when a pig is stroke by lightning and transformed into a zombie pigman. Cancel the event to prevent the transformation.
pig[ ]zapon pig zap:On Piglin BarterEvent
Called when a piglin finishes bartering. A piglin may start bartering after picking up an item on its bartering list. Cancelling will prevent piglins from dropping items, but will still make them pick up the input.
piglin (barter[ing]|trad(e|ing))on piglin barter: if barter drops contain diamond: send "Diamonds belong in the money pit!" to player cancel eventpiston extend[ing]on piston extend: broadcast "A piston is extending!"piston retract[ing]on piston retract: broadcast "A piston is retracting!"On PlaceEvent
Called when a player places a block.
on place:on place of a furnace, crafting table or chest:on break of chest[type=right] or chest[type=left]On Player Chunk EnterEvent
Called when a player enters a chunk. Note that this event is based on ‘player move’ event, and may be called frequent internally.
Supports Set
Supports Set
[player] (enter[s] [a] chunk|chunk enter[ing])on player enters a chunk: send "You entered a chunk: %past event-chunk% -> %event-chunk%!" to playerOn Player Deep SleepEvent
Called when a player has slept long enough to count as passing the night/storm. Cancelling this event will prevent the player from being counted as deeply sleeping unless they exit and re-enter the bed.
[player] deep sleep[ing]on player deep sleeping: send "Zzzz.." to playeron game mode change: if event-gamemode is creative: send "Your gamemode is now creative! Totally don't go spawning items in.."on game mode change: send "Wow! Your gamemode changed!"On Player InputEvent
Called when a player sends an updated input to the server. Note: The input keys event value is the set of keys the player is currently pressing, not the keys that were pressed or released.
on input key press: send "You are pressing: %event-inputkeys%" to playerOn Player Pick ItemEvent
Called when a player picks an item, block or an entity using the pick block key (default middle mouse button). The past event-slot represents the slot containing the item that will be put into the players hotbar, or nothing, if the item is not in the inventory. The event-slot represents the slot in the hotbar where the picked item will be placed. Both event-slots may be set to new slots.
[player] pick[ing] [of] [an|any] item[player] pick[ing] [of] [a|any] block[player] pick[ing] [of] [an|any] entityon player picking a diamond block: cancel event send "You cannot pick diamond blocks!" to the player[player] (pick[ing| ]up [an] arrow|arrow pick[ing| ]up)on arrow pickup: cancel the event teleport event-projectile to block 5 above event-projectileplayer trad(e|ing)on player trade: chance of 50%: cancel event send "The trade was somehow denied!" to player[player] world chang(ing|e[d])on player world change: world is "city" send "Welcome to the City!"On PortalEvent
Called when a player or an entity uses a nether or end portal. Note that ‘on entity portal’ event does not apply to players. Cancel the event to prevent the entity from teleporting.
[player] portalentity portalon portal: broadcast "%player% has entered a portal!"on player portal: player's world is world("wilderness") set world of event-location to player's world add 9000 to x-pos of event-locationon entity portal: broadcast "A %type of event-entity% has entered a portal!On Portal CreateEvent
Called when a portal is created, either by a player or mob lighting an obsidian frame on fire, or by a nether portal creating its teleportation target in the nether/overworld. In Minecraft 1.14+, you can use the player in this event. Please note that there may not always be a player (or other entity) in this event.
portal creat(e|ion)on portal create:On Portal EnterEvent
Called when an entity enters a nether portal or an end portal. Please note that this event will be fired many times for a nether portal.
portal enter[ing]entering [a] portalon portal enter:On Prepare CraftEvent
Called just before displaying crafting result to player. Note that setting the result item might or might not work due to Bukkit bugs.
on preparing craft of torch:On Pressure Plate / TripEvent
Called when a player steps on a pressure plate or tripwire respectively.
[step[ping] on] [a] [pressure] plate(trip|[step[ping] on] [a] tripwire)on step on pressure plate:projectile collideon projectile collide: teleport shooter of event-projectile to event-entityprojectile hiton projectile hit: if victim's health <= 3: delete event-projectile(quit[ting]|disconnect[ing]|log[ ]out|logging out|leav(e|ing))on quit:on disconnect:On Ready ArrowEvent
Called when a player is firing a bow and the server is choosing an arrow to use. Cancelling this event will skip the current arrow item and fire a new event for the next arrow item. The arrow and bow in the event can be accessed with the Readied Arrow/Bow expression.
[player] ((ready|choose|draw|load) arrow|arrow (choose|draw|load))on player ready arrow: selected bow's name is "Spectral Bow" if selected arrow is not a spectral arrow: cancel eventOn RedstoneEvent
Called when the redstone current of a block changes. This event is of not much use yet.
redstone [current] [chang(e|ing)]on redstone change: send "someone is using redstone" to consoleOn Region Enter/LeaveEvent
Called when a player enters or leaves a region. This event requires a supported regions plugin to be installed.
region (enter[ing]|leav(e|ing)|exit[ing])on region exit: message "Leaving %region%."region enter[ing]region (exit[ing]|leav(e|ing))on region enter: send "You entered %region%"On Resource Pack Request ResponseEvent
Called when a player takes action on a resource pack request sent via the send resource pack effect. The resource pack condition can be used to check the resource pack state.
This event will be triggered once when the player accepts or declines the resource pack request, and once when the resource pack is successfully installed or failed to download.
resource pack [request] responseon resource pack request response: if the resource pack was declined or failed to download:on resource pack deny: kick the player due to "You have to install the resource pack to play in this server!"On RespawnEvent
Called when a player respawns via death or entering the end portal in the end. You should prefer this event over the death event as the player is technically alive when this event is called.
[player] respawn[ing]on respawn:On Resurrect AttemptEvent
Called when an entity dies, always. If they are not holding a totem, this is cancelled - you can, however, uncancel it.
[entity] resurrect[ion] [attempt]on resurrect attempt: entity is player entity has permission "admin.undying" uncancel the eventOn RiptideEvent
Called when the player activates the riptide enchantment, using their trident to propel them through the air. Note: the riptide action is performed client side, so manipulating the player in this event may have undesired effects.
[use of] riptide [enchant[ment]]on riptide: send "You are riptiding!"On Script Load/UnloadEvent
Called directly after the trigger is loaded, or directly before the whole script is unloaded. The keyword ‘async’ indicates the trigger can be ran asynchronously,
[async] [script] (load|init|enable)[async] [script] (unload|stop|disable)on load: set {running::%script%} to trueon unload: set {running::%script%} to falseOn Send Command ListEvent
Called when the server sends a list of commands to the player. This usually happens on join. The sent commands can be modified via the sent commands expression. Modifications will affect what commands show up for the player to tab complete. They will not affect what commands the player can actually run. Adding new commands to the list is illegal behavior and will be ignored.
send[ing] [of [the]] [server] command[s] list[server] command list sendon send command list: set command list to command list where [input does not contain ":"] remove "help" from command listOn Server List PingEvent
Called when a server list ping is coming in, generally when a Minecraft client pings the server to show its information in the server list. The IP expression can be used to get the IP adress of the pinger. This event can be cancelled on PaperSpigot 1.12.2+ only and this means the player will see the server as offline (but still can join).
Also you can use MOTD, Max Players, Online Players Count, Protocol Version, Version String, Hover List and Server Icon expressions, and Player Info Visibility and Hide Player from Server List effects to modify the server list.
server [list] pingon server list ping: set the motd to "Welcome %{player-by-IP::%ip%}%! Join now!" if {player-by-IP::%ip%} is set, else "Join now!" set the fake max players count to (online players count + 1) set the shown icon to a random server icon out of {server-icons::*}On Server Start/StopEvent
Called when the server starts or stops (actually, when Skript starts or stops, so a /reload will trigger these events as well).
(server|skript) (start|load|enable)(server|skript) (stop|unload|disable)on skript start:on server stop:On Sheep Regrow WoolEvent
Called when sheep regrows its sheared wool back.
sheep [re]grow[ing] woolon sheep grow wool: cancel eventOn ShootEvent
Called whenever a projectile is shot. Use the shooter expression to get who shot the projectile.
[projectile] (shoot|launch)on shoot: if projectile is an arrow: send "you shot an arrow!" to shooterOn Sign ChangeEvent
As signs are placed empty, this event is called when a player is done editing a sign.
sign (chang[e]|edit)[ing][player] (chang[e]|edit)[ing] [a] signon sign change: line 2 is empty set line 1 to "<red>%line 1%"On Slime SplitEvent
Called when a slime splits. Usually this happens when a big slime dies.
slime split[ting]on slime split:On SmeltEvent
Called when a furnace smelts an item in its input slot.
[furnace] smelt[ed|ing] of oreon smelt: clear the smelted itemon smelt of raw iron: broadcast smelted item set the smelted item to iron blockOn Sneak ToggleEvent
Called when a player starts or stops sneaking. Use is sneaking to get whether the player was sneaking before the event was called.
[player] toggl(e|ing) sneak[player] sneak toggl(e|ing)# make players that stop sneaking jumpon sneak toggle: player is sneaking push the player upwards at speed 0.5On SpawnEvent
Called when an entity spawns (excluding players).
on spawn of a zombie:on spawn of an ender dragon: broadcast "A dragon has been sighted in %world%!"[world] spawn changeon spawn change: broadcast "someone changed the spawn!"On SpectateEvent
Called with a player starts, stops or swaps spectating an entity.
on player start spectating of a zombie:On Sponge AbsorbEvent
Called when a sponge absorbs blocks.
sponge absorbon sponge absorb: loop absorbed blocks: broadcast "%loop-block% was absorbed by a sponge"!On SpreadEvent
Called when a new block forms as a result of a block that can spread, e.g. water or mushrooms.
spread[ing]on spread:On Sprint ToggleEvent
Called when a player starts or stops sprinting. Use is sprinting to get whether the player was sprinting before the event was called.
[player] toggl(e|ing) sprint[player] sprint toggl(e|ing)on sprint toggle: player is not sprinting send "Run!"On Start SmeltEvent
Called when a furnace starts smelting an item in its ore slot.
on smelting start: if the smelting item is raw iron: set total cook time to 1 secondon smelting start of raw iron: add 20 seconds to total cook timeon stonecutting stone slabs cancel the eventon stonecutting: broadcast "%player% is using stonecutter to craft %event-item%!"On Stop Using ItemEvent
Called when a player stops using an item. For example, when the player releases the interact button when holding a bow, an edible item, or a spyglass. Note that event-timespan will return the time the item was used for.
[player] (stop|end) (using item|item use)on player stop using item: broadcast "%player% used %event-item% for %event-timespan%."On Swim ToggleEvent
Called when an entity swims or stops swimming.
[entity] toggl(e|ing) swim[entity] swim toggl(e|ing)on swim toggle: event-entity does not have permission "swim" cancel eventOn System TimeEvent
Called when the local time of the system the server is running on reaches the provided real-life time.
at 14:20 in real time:at 2:30am real time:at 6:10 pm in real time:at 5:00 am and 5:00 pm in real time:at 5:00 and 17:00 in real time:On TameEvent
Called when a player tames a wolf or ocelot. Can be cancelled to prevent the entity from being tamed.
[entity] tam(e|ing)on tame:On TargetEvent
Called when a mob starts/stops following/attacking another entity, usually a player.
[entity] target[entity] un[-]targeton entity target: target is a playerOn TeleportEvent
This event can be used to listen to teleports from non-players or player entities respectively. When teleporting entities, the event may also be called due to a result of natural causes, such as an enderman or shulker teleporting, or wolves teleporting to players. When teleporting players, the event can be called by teleporting through a nether/end portal, or by other means (e.g. plugins).
Supports Set
Supports Set
Supports Set
Supports Set
on teleport:on player teleport:on creeper teleport:On Tool ChangeEvent
Called whenever a player changes their held item by selecting a different slot (e.g. the keys 1-9 or the mouse wheel), not by dropping or replacing the item in the current slot.
[player['s]] (tool|item held|held item) chang(e|ing)on player's held item change:(unknown|non-existent) command [execution]on unknown command execution: add 1 to {-command_fails::%player%} wait 30 seconds: remove 1 from {-command_fails::%player%} if {-command_fails::%player%} is greater than or equal to 5: push the player upwards set the unknown command message to "<red>You are executing too many unknown commands too fast!"On Vault Display ItemEvent
Called when a vault in a trial chamber is about to display an item.
vault display[ing] itemon vault display item: set event-item to a netherite ingoton vehicle collision:on vehicle collision with obsidian:on vehicle collision with a zombie:On Vehicle CreateEvent
Called when a new vehicle is created, e.g. when a player places a boat or minecart.
vehicle createcreat(e|ing|ion of) [a] vehicleon vehicle create:vehicle damagedamag(e|ing) [a] vehicleon vehicle damage:On Vehicle DestroyEvent
Called when a vehicle is destroyed. Any passenger will be ejected and the vehicle might drop some item(s).
vehicle destroydestr(oy[ing]|uction of) [a] vehicleon vehicle destroy: cancel eventOn Vehicle EnterEvent
Called when an entity enters a vehicle, either deliberately (players) or by falling into them (mobs).
vehicle enterenter[ing] [a] vehicleon vehicle enter: entity is a player cancel eventvehicle exitexit[ing] [a] vehicleon vehicle exit: if event-entity is a spider: kill event-entityOn Vehicle MoveEvent
Called when a vehicle moves. Please note that using this event can cause lag if there are multiple vehicle entities, i.e. Horse, Pig, Boat, Minecart
vehicle moveon vehicle move: broadcast past event-location broadcast event-locationOn Villager Career ChangeEvent
Called when a villager changes its career. Can be caused by being employed or losing their job.
villager career chang(e[d]|ing)on villager career change: if all: event-career change reason is employment event-villager profession is armorer profession then: cancel eventon weather change:on weather change to sunny:On World Border Bounds ChangeEvent
Called when a world border changes its bounds, either over time, or instantly. This event does not get called for virtual borders.
world[ ]border [bounds] chang(e|ing)on worldborder bounds change: broadcast "The diameter of %event-worldborder% is changing from %past event-number% to %event-number% over the next %event-timespan%On World Border Bounds Finish ChangeEvent
Called when a moving world border has finished its move. This event does not get called for virtual borders.
world[ ]border [bounds] finish chang(e|ing)on worldborder bounds finish change: broadcast "Over the past %event-timespan%, the diameter of %event-worldborder% went from %past event-number% to %event-number%"On World Border Center ChangeEvent
Called when a world border’s center has changed. This event does not get called for virtual borders.
world[ ]border center chang(e|ing)on worldborder center change: broadcast "The center of %event-worldborder% has moved from %past event-location% to %event-location%On World InitEvent
Called when a world is initialized. As all default worlds are initialized before any scripts are loaded, this event is only called for newly created worlds. World management plugins might change the behaviour of this event though.
on world init of "world_the_end":On World LoadEvent
Called when a world is loaded. As with the world init event, this event will not be called for the server’s default world(s).
on world load of "world_nether": broadcast "The world %event-world% has been loaded!"On World SaveEvent
Called when a world is saved to disk. Usually all worlds are saved simultaneously, but world management plugins could change this.
on world save of "world": broadcast "The world %event-world% has been saved"On World UnloadEvent
Called when a world is unloaded. This event will never be called if you don’t have a world management plugin.
on world unload: broadcast "the %event-world% has been unloaded!"On Zombie Break DoorEvent
Called when a zombie is done breaking a wooden door. Can be cancelled to prevent the zombie from breaking the door.
zombie break[ing] [a] [wood[en]] dooron zombie breaking a wood door:On-Screen Kick MessageExpression
The kick message that is displayed on a player’s screen when they are kicked.
[the] on-screen kick messageon kick: set the on-screen kick message to "You've been booted!"Online Player CountExpression
The amount of online players. This can be changed in a server list ping event only to show fake online player amount.
real online player count always return the real count of online players and can’t be changed.
[the] [(real|default)|(fake|shown|displayed)] [online] player (count|amount|number)[the] [(real|default)|(fake|shown|displayed)] (count|amount|number|size) of online playerson server list ping: # This will make the max players count 5 if there are 4 players online. set the fake max players count to (online player count + 1)op the playerdeop all playersopen book player's tool to playerOpen/Close InventoryEffect
Opens an inventory to a player. The player can then access and modify the inventory as if it was a chest that they just opened. Please note that currently ‘show’ and ‘open’ have the same effect, but ‘show’ will eventually show an unmodifiable view of the inventory in the future.
show the victim's inventory to the playeropen the player's inventory for the playeropen the lid of {_chest}close the lid of {_blocks::*}Opened InventoryExpression
Return the currently opened inventory of a player. If no inventory is open, it returns the own player’s crafting inventory.
set slot 1 of player's current inventory to diamond swordOptionsStructure
Options are used for replacing parts of a script with something else. For example, an option may represent a message that appears in multiple locations. Take a look at the example below that showcases this.
optionsoptions: no_permission: You're missing the required permission to execute this command!
command /ping: permission: command.ping permission message: {@no_permission} trigger: message "Pong!"
command /pong: permission: command.pong permission message: {@no_permission} trigger: message "Ping!"if the main gene of last spawned panda is lazy: set the main gene of last spawned panda to playfulif last spawned panda is on its back: make last spawned panda get off its backif last spawned panda is rolling: make last spawned panda stop rollingif last spawned panda is scared:if last spawned panda is sneezing: make last spawned panda stop sneezingParrotEntity Data
[(baby|young)|(adult|grown(-| )up)] parrot[s]parrot (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] red parrot[s]red parrot (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] blue parrot[s]blue parrot (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] green parrot[s]green parrot (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] cyan parrot[s]cyan parrot (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] gray parrot[s]gray parrot (kid[s]|child[ren])ParseExpression
Parses text as a given type, or as a given pattern. This expression can be used in two different ways: One which parses the entire text as a single instance of a type, e.g. as a number, and one that parses the text according to a pattern. If the given text could not be parsed, this expression will return nothing and the parse error will be set if some information is available. Some notes about parsing with a pattern:
- The pattern must be a Skript pattern, e.g. percent signs are used to define where to parse which types, e.g. put a %number% or %items% in the pattern if you expect a number or some items there.
- You have to save the expression’s value in a list variable, e.g.
set {parsed::*} to message parsed as “…”. - The list variable will contain the parsed values from all %types% in the pattern in order. If a type was plural, e.g. %items%, the variable’s value at the respective index will be a list variable, e.g. the values will be stored in {parsed::1::*}, not {parsed::1}.
set {var} to line 1 parsed as numberon chat: set {var::*} to message parsed as "buying %items% for %money%" if parse error is set: message "%parse error%" else if {var::*} is set: cancel event remove {var::2} from the player's balance give {var::1::*} to the playerParse ErrorExpression
The error which caused the last parse operation to fail, which might not be set if a pattern was used and the pattern didn’t match the provided text at all.
[the] [last] [parse] errorset {var} to line 1 parsed as integerif {var} is not set: parse error is set: message "<red>Line 1 is invalid: %last parse error%" else: message "<red>Please put an integer on line 1!"crimson spore particlea glow particlea orange poplar leaves particlesweep attack particlesculk soul particlea gust particlea sweep attack particlenoxious gas cloudsenchanting particledamage indicator particlea dripping honey particlebubble pop particlecampfire cosy smoke particledust plume particlessplash particledripstone dripping lava particlewarped spore particlesculk charge pop particlea pause mob growth particlean enchanted hit particleenchanted hit particlea warped spore particleinfested particlesfirefly particleexplosion particlespause mob growth particlesa vault connection particlea sulfur cube jump particlesmall gust particlesenchanting particlesominous spawning particleswhite smoke particlean explosion emitter particlesulfur cube goo particlecomposter particleominous trial spawner detection particlea raid omen particlea dripstone dripping lava particleunderwater particlesa nausea gas particlea portal particlea lava particlea downward current particlepoof particledamage indicator particlesan explosion particlea yellow poplar leaves particlenausea gas particlefalling honey particlea falling water particlecrimson spore particlespale oak leaves particlesa white ash particlebubble column particlessmoke particledolphin particlenausea gas cloud particlefalling dripstone water particlea trial omen particlea falling dripstone lava particlea dripping obsidian tear particletrial spawner detection particlea sculk soul particlea bubble pop particlea falling honey particlefalling dripstone water particlesa falling lava particleexplosion particlea splash particlea falling dripstone water particlesnowball item particlesa happy villager particlenote particlea large smoke particlea crit particlefishing particlesportal particleheart particlesnoxious gas particlesa reset mob growth particlea dripping water particlean end rod particlelava particlesa ominous trial spawner detection particlespore blossom air particlenautilus particlea landing lava particlefalling water particlesa noxious gas particlecampfire signal smoke particlessulfur cube goo particleshappy villager particlewax on particlessonic boom particlesa trial spawner detection particlelanding honey particletrial omen particlerain particlesmall gust emitter particlesscrape particledripstone dripping water particlesan enchanting particlefalling obsidian tear particlesspore blossom air particlesdripstone dripping lava particlesfirefly particlescloud particlesan snowball item particlea spit particlelanding obsidian tear particleyellow poplar leaves particlesan infested particleportal particlesa soul particleraid omen particlesa sulfur cube jumping particlewitch particlesegg crack particlesglow squid ink particlesred poplar leaves particlesrain particlesfishing particleenchanted hit particlesa falling nectar particlea dripping lava particlea pale oak leaves particlea rain particleegg crack particlereset mob growth particlepale oak leaves particleslime item particlesa landing honey particlesplash particlesfalling honey particlesdripping honey particlenoxious gas clouda copper flame particlecopper flame particleflame particlecobweb item particleslanding obsidian tear particleswhite smoke particleslarge gust emitter particlesheart particlespit particlesdolphin particlesfalling dripstone lava particlestrial omen particlessulfur bubble column particlebubble column particleexplosion emitter particlefirework particlelanding honey particlesa smoke particlemycelium particlessulfur cube jump particlesa cherry leaves particleend rod particlesominous trial spawner detection particlesan electric spark particlesweep attack particlesan slime item particlewarped spore particlesan angry villager particlesmall flame particlea sulfur cube goo particleend rod particlea wax on particlefirework particleselder guardian particlelanding lava particleglow particlemycelium particletrial spawner detection particlesgust particlefalling spore blossom particlecherry leaves particlesa crimson spore particlewax off particlessulfur bubble column particleslava particlesulfur cube jumping particlespoof particlesdripping obsidian tear particlesdripping water particlea falling obsidian tear particlea nautilus particlea damage indicator particledripstone dripping water particlewhite ash particlescampfire cosy smoke particlesreverse portal particleselder guardian particlessmoke particlesnausea gas cloud particleslarge smoke particlesmall flame particlesdripping honey particlesan ash particlepause mob growth particlecomposter particlesa bubble particlesnowflake particleinfested particleangry villager particlean elder guardian particlea small gust particlecrit particlespit particlenautilus particlesfalling obsidian tear particlecherry leaves particlesulfur bubbles particlea campfire signal smoke particledownward current particleglow particlesvault connection particletotem of undying particlessneeze particlessmall gust particleominous spawning particledripping water particlesa dripstone dripping water particlea wax off particlesulfur cube jump particlesculk charge pop particleslarge gust emitter particleunderwater particlereset mob growth particlesfalling nectar particlea sonic boom particlean cobweb item particlea sneeze particlecampfire signal smoke particlelanding lava particlescloud particleyellow poplar leaves particlehappy villager particlesa spore blossom air particleorange poplar leaves particlewitch particleash particlesa scrape particleash particlea landing obsidian tear particlewax on particlecobweb item particlesmall gust emitter particlebubble pop particlescopper flame particlesfalling lava particlesa sculk charge pop particlenoxious gas particlesulfur cube jumping particlea poof particlescrape particlesa snowflake particlea falling spore blossom particlea dust plume particlea nausea gas cloud particlea heart particlea small gust emitter particledust plume particlea underwater particlebubble particleangry villager particlessnowball item particlered poplar leaves particlesonic boom particlefalling dripstone lava particlea dolphin particlenausea gas particlesdripping lava particleswax off particlefalling nectar particlesa flame particledripping obsidian tear particleelectric spark particlea sulfur bubbles particleelectric spark particlesbubble particlesorange poplar leaves particlesa large gust emitter particlea firework particlefalling spore blossom particlessoul particlesa white smoke particledripping lava particlea note particlea glow squid ink particlea red poplar leaves particlenote particlesraid omen particleflame particlesexplosion emitter particlesdownward current particlessoul fire flame particlean ominous spawning particlelarge smoke particlesglow squid ink particlesulfur bubbles particlesreverse portal particlecrit particlesfalling lava particlea noxious gas clouda soul fire flame particlea bubble column particlesoul fire flame particlesa fishing particlean egg crack particlesculk soul particlessquid ink particlea squid ink particletotem of undying particlea small flame particlefalling water particlesneeze particlewhite ash particlea firefly particlea cloud particlea reverse portal particleslime item particlesquid ink particlesa sulfur bubble column particlevault connection particlesa totem of undying particlesoul particlea composter particlea mycelium particlea witch particlea campfire cosy smoke particlesnowflake particlesgust particlesParticle CountExpression
Sets how many particles to draw. Particle count has an influence on how the ‘offset’ and ‘extra’ values of a particle apply. Offsets are treated as distributions if particle count is greater than 0. Offsets are treated as velocity or some other special behavior if particle count is 0.
This means that setting the particle count may change how your particle behaves. Be careful!
More detailed information on particle behavior can be found at Paper’s particle documentation.
draw 7 blue dust particles at playerParticle DistributionExpression
Determines the normal distribution that particles may be drawn within. The distribution is defined by a vector of x, y, and z standard deviations.
Particles will be randomly drawn based on these values, clustering towards the center. 68% of particles will be within 1 standard deviation, 95% within 2, and 99.7% within three. The area the particles will spawn in can be roughly estimated as being within 2 times the standard deviation in each axis.
For example, a distribution of 1, 2, and 1 would spawn particles within roughly 2 blocks on the x and z axes, and within 4 blocks on the y axis.
Please note that distributions only take effect if the particle count is greater than 0! Particles with counts of 0 do not have distributions. If the particle count is 0, the offset is treated differently depending on the particle.
More detailed information on particle behavior can be found at Paper’s particle documentation.
set the particle distribution of {_my-particle} to vector(1, 2, 1)Particle OffsetExpression
Determines the offset value for a particle. Offsets are treated as distributions if particle count is greater than 0. Offsets are treated as velocity or some other special behavior if particle count is 0. Setting distribution/velocity with this method may change the particle count to 1/0 respectively.
More detailed information on particle behavior can be found at Paper’s particle documentation.
set the particle offset of {_my-particle} to vector(1, 2, 1)Particle Speed/Extra ValueExpression
Determines the specific ‘speed’ or ‘extra’ value of a particle. This value is used in different ways depending on the particle, but in general it:
- acts as the speed at which the particle moves if the particle count is greater than 0.
- acts as a multiplier to the particle’s offset if the particle count is 0.
More detailed information on particle behavior can be found at Paper’s particle documentation.
set the extra value of {_my-flame-particle} to 2set the particle speed of {_my-flame-particle} to 0Particle with Offset/Distribution/VelocityExpression
Applies a specific offset to a particle. Offsets are treated as distributions if particle count is greater than 0. Offsets are treated as velocity or some other special behavior if particle count is 0. Setting distribution/velocity with this method may change the particle count to 1/0 respectively.
More detailed information on particle behavior can be found at Paper’s particle documentation.
draw an electric spark particle with a velocity of vector(1,2,3) at playerdraw 12 red dust particles with a distribution of vector(1,2,1) at player's head locationParticle with Speed/Extra ValueExpression
Applies a specific ‘speed’ or ‘extra’ value to a particle. This value is used in different ways depending on the particle, but in general it:
- acts as the speed at which the particle moves if the particle count is greater than 0.
- acts as a multiplier to the particle’s offset if the particle count is 0.
More detailed information on particle behavior can be found at Paper’s particle documentation.
draw an electric spark particle with a particle speed of 0 at playerdraw 12 red dust particles with an extra value of 0.4 at player's head locationParticles with DataExpression
Creates particles that require some extra information, such as colors, locations, or block data. Particles not present here do not require data and can be found in the Particle type. Data requirements vary from version to version, so these docs are only accurate for the most recent Minecraft version at time of release. For example, between 1.21.8 and 1.21.9, the ‘flash’ particle became colourable and now requires a colour data.
set {blood-effect} to a red dust particle of size 1draw 3 blue trail particles moving to player's target over 3 seconds at playerPassengerExpression
The passenger of a vehicle, or the rider of a mob. For 1.11.2 and above, it returns a list of passengers and you can use all changers in it. See also: vehicle
passengers of the minecart contains a creeper or a cowthe boat's passenger contains a pigadd a cow and a zombie to passengers of last spawned boatset passengers of player's vehicle to a pig and a horseremove all pigs from player's vehicleclear passengers of boatPathfindEffect
Make an entity pathfind towards a location or another entity. Not all entities can pathfind. If the pathfinding target is another entity, the entities may or may not continuously follow the target.
make all creepers pathfind towards playermake all cows stop pathfindingmake event-entity pathfind towards player at speed 1Pathfinding Target EntityExpression
The target entity that another entity is pathfinding towards in a pathfinding event.
[the] path[ ]finding target [entity]on pathfind: if the pathfinding target entity is a villager: broadcast "I suspect a zombie is going towards a villager right now.."[the] path[ ]finding target locationon pathfind: if the pathfinding target location is within radius 5 of {mylocation}: broadcast "A mob tried to pathfind near a forbidden location!" cancel eventset damage to 10% of victim's healthset damage to 125 percent of damageset {_result} to {_percent} percent of 999set {_result::*} to 10% of {_numbers::*}set experience to 50% of player's total experienceevery 2 seconds:every minecraft hour:every tick: # can cause lag depending on the code inside the eventevery minecraft days:every 2 seconds in "world":every minecraft hour in "flatworld":every tick in "world": # can cause lag depending on the code inside the eventevery minecraft days in "plots":permutationsFunction
Get the number of possible ordered arrangements from 1 to ‘options’ with each arrangement having a size equal to ‘selected’ For example, permutations with 3 options and an arrangement size of 1, returns 3: (1), (2), (3) Permutations with 3 options and an arrangement size of 2 returns 6: (1, 2), (1, 3), (2, 1), (2, 3), (3, 1), (3, 2) Note that the bigger the ‘options’ and lower the ‘selected’ may result in approximations or even infinity values. Permutations differ from combinations in that permutations account for the arrangement of elements within the set, whereas combinations focus on unique sets and ignore the order of elements. Example: (1, 2) and (2, 1) are two distinct permutations because the positions of ‘1’ and ‘2’ are different, but they represent a single combination since order doesn’t matter in combinations.
permutations(10, 2) = 90permutations(10, 4) = 5040permutations(size of {some list::*}, 2)PersistentEffect
Make entities, players, or leaves be persistent. Persistence of entities is whether they are retained through server restarts. Persistence of leaves is whether they should decay when not connected to a log block within 6 meters. Persistence of players is if the player’s playerdata should be saved when they leave the server. Players’ persistence is reset back to ‘true’ when they join the server. Passengers inherit the persistence of their vehicle, meaning a persistent zombie put on a non-persistent chicken will become non-persistent. This does not apply to players. By default, all entities are persistent.
prevent all entities from persistingforce {_leaves} to persistcommand /kickcheater <cheater: player>: permission: op trigger: prevent {_cheater} from persisting kick {_cheater}Persistent Data ValueExpression
Provides access to the ‘persistent data container’ Bukkit provides on many objects. These values are stored on the chunk/world/item/entity directly, like custom NBT, but are much faster and reliable to access. Persistent values natively support numbers and text, but any Skript type that can be saved in a variable can also be stored in PDC via this expression. Lists of objects can also be saved. If you attempt to save invalid types, runtime errors will be thrown.
The names of tags must be valid namespaced keys, i.e. a-z, 0-9, ‘_’, ‘.’, ‘/’, and ‘-’ are the allowed characters. If no namespace is provided, it will default to ‘minecraft’.
set persistent data tag "custom_damage" of player's tool to 10on jump: if data tag "boost" of player's boots is set: push player upwardson shoot: set {_strength} to number data tag "strength" of shooter's tool if {_strength} is set: set number data tag "damage" of projectile to {_strength}
on damage: set {_damage} to data tag "damage" of projectile if {_damage} is set: set damage to {_damage}set {_pet-uuids::*} to list data tag "pets" of player(pi|π)set {_tau} to pi * 2Picked Item/Block/EntityExpression
The item, block, or entity picked by a player using the pick block key (default middle mouse button).
[the] picked (item|block|entity)on player pick item: send "You picked %the picked item%!" to the playerPickup DelayExpression
The amount of time before a dropped item can be picked up by an entity.
drop diamond sword at {_location} without velocityset pickup delay of last dropped item to 5 secondsPig VariantType
Represents the variant of a pig entity. NOTE: Minecraft namespaces are supported, ex: ‘minecraft:warm’.
cold, temperate, warmPingExpression
Pings of players, as Minecraft server knows them. Note that they will almost certainly be different from the ones you’d get from using ICMP echo requests. This expression is only supported on some server software (PaperSpigot).
command /ping <player=%player%>: trigger: send "%arg-1%'s ping is %arg-1's ping%"Plain ItemExpression
A plain item is an item with no modifications. It can be used to convert items to their default state or to match with other default items.
if the player's tool is a plain diamond: # check if player's tool has no modifications send "You are holding a plain diamond!"make last spawned axolotl play deadPlay or Draw an EffectEffect
Plays or draws a specific effect at a location, to a player, or on an entity. Effects can be:
- Particles.
- Game effects, which consist of combinations of particles and sounds, like the bone meal particles, the sound of footsteps on a specific block, or the particles and sound of breaking a splash potion.
- Entity effects, which are particles or animations that are entity-specific and can only be played on a compatible entity. For example, the ravager attack animation can be played with this effect.
All effects vary significantly in availability from version to version, and some may simply not function on your version of Minecraft. Some effects, like the death animation entity effect, may cause client glitches and should be used carefully!
[force] (play|show|draw) %gameeffects/particles% [%directions% %locations%] (for|to) %players% [as %player%](play|show|draw) %gameeffects% [%directions% %locations%] (in|with) [a] [view] (radius|range) [of] %number%draw 2 smoke particles at playerforce draw 10 red dust particles of size 3 for playerplay blue instant splash potion break effect with a view radius of 10play ravager attack animation on player's targetPlay SoundEffect
Plays a sound at given location for everyone or just for given players, or plays a sound to specified players. Both Minecraft sound names and Spigot sound names are supported. Playing resource pack sounds are supported too. The sound category is ‘master’ by default.
When running 1.19+, playing a sound from an entity directly will result in the sound coming from said entity, even while moving. If the sound is custom, a location emitter will follow the entity. Do note that pitch and volume are reflected based on the entity, and Minecraft may not use the values from this syntax.
Minecraft sometimes has a set of sounds under one sound ID that will randomly play. To counter this, you can directly state which seed to use.
Please note that sound names can get changed in any Minecraft or Spigot version, or even removed from Minecraft itself.
play sound "block.note_block.pling"play sound "entity.experience_orb.pickup" with volume 0.5 to the playerplay sound "custom.music.1" in jukebox category at {speakerBlock}play sound "BLOCK_AMETHYST_BLOCK_RESONATE" with seed 1 on target entity for the playerplayerFunction
Returns an online player from their name or UUID, if player is offline function will return nothing. Setting ‘getExactPlayer’ parameter to true will return the player whose name is exactly equal to the provided name instead of returning a player that their name starts with the provided name.
set {_p} to player("Notch") # will return an online player whose name is or starts with 'Notch'set {_p} to player("Notch", true) # will return the only online player whose name is 'Notch'set {_p} to player("069a79f4-44e9-4726-a5be-fca90e38aaf5") # <none> if player is offlinePlayerType
A player. Depending on whether a player is online or offline several actions can be performed with them, though you won’t get any errors when using effects that only work if the player is online (e.g. changing their inventory) on an offline player.
You have two possibilities to use players as command arguments:
The player's display name, as text. Can be set or reset.
A player's account/true name, as text. Cannot be changed.
Parsing an offline player as a player (online) will return nothing (none), for that case you would need to parse as offlineplayer which only returns nothing (none) if player doesn't exist in Minecraft databases (name not taken) otherwise it will return the player regardless of their online status.set {_p} to "Notch" parsed as a player # returns <none> unless Notch is actually online or starts with Notch like Notchanset {_p} to "N" parsed as a player # returns Notch if Notch is online because their name starts with 'N' (case insensitive) however, it would return nothing if no player whose name starts with 'N' is online.Player Chat CompletionsExpression
The custom chat completion suggestions. You can add, set, remove, and clear them. Removing the names of online players with this expression is ineffective. This expression will not return anything due to Bukkit limitations.
add "Skript" and "Njol" to chat completions of all playersremove "text" from {_p}'s chat completionsclear player's chat completionsPlayer Info VisibilityEffect
Sets whether all player related information is hidden in the server list. The Vanilla Minecraft client will display ??? (dark gray) instead of player counts and will not show the hover hist when hiding player info. The version string can override the ???. Also the Online Players Count and Max Players expressions will return -1 when hiding player info.
hide [all] player [related] info[rmation] [(in|on|from) [the] server list](show|reveal) [all] player [related] info[rmation] [(in|to|on|from) [the] server list]hide player infohide player related information in the server listreveal all player related infoPlayer Input KeysExpression
Get the current input keys of a player.
broadcast "%player% is pressing %current input keys of player%"Player List Header and FooterExpression
The message above and below the player list in the tab menu.
set all players' tab list header to "Welcome to the Server!"send "%the player's tab list header%" to playerreset all players' tab list headerPlayer List NameExpression
The name of a player in the player list in the tab menu.
on join: player has permission "name.red" set the player's tab list name to "<red>%player's name%"Player List PriorityExpression
The priority of the player in the player list in the tab menu. Used to sort players on the tab list. Lowest priority is at the bottom of tab and highest priority is at the top. If 2 players have same priority then they will be sorted A-Z (but still be above those with lower priority).
on join: player has permission "group.mod" set the player's tab list priority to 5Player Protocol VersionExpression
Player’s protocol version. For more information and list of protocol versions visit wiki.vg.
command /protocolversion <player>: trigger: send "Protocol version of %arg-1%: %protocol version of arg-1%"Player SkullExpression
Gets a skull item representing a player. Skulls for other entities are provided by the aliases.
give the victim's skull to the attackerset the block at the entity to the entity's skullPoison/CureEffect
Poison or cure an entity. If the entity is already poisoned, the duration may be overwritten.
poison the playerpoison the victim for 20 secondscure the player from of poison[the] portal['s] blocks[the] blocks of [the] portalon portal creation: loop portal blocks: broadcast "%loop-block% is part of a portal!"Portal CooldownExpression
The amount of time before an entity can use a portal. By default, it is 15 seconds after exiting a nether portal or end gateway. Players in survival/adventure get a cooldown of 0.5 seconds, while those in creative get no cooldown. Resetting will set the cooldown back to the default 15 seconds for non-player entities and 0.5 seconds for players.
on portal: wait 1 tick set portal cooldown of event-entity to 5 secondsspeed of tier 1 for 10 secondsPotion Effect - AmbientEffect
Modify whether a potion effect is ambient. That is, whether the potion effect produces more, translucent, particles.
make the player's potion effects ambientPotion Effect - AmplifierExpression
An expression to obtain the amplifier of a potion effect.
set the amplifier of {_potion} to 10add 10 to the amplifier of the player's speed effectPotion Effect - DurationExpression
An expression to obtain the duration of a potion effect.
set the duration of {_potion} to 10 secondsadd 10 seconds to the duration of the player's speed effecton entity potion effect modification: if the potion effect has an icon: hide the icon of event-potioneffecttype for event-entityon entity potion effect modification: if the potion effect has particles: hide the particles of event-potioneffecttype for event-entityhide the icon for the player's potion effectsPotion Effect - InfiniteEffect
Modify whether a potion effect is infinite. That is, whether the potion effect will ever expire.
make the player's potion effects infinitePotion Effect - Is AmbientCondition
Checks whether a potion effect is ambient. That is, whether the potion effect produces more, translucent, particles.
on entity potion effect modification: if the potion effect is ambient: message "It's particle time!"hide the particles for the player's potion effectsPotion Effect Event ActionType
Represents the action being performed in an ‘entity potion effect’ event. ‘added’ indicates the entity does not already have a potion effect of the event potion effect type. ‘changed’ indicates the entity already has a potion effect of the event potion effect type, but some property about the potion effect is changing. ‘cleared’ indicates that the effect is being removed because all of the entity’s effects are being removed. ‘removed’ indicates that the event potion effect type has been specifically removed from the entity.
add, removed, added, change, clear, removal, cleared, remove, changedon entity potion effect: if the event-potion effect action is removal: message "One of your existing potion effects was removed!"Potion Effect Event CauseType
Represents the cause of an ‘entity potion effect’ event. For example, an arrow hitting an entity or a command being executed.
patrol captain, axolotl, death, removal by resurrection, beacon effect, potion drunk, illusion, unknown, drinking potion, expired, pillager captain, attack, villager trade, spawned spider, wither rose infliction, conversion, enter area effect cloud, conduit effect, nautilus, command, food, drinking milk, plugin, converted, spider spawn, splash potion, warden, expiration, potion splash, dolphin boost, arrow infliction, turtle helmet effecton entity potion effect: if the event-potion effect cause is arrow affliction: message "You were hit by a tipped arrow!"Potion Effect of Entity/ItemExpression
An expression to obtain a specific potion effect type of an entity or item. When an entity is affected by a potion effect but already has a weaker version of that effect type, the weaker version becomes hidden. If the weaker version has a longer duration, it returns after the stronger version expires. NOTE: Hidden effects are not able to be changed.
[the] [active|hidden|(active and hidden|hidden and active)] %potioneffecttypes% [potion] effect[s] of %entities/itemtypes%%entities/itemtypes%'[s] [active|hidden|(active and hidden|hidden and active)] %potioneffecttypes% [potion] effect[s]set {_effect} to the player's active speed effectadd 10 seconds to the player's slowness effectclear the player's hidden strength effectsreset the player's weakness effectsdelete the player's active jump boost effectabsorption, bad luck, bad omen, blindness, breath of the nautilus, conduit power, confusion, damage, damage resistance, darkness, dolphin's grace, dolphins grace, fast digging, fast mining, fire immunity, fire resistance, floating, glowing, haste, health, health boost, hero of the village, hunger, increase damage, increased damage, infested, instant damage, instant health, invisibility, jump, jump boost, levitation, luck, max health boost, maximum health boost, mining fatigue, nausea, night vision, oozing, poison, raid omen, reduce damage, reduced damage, regeneration, resistance, saturation, slow, slow digging, slow fall, slow falling, slow mining, slowness, speed, strength, swiftness, trial omen, unluck, water breathing, weakness, weaving, wind charged, wither, wither effect, wither potion effectapply swiftness 5 to the playerapply potion of speed 2 to the player for 60 secondsremove invisibility from the victimPotion Effect Type - Is InstantCondition
Checks whether a potion effect type is instant. That is, whether the effect happens once/immediately.
if any of the potion effects of the player's tool are instant: message "Use your tool for immediate benefits!"Potion Effect Type CategoryExpression
An expression to obtain the category of a potion effect type. That is, whether the potion effect type is beneficial, harmful, or neutral.
on entity potion effect modification: if the potion effect type category is harmful: message "You have been afflicted with %potion effect type%"Potion Effect Type CategoryType
Represents the type of effect a potion effect type has on an entity.
beneficial, neutral, harmfulPotion Effects of Entity/ItemExpression
An expression to obtain the active or hidden potion effects of an entity or item. When an entity is affected by a potion effect but already has a weaker version of that effect type, the weaker version becomes hidden. If the weaker version has a longer duration, it returns after the stronger version expires. NOTE: Hidden effects are not able to be changed. NOTE: Clearing the base potion effects of a potion item is not possible. If you wish to do so, just set the item to a water bottle.
set {_effects::*} to the active potion effects of the playerclear the player's hidden potion effectsadd the potion effects of the player to the potion effects of the player's toolreset the potion effects of the player's toolremove speed and night vision from the potion effects of the playerPrefix/SuffixExpression
The prefix or suffix as defined in the server’s chat plugin.
on chat: cancel event broadcast "%player's prefix%%player's display name%%player's suffix%: %message%" to the player's worldset the player's prefix to "[<red>Admin<reset>] "clear player's prefixproduct(1) = 1product(2, 3, 4) = 24product({some list variable::*})product(2, {_v::*}, and the player's y-coordinate)set progress of event-bossbar to 75%arrow, fireball, snowball, thrown potion, etc.projectile is a snowballshoot an arrow at speed 5 from the playerProjectile Critical StateExpression
A projectile’s critical state. The only currently accepted projectiles are arrows and tridents.
on shoot: event-projectile is an arrow set projectile critical mode of event-projectile to trueProjectile ForceExpression
Returns the force at which a projectile was shot within an entity shoot bow event.
[the] projectile forceon entity shoot projectile: set the velocity of shooter to vector(0,1,0) * projectile forceProtocol VersionExpression
The protocol version that will be sent as the protocol version of the server in a server list ping event. For more information and list of protocol versions visit wiki.vg. If this protocol version doesn’t match with the protocol version of the client, the client will see the version string. But please note that, this expression has no visual effect over the version string. For example if the server uses PaperSpigot 1.12.2, and you make the protocol version 107 (1.9), the version string will not be “Paper 1.9”, it will still be “Paper 1.12.2”. But then you can customize the version string as you wish. Also if the protocol version of the player is higher than protocol version of the server, it will say “Server out of date!”, and if vice-versa “Client out of date!” when you hover on the ping bars.
This can be set in a server list ping event only (increase and decrease effects cannot be used because that wouldn’t make sense).
[the] [server] [sent|required|fake] protocol version [number]on server list ping: set the version string to "<light green>Version: <orange>%minecraft version%" set the protocol version to 0 # 13w41a (1.7) - so the player will see the custom version string almost alwaysPushEffect
Push entities in a given direction or towards a specific location.
push the player upwardspush the victim downwards at speed 0.5push player towards player's target at speed 2pull player along vector(1,1,1) at speed 1.5enable PvP #(current world only)disable PvP in all worldsPvP is enabledPvP is disabled in "world"set {queue} to a new queueadd "hello" to {queue}broadcast the 1st element of {queue}Queue (Experimental)Expression
Requires the using queues experimental feature flag to be enabled.
Creates a new queue. A queue is a set of elements that can have things removed from the start and added to the end.
Any value can be added to a queue. Adding a non-existent value (e.g. {variable that isn't set}) will have no effect.
This means that removing an element from the queue will always return a value unless the queue is empty.
Requesting an element from a queue (e.g. the 1st element of {queue}) also removes it from the queue.
set {queue} to a new queueadd "hello" and "there" to {queue}broadcast the first element of {queue} # hellobroadcast the first element of {queue} # there# queue is now emptyset {queue} to a new queue of "hello" and "there"broadcast the last element of {queue} # removes 'there'add "world" to {queue}broadcast the first 2 elements of {queue} # removes 'hello', 'world'Queue Start/End (Experimental)Expression
Requires the using queues experimental feature flag to be enabled.
The first or last element in a queue. Asking for this does not remove the element from the queue.
This is designed for use with the add changer: to add or remove elements from the start or the end of the queue.
set {queue} to a new queueadd "hello" to {queue}add "foo" to the start of {queue}broadcast the first element of {queue} # foobroadcast the first element of {queue} # hello# queue is now emptyQueuesExperiment
A collection that removes elements whenever they are requested. This is useful for processing tasks or keeping track of things that need to happen only once. Queues can be looped over like a regular list.
queuesset {queue} to a new queue of "hello" and "world"
broadcast the first element of {queue}# "hello" is now removed
broadcast the first element of {queue}# "world" is now removed
# queue is emptyset {queue} to a new queue of all players
set {player 1} to a random element out of {queue}set {player 2} to a random element out of {queue}# players 1 and 2 are guaranteed to be distinct[the] (quit|leave|log[ ]out)( |-)messageon quit: if {vanish::%player's uuid%} is set: clear the quit message else: set the quit message to "%player% left this server... they will be missed!"Quit ReasonExpression
The quit reason as to why a player disconnected in a quit event.
[the] (quit|disconnect) (cause|reason)on quit: quit reason was kicked player is banned clear {server::player::%uuid of player%::*}disconnected, erroneous state, kicked, quit, timed out, erroneousRabbitEntity Data
[(baby|young)|(adult|grown(-| )up)] rabbit[s][(baby|young)|(adult|grown(-| )up)] rabbit[s]rabbit [(baby|young)|(adult|grown(-| )up)][s](kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] white rabbit[s]white [(baby|young)|(adult|grown(-| )up)] rabbit[s]white rabbit [(baby|young)|(adult|grown(-| )up)][s]white (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] black rabbit[s]black [(baby|young)|(adult|grown(-| )up)] rabbit[s]black rabbit [(baby|young)|(adult|grown(-| )up)][s]black (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] black [and] white rabbit[s]black [and] white [(baby|young)|(adult|grown(-| )up)] rabbit[s]black [and] white rabbit [(baby|young)|(adult|grown(-| )up)][s]black [and] white (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] brown rabbit[s]brown [(baby|young)|(adult|grown(-| )up)] rabbit[s]brown rabbit [(baby|young)|(adult|grown(-| )up)][s]brown (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] gold rabbit[s]gold [(baby|young)|(adult|grown(-| )up)] rabbit[s]gold rabbit [(baby|young)|(adult|grown(-| )up)][s]gold (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] salt [and] pepper rabbit[s]salt [and] pepper [(baby|young)|(adult|grown(-| )up)] rabbit[s]salt [and] pepper rabbit [(baby|young)|(adult|grown(-| )up)][s]salt [and] pepper (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] killer rabbit[s]killer [(baby|young)|(adult|grown(-| )up)] rabbit[s]killer rabbit [(baby|young)|(adult|grown(-| )up)][s]killer (kid[s]|child[ren])RandomExpression
Gets a random item out of a set, e.g. a random player out of all players online.
give a diamond to a random player out of all playersgive a random item out of all items to the playerRandom CharacterExpression
One or more random characters between two given characters. Use ‘alphanumeric’ if you want only alphanumeric characters. This expression uses the Unicode numerical code of a character to determine which characters are between the two given characters. If strings of more than one character are given, only the first character of each is used.
set {_captcha} to join (5 random characters between "a" and "z") with ""send 3 random alphanumeric characters between "0" and "z"Random NumbersExpression
A given amount of random numbers or integers between two given numbers. Use ‘number’ if you want any number with decimal parts, or use use ‘integer’ if you only want whole numbers.
Please note that the order of the numbers doesn’t matter, i.e. random number between 2 and 1 will work as well as random number between 1 and 2.
set the player's health to a random number between 5 and 10send "You rolled a %random integer from 1 to 6%!" to the playerset {_chances::*} to 5 random integers between 5 and 96set {_decimals::*} to 3 random numbers between 2.7 and -1.5[a] random uuidset {_uuid} to random uuidRaw NameExpression
The raw Minecraft material name of the given item. Note that this is not guaranteed to give same results on all servers.
raw name of tool of playerRaw StringExpression
Returns the string without formatting (colors, decorations, etc.) and without stripping them from it.
For example, raw “&aHello There!” would output &aHello There!
send raw "&aThis text is unformatted!" to all players[the] (readied|selected|drawn) (arrow|bow)on player ready arrow: selected bow's name is "Spectral Bow" if selected arrow is not a spectral arrow: cancel eventRecursiveExpression
Returns all values of an expression, including those in nested structures such as lists of lists.
on load: set {_data::a::b::c} to "value1" set {_data::a::b::d} to "value2" set {_data::a::e} to "value3" set {_data::f} to "value4"
broadcast recursive {_data::*} # broadcasts "value1", "value2", "value3", "value4"
broadcast recursive indices of {_data::*} # broadcasts "a::b::c", "a::b::d", "a::e", "f"Recursive SizeExpression
The recursive size of list. Returns the recursive size of the list with sublists included, e.g.
{list::*} Structure
├──── {list::1}: 1
├──── {list::2}: 2
│ ├──── {list::2::1}: 3
│ │ └──── {list::2::1::1}: 4
│ └──── {list::2::2}: 5
└──── {list::3}: 6
Where using %size of {list::}% will only return 3 (the first layer of indices only), while %recursive size of {list::}% will return 6 (the entire list) Please note that getting a list’s recursive size can cause lag if the list is large, so only use this expression if you need to!
if recursive size of {player-data::*} > 1000:if redstone power of targeted block is 15: send "This block is very powerful!"ReduceExpression
Reduces lists to single values by repeatedly applying an operation. The reduce expression takes each element and combines it with an accumulator value. Use ‘reduced value’ to access the current accumulated value and ‘input’ for the current element.
set {_sum} to {_numbers::*} reduced with [reduced value + input]set {_product} to {_values::*} reduced with [reduced value * input]set {_concatenated} to {_strings::*} reduced with ["%reduced value%%input%"]Reduced ValueExpression
Returns the current accumulated/reduced value within a reduce expression. This represents the result of all previous reduction operations. Can only be used inside the reduce expression’s operation block.
[the] reduced value[the] (accumulator|accumulated) [value][the] folded valueset {_sum} to {_numbers::*} reduced with [reduced value + input]set {_max} to {_values::*} reduced with [reduced value if reduced value > input else input]set {_combined} to {_items::*} reduced with ("%reduced value%, %input%")RegionExpression
The region involved in an event. This expression requires a supported regions plugin to be installed.
[the] [event-]regionon region enter: region is {forbidden region} cancel the eventRegionType
A region of a regions plugin. Skript currently supports WorldGuard, Factions, GriefPrevention and PreciousStones. Please note that some regions plugins do not have named regions, some use numerical ids to identify regions, and some may have regions with the same name in different worlds, thus using regions like “region name” in scripts may or may not work.
"region name"[the] [worldguard] regionon region enter: send "You have entered %region%"region "region" in world("world"Region ContainsCondition
Checks whether a location is contained in a particular region. This condition requires a supported regions plugin to be installed.
player is in the region {regions::3}on region enter: region contains {flags.%world%.red} message "The red flag is near!"Region FlagExpressionskript-worldguard
An expression for working with the flag of a region. The region group flag of a flag supports controlling which groups of a region (i.e., members, owners, etc.) a flag applies to. NOTE: Skript may not support all flags, specifically those representing values Skript cannot understand.
message flag "greeting" of player's regionRegion Members & OwnersExpression
A list of members or owners of a region. This expression requires a supported regions plugin to be installed.
on entering of a region: message "You're entering %region% whose owners are %owners of region%"Region Members/OwnersExpressionskript-worldguard
An expression to obtain the members/owners of the given regions. The members/owners of a region are made up of players and groups (strings). By default, this expression returns both. However, keyword specifiers for each type (player/group) are available.
on region enter: message "You have entered %region%. It is owned by %owners of region%."command /promote <text> <player>: trigger: set {_region} to the region text-argument in the player's world if player-argument is an owner of {_region}: message "<red>%player-argument% is already an owner of %{_region}%" else if player-argument is a member of {_region}: add player to the owners of {_region} message "<green>%player-argument% has been promoted to an owner of %{_region}%" else: add player to the members of {_region} message "<green>%player-argument% has been promoted to a member of %{_region}%"Region ParentExpressionskript-worldguard
An expression to obtain and change the direct parent of a region. It is also possible to obtain all parents of a region (e.g., including a parent region’s parent region). When a region has a parent, it inherits the parents members, owners, and flags (that aren’t defined on the child).
command /setparent <text> <text>: trigger: set the parent of the region text-argument-1 to the region text-argument-2if any of all of the parent regions of {_region} are globalRegion PointsExpressionskript-worldguard
An expression to obtain the points of a region. Note that when obtaining the points of a region, the region itself is projected onto an X-Z plane. Thus, the points do not have a y-component. However, for simplicity, the y-component of the minimum point is used.
command /highlight-points <text>: trigger: set the blocks at the points of the region text-argument to red woolRegion PriorityExpressionskript-worldguard
An expression to obtain and change the priority of a region. When regions overlap, the priority is used to determine properties such as membership, ability to build, and flag values.
function get_highest_priority_region(location: location) returns worldguard region: set {_regions::*} to the regions at {_location} sort {_regions::*} in descending order by priority of input return {_regions::1}RegionsExpressionskript-worldguard
An expression to obtain all regions of a specific world or the region with a specific name in a world. Please note that region names (IDs) are case insensitive.
the region "region" in world("world"all of the regions in the player's worldRegions AtExpression
All regions at a particular location. This expression requires a supported regions plugin to be installed.
On click on a sign: line 1 of the clicked block is "[region info]" set {_regions::*} to regions at the clicked block if {_regions::*} is empty: message "No regions exist at this sign." else: message "Regions containing this sign: <gold>%{_regions::*}%<r>."Regions AtExpressionskript-worldguard
An expression to obtain the regions at a specific location. Note that the regions will be returned in ascending order by priority.
on right click: the clicked block is tagged with minecraft tag "all_signs" line 1 of the clicked block is "[Region Info]" set {_regions::*} to the regions at the clicked block if {_regions::*} is not set: message "No regions exist at this sign." else: message "You are in: %{_regions::*}%."Register TagEffect
Registers a new tag containing either items or entity datas. Note that items will NOT keep any information other than their type, so adding diamond sword named "test" to a tag is the same as adding diamond sword
Item tags should be used for contexts where the item is not placed down, while block tags should be used for contexts where the item is placed. For example, and item tag could be “skript:edible”, while a block tag would be “skript:needs_water_above”.
All custom tags will be given the namespace “skript”, followed by the name you give it. The name must only include the characters A to Z, 0 to 9, and ‘/’, ‘.’, ‘_’, and ‘-’. Otherwise, the tag will not register.
Please note that two tags can share a name if they are of different types. Registering a new tag of the same name and type will overwrite the existing tag. Tags will reset on server shutdown.
register [a[n]] [custom] (item|block|entity [type]) tag named %string% (containing|using) %entitydatas/itemtypes%register a new custom entity tag named "fish" using cod, salmon, tropical fish, and pufferfishregister an item tag named "skript:wasp_weapons/swords" containing diamond sword and netherite swordregister block tag named "pokey" containing sweet berry bush and bamboo saplingon player move: block at player is tagged as tag "skript:pokey" damage the player by 1 heartRelease From Entity StorageEffect
Releases the stored entities in an entity block storage (i.e. beehive). When using beehives, providing a timespan will prevent the released bees from re-entering the beehive for that amount of time. Due to unstable behaviour on older versions, this effect requires Minecraft version 1.21+.
release the stored entities of {_beehive}release the entity storage of {_hive} for 5 secondsRemaining AirExpression
How much time a player has left underwater before starting to drown.
if the player's remaining air is less than 3 seconds: send "hurry, get to the surface!" to the playerbroadcast nl and nl repeated 200 timesbroadcast "Hello World " repeated 5 timesif "aa" repeated 2 times is "aaaa": broadcast "Ahhhh" repeated 100 timesReplaceEffect
Replaces all occurrences of a given text or regex with another text. Please note that you can only change variables and a few expressions, e.g. a message or a line of a sign.
replace "<item>" in {_msg} with "[%name of player's tool%]"replace every "&" with "§" in line 1 of targeted block# Very simple chat censoron chat: replace all "idiot" and "noob" with "****" in the message regex replace "\b(idiot|noob)\b" with "****" in the message # Regex version using word boundaries for better resultsreplace all stone and dirt in player's inventory and player's top inventory with diamondResolve Text ComponentExpression
Resolves a component with the context of a command sender or other entity. Certain kinds of components, such as NBT components, Score components, and Selector components, are required to be resolved to display a proper output. Note that the option to bypass required permissions only applies for players.
send formatted "Hello <selector:@e[limit=5]>, I'm <selector:@s>!" resolved for playerResonating TimeExpression
Returns the resonating time of a bell. A bell will start resonating five game ticks after being rung, and will continue to resonate for 40 game ticks.
broadcast "The bell has been resonating for %resonating time of target block%"Resource PackCondition
Checks state of the resource pack in a resource pack request response event.
on resource pack response: if the resource pack wasn't accepted: kick the player due to "You have to install the resource pack to play in this server!"discarded, refused, rejected, failed reload, accepted, failed, failed to reload, failed to download, downloaded, successfully loaded, accept, fail, successfully load, refuse, declined, successfully install, success, reject, decline, successfully installed, download fail, invalid urlRespawn Anchor ChargesExpression
The charges of a respawn anchor.
set the charges of event-block to 3Respawn LocationExpression
The location that a player should respawn at. This is used within the respawn event.
[the] respawn locationon respawn: set respawn location to {example::spawn}[the] respawn[ing] reasonon respawn: if respawn reason is end portal: broadcast "%player% took the end portal to the overworld!"death, plugin, end portalResultExpression
Runs something (like a function) and returns its result. If the thing is expected to return multiple values, use ‘results’ instead of ‘result’.
set {_function} to the function named "myFunction"set {_result} to the result of {_function}set {_list::*} to the results of {_function}set {_result} to the result of {_function} with arguments 13 and trueReturnEffect
Makes a trigger or a section (e.g. a function) return a value
function double(i: number) :: number: return 2 * {_i}function divide(i: number) returns number: return {_i} / 2set {_list::*} to reversed {_list::*}Ring BellEffect
Causes a bell to ring. Optionally, the entity that rang the bell and the direction the bell should ring can be specified. A bell can only ring in two directions, and the direction is determined by which way the bell is facing. By default, the bell will ring in the direction it is facing.
make player ring target-blockRinging TimeExpression
Returns the ringing time of a bell. A bell typically rings for 50 game ticks.
broadcast "The bell has been ringing for %ringing time of target block%"root(2, 4) = 2 # same as sqrt(4)root(4, 16) = 2root(-4, 16) = 0.5 # same as 16^(-1/4)RotateEffect
Rotates displays, quaternions, or vectors around an axis a set amount of degrees, or around all 3 axes at once. Vectors can only be rotated around the global X/Y/Z axes, or an arbitrary vector axis. Quaternions are more flexible, allowing rotation around the global or local X/Y/Z axes, arbitrary vectors, or all 3 local axes at once. Global axes are the ones in the Minecraft world. Local axes are relative to how the quaternion is already oriented.
Rotating a display is a shortcut for rotating its left rotation. If the right rotation needs to be modified, it should be acquired, rotated, and re-set.
Note that rotating a quaternion/display around a vector results in a rotation around the local vector, so results may not be what you expect. For example, rotating quaternions/displays around vector(1, 0, 0) is the same as rotating around the local X axis. The same applies to rotations by all three axes at once. In addition, rotating around all three axes of a quaternion/display at once will rotate in ZYX order, meaning the Z rotation will be applied first and the X rotation last.
rotate {_quaternion} around x axis by 10 degreesrotate last spawned block display around y axis by 10 degreesrotate {_vector} around vector(1, 1, 1) by 45rotate {_quaternion} by x 45, y 90, z 135Rotated Quaternion/VectorExpression
Rotates a quaternion or vector around an axis a set amount of degrees, or around all 3 axes at once. Vectors can only be rotated around the global X/Y/Z axes, or an arbitrary vector axis. Quaternions are more flexible, allowing rotation around the global or local X/Y/Z axes, arbitrary vectors, or all 3 local axes at once. Global axes are the ones in the Minecraft world. Local axes are relative to how the quaternion is already oriented.
Note that rotating a quaternion around a vector results in a rotation around the local vector, so results may not be what you expect. For example, rotating around vector(1, 0, 0) is the same as rotating around the local X axis. The same applies to rotations by all three axes at once. In addition, rotating around all three axes of a quaternion/display at once will rotate in ZYX order, meaning the Z rotation will be applied first and the X rotation last.
set {_new} to {_quaternion} rotated around x axis by 10 degreesset {_new} to {_vector} rotated around vector(1, 1, 1) by 45set {_new} to {_quaternion} rotated by x 45, y 90, z 135Rotation Axis/AngleExpression
Returns the axis or angle that a quaternion will rotate by/around. All quaternions can be represented by a rotation of some amount around some axis, so this expression provides the ability to get that angle/axis.
set {_quaternion} to axisAngle(45, vector(1, 2, 3))send rotation axis of {_quaternion} # 1, 2, 3send rotation angle of {_quaternion} # 45set rotation angle of {_quaternion} to 135set rotation axis of {_quaternion} to vector(0, 1, 0)roundFunction
Rounds a number, i.e. returns the closest integer to the argument. Place a second argument to define the decimal placement.
round(2.34) = 2round(2) = 2round(2.99) = 3round(2.5) = 3RoundingExpression
Rounds numbers normally, up (ceiling) or down (floor) respectively.
set {var} to rounded health of playerset line 1 of the block to "%rounded (1.5 * player's level)%"add rounded down argument to the player's healthRunEffect
Executes a task (a function). Any returned result is discarded.
set {_function} to the function named "myFunction"run {_function}run {_function} with arguments {_things::*}running minecraft "1.14"Runtime Error CatchingExperiment
A new catch runtime errors section allows you to catch and suppress runtime errors within it and access them later with the last caught runtime errors.
error catching [section]catch runtime errors: ... set worldborder center of {_border} to {_my unsafe location} ...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)SaturationExpression
The saturation of a player. If used in a player event, it can be omitted and will default to event-player.
set saturation of player to 20Save WorldEffect
Save all worlds or a given world manually. Note: saving many worlds at once may possibly cause the server to freeze.
save "world_nether"save all worldsScaleExpression
Represents the physical size/scale of something. For example, the scale of a display entity would be a vector containing multipliers on its size in the x, y, and z axis. For a particle effect like the sweeping edge particle, scale is a number determining how large the particle should be.
set the scale of {_display} to vector(0,2,0)set the scale of {_particle} to 1.5Scoreboard TagsExpression
Scoreboard tags are simple list of texts stored directly in the data of an entity. So this is a Minecraft related thing, not Bukkit, so the tags will not get removed when the server stops. You can visit visit Minecraft Wiki for more info. This is changeable and valid for any type of entity. Also you can use use the Has Scoreboard Tag condition to check whether an entity has the given tags.
Requires Minecraft 1.11+ (actually added in 1.9 to the game, but added in 1.11 to Spigot).
on spawn of a monster: if the spawn reason is mob spawner: add "spawned by a spawner" to the scoreboard tags of event-entity
on death of a monster: if the attacker is a player: if the victim doesn't have the scoreboard tag "spawned by a spawner": add 1$ to attacker's balanceScriptExpression
The current script, or a script from its (file) name. If the script is enabled or disabled (or reloaded) this reference will become invalid. Therefore, it is recommended to obtain a script reference when needed.
on script load: broadcast "Loaded %the current script%"on script load: set {running::%script%} to trueon script unload: set {running::%script%} to falseset {script} to the script named "weather.sk"loop the scripts in directory "quests/": enable loop-valueScriptType
A script loaded by Skript. Disabled scripts will report as being empty since their content has not been loaded.
A script's name, as text. If the experiment 'Script Reflection' is enabled, this will return the resolved name of the script, otherwise it returns the file name with path relative to the scripts folder. Cannot be changed.
the current scriptScript Command Cooldown InformationExpression
Only usable in script commands. Represents the cooldown time, the cooldown bypass permission, the remaining cooldown time, the elapsed cooldown time.
[the] ((cooldown|wait) time|[wait] time of [the] (cooldown|wait) [(of|for) [the] [current] command])[the] [cooldown] bypass perm[ission] [of [the] (cooldown|wait) [(of|for) [the] [current] command]][the] remaining [time] [of [the] (cooldown|wait) [(of|for) [the] [current] command]][the] elapsed [time] [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%}Script Command Suggestion Filtering ModeEffect
Controls how suggestions are filtered for script commands. With no filtering, suggestions are simply displayed as set. With ‘starts with’ filtering, only suggestions that start with the current input are displayed. With ‘contains’ filtering, only suggestions that contain the current input are displayed.
command /message <player> <text>: suggestions: player argument is set # they are writing the text argument if the current input contains "frick": set the suggestions for the text argument to "Keep your messages nice please!" disable filtering for the text argument's suggestions trigger: send "<grey><italic>%player% -> You: %text argument%" to player argument send "<grey><italic>You -> %player argument%: %text argument%" to playerScript Command Suggestion InputExpression
Usable in a script command’s “suggestions” entry. This provides information including the full content of what the player has typed so far, what they have typed as part of the current argument, and at what position within the full content the current argument starts (starting from 1).
[the] [command] [suggestion|tab completion] (full|complete) input[the] [command] [suggestion|tab completion] (current|arg[ument]) input[the] [command] [suggestion|tab completion] (current|arg[ument]) input [start[ing]] (position|index)command /message <player> <text>: suggestions: player argument is set # they are writing the text argument if the current input contains "frick": set the suggestions for the text argument to "Keep your messages nice please!" disable filtering for the text argument's suggestions trigger: send "<grey><italic>%player% -> You: %text argument%" to player argument send "<grey><italic>You -> %player argument%: %text argument%" to playerScript Command SuggestionsExpression
Usable in a script command’s “suggestions” entry. Allows modifying the suggestions displayed while a command is being typed.
command /menu <text> <text>: suggestions: if arg-1 is not set: set arg-1's suggestions to "Appetizers", "Entrees", and "Desserts" else if arg-1 is "Appetizers": set arg-2's suggestions to "Salads", "Breads", and "Fried Delights" else if arg-1 is "Entrees": set arg-2's suggestions to "Pastas", "Handhelds", and "Pizzas" else if arg-1 is "Desserts": set arg-2's suggestions to "Cakes", "Ice Creams", and "Pies" trigger: send "Yum!"command /home: subcommand set <name: text>: trigger: set {homes::%player%::%{_name}%} to the player's location subcommand <name: text>: suggestions: loop {homes::%player%::*}: add formatted "<ttp:'Location: %loop-value%'>%loop-index%" to the suggestions for the text argument trigger: teleport the player to {homes::%player%::%{_name}%}Script ReflectionExperiment
This feature includes:
- The ability to reference a script in code.
- Finding and running functions by name.
- Reading configuration files and values.
[script] reflectionsend "The sea level in your world is %sea level in player's world%"Sea PicklesExpression
An expression to obtain or modify data relating to the pickles of a sea pickle block.
on block break: type of block is sea pickle send "Wow! This stack of sea pickles contained %event-block's sea pickle count% pickles!" send "It could've contained a maximum of %event-block's maximum sea pickle count% pickles!" send "It had to have contained at least %event-block's minimum sea pickle count% pickles!" cancel event set event-block's sea pickle count to event-block's maximum sea pickle count send "This bad boy is going to hold so many pickles now!!"Seed of Loot TableExpression
Returns the seed of a loot table. Setting the seed of a block or entity that does not have a loot table will not do anything.
set {_seed} loot table seed of blockset loot table seed of entity to 123456789Send Block ChangeEffect
Makes a player see a block as something else or as the original.
make player see block at player as dirtmake player see player's target block as campfire[facing=south]make all players see (blocks in radius 5 of location(0, 0, 0)) as bedrockmake all players see (blocks in radius 5 of location(0, 0, 0)) as originalSend Resource PackEffect
Request that the player’s client download and switch resource packs. The client will download the resource pack in the background, and will automatically switch to it once the download is complete. The URL must be a direct download link.
The hash is used for caching, the player won’t have to re-download the resource pack that way. The hash must be SHA-1, you can get SHA-1 hash of your resource pack using this online tool.
The resource pack request action can be used to check status of the sent resource pack request.
on join: send the resource pack from "URL" with hash "hash" to the playerSent Command ListExpression
The commands that will be sent to the player in a send commands to player event. Modifications will affect what commands show up for the player to tab complete. They will not affect what commands the player can actually run. Adding new commands to the list is illegal behavior and will be ignored.
[the] [sent] [server] command[s] liston send command list: set command list to command list where [input does not contain ":"] remove "help" from command listServer IconExpression
Icon of the server in the server list. Can be set to an icon that loaded using the load server icon effect, or can be reset to the default icon in a server list ping. ‘default server icon’ returns the default server icon (server-icon.png) always and cannot be changed.
[the] [(default)|(shown|sent)] [server] iconon script load: set {server-icons::default} to the default server iconSetsExpression
Returns a list of all the values of a type. Useful for looping.
loop all attribute types: set loop-value attribute of player to 10 message "Set attribute %loop-value% to 10!"ShearEffect
Shears or un-shears a shearable entity with drops by shearing and a ‘sheared’ sound. Using with ‘force’ will force this effect despite the entity’s ‘shear state’.
Please note that..:
- Force-shearing or un-shearing on a sheared mushroom cow is not possible
on rightclick on a sheep holding a sword: shear the clicked sheep chance of 10% force shear the clicked sheepShootEffect Section
Shoots a projectile (or any other entity) from a given entity or location.
shoot %entitydatas% [from %livingentities/locations%] [(at|with) (speed|velocity) %number%] [%direction%](make|let) %livingentities/locations% shoot %entitydatas% [(at|with) (speed|velocity) %number%] [%direction%]shoot arrow from all players at speed 2shoot a pig from all players: add event-entity to {_projectiles::*}shooter is a skeletonShuffled ListExpression
Shuffles given list randomly.
set {_list::*} to shuffled {_list::*}Sign TextExpression
A line of text on a sign. Can be changed, but note that there is a 16 character limit per line. If a sign side is not specified, the front side will be used by default, unless in a sign change event and a block is not explicitly specified.
on right click: clicked block is tagged as "minecraft:all_signs" if line 2 of the clicked block is "[Heal]": heal the playeron sign change: any of the lines contain "bad word" cancel the event send "<red>You may not write profanity on signs!" to the playermake target entity silentSimulation DistanceExpression
The simulation distance of a world or a player. Simulation distance is the minimum distance in chunks for entities to tick. Simulation distance is capped to the current view distance of the world or player. The view distance is capped between 2 and 32 chunks.
set simulation distance of player to 10add 50 to the simulation distance of world "world"reset the simulation distance of playerclear the simulation distance of world "world"sinFunction
The sine function. It starts at 0° with a value of 0, goes to 1 at 90°, back to 0 at 180°, to -1 at 270° and then repeats every 360°. Uses degrees, not radians.
sin(90) = 1sin(60) = 0.866SizeExpression
The size of something. Using ‘size of {list::}’ will return the length of the list, so if you want the sizes of the things inside the lists, use ‘sizes of {list::}’.
message "There are %size of all players% players online!"Size of World BorderExpression
The size of a world border. The size can not be smaller than 1.
set world border radius of {_worldborder} to 10set {_owner} to the skull owner of event-blockset skull owner of {_block} to "Njol" parsed as offlineplayerset head owner of player's tool to {_player}Skull TextureExpression
The skull texture of a player head. This allows you to give a skull a custom texture (e.g. instead of it being a Steve head, it’s Notch’s head). The texture input is a base64 string containing the texture data to use (https://minecraft-heads.com is one site that provides easy access to base64 texture strings). Resetting the texture of a skull will make it look like a Steve/Alex head.
set the skull texture of {_i} to "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTM4NmRmZDc0Y2JhZmJkMWRiZTQ3OWY1ZTAzNzRjMDliZjJlYjRlMzg2NjExZmM0ZmM2OTlmMDJlY2E0ZGQyYyJ9fX0="SlotType
Represents a single slot of an inventory. Notable slots are the armour slots and furnace slots. The most important property that distinguishes a slot from an item is its ability to be changed, e.g. it can be set, deleted, enchanted, etc. (Some item expressions can be changed as well, e.g. items stored in variables. For that matter: slots are never saved to variables, only the items they represent at the time when the variable is set). Please note that tool can be regarded a slot, but it can actually change it’s position, i.e. doesn’t represent always the same slot.
The amount of items in the slot's stack. Can be set.
The custom name of the item in the slot, if it has one. Can be set or reset.
Whether this slot does not contain a (non-air) item.
The custom name of the item in the slot, if it has one. Can be set or reset.
set tool of player to dirtdelete helmet of the victimset the color of the player's tool to greenenchant the player's chestplate with projectile protection 5Slot IndexExpression
Index of an an inventory slot. Other types of slots may or may not have indices. Note that comparing slots with numbers is also possible; if index of slot is same as the number, comparisonsucceeds. This expression is mainly for the cases where you must for some reason save the slot numbers.
Raw index of slot is unique for the view, see Minecraft Wiki
if index of event-slot is 10: send "You bought a pie!"if display name of player's top inventory is "Custom Menu": # 3 rows inventory if raw index of event-slot > 27: # outside custom inventory cancel eventSortEffect
Sorts a list variable using either the natural ordering of the contents or the results of the given expression. Be warned, this will overwrite the indices of the list variable.
When using the full sort %~objects% (by|based on) <expression> pattern,
the input expression can be used to refer to the current item being sorted.
(See input expression for more information.)
set {_words::*} to "pineapple", "banana", "yoghurt", and "apple"sort {_words::*} # alphabetical sortsort {_words::*} by length of input # shortest to longestsort {_words::*} in descending order by length of input # longest to shortestsort {_words::*} based on {tastiness::%input%} # sort based on custom valueSorted ListExpression
Sorts given list in natural order. All objects in list must be comparable; if they’re not, this expression will return nothing.
set {_sorted::*} to sorted {_players::*}command /leaderboard: trigger: loop reversed sorted {most-kills::*}: send "%loop-counter%. %loop-index% with %loop-value% kills" to senderSound CategoryType
The category of a sound, they are used for sound options of Minecraft. See the play sound and stop sound effects.
hostile creatures category, speech category, records category, friendly creature category, noteblock category, hostile creature category, note block category, voice category, ambient category, ui, noteblocks category, note blocks category, weather category, block category, friendly mob category, jukebox category, hostile mob category, master category, master volume category, hostile category, record category, user interface, blocks category, environment category, jukeboxes category, player category, players category, hostile mobs category, friendly mobs category, music category, friendly creatures category, neutral category[the] source blockon spread: if the source block is a grass block: set the source block to dirtSpawnEffect Section
Spawns entities. This can be used as an effect and as a section.
If it is used as a section, the section is run before the entity is added to the world. You can modify the entity in this section, using for example ‘event-entity’ or ‘cow’. Do note that other event values, such as ‘player’, won’t work in this section.
If you’re spawning a display and want it to be empty on initialization, like not having a block display be stone, set hidden config node ‘spawn empty displays’ to true.
Note that when spawning an entity via entity snapshots, the code within the section will not run instantaneously as compared to spawning normally (via ‘a zombie’).
spawn 3 creepers at the targeted blockspawn a ghast 5 meters above the playerspawn a zombie at the player: set name of the zombie to ""spawn a block display of a ladder[waterlogged=true] at location above player: set billboard of event-display to center # allows the display to rotate around the center axisteleport all players to spawnset the spawn point of "world" to the player's locationSpawn Egg EntityExpression
Gets or sets the entity snapshot that the provided spawn eggs will spawn when used.
set {_item} to a zombie spawn eggbroadcast the spawn egg entity of {_item}spawn a pig at location(0,0,0): set the max health of entity to 20 set the health of entity to 20 set {_snapshot} to the entity snapshot of entity clear entityset the spawn egg entity of {_item} to {_snapshot}if the spawn egg entity of {_item} is {_snapshot}: # Minecraft 1.20.5+ set the spawn egg entity of {_item} to (random element out of all entities)set the spawn egg entity of {_item} to a zombie[the] spawn[ing] reasonon spawn: spawn reason is reinforcements or breeding cancel eventdispense egg, egg, village defense, ocelot baby, silverfish trap, village invading, trap, dispensing egg, shoulder, drowned, metamorphosis, lightning, silverfish reveal, spell, built iron golem, natural, trial mob spawner, village invasion, frozen, mount, rehydration, build wither, built wither, iron golem defense, ender pearl, creature spawner, reinforcements, build snowman, build iron golem, rehydrated, breeding, raid, ominous item spawner, built copper golem, infection, customized, potion effect, spawn egg, jockey, beehive, default, release from bucket, golem defense, patrol, slime split, infected, sheared, mob spawner, nether portal, trial spawner, shear, perching, custom, built snowman, chunk generation, breed, command, duplication, explosion, spawner, reanimate, cured, enchantment, trial creature spawner, customised, piglin zombification, build copper golemSpawner TypeExpression
The entity type of a spawner (mob spawner). Change the entity type, reset it (pig) or clear it (Minecraft 1.20.0+).
on right click: if event-block is a spawner: send "Spawner's type if %spawner type of event-block%" to playerset the creature type of {_spawner} to a trader llamareset {_spawner}'s entity type # Pigclear the spawner type of {_spawner} # Minecraft 1.20.0+Spectator TargetExpression
Grabs the spectator target entity of the players.
on player start spectating of player: message "&c%spectator target% currently has %{game::kills::%spectator target%}% kills!" to the playeron player stop spectating: past spectator target was a zombie set spectator target to the nearest skeletonSpeedExpression
A player’s walking or flying speed. Both can be changed, but values must be between -1 and 1 (excessive values will be changed to -1 or 1 respectively). Negative values reverse directions. Please note that changing a player’s speed will change their FOV just like potions do.
set the player's walk speed to 1increase the argument's fly speed by 0.1SprintingEffect
Make a player start or stop sprinting. If the player is not moving when this effect is used, they will be put in sprint mode for a tick and then stopped (this causes the FOV to change). Using it a second time, without the player manually sprinting in between, causes the player to stay in sprint mode, with some quirks.
- Particles may not be produced under the player’s feet.
- The player will not exit the sprinting state if they stop moving.
- Restrictions like low hunger will not prevent the player from sprinting
- The player pressing shift will stop them sprinting, and pressing sprint will re-assert normal sprinting behavior Using this effect two or more consecutive times on a stationary player produces undefined behavior and should not be relied on.
make player start sprintingforce player to start sprintingsqrtFunction
The square root, which is the inverse operation to squaring a number (for positive numbers only). This is the same as (argument) ^ (1/2) – other roots can be calculated via number ^ (1/root), e.g. set {_l} to {_volume}^(1/3).
Returns NaN (not a number) if the argument is negative.
sqrt(4) = 2sqrt(2) = 1.4142sqrt(-1) = NaNStarts/Ends WithCondition
Checks if a text starts or ends with another.
if the argument starts with "test" or "debug": send "Stop!"Stop ServerEffect
Stops or restarts the server. If restart is used when the restart-script spigot.yml option isn’t defined, the server will stop instead.
(stop|shut[ ]down) [the] serverrestart [the] serverstop the serverrestart serverStop SoundEffect
Stops specific or all sounds from playing to a group of players. Both Minecraft sound names and Spigot sound names are supported. Resource pack sounds are supported too. The sound category is ‘master’ by default. A sound can’t be stopped from a different category.
Please note that sound names can get changed in any Minecraft or Spigot version, or even removed from Minecraft itself.
stop (all sound[s]|sound[s] %strings%) [(in [the]|from) %soundcategory%] [(from playing to|for) %players%]stop sound "block.chest.open" for the playerstop playing sounds "ambient.underwater.loop" and "ambient.underwater.loop.additions" to the playerstop all sounds for all playersstop sound in the record categoryStored EnchantmentsExpression
The enchantments stored inside an enchanted book. This is different from enchanting the book, as for example a book
of sharpness does not deal more damage when used as a weapon. Corresponds to the minecraft:stored_enchantments data component.
Note that for example resetting the stored enchantments of an enchanted book of Sharpness III removes the sharpness enchantment, since
it is impossible to know what the original enchantments of the item were. Note also that only one entry can exist per enchantment type;
adding Sharpness III to a book with Sharpness V will convert it to a book of Sharpness III.
command /godbook: trigger: set {_item} to minecraft:enchanted_book add mending to stored enchants of {_item} # adds mending 1 add knockback 12 to stored enchants of {_item} add fire aspect 3 to stored enchants of {_item} give {_item} to playerif last spawned strider is shivering: make last spawned strider stop shiveringif last spawned strider is shivering: make last spawned strider stop shiveringString ColorsExpression
Retrieve the first, the last, or all of the color objects or color codes of a string. The retrieved color codes of the string will be formatted with the color symbol.
set {_colors::*} to the string colors of "<red>hey<blue>yo"set {_color} to the first string color code of "&aGoodbye!"send "%{_color}%Howdy!" to all playersset style of event-bossbar to 6 notchesSubstringExpression
Extracts part of a text. You can either get the first <x> characters, the last <x> characters, the character at index <x>, or the characters between indices <x> and <y>. The indices <x> and <y> should be between 1 and the length of the text (other values will be fit into this range).
set {_s} to the first 5 characters of the text argumentmessage "%subtext of {_s} from characters 2 to (the length of {_s} - 1)%" # removes the first and last character from {_s} and sends it to the player or consoleset {_characters::*} to characters at 1, 2 and 7 in player's display namesend the last character of all players' namessum(1) = 1sum(2, 3, 4) = 9sum({some list variable::*})sum(2, {_v::*}, and the player's y-coordinate)Suppress Type Hints (Experimental)Effect Section
An effect to suppress local variable type hint errors for the syntax lines that follow this effect. NOTE: Suppressing type hints also prevents syntax from providing new type hints. For example, with type hints suppressed, ‘set {_x} to true’ would not provide ‘boolean’ as a type hint for ‘{_x}’
[un]suppress [local variable] type hints(start|stop) suppressing [local variable] type hintsstart suppressing local variable type hints# potentially unsafe code goes herestop suppressing local variable type hintsSwing HandEffect
Makes an entity swing their hand. This does nothing if the entity does not have an animation for swinging their hand.
make player swing their main handTablisted PlayersExpression
The players shown in the tab lists of the specified players.
delete will remove all the online players from the tab list.
reset will reset the tab list to the default state, which makes all players visible again.
tablist players of playerTagExpression
Represents a tag which can be used to classify items, blocks, or entities.
Tags are composed of a value and an optional namespace: “minecraft:oak_logs”.
If you omit the namespace, one will be provided for you, depending on what kind of tag you’re using. For example, tag "doors" will be the tag “minecraft:doors”, while paper tag "doors" will be “paper:doors”.
minecraft tag will search through the vanilla tags, datapack tag will search for datapack-provided tags (a namespace is required here!), paper tag will search for Paper’s custom tags if you are running Paper, and custom tag will look in the “skript” namespace for custom tags you’ve registered.
You can also filter by tag types using “item”, “block”, or “entity”.
minecraft tag "dirt" # minecraft:dirtpaper tag "doors" # paper:doorstag "skript:custom_dirt" # skript:custom_dirtcustom tag "dirt" # skript:dirtdatapack block tag "dirt" # minecraft:dirtdatapack tag "my_pack:custom_dirt" # my_pack:custom_dirttag "minecraft:mineable/pickaxe" # minecraft:mineable/pickaxecustom item tag "blood_magic_sk/can_sacrifice_with" # skript:blood_magic_sk/can_sacrifice_withTag Namespaced KeyExpression
The namespaced key of a minecraft tag. This takes the form of “namespace:key”, e.g. “minecraft:dirt”.
broadcast namespaced keys of the tags of player's toolif the key of {_my-tag} is "minecraft:stone": return trueTags ContentsExpression
Returns all the values that a tag contains. For item and block tags, this will return items. For entity tags, it will return entity datas (a creeper, a zombie).
broadcast tag values of minecraft tag "dirt"broadcast (first element of player's tool's block tags)'s tag contentsTags of XExpression
Returns all the tags of an item, block, or entity.
minecraft tag will return only the vanilla tags, datapack tag will return only datapack-provided tags, paper tag will return only Paper’s custom tags (if you are running Paper), and custom tag will look in the “skript” namespace for custom tags you’ve registered.
You can also filter by tag types using “item”, “block”, or “entity”.
[all [[of] the]|the] [minecraft|datapack|paper|(custom|skript)] [item|block|entity [type]] tags of %itemtype/entity/entitydata%%itemtype/entity/entitydata%'[s] [minecraft|datapack|paper|(custom|skript)] [item|block|entity [type]] tagsbroadcast minecraft tags of dirtsend true if paper item tags of target block contains paper tag "doors"broadcast the block tags of player's tooltame {_horse}untame {_horse}TamerExpression
The tamer of an entity. Can only be used in entity tame events. You can use ‘event-entity’ to refer tamed entity itself.
[the] tameron tame: if the tamer is a player: send "someone tamed something!" to consoletanFunction
The tangent function. This is basically sin(arg)/cos(arg). Uses degrees, not radians.
tan(0) = 0tan(45) = 1tan(89.99) = 5729.5779TargetExpression
For players this is the entity at the crosshair. For mobs and experience orbs this is the entity they are attacking/following (if any). The ‘ray size’ and ‘ignoring blocks’ options are only valid for players’ targets. The ‘ray size’ option effectively increases the area around the crosshair an entity can be in. It does so by expanding the hitboxes of entities by the given amount. Display entities have a hit box of 0, so using the ‘ray size’ option can be helpful when targeting them. May grab entities in unloaded chunks.
[the] target[[ed] %entitydata%] [of %livingentities%] [ignoring blocks] [[with|at] [a] ray[ ]size [of] %number%]%livingentities%'[s] target[[ed] %entitydata%] [ignoring blocks] [[with|at] [a] ray[ ]size [of] %number%]on entity target: if entity's target is a player: send "You're being followed by an %entity%!" to target of entityreset target of entity # Makes the entity target-lessdelete targeted entity of player # for players it will delete the targetdelete target of last spawned zombie # for entities it will make them target-lessTargeted BlockExpression
The block at the crosshair. This regards all blocks that are not air as fully solid, e.g. torches will be like a solid stone block for this expression. The actual target block will regard the actual hit box of the block.
set target block of player to stoneset target block of player to oak_stairs[waterlogged=true]break target block of player using player's toolgive player 1 of type of target blockteleport player to location above target blockkill all entities in radius 3 around target block of playerset {_block} to actual target block of playerbreak actual target block of playerTeleportEffect
Teleport an entity to a specific location. This effect is delayed by default, as it waits for the chunk of the location to be loaded before teleporting. The keyword ‘force’ may be used to bypass this behavior (preventing the delay), but note that it may cause lag spikes or other server performance issues when teleporting to unloaded chunks. Teleport flags are properties to retain during a teleport, such as direction, passengers, and velocities.
teleport the player to {home::%uuid of player%}teleport the attacker to the victimon dismount: cancel event teleport the player to {server::spawn} retaining vehicle and passengersTeleport CauseExpression
The teleport cause within a player teleport event.
[the] teleport (cause|reason|type)on teleport: teleport cause is nether portal, end portal or end gateway cancel eventbed exit, nether portal, ender gateway, exiting bed, consumable effect, ender portal, command, unknown, plugin, dismounted, ender pearl, spectator, spectate, end gateway, exit bed, gateway, dismount, end portalpassengers, xyz velocity, z velocity, yaw velocity, inventory, pitch velocity, vehicle, opened inventory, open inventory, x velocity, passenger, pitch and yaw velocity, yaw and pitch velocity, directional velocity, y velocitymessage "%temperature of the targeted block%"TernaryExpression
A shorthand expression for returning something based on a condition.
set {points} to 500 if {admin::%player's uuid%} is set else 100TextType
Text is simply text, i.e. a sequence of characters, which can optionally contain expressions which will be replaced with a meaningful representation (e.g. %player% will be replaced with the player’s name). Because scripts are also text, you have to put text into double quotes to tell Skript which part of the line is an effect/expression and which part is the text. Please read the article on Texts and Variable Names to learn more.
simple: "..."quotes: "...""..."expressions: "...%expression%..."percent signs: "...%%..."broadcast "Hello World!"message "Hello %player%"message "The id of ""%type of tool%"" is %id of tool%."Text ComponentType
Text components are used to represent how text is displayed in Minecraft. This includes colors, decorations, and more.
Components can contain other components.
"<red><bold>This text is red and bold!"Text Display AlignmentExpression
Returns or changes the alignment setting of text displays.
set text alignment of the last spawned text display to left alignedText Display Drop ShadowEffect
Applies or removes drop shadow from the displayed text on a text display.
apply drop shadow to last spawned text displayif {_display} has drop shadow: remove drop shadow from the text of {_display}Text Display Has Drop ShadowCondition
Returns whether the text of a display has drop shadow applied.
if {_display} has drop shadow: remove drop shadow from the text of {_display}Text Display Line WidthExpression
Returns or changes the line width of text displays. Default is 200.
set the line width of the last spawned text display to 300Text Display OpacityExpression
Returns or changes the text opacity of text displays. The default is 255, fully opaque. Values are between 0 and 255. 0 to 3 are treated the same as 255, meaning fully opaque. Values from 4 to 26 are fully transparent, and opacity increases linearly from there up to 255. For backwards compatability, setting negative values between -1 and -128 wrap around, so -1 is the same as 255 and -128 is the same as 128. Adding or subtracting values will adjust the opacity within the bounds of 0-255, so subtracting 300 wil always result in an opacity of 0.
set the text opacity of the last spawned text display to 0 # fully opaqueset text opacity of all text displays to 255 # fully opaqueset text opacity of all text displays to 128 # semi-transparentset text opacity of all text displays to 4 # fully transparentText Display See Through BlocksEffect
Forces a text display to either be or not be visible through blocks.
force last spawned text display to be visible through wallsprevent all text displays from being visible through wallsText Display Visible Through BlocksCondition
Returns whether text displays can be seen through blocks or not.
if last spawned text display is visible through walls: prevent last spawned text display from being visible through wallsText OfExpression
Returns or changes the text/string of displays. Note that currently you can only use Skript chat codes when running Paper.
set text of the last spawned text display to "example"Text ReplacementExpression
Performs a text replacement on a given value, returning the result. Supports regex and case sensitive replacement.
send "Welcome [player]" where "[player]" is replaced with "%player%" to player# Function for sanitizing user inputs# Strips the input of any non-alphanumeric characters using regexfunction sanitizeInput(input: string) :: string: return {_input} where regex pattern "\W" is replaced with ""# Function to convert &# hex color codes to <# > (mini message format)function colorFormat(input: string) :: string: return {_input} where all instances of regex pattern "&#([a-fA-F0-9]{6})" are replaced with "<#$1>"# Very simple chat censoron chat: set message to message where all instances of "idiot", "noob" are replaced with "****" set message to message where regex "\b(idiot|noob)\b" is replaced with "****" # Regex version using word boundaries for better results[the] [thrown] eggspawn an egg at the eggcommand /command-with-cooldown: trigger: {command::%player's uuid%::last-usage} was less than a minute ago: message "Please wait a minute between uses of this command." stop set {command::%player's uuid%::last-usage} to now # ... actual command trigger here ...TimeExpression
The time of a world. Use the “minecraft timespan” syntax to change the time according to Minecraft’s time intervals. Since Minecraft uses discrete intervals for time (ticks), changing the time by real-world minutes or real-world seconds only changes it approximately. Removing an amount of time from a world’s time will move the clock forward a day.
set time of world "world" to 2:00add 2 minecraft hours to time of world "world"add 54 real seconds to time of world "world" # approximately 1 minecraft hourTimeType
A time is a point in a minecraft day’s time (i.e. ranges from 0:00 to 23:59), which can vary per world. See date and timespan for the other time types of Skript.
##:####[:##][ ]am/pmat 20:00: time is 8 pm broadcast "It's %time%"Time Lived of EntityExpression
Returns the total amount of time the entity has lived. Note: This does not reset when a player dies.
clear all entities where [input's time lived > 1 hour]on right click on entity: send "%entity% has lived for %time lived of entity%" to playerTime PlayedExpression
The amount of time a player has played for on the server. This info is stored in the player’s statistics in the main world’s data folder. Changing this will also change the player’s stats which can be views in the client’s statistics menu.
Using this expression on offline players on Minecraft 1.14 and below will return nothing <none>.
set {_t} to time played of playerif player's time played is greater than 10 minutes: give player a diamond swordset player's time played to 0 secondsTime Since/UntilExpression
The time since a date has passed or the time until a date will pass. This expression will return 0 seconds if the time since or time until would be negative, e.g. if one tries to get the time since a future date.
send "%time since 5 minecraft days ago% has passed since 5 minecraft days ago!" to playersend "%time until {countdown::end}% until the game begins!" to playerTimeperiodType
A period of time between two times. Mostly useful since you can use this to test for whether it’s day, night, dusk or dawn in a specific world. This type might be removed in the future as you can use ‘time of world is between x and y’ as a replacement.
##:## - ##:##dusk/day/dawn/nighttime in world is nightTimespanType
A timespan is a difference of two different dates or times, e.g ‘10 minutes’. Timespans are always displayed as real life time, but can be defined as minecraft time, e.g. ‘5 minecraft days and 12 hours’. NOTE: Months always have the value of 30 days, and years of 365 days. See date and time for the other time types of Skript.
<number> [minecraft/mc/real/rl/irl] ticks/seconds/minutes/hours/days/weeks/months/years [[,/and] <more...>][###:]##:##[.####] ([hours:]minutes:seconds[.milliseconds])every 5 minecraft days: wait a minecraft second and 5 ticksevery 10 mc days and 12 hours: halt for 12.7 irl minutes, 12 hours and 120.5 secondsTimespan DetailsExpression
Retrieve specific information of a timespan such as hours/minutes/etc.
set {_t} to difference between now and {Payouts::players::%uuid of player%::last-date}send "It has been %days of {_t}% day(s) since last payout."set title of event-bossbar to "<red>hello!"on inventory click: if type of event-item is written book: set title of event-item to formatted "<obf>%random uuid%" send "Your book's title is now forever forgotten.." to playerTitle - Clear/ResetEffect
Clears or resets the title of an audience to the default values.
While both actions remove the title being displayed, reset will also reset the title timings.
reset the titles of all playersclear the titleTitle - SendEffect
Sends a title and/or subtitle to an audience with an optional fade in, stay, and/or fade out time. If sending only the subtitle, it will only be shown if the audience currently has a title displayed. Otherwise, it will be shown when the audience is next shown a title. Additionally, if no input is given for the times, the previous times of the last sent title will be used (or default values). Use the reset title effect to restore the default values for the times.
send title "Competition Started" with subtitle "Have fun, Stay safe!" to player for 5 secondssend title "Hi %player%" to playersend title "Loot Drop" with subtitle "starts in 3 minutes" to all playerssend title "Hello %player%!" with subtitle "Welcome to our server" to player for 5 seconds with fadein 1 second and fade out 1 secondsend subtitle "Party!" to all players# use arrows to toggle switches, doors, etc.on projectile hit: projectile is arrow toggle the block at the arrow# With booleanstoggle gravity of playershow the custom name of event-entityhide target's display nameallow flight to event-playerToggle Picking Up ItemsEffect
Determines whether living entities are able to pick up items or not
forbid player from picking up itemssend "You can no longer pick up items!" to playeron drop: if player can't pick up items: allow player to pick up itemsplayer's tool is tagged with minecraft tag "pickaxes"player's off hand tool is a shieldset tool of all players to a diamond swordset offhand tool of target entity to a bowTotal ExperienceExpression
The total experience, in points, of players or experience orbs. Adding to a player’s experience will trigger Mending, but setting their experience will not.
set total experience of player to 100add 100 to player's experienceif player's total experience is greater than 100: set player's total experience to 0 give player 1 diamondTPS (ticks per second)Expression
Returns the 3 most recent TPS readings, like the /tps command. This expression is only supported on some server software (PaperSpigot).
tps from [the] last ([1] minute|1[ ]m[inute])tps from [the] last 5[ ]m[inutes]tps from [the] last 15[ ]m[inutes][the] tpsbroadcast "%tps%"Transform ListEffect
Transforms (or ‘maps’) a list’s values using a given expression. This is akin to looping over the list and setting each value to a modified version of itself. Evaluates the given expression for each element in the list, replacing the original element with the expression’s result. If the given expression returns a single value, the indices of the list will not change. If the expression returns multiple values, then then indices will be reset as a single index cannot contain multiple values. Only variable lists can be transformed with this effect. For other lists, see the transform expression.
set {_a::*} to 1, 2, and 3transform {_a::*} using input * 2# {_a::*} is now 2, 4, and 6# get a list of the sizes of all clans without manually loopingset {_clan-sizes::*} to indices of {clans::*}transform {_clan-sizes::*} using {clans::%input%::size}# set all existing values of a list to 0:transform {_list::*} with 0Transform ReasonExpression
The transform reason within an entity entity transform event.
[the] transform[ing] (cause|reason|type)on entity transform: transform reason is infection, drowned or frozeninfection, magma slime split, villager infection, tadpole metamorphosis, drowning, creeper super charge, unknown, split, tadpole converting, metamorphosis, skeleton converting to stray, lightning, slime split, entity drowning, slime splitting, zombie drowning, zombie curing, skeleton freeze, entity freezing, zombie converting to drowned, curing, entity freeze, skeleton freezing, mooshroom shear, zombie cure, tadpole converting to frog, mooshroom shearing, magma slime splitting, piglin zombificationTransformed ListExpression
Transforms (or ‘maps’) a list’s values using a given expression. This is akin to looping over the list and getting a modified version of each value. If the given expression returns a single value, the indices of the list will not change. If the expression returns multiple values, then then indices will be reset as a single index cannot contain multiple values.
set {_a::*} to (1, 2, and 3) transformed using (input * 2 - 1, input * 2)# {_a::*} is now 1, 2, 3, 4, 5, and 6# get a list of the sizes of all clans without manually loopingset {_clan-sizes::*} to keyed {clans::*} transformed using [{clans::%input index%::size}]# using the 'keyed' expression retains the indices of the clans listTreeEffect
Creates a tree. This may require that there is enough space above the given location and that the block below is dirt/grass, but it is possible that the tree will just grow anyways, possibly replacing every block in its path.
grow a tall redwood tree above the clicked blockTree TypeType
A tree type represents a tree species or a huge mushroom species. These can be generated in a world with the generate tree effect.
a red poplar tree, poplar tree, yellow poplar tree, any pale oak tree, small normal tree, any birch tree, huge mushroom, a small regular tree, azalea tree, normal pale oak tree, any spruce tree, a huge red mushroom, an oak tree, a big normal tree, a swamp oak, a mangrove tree, jungle bush tree, a crimson fungus tree, huge brown mushroom, a poplar tree, any mangrove tree, cherry tree, a big spruce tree, crimson tree, chorus plant, any huge mushroom, a tall spruce tree, small oak tree, tall birch tree, a cocoa jungle tree, big spruce tree, warped tree, a swamp oak tree, a tall birch tree, a big jungle tree, a jungle tree, a creaking pale oak tree, a chorus plant, any poplar tree, swamp oak, a big regular tree, a warped fungus, small birch tree, a warped fungus tree, any oak tree, a crimson tree, a tree, a normal pale oak tree, a huge brown mushroom, crimson fungus, an orange poplar tree, any normal tree, orange poplar tree, a yellow poplar tree, a spruce tree, a mega spruce tree, cocoa jungle tree, a tall jungle tree, small regular tree, a dark oak tree, big mangrove tree, swamp oak tree, a cocoa tree, a crimson fungus, small spruce tree, a small jungle tree, jungle tree, big jungle tree, a small birch tree, a jungle bush tree, big regular tree, acacia tree, mangrove tree, spruce tree, giant jungle tree, any jungle tree, a jungle cocoa tree, a small spruce tree, a jungle bush, tree, crimson fungus tree, tall spruce tree, giant spruce tree, red poplar tree, cocoa tree, pale oak tree, a huge mushroom, warped fungus tree, a small normal tree, jungle bush, a big oak tree, a pale oak tree, big normal tree, a small mangrove tree, mega spruce tree, tall jungle tree, a warped tree, creaking pale oak tree, small jungle tree, a swamp tree, small mangrove tree, warped fungus, swamp tree, any tree, birch tree, a big mangrove tree, a cherry tree, jungle cocoa tree, oak tree, dark oak tree, big oak tree, huge red mushroom, a giant spruce tree, a giant jungle tree, a birch tree, a acacia tree, a small oak tree, any regular tree, an azalea treegrow any regular tree at the blockgrow a huge red mushroom above the blockTropical FishEntity Data
[%color%[-%color%]] tropical fish[es]fully %color% tropical fish[es][%color%[-%color%]] betty[s]fully %color% betty[s][%color%[-%color%]] blockfish[s]fully %color% blockfish[s][%color%[-%color%]] brinely[s]fully %color% brinely[s][%color%[-%color%]] clayfish[s]fully %color% clayfish[s][%color%[-%color%]] dasher[s]fully %color% dasher[s][%color%[-%color%]] flopper[s]fully %color% flopper[s][%color%[-%color%]] glitter[s]fully %color% glitter[s][%color%[-%color%]] kob[s]fully %color% kob[s][%color%[-%color%]] snooper[s]fully %color% snooper[s][%color%[-%color%]] spotty[s]fully %color% spotty[s][%color%[-%color%]] stripey[s]fully %color% stripey[s][%color%[-%color%]] sunstreak[s]fully %color% sunstreak[s]TypeType
Represents a type, e.g. number, object, item type, location, block, world, entity type, etc.
This is mostly used for expressions like ‘event-
See the type name patterns of all types - including this one{variable} is a number # check whether the variable contains a number, e.g. -1 or 5.5{variable} is a type # check whether the variable contains a type, e.g. number or player{variable} is an object # will always succeed if the variable is set as everything is an object, even types.disable PvP in the event-worldkill the loop-entityType HintsExperiment
Local variable type hints enable Skript to understand what kind of values your local variables will hold at parse time. Consider the following code:
set {_a} to 5set {_b} to "some string"... do stuff ...set {_c} to {_a} in lowercase # oops i used the wrong variablePreviously, the code above would parse without issue. However, Skript now understands that when it is used, {_a} could only be a number (and not a text). Thus, the code above would now error with a message about mismatched types.
Please note that this feature is currently only supported by simple local variables. A simple local variable is one whose name does not contain any expressions:
{_var} # can use type hints{_var::%player's name%} # can't use type hints[local variable] type hintsType ofExpression
Type of a block, item, entity, inventory, potion effect or enchantment type. Types of items, blocks and block datas are item types similar to them but have amounts of one, no display names and, on Minecraft 1.13 and newer versions, are undamaged. Types of entities and inventories are entity types and inventory types known to Skript. Types of potion effects are potion effect types. Types of enchantment types are enchantments.
on rightclick on an entity: message "This is a %type of clicked entity%!"Unbreakable ItemsExpression
Creates breakable or unbreakable copies of given items.
set {_item} to unbreakable iron swordgive breakable {_weapon} to all playersUnix DateExpression
Converts given Unix timestamp to a date. The Unix timespan represents the number of seconds elapsed since 1 January 1970.
unix date of 946684800 #1 January 2000 12:00 AM (UTC Time)Unix TimestampExpression
Converts given date to Unix timestamp. This is roughly how many seconds have elapsed since 1 January 1970.
unix timestamp of now[the] (unknown|non-existent) command message on unknown command execution: add 1 to {-command_fails::%player%} wait 30 seconds: remove 1 from {-command_fails::%player%} if {-command_fails::%player%} is greater than or equal to 5: push the player upwards set the unknown command message to "<red>You are executing too many unknown commands too fast!"[the] unleash[ing] reasonif the unleash reason is distance: broadcast "The leash was snapped in half."player unleashed, leashed (gone|disappeared), distance, unleashed by player, player unleash, holder (gone|disappeared), unknownUpdate BlockEffect
Updates the blocks by setting them to a selected block Using ‘without physics’ will not send updates to the surrounding blocks of the blocks being set. Example: Updating a block next to a sand block in the air ‘without physics’ will not cause the sand block to fall.
update {_blocks::*} as gravelupdate {_blocks::*} to be sand without physics updatesupdate {_blocks::*} as stone without neighbouring updatesUsing Experimental FeatureStructure
Place at the top of a script file to enable an optional experimental feature. Experimental features may change behavior in Skript and may contain bugs. Use at your own discretion. A list of the available experimental features can be found in the changelog for your version of Skript.
using [[the] experiment] <.+>using 1.21using the experiment my-cool-addon-featureuuidFunction
Returns a UUID from the given string. The string must be in the format of a UUID.
uuid("069a79f4-44e9-4726-a5be-fca90e38aaf5")UUIDExpression
The UUID of a player, entity or world.
# prevents people from joining the server if they use the name of a player# who has played on this server at least once since this script has been addedon login: if {uuid::%name of player%} exists: {uuid::%name of player%} is not uuid of player kick player due to "Someone with your name has played on this server before" else: set {uuid::%name of player%} to uuid of playercommand /what-is-my-uuid: trigger: set {_uuid} to uuid of player send "Your UUID is '%string within {_uuid}%'"UUIDType
UUIDs are unique identifiers that ensure things can be reliably distinguished from each other. They are generated in a way that makes it practically impossible for duplicates to occur. Read more about UUIDs and how they are used in Minecraft in the wiki entry about UUIDs.
ValueExpression
Returns the value of something that has a value, e.g. a node in a config. The value is automatically converted to the specified type (e.g. text, number) where possible.
set {_node} to node "update check interval" in the skript config
broadcast text value of {_node}# text value of {_node} = "12 hours" (text)
wait for {_node}'s timespan value# timespan value of {_node} = 12 hours (duration)Value of SubnodeExpression
Returns the value of an sub-node of the given node, following the provided path. The value is automatically converted to the specified type (e.g. text, number) where possible.
set {_node} to node "language" in the skript configbroadcast the text value of {_node}Value WithinExpression
Gets the value within objects. Usually used with variables to get the value they store rather than the variable itself, or with lists to get the values of a type.
set {_entity} to a random entity out of all entitiesdelete entity within {_entity} # This deletes the entity itself and not the value stored in the variableset {_list::*} to "something", 10, "test" and a zombiebroadcast the strings within {_list::*} # "something", "test"VariablesStructure
Used for defining variables present within a script. This section is not required, but it ensures that a variable has a value if it doesn’t exist when the script is loaded.
variablesvariables: {joins} = 0 {balance::%player%} = 0on join: add 1 to {joins} message "Your balance is %{balance::%player%}%"vectorFunction
Creates a vector from a single argument. Equivalent to vector(n, n, n).
vector(1) # = vector(1, 1, 1)VectorType
Vector is a collection of numbers. In Minecraft, 3D vectors are used to express velocities of entities.
X, Y, or Z component of the vector.
vector(x, y, z)send "%the angle between vector 1, 0, 0 and vector 0, 1, 1%"Vectors - Create from DirectionExpression
Creates vectors from given directions. Relative directions are relative to the origin, (0, 0, 0). Therefore, the vector from the direction ‘forwards’ is (0, 0, 1).
set {_v} to vector from direction upwardsset {_v} to vector in direction of playerset {_v} to vector in horizontal direction of playerset {_v} to vector from facing of playerset {_v::*} to vectors from north, south, east, and westVectors - Create from XYZExpression
Creates a vector from x, y and z values.
set {_v} to vector 0, 1, 0Vectors - Create Location from VectorExpression
Creates a location from a vector in a world.
set {_loc} to {_v} to location in world "world"set {_loc} to {_v} to location in world "world" with yaw 45 and pitch 90set {_loc} to location of {_v} in "world" with yaw 45 and pitch 90Vectors - Cylindrical ShapeExpression
Forms a ‘cylindrical shaped’ vector using yaw to manipulate the current point.
loop 360 times: set {_v} to cylindrical vector radius 1, yaw loop-value, height 2set {_v} to cylindrical vector radius 1, yaw 90, height 2send "%standard length of vector 1, 2, 3%"set {_v} to vector 1, 2, 3set standard length of {_v} to 2send "%standard length of {_v}%"Vectors - Location Vector OffsetExpression
Returns the location offset by vectors. Supports both global and local axes. When using local axes, the vector is applied relative to the direction the location is facing.
set {_loc} to {_loc} ~ {_v}# spawn a tnt 5 blocks in front of playerset {_l} to player's location offset by vector(0, 1, 5) using local axesspawn tnt at {_l}set {_v} to normalized {_v}set {_v} to normalised {_u}Vectors - Random VectorExpression
Creates a random unit vector.
[a] random vectorset {_v} to a random vectorVectors - Spherical ShapeExpression
Forms a ‘spherical shaped’ vector using yaw and pitch to manipulate the current point.
loop 360 times: set {_v} to spherical vector radius 1, yaw loop-value, pitch loop-valueset {_v} to spherical vector radius 1, yaw 45, pitch 90send "%squared length of vector 1, 2, 3%"Vectors - Vector Between LocationsExpression
Creates a vector between two locations.
set {_v} to vector between {_loc1} and {_loc2}set {_v} to vector of {_loc}Vectors - Vector from Yaw and PitchExpression
Creates a vector from a yaw and pitch value.
set {_v} to vector from yaw 45 and pitch 45Vectors - Vector ProjectionExpression
An expression to get the vector projection of two vectors.
set {_projection} to vector projection of vector(1, 2, 3) onto vector(4, 4, 4)VehicleEffect
Makes an entity ride another entity, e.g. a minecart, a saddled pig, an arrow, etc.
(make|let|force) %entities% [to] (dismount|(dismount|leave) (from|of|) (any|the[ir]|his|her|) vehicle[s])make the player ride a saddled pigmake the attacker ride the victimVehicleExpression
The vehicle an entity is in, if any. This can actually be any entity, e.g. spider jockeys are skeletons that ride on a spider, so the spider is the ‘vehicle’ of the skeleton. See also: passenger
set the vehicle of {game::players::*} to a saddled piggive {game::players::*} a carrot on a stickon vehicle enter: vehicle is a horse add 1 to {statistics::horseMounting::%uuid of player%}VelocityExpression
Gets or changes velocity of an entity or particle. Setting the velocity of a particle will remove its random dispersion and force it to be a single particle.
set player's velocity to {_v}set the velocity of {_particle} to vector(0, 1, 0)if the vector length of the player's velocity is greater than 5: send "You're moving fast!" to the player([craft]bukkit|minecraft|skript)( |-)versionmessage "This server is running Minecraft %minecraft version% on Bukkit %bukkit version%"message "This server is powered by Skript %skript version%"Version StringExpression
The text to show if the protocol version of the server doesn’t match with protocol version of the client. You can check the protocol version expression for more information about this. This can only be set in a server list ping event.
[the] [shown|custom] version [string|text]on server list ping: set the protocol version to 0 # 13w41a (1.7), so it will show the version string always set the version string to "<light green>Version: <orange>%minecraft version%"View DistanceExpression
The view distance of a world or a player. The view distance of a player is the distance in chunks sent by the server to the player. This has nothing to do with client side view distance settings. View distance is capped between 2 to 32 chunks.
set view distance of player to 10add 50 to the view distance of world "world"reset the view distance of playerclear the view distance of world "world"View Distance of ClientExpression
The view distance of the client. Can not be changed. This differs from the server side view distance of player as this will retrieve the view distance the player has set on their client.
set {_clientView} to the client view distance of playerset view distance of player to client view distance of playeradd {_player} to viewers of event-bossbaron inventory open: set {_mylist::*} to viewers of event-inventory send "%size of {_list::*}% other players are viewing this inventory!"VillagerEntity Data
[(baby|young)|(adult|grown(-| )up)] villager[s]villager (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] (unemployed|jobless|normal) villager[s](unemployed|jobless|normal) villager (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] armo[u]rer[s]armo[u]rer (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] butcher[s]butcher (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] cartographer[s]cartographer (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] cleric[s]cleric (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] farmer[s]farmer (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] fisherman[s]fisherman (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] fletcher[s]fletcher (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] leatherworker[s]leatherworker (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] librarian[s]librarian (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] mason[s]mason (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] nitwit[s]nitwit (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] shepherd[s]shepherd (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] tool[ ](smith|maker)[s]tool[ ](smith|maker) (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] weapon[ ]smith[s]weapon[ ]smith (kid[s]|child[ren])losing job, employmentVillager Level/ExperienceExpression
Represents the level/experience of a villager. The level will determine which trades are available to players (value between 1 and 5, defaults to 1). When a villager’s level is 1, they may lose their profession if they don’t have a workstation. Experience works along with the leveling system, determining which level the villager will move to. Experience must be greater than or equal to 0. Learn more about villager levels on Minecraft Wiki
set {_level} to villager level of {_villager}set villager level of last spawned villager to 2add 1 to villager level of target entityremove 1 from villager level of event-entityreset villager level of event-entityset villager experience of last spawned entity to 100Villager ProfessionExpression
Represents the profession of a villager/zombie villager.
set {_p} to villager profession of event-entityvillager profession of event-entity = nitwit professionset villager profession of {_villager} to librarian professiondelete villager profession of event-entityarmorer, armorer profession, armourer, armourer profession, butcher, butcher profession, cartographer, cartographer profession, cleric, cleric profession, farmer, farmer profession, fisherman, fisherman profession, fletcher, fletcher profession, leatherworker, leatherworker profession, librarian, librarian profession, mason, mason profession, nitwit, nitwit profession, no profession, none, none profession, shepherd, shepherd profession, toolsmith, toolsmith profession, unemployed, weaponsmith, weaponsmith professionVillager TypeExpression
Represents the type of a villager/zombie villager. This usually represents the biome the villager is from.
set {_type} to villager type of {_villager}villager type of {_villager} = plainsset villager type of event-entity to plainsVillager TypeType
Represents the different types of villagers. These are usually the biomes a villager can be from.
desert, jungle, plains, savanna, snow, swamp, taigaWake And SleepEffect
Make bats and foxes sleep or wake up. Make villagers sleep by providing a location of a bed. Make players sleep by providing a location of a bed. Using ‘with force’ will bypass “nearby monsters” ,the max distance, allowing players to sleep even if the bed is far away, and lets players sleep in the nether and end. Does not work if the location of the bed is not in the world the player is currently in. Using ‘without spawn location update’ will make players wake up without setting their spawn location to the bed.
make {_fox} go to sleepmake {_bat} stop sleepingmake {_villager} start sleeping at location(0, 0, 0)make player go to sleep at location(0, 0, 0) with forcemake player wake up without spawn location updateWarden Anger LevelExpression
The anger level a warden feels towards an entity. A warden can be angry towards multiple entities with different anger levels. If an entity reaches an anger level of 80+, the warden will pursue it. Anger level maxes out at 150.
set the anger level of last spawned warden towards player to 20clear the last spawned warden's anger level towards playerWarden Most Angered AtExpression
The entity a warden is most angry at. A warden can be angry towards multiple entities with different anger levels.
if the most angered entity of last spawned warden is not player: set the most angered entity of last spawned warden to playerWarning Distance of World BorderExpression
The warning distance of a world border. The player’s screen will be tinted red when they are within this distance of the border. Players only see a red tint when approaching a world’s worldborder and the warning distance has to be an integer greater than or equal to 0.
set world border warning distance of {_worldborder} to 1Warning Time of World BorderExpression
The warning time of a world border. If the border is shrinking, the player’s screen will be tinted red once the border will catch the player within this time period.
set world border warning time of {_worldborder} to 1 secondWeatherExpression
The weather of a world or player. Clearing or resetting the weather of a player will make the player’s weather match the weather of the world. Clearing or resetting the weather of a world will make the weather clear.
set weather to clearweather in "world" is rainyreset custom weather of playerset weather of player to clearclear/sun/sunny, rain/rainy/raining, and thunder/thundering/thunderstormis rainingis sunny in the player's worldmessage "It is %weather in the argument's world% in %world of the argument%"WhetherExpression
A shorthand for returning the result of a condition (true or false). This is functionally identical to using ‘true if
whether <.+>set {fly} to whether player can flybroadcast "Flying: %whether player is flying%"set whether the player can fly to truetoggle whether the player can pick up itemsWhile LoopSection
While Loop sections are loops that will just keep repeating as long as a condition is met.
[do] while <.+>while size of all players < 5: send "More players are needed to begin the adventure" to all players wait 5 secondsset {_counter} to 1do while {_counter} > 1: # false but will increase {_counter} by 1 then get out add 1 to {_counter}# Be careful when using while loops with conditions that are almost# always true for a long time without using 'wait %timespan%' inside it,# otherwise it will probably hang and crash your server.while player is online: give player 1 dirt wait 1 second # without using a delay effect the server will crashWhitelistExpression
An expression for obtaining and modifying the server’s whitelist. Players may be added and removed from the whitelist. The whitelist can be enabled or disabled by setting the whitelist to true or false respectively.
[the] white[ ]listset the whitelist to falseadd all players to whitelistreset the whitelistWill Consume Boosting FireworkCondition
Checks to see if the firework used in an ‘elytra boost’ event will be consumed.
[the] (boosting|used) firework will be consumed[the] (boosting|used) firework (will not|won't) be consumedon elytra boost: if the used firework will be consumed: prevent the used firework from being consumedWill DespawnCondition
Checks if the dropped item will be despawned naturally through Minecraft’s timer.
if all dropped items can despawn naturally: prevent all dropped items from naturally despawningWill DespawnCondition
Checks if the dropped item will be despawned naturally through Minecraft’s timer.
if all dropped items can despawn naturally: prevent all dropped items from naturally despawningWith Fire ResistanceExpression
Creates a copy of an item with (or without) fire resistance.
set {_x} to diamond sword with fire resistanceequip player with netherite helmet without fire resistancedrop fire resistant stone at playerWolfEntity Data
[(baby|young)|(adult|grown(-| )up)] [%wolfvariant%] wol(f|ves) [[with collar] colo[u]r[ed] %color%](wild|untamed) [(baby|young)|(adult|grown(-| )up)] [%wolfvariant%] wol(f|ves) [[with collar] colo[u]r[ed] %color%][(baby|young)|(adult|grown(-| )up)] [%wolfvariant%] dog[s] [[with collar] colo[u]r[ed] %color%]tamed [(baby|young)|(adult|grown(-| )up)] [%wolfvariant%] wol(f|ves) [[with collar] colo[u]r[ed] %color%][%wolfvariant%] [wolf] pup[py|pies] [[with collar] colo[u]r[ed] %color%](angry|aggressive) [(baby|young)|(adult|grown(-| )up)] [%wolfvariant%] wol(f|ves) [[with collar] colo[u]r[ed] %color%](peaceful|neutral|unaggressive) [(baby|young)|(adult|grown(-| )up)] [%wolfvariant%] wol(f|ves) [[with collar] colo[u]r[ed] %color%]Wolf VariantType
Represents the variant of a wolf entity. NOTE: Minecraft namespaces are supported, ex: ‘minecraft:ashen’.
ashen, black, chestnut, pale, rusty, snowy, spotted, striped, woodsset {_nether} to world("%{_world}%_nether")world is "world_nether"teleport the player to the world's spawnset the weather in the player's world to rainset {_world} to world of event-chunkWorldType
One of the server’s worlds. Worlds can be put into scripts by surrounding their name with double quotes, e.g. “world_nether”, but this might not work reliably as text uses the same syntax.
A world's name, as text. Cannot be changed.
<code>"world_name"</code>, e.g. "world"broadcast "Hello!" to the world "world_nether"World BorderExpression
Get the border of a world or a player. A player’s world border is not persistent. Restarts, quitting, death or changing worlds will reset the border.
set {_border} to world border of player's worldif environment of player's world is nether: apply fire resistance to player for 10 minutesnormal, nether, the end, the overworld, custom, the nether, end, overworldworld named {game::world-name}the world "world"World SeedExpression
The seed of given world. Note that it will be returned as Minecraft internally treats seeds, not as you specified it in world configuration.
broadcast "Seed: %seed of player's world%"WorldGuard Move TypeExpressionskript-worldguard
The movement type in a ‘region enter/leave’ event. This represents how the player ended up in/out of a region.
[the] [worldguard] move[ment][ ]typeon region enter: if the movement type is swimming: message "You have swum into %region%!"WorldGuard Move TypeTypeskript-worldguard
The move type in a WorldGuard enter/leave event.
respawn, respawning, gliding, move, embarking, embark, teleport, teleporting, teleportation, riding, ride, non cancellable, cancellable, swimming, not cancellable, glide, moving, swimon region enter: send "The move type is %the move type%"[all [[of] the]|the] worldsloop all worlds: broadcast "You're in %loop-world%" to loop-worldWXYZ Component/CoordinateExpression
Gets or changes the W, X, Y or Z component of anything with these components/coordinates, like locations, vectors, or quaternions. The W axis is only used for quaternions, currently.
set {_v} to vector(1, 2, 3)send "%x of {_v}%, %y of {_v}%, %z of {_v}%"add 1 to x of {_v}add 2 to y of {_v}add 3 to z of {_v}send "%x of {_v}%, %y of {_v}%, %z of {_v}%"set x component of {_v} to 1set y component of {_v} to 2set z component of {_v} to 3send "%x component of {_v}%, %y component of {_v}%, %z component of {_v}%"set {_x} to x of playerset {_z} to z of playerif: {_x} is between 0 and 100 {_z} is between 0 and 100then: set y component of player's velocity to 10X of Item/Entity TypeExpression
An expression for using an item or entity type with a different amount.
give level of player of iron pickaxes to the playerloop 20 times: broadcast "%21 - loop-number% seconds left.." wait 1 secondYaw / PitchExpression
The yaw or pitch of a location or vector. A yaw of 0 or 360 represents the positive z direction. Adding a positive number to the yaw of a player will rotate it clockwise. A pitch of 90 represents the negative y direction, or downward facing. A pitch of -90 represents upward facing. Adding a positive number to the pitch will rotate the direction downwards. Only Paper 1.19+ users may directly change the yaw/pitch of players.
log "%player%: %location of player%, %player's yaw%, %player's pitch%" to "playerlocs.log"set {_yaw} to yaw of playerset {_p} to pitch of target entityset pitch of player to -90 # Makes the player look upwards, Paper 1.19+ onlyadd 180 to yaw of target of player # Makes the target look behind themselvestemperate, warmZombie VillagerEntity Data
[(baby|young)|(adult|grown(-| )up)] zombie villager[s]zombie villager (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] (unemployed|jobless|normal) zombie villager[s](unemployed|jobless|normal) zombie villager (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] zombie armo[u]rer[s]zombie armo[u]rer (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] zombie butcher[s]zombie butcher (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] zombie cartographer[s]zombie cartographer (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] zombie cleric[s]zombie cleric (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] zombie farmer[s]zombie farmer (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] zombie fisherman[s]zombie fisherman (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] zombie fletcher[s]zombie fletcher (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] zombie leatherworker[s]zombie leatherworker (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] zombie librarian[s]zombie librarian (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] zombie mason[s]zombie mason (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] zombie nitwit[s]zombie nitwit (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] zombie shepherd[s]zombie shepherd (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] zombie tool[ ](smith|maker)[s]zombie tool[ ](smith|maker) (kid[s]|child[ren])[(baby|young)|(adult|grown(-| )up)] zombie weapon[ ]smith[s]zombie weapon[ ]smith (kid[s]|child[ren])Zombify VillagerEffect
Turn a villager into a zombie villager. Cure a zombie villager immediately or after specified amount of time. This effect removes the old entity and creates a new entity. Zombifying a villager stored in a variable will update the variable to the new zombie villager. Curing a zombie villager does not update the variable.
zombify last spawned villagerset {_villager} to last spawned villagerzombify {_villager}if {_villager} is a zombie villager: # This will pass because '{_villager}' gets changed to the new zombie villagerset {_villager} to last spawned villagerzombify last spawned villagerif {_villager} is a zombie villager: # This will fail because the variable was not provided when zombifyingunzombify {_zombieVillager}unzombify {_zombieVillager} after 2 seconds