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