| Patterns: |
|
| Since: | 1.0 |
Examples:
aliases:
blacklisted items = TNT, bedrock, obsidian, mob spawner, lava, lava bucket
shiny swords = golden sword, iron sword, diamond sword
| Patterns: |
|
| Required Entries: | |
| Optional Entries: | recipients, permission |
| Since: | 2.13 |
available optional nodes: recipients: The players unto whom reload messages shall be sent. Defaults to console. permission: The permission required to receive reload messages. 'recipients' shall override this node.
Examples:
auto reload:
recipients: "SkriptDev", "61699b2e-d327-4a01-9f1e-0ea8c3f06bc6" and "Njol"
permission: "skript.reloadnotify"
| Patterns: |
|
| Since: | 2.9.0 |
Experimental features may alter the behaviour of Skript and may harbour imperfections. Employ them at thine own peril.
A catalogue of the available experimental features may be found within the changelog for thy version of Skript.
Examples:
using the experiment my-cool-addon-feature
| Patterns: |
|
| Since: | 1.0 2.6 (per-event priority) 2.9 (listening to cancellable events) |
Examples:
broadcast "loading!"
on join:
if {first-join::%player's uuid%} is not set:
set {first-join::%player's uuid%} to now
cancelled block break:
send "<red>You can't break that here" to player
on join with priority lowest:
# called first
on join:
# called second
on join with priority highest:
# called last
| Patterns: |
|
| Since: | 2.2, 2.7 (local functions) |
They may furthermore return a value unto the trigger that hath called upon them.
Mark well that local functions taketh precedence o'er global functions in execution.
Examples:
broadcast {_message} # our message argument is available in '{_message}'
local function giveApple(amount: number) :: item:
return {_amount} of apple
function getPoints(p: player) returns number:
return {points::%{_p}%}
| Patterns: |
|
| Since: | 1.0 |
For instance, an option may represent a message that doth appear in many a place.
Pray observe the example below, which doth showcase this manner of use.
Examples:
no_permission: You're missing the required permission to execute this command!
command /ping:
permission: command.ping
permission message: {@no_permission}
trigger:
message "Pong!"
command /pong:
permission: command.pong
permission message: {@no_permission}
trigger:
message "Ping!"
| Patterns: |
|
| Required Entries: | trigger |
| Optional Entries: | usage, description, prefix, permission, permission message, aliases, executable by, cooldown, cooldown message, cooldown bypass, cooldown storage |
| Since: | 1.0 |
Examples:
usage: A decree for heralding a message unto all souls present.
permission: skript.command.broadcast
permission message: Thou hast not the authority to herald messages
aliases: /bc
executable by: players and console
cooldown: 15 seconds
cooldown message: Thou didst last herald a message %elapsed time% hence. Thou mayest herald another in %remaining time%.
cooldown bypass: skript.command.broadcast.admin
cooldown storage: {cooldown::%player%}
trigger:
broadcast the argument
| Patterns: |
|
| Since: | 1.0 |
This section is not required, yet it doth ensure that a variable possesseth a value should it not exist when the script is laden.
Examples:
{joins} = 0
{balance::%player%} = 0
on join:
add 1 to {joins}
message "Your balance is %{balance::%player%}%"
| Patterns: |
|
| Since: | 2.2-dev19, 2.14 (retain indices when looping) |
| Return Type: | Object |
Examples:
command /leaderboard:
trigger:
loop reversed sorted {most-kills::*}:
send "%loop-counter%. %loop-index% with %loop-value% kills" to sender
| Patterns: |
|
| Since: | 2.2-dev35 |
| Return Type: | Offline Player |
Examples:
| Patterns: |
|
| Since: | 2.4 |
| Return Type: | Living Entity |
Examples:
loop afflicted entities:
if loop-value is a player:
send "HARK: thou hast tread upon an area effect cloud!" to loop-value
| Patterns: | |
| Since: | 2.2-dev18 |
| Return Type: | Boolean |
Examples:
| Patterns: |
|
| Since: | 2.7 |
| Return Type: | Object |
Examples:
trigger:
send all the banished players
| Patterns: |
|
| Since: | 2.6 |
| Return Type: | Text |
Examples:
send "The tally of all script commands: %size of all script commands%"
| Patterns: | |
| Since: | 2.2-dev33 |
| Return Type: | Text |
Examples:
| Patterns: |
|
| Since: | 2.2-dev35 |
| Requirements: | Vault, a permission plugin that supports Vault |
| Return Type: | Text |
Examples:
trigger:
if argument is "list":
send "%all guilds%"
| Patterns: |
|
| Since: | 2.7 |
| Return Type: | Offline Player |
Examples:
| Patterns: |
|
| Since: | 1.0 |
| Return Type: | World |
Examples:
broadcast "Thou art within %loop-world%" to loop-world
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Minecraft Tag |
`minecraft tag` will return only the vanilla tags, `datapack tag` will return only datapack-provided tags, `paper tag` will return only Paper's custom tags (if you are running Paper), and `custom tag` will look in the "skript" namespace for custom tags you've registered.
You can also filter by tag types using "item", "block", or "entity".
Examples:
send paper entity tags
broadcast all block tags
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Script |
Examples:
trigger:
send "All Scripts: %scripts%" to player
send "Loaded Scripts: %enabled scripts%" to player
send "Unloaded Scripts: %disabled scripts%" to player
| Patterns: |
|
| Since: | 2.5 |
| Return Type: | Text |
Examples:
trigger:
send "All Scripts: %scripts%" to player
send "Loaded Scripts: %enabled scripts%" to player
send "Unloaded Scripts: %disabled scripts%" to player
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | Timespan |
Resetting the repose period shall set it to the selfsame span of time as after an allay hath duplicated.
Examples:
add 5 seconds to the duplication repose period of last spawned allay
remove 3 seconds from the duplicating repose period of last spawned allay
clear the clone repose of last spawned allay
reset the cloning repose period of last spawned allay
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | Location |
Examples:
| Patterns: | |
| Since: | 2.10 |
| Return Type: | integer |
Alpha doth represent opacity.
Examples:
set {_red} to red's red value + 10
| Patterns: | |
| Since: | 1.0 2.13 (amounts of) |
| Return Type: | Object |
Examples:
if amount of player's tool > 5:
if amounts of player's tool and player's offhand tool > 5:
| Patterns: |
|
| Since: | 2.12 |
| Return Type: | Timespan |
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.
Examples:
| Patterns: | |
| Since: | 2.10 |
| Return Type: | Number |
Should radians be specified, it converteth the given value unto degrees. This conversion may not be wholly precise,owing to the vagaries of floating point reckoning.
Examples:
{_angle} is 90 # verily true
180 degrees is pi # verily true
pi radians is 180 degrees # verily true
| Patterns: |
|
| Since: | 2.7 |
| Return Type: | Text |
Examples:
type of event-inventory is anvil inventory
if the anvil inscription input of the event-inventory is "FREE OP":
ban player
| Patterns: |
|
| Since: | 2.8.0 |
| Return Type: | integer |
The default value of greatest cost set by vanilla Minecraft is 40.
Examples:
if {AnvilRepairSaleActive} = true:
wait a tick # recommended, to avoid client bugs
set anvil mending cost to anvil mending cost * 50%
send "Anvil mending sale is ON!" to player
on inventory click:
player have permission "anvil.repair.max.bypass"
set greatest mending cost of event-inventory to 99999
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | Object |
Most useful when performing comparisons with variable lists.
Examples:
if any of {teamA::*} are within location(0, 0, 0) and location(10, 10, 10):
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Potion Effect Type |
Examples:
if the applied effect is primary beacon effect:
broadcast "'Tis Primary"
else if applied effect = secondary effect:
broadcast "'Tis Secondary"
| Patterns: |
|
| Since: | 2.5 |
| Return Type: | Enchantment Type |
Deleting or removing the applied enchantments shall prevent the item's enchantment.
Examples:
set the applied enchantments to sharpness 10 and fire aspect 5
| Patterns: | |
| Since: | 1.0, 2.7 (support for command events) |
| Return Type: | Object |
One may also employ the type of the argument in lieu of its index to address the argument, e.g. in the above example 'player-argument' is the same as 'argument 1'.
Pray note that specifying the argument type is only supported in script commands.
Examples:
damage the player-argument by the number-argument
give a diamond pickaxe to the argument
add argument 1 to argument 2
heal the last argument
| Patterns: |
|
| Since: | 1.4.2 |
| Return Type: | Object |
Examples:
loop (argument + 2) / 5 times:
message "Two trifling numbers: %loop-num * 2 - 5%, %2^loop-num - 1%"
message "Thou hast %health of player * 2% half hearts of vigour!"
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | Item |
Examples:
broadcast the old armour piece
| Patterns: |
|
| Since: | 1.0, 2.8.0 (armor), 2.10 (body armor), 2.12 (saddle) 2.12.1 (happy ghast) |
| Return Type: | Slot |
Body armour is a special slot that may only be employed for:
- Horses: Horse armour (functioneth not upon zombie or skeleton horses)
- Wolves: Wolf Armour
- Llamas (common or trader): Carpet
- Happy Ghasts: Harness
Saddle is a special slot that may only be employed for: pigs, striders and horse types (horse, camel, llama, mule, donkey).
Examples:
helmet of player is neither tag values of tag "paper:helmets" nor air # the player weareth a block, e.g. from another plugin
| Patterns: |
|
| Since: | 2.8.0, 2.12 (multiple blocks) |
| Requirements: | Minecraft 1.21.4+ (multiple blocks) |
| Return Type: | Block |
If running Paper 1.21.4+, the plural form of the expression ought be used, as it is more reliable compared to the singular.
Examples:
on projectile hit:
wait 1 tick
break affixed blocks of event-projectile
kill event-projectile
| Patterns: |
|
| Since: | 2.5.1 |
| Return Type: | long |
Examples:
event-projectile is an arrow
set arrow knockback might of event-projectile to 10
| Patterns: |
|
| Since: | 2.5 |
| Return Type: | long |
Examples:
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Banner Pattern |
Examples:
add {_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)
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Item Type |
Note well that not all banner pattern types possess an item.
Examples:
set {_item} to snout banner pattern item
set {_item} to thing banner pattern item
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Banner Pattern |
In order to set a specific position of a banner, there must already be that many patterns upon the banner.
This expression shall add filler patterns to the banner to permit the specified position to be set.
For example, setting the 3rd banner pattern of a banner bearing no patterns shall internally add 3 base patterns, thereby permitting the 3rd banner pattern to be set.
Examples:
broadcast 1st banner pattern of block at location(0,0,0)
clear banner patterns of {_banneritem}
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.2+ |
| Return Type: | Equippable Components |
Examples:
set the looking-glass overlay to "custom_overlay"
set the permitted entities to a zombie and a skeleton
set the donning sound to "block.note_block.pling"
set the donned visage id to "custom_model"
set the shearing sound to "ui.toast.in"
set the armament slot to chest slot
grant event-equippable component to suffer damage when hurt
grant event-equippable component to be dispensed forth
grant event-equippable component to be donned upon entities
grant event-equippable component to be shorn from
grant event-equippable component to exchange armament
set the equippable component of {_item} to {_component}
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Item Type |
Examples:
if the bartering offering is a gold ingot:
broadcast "my precious..."
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Item Type |
Examples:
if the bartering spoils contain a jack o lantern:
remove jack o lantern from bartering spoils
broadcast "'tis not Hallowe'en yet!"
| Patterns: | |
| Since: | 2.10 |
| Return Type: | Potion Effect Type |
The secondary enchantment may be set to any potion, yet the icon within the tableau shall not display true.
The secondary enchantment may only be bestowed when the beacon hath reached its highest tier.
The primary and secondary enchantment cannot be one and the same; the principal shall ever retain the potion type, and the lesser shall be swept clean.
Examples:
set secondary enchantment of {_block} to resistance
| Patterns: | |
| Since: | 2.10 |
| Return Type: | double |
Examples:
set the beacon enchantment reach of the clicked block to 100
| Patterns: |
|
| Since: | 1.0 (basic), 2.0 (extended) |
| Return Type: | Direction |
Examples:
set the block behind the player to water
loop 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 stone
block in horizontal facing of the clicked entity from the player is air
spawn a creeper 1.5 meters horizontally behind the player
spawn a TNT 5 meters above and 2 meters horizontally behind the player
thrust the last spawned TNT in the horizontal direction of the player with speed 0.2
push the player upwards and horizontally forward at speed 0.5
push the clicked entity in in the direction of the player at speed -0.5
open the inventory of the block 2 blocks below the player to the player
teleport the clicked entity behind the player
grow a regular tree 2 meters horizontally behind the player
| Patterns: | |
| Since: | 2.11 |
| Return Type: | integer |
The greatest measure is 5, which cannot be altered.
Examples:
| Patterns: |
|
| Since: | 1.0 |
| Return Type: | Entity |
Thou mayest employ the specific type of the entity involved in the event, e.g. in a 'death of a creeper' event thou canst use 'the creeper' in lieu of 'the entity'.
Examples:
kill the creeper
kill all powered creepers in the wolf's world
projectile is an arrow
| Patterns: | |
| Since: | 2.2-dev34, 2.8.0 (chat format) |
| Return Type: | Inventory |
Examples:
set {_inventory} to a chest inventory with 1 row
set slot 4 of {_inventory} to a diamond named "example"
open {_inventory} to player
open chest inventory named "<#00ff00>hex coloured title!" with 6 rows to player
| Patterns: |
|
| Since: | 2.12 |
| Return Type: | Damage Source |
When setting a 'causing entity' thou must also set a 'direct entity'.
Attributes of a damage source cannot be altered once forged, only whilst within the 'custom damage source' section.
Examples:
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 * 2
| Patterns: | |
| Since: | 1.4.4, 2.6.1 (3D biomes) |
| Return Type: | Biome |
(that is, the altitude (y-coordinate) doth matter not), up until Minecraft 1.15.x.
As of Minecraft 1.16, biomes art now three-dimensional (per block rather than column).
Examples:
every real minute:
loop all players:
biome at loop-player is desert
damage the loop-player by 1
| Patterns: |
|
| Since: | 1.0 |
| Return Type: | Block |
May optionally include a direction withal, e.g. 'block above' or 'block in front of the player'.
Examples:
set block below to air
spawn a creeper above the block
loop blocks in radius 4:
loop-block is obsidian
set loop-block to water
block is a chest:
clear the inventory of the block
| Patterns: | |
| Since: | 1.0 |
| Return Type: | Block |
May optionally include a direction withal, e.g. 'block above' or 'block in front of the player'.
Examples:
set block below to air
spawn a creeper above the block
loop blocks in radius 4:
loop-block is obsidian
set loop-block to water
block is a chest:
clear the inventory of the block
| Patterns: |
|
| Since: | 1.0, 2.9.0 (actual/exact) |
| Return Type: | Block |
The actual aimed-at block shall regard the true bounding shape of the block.
Examples:
set aimed-at block of player to oak_stairs[waterlogged=true]
break aimed-at block of player using player's tool
give player 1 of type of aimed-at block
teleport player to location above aimed-at block
kill all entities in radius 3 around aimed-at block of player
set {_block} to actual aimed-at block of player
break actual aimed-at block of player
| Patterns: |
|
| Since: | 2.6 |
| Requirements: | Minecraft 1.13+ |
| Return Type: | Number |
Examples:
if block fortitude of target block > 5:
| Patterns: | |
| Since: | 2.5, 2.5.2 (set), 2.10 (block displays) |
| Return Type: | Block Data |
These particulars may also be employed to set blocks.
Examples:
set block at player to {_data}
set block particulars of target block to oak_stairs[facing=south;waterlogged=true]
| Patterns: | |
| Since: | 2.7 |
| Requirements: | 1.17+ |
| Return Type: | float |
Examples:
event-block is set
send "Shattering Speed: %shattering speed for player%" to player
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Text |
This shall return a string in the form of "SOUND_EXAMPLE", which may be employed in the play sound syntax.
Pray consult this compendium for a catalogue of sounds in Minecraft, or this tome to visit the Sounds wiki page.
Examples:
set {_sounds::*} to placing sounds of dirt, grass block, blue wool and stone
| Patterns: |
|
| Since: | 1.0, 2.5.1 (within/cuboid/chunk) |
| Return Type: | Block |
May be employed to obtain blocks relative unto other blocks or for looping thereupon.
Blocks from/to and betwixt shall yield a straight line, whereas blocks within shall yield a cuboid.
Examples:
loop blocks betwixt the block below the player and the targeted block:
set the blocks below the player, the victim and the targeted block to air
set all blocks within {loc1} and {loc2} to stone
set all blocks within chunk at player to air
| Patterns: |
|
| Since: | 2.5, 2.8.6 (modify blocks) |
| Return Type: | Block |
Examples:
loop exploded blocks:
add loop-block to {exploded::blocks::*}
on explode:
loop exploded blocks:
if loop-block is grass:
remove loop-block from exploded blocks
on explode:
clear exploded blocks
on explode:
set exploded blocks to blocks in radius 10 around event-entity
on explode:
add blocks above event-entity to exploded blocks
| Patterns: |
|
| Since: | 2.5 |
| Return Type: | Block |
Examples:
| Patterns: |
|
| Since: | 2.1 |
| Requirements: | Supported regions plugin |
| Return Type: | Block |
This expression doth require a supported regions plugin to be installed.
Examples:
clear the loop-block
| Patterns: |
|
| Since: | 2.2-dev31 |
| Return Type: | Text |
Examples:
message "Book Title: %author of event-item%"
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | double |
The breadth cannot be smaller than one.
Examples:
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Living Entity |
Examples:
send "When a %breeding mother% and %breeding father% doth love each other most dearly, they beget a %bred offspring%" to breeder
| Patterns: | |
| Since: | 2.13 |
| Return Type: | Timespan |
Examples:
clear the remaining brewing duration of {_block}
| Patterns: |
|
| Since: | 2.13 |
| Return Type: | Item |
Examples:
set {_results::*} to the brewing results
| Patterns: |
|
| Since: | 2.13 |
| Return Type: | Slot |
Examples:
clear the brewing stand second bottle slot of {_block}
| Patterns: | |
| Since: | 2.13 |
| Return Type: | integer |
Examples:
clear the brewing stand fuel measure of {_block}
| Patterns: | |
| Since: | 2.12 |
| Requirements: | Minecraft 1.20+ |
| Return Type: | Item |
The only blocks that may presently be "dusted" are Suspicious Gravel and Suspicious Sand.
Examples:
set {_gravel}'s brushable treasure to emerald
| Patterns: |
|
| Since: | 2.0 |
| Return Type: | Damage Cause |
Examples:
| Patterns: |
|
| Since: | 2.8.0 |
| Return Type: | Transform Reason |
Examples:
transform reason is infection, drowned or frozen
| Patterns: |
|
| Since: | 2.2-dev35 |
| Return Type: | Teleport Cause |
Examples:
translocation cause is nether portal, end portal or end gateway
cancel event
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Unleash Reason |
Examples:
broadcast "The tether hath been snapped asunder."
| Patterns: | |
| Since: | 2.9.0 |
| Return Type: | integer |
Examples:
loop {_letters::*}:
set {_codepoint} to glyph mark 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 glyph mark of the current character is not
# 1 more than the glyph mark of the previous character
# then the letters are not in order
{_codepoint} - {_previous-codepoint} is not 1
then:
return false
set {_previous-codepoint} to {_codepoint}
return true
| Patterns: |
|
| Since: | 2.9.0 |
| Return Type: | Text |
Examples:
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::*}
| Patterns: | |
| Since: | 2.8.0 |
| Return Type: | Text |
Shouldst thou desire only alphanumeric characters, thou mayst employ the 'alphanumeric' option in the expression.
If strings of more than one character be given, only the first character of each is used.
Examples:
broadcast "%loop-value%"
# 0123456789:;<=>?@ABC... ...uvwxyz
send characters betwixt "0" and "z"
# 0123456789ABC... ...uvwxyz
send alphanumeric characters betwixt "0" and "z"
| Patterns: | |
| Since: | 2.2-dev35, 2.2-dev36 (improved), 2.5.2 (throwable projectiles), 2.10 (item displays), 2.14.1 (arrows) |
| Return Type: | Slot |
For item frames, the item within the frame is returned.
For throwable projectiles (snowballs, enderpearls, and the like) or item displays, it yieldeth the displayed item.
For arrows, it yieldeth the item that shall be claimed when retrieving the arrow. Note that setting the item may not alter the displayedmodel, and that setting a spectral arrow to a common arrow or vice-versa shall not affect the projectile's enchantments.
Other entities possess no chattels.
Examples:
set the chattel within of event-entity to a diamond sword named "Example"
| Patterns: |
|
| Since: | 2.0, 2.2-dev34 (inventories) |
| Return Type: | Object |
set name of <item/inventory> to <text>. Examples:
set tool of player to the player's tool christened "<gold>Wand"
set the name of the player's tool to "<gold>Wand"
open hopper inventory christened "Magic Hopper" to player
| Patterns: |
|
| Since: | 2.0, 2.8.0 (loaded chunks) |
| Return Type: | Chunk |
Examples:
set {_chunks::*} to the laden chunks of the player's world
| Patterns: |
|
| Since: | 2.0, 2.2-dev32 (SHA-256 algorithm), 2.12 (SHA-384, SHA-512) |
| Return Type: | Text |
These ciphering algorithms art not fit for the hashing of passwords.
Shouldst thou handle passwords, employ a hashing algorithm purposely wrought for passwords.
MD5 is deprecated and may be stricken in a future release. It is provided chiefly for backwards compatibility, for it is antiquated and not secure.
SHA is more fortified, yet it is not suited for the ciphering of passwords (even with salting).
When ciphering data, thou must specify algorithms to be employed, for reasons of security!
Pray note that a cipher cannot be reversed under ordinary circumstance. Thou shalt not recover the original value from a cipher with Skript.
Examples:
| Patterns: |
|
| Since: | 1.0, 2.2-dev35 (more clickable things) |
| Return Type: | Object |
Examples:
if the clicked block is a chest:
show the inventory of the clicked block to the player
| Patterns: | |
| Since: | 1.0 |
| Return Type: | Weather Type |
Clearing or resetting the clime of a player shall cause the player's clime to match the clime of the world.
Clearing or resetting the clime of a world shall render the skies clear.
Examples:
clime in "world" is rainy
reset custom clime of player
set clime of player to clear
| Patterns: |
|
| Since: | 1.0 |
| Return Type: | Object |
Examples:
clear the player's coffer
remove 5 wool from the coffer of the clicked block
| Patterns: |
|
| Since: | 2.0, 2.5 (offline players) |
| Requirements: | Vault, an economy plugin that supports Vault |
| Return Type: | Money |
Examples:
remove 20$ from the player's fortune # replace '$' with whatsoever currency thou dost employ
add 200 to the player's coffer # or forgo the currency altogether
| Patterns: |
|
| Since: | 2.14 |
| Return Type: | Color |
Examples:
send color from hex code "FFBBA7"
send color from hex code "#AAFFBBA7"
| Patterns: | |
| Since: | 2.0 |
| Return Type: | Location |
As of Minecraft 1.21.4, the compass is governed by the resource pack and by default shall not point to this compass bearing when employed beyond the overworld dimension.
Examples:
every 5 seconds:
loop all players:
set the loop-player's compass bearing to location of {compass::target::%%loop-player%}
| Patterns: | |
| Since: | 2.3 |
| Return Type: | Player |
Examples:
| Patterns: | |
| Since: | 2.10 |
| Return Type: | Node |
Nodes in Skript configs are inscribed in the format `key: value`.
Section nodes may contain further nodes within their embrace.
Examples:
if text value of {_node} is "french":
broadcast "Bonjour!"
set {_script} to the current script
loop nodes of the current script:
broadcast name of loop-value
| Patterns: |
|
| Since: | 2.1, 2.5.2 (regex support), 2.7 (case sensitivity), 2.10 (without trailing string) |
| Return Type: | Text |
Examples:
set {_s::*} to the string argument cleft at ","
| Patterns: | |
| Since: | 2.10 |
| Return Type: | Loot Context |
Examples:
set {_context} to a plunder context at player:
set plundering fortune value to 10
set plunderer to {_player}
set plundered entity to last spawned pig
give player spoils of treasure ledger "minecraft:entities/iron_golem" with loot context {_context}
| Patterns: |
|
| Since: | 2.14 |
| Return Type: | skriptpotioneffect |
Examples:
hide the effect's icon
hide the effect's particles
| Patterns: |
|
| Since: | 1.3.1 |
| Return Type: | Command Sender |
Examples:
send "message to console" to the console
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | Item |
Examples:
if the consumed morsel is an arrow:
cancel event
send "Thou art not permitted to loose thine arrows." to shooter
on player consume:
if the consumed morsel is cooked porkchop:
send "Well art thou not a little swine most gluttonous!" to player
if player has scoreboard tag "vegetarian":
set the consumed morsel to a carrot
| Patterns: |
|
| Since: | 2.12 |
| Return Type: | Boolean |
Examples:
| Patterns: |
|
| Since: | 2.10 |
| Requirements: | Minecraft 1.20.2+, Minecraft 1.20.5+ (comparisons) |
| Return Type: | Entity Snapshot |
Examples:
broadcast the spawn egg entity of {_item}
spawn a pig at location(0,0,0):
set the max health of entity to 20
set the health of entity to 20
set {_snapshot} to the entity snapshot of entity
clear entity
set the spawn egg entity of {_item} to {_snapshot}
if the spawn egg entity of {_item} is {_snapshot}: # Minecraft 1.20.5+
set the spawn egg entity of {_item} to (random element out of all entities)
set the spawn egg entity of {_item} to a zombie
| Patterns: |
|
| Since: | 2.5, 2.6.1 (final attribute value) |
| Return Type: | Number |
Mark well that the movement speed attribute cannot be reliably employed for players. To that end, use the speed expression instead.
Restoring an entity's attribute to its natural state is only available in Minecraft 1.11 and above.
Examples:
send "Thou art wounded!" to victim
set victim's attack speed attribute to 2
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | integer |
When altering the size of a slime, its health is fully restored and changes shall be wrought upon its max health, movement speed, and attack damage.
The default Minecraft size of a slime is anywhere betwixt 0 and 2, with a maximum of 126.
The default Minecraft size of a phantom is 0 with a maximum size of 64.
Examples:
set entity size of event-entity to 5
set name of event-entity to "King Slime Jorg"
| Patterns: |
|
| Since: | 2.5 |
| Return Type: | Offline Player |
Examples:
if the master of last spawned wolf is player:
| Patterns: |
|
| Since: | 2.10 |
| Requirements: | Minecraft 1.20.2+ |
| Return Type: | Entity Snapshot |
Individual attributes of a snapshot cannot be modified nor retrieved.
Examples:
set the max health of entity to 20
set the health of entity to 20
set {_snapshot} to the entity snapshot of entity
clear entity
spawn {_snapshot} at location(0, 0, 0)
| Patterns: |
|
| Since: | 2.10 |
| Requirements: | Spigot 1.19.2+ |
| Return Type: | Text |
Examples:
set {_sounds::*} to death sounds of (all mobs in radius 10 of player)
| Patterns: |
|
| Since: | 1.2.1, 2.5 (chunks), 2.10 (within) |
| Return Type: | Entity |
all players, all creepers in the player's world, or players in radius 100 of the player. Examples:
send "Psst!" to all players within 100 meters of the player
give a diamond to all ops
heal all tamed wolves in radius 2000 around {town center}
delete all monsters in chunk at player
size of all players betwixt {_corner::1} and {_corner::2}}
| Patterns: | |
| Since: | 2.2-dev17 |
| Return Type: | Slot |
Examples:
set cursor slot of player to 64 diamonds
| Patterns: |
|
| Since: | 2.5 2.12 (floats/flags/strings/colours/full model data) |
| Requirements: | Minecraft 1.21.4+ (floats/flags/strings/colours/full model data) |
| Return Type: | Object |
Since the age of 1.21.4, custom model data doth instead consist 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 may be done type-by-type, or all at once with `complete custom model data`.This is the more precise and recommended method of employing custom model data.
Examples:
set {_model} to custom model data of player's tool
set custom model data colours of {_flag} to red, white, and blue
add 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)
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | double |
Players suffer injury only when venturing beyond the world's boundary, and the damage buffer distance cannot be less than naught.
Examples:
| Patterns: | |
| Since: | 2.2-dev33 |
| Return Type: | Date |
Examples:
set {_hourAfter} to 1 hour after {someOtherDate}
set {_hoursBefore} to 5 hours ere {someOtherDate}
| Patterns: |
|
| Since: | 2.0, 2.7 (support for script commands) |
| Return Type: | Text |
Examples:
on command:
if {game::%player%::playing} is true:
if the decree is not "exit":
message "Thou art not permitted to issue decrees during the game"
cancel the event
| Patterns: | |
| Since: | 2.10 |
| Return Type: | Text |
Examples:
set decree of {_cmdMinecart} to "say asdf"
| Patterns: |
|
| Since: | 2.0 |
| Return Type: | Command Sender |
Shouldst the decree's herald be a command block, its locale may be retrieved by using %block's location%
Examples:
on command:
log "%executor% issued decree /%decree% %arguments%" to "commands.log"
| Patterns: |
|
| Since: | 2.6 |
| Return Type: | Text |
Examples:
description of decree "help"
label of decree "pl"
usage of decree "help"
aliases of decree "bukkit:help"
permission of decree "/op"
decree "op"'s permission message
decree "sk"'s plugin owner
command /greet <player>:
usage: /greet <target>
trigger:
if arg-1 is sender:
send "&cThou canst not greet thine own self! Usage: %the usage%"
stop
send "%sender% doth greet thee!" to arg-1
send "Thou hast greeted %arg-1%!"
| Patterns: | |
| Since: | 2.5 |
| Return Type: | Gamerule Value |
Examples:
| Patterns: | |
| Since: | 2.1 |
| Requirements: | Supported regions plugin |
| Return Type: | Offline Player |
This expression doth require a supported regions plugin to be installed.
Examples:
message "Thou art entering %region% whose lords are %lords of region%"
| Patterns: |
|
| Since: | 2.8.0 |
| Return Type: | Quit Reason |
Examples:
quit reason was kicked
player is banned
clear {server::player::%uuid of player%::*}
| Patterns: |
|
| Since: | 2.2-dev31 |
| Return Type: | Text |
Examples:
| Patterns: |
|
| Since: | 2.2-Fixes-v7, 2.2-dev35 (clearing recipients) |
| Return Type: | Player |
Examples:
| Patterns: | |
| Since: | 1.4 |
| Return Type: | Object |
Examples:
message "Thou must tarry a minute ere using this command again!"
| Patterns: |
|
| Since: | 2.8.0 |
| Return Type: | Text |
Modifications shall affect which commands appear for the player to complete by tabulation. They shall not affect which commands the player may truly execute.
Adding new commands unto the list is forbidden conduct and shall be disregarded.
Examples:
set command list to command list where [input does not contain ":"]
remove "help" from command list
| Patterns: |
|
| Since: | 2.2-dev27 |
| Return Type: | Block |
Examples:
| Patterns: | |
| Since: | 2.10 |
| Return Type: | float |
The default value is 1.0. This value is then multiplied by 64 and the player's entity view distance setting to determine the true range.
For example, a player with 150% entity view distance shall perceive a block display with a view range of 1.2 at 1.2 × 64 × 150% = 115.2 blocks hence.
Examples:
| Patterns: | |
| Since: | 2.10 |
| Return Type: | Timespan |
Interpolation duration is the measure of time a display shall require to interpolate, or shift, betwixt its present state and a new one.
Interpolation delay is the number of ticks ere client-side interpolation shall commence.Setting to 0 seconds shall render it immediate.
Resetting either value shall return that value to 0.
Examples:
| Patterns: | |
| Since: | 2.10 |
| Return Type: | integer |
Unmodified displays shall not possess a brightness override value. Resetting or deleting this value shall remove the override.
Employ the 'block' or 'sky' options to obtain or change specific values, or procure 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 shall set both sky and block light to the given value. Pray ensure thou dost set both block and sky levels to thy desired values for the finest results. Likewise, thou canst only clear the brightness override entire; thou canst not clear the sky/block values individually.
Examples:
subtract 3 from the block light level override of the last spawned text display
if sky light level override of {_display} is 5:
clear brightness override of {_display}
| Patterns: | |
| Since: | before 2.1 2.2-dev20 (inventory name) 2.4 (non-living entity support, changeable inventory name) |
| Return Type: | Object |
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.
Examples:
player has permission "name.red"
set the player's display name to "<red>[admin] <gold>%name of player%"
| Patterns: | |
| Since: | 2.10 |
| Return Type: | Display Billboard |
This describeth the axes and points about which the display may pivot.
Displays are spawned with the 'fixed' billboard by default. Resetting this expression shall likewise set it to 'fixed'.
Examples:
| Patterns: | |
| Since: | 2.10 |
| Return Type: | float |
The rendering culling bounding box doth span horizontally width/2 from the entity's position, which determineth the point at which the display shall be frustum culled (no longer rendered because the game doth judge thou canst no longer perceive it).
If set to 0, no culling shall occur upon both the vertical and horizontal directions. Default is 0.0.
Examples:
| Patterns: | |
| Since: | 2.10 |
| Return Type: | Quaternion |
The left rotation is applied first, with the right rotation then being applied upon the rotated axis.
Examples:
| Patterns: | |
| Since: | 2.10 |
| Requirements: | Spigot 1.20.4+ |
| Return Type: | Timespan |
0 doth signify that updates are applied forthwith.
1 doth signify the display entity shall move from its present position to the new one over a single tick.
Greater values doth spread the movement across many ticks. A maximum of 59 ticks.
Examples:
teleport last spawned text display to {_location}
wait 2 ticks
message "display entity hath arrived at %{_location}%"
| Patterns: | |
| Since: | 2.11 |
| Return Type: | integer |
Simulation distance is the minimum distance in chunks for entities to be set in motion.
Simulation distance is bound by the current view distance of the world or player.
The view distance is bound betwixt 2 and 32 chunks.
Examples:
add 50 to the simulation distance of world "world"
reset the simulation distance of player
clear the simulation distance of world "world"
| Patterns: | |
| Since: | 2.13 |
| Return Type: | Text |
Examples:
| Patterns: | |
| Since: | 2.1 |
| Requirements: | Supported regions plugin |
| Return Type: | Region |
This expression doth require a supported regions plugin to be installed.
Examples:
line 1 of the clicked block is "[dominion info]"
set {_dominions::*} to dominions at the clicked block
if {_dominions::*} is empty:
message "No dominions doth exist at this sign."
else:
message "Dominions encompassing this sign: <gold>%{_dominions::*}%<r>."
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | UUID |
Examples:
if the uuid of the dropped item owner of last dropped item is uuid of player:
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | UUID |
Examples:
if the uuid of the dropped ware thrower of {_dropped item} is uuid of player:
clear the ware thrower of {_dropped item}
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | Timespan |
Examples:
set victim's invulnerability time to 20 ticks #The victim shall suffer no harm for the next second
if the no harm timespan of {_entity} is 0 seconds:
set the invincibility time span of {_entity} to 1 minute
| Patterns: |
|
| Since: | 2.12 |
| Requirements: | Minecraft 1.20+ |
| Return Type: | integer |
The only blocks that may presently be "dusted" are Suspicious Gravel and Suspicious Sand.
Examples:
set {_sand}'s dusted stage to 2
| Patterns: |
|
| Since: | 2.0, 2.7 (relative to last element), 2.8.0 (range of elements) |
| Return Type: | Object |
Requesting elements from a queue shall also remove them from said queue; see the new queue expression for further knowledge.
See also: random expression
Examples:
set {_last} to last element of {top players::*}
set {_random player} to random element out of all players
send 2nd last element of {top players::*} to player
set {page2::*} to elements from 11 to 20 of {top players::*}
broadcast the 1st element in {queue}
broadcast the first 3 elements in {queue}
| Patterns: | |
| Since: | 1.4.3 |
| Return Type: | Number |
Examples:
elevation of the attacker is higher than the elevation of the victim
set damage to damage * 1.2
| Patterns: |
|
| Since: | 2.5 |
| Return Type: | Item Type |
It may be modified, yet enchantments shall still be applied in the enchant event.
Examples:
set the enchanted artefact to a diamond chestplate
on enchant prepare:
set the enchant artefact to a wooden sword
| Patterns: |
|
| Since: | 2.5 |
| Return Type: | long |
This be the number that was displayed upon the enchantment table, not the true number of levels taken away.
Examples:
send "Toll: %the displayed enchanting toll%" to player
| Patterns: |
|
| Since: | 2.5 |
| Return Type: | long |
Examples:
send "There stand %enchantment boon% bookshelves about this enchantment table!" to player
| Patterns: |
|
| Since: | 2.0 |
| Return Type: | long |
Examples:
message "Thou dost wield a blade of sharpness %potency of sharpness of the player's tool% upon thine hand"
| Patterns: | |
| Since: | 2.5 |
| Requirements: | 1.11 or newer |
| Return Type: | Enchantment Offer |
Examples:
send "Thy enchantment propositions are: %the enchantment propositions%" to player
| Patterns: |
|
| Since: | 2.5 |
| Requirements: | 1.11 or newer |
| Return Type: | long |
If the toll be changed, it shall always be at least 1.
This altereth how many levels are required to enchant, yet doth not change the number of levels removed.
To change the number of levels removed, employ the enchant event.
Examples:
| Patterns: |
|
| Since: | 2.2-dev36 |
| Return Type: | Enchantment Type |
Examples:
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | Block Data |
Custom attributes such as NBT or names do not transfer hence.
Blocks, blockdatas and items are acceptable objects to alter the carried block.
Examples:
set the carried block of last spawned enderman to an oak log
set 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}
| Patterns: | |
| Since: | 2.7, 2.10 (maximum) |
| Return Type: | Timespan |
Examples:
send the max burn time of target
| Patterns: |
|
| Since: | 2.5 |
| Return Type: | Boolean |
Examples:
| Patterns: | |
| Since: | 2.11 |
| Return Type: | Object |
Unloaded entities or players who art absent (when employing 'player from %uuid%') shall return naught.
Examples:
set {_offline player} to offline player from {_some uuid}
set {_entity} to entity from {_some uuid}
set {_world} to world from {_some uuid}
| Patterns: |
|
| Since: | 2.2-dev36, 2.10 (add, remove) |
| Return Type: | Object |
Examples:
broadcast "%metadata value "healer" of player%"
clear metadata value "healer" of player
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.2+ |
| Return Type: | Equippable Components |
Examples:
set the armament slot of {_component} to helmet slot
clear the equippable component of {_item}
reset the equippable component of {_item}
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.2+ |
| Return Type: | Equipment Slot |
Examples:
set {_component} to the equippable component of {_item}
set the armament slot of {_component} to boots slot
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.2+ |
| Return Type: | Text |
Examples:
set {_component} to the equippable component of {_item}
set the donned visage id of {_component} to "custom_model"
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.2+ |
| Return Type: | Text |
Examples:
set {_component} to the equippable component of {_item}
set the donning sound of {_component} to "block.note_block.pling"
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.2+ |
| Return Type: | Text |
Examples:
set {_component} to the equippable component of {_item}
set the looking-glass overlay of {_component} to "custom_overlay"
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.2+ |
| Return Type: | Entity Type |
Examples:
set {_component} to the equippable component of {_item}
clear the permitted entities of {_component}
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.6+ |
| Return Type: | Text |
Examples:
set {_component} to the equippable component of {_item}
set the shearing sound of {_component} to "block.note_block.pling"
| Patterns: | |
| Since: | 2.7 |
| Return Type: | Object |
Examples:
delete entity within {_entity} # This banisheth the entity itself and not the value stored in the variable
set {_list::*} to "something", 10, "test" and a zombie
broadcast the strings within {_list::*} # "something", "test"
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Experience Cooldown Change Reason |
Examples:
if xp cooldown change reason is plugin:
#Altered by a plugin
else if xp cooldown change reason is orb pickup:
#Altered by gathering an xp orb
| Patterns: | |
| Since: | 2.10 |
| Return Type: | Timespan |
Experience cooldown is the duration one must wait ere a player may gather another orb of experience.
The cooldown of a player must be 0 to gather another orb of experience.
Examples:
set the xp pickup cooldown of player to 1 hour
if exp collection cooldown of player >= 10 minutes:
clear the experience pickup cooldown of player
| Patterns: |
|
| Since: | 2.5 |
| Return Type: | Number |
When altering the yield, a value exceeding 1 shall function the same as employing 1.
Attempting to set the yield to a value less than 0 shall have no effect.
Examples:
set the explosion's block yield to 10%
| Patterns: |
|
| Since: | 2.5 |
| Return Type: | Number |
When altering the yield, values less than 0 shall be disregarded.
Read this wiki page for further knowledge.
Examples:
set the magnitude of the explosion to 10
| Patterns: | |
| Since: | 2.5, 2.11 (ghasts) |
| Return Type: | Number |
Read this wiki page for further knowledge.
The yield of ghasts may only be set betwixt 0 and 127.
Examples:
set the explosive magnitude of the event-entity to 10
| Patterns: |
|
| Since: | 1.4 |
| Return Type: | Direction |
Examples:
loop blocks from the block below the player in the horizontal facing of the player:
set loop-block to cobblestone
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | World Border |
Borders assigned unto worlds shall apply to all players within that world.
Borders assigned unto players shall apply only to those players, and divers players may possess different borders.
Examples:
set {_location} to location of player
set worldborder of player to a phantasmal 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 5
| Patterns: |
|
| Since: | 2.5 |
| Requirements: | Minecraft 1.13 or newer |
| Return Type: | Block |
Examples:
| Patterns: |
|
| Since: | 2.2-dev19 |
| Return Type: | Number |
Examples:
| Patterns: |
|
| Since: | 2.4 |
| Return Type: | Firework Effect |
Examples:
launch trailing flickering star coloured purple, yellow, blue, green and red fading to pink at target entity
launch ball large coloured red, purple and white fading to light green and black at player's location with duration 1
| Patterns: |
|
| Since: | 2.12 |
| Return Type: | Slot |
Examples:
if the first empty slot in player's inventory is not set:
message "No empty slot available in your inventory!" to player
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | float |
The bearing is measured in degrees, with 0 being positive Z, 90 being negative X, 180 being negative Z, and 270 being positive X.
By default, returneth a value betwixt 0 and 360 degrees.
Examples:
if any:
maximum fishing approaching bearing is bigger than 300.5 degrees
min fishing approach bearing is smaller than 59.5 degrees
then:
cancel event
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Timespan |
May return a timespan of 0 seconds. If altering the value, it ought be at least 1 tick.
Examples:
set fishing bite tarry time to 5 seconds
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Entity |
Examples:
tarry a second
teleport player to fishing hook
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Entity |
Examples:
if hooked creature is a player:
teleport hooked creature to player
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Timespan |
The default minimum value is 5 seconds and the maximum is 30 seconds, ere lure be applied.
Examples:
set min fish tarrying time to 10 seconds
set max fishing tarrying time to 20 seconds
| Patterns: | |
| Since: | 2.0, 2.10 (delete) |
| Requirements: | Vault, a chat plugin that supports Vault |
| Return Type: | Text |
Examples:
cancel event
broadcast "%player's prefix%%player's display name%%player's suffix%: %message%" to the player's world
set the player's prefix to "[<red>Admin<reset>] "
clear player's prefix
| Patterns: |
|
| Since: | 2.12 |
| Return Type: | Damage Source |
Examples:
set the damage type of the forged damage source to magic
| Patterns: | |
| Since: | 1.1 |
| Return Type: | Object |
Note: The past, future and present guises of an expression art sometimes called 'time states' of an expression.
Note 2: If thou dost not specify whether to employ the past or future guise of an expression that hath different values, its default value shall be used, which is customarily the value after the event.
Examples:
former world was "world_nether" # or 'world was'
world will be "world" # or 'world hence the event is'
on tool change:
past tool is an axe
the tool henceforth the event will be air
on weather change:
set {weather::%world%::old} to past weather
set {weather::%world%::current} to the new weather
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | float |
Examples:
set {_context} to a plunder context at player:
set plundering fortune value to 10
set plunderer to player
set plundered entity to last spawned pig
| Patterns: |
|
| Since: | 2.1, 2.5.2 (character at, multiple strings support) |
| Return Type: | Text |
Examples:
message "%portion of {_s} from characters 2 to (the length of {_s} - 1)%" # removes the first and last character from {_s} and sends it to the player or console
set {_characters::*} to characters at 1, 2 and 7 in player's display name
send the last character of all players' names
| Patterns: |
|
| Since: | 2.8.0 |
| Return Type: | double |
Examples:
send action bar "Memory remaining: %free memory%/%max memory%MB" to player
wait 5 ticks
| Patterns: | |
| Since: | 2.10 |
| Return Type: | Function |
Examples:
run {_function} with arguments 13 and true
| Patterns: | |
| Since: | 2.10 |
| Return Type: | Timespan |
- cook time: The measure of time an item hath been smelting.
- total cook time: The full measure of time required to complete the smelting of an item.
- burn time: The measure of time remaining for the present fuel ere another fuel be consumed.
Examples:
set the total cooking time of {_block} to 50
set the fuel burning time of {_block} to 100
on smelt:
if the fuel slot is charcoal:
add 5 seconds to the fuel burn time
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Item |
Only 'smelting item' may be altered.
Examples:
broadcast smelted item
# Or 'result'
on furnace extract:
broadcast extracted item
on fuel burn:
broadcast burned fuel
on smelting commenceth:
broadcast smelting item
clear smelting item
| Patterns: | |
| Since: | 1.0, 2.8.0 (syntax rework) |
| Return Type: | Slot |
Examples:
set the block's ore slot to 64 iron ore
clear the result slot of the block
on smelt:
if the fuel slot is charcoal:
add 5 seconds to the burn time
| Patterns: |
|
| Since: | 2.14 |
| Return Type: | Game Effect |
Examples:
| Patterns: | |
| Since: | 2.7 |
| Return Type: | Timespan |
Examples:
set gather up tarrying of last dropped item to 5 seconds
| Patterns: | |
| Since: | 2.5 |
| Requirements: | 1.13.2+ |
| Return Type: | long |
Examples:
set view distance of player to client gaze distance of player
| Patterns: | |
| Since: | 2.4, 2.11 (worlds) |
| Return Type: | integer |
The gaze reach of a player is the distance in chunks dispatched by the server unto the player.This hath naught to do with client-side gaze reach settings.
Gaze reach is confined betwixt 2 and 32 chunks.
Examples:
add 50 to the gaze reach of world "world"
reset the gaze reach of player
clear the gaze reach of world "world"
| Patterns: |
|
| Since: | 2.5, 2.9.0 (change) |
| Requirements: | Minecraft 1.20.5+ (custom amount) |
| Return Type: | integer |
Note: 'delete' shall strip the max durability from the item (rendering it proof against wear). Deletion requireth Paper 1.21+
Examples:
if max endurance of player's tool is not 0: # Item doth suffer wear
set max endurance of player's tool to 5000
add 5 to max endurance of player's tool
reset max endurance of player's tool
delete max endurance of player's tool
| Patterns: | |
| Since: | 2.7 |
| Return Type: | Timespan |
Examples:
send "thou art upon the verge of freezing!" to the player
| Patterns: |
|
| Since: | 2.3, 2.7 (modify max real players) |
| Return Type: | integer |
'true max players' returneth the veritable count of max players upon the server and may be modified on Paper 1.16 or later.
Examples:
set the max players count to (online players count + 1)
| Patterns: |
|
| Since: | 2.8.0 |
| Return Type: | Timespan |
Certain items, such as bows and shields, bear no limit upon their employment. They shall return 1 hour.
Examples:
broadcast max employment duration of player's tool
| Patterns: |
|
| Since: | 2.1, 2.10 (changeable, inventories) |
| Requirements: | Spigot 1.20.5+ (changeable) |
| Return Type: | integer |
In 1.20.5+, the maximum stack size of items may be set to any integer from 1 to 99, and stacked unto the maximum stack size of the inventory wherein they reside.
Examples:
set the maximum stack size of inventory of all players to 16
add 8 to the maximum stack size of player's tool
reset the maximum stack size of {_gui}
| Patterns: |
|
| Since: | 2.0 |
| Return Type: | Number |
Examples:
set the maximum vigour of the player to 100
spawn a giant
set the last spawned entity's max vigour to 1000
| Patterns: |
|
| Since: | 2.5.2, 2.9.0 (delete) |
| Return Type: | Offline Player |
Players may be inscribed upon or stricken from the guest ledger.
The guest ledger may be enabled or disabled by setting it to true or false respectively.
Examples:
add all players to guest ledger
reset the guest ledger
| Patterns: |
|
| Since: | 2.2-dev35 |
| Requirements: | Vault, a permission plugin that supports Vault |
| Return Type: | Text |
If thou dost employ LuckPerms, ensure vault integration be enabled within the LuckPerms configurations.
Examples:
broadcast "%guild of player%" # this be the player's primary guild
broadcast "%guilds of player%" # these be all of the player's guilds
| Patterns: |
|
| Since: | 1.3.5, 2.8.0 (item damage event) |
| Return Type: | Number |
For entity damage events, perchance disregarding armour, criticals and/or enchantments (remember that in Skript '1' is one full heart, not half a heart).
For items, 'tis the measure of durability harm the item shall suffer.
Examples:
event-item is any tool
clear damage # unbreakable tools as the harm shall be 0
on damage:
increase the harm by 2
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | double |
Players suffer harm only when beyond the realm's boundary, and the harm value cannot be less than 0.
Examples:
| Patterns: | |
| Since: | 2.4 |
| Return Type: | Item Type |
Examples:
set player's tool to diamond hoe harmed by 250
give player diamond sword with damage 700 named "BROKEN SWORD"
set {_item} to diamond hoe with damage value 50 named "SAD HOE"
| Patterns: |
|
| Since: | 2.7 |
| Return Type: | Entity Type |
Examples:
set the hatching creature type to a primed tnt
| Patterns: |
|
| Since: | 2.7 |
| Return Type: | byte |
Pray note that no more than 127 creatures may be hatched at once.
Examples:
set the hatching number to 10
| Patterns: |
|
| Since: | 2.0 |
| Return Type: | Location |
Pray note that this location is only true for entities whose head resteth precisely above their centre, i.e. players, endermen, zombies, skeletons, etc., but not sheep, pigs, nor cows.
Examples:
set the block in front of the player's eyes to glass
loop blocks in front of the player's head:
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | Location |
Examples:
| Patterns: | |
| Since: | 2.6.1 |
| Return Type: | Location |
Examples:
executable by: players
trigger:
teleport player to the center of player's location
send "Thou art no longer ensnared."
| Patterns: | |
| Since: | 2.14 |
| Return Type: | Text |
Examples:
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | integer |
The taming measure of a horse is how near the beast standeth to becoming gentle — the higher the measure, the closer it draws to docility (must lie betwixt 1 and the max taming measure of the horse).
The max taming measure of a horse is how long it shall take ere the horse becometh tame (must be greater than 0).
Examples:
add {_i} to taming spirit of {_horse}
if taming spirit of {_horse} >= max taming spirit of {_horse}:
tame {_horse}
set tamer of {_horse} to {_p}
| Patterns: |
|
| Since: | 2.5 |
| Return Type: | long |
Examples:
send "Thou didst press hotbar button %hotbar button%!"
| Patterns: | |
| Since: | 2.2-dev36 |
| Return Type: | Slot |
To retrieve its number, employ the Slot Index expression.
Use future and past tense to obtain the former slot in an item change event; see the example.
Examples:
set player's presently chosen hotbar slot to slot 4 of player
send "index of player's current hotbar slot = 1" # second slot from the left
on item held change:
if the presently chosen hotbar slot was a diamond:
set the presently chosen hotbar slot to slot 5 of player
| Patterns: | |
| Since: | 1.0 |
| Return Type: | Time |
Employ the "minecraft timespan" syntax to alter the hour according to Minecraft's temporal intervals.
Since Minecraft doth use discrete intervals for time (ticks), altering the hour by real-world minutes or seconds shall change it only approximately.
Subtracting an amount of time from a world's hour shall advance the clock forward by a day.
Examples:
add 2 minecraft hours to hour of world "world"
add 54 real seconds to hour of world "world" # approximately 1 minecraft hour
| Patterns: |
|
| Since: | 2.3 |
| Return Type: | Text |
This may be altered using texts or players within a server list ping event only.Adding players to the list doth mean adding the names of said players.
And mark well that, for example, shouldst there be 5 online players (including the feigned online count) upon the server and the hover list be set to 3 values, Minecraft shall display "... and 2 more ..." at the list's end.in the server and the hover list is set to 3 values, Minecraft will show "... and 2 more ..." at end of the list.
Examples:
clear the hover list
add "&aWelcome to the &6Minecraft &aserver!" to the hover list
add "" to the hover list # A blank line
add "&cThere are &6%online players count% &conline players!" to the hover list
| Patterns: |
|
| Since: | 1.2, 2.10 (displays) |
| Return Type: | Color |
This may also be employed to tint chat messages with "<%hue of ...%>this text is tinted!".
Pray note that firework flourishes support setting, adding, removing, resetting, and deleting; text displays support setting and resetting; and items, entities, and blocks do only support setting, and only for most scarce items/blocks.
Examples:
if event-block is tagged with minecraft tag "wool":
message "This wool block is <%hue of block%>%hue of block%<reset>!"
set the hue of the block to black
| Patterns: | |
| Since: | 2.0 |
| Return Type: | Text |
any hues and chat styles from the message. Parsing all
chat styles requireth this expression to be employed upon the selfsame line with
the send effect.
Examples:
set message to hued message # Safe; only hues get parsed
command /fade <player>:
trigger:
set display name of the player-argument to unhued display name of the player-argument
command /format <text>:
trigger:
message adorned text-argument # Safe, for we send unto whomsoever invoked this command
| Patterns: | |
| Since: | 2.11 |
| Return Type: | Object |
The retrieved colour codes of the string shall be formatted with the colour symbol.
Examples:
set {_color} to the first string hue code of "&aGoodbye!"
send "%{_color}%Howdy!" to all players
| Patterns: | |
| Since: | 1.4, 2.2-dev26 (when used in connect event), 2.3 (when used in server list ping event) |
| Return Type: | Text |
Examples:
broadcast "Banned the IP %IP of player%"
on connect:
log "[%now%] %player% (%ip%) hath connected to the server."
on server list ping:
send "%IP-address%" to the console
| Patterns: |
|
| Since: | 2.8.0 |
| Return Type: | Item |
Examples:
if victim's active tool is a bow:
interrupt player's active item use
| Patterns: |
|
| Since: | 1.0 |
| Return Type: | Slot |
Examples:
player's off hand implement is a shield
set implement of all players to a diamond sword
set offhand implement of target entity to a bow
| Patterns: |
|
| Since: | 2.2-dev13b, 2.9.0 (breakable) |
| Return Type: | Item Type |
Examples:
give breakable {_weapon} to all players
| Patterns: | |
| Since: | 2.2-dev35, 2.8.0 (raw index) |
| Return Type: | long |
Raw index of a slot is unique unto the view, see Minecraft Wiki
Examples:
send "Thou hast purchased a pie!"
if display name of player's top inventory is "Custom Menu": # 3 rows inventory
if raw index of event-slot > 27: # outside custom inventory
cancel event
| Patterns: | |
| Since: | 2.1, 2.12 (indices, positions of list) |
| Return Type: | Object |
Using 'indices/positions of %objects% in %objects%', thou canst obtain the indices or positions of a list wherein the value at that index matcheth the provided value.Indices are supported only for keyed expressions (e.g. variable lists) and shall return the string indices of the given value.Positions may be used with any list and shall return the numerical position of the value in the list, counting upward from 1.Additionally, naught is returned if the value is not found within the list.
Whether string comparison respecteth case or not may be configured in Skript's config file.
Examples:
if {_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, 3
set {_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 6
set {_otherlist::bar} to 100
set {_otherlist::hello} to "hi"
set {_otherlist::burb} to 100
set {_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 4
| Patterns: | |
| Since: | 2.4 (indices), 2.6.1 (sorting) |
| Return Type: | Text |
To sort the indices, all objects within the list must be comparable;
Otherwise, this expression shall merely return the unsorted indices.
Examples:
broadcast "%indices of {l::*}%" # result is 1, 2 and 3", "
set {_leader-board::first} to 17
set {_leader-board::third} to 30
set {_leader-board::second} to 25
set {_leader-board::fourth} to 42
set {_ascending-indices::*} to sorted indices of {_leader-board::*} in ascending order
broadcast "%{_ascending-indices::*}%" #result is first, second, third, fourth
set {_descending-indices::*} to sorted indices of {_leader-board::*} in descending order
broadcast "%{_descending-indices::*}%" #result is fourth, third, second, first
| Patterns: |
|
| Since: | 2.2-dev32d |
| Return Type: | double |
Examples:
| Patterns: |
|
| Since: | 2.1 |
| Return Type: | Text |
Examples:
| Patterns: | |
| Since: | 2.10 |
| Return Type: | Text |
Pray note that presently thou mayest only employ Skript chat codes when running Paper.
Examples:
| Patterns: | |
| Since: | 1.3 |
| Return Type: | Text |
Examples:
line 2 of the clicked block is "[Heal]":
heal the player
set line 3 to "%player%"
| Patterns: |
|
| Since: | 2.8.0 |
| Return Type: | Inventory |
Examples:
holder of event-initiator-inventory is a chest
broadcast "Item transport transpiring at %location at holder of event-initiator-inventory%!"
| Patterns: | |
| Since: | 2.14 |
| Return Type: | Number |
Examples:
set interaction breadth of last spawned interaction to 2
| Patterns: | |
| Since: | 2.0 |
| Return Type: | Object |
This expression may be employed in two manners: One which interpreteth the entire text as a single instance of a type, e.g. as a number, and one that interpreteth the text according to a pattern.
If the given text could not be interpreted, this expression shall return nothing and the parse error shall be set if some intelligence is available.
Some notes upon interpreting with a pattern:
- The pattern must needs be a Skript pattern, e.g. percent signs are employed to define where to interpret which types, e.g. place a %number% or %items% in the pattern if thou expectest a number or sundry items there.
- Thou must needs save the expression's value in a list variable, e.g.
set {parsed::*} to message interpreted as "...".- The list variable shall contain the interpreted values from all %types% in the pattern in order. If a type was plural, e.g. %items%, the variable's value at the respective index shall be a list variable, e.g. the values shall be stored in {parsed::1::*}, not {parsed::1}.
Examples:
on chat:
set {var::*} to message interpreted as "buying %items% for %money%"
if parse error is set:
message "%parse error%"
else if {var::*} is set:
cancel event
remove {var::2} from the player's balance
give {var::1::*} to the player
| Patterns: |
|
| Since: | 2.0 |
| Return Type: | Text |
Examples:
if {var} is not set:
parse error is set:
message "<red>Line 1 is invalid: %last parse error%"
else:
message "<red>Prithee place an integer upon line 1!"
| Patterns: |
|
| Since: | 2.2-dev16 |
| Return Type: | Inventory Action |
Examples:
| Patterns: |
|
| Since: | 2.8.0 |
| Return Type: | Inventory Close Reasons |
Examples:
inventory closing reason is teleport
send "Thine inventory was shut by virtue of teleportation!" to player
| Patterns: |
|
| Since: | 2.2-dev34, 2.5 (slots) |
| Return Type: | Object |
NOTE: The 'beholders' expression returneth a list of players viewing the inventory. Prithee note that a player is considered to be viewing their own inventory and internal crafting screen even when said inventory is not open.
Examples:
keeper of player's top inventory
{_inventory}'s beholders
| Patterns: | |
| Since: | 2.2-dev24 |
| Return Type: | Slot |
Examples:
set slot 0 of player to 2 stones
remove 1 stone from slot 0 of player
add 2 stones to slot 0 of player
clear slot 1 of player
| Patterns: |
|
| Since: | unknown (before 2.1) |
| Return Type: | Item |
Examples:
item is a clock
set the time to 6:00
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.2+ |
| Return Type: | Item Component |
Examples:
| Patterns: |
|
| Since: | 2.8.0 2.12 (cooldown group) |
| Requirements: | MC 1.21.2 (cooldown group) |
| Return Type: | Timespan |
Examples:
set item cooldown of player's tool for player to 1 minute
set item cooldown of stone and grass for all players to 20 seconds
reset item cooldown of cobblestone and dirt for all players
| Patterns: | |
| Since: | 2.10 |
| Return Type: | Item Display Transforms |
Examples:
set the item transform of the last spawned item display to no transform # Restore to default
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Item Flag |
Examples:
add hide potion effects to item flags of player's held item
remove hide enchants from item flags of {legendary sword}
| Patterns: |
|
| Since: | 2.2-dev24 |
| Return Type: | long |
Examples:
| Patterns: |
|
| Since: | 2.10, 2.11 (all itemflags) |
| Return Type: | Item Type |
Examples:
set {_item} to player's tool with item banner hide additional tooltip
give player torch with hide placed on item banner
set {_item} to diamond sword with all item banners
| Patterns: |
|
| Since: | 2.12 |
| Return Type: | Object |
For instance, when setting a list variable or passing an expression unto a function.
Examples:
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 4
| Patterns: |
|
| Since: | 1.4, 2.5.2 (potion effect), 2.7 (block datas), 2.10 (enchantment type) |
| Return Type: | Object |
Kinds of items, blocks, and block datas art item types akin unto them, yet bearing amounts
of one, no display names, and upon Minecraft 1.13 and newer editions, remaining undamaged.
Kinds of entities and inventories art entity types and inventory types known unto Skript.
Kinds of potion effects art potion effect types.
Kinds of enchantment types art enchantments.
Examples:
message "This be a %kind of clicked entity%!"
| Patterns: |
|
| Since: | 2.7 |
| Return Type: | Text |
Examples:
broadcast "This server doth employ the Vault plugin!"
send "Plugins (%size of loaded plugins%): %plugins%" to player
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Location |
It may also be set, reset, and deleted if the player doth presently walk the server.
Examples:
teleport player to last demise location of (random element out of all players)
| Patterns: |
|
| Since: | 2.12 |
| Return Type: | Text |
Examples:
set worldborder center of {_border} to location(0, 0, NaN value)
if last ensnared 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)
| Patterns: | |
| Since: | 2.14 |
| Return Type: | Offline Player |
Examples:
feed the last player who interacted with {_i}
| Patterns: |
|
| Since: | 2.14 |
| Return Type: | Date |
Examples:
| Patterns: |
|
| Since: | 2.3 |
| Return Type: | Server Icon |
Examples:
| Patterns: | |
| Since: | 2.4 |
| Return Type: | Resource Pack State |
Examples:
| Patterns: |
|
| Since: | 1.3 (spawned entity), 2.0 (shot entity), 2.2-dev26 (dropped item), 2.7 (struck lightning, firework) |
| Return Type: | Entity |
Examples:
set {healer::%summoned priest%} to true
shoot an arrow from the last summoned entity
ignite the loosed projectile
drop a diamond sword
push last let fall item upwards
teleport player to last struck lightning
delete last launched firework
| Patterns: |
|
| Since: | 2.5.1 |
| Return Type: | Number |
Examples:
| Patterns: |
|
| Since: | 2.2-Fixes-V10 |
| Return Type: | Damage Cause |
Examples:
| Patterns: |
|
| Since: | 2.5 |
| Return Type: | Date |
Examples:
trigger:
send "Thou hast been present for %difference between player's last arrival and now%."
send "Thou first graced this server %difference between player's first arrival and now% ago."
| Patterns: |
|
| Since: | 2.2-dev16 (lowercase and uppercase), 2.5 (advanced cases) |
| Return Type: | Text |
Examples:
"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?
| Patterns: | |
| Since: | INSERT VERSION |
| Return Type: | Location |
Examples:
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Location |
Examples:
set {_context} to a plunder context at player:
if {_player} is in "world_nether":
set plundering locale to location of last spawned pig
send plundering locale of {_context} to player
| Patterns: |
|
| Since: | 2.8.0 |
| Return Type: | long |
Examples:
give player 1 stone
wait 5 ticks
if loop-tally > 30:
stop loop
loop {top-balances::*}:
if loop-iteration <= 10:
broadcast "#%loop-iteration% %loop-index% hath $%loop-value%"
| Patterns: |
|
| Since: | 1.0, 2.8.0 (loop-counter), 2.10 (previous, next) |
| Return Type: | Object |
Examples:
loop 10 times:
message "%11 - loop-number%"
wait a second
# Generate a 10x10 floor made of randomly coloured wool beneath the player
loop 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 wool
loop {top-balances::*}:
loop-iteration <= 10
send "#%loop-iteration% %loop-index% hath $%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
| Patterns: | |
| Since: | 2.2-dev34, 2.9.0 (lowest solid block, 'non-air' option removed, additional syntax option) |
| Return Type: | Block |
Pray note that the y-coordinate of the location is not regarded in this expression.
Examples:
set the highest solid block at the player's location to the lowest solid block at the player's location
| Patterns: | |
| Since: | 1.3.4 |
| Return Type: | byte |
It may be divided into sunlight (15 = direct sunlight, 1-14 = indirect) and block light (torches, glowstone, and the like). The total luminance of a block is the greater of the two different light types.
Examples:
every 5 seconds:
loop all players:
{vampire::%uuid of loop-player%} is true
sun luminance level at the loop-player is greater than 10
ignite the loop-player for 5 seconds
| Patterns: | |
| Since: | 2.7 |
| Return Type: | Moon Phase |
Examples:
send "Beware the wolves upon this night!"
| Patterns: |
|
| Since: | 2.9.0, 2.10 (of items) |
| Return Type: | Offline Player |
Examples:
set skull owner of {_block} to "Njol" parsed as offlineplayer
set head owner of player's tool to {_player}
| Patterns: | |
| Since: | 2.7 |
| Return Type: | integer |
For blocks, 'Maturity' doth represent the sundry stages of growth through which a crop-like block may pass.A value of 0 doth indicate the crop was freshly sown, whilst a value equal to 'maximum maturity' doth indicate the crop is ripe and ready for the harvest.
For entities, 'Maturity' doth represent the time remaining ere they become full-grown, and it be in the negative, ascending to 0 which doth signify adulthood,e.g. A calf doth require 20 minutes to become a bull, which equateth to 24,000 ticks, so its maturity shall be -24000 upon spawning.
Examples:
set maturity of targeted block to maximum maturity of targeted block
# Spawn a baby cow that will only need 1 minute to become an adult
spawn a baby cow at player
set maturity of last spawned entity to -1200 # in ticks = 60 seconds
| Patterns: |
|
| Since: | 2.13 |
| Return Type: | double |
Examples:
| Patterns: |
|
| Since: | 2.13 |
| Return Type: | float |
Examples:
| Patterns: |
|
| Since: | 2.13 |
| Return Type: | integer |
Examples:
| Patterns: |
|
| Since: | 2.13 |
| Return Type: | long |
Examples:
| Patterns: |
|
| Since: | 2.5.1 |
| Return Type: | double |
Examples:
increase the mending amount by 2
remove 0.5 from the mending amount
| Patterns: |
|
| Since: | 2.5 |
| Return Type: | Heal Reason |
Examples:
mending reason is satiated
send "Thou hast supped enough and regained thy full vigour!"
| Patterns: |
|
| Since: | 2.5.1 |
| Return Type: | long |
Altering the restoration amount shall affect how much experience is bestowed upon the player after mending.
Examples:
set the mending restoration amount to 100
| Patterns: | |
| Since: | 2.13 |
| Return Type: | Object |
Examples:
set {_centerBlock} to the block at {_center}
set {_midpoint} to the mid-point betwixt vector(20, 10, 5) and vector(3, 6, 9)
| Patterns: |
|
| Since: | 2.1.1 |
| Return Type: | Player |
Examples:
!kick mineself
!give a diamond axe to me
| Patterns: | |
| Since: | 2.5.1 |
| Return Type: | Vector |
Examples:
set derailed velocity of event-entity to vector 2, 10, 2
| Patterns: |
|
| Since: | 2.13 |
| Return Type: | double |
Examples:
| Patterns: |
|
| Since: | 2.13 |
| Return Type: | float |
Examples:
| Patterns: |
|
| Since: | 2.13 |
| Return Type: | integer |
Examples:
| Patterns: |
|
| Since: | 2.13 |
| Return Type: | long |
Examples:
| Patterns: |
|
| Since: | 1.4.6 (chat message), 1.4.9 (join & quit messages), 2.0 (death message), 2.9.0 (clear message), 2.10 (broadcasted message) |
| Return Type: | Text |
Examples:
player has permission "admin"
set message to "&c%message%"
on first join:
set join message to "Welcome %player% to our most wondrous server!"
on join:
player has played before
set join message to "Welcome back, %player%!"
on quit:
if {vanish::%player's uuid%} is set:
clear quit message
else:
set quit message to "%player% hath departed this wondrous server!"
on death:
set the death message to "%player% hath perished!"
on broadcast:
set broadcast message to "&a[PROCLAMATION] %broadcast message%"
| Patterns: |
|
| Since: | 2.7 |
| Return Type: | Entity |
Examples:
teleport player to the nearest cow relative to player
teleport player to the nearest entity relative to player
on click:
kill nearest pig
| Patterns: |
|
| Since: | 2.2-dev32d |
| Return Type: | double |
NaN is deliberately not equal to any other number, including itself.
Examples:
if isNaN({_number}) is true:
| Patterns: | |
| Since: | before 2.1 2.2-dev20 (inventory name) 2.4 (non-living entity support, changeable inventory name) 2.7 (worlds) |
| Return Type: | Object |
Players: The Minecraft account name of the player. Can't be changed.
Entities: The custom name of the entity. Can be changed. But for living entities, the players will have to target the entity to see its name tag. For non-living entities, the name will not be visible at all. To prevent this, use 'display name'.
Items: The custom name of the item (not the Minecraft locale name). Can be changed.
Inventories: The name/title of the inventory. Changing name of an inventory means opening the same inventory with the same contents but with a different name to its current viewers.
Gamerules: The name of the gamerule. Cannot be changed.
Worlds: The name of the world. Cannot be changed.
Scripts: The name of a script, excluding its file extension.
Examples:
player has permission "name.red"
set the player's display name to "<red>[admin] <gold>%name of player%"
set the name of the player's tool to "Legendary Sword of Awesomeness"
| Patterns: | |
| Since: | 2.4, 2.9.2 (trial spawner), 2.12 (delete) |
| Requirements: | Minecraft 1.20.0+ (delete) |
| Return Type: | Entity Type |
Examples:
if event-block is a spawner:
send "The spawner's nature is %spawner type of event-block%" to player
set the creature type of {_spawner} to a trader llama
reset {_spawner}'s entity type # Pig
clear the spawner type of {_spawner} # Minecraft 1.20.0+
| Patterns: |
|
| Since: | 2.2-dev32d |
| Return Type: | double |
Examples:
| Patterns: |
|
| Since: | 2.5 |
| Return Type: | Text |
Examples:
| Patterns: |
|
| Since: | 2.5.2 2.14 (syntax changes, infinite duration support) |
| Return Type: | skriptpotioneffect |
Examples:
hide the effect's icon
hide the effect's particles
add strength 5 to the potion effects of the player's tool
apply invisibility to the player for 5 minutes:
hide the effect's particles
add a potion effect of speed 1 to the potion effects of the player
# conjures a potion effect with the properties of an existing potion effect
set {_potion} to a potion effect of slowness wrought from the player's speed effect
| Patterns: |
|
| Since: | 2.5.2 2.14 (syntax changes, infinite duration support) |
| Return Type: | skriptpotioneffect |
Examples:
hide the effect's icon
hide the effect's particles
add strength 5 to the potion effects of the player's tool
apply invisibility to the player for 5 minutes:
hide the effect's particles
add a potion effect of speed 1 to the potion effects of the player
# conjures a potion effect with the properties of an existing potion effect
set {_potion} to a potion effect of slowness wrought from the player's speed effect
| Patterns: |
|
| Since: | 2.8.0 |
| Return Type: | Item |
Examples:
drawn bow's name is "Spectral Bow"
if nocked shaft is not a spectral arrow:
cancel event
| Patterns: | |
| Since: | 1.0 2.13 (numbers of) |
| Return Type: | Object |
Examples:
| Patterns: | |
| Since: | 1.4.6 (integers & numbers), 2.5.1 (decimals) |
| Return Type: | Number |
Employ 'numbers' if thy start is not an integer and thou wouldst keep the fractional part of the start number constant, or employ 'integers' if thou desirest only to loop integers.
Thou mayest also employ 'decimals' if thou wouldst use the decimal precision of the start number.
Thou mayest wish to employ the 'times' expression instead, for instance 'loop 5 times:'
Examples:
loop integers from 2.9 to 5.1: # same as '3 to 5', i.e. loops 3, 4, 5
loop decimals from 3.94 to 4: # loops 3.94, 3.95, 3.96, 3.97, 3.98, 3.99, 4
| Patterns: |
|
| Since: | 2.2-dev36, 2.9.0 (input index) |
| Return Type: | Object |
For example, shouldst thou run 'broadcast "something" and "something else" where [offering is "something"]
the condition would be tested twice, employing "something" and "something else" as the offerings.
The 'offering index' pattern may be used when acting upon a variable to access the index of the offering.
Examples:
sort {_list::*} based on length of offering index
| Patterns: |
|
| Since: | 2.12 |
| Return Type: | Text |
Examples:
on-screen banishment message is "Invalid hotbar selection (Hacking?)"
cancel event
| Patterns: |
|
| Since: | 2.3 |
| Return Type: | long |
true online player count shall always return the veridical count of online players and cannot be altered. Examples:
# This shall render the max players count 5 if there be 4 players online.
set the false max players count to (online player count + 1)
| Patterns: |
|
| Since: | 2.2-dev31, 2.7 (changers) |
| Return Type: | Text |
Note: In order to modify the pages of a newly writ book, thou must have the title and author
of the book set. Skript shall do this for thee, but if thou desirest thine own, pray set those values.
Examples:
message "Book Pages: %pages of event-item%"
message "Book Page 1: %page 1 of event-item%"
set page 1 of player's held item to "Book writing"
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | Gene |
Examples:
set the main lineage of last spawned panda to playful
| Patterns: | |
| Since: | 2.14 |
| Return Type: | Particle |
More detailed intelligence on particle behaviour may be found at Paper's particle documentation.
Examples:
render 12 red dust particles bearing a distribution of vector(1,2,1) at player's head location
| Patterns: | |
| Since: | 2.14 |
| Return Type: | Particle |
More detailed intelligence on particle behaviour may be found at Paper's particle documentation.
Examples:
render 12 red dust particles bearing an extra value of 0.4 at player's head location
| Patterns: | |
| Since: | 2.14 |
| Return Type: | Number |
This doth mean that setting the particle count may alter how thy particle behaveth. Take heed!
More detailed intelligence on particle behaviour may be found at Paper's particle documentation.
Examples:
| Patterns: | |
| Since: | 2.14 |
| Return Type: | Vector |
Particles shall be randomly drawn according to these values, clustering towards the centre. 68% of particles shall fall within 1 standard deviation, 95% within 2, and 99.7% within three. The region wherein the particles shall spawn may be roughly estimated as being within 2 times the standard deviation upon each axis.
For example, a distribution of 1, 2, and 1 would spawn particles within roughly 2 blocks upon the x and z axes, and within 4 blocks upon the y axis.
Pray note that distributions take effect only if the particle count be greater than 0! Particles with counts of 0 possess no distributions. If the particle count be 0, the offset is treated differently depending upon the particle.
More detailed intelligence on particle behaviour may be found at Paper's particle documentation.
Examples:
| Patterns: | |
| Since: | 2.14 |
| Return Type: | Vector |
More detailed intelligence on particle behaviour may be found at Paper's particle documentation.
Examples:
| Patterns: | |
| Since: | 2.14 |
| Return Type: | Number |
More detailed intelligence on particle behaviour may be found at Paper's particle documentation.
Examples:
set the particle swiftness of {_my-flame-particle} to 0
| Patterns: |
|
| Since: | 2.14 |
| Return Type: | Particle |
Examples:
render 3 blue trail particles moving to player's target over 3 seconds at player
| Patterns: |
|
| Since: | 2.9.0 |
| Return Type: | long |
Examples:
send "It hath been %days of {_t}% day(s) since the last disbursement."
| Patterns: |
|
| Since: | 2.7 |
| Return Type: | double |
Examples:
| Patterns: | |
| Since: | 2.2-dev36 |
| Return Type: | long |
Examples:
trigger:
send "%arg-1%'s ping is %arg-1's ping%"
| Patterns: | |
| Since: | 2.10 |
| Requirements: | Spigot 1.19+ |
| Return Type: | Text |
This expression shall return naught, owing to Bukkit's limitations.
Examples:
remove "text" from {_p}'s chat completions
clear player's chat completions
| Patterns: | |
| Since: | 2.6.2 |
| Return Type: | integer |
Examples:
trigger:
send "Protocol version of %arg-1%: %protocol version of arg-1%"
| Patterns: | |
| Since: | 2.13 |
| Return Type: | Player |
`delete` shall remove all online players from the roster.
`reset` shall restore the roster to its default state, rendering all players visible once more.
Examples:
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Loot Context |
Examples:
broadcast plunder context
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Entity |
Examples:
set {_context} to a plunder context at player:
set looting luck value to 10
set looter to player
set plundered entity to last spawned pig
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Player |
Examples:
set {_context} to a plunder context at player:
set looting luck value to 10
set plunderer to player
set plundered entity to last spawned pig
| Patterns: |
|
| Since: | 2.4 |
| Return Type: | Block |
Examples:
loop portal blocks:
broadcast "%loop-block% doth form part of a portal!"
| Patterns: | |
| Since: | 2.8.0 |
| Return Type: | Timespan |
Players in survival or adventure receive a cooldown of half a second, whilst those in creative receive none at all.
Resetting shall restore the cooldown to the default 15 seconds for non-player entities and half a second for players.
Examples:
wait 1 tick
set portal cooldown of event-entity to 5 seconds
| Patterns: | |
| Since: | 2.8.0 |
| Return Type: | Number |
Examples:
set damage to 125 percent of damage
set {_result} to {_percent} percent of 999
set {_result::*} to 10% of {_numbers::*}
set experience to 50% of player's total experience
| Patterns: |
|
| Since: | 2.7 2.14 (support for potion effect objects, changing) |
| Return Type: | integer |
Examples:
add 10 to the amplifier of the player's speed effect
| Patterns: |
|
| Since: | 2.14 |
| Return Type: | Timespan |
Examples:
add 10 seconds to the duration of the player's speed effect
| Patterns: |
|
| Since: | 2.14 |
| Requirements: | Minecraft 1.21+ |
| Return Type: | Potion Effect Type Category |
That is to say, whether the potion effect type be beneficial, harmful, or of neutral disposition.
Examples:
if the potion effect type category is harmful:
message "Thou hast been afflicted with %potion effect type%"
| Patterns: |
|
| Since: | 2.14 |
| Requirements: | Paper 1.20.4+ for hidden effects |
| Return Type: | skriptpotioneffect |
When an entity is afflicted by a potion effect yet already possesseth a weaker form of that same type, the lesser version becometh hidden.Should the weaker version endure longer, it doth return once the mightier version hath expired.
NOTE: Hidden effects may not be altered.
Examples:
add 10 seconds to the player's slowness effect
clear the player's hidden strength effects
reset the player's weakness effects
delete the player's active jump boost effect
| Patterns: |
|
| Since: | 2.5.2, 2.14 (active/hidden support, more change modes) |
| Requirements: | Paper 1.20.4+ for hidden effects |
| Return Type: | skriptpotioneffect |
When an entity is afflicted by a potion effect yet already possesseth a weaker form of that same type, the lesser version becometh hidden.Should the weaker version endure longer, it doth return once the mightier version hath expired.
NOTE: Hidden effects may not be altered.
NOTE: Clearing the base potion effects of a potion item is not possible. Shouldst thou desire such, merely set the item to a water bottle.
Examples:
clear the player's hidden potion effects
add the potion effects of the player to the potion effects of the player's tool
reset the potion effects of the player's tool
remove speed and night vision from the potion effects of the player
| Patterns: | |
| Since: | 2.2-dev24, 2.2-dev35 (Just 'current inventory' works in player events) |
| Return Type: | Inventory |
If no inventory standeth open, it returneth the player's own crafting inventory.
Examples:
| Patterns: |
|
| Since: | 2.3 |
| Return Type: | Text |
'default MOTD' returneth the default proclamation evermore and cannot be changed.
Examples:
set the proclamation of the day to "Come hither and join!"
| Patterns: |
|
| Since: | 2.5.1 |
| Return Type: | Boolean |
Examples:
event-projectile is an arrow
set projectile critical mode of event-projectile to true
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | float |
Examples:
set the velocity of shooter to vector(0,1,0) * projectile force
| Patterns: |
|
| Since: | 2.3 |
| Return Type: | long |
If this protocol version doth not accord with the protocol version of the client, the client shall behold the version string.
Yet pray note that this expression hath no visible effect upon the version string.For example, if the server employeth PaperSpigot 1.12.2 and thou dost set the protocol version to 107 (1.9),
the version string shall not read "Paper 1.9"; it shall remain "Paper 1.12.2".
But then thou mayest customise the version string as thou dost wish.
Also, if the protocol version of the player exceedeth that of the server, it shall proclaim
"Server out of date!", and if the reverse, "Client out of date!" when one hovers upon the ping bars.
This may be set only within a server list ping event
(increase and decrease effects cannot be employed, for such would be without sense).
Examples:
set the version string to "<light green>Version: <orange>%minecraft version%"
set the protocol version to 0 # 13w41a (1.7) - thus the player shall behold the custom version string nearly always
| Patterns: |
|
| Since: | 2.0 |
| Return Type: | long |
Examples:
| Patterns: |
|
| Since: | 1.4.2, 2.7 (Reset), 2.8.0 (ignore blocks, ray size) |
| Return Type: | Entity |
For mobs and experience orbs, this is the entity they pursue or assail (if any).
The 'ray size' and 'ignoring blocks' provisions are only valid for players' quarries.
The 'ray size' provision doth effectively enlarge the area about the crosshair wherein an entity may dwell. It accomplisheth this by expanding the bounding volumes of entities by the given measure. Display entities possess a bounding volume of naught, thus employing the 'ray size' provision can prove most helpful when targeting them.
May grasp entities dwelling in unloaded chunks.
Examples:
if entity's quarry is a player:
send "Thou art pursued by an %entity%!" to quarry of entity
reset quarry of entity # Renders the entity without a quarry
delete quarried entity of player # for players it shall delete the quarry
delete quarry of last spawned zombie # for entities it shall render them without quarry
| Patterns: |
|
| Since: | 2.10 (experimental) |
| Return Type: | Queue |
using queues experimental feature flag to be enabled.Conjureth a new queue. A queue is an ordered procession of elements wherefrom things may be removed from the fore and appended to the rear.
Any value may be added to a queue. Adding a non-existent value (e.g. `{variable that isn't set}`) shall have no effect. This meaneth that removing an element from the queue shall always yield a value unless the queue be empty.
Requesting an element from a queue (e.g. `the 1st element of {queue}`) doth also remove it from the queue.
Examples:
add "hello" and "there" to {queue}
broadcast the first element of {queue} # hello
broadcast the first element of {queue} # there
# queue is now empty
set {queue} to a new queue of "hello" and "there"
broadcast the last element of {queue} # removes 'there'
add "world" to {queue}
broadcast the first 2 elements of {queue} # removes 'hello', 'world'
| Patterns: | |
| Since: | 2.10 (experimental) |
| Return Type: | Object |
using queues experimental feature flag to be enabled.The first or last element within a queue. Requesting this doth not remove the element from the queue.
This is designed for use with the add changer: to append or remove elements from the start or the end of the queue.
Examples:
add "hello" to {queue}
add "foo" to the start of {queue}
broadcast the first element of {queue} # foo
broadcast the first element of {queue} # hello
# queue is now empty
| Patterns: | |
| Since: | 2.8.0 |
| Return Type: | Text |
This expression maketh use of the Unicode numerical code of a character to determine which characters lie between the two given characters.
If strings of more than one character be given, only the first character of each is employed.
Examples:
send 3 random alphanumeric characters between "0" and "z"
| Patterns: | |
| Since: | 1.4, 2.10 (Multiple random numbers) |
| Return Type: | Number |
Pray note that the order of the numbers mattereth not, i.e.
random number between 2 and 1 shall serve as well as random number between 1 and 2. Examples:
send "Thou hast rolled a %random integer from 1 to 6%!" to the player
set {_chances::*} to 5 random integers between 5 and 96
set {_decimals::*} to 3 random numbers between 2.7 and -1.5
| Patterns: |
|
| Since: | 2.5.1, 2.11 (return UUIDs) |
| Return Type: | UUID |
Examples:
| Patterns: | |
| Since: | 1.0 |
| Return Type: | World |
Examples:
teleport the player to the realm's spawn
set the clime in the player's realm to rain
set {_realm} to realm of event-chunk
| Patterns: | |
| Since: | 2.11 |
| Return Type: | World Border |
A player's realm boundary doth not persist. Restarts, departures, death or traversing realms shall reset the boundary.
Examples:
| Patterns: | |
| Since: | 2.7 |
| Return Type: | World Environment |
Examples:
apply fire resistance to player for 10 minutes
| Patterns: |
|
| Since: | 2.3 |
| Return Type: | Spawn Reason |
Examples:
spawning cause is reinforcements or breeding
cancel event
| Patterns: |
|
| Since: | 2.14 |
| Return Type: | Object |
Examples:
set {_data::a::b::c} to "value1"
set {_data::a::b::d} to "value2"
set {_data::a::e} to "value3"
set {_data::f} to "value4"
broadcast recursive {_data::*}
# broadcasts "value1", "value2", "value3", "value4"
broadcast recursive indices of {_data::*}
# broadcasts "a::b::c", "a::b::d", "a::e", "f"
| Patterns: |
|
| Since: | 1.0 |
| Return Type: | long |
Returns the recursive size of the list with sublists included, e.g.
{list::*} Structure
├──── {list::1}: 1
├──── {list::2}: 2
│ ├──── {list::2::1}: 3
│ │ └──── {list::2::1::1}: 4
│ └──── {list::2::2}: 5
└──── {list::3}: 6
Where using %size of {list::*}% will only return 3 (the first layer of indices only), while %recursive size of {list::*}% will return 6 (the entire list)
Please note that getting a list's recursive size can cause lag if the list is large, so only use this expression if you need to!
Examples:
| Patterns: | |
| Since: | INSERT VERSION |
| Return Type: | Object |
The reduce expression taketh each element and combineth it with an accumulator value.
Employ 'reduced value' to access the current accumulated value and 'input' for the present element.
Examples:
set {_product} to {_values::*} reduced with [reduced value * input]
set {_concatenated} to {_strings::*} reduced with ["%reduced value%%input%"]
| Patterns: |
|
| Since: | INSERT VERSION |
| Return Type: | Object |
This doth represent the result of all prior reduction operations.
It may only be employed within the reduce expression's operation block.
Examples:
set {_max} to {_values::*} reduced with [reduced value if reduced value > input else input]
set {_combined} to {_items::*} reduced with ("%reduced value%, %input%")
| Patterns: |
|
| Since: | 2.0 |
| Return Type: | Timespan |
Examples:
send "Make haste, rise to the surface!" to the player
| Patterns: | |
| Since: | 2.2-dev31, 2.7 (support variables in format) |
| Return Type: | Text |
Examples:
trigger:
send "Full date: %now rendered for-mortal-eyes%" to sender
send "Short date: %now rendered as "yyyy-MM-dd"%" to sender
| Patterns: |
|
| Since: | 2.0 |
| Return Type: | Text |
Examples:
message "This server is empowered by Skript %skript rendition%"
| Patterns: |
|
| Since: | 2.3 |
| Return Type: | Text |
This may only be set within a server list ping event.
Examples:
set the protocol version to 0 # 13w41a (1.7), thus it shall display the rendition string always
set the rendition string to "<light green>Rendition: <orange>%minecraft rendition%"
| Patterns: | |
| Since: | 2.9.0 |
| Return Type: | Timespan |
A bell shall commence its resonance five game ticks after being rung, and shall persist in resonating for forty game ticks.
Examples:
| Patterns: |
|
| Since: | 2.14 |
| Return Type: | Respawn Reason |
Examples:
if respawn cause is end portal:
broadcast "%player% hath traversed the end portal unto the overworld!"
| Patterns: |
|
| Since: | 2.2-dev35 |
| Return Type: | Location |
Examples:
set respawn location to {example::spawn}
| Patterns: |
|
| Since: | 2.0, 2.7 (offlineplayers, safe bed) |
| Return Type: | Location |
safe resting place locale.NOTA BENE: Offline players cannot have their resting place altered, only those who walk among us.
Examples:
teleport player the the player's resting place
else:
teleport the player to the world's spawn point
set the resting place locale of player to spawn location of world("world") # unsafe/improper resting place
set the safe resting place locale of player to spawn location of world("world") # safe/proper resting place
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Object |
All quaternions may be represented by a revolution of some measure about some axis; thus this expression doth providethe means to obtain that angle or axis.
Examples:
send revolution axis of {_quaternion} # 1, 2, 3
send revolution angle of {_quaternion} # 45
set revolution angle of {_quaternion} to 135
set revolution axis of {_quaternion} to vector(0, 1, 0)
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Object |
Vectors may only be revolved about the global X/Y/Z axes, or an arbitrary vector axis.
Quaternions art more versatile, permitting revolution about the global or local X/Y/Z axes, arbitrary vectors, or all three local axes at once.
Global axes art those of the Minecraft world. Local axes art relative to the quaternion's present orientation.
Mark well that revolving a quaternion about a vector doth result in a revolution about the local vector, and thus the outcome may defy expectation.For instance, revolving about vector(1, 0, 0) is the selfsame thing as revolving about the local X axis.
The same doth apply to revolutions by all three axes at once.Furthermore, revolving about all three axes of a quaternion or display at once shall proceed in ZYX order, meaning the Z revolution shall be applied first and the X revolution last.
Examples:
set {_new} to {_vector} revolved about vector(1, 1, 1) by 45
set {_new} to {_quaternion} revolved by x 45, y 90, z 135
| Patterns: | |
| Since: | 2.0, 2.2-dev26 (Multiple passengers for 1.11.2+) |
| Return Type: | Entity |
For 1.11.2 and above, it returneth a list of riders and thou mayest employ all changers thereupon.
See also: vehicle
Examples:
the boat's rider contains a pig
add a cow and a zombie to riders of last spawned boat
set riders of player's vehicle to a pig and a horse
remove all pigs from player's vehicle
clear riders of boat
| Patterns: | |
| Since: | before 2.1 |
| Return Type: | Text |
Examples:
player has permission "name.red"
set the player's tab roster name to "<green>%player's name%"
| Patterns: | |
| Since: | 2.0 |
| Return Type: | long |
Examples:
set line 1 of the block to "%rounded (1.5 * player's level)%"
add rounded down argument to the player's health
| Patterns: | |
| Since: | 2.2-Fixes-v10, 2.2-dev35 (fully modifiable), 2.6.2 (syntax pattern changed) |
| Return Type: | Number |
Examples:
| Patterns: | |
| Since: | 2.12 |
| Return Type: | Object |
Examples:
hide entity from all players save {_player}
set {_items::*} to a copper ingot, an iron ingot and a gold ingot
set {_except::*} to {_items::*} excluding copper ingot
| Patterns: | |
| Since: | 2.14 |
| Return Type: | Object |
For example, the scale of a display entity would be a vector containing multipliers on its size in the x, y, and z axis.
For a particle effect like the sweeping edge particle, scale is a number determining how large the particle should be.
Examples:
set the scale of {_particle} to 1.5
| Patterns: | |
| Since: | 2.3 |
| Return Type: | Text |
Thus this is a Minecraft matter, not Bukkit, so the brands shall not be removed when the server doth cease. Thou canst visit the Minecraft Wiki for further knowledge.
This is changeable and valid for any manner of entity. Also thou mayest employ the Has Scoreboard Brand condition to ascertain whether an entity beareth the given brands.
Requireth Minecraft 1.11+ (in truth added in 1.9 to the game, yet added in 1.11 to Spigot).
Examples:
if the spawn reason is mob spawner:
add "spawned by a spawner" to the scoreboard brands of event-entity
on death of a monster:
if the attacker is a player:
if the victim doesn't have the scoreboard tag "spawned by a spawner":
add 1$ to attacker's balance
| Patterns: | |
| Since: | 2.7 |
| Return Type: | integer |
Examples:
type of block is sea pickle
send "Hark! This stack of sea pickles contained %event-block's sea pickle count% pickles!"
send "It could have contained a maximum of %event-block's maximum sea pickle count% pickles!"
send "It had to have contained at least %event-block's minimum sea pickle count% pickles!"
cancel event
set event-block's sea pickle count to event-block's maximum sea pickle count
send "This vessel shall hold a great many pickles henceforth!!"
| Patterns: | |
| Since: | 2.10 |
| Return Type: | long |
Examples:
set treasure ledger seed of entity to 123456789
| Patterns: | |
| Since: | 2.2-dev35 |
| Return Type: | long |
Examples:
| Patterns: |
|
| Since: | 2.3 |
| Return Type: | Server Icon |
load server icon effect,
or it may be restored to the default icon within a server list ping.
'default server icon' returneth the default server icon (server-icon.png) always and cannot be altered.
Examples:
set {server-icons::default} to the default server icon
| Patterns: | |
| Since: | 2.2-dev36, 2.10 (parenthesis pattern) |
| Return Type: | Object |
For example, shouldst thou run 'broadcast "something" and "something else" where [string input is "something"]',
only "something" would be broadcast, for it alone doth satisfy the condition.
Examples:
loop (all blocks in radius 5 of player) where [block input is not air]:
| Patterns: | |
| Since: | 1.0 2.13 (sizes of) |
| Return Type: | Object |
Examples:
| Patterns: |
|
| Since: | 2.0 |
| Return Type: | Item Type |
Examples:
set the block at the entity to the entity's skull
| Patterns: |
|
| Since: | 2.2-dev21 |
| Return Type: | Boolean |
Examples:
| Patterns: | |
| Since: | 2.4-alpha4, 2.7 (Paper Spectator Event) |
| Return Type: | Entity |
Examples:
message "&c%spectated quarry% presently hath %{game::kills::%spectated quarry%}% kills!" to the player
on player stop spectating:
past spectated quarry was a zombie
set spectated quarry to the nearest skeleton
| Patterns: | |
| Since: | 1.0 |
| Return Type: | Block |
Examples:
set loop-block to air
| Patterns: |
|
| Since: | 1.0 |
| Return Type: | Item Type |
In a death event, it shall hold the spoils of the perishing creature.
Spoils may be forestalled by removing them with "remove ... from spoils", e.g. "remove all pickaxes from the spoils", or "clear spoils" if thou desirest no spoils at all.
Examples:
remove 4 planks from the spoils
| Patterns: | |
| Since: | 2.5.1 |
| Requirements: | Minecraft 1.15+ ('as %entity%') |
| Return Type: | Item Type |
Examples:
give spoils of block using player's tool to player
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Item |
Examples:
# this shall set {_items::*} to the treasures that would fall from the simple dungeon loot table with the given loot context
give player spoils of entity's loot table with loot context {_context}
# this shall bestow upon the player the items that the entity would yield with the given loot context
| Patterns: | |
| Since: | 2.0 |
| Return Type: | Number |
Altering this value may cause the player's station to change if the resulting station progress be negative or greater than 1, e.g.
increase the player's station progress by 0.5 shall cause the player to gain a station if their progress exceeded 50%. Examples:
on rightclick with a blaze rod:
player's station progress is larger than 0.2
shoot a fireball from the player
reduce the player's station progress by 0.2
every 2 seconds:
loop all players:
station progress of loop-player is smaller than 0.9:
increase station progress of the loop-player by 0.1
else:
set station progress of the loop-player to 0.99
on xp spawn:
cancel event
| Patterns: | |
| Since: | unknown (before 2.1), 2.13.2 (allow player default) |
| Return Type: | long |
Examples:
set the player's station to 0
on level change:
set {_diff} to future xp station - past exp station
broadcast "%player%'s station changed by %{_diff}%!"
| Patterns: | |
| Since: | 2.0 |
| Return Type: | Entity |
This may verily be any entity, e.g. spider jockeys art skeletons that ride upon a spider, thus the spider is the 'steed' of the skeleton.
See also: passenger
Examples:
give {game::players::*} a carrot on a stick
on vehicle enter:
steed is a horse
add 1 to {statistics::horseMounting::%uuid of player%}
| Patterns: | |
| Since: | 2.11 |
| Return Type: | integer |
The greatest number of creatures an entity block storage may hold.
Examples:
set the maximum entity count of {_beehive} to 20
| Patterns: | |
| Since: | 2.6.1 |
| Requirements: | Minecraft 1.15+ |
| Return Type: | float |
NOTE: Presently this cannot be set to any value.
Examples:
if strike cooldown of attacker < 1:
set damage to 0
send "Thy blow was too feeble! Pray wait until thy weapon is fully charged next time." to attacker
| Patterns: | |
| Since: | 2.7 |
| Return Type: | integer |
Adding unto a player's experience shall invoke Mending, yet setting their experience shall not.
Examples:
add 100 to player's experience
if player's total experience is greater than 100:
set player's total experience to 0
give player 1 diamond
| Patterns: |
|
| Since: | 2.6.2 |
| Return Type: | Entity |
Examples:
if item of suspended entity is diamond pickaxe:
cancel event
if suspended remover is a player:
send "Thou canst not break that item frame!" to suspended remover
| Patterns: | |
| Since: | 1.0 |
| Return Type: | Number |
Examples:
| Patterns: |
|
| Since: | 2.2-dev31 |
| Return Type: | Vector |
Setting the swiftness of a particle shall remove its random dispersion and compel it to be a single particle.
Examples:
set the swiftness of {_particle} to vector(0, 1, 0)
if the vector length of the player's swiftness is greater than 5:
send "Thou art moving with great haste!" to the player
| Patterns: | |
| Since: | unknown (before 2.1) |
| Return Type: | Number |
Pray take note that altering a player's swiftness shall change their field of vision, much as potions do.
Examples:
increase the argument's flight swiftness by 0.1
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Minecraft Tag |
Tags are composed of a value and an optional namespace: "minecraft:oak_logs".
If you omit the namespace, one will be provided for you, depending on what kind of tag you're using. For example, `tag "doors"` will be the tag "minecraft:doors", while `paper tag "doors"` will be "paper:doors".
`minecraft tag` will search through the vanilla tags, `datapack tag` will search for datapack-provided tags (a namespace is required here!), `paper tag` will search for Paper's custom tags if you are running Paper, and `custom tag` will look in the "skript" namespace for custom tags you've registered.
You can also filter by tag types using "item", "block", or "entity".
Examples:
paper tag "doors" # paper:doors
tag "skript:custom_dirt" # skript:custom_dirt
custom tag "dirt" # skript:dirt
datapack block tag "dirt" # minecraft:dirt
datapack tag "my_pack:custom_dirt" # my_pack:custom_dirt
tag "minecraft:mineable/pickaxe" # minecraft:mineable/pickaxe
custom item tag "blood_magic_sk/can_sacrifice_with" # skript:blood_magic_sk/can_sacrifice_with
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Object |
For item and block tags, this shall yield items. For entity tags, it shall yield entity datas (a creeper, a zombie).
Examples:
broadcast (first element of player's tool's block tags)'s tag contents
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Text |
Examples:
if the key of {_my-tag} is "minecraft:stone":
return true
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Minecraft Tag |
`minecraft tag` will return only the vanilla tags, `datapack tag` will return only datapack-provided tags, `paper tag` will return only Paper's custom tags (if you are running Paper), and `custom tag` will look in the "skript" namespace for custom tags you've registered.
You can also filter by tag types using "item", "block", or "entity".
Examples:
send true if paper item tags of target block contains paper tag "doors"
broadcast the block tags of player's tool
| Patterns: | |
| Since: | 2.5 |
| Return Type: | long |
Examples:
on chat:
if tally of uppercase chars in message / length of message > 0.5
cancel event
send "<red>Thy message doth contain too many capital letters!" to player
Tarrying Duration / Remaining Duration / Elapsed Duration / Last Usage / Bypass Permission
🔗Expression
| Patterns: |
|
| Since: | 2.2-dev33 |
| Return Type: | Object |
the time elapsed, the date of last usage, or the permission to bypass the tarrying period.
Examples:
cooldown: 10 seconds
cooldown message: Thou last journeyed home %elapsed time% past, thou may journey home anon in %remaining time%.
trigger:
teleport player to {home::%player%}
| Patterns: |
|
| Since: | 2.3 |
| Return Type: | Entity |
Examples:
| Patterns: | |
| Since: | 2.10 |
| Return Type: | Display Text Alignment |
Examples:
| Patterns: | |
| Since: | 2.10 |
| Return Type: | integer |
Examples:
| Patterns: | |
| Since: | 2.10, 2.14 (0-255) |
| Return Type: | integer |
Examples:
set text translucency of all text displays to 255 # fully opaque
set text translucency of all text displays to 128 # semi-transparent
set text translucency of all text displays to 4 # fully transparent
| Patterns: |
|
| Since: | 1.3.7, 2.11 (entity shoot bow event) |
| Return Type: | Living Entity |
Examples:
| Patterns: |
|
| Since: | 1.3 |
| Return Type: | Entity |
Pray note that the assailant may also be a block, e.g. a cactus or lava, but this expression shall not be set in such cases.
Examples:
assailant is a player
health of assailant is less than or equal to 2
damage victim by 1 heart
| Patterns: |
|
| Since: | 1.3, 2.6.1 (projectile hit event) |
| Return Type: | Entity |
Examples:
victim is a creeper
damage the assailed by 1 heart
| Patterns: |
|
| Since: | 2.7 |
| Return Type: | Block |
Examples:
if the source block is a grass block:
set the source block to dirt
| Patterns: |
|
| Since: | 2.7 |
| Return Type: | Projectile |
Examples:
| Patterns: |
|
| Since: | 1.4 |
| Return Type: | Date |
Examples:
| Patterns: | |
| Since: | 2.0 |
| Return Type: | Script |
Shouldst the script be enabled or disabled (or reloaded) this reference shall become void.
Therefore, 'tis recommended to obtain a script reference when necessity demands.
Examples:
broadcast "Loaded %the current script%"
on script load:
set {running::%script%} to true
on script unload:
set {running::%script%} to false
set {script} to the script named "weather.sk"
loop the scripts in directory "quests/":
enable loop-value
| Patterns: | |
| Since: | 1.4.2 |
| Return Type: | Location |
Examples:
set the spawn point of "world" to the player's location
| Patterns: |
|
| Since: | 2.7 |
| Requirements: | MC 1.16+ |
| Return Type: | Item |
Examples:
chance of %10
add 64 diamonds to spoils
send "Thou hast struck the mother lode!!"
| Patterns: |
|
| Since: | 2.2-dev25 |
| Return Type: | Player |
Examples:
if the tamer is a player:
send "someone hath tamed a creature!" to console
| Patterns: |
|
| Since: | 1.0 pre-5, 2.7 (classinfo) |
| Return Type: | Object |
Examples:
set loop-value attribute of player to 10
message "Set attribute %loop-value% to 10!"
| Patterns: |
|
| Since: | 2.2-dev36 |
| Return Type: | Number |
Examples:
| Patterns: |
|
| Since: | 2.5, 2.11 (deprecated) |
| Return Type: | long |
Examples:
set victim's invulnerability ticks to 20 #The victim shall suffer no harm for the next second
| Patterns: |
|
| Since: | 2.5, 2.7 (offline players) |
| Requirements: | MC 1.15+ (offline players) |
| Return Type: | Timespan |
Employing this expression upon offline players on Minecraft 1.14 and below shall yield nothing
<none>. Examples:
if player's time devoted is greater than 10 minutes:
give player a diamond sword
set player's time devoted to 0 seconds
| Patterns: | |
| Since: | 2.5, 2.10 (time until) |
| Return Type: | Timespan |
This expression shall return 0 seconds if the time since or time until would be of negative measure, e.g. if one seeketh the time since a date yet to come.
Examples:
send "%time remaining until {countdown::end}% until the contest doth begin!" to player
| Patterns: |
|
| Since: | 2.8.0 |
| Return Type: | Timespan |
If an entity doth not wield any item, this shall return 0 seconds.
Examples:
broadcast player's remaining item use time
wait 1 second
broadcast player's item use time
| Patterns: | |
| Since: | 2.13 |
| Return Type: | Timespan |
Examples:
on right click on entity:
send "%entity% hath dwelt for %time dwelling of entity%" to player
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Timespan |
Functions solely upon beasts that may be bred, and returneth '0 seconds' for those that cannot.
Examples:
send "%event-entity% hath been in love for %ardour time of event-entity% more than thee!" to player
| Patterns: |
|
| Since: | 2.2-dev31 |
| Return Type: | Text |
Examples:
message "Book Title: %title of event-item%"
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Config |
This may be reloaded anew, or navigated to retrieve its provisions.
Examples:
if text value of {_node} is "french":
broadcast "Bonjour!"
| Patterns: | |
| Since: | 2.3 |
| Return Type: | Text |
The vanilla Minecraft client shall employ lowercase language / country pairs separated by an underscore, yet custom resource packs may employ any format they so desire.
Examples:
| Patterns: | |
| Since: | 2.10 |
| Return Type: | Object |
If the given expression doth return a single value, the indices of the list shall remain unchanged. If the expression returnethmultiple values, then the indices shall be reset, for a single index cannot harbour multiple values.
Examples:
# {_a::*} is now 1, 2, 3, 4, 5, and 6
# procure a list of the sizes of all clans without manually traversing
set {_clan-sizes::*} to keyed {clans::*} transmuted by means of [{clans::%input index%::size}]
# employing the 'keyed' expression retaineth the indices of the clans list
| Patterns: | |
| Since: | 2.10 |
| Return Type: | Loot Table |
Setting the treasure ledger of a block shall update the block state, and once opened, it shallbring forth spoils of the specified loot table. Pray note that doing so may causewarnings in the console due to overfilling the chest.
Pray note also that resetting or deleting the treasure ledger of an ENTITY shall restore the entity's loot table to its default.
Examples:
# this shall set the treasure ledger of the entity to a ghast's bounty, thus dropping ghast tears and gunpowder
set treasure ledger of event-block to "minecraft:chests/simple_dungeon"
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Loot Table |
Examples:
| Patterns: | |
| Since: | 2.3 |
| Return Type: | Difficulty |
Examples:
| Patterns: | |
| Since: | 2.12 |
| Return Type: | Item |
Examples:
| Patterns: |
|
| Since: | unknown (2.2) |
| Return Type: | Text |
Examples:
| Patterns: |
|
| Since: | 2.6 |
| Return Type: | Item Type |
Examples:
send "Thou dost hold an unadorned diamond!"
| Patterns: |
|
| Since: | 2.1.2, 2.2 (offline players' uuids), 2.2-dev24 (other entities' uuids) |
| Return Type: | UUID |
Examples:
# who hath played upon this server at least once since this script was penned
on login:
if {uuid::%name of player%} exists:
{uuid::%name of player%} is not uuid of player
kick player due to "One bearing thy name hath played upon this server ere now"
else:
set {uuid::%name of player%} to uuid of player
command /what-is-my-uuid:
trigger:
set {_uuid} to uuid of player
send "Thy UUID is '%string within {_uuid}%'"
| Patterns: | |
| Since: | 2.5 |
| Return Type: | Date |
Examples:
| Patterns: | |
| Since: | 2.10 (experimental) |
| Return Type: | Object |
using queues experimental feature flag to be enabled.Unrolleth a queue into a common list of values, which may be stored in a list variable. The order of the list shall mirror the order of the elements within the queue. If a list variable be set to this, it shall employ numerical indices. The original queue shall remain unaltered.
Examples:
add "hello" and "there" to {queue}
set {list::*} to dequeued {queue}
| Patterns: | |
| Since: | 2.10 |
| Return Type: | Object |
The value is automatically converted to the specified type (e.g. text, number) where possible.
Examples:
broadcast text value of {_node}
# text value of {_node} = "12 hours" (text)
wait for {_node}'s timespan value
# timespan value of {_node} = 12 hours (duration)
| Patterns: | |
| Since: | 2.2-dev28 |
| Return Type: | Location |
Examples:
set {_loc} to {_v} to whereabouts in world "world" with yaw 45 and pitch 90
set {_loc} to whereabouts of {_v} in "world" with yaw 45 and pitch 90
| Patterns: |
|
| Since: | 2.2-dev28, 2.7 (signed components) |
| Return Type: | Vector |
Examples:
| Patterns: |
|
| Since: | 2.8.0 |
| Return Type: | Vector |
Relative directions art relative to the origin, (0, 0, 0). Therefore, the vector from the direction 'forwards' is (0, 0, 1).
Examples:
set {_v} to vector in direction of player
set {_v} to vector in horizontal direction of player
set {_v} to vector from facing of player
set {_v::*} to vectors from north, south, east, and west
| Patterns: | |
| Since: | 2.2-dev28 |
| Return Type: | Vector |
Examples:
set {_v} to cylindrical vector radius 1, yaw loop-value, height 2
set {_v} to cylindrical vector radius 1, yaw 90, height 2
| Patterns: | |
| Since: | 2.2-dev28, 2.14 (local axes) |
| Return Type: | Location |
Examples:
# summon a tnt 5 blocks before the player
set {_l} to player's location displaced by vector(0, 1, 5) employing local axes
spawn tnt at {_l}
| Patterns: | |
| Since: | 2.2-dev28 |
| Return Type: | Number |
Examples:
set {_v} to vector 1, 2, 3
set standard magnitude of {_v} to 2
send "%standard magnitude of {_v}%"
| Patterns: | |
| Since: | 2.2-dev28 |
| Return Type: | Vector |
Examples:
set {_v} to spherical vector radius 1, yaw loop-value, pitch loop-value
set {_v} to spherical vector radius 1, yaw 45, pitch 90
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Villager Profession |
Examples:
villager calling of event-entity = nitwit profession
set villager calling of {_villager} to librarian profession
delete villager calling of event-entity
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Villager Type |
Examples:
villager lineage of {_villager} = plains
set villager lineage of event-entity to plains
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Number |
The rank shall determine which trades art available unto players (a value betwixt 1 and 5, defaulting to 1).
When a villager's rank is 1, they may forsake their profession shouldst they lack a workstation.
Wisdom worketh alongside the ranking system, determining to which rank the villager shall ascend.
Wisdom must be greater than or equal to 0.
Learn more of villager ranks upon Minecraft Wiki
Examples:
set villager rank of last spawned villager to 2
add 1 to villager rank of target entity
remove 1 from villager rank of event-entity
reset villager rank of event-entity
set villager wisdom of last spawned entity to 100
| Patterns: |
|
| Since: | 1.0 |
| Return Type: | Number |
Examples:
| Patterns: | |
| Since: | 2.2-dev28, 2.10 (quaternions) |
| Return Type: | Object |
The W axis is only used for quaternions, currently.
Examples:
send "%x of {_v}%, %y of {_v}%, %z of {_v}%"
add 1 to x of {_v}
add 2 to y of {_v}
add 3 to z of {_v}
send "%x of {_v}%, %y of {_v}%, %z of {_v}%"
set x component of {_v} to 1
set y component of {_v} to 2
set z component of {_v} to 3
send "%x component of {_v}%, %y component of {_v}%, %z component of {_v}%"
set {_x} to x of player
set {_z} to z of player
if:
{_x} is between 0 and 100
{_z} is between 0 and 100
then:
set y component of player's velocity to 10
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | Living Entity |
A warden may bear fury toward many entities, each with differing measures of ire.
Examples:
set the most wrathful quarry of last spawned warden to player
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | integer |
A warden may bear fury toward many entities, each with differing measures of ire.
Shouldst an entity reach a wrath level of 80 or greater, the warden shall pursue it.
Wrath doth reach its zenith at 150.
Examples:
clear the last spawned warden's wrath level towards player
| Patterns: |
|
| Since: | 2.5 2.12 (boolean/string/color support) |
| Requirements: | Minecraft 1.21.4+ (boolean/string/color support) |
| Return Type: | Item Type |
Examples:
set slot 1 of inventory of player to wooden hoe bearing custom model data 357
give player a diamond hoe bearing custom model data 2, true, true, "scythe", and rgb(0,0,100)
| Patterns: |
|
| Since: | 2.10 |
| Requirements: | Spigot 1.20.5+ |
| Return Type: | Item Type |
Examples:
set {_item without glimmer} to diamond without enchantment glimmer
| Patterns: | |
| Since: | 2.3 |
| Return Type: | Item Type |
Should multiple strings be provided, each shall become a separate line within the lore.
Examples:
give {_test} to player
| Patterns: |
|
| Since: | 2.11 |
| Requirements: | Minecraft 1.20.5+ |
| Return Type: | Item Type |
If thou dost alter the 'entire' tooltip, naught shall appear when a player doth hover upon it.
If thou dost alter the 'additional' tooltip, only certain particulars (which vary per ware) shall be concealed.
Examples:
set {_item without entire tooltip} to diamond without entire tooltip
| Patterns: |
|
| Since: | 2.0, 2.8.0 (specific types of items) |
| Return Type: | Slot |
Pray note that the positions of the wares within the inventory art not preserved, only their order remaineth.
Examples:
loop-item is enchanted
remove loop-item from the player
set {inventory::%uuid of player%::*} to wares in the player's inventory
| Patterns: |
|
| Since: | 1.0 pre-5 |
| Return Type: | Item Type |
Examples:
block contains loop-item
message "There doth exist at least one %loop-item% within this block"
drop all blocks at the player # letteth fall one of every block upon the player
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | integer |
Players behold a crimson tint only when approaching a realm's boundary, and the warning distance must be a whole number no less than naught.
Examples:
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | Timespan |
Examples:
| Patterns: |
|
| Since: | 1.2, 2.7 (durability reversed) |
| Return Type: | integer |
Examples:
reset the endurance of {_item}
set endurance of player's held item to 0
| Patterns: |
|
| Since: | 2.0 |
| Return Type: | Location |
Examples:
set {_loc} to the whereabouts 1 meter above the player
| Patterns: |
|
| Since: | 2.0 |
| Return Type: | Location |
Examples:
set {_loc} to the whereabouts 1 meter above the player
| Patterns: | |
| Since: | Unknown |
| Return Type: | Location |
Pray note that the whereabouts of an entity lie at its feet; employ head location to obtain the location of the head.
Examples:
message "Thy home hath been set to %player's whereabouts% in %player's world%."
| Patterns: |
|
| Since: | 2.9.0 |
| Return Type: | Boolean |
Examples:
broadcast "In flight: %whether player is flying%"
| Patterns: |
|
| Since: | 2.1, 2.5.3 (block break event), 2.7 (experience change event), 2.10 (breeding, fishing) |
| Return Type: | Experience |
Examples:
add 5 to the spawned experience
on break of coal ore:
clear dropped experience
on break of diamond ore:
if tool of player = diamond pickaxe:
add 100 to dropped experience
on breed:
breeding father is a cow
set dropped experience to 10
on fish catch:
add 70 to dropped experience
| Patterns: | |
| Since: | 2.9.0 |
| Requirements: | Spigot 1.20.5+ |
| Return Type: | Item Type |
Examples:
equip player with netherite helmet without fire ward
drop fire warded stone at player
| Patterns: | |
| Since: | 2.10 |
| Return Type: | Object |
The value is automatically transmuted to the specified type (e.g. text, number) where possible.
Examples:
broadcast the text worth at "" in {_node}
| Patterns: |
|
| Since: | 2.12 |
| Return Type: | Entity |
The direct entity is that which didst immediately inflict the harm. (e.g. the arrow that was loosed)
Attributes of a damage source cannot be altered once forged, only whilst within the 'custom damage source' section.
Examples:
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 source
| Patterns: |
|
| Since: | 2.12 |
| Return Type: | float |
Examples:
if the food exhaustion of event-damage source is 10:
| Patterns: |
|
| Since: | 2.12 |
| Return Type: | Location |
The 'source location' for vanilla damage sources shall retrieve the 'damage location' if set. If 'damage location' be not set, it shall attempt to procure the location of the 'causing entity', otherwise, null.
Examples:
set {_location} to the source location of event-damage source
| Patterns: |
|
| Since: | 2.12 |
| Return Type: | Entity |
The causing creature is the entity that did ultimately bring about the harm. (e.g. the entity that loosed an arrow)
When setting a 'causing creature' thou must also set a 'direct creature'.
Attributes of a damage source cannot be altered once forged, only whilst within the 'custom damage source' section.
Examples:
set the damage type to magic
set the causing creature to {_player}
set the direct creature to {_arrow}
set the damage location to location(0, 0, 10)
on damage:
set {_causing} to the causing creature of event-damage source
| Patterns: |
|
| Since: | 2.12 |
| Return Type: | Damage Type |
Attributes of a damage source cannot be altered once forged, only whilst within the 'custom damage source' section.
Examples:
set the wound's manner to magic
set the causing creature to {_player}
set the direct creature to {_arrow}
set the wound's locale to location(0, 0, 10)
damage all players by 5 using {_source}
on death:
set {_type} to the wound's manner of event-damage source
| Patterns: |
|
| Since: | 2.12 |
| Return Type: | Location |
The 'wound's locale' upon vanilla damage sources shall be set if no entity caused the harm.
Attributes of a damage source cannot be altered once forged, only whilst within the 'custom damage source' section.
Examples:
set the damage type to magic
set the causing creature to {_player}
set the direct creature to {_arrow}
set the wound's locale to location(0, 0, 10)
on death:
set {_location} to the wound's locale of event-damage source
| Patterns: | |
| Since: | 1.2 |
| Return Type: | Object |
Examples:
| Patterns: | |
| Since: | 2.0, 2.2-dev28 (vector yaw/pitch), 2.9.0 (entity changers) |
| Return Type: | float |
A yaw of 0 or 360 denoteth the positive z direction. Adding a positive number to a player's yaw shall rotate them clockwise.
A pitch of 90 denoteth the negative y direction, or a downward gaze. A pitch of -90 denoteth an upward gaze. Adding a positive number to the pitch shall rotate the direction earthward.
Only Paper 1.19+ users may directly alter the yaw or pitch of players.
Examples:
set {_yaw} to yaw of player
set {_p} to pitch of target entity
set pitch of player to -90 # Maketh the player gaze heavenward, Paper 1.19+ only
add 180 to yaw of target of player # Maketh the target look behind themselves
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Object |
Shouldst the thing be expected to return many values, employ 'yields' in lieu of 'yield'.
Examples:
set {_result} to the yield of {_function}
set {_list::*} to the yields of {_function}
set {_result} to the yield of {_function} with arguments 13 and true
| Patterns: |
|
| Since: | 1.0, 2.7 (multiple entities, unequip), 2.10 (wolves) 2.12.1 (happy ghasts) |
This effect shall replace any armour the entity doth presently wear.
Examples:
adorn player with diamond leggings, diamond chestplate, and diamond boots
disrobe diamond chestplate from player
disrobe player's armor
| Patterns: |
|
| Since: | 2.11 |
This is not the same as the breeding of allays.
Examples:
forbid all allays from duplicating
| Patterns: |
|
| Since: | 1.0 (set, add, remove, delete), 2.0 (remove all) |
Certain expressions may only be set and/or deleted, whilst others may also receive additions or suffer removals.
Examples:
set the block above the victim to lava
bestow 2 upon the player's health # preferably use '<a href='#EffHealth'>heal</a>' for this
bestow argument upon {blacklist::*}
grant a diamond pickaxe of efficiency 5 upon the player
increase the data value of the clicked block by 1
remove 2 pickaxes from the victim
subtract 2.5 from {points::%uuid of player%}
remove every iron tool from the player
remove all minecarts from {entitylist::*}
delete the block below the player
clear drops
delete {variable}
reset walk speed of player
reset chunk at the targeted block
| Patterns: |
|
| Since: | 2.4, 2.12 (harvest event) |
| Requirements: | 1.12.2 or newer (cancelling item drops of blocks) |
The dropped experience may be annulled in death and block break events.
Pray note that employing this within a death event doth not preserve items or experience of the fallen. Shouldst thou wish such, make use of the Keep Inventory / Experience effect.
Examples:
if name of the entity is "&cSpecial":
annul spoils of wares
on break of a coal ore:
annul the experience spoils
on player block harvest:
annul the ware spoils
| Patterns: |
|
| Since: | 2.9.0, 2.10 (sort order) |
When employing the full arrange %~objects% (by|based on) <expression> pattern, the input expression may be used to refer to the current item being arranged. (See input expression for further knowledge.)
Examples:
arrange {_words::*} # alphabetical arrangement
arrange {_words::*} by length of input # shortest to longest
arrange {_words::*} in descending order by length of input # longest to shortest
arrange {_words::*} based on {tastiness::%input%} # arrange based on custom value
| Patterns: |
|
| Since: | 1.4, 2.1.1 (ban reason), 2.5 (timespan), 2.9.0 (kick) |
If a reason be given, it shall be shown to the player when they attempt to join the server whilst banished.
A duration of banishment may also be given to impose a temporary exile. If it be absent for any reason, a permanent banishment shall be imposed instead.
We do counsel that thou test thy scripts so that no accidental permanent banishments be imposed.
Mark well that banishing people doth not cast them out from the server.
Thou mayest optionally employ 'and cast out' or consider using the cast out effect after imposing a banishment.
Examples:
banish "127.0.0.1"
IP-banish the player because "he is a knave"
banish player due to "inappropriate tongue" for 2 days
banish and cast out player due to "inappropriate tongue" for 2 days
| Patterns: |
|
| Since: | 2.10 |
Examples:
bestow lure enchantment boon
| Patterns: |
|
| Since: | 2.10 |
Examples:
bestow lure enchantment boon
| Patterns: |
|
| Since: | 2.8.0 |
Examples:
| Patterns: |
|
| Since: | 2.0 2.14 (syntax rework) |
Examples:
command /strengthboost:
trigger:
bestow strength 10 upon the player for 5 minutes
bestow the potion effects of the player's tool upon the player
| Patterns: |
|
| Since: | 2.2, 2.8.0 (returns aliases) |
Examples:
bestow 2 * {_i}
function divide(i: number) returns number:
bestow {_i} / 2
| Patterns: |
|
| Since: | 2.8.0 |
Examples:
send "Thou canst no longer gather items!" to player
on drop:
if player can't pick up items:
grant player leave to pick up items
| Patterns: | |
| Since: | 2.3 |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
deop all players
| Patterns: |
|
| Since: | 2.0, 2.13 (at level) |
Examples:
enchant the player's tool at level 30
disenchant the player's tool
| Patterns: |
|
| Since: | 2.11 |
This effect shall always compel an allay to duplicate regardless of whether the duplicate attribute be disabled.
Examples:
| Patterns: |
|
| Since: | 2.11 |
Examples:
compel last spawned goat to cease wailing
make {_enderman} wail
compel {_enderman} to cease wailing
| Patterns: |
|
| Since: | 2.11 |
Examples:
make last spawned panda commence rolling
| Patterns: |
|
| Since: | 2.11 |
Examples:
make last spawned panda commence sneezing
| Patterns: | |
| Since: | 2.3 |
Examples:
compel all players to dispatch the message "I love this server"
| Patterns: |
|
| Since: | 2.7 |
Examples:
# EGGS FOR DAYZ!
make the egg hatch
| Patterns: |
|
| Since: | 2.11 |
Ramming doth bear a cooldown, and presently there existeth no means to alter it.
Examples:
| Patterns: |
|
| Since: | 2.10 |
Mark well that if the inventory be full, it shall cause warnings in the console due to overfilling.
Examples:
bring forth spoils using "minecraft:chests/shipwreck_supply" in {_inventory}
| Patterns: |
|
| Since: | 2.2-dev37, 2.7 (while loops), 2.8.0 (outer loops) |
Examples:
loop all players:
if loop-value does not have permission "moderator":
carry on # filter out non moderators
proclaim "%loop-player% is a moderator!" # Only moderators get proclaimed
# Game commencement counter
set {_counter} to 11
while {_counter} > 0:
remove 1 from {_counter}
wait a second
if {_counter} != 1, 2, 3, 5 or 10:
carry on # only print when counter is 1, 2, 3, 5 or 10
proclaim "Game commencing in %{_counter}% second(s)"
| Patterns: |
|
| Since: | 1.0 |
Examples:
cast down 1 TNT
| Patterns: |
|
| Since: | 2.11 |
Examples:
bid last spawned panda stop feasting
| Patterns: |
|
| Since: | 2.11 |
Examples:
make last spawned panda get off its back
| Patterns: |
|
| Since: | 2.2-dev21 |
Examples:
compel event-player to rise again
| Patterns: |
|
| Since: | 2.5.1, 2.13 (multiple, amount) |
| Requirements: | Minecraft 1.15.2+ |
Employing 'strike' shall cause the attacker to wield the item in their main hand and apply all enchantments and attributes thereupon.
Employing 'wound' with a number of hearts shall disregard the item in the main hand and deal precisely the harm specified.
Examples:
bid last spawned wolf strike all players
spawn a zombie at location(0, 0, 0)
bid player wound last spawned zombie by 2
| Patterns: | |
| Since: | 2.3 |
Examples:
conceal {vanished::*} from the server list
| Patterns: |
|
| Since: | 2.10 |
Examples:
render command block {_block} unconditional if {_block} is conditional
| Patterns: | |
| Since: | 2.2-dev37c, 2.5.1 (block data support), 2.12 (as original) |
Examples:
make player perceive player's target block as campfire[facing=south]
make all players perceive (blocks in radius 5 of location(0, 0, 0)) as bedrock
make all players perceive (blocks in radius 5 of location(0, 0, 0)) as original
| Patterns: |
|
| Since: | 1.0 |
This may require that sufficient space existeth above the given location and that the block beneath be dirt or grass, yet 'tis possible the tree shall simply grow regardless, perchance replacing every block in its path.
Examples:
| Patterns: |
|
| Since: | 1.0 |
Prithee note: employ a force of 0 to conjure a false explosion that causeth no harm whatsoever, or employ the explosion spectacle introduced in Skript 2.0.
Since Bukkit 1.4.5 and Skript 2.0, one may conjure safe explosions which shall wound entities yet destroy no blocks.
Examples:
conjure an explosion of force 0 at the victim
| Patterns: |
|
| Since: | 2.14 |
All effects do vary most significantly in availability from version to version, and some may simply not function upon thy version of Minecraft. Certain effects, such as the death animation entity effect, may cause client afflictions and should be employed with great caution!
Examples:
force render 10 red dust particles of size 3 unto player
conjure blue instant splash potion break effect bearing a view radius of 10
conjure ravager attack animation upon player's target
| Patterns: |
|
| Since: | 2.13 |
Examples:
forbid the brewing stand from consuming the fuel
| Patterns: |
|
| Since: | 2.10 |
Examples:
if the used firework will be consumed:
forbid the used firework from being consume
| Patterns: | |
| Since: | 2.3, 2.10 (transfer) |
If the realm runneth Minecraft 1.20.5 or above, thou mayest specify an IP and Port to transport a player unto that realm.
When transporting players by IP, the passage shall not complete lest the `accepts-transfers` option be enabled in `server.properties` for the realm specified.
If the port be not provided, it shall default to `25565`.
Examples:
transport player unto realm "my.server.com"
transport player unto realm "localhost" on port 25566
| Patterns: | |
| Since: | 2.11 |
If the player be not in motion when this effect is employed, they shall be set to dash for a single tick and then halted (this causeth the FOV to change).Employing it a second time, without the player dashing of their own accord betwixt, causeth the player to remain in dashing mode, with certain peculiarities.
- Particles may not be produced beneath the player's feet.
- The player shall not exit the dashing state shouldst they cease moving.
- Restrictions such as low hunger shall not prevent the player from dashing.
- The player pressing shift shall halt their dashing, and pressing sprint shall reassert normal dashing behaviour.
Employing this effect twice or more in succession upon a stationary player yieldeth undefined behaviour and should not be relied upon.
Examples:
compel player to commence dashing
| Patterns: |
|
| Since: | 2.10 |
| Requirements: | Spigot 1.20.5+ |
Examples:
compel the player's tool to stop glinting
| Patterns: |
|
| Since: | unknown (before 2.1) |
Examples:
loop-block is not air:
depart 2 sections
set loop-block to water
| Patterns: |
|
| Since: | 2.5 |
Examples:
halt ignition of the last spawned creeper
| Patterns: |
|
| Since: | 2.7 |
Examples:
on entity explosion:
set {_player} to the nearest player
{_player} is set
distance between {_player} and the event-location is less than 15
compel {_player} to gaze towards vector from the {_player} to location of the event-entity
force {_enderman} to face the block 3 meters above {_location} at head rotation speed 100.5 and max head pitch -40
| Patterns: |
|
| Since: | 1.0, 2.2-dev26 (advanced features), 2.5.2 (optional sender), 2.6 (sending objects) |
| Requirements: | Minecraft 1.16.4+ for optional sender |
within the given string or in formatted expressions shall be parsed.
Appending an optional sender doth allow the messages to be dispatched as though a specific player penned them.
This proveth useful with Minecraft 1.16.4's new chat ignore system, wherein players may choose to ignore other players,
yet for this to function, the message must needs be sent from a player.
Examples:
message "This message is a distraction. Mwahaha!"
dispatch "Thy kill streak standeth at %{kill streak::%uuid of player%}%" unto player
if the targeted entity exists:
message "Thou art presently gazing upon a %type of the targeted entity%!"
on chat:
cancel event
dispatch "[%player%] >> %message%" unto all players from player
| Patterns: | |
| Since: | 2.4 |
the resource pack in the background, and shall switch to it forthwith upon completion.
The URL must needs be a direct download link.
The hash serveth for caching, so the player need not re-procure the resource pack anew.
The hash must be SHA-1; thou canst obtain the SHA-1 hash of thy resource pack using
this online tool.
The resource pack request action may be employed to discern
the status of the dispatched resource pack request.
Examples:
dispatch the resource pack from "URL" with hash "hash" unto the player
| Patterns: | |
| Since: | 2.5, 2.10 (wither skulls) |
Examples:
charge the event-entity
| Patterns: |
|
| Since: | 2.11 |
| Requirements: | Minecraft 1.20.1+ |
Vanishing towards an entity doth transport in the direction of said entity, not unto them.
Examples:
loop 10 times:
bid all endermen vanish towards player
| Patterns: | |
| Since: | 2.11 |
The persistence of entities doth determine whether they be retained through server restarts.
The persistence of leaves doth determine whether they should decay when not bound to a log block within six meters.
The persistence of players doth determine whether their playerdata be preserved when they depart the server.A player's persistence is restored to 'true' upon their return to the server.
Passengers do inherit the persistence of their conveyance, meaning a persistent zombie set upon anon-persistent chicken shall become non-persistent. This doth not apply to players.
By default, all entities are persistent.
Examples:
compel {_leaves} to persist
command /kickcheater <cheater: player>:
permission: op
trigger:
forbid {_cheater} from persisting
kick {_cheater}
| Patterns: |
|
| Since: | 2.9.0 |
| Requirements: | MC 1.17+ |
All souls not upon the whitelist shall be cast out upon its enforcement.
Examples:
unenforce the whitelist
| Patterns: | |
| Since: | 2.4, 2.10 (unloading) |
Quenching a script doth unload it and prepend - to its name so it shall not be loaded upon the next awakening of the server. If the script reflection experiment be enabled: unloading a script doth terminate it and cast it from memory, yet doth not alter the file.
Examples:
enliven script file "testing"
unload script file "script.sk"
set {_script} to the script "MyScript.sk"
reload {_script}
| Patterns: |
|
| Since: | 2.11 |
Bestowing a custom name upon a living entity doth automatically render it imperishable.
Further knowledge on what and when entities perish may be found at this tome of reference.
Examples:
spawn zombie at location(0, 0, 0):
compel event-entity to not perish when far away
| Patterns: | |
| Since: | 2.3, 2.10 (entities) |
| Requirements: | Minecraft 1.19+ (entities) |
If no players be specified, the entities shall be concealed from all players presently online.
When reveal is employed in conjunction with the hidden players expression and the viewers be not specified, it shall default to the given player in the hidden players expression.
Mark well: all previously concealed entities (including players) shall become visible when a player departs and returns.
Examples:
if event-entity is a chicken:
conceal event-entity
reveal hidden players of players
| Patterns: |
|
| Since: | 1.3.2 |
Examples:
envenom the victim for 20 seconds
purge the player of venom
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.2+ |
Examples:
set {_component} to the equippable component of {_item}
forbid {_component} from being dispensed forth
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.5+ |
Examples:
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.2+ |
Examples:
set {_component} to the equippable component of {_item}
forbid {_component} from exchanging armament upon right click
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.2+ |
Examples:
set {_component} to the equippable component of {_item}
if {_component} shall forfeit durability when wounded:
make {_component} forfeit durability upon wounding
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.6+ |
Examples:
set {_component} to the equippable component of {_item}
if {_component} can be shorn from entities:
forbid {_component} from being shorn from entities
| Patterns: |
|
| Since: | 2.11 |
Employing `by` doth add or subtract from the present size of the world border.
Employing `to` doth set it to the specified measure.
Examples:
diminish world border of world "world" to 100 over 10 seconds
| Patterns: |
|
| Since: | 2.8.0 |
Examples:
render entity left handed
render all zombies in radius 10 of player right handed
| Patterns: |
|
| Since: | 2.11 |
Examples:
| Patterns: |
|
| Since: | 2.0 (cows, sheep & snowmen), 2.8.0 (all shearable entities) |
Prithee note that..:
- Force-fleecing or un-fleecing on a sheared mushroom cow is not possible
Examples:
fleece the clicked sheep
chance of 10%
force fleece the clicked sheep
| Patterns: |
|
| Since: | 2.5.1 |
| Requirements: | Minecraft 1.15.2+ |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
victim is a player
victim has the permission "skript.god"
forbid the occasion
| Patterns: |
|
| Since: | 2.2-dev34 |
Examples:
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
forsake the cooldown
send "Your nickname may be at most 16 characters."
stop
set the player's display name to arg-1
| Patterns: |
|
| Since: | 2.11 |
Examples:
restore {_goat}'s horns
sever both horns of all goats
| Patterns: |
|
| Since: | 2.8.0 |
For instance, halting the consumption of victuals, or the drawing of a bow.
Examples:
if the victim's active tool is a bow:
halt the employment of the player's active item
| Patterns: |
|
| Since: | 2.5 |
Examples:
revive server
| Patterns: |
|
| Since: | 2.10 |
Item tags ought be employed for contexts wherein the item is not set upon the ground, whilst block tags are meet for contexts wherein the item is placed. For example, an item tag might be "skript:edible", whilst a block tag would be "skript:needs_water_above".
All bespoke tags shall be granted the namespace "skript", followed by the name thou dost provide. The name must only comprise the characters A to Z, 0 to 9, and '/', '.', '_', and '-'. Otherwise, the tag shall not be inscribed.
Pray note that two tags may share a name if they be of differing types. Inscribing a new tag of the same name and type shall overwrite the existing tag. Tags shall be cleared upon server shutdown.
Examples:
inscribe an item tag named "skript:wasp_weapons/swords" comprising diamond sword and netherite sword
inscribe block tag named "pokey" comprising sweet berry bush and bamboo sapling
on player move:
block at player is marked as tag "skript:pokey"
damage the player by 1 heart
| Patterns: | |
| Since: | 2.0, 2.9.0 (severities) |
NB: Employing 'server.log' as the log file shall write to the default server log. Omitting the log file altogether shall inscribe the message as '[Skript] [<script>.sk] <message>' in the server log.
Examples:
inscribe "%player% hath just arrived upon the server!"
on world change:
inscribe "Someone hath just departed unto %event-world%!" to file "worldlog/worlds.log"
on command:
inscribe "%player% hath just executed %full command%!" to file "server/commands.log" with a severity of warning
| Patterns: |
|
| Since: | 2.10 |
Examples:
invoke {_function}
invoke {_function} with arguments {_things::*}
| Patterns: |
|
| Since: | 2.9.0 |
| Requirements: | Spigot 1.20.5+ |
If altering the 'entire' tooltip of an item, naught shall appear when a player hovers upon it.
If altering the 'supplementary' tooltip, only particular portions (which vary per item) shall be concealed.
Examples:
conceal {_item}'s supplementary tool tip
| Patterns: |
|
| Since: | 2.11 |
Examples:
permit all dropped items to naturally despawn
| Patterns: |
|
| Since: | 2.7 |
Examples:
bid all cows halt journeying
bid event-entity journey towards player at speed 1
| Patterns: |
|
| Since: | 2.7 |
Examples:
smite back victim (vector from attacker to victim) with strength 10
| Patterns: | |
| Since: | 2.11 |
| Requirements: | Minecraft 1.21 |
When dealing with beehives, providing a timespan shall prevent the liberated bees from re-entering the beehive for that duration.
Due to unstable behaviour upon older versions, this effect doth require Minecraft version 1.21+.
Examples:
liberate the entity storage of {_hive} for 5 seconds
| Patterns: |
|
| Since: | 1.4 |
Examples:
strike lightning effect at the victim
| Patterns: |
|
| Since: | 2.3 |
Examples:
suppress the variable save warnings
| Patterns: |
|
| Since: | 2.11 |
| Requirements: | Minecraft 1.21+ |
The entity must be of the proper kind for the block (e.g. bee for beehive).
Owing to unstable behaviour upon older versions, lodging entities within an entity storage doth require Minecraft version 1.21+.
Examples:
| Patterns: |
|
| Since: | 2.4 |
Examples:
| Patterns: |
|
| Since: | 2.0 |
Examples:
make the attacker mount the victim
| Patterns: |
|
| Since: | 2.0, 2.1.1 (closing), 2.2-Fixes-V10 (anvil), 2.4 (hopper, dropper, dispenser) |
Pray note that presently 'show' and 'open' bear the same effect, yet 'show' shall in time reveal an unalterable view of the inventory.
Examples:
open the player's inventory for the player
| Patterns: |
|
| Since: | 2.11 |
The warden shall not investigate should it already be wrathful toward an entity.
This effect doth not add anger unto the warden.
Examples:
| Patterns: |
|
| Since: | 2.3 |
Examples:
grant a diamond unto the player should the player have permission "rank.vip"
| Patterns: |
|
| Since: | 2.10 |
Examples:
if player is not set:
forbid the tether from falling
else if player is op:
permit the tether to fall
| Patterns: |
|
| Since: | 2.10 |
Examples:
permit aging of entity
| Patterns: |
|
| Since: | 2.3 |
The Vanilla Minecraft client shall display ??? (dark gray) in lieu of player counts and shall not reveal the
hover list when concealing player tidings.
The version string may override the ???.
Also the Online Players Count and
Max Players expressions shall return -1 when concealing player tidings.
Examples:
conceal player related information in the server list
reveal all player related info
| Patterns: |
|
| Since: | 2.14 |
Examples:
| Patterns: |
|
| Since: | 2.14 |
That is to say, whether the potion effect doth produce more, translucent particles.
Examples:
| Patterns: |
|
| Since: | 2.14 |
Examples:
| Patterns: |
|
| Since: | 2.14 |
That is to say, whether the potion effect shall ever expire.
Examples:
| Patterns: |
|
| Since: | 2.4 |
Examples:
if the victim is an op:
preserve the inventory and experiences
| Patterns: |
|
| Since: | 2.8.0 |
Note: preserving many worlds at once may perchance cause the server to freeze.
Examples:
preserve all worlds
| Patterns: | |
| Since: | 1.4.6 2.12 (push towards) |
Examples:
thrust the victim downwards at speed 0.5
propel player towards player's target at speed 2
pull player along vector(1,1,1) at speed 1.5
| Patterns: |
|
| Since: | 2.11 |
Examples:
| Patterns: |
|
| Since: | 2.10 |
Examples:
entity is not an adult
render entity an adult
| Patterns: |
|
| Since: | 2.10 |
Examples:
render entity unbreedable
| Patterns: | |
| Since: | 2.5 |
Examples:
render the explosion fiery
| Patterns: | |
| Since: | 2.14 |
Examples:
| Patterns: |
|
| Since: | 2.9.0 |
| Requirements: | Spigot 1.20.5+ |
Examples:
render {_items::*} not resistant to fire
| Patterns: |
|
| Since: | 2.7 |
When setting an entity to invisible whilst an invisibility potion is upon it, the potion shall be overridden, and when it runneth out the entity keepeth its invisibility.
Examples:
| Patterns: |
|
| Since: | 2.2-dev28, 2.10 (quaternions, displays) |
Vectors may only be revolved about the global X/Y/Z axes, or an arbitrary vector axis.
Quaternions art more versatile, permitting revolution about the global or local X/Y/Z axes, arbitrary vectors, or all three local axes at once.
Global axes art those of the Minecraft world. Local axes art relative to the quaternion's present orientation.
Revolving a display is but a shorthand for revolving its left rotation. Should the right rotation require alteration, it must be acquired, revolved, and set anew.
Mark well that revolving a quaternion or display about a vector doth result in a revolution about the local vector, and thus the outcome may defy expectation.For instance, revolving quaternions or displays about vector(1, 0, 0) is the selfsame thing as revolving about the local X axis.
The same doth apply to revolutions by all three axes at once.Furthermore, revolving about all three axes of a quaternion or display at once shall proceed in ZYX order, meaning the Z revolution shall be applied first and the X revolution last.
Examples:
revolve last spawned block display about y axis by 10 degrees
revolve {_vector} about vector(1, 1, 1) by 45
revolve {_quaternion} by x 45, y 90, z 135
| Patterns: |
|
| Since: | 2.11 |
Bid villagers to slumber by providing a location of a bed.
Bid players to slumber by providing a location of a bed.Employing 'with force' shall bypass "nearby monsters", the maximum distance, permitting players to slumber even if the bed be far away, and letteth players slumber in the nether and end.Doth not function if the location of the bed be not in the world the player presently inhabits.
Employing 'without spawn location update' shall rouse players without setting their spawn location to the bed.
Examples:
make {_bat} cease slumber
make {_villager} commence slumber at location(0, 0, 0)
make player retire to slumber at location(0, 0, 0) with force
make player rouse without spawn location update
| Patterns: |
|
| Since: | 1.0, 2.8.0 (bungeecord command) |
If the command be a bungeecord-side decree, thou mayest employ the [bungeecord] option to enact the command upon the proxy.
Examples:
enact console decree "/say Hail, good people, one and all!"
enact player bungeecord decree "/alert &6Testing Announcement!"
| Patterns: |
|
| Since: | 2.10 |
Examples:
| Patterns: | |
| Since: | 2.4 |
Thou mayest add a tool, which shall scatter items based upon how that tool would break the block
(i.e.: When using a bare hand to break stone, it yieldeth nothing, whereas with a pickaxe it yieldeth cobblestone).
Examples:
shatter clicked block naturally
loop blocks in radius 10 around player:
shatter loop-block using player's tool
loop blocks in radius 10 around player:
shatter loop-block naturally using diamond pickaxe
| Patterns: |
|
| Since: | 2.4, 2.7 (stop all sounds) |
Pray note that sound names may be altered in any Minecraft or Spigot version, or indeed removed from Minecraft itself.
Examples:
cease playing sounds "ambient.underwater.loop" and "ambient.underwater.loop.additions" to the player
silence all sounds for all players
silence sound in the record category
| Patterns: |
|
| Since: | 1.0, 2.10 (ignoring totem of undying) |
Examples:
slay all creepers in the player's world
slay all endermen, witches and bats
| Patterns: |
|
| Since: | 2.2-dev28, 2.4 (sound categories), 2.9 (sound seed & entity emitter) |
When running 1.19+, playing a sound from an entity directly shall cause the sound to emanate from said entity, even whilst in motion.
If the sound be custom, a location emitter shall follow the entity. Do note that pitch and volume
are reflected based upon the entity, and Minecraft may not employ the values from this syntax.
Minecraft doth sometimes harbour a set of sounds under one sound ID that shall randomly play.To counter this, thou canst directly state which seed to employ.
Pray note that sound names may be altered in any Minecraft or Spigot version, or even banished from Minecraft itself.
Examples:
play sound "entity.experience_orb.pickup" with volume 0.5 unto the player
play sound "custom.music.1" in jukebox category at {speakerBlock}
play sound "BLOCK_AMETHYST_BLOCK_RESONATE" with seed 1 on target entity for the player
| Patterns: |
|
| Since: | 2.12 |
Examples:
make last spawned strider cease trembling
| Patterns: |
|
| Since: | 2.3 |
last loaded server icon expression.
Pray note that the image must be 64x64 and the file path doth begin from the server folder.
Examples:
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::*}
| Patterns: |
|
| Since: | 2.8.0 |
The summoning effect shall create a new world should one not already exist.
When attempting to summon a vanilla world, thou must declare its environment, e.g. "world_nether" must be summoned with nether environment.
Examples:
summon the world "myCustomWorld"
banish "world_nether"
banish "world_the_end" without saving
banish all worlds
| Patterns: |
|
| Since: | 2.0, 2.2-dev24 (multiple strings, items in inventory), 2.5 (replace first, case sensitivity), 2.10 (regex) |
Examples:
replace every "&" with "§" in line 1 of targeted block
# A most simple chat censor
on chat:
replace all "idiot" and "noob" with "****" in the message
regex replace "(idiot|noob)" with "****" in the message # Regex version using word boundaries for finer results
replace all stone and dirt in player's inventory and player's top inventory with diamond
| Patterns: |
|
| Since: | 2.12 |
NOTE: Suppressing type hints doth also prevent syntax from providing new type hints. For example, with type hints suppressed, 'set {_x} to true' would not provide 'boolean' as a type hint for '{_x}'
Examples:
# potentially unsafe code goes here
cease suppressing local variable type hints
| Patterns: |
|
| Since: | 2.10 |
Examples:
untame {_horse}
| Patterns: |
|
| Since: | 1.4 |
ban player → tarry 7 days → unban player shall not avail if thou dost restart thy server at any time within those 7 days. Thou must also take great care even when employing brief delays! Examples:
halt for 5 minecraft hours
tarry for a tick
| Patterns: |
|
| Since: | 2.3 |
See Spigot's Javadocs for further knowledge.
Examples:
tether event-entity to player
send "&aThou hast tether'd &2%event-entity%!" to player
| Patterns: | |
| Since: | 2.10 |
Examples:
if {_display} hath drop shadow:
remove drop shadow from the text of {_display}
| Patterns: | |
| Since: | 2.10 |
Examples:
forbid all text displays from being visible through walls
| Patterns: |
|
| Since: | 2.11 |
Providing a location applieth only unto allays. They shall inspect whether the block at said location be a jukebox playing music. If it be not, they shall cease their dance. If no location be provided, the allay shall dance without end.
Providing a timespan applieth only unto piglins. It determineth the duration of their revelry. If no timespan be provided, they shall dance in perpetuity.
Examples:
bid last spawned allay commence a dance
if block at location(0, 0, 0) is a jukebox:
bid all allays dance at location(0, 0, 0)
bid last spawned piglin commence a dance
bid all piglins dance for 5 hours
| Patterns: |
|
| Since: | 2.0, 2.2-dev26 (maps and potions) |
(red, green, blue), where (0,0,0) is black as night and (255,255,255) is white as snow. Armour may be tinted in all Minecraft versions. With Minecraft 1.11 or newer, thou canst also tint potions and maps. Note that the hues might not appear precisely as thou wouldst expect. Examples:
tint the player's tool red
| Patterns: | |
| Since: | 2.3 |
Shouldst thou send only the subtitle, it shall appear only if a title be presently displayed; otherwise it shall be shown with the next title. To display only the subtitle, employ:
proclaim title " " with subtitle "yourtexthere" unto player.Mark well: if no durations be given, it shall retain those from the last title proclaimed; use the reset title effect to restore the default values.
Examples:
proclaim title "Hi %player%" unto player
proclaim title "Loot Drop" with subtitle "starts in 3 minutes" unto all players
proclaim title "Hello %player%!" with subtitle "Welcome to our server" unto player for 5 seconds with fadein 1 second and fade out 1 second
proclaim subtitle "Party!" unto all players
| Patterns: |
|
| Since: | 1.4, 2.12 (booleans) |
Examples:
on projectile hit:
projectile is arrow
toggle the block at the arrow
# With booleans
toggle gravity of player
| Patterns: | |
| Since: | 2.9.0 |
Perchance, the entity that did toll the bell and the direction it should ring may be specified.
A bell may only toll in twain directions, determined by which way the bell doth face.
By default, the bell shall toll in the direction it faceth.
Examples:
| Patterns: | |
| Since: | 2.8.0 |
Note: Transcribing a value into a variable or list shall overwrite whatsoever data existeth therein.
Examples:
set {_foo::sublist::foobar} to "hey"
transcribe {_foo::*} to {_copy::*}
proclaim indices of {_copy::*} # bar, sublist
proclaim {_copy::bar} # 1
proclaim {_copy::sublist::foobar} # "hey!"
| Patterns: |
|
| Since: | 2.10 |
Employing 'without physics' shall not dispatch tidings to the surrounding blocks of those being set.
For example: Transmuting a block beside a sand block suspended in the air 'without physics' shall not cause the sand block to fall.
Examples:
transmute {_blocks::*} to be sand without physics updates
transmute {_blocks::*} as stone without neighbouring updates
| Patterns: |
|
| Since: | 2.10 |
Evaluateth the given expression for each element in the list, replacing the original element with the expression's yield.
Should the given expression return a single value, the indices of the list shall remain unchanged. Should the expression return manifold values, then the indices shall be reset, as a single index cannot harbour multiple values.
Only variable lists may be transmuted with this effect. For other lists, see the transform expression.
Examples:
transmute {_a::*} employing input * 2
# {_a::*} is now 2, 4, and 6
# procure a list of the sizes of all clans without manually traversing
set {_clan-sizes::*} to indices of {clans::*}
transmute {_clan-sizes::*} employing {clans::%input%::size}
# set all existing values of a list to naught:
transmute {_list::*} with 0
| Patterns: |
|
| Since: | 1.0, 2.10 (flags) |
This effect is delayed by default on Paper, meaning certain syntax such as the return effect for functions cannot be employed thereafter.
The keyword 'force' doth indicate this effect shall not be delayed,
which may cause lag spikes or server crashes when transporting entities unto unloaded chunks.
Transport flags are settings to retain during a transport, such as direction, passengers, x coordinate, and so forth.
Examples:
transport the attacker unto the victim
on dismount:
cancel event
transport the player unto {server::spawn} retaining vehicle and passengers
| Patterns: |
|
| Since: | 1.0, 2.10 (damage cause) |
| Requirements: | Spigot 1.20.4+ (for damage cause) |
Servers running Spigot 1.20.4+ may optionally declare a feign'd damage cause.
Examples:
wound player by 3 hearts with fake cause fall
heal the player
repair tool of player
| Patterns: |
|
| Since: | 2.11 |
This effect doth remove the former entity and conjure a new one in its stead.
Zombifying a villager stored within a variable shall update said variable to the newly cursed zombie villager.
Curing a zombie villager doth not update the variable.
Examples:
set {_villager} to last spawned villager
zombify {_villager}
if {_villager} is a zombie villager:
# This shall pass, for '{_villager}' is changed to the new zombie villager
set {_villager} to last spawned villager
zombify last spawned villager
if {_villager} is a zombie villager:
# This shall fail, for the variable was not provided when zombifying
cure {_zombieVillager}
cure {_zombieVillager} after 2 seconds
| Patterns: |
|
| Since: | 2.10 |
Examples:
loose a pig from all players:
add event-entity to {_projectiles::*}
| Patterns: |
|
| Since: | 1.0, 2.6.1 (with section), 2.8.6 (dropped items), 2.10 (entity snapshots) |
| Requirements: | Minecraft 1.20.2+ (entity snapshots) |
If employed as a section, the section shall run ere the entity is added unto the world.
Thou mayest modify the entity within this section, using for example 'event-entity' or 'cow'.
Mark well that other event values, such as 'player', shall not function within this section.
If thou art summoning a display and dost wish it to be empty upon initialization, such as not having a block display appear as stone, set the hidden config node 'spawn empty displays' to true.
Note that when summoning an entity by way of entity snapshots, the code within the section shall not run instantaneously as compared to summoning by the usual means (via 'a zombie').
Examples:
conjure a ghast 5 meters above the player
summon a zombie at the player:
set name of the zombie to ""
conjure a block display of a ladder[waterlogged=true] at location above player:
set billboard of event-display to center # permits the display to rotate about the centre axis
| Patterns: |
|
| Since: | 2.11 |
Examples:
disallow last spawned to duplicate
| Patterns: | |
| Since: | 2.0, 2.4-alpha4 (non-living entity support) |
Examples:
on shoot:
while the projectile is amongst the living:
| Patterns: |
|
| Since: | 2.0, 2.11 (entities) |
Examples:
if player is riding an entity:
if player is riding a saddled pig:
if player is riding last spawned horse:
| Patterns: |
|
| Since: | 1.4 |
Examples:
victim is not IP-banished
"127.0.0.1" is banished
| Patterns: | |
| Since: | 2.5 |
Examples:
send "This block is well-empowered by redstone!"
if clicked block is indirectly redstone empowered:
send "This block is indirectly redstone empowered."
| Patterns: | |
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | 2.11 |
Examples:
make last spawned axolotl stop playing dead
| Patterns: | |
| Since: | 2.5 |
Examples:
if the explosion is fiery:
broadcast "A fiery explosive hath been set alight!"
| Patterns: |
|
| Since: | 2.7 |
Examples:
if timespan argument is infinite:
| Patterns: |
|
| Since: | 2.5.2 |
Examples:
if event-block is interactable:
cancel event
send "You cannot break interactable blocks!"
| Patterns: |
|
| Since: | 2.7 |
Examples:
| Patterns: | |
| Since: | 2.5, 2.10 (gamemode) |
Examples:
loop all gamemodes:
if loop-value is not invulnerable:
broadcast "the gamemode %loop-value% is vulnerable!"
| Patterns: | |
| Since: | 2.10 |
Examples:
set {_pig} to last spawned entity
if {_pig} is fit for plunder:
set loot table of {_pig} to "minecraft:entities/cow"
# the pig shall now yield the spoils of a cow when slain, for it is indeed a plunderable entity.
set block at event-location to chest
if block at event-location is fit for plunder:
set loot table of block at event-location to "minecraft:chests/simple_dungeon"
# the chest shall now beget the spoils of a simple dungeon when opened, for it is indeed a plunderable block.
set block at event-location to white wool
if block at event-location is fit for plunder:
# alas, naught shall come to pass, for a wool is not a plunderable block.
| Patterns: |
|
| Since: | 2.5 |
Examples:
| Patterns: |
|
| Since: | 2.2-dev36 |
Examples:
| Patterns: |
|
| Since: | 2.5.1, 2.9.0 (breakable) |
Examples:
send "This item is unbreakable!" to player
if tool of {_p} is breakable:
send "Your tool is breakable!" to {_p}
| Patterns: |
|
| Since: | 2.5.2, 2.9.0 (enforce, offline players) |
| Requirements: | MC 1.17+ (enforce) |
Examples:
if the server is upon the whitelist:
if the server whitelist is enforced:
| Patterns: | |
| Since: | 2.7, 2.10 (Scripts & Configs) |
An invalid entity may have perished or vanished from this mortal plane by some other cause.
An invalid script reference may have been reloaded, displaced, or rendered dormant since.
Examples:
| Patterns: |
|
| Since: | 2.8.0 |
Examples:
while event-entity is not jumping:
wait 5 ticks
push event-entity upwards
| Patterns: |
|
| Since: | 2.3, 2.5 (revamp with chunk at location/coords), 2.10 (Scripts) |
'chunk at 1, 1' employeth chunk coordinates, which art location coords divided by 16.
Examples:
if chunk 1, 10 in world "world" is laden upon memory:
if world("lobby") is laden upon memory:
if script named "MyScript.sk" is laden upon memory:
| Patterns: |
|
| Since: | 2.5.1 |
Examples:
| Patterns: | |
| Since: | 2.5.1 |
A block is passable if it possesseth no colliding parts that would bar players from passing through.
Blocks such as tall grass, flowers, signs, and the like art passable, yet open doors, fence gates, trap doors, and their ilk art not, for they still bear parts with which one may collide.
Examples:
| Patterns: |
|
| Since: | 2.9.0 |
The entity in question must needs be a living creature that is a Mob.
Examples:
while {_entity} is pathfinding
wait a second
launch flickering trailing burst firework colored red at location of {_entity}
subtract 10 from {defence::tower::health}
clear entity within {_entity}
| Patterns: | |
| Since: | 2.11 |
Persistence of entities speaketh to whether they be retained through server restarts.
Persistence of leaves is whether they ought to decay when unconnected to a log block within six metres.
Persistence of players determineth if the player's data shall be preserved when they depart the server. Players' persistence is restored unto 'true' when they rejoin the server.
Passengers do inherit the persistence of their vehicle, meaning a persistent zombie set upon a non-persistent chicken shall itself become non-persistent. This applieth not unto players.
By default, all entities art persistent.
Examples:
if event-entity is persistent:
make event-entity not persistent
| Patterns: | |
| Since: | 2.6 |
Plugin names may be found within the plugin's 'plugin.yml' scroll or by invoking the '/plugins' command; they art NOT the name of the plugin's jar vessel.
When checking if a plugin be not enabled, this shall yield true if the plugin be either disabled or absent from the server.
When checking if a plugin be disabled, this shall yield true if the plugin resideth upon the server yet standeth disabled.
Examples:
if plugin "WorldGuard" is not enabled:
if plugins "Essentials" and "Vault" are enabled:
if plugin "MyBrokenPlugin" is disabled:
| Patterns: |
|
| Since: | 1.4 |
Examples:
player-argument is offline
while player is connected:
wait 60 seconds
send "hello!" to player
# The following will act like `{_player} is online`.
# Using variables with `is connected` will not behave the same as with non-variables.
while {_player} is connected:
broadcast "online!"
wait 1 tick
| Patterns: |
|
| Since: | 2.13 |
Examples:
if a monster can be spawned in {_world}: # false
| Patterns: |
|
| Since: | 2.7 |
Examples:
birch wood is stackable
torch is stackable
| Patterns: |
|
| Since: | 2.5 |
Examples:
if victim is tameable:
cancel event
| Patterns: | |
| Since: | 2.10 |
Examples:
tame {_horse} if {_horse} is untamed
| Patterns: |
|
| Since: | 1.0 |
Examples:
target is adorned with wolf armor
| Patterns: | |
| Since: | unknown (before 2.1) |
Examples:
victim is warding
damage attacker by 0.5 hearts
| Patterns: |
|
| Since: | 2.4 |
Examples:
{list::*} are blocks
| Patterns: | |
| Since: | 2.3 |
Slimes may generally spawn within the swamp biome and within slime chunks.
For further knowledge, consult the Minecraft wiki.
Examples:
trigger:
if chunk at player is a slime chunk:
send "Aye, verily it is!"
else:
send "Nay, it is not"
| Patterns: |
|
| Since: | 2.7 |
Examples:
| Patterns: |
|
| Since: | 2.2-dev36 |
Examples:
player's tool isn't solid
| Patterns: |
|
| Since: | 1.4 |
Examples:
victim is of kind {villager type}
| Patterns: | |
| Since: | 2.9.0 |
A bell shall commence its resonance five game ticks after being struck, and shall continue to resound for forty game ticks.
Examples:
| Patterns: |
|
| Since: | 2.13 |
Examples:
if the brewing stand shall consume the fuel:
forbid the brewing stand from consuming the fuel
| Patterns: |
|
| Since: | 2.11 |
Examples:
kill last spawned camel
| Patterns: |
|
| Since: | 2.10 |
Examples:
entity can't age
broadcast "An immortal hath been born!" to player
| Patterns: |
|
| Since: | 2.10 |
Examples:
event-entity can't breed
send "It doth appear %event-entity% cannot be bred. Surely a Skript user!" to player
| Patterns: |
|
| Since: | 2.11 |
Further wisdom on what creatures vanish and when may be found at reference.
Examples:
make last spawned entity not vanish on chunk unload
| Patterns: | |
| Since: | 2.2-dev36, 2.5.1 (multiple strings support) |
Examples:
send "Cease!"
| Patterns: |
|
| Since: | 1.0 |
Note: This is the sole element wherein not all patterns are shown. It hath in truth another two sets of similar patterns, but with
(was|were) or will be in place of (is|are) respectively, which do examine different time states of the first expression. Examples:
time in the player's world is greater than 8:00
the creature is not an enderman or an ender dragon
| Patterns: |
|
| Since: | Unknown |
Examples:
player has 4 flint and 2 iron ingots
{list::*} contains 5
names of {list::*} contain "prefix"
contents of the inventories of all players contain 1 stick
| Patterns: | |
| Since: | 2.11 |
Examples:
release the creature storage of {_beehive}
| Patterns: |
|
| Since: | 2.7 |
| Requirements: | Minecraft 1.16+ |
Examples:
| Patterns: |
|
| Since: | 2.1 |
| Requirements: | Supported regions plugin |
This condition doth require a supported regions plugin to be installed.
Examples:
on region enter:
region contains {flags.%world%.red}
message "The crimson banner doth lie near!"
| Patterns: |
|
| Since: | 2.10 |
If 'properly' be employed, this shall only yield true if the entity doth wear specifically a saddle item.
Examples:
| Patterns: | |
| Since: | 1.4.4 |
Examples:
on target:
target is sneaking
distance of target and the entity is bigger than 4
cancel the event
| Patterns: | |
| Since: | 2.9.0 |
Examples:
on load:
if the script doth employ "example feature":
broadcast "You're using an experimental feature!"
| Patterns: | |
| Since: | 1.2 |
Examples:
on damage:
projectile exists
broadcast "%attacker% used a %projectile% to attack %victim%!"
| Patterns: |
|
| Since: | 2.7, 2.11 (world borders) |
| Requirements: | MC 1.17+ (within block) |
Mark well that employing the is between condition shall refer to a straight line betwixt locations, whilst this condition shall refer to the cuboid betwixt them.
Examples:
send "You are in a PvP zone!" to player
if player is in world("world"):
send "You are in the overworld!" to player
if attacker's location is inside of victim:
cancel event
send "Back up!" to attacker and victim
if player is in world "world1" or world "world2":
kill player
if player is in world "world" and chunk at location(0, 0, 0):
give player 1 diamond
| Patterns: | |
| Since: | 2.5.2 |
Examples:
if message doth partially match "\d":
send "Message contains a digit!"
if message doesn't match "[A-Za-z]+":
send "Message doesn't only contain letters!"
| Patterns: |
|
| Since: | 1.0 |
Examples:
victim has the permission "admin":
send "Thou dost assail an administrator!" to attacker
| Patterns: |
|
| Since: | 2.5 |
Examples:
| Patterns: |
|
| Since: | 2.11 |
Examples:
make last spawned goat scream
if {_enderman} is screaming:
force {_enderman} to stop screaming
| Patterns: |
|
| Since: | 1.4.4, 2.11 (living entities) |
Examples:
make player wake up without spawn location update
if last spawned fox is sleeping:
make last spawned fox stop sleeping
| Patterns: |
|
| Since: | 2.3 |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
victim doth not wield a diamond sword of sharpness
| Patterns: |
|
| Since: | 2.7 |
Examples:
if an entity shan't hatch:
send "Better fortune next time!" to the player
| Patterns: |
|
| Since: | 2.11 |
This shall return true so long as the entity that did gaze upon the enderman yet liveth.
Examples:
| Patterns: |
|
| Since: | 2.8.0 |
Examples:
send "This entity hath nothing left to shear!" to player
| Patterns: | |
| Since: | 2.6.1 |
Examples:
if player is in water:
player is in lava:
player is in bubble column
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.2+ |
Examples:
add "Dispensable" to lore of {_item}
set {_component} to the equippable component of {_item}
if {_component} is not able to be dispensed forth:
grant {_component} to be dispensed forth
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.5+ |
Examples:
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.6+ |
Examples:
add "Shearable" to lore of {_item}
set {_component} to the equippable component of {_item}
if {_component} can not be shorn from:
grant {_component} to be shorn from
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.2+ |
Examples:
add "Swappable" to lore of {_item}
set {_component} to the equippable component of {_item}
if {_component} can not exchange armament when right clicked:
make {_component} exchange armament
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.2+ |
Examples:
add "Damageable on injury" to lore of {_item}
set {_component} to the equippable component of {_item}
if {_component} shan't forfeit durability upon wounding:
make {_component} forfeit durability when wounded
| Patterns: |
|
| Since: | 2.10 |
Examples:
if lure enchantment boon is bestowed:
cancel event
| Patterns: |
|
| Since: | 1.0, 2.14 (chance fails) |
Examples:
drop a diamond at location(100, 100, 100, "world')
fortune of {chance}% # {chance} between 0 and 100
fortune of {chance} # {chance} between 0 and 1
if fortune of 99% fails:
broadcast "Haha loser! *points and laughs*"
| Patterns: |
|
| Since: | 2.11 |
Examples:
make last spawned goat have both horns
if {_goat} has a dexter horn:
force {_goat} to not have a dexter horn
| Patterns: |
|
| Since: | 2.5 |
Examples:
| Patterns: | |
| Since: | 2.3 |
Examples:
message "Thy bespoke weather is %player's weather%"
| Patterns: | |
| Since: | 2.10 |
Examples:
send "<gray>This server may contain mature chat messages. You have been warned!" to player
| Patterns: |
|
| Since: | 2.5, 2.12 (expanded data types) |
| Requirements: | Minecraft 1.21.4+ (floats/flags/strings/colours) |
Examples:
if 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 colours
| Patterns: |
|
| Since: | 1.4, 2.7 (multiple players) |
Examples:
player hasn't graced the server before
| Patterns: |
|
| Since: | 2.8.0 2.12 (cooldown group) |
| Requirements: | MC 1.21.2 (cooldown group) |
Examples:
send "Thou canst not wield this item presently. Tarry %item cooldown of player's tool for player%"
| Patterns: |
|
| Since: | 2.9.0 |
| Requirements: | Spigot 1.20.5+ |
The 'entire tooltip' is that which doth appear before the player when they hover upon an item (i.e. name, lore, and such).
The 'additional tooltip' doth conceal certain particulars from certain items (potions, maps, books, fireworks, and banners).
Examples:
if additional tooltip of {_item} is concealed:
| Patterns: |
|
| Since: | 2.8.0 |
Examples:
victim has line of sight to attacker
player has no line of sight to location 100 blocks in front of player
| Patterns: |
|
| Since: | 2.8.0 |
Examples:
| Patterns: |
|
| Since: | 2.2-dev36 |
Examples:
| Patterns: | |
| Since: | 2.4 |
Examples:
| Patterns: | |
| Since: | 2.3 |
Examples:
| Patterns: |
|
| Since: | 2.5 |
Examples:
loop all players in radius 3 of the last spawned creeper
send "FLEE!!!" to the loop-player
| Patterns: | |
| Since: | 2.10 |
Mark well that employing the 'now' expression shall not be reckoned in the past nor the future when used directly within the condition.
Examples:
wait 5 seconds
if {_date} is in the past:
# this will be true
if now is in the future:
# this will be false
set {_dates::*} to 1 day from now, 12 days from now, and 1 year from now
if {_dates::*} are in the future:
# this will be true
if {_dates::*} have passed hence:
# this will be false
| Patterns: | |
| Since: | 1.4.4 |
Examples:
victim is burning:
increase damage by 2
| Patterns: |
|
| Since: | 2.8.0 |
| Requirements: | Minecraft 1.17+ |
Examples:
wait a second
if the last spawned spider is ascending:
message "The spider doth now ascend!"
| Patterns: |
|
| Since: | 2.7 |
| Requirements: | Minecraft 1.16+ |
Examples:
the respawn location is a bed
broadcast "%player% doth respawn in their bed! How most comfortable!"
| Patterns: |
|
| Since: | 1.4.6, 2.12 ('or better') |
Examples:
if player's helmet or player's boots are enchanted with protection 3 or better:
if player's chestplate is enchanted with protection
| Patterns: | |
| Since: | 2.5, 2.10 (withers, wither skulls) |
Examples:
broadcast "A charged creeper doth lurk at %location of last spawned creeper%"
| Patterns: |
|
| Since: | 2.11 |
Examples:
broadcast "A Grand Ball commenceth!"
| Patterns: |
|
| Since: | 2.1 |
| Requirements: | Supported regions plugin |
This condition doth require a supported regions plugin to be installed.
Examples:
player is the lord of the dominion
message "Welcome back to %region%!"
send "%player% hath just entered %region%!" to all denizens of the dominion
| Patterns: |
|
| Since: | 2.10 |
Examples:
if entity is in love:
broadcast "That was most swift!"
| Patterns: |
|
| Since: | 1.4.4 |
Examples:
purge the player of venom
message "Thou hast been cured of thy affliction!" to the player
| Patterns: |
|
| Since: | 2.10, 2.12 (tolerance) |
Examples:
if 11 cannot be evenly divided by 10:
if 0.3 can be evenly divided by 0.1 with a tolerance of 0.0000001:
| Patterns: |
|
| Since: | 2.7 |
| Requirements: | 1.16.5+, Paper 1.19.2+ (blockdata) |
Examples:
event-block is set
if player's tool is the favoured implement for event-block:
break event-block naturally using player's tool
else:
cancel event
| Patterns: |
|
| Since: | 2.11 |
Examples:
force last spawned panda to stop feasting
| Patterns: | |
| Since: | 2.10 |
Open water is defined by a 5x4x5 expanse of water, air, and lily pads.If in open waters, treasures of great worth may be caught.
Examples:
if fish hook is in open waters:
send "Thou shalt soon catch a shark!"
| Patterns: |
|
| Since: | 2.2-dev36 |
Examples:
player's tool is edible
| Patterns: |
|
| Since: | 2.5.1 |
Examples:
if player's tool is not fuel:
send "Prithee, hold a proper fuel in thine hand"
cancel event
| Patterns: | |
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | 2.7 |
Examples:
| Patterns: |
|
| Since: | 2.8.0 |
Hands are raised when an entity doth employ an item (e.g.: blocking, drawing a bow, partaking of sustenance).
Examples:
if victim's main hand is raised:
drop player's tool at player
set player's tool to air
| Patterns: |
|
| Since: | 2.10 |
Examples:
enchant player's tool with sharpness 1
if all logs are marked with tag "minecraft:logs"
| Patterns: |
|
| Since: | 2.10 |
| Requirements: | Minecraft 1.21.2+ |
Examples:
if player is pressing forward movement key:
send "Thou art advancing forward!"
| Patterns: |
|
| Since: | 2.9.0 |
| Requirements: | Spigot 1.20.5+ |
Examples:
if {_items::*} aren't resistant to fire:
| Patterns: |
|
| Since: | 2.11 |
Examples:
kill last spawned ghast
| Patterns: |
|
| Since: | 2.2-dev36 |
Examples:
player's tool is flammable
| Patterns: | |
| Since: | 2.7 |
Examples:
if attacker's location is within 10 blocks around {_spawn}:
cancel event
send "Thou canst not engage in mortal combat at the spawn."
| Patterns: | |
| Since: | 2.14 |
Examples:
if last spawned interaction is unyielding:
| Patterns: |
|
| Since: | 2.10 |
Examples:
event-entity is a baby
kill event-entity
| Patterns: |
|
| Since: | 2.10 |
Examples:
event-entity is not an adult
kill event-entity
| Patterns: |
|
| Since: | 2.10 |
| Requirements: | Spigot 1.20.5+ |
Examples:
send "Your tool has the enchantment glint override." to player
if {_item} is forced to glint:
send "This item is forced to glint." to player
else if {_item} is forced to not glint:
send "This item is forced to not glint." to player
else:
send "This item does not have any glint override." to player
| Patterns: |
|
| Since: | 2.10 |
| Requirements: | Spigot 1.20.5+ |
Examples:
send "Your tool has the enchantment glint override." to player
if {_item} is forced to glint:
send "This item is forced to glint." to player
else if {_item} is forced to not glint:
send "This item is forced to not glint." to player
else:
send "This item does not have any glint override." to player
| Patterns: |
|
| Since: | 2.10 |
Examples:
if the leash shall fall:
prevent the leash from dropping
else:
allow the leash to drop
| Patterns: | |
| Since: | 2.10 |
Examples:
open the lid of {_block}
| Patterns: | |
| Since: | 2.10 |
Examples:
send "Find the red word in <red>this<reset> message."
else:
send "You cannot partake in finding the colored word."
| Patterns: |
|
| Since: | 2.0 |
| Requirements: | Supported regions plugin |
This condition doth require a supported regions plugin to be installed.
Examples:
description: set the block at your crosshair to a different type
trigger:
player cannot build at the targeted block:
message "Thou hast not permission to alter blocks there!"
stop
set the targeted block to argument
| Patterns: |
|
| Since: | 1.0 |
Examples:
player has sufficient room for 64 feathers
| Patterns: |
|
| Since: | 2.8.0 |
Examples:
send "You can pick up items!" to player
on drop:
if player can't gather up wares:
send "Be careful, you won't be able to pick that up!" to player
| Patterns: | |
| Since: | 2.3, 2.10 (entities) |
| Requirements: | Minecraft 1.19+ (entities) |
Examples:
message "who dat?"
if the player can perceive the last spawned entity:
message "hello there!"
| Patterns: |
|
| Since: | 2.10 |
Examples:
send "You can see all messages."
if player can only perceive commands:
send "This game doesn't work with commands-only chat."
if player can't perceive any missives:
send action bar "Server shutting down in 5 minutes!"
| Patterns: |
|
| Since: | 2.2-dev36 |
Examples:
if occasion is annull'd:
broadcast "no clicks allowed!"
| Patterns: |
|
| Since: | 2.11 |
Examples:
| Patterns: |
|
| Since: | 2.11 |
Examples:
make last spawned panda stop sneezing
| Patterns: |
|
| Since: | 2.11 |
Examples:
make last spawned panda stop rolling
| Patterns: |
|
| Since: | 2.11 |
Examples:
make last spawned panda get off its back
| Patterns: | |
| Since: | 2.0 |
Examples:
trigger:
{command::%player's uuid%::last-usage} was less than a minute hence:
message "Please wait a minute between uses of this command."
stop
set {command::%player's uuid%::last-usage} to now
# ... actual command trigger here ...
| Patterns: |
|
| Since: | 2.6.1 2.14 (support for potion effects) |
An entity is considered to possess a potion effect if it beareth a potion effect with at least the specified properties.
For example, if an entity hath an 'ambient speed 5' effect, it would be deemed as possessing 'speed 5'.
For exact comparisons, consider employing the Potion Effect of Entity/Item expression within an 'is' comparison.
Examples:
message "Thou art swift as Mercury!"
if all players have speed and haste active:
broadcast "This server standeth ready to mine!"
| Patterns: | |
| Since: | 2.10 |
Examples:
if event-block has a plunder table:
# this shall never come to pass, for it possesseth no plunder table.
set plunder table of event-block to "minecraft:chests/simple_dungeon"
if event-block has a plunder table:
# this shall come to pass, for it now possesseth a plunder table.
| Patterns: |
|
| Since: | 2.14 |
That is to say, whether the effect doth transpire once and forthwith.
Examples:
message "Employ thy tool for immediate benefit!"
| Patterns: |
|
| Since: | 2.14 |
That is to say, whether the potion effect doth produce more, translucent particles.
Examples:
if the potion effect is ambient:
message "'Tis the hour of particles!"
| Patterns: |
|
| Since: | 2.14 |
Examples:
if the potion effect has particles:
hide the particles of event-potioneffecttype for event-entity
| Patterns: |
|
| Since: | 2.14 |
Examples:
if the potion effect has an emblem:
hide the emblem of event-potioneffecttype for event-entity
| Patterns: |
|
| Since: | 2.4 |
Examples:
if the resource pack wasn't accepted:
kick the player due to "Thou must install the resource pack to partake in this server!"
| Patterns: |
|
| Since: | 2.5 |
Examples:
| Patterns: |
|
| Since: | 2.11 |
Examples:
prevent all dropped items from naturally perishing
| Patterns: |
|
| Since: | 2.11 |
Examples:
prevent all dropped items from naturally perishing
| Patterns: |
|
| Since: | 2.10 |
Examples:
if the employed firework shall be consumed:
prevent the employed firework from being consumed
| Patterns: |
|
| Since: | 2.8.0 |
Examples:
if victim is left handed:
cancel event
| Patterns: |
|
| Since: | 2.12 |
Examples:
make last spawned strider stop trembling
| Patterns: | |
| Since: | 2.10 |
Examples:
remove drop shadow from the text of {_display}
| Patterns: | |
| Since: | 2.10 |
Examples:
prevent last spawned text display from being visible through walls
| Patterns: |
|
| Since: | 2.0 |
Examples:
on damage:
wound was wrought 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 circumstances
on death:
entity is not a player
wound was not wrought by a block explosion, an attack, a projectile, a potion, fire, burning, thorns or poison
clear drops
| Patterns: |
|
| Since: | 2.12 |
Examples:
if event-damage source scales harm with difficulty:
| Patterns: |
|
| Since: | 2.12 |
Vanilla damage sources art deemed indirect if the 'causing entity' and the 'direct entity' be not one and the same.For example, suffering harm from an arrow loosed by another creature.
Examples:
if event-damage source was indirectly wrought:
| Patterns: |
|
| Since: | 1.0 |
if: executed when its condition doth hold true
else if: executed if all prior chained conditionals were not carried out, and its condition doth hold true
else: executed if all prior chained conditionals were not carried out
parse if: a special case of 'if' condition whereupon the code shall not be parsed if the condition be not true
else parse if: another special case of 'else if' condition whereupon the code shall not be parsed if all prior chained conditionals were not carried out, and its condition doth hold true
Examples:
send "Thy health doth fare well enough, yet tread with care!"
else if player's health is greater than 2:
send "Thou must heal with haste, thy health is most perilously low!"
otherwise: # Fewer than 2 hearts
send "Thou art upon death's very threshold lest thou heal forthwith. Thou hast only %player's health% heart(s)!"
parse if plugin "SomePluginName" is enabled: # parse if %condition%
# This code shall only be executed if the condition be met, otherwise Skript shall not parse this section and therefore shall give no errors nor counsel regarding it
| Patterns: |
|
| Since: | 2.12 |
Examples:
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)
| Patterns: | |
| Since: | 2.10, 2.14 (stable release) |
When traversing a simple (non-indexed) set of values, e.g. all players, the index shall be the traversal counter number.
Examples:
send "Hail, %{_player}%!" to {_player}
traverse {_item} in {list of items::*}:
broadcast {_item}'s name
for each key {_index} in {list of items::*}:
broadcast {_index}
traverse key {_index} and value {_value} in {list of items::*}:
broadcast "%{_index}% = %{_value}%"
for each {_index}, {_value} in {my list::*}:
broadcast "%{_index}% = %{_value}%"
| Patterns: |
|
| Since: | 2.10 |
It doth also support sifting based upon meeting any of the given criteria, rather than all, akin to multi-line if statements.
Examples:
sift {_a::*} to match:
input is a number
mod(input, 2) = 0
input > 0
send {_a::*} # sends 2, 4, 6, 8, and 10
| Patterns: |
|
| Since: | 1.0 |
A traversal shall iterate through all elements of the given expression, e.g. all players, worlds, items, et cetera. The conditions & effects within the traversal shall be executed for every one of those elements, which may be accessed with 'loop-
send "hail" to loop-player. When a condition within a traversal is not fulfilled, the traversal shall recommence with the next element. Thou mayest however use stop loop to depart the traversal entirely and resume code execution after its end.Traversable Values
All expressions that represent more than one value, e.g. 'all players', 'worlds', et cetera, as well as list variables, may be traversed. Thou mayest also employ a list of expressions, e.g.
traverse the victim and the attacker, to execute the same code for but a few values.List Variables
When traversing list variables, thou mayest also use
loop-index in addition to loop-value within the traversal. loop-value is the value of the currently traversed variable, and loop-index is the last part of the variable's name (the part where the list variable hath its asterisk *). Examples:
send "Hail, %loop-player%!" to loop-player
traverse items in player's inventory:
if loop-item is dirt:
set loop-item to air
traverse 10 times:
send title "%11 - loop-value%" and subtitle "seconds remain ere the contest doth begin" to player for 1 second # 10, 9, 8 etc.
wait 1 second
traverse {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 player
traverse shuffled (integers between 0 and 8):
if all:
previous loop-value = 1
loop-value = 4
next loop-value = 8
then:
kill all players
| Patterns: |
|
| Since: | 2.0, 2.6 (do while) |
Examples:
send "More souls are needed to commence the adventure" to all players
wait 5 seconds
set {_counter} to 1
do whilst {_counter} > 1: # false, yet 'twill increase {_counter} by 1 then depart
add 1 to {_counter}
# Take heed when employing whilst loops with conditions that hold true
# for great spans without using 'wait %timespan%' within,
# lest it hang and bring ruin upon thy server.
whilst player is online:
give player 1 dirt
wait 1 second # without a delay effect the server shall surely crash
| Patterns: |
|
| Since: | 1.0, 2.5.1 (non-living entities) |
Examples:
on spawn of an ender dragon:
broadcast "A dragon has been sighted in %world%!"
| Patterns: |
|
| Since: | 2.7 |
Note: this does not include anvil damage from falling.
Examples:
cancel the event
| Patterns: |
|
| Since: | 2.7 |
Examples:
event-item is set # result item
chance of 5%:
set repair cost to repair cost * 50%
send "You're LUCKY! You got 50% discount." to player
| Patterns: |
|
| Since: | 2.5.1 |
Examples:
send "You swung your arm!"
| Patterns: |
|
| Since: | 1.0 |
Examples:
message "Welcome on our awesome server!"
broadcast "%player% just joined the server!"
| Patterns: |
|
| Since: | 2.8.0 |
Cancelling this event will skip the current arrow item and fire a new event for the next arrow item.
The arrow and bow in the event can be accessed with the Readied Arrow/Bow expression.
Examples:
selected bow's name is "Spectral Bow"
if selected arrow is not a spectral arrow:
cancel event
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | 2.11 |
Examples:
| Patterns: |
|
| Since: | 2.10 |
Examples:
broadcast applied effect
broadcast event-player
broadcast event-block
on primary beacon effect apply of haste:
on application of secondary beacon effect:
on beacon effect of speed:
| Patterns: |
|
| Since: | 2.10 |
Examples:
broadcast event-player
broadcast event-block
broadcast primary beacon effect
broadcast secondary beacon effect
on beacon change effect:
on player change beacon effect:
| Patterns: |
|
| Since: | 2.10 |
Examples:
on beacon activate:
on beacon deactivate:
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | 2.9.0 |
Examples:
send "&amp;lt;red&amp;gt;Raiders are nearby!" to all players in radius 32 around event-block
| Patterns: |
|
| Since: | 2.9.0 |
Examples:
send "&amp;lt;gold&amp;gt;Ding-dong!&amp;lt;reset&amp;gt;" to all players in radius 10 of event-block
| Patterns: |
|
| Since: | 2.10 |
- event-player: The player that broke the block
- past event-block: The block that was broken
- event-block: The block after being broken
- event-items (or drops): The drops of the block
- event-entities: The entities of the dropped items
If the breaking of the block leads to others being broken, such as torches, they will appearin "event-items" and "event-entities".
Examples:
broadcast event-player
broadcast past event-block
broadcast event-block
broadcast event-items
broadcast event-entities
on block drop of oak log:
| Patterns: |
|
| Since: | 1.0 |
Examples:
if block is tagged with minecraft tag "logs":
send "You can't break the holy log!"
| Patterns: |
|
| Since: | 2.5 |
| Requirements: | Minecraft 1.13 or newer |
Examples:
send "Fertilized %size of fertilized blocks% blocks got fertilized."
| Patterns: |
|
| Since: | 1.0 |
Examples:
spawn a zombie at location of event-entity
| Patterns: |
|
| Since: | 2.13 |
Examples:
| Patterns: |
|
| Since: | 2.13 |
Examples:
| Patterns: |
|
| Since: | 2.13 |
Examples:
| Patterns: |
|
| Since: | Unknown |
Examples:
| Patterns: |
|
| Since: | 1.0, 2.6 (BlockData support) |
Examples:
on burn of oak wood, oak fences, or chests:
on burn of oak_log[axis=y]:
| Patterns: |
|
| Since: | 2.10 |
Examples:
on vehicle collision with obsidian:
on vehicle collision with a zombie:
| Patterns: |
|
| Since: | unknown (before 2.1), 2.7 (entity) |
Examples:
if event-item is compass:
cancel event
on entity drop of an egg:
if event-entity is a chicken:
set item of event-dropped item to a diamond
| Patterns: |
|
| Since: | 2.8.0 |
Note that event-timespan will return the time the item was used for.
Examples:
broadcast "%player% used %event-item% for %event-timespan%."
| Patterns: |
|
| Since: | 2.2-dev21 |
Examples:
| Patterns: |
|
| Since: | 2.0 |
Examples:
player doesn't have permission "VIP"
number of players is greater than 15
kick the player due to "The last 5 slots are reserved for VIP players."
| Patterns: |
|
| Since: | 2.0 |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | unknown (before 2.1) |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
if event-block is water:
broadcast "Build more dams! It's starting to get wet in here"
| Patterns: |
|
| Since: | 2.0 |
Examples:
on command "/stop":
on command "pm Njol ":
| Patterns: |
|
| Since: | 1.0 |
Examples:
on death of player:
on death of a wither or ender dragon:
broadcast "A %entity% has been slain in %world%!"
| Patterns: |
|
| Since: | 1.0 (simple disconnection) |
Examples:
on disconnect:
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | 1.4.1 |
Use chat format to change message format.
Use chat recipients to edit chat recipients.
Examples:
if player has permission "owner":
set chat format to "&amp;amp;lt;red&amp;amp;gt;[player]&amp;amp;lt;light gray&amp;amp;gt;: &amp;amp;lt;light red&amp;amp;gt;[message]"
else if player has permission "admin":
set chat format to "&amp;amp;lt;light red&amp;amp;gt;[player]&amp;amp;lt;light gray&amp;amp;gt;: &amp;amp;lt;orange&amp;amp;gt;[message]"
else: #default message format
set chat format to "&amp;amp;lt;orange&amp;amp;gt;[player]&amp;amp;lt;light gray&amp;amp;gt;: &amp;amp;lt;white&amp;amp;gt;[message]"
| Patterns: |
|
| Since: | 2.8.0 |
Modifications will affect what commands show up for the player to tab complete. They will not affect what commands the player can actually run.
Adding new commands to the list is illegal behavior and will be ignored.
Examples:
set command list to command list where [input does not contain ":"]
remove "help" from command list
| Patterns: |
|
| Since: | unknown (before 2.1) |
Examples:
send "that'd be 19.99 please!"
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | 2.1 |
| Requirements: | Supported regions plugin |
This event requires a supported regions plugin to be installed.
Examples:
message "Leaving %region%."
| Patterns: |
|
| Since: | 1.0 (basic), 2.0 ([un]cancellable) |
Please note that the data value of the block to be placed is not available in this event, only its ID.
Examples:
cancel event
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | 2.10 |
Examples:
if the used firework will be consumed:
prevent the used firework from being consume
| Patterns: |
|
| Since: | 2.5 |
To get the enchanted item, see the enchant item expression
Examples:
if the clicked button is 1: # offer 1
set the applied enchantments to sharpness 10 and unbreaking 10
| Patterns: |
|
| Since: | 2.5 |
To get the enchant item, see the enchant item expression
Examples:
set enchant offer 1 to sharpness 1
set the cost of enchant offer 1 to 10 levels
| Patterns: |
|
| Since: | 2.9.0 |
Note: This does not stop enderman from targeting the player as a result of getting damaged.
Examples:
on enderman enrage:
if player has permission "safeFrom.enderman":
cancel event
| Patterns: |
|
| Since: | unknown, 2.5.2 (falling block), 2.8.0 (any entity support) |
event-block representeth the old block and event-blockdata representeth the new replacement that shall be applied to the block.
Examples:
kill event-entity
broadcast "A sheep hath pilfered some grass!"
on falling block descend:
event-entity is a falling dirt
cancel event
| Patterns: |
|
| Since: | 1.0, 2.10 (blockdata) |
Please note that rightclick events with an empty hand while not looking at a block are not sent to the server, so there's no way to detect them.
Also note that a leftclick on an entity is an attack and thus not covered by the 'click' event, but the 'damage' event.
Examples:
on rightclick holding a fishing rod:
on leftclick on a stone or obsidian:
on rightclick on a creeper:
on click with a sword:
on click on chest[facing=north]:
on click on campfire[lit=true]:
| Patterns: |
|
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | 2.2-dev13b |
Examples:
kill event-entity
| Patterns: |
|
| Since: | 2.7 |
Examples:
if entity is a wither skeleton:
cancel event
| Patterns: |
|
| Since: | 2.11 |
Examples:
| Patterns: |
|
| Since: | 2.2-dev13b |
Examples:
cancel event
| Patterns: |
|
| Since: | 2.10 2.14 (action support) |
Examples:
on entity potion effect of night vision added: message "You can now see in the dark!"
on entity potion effect of strength removed: message "You're now weaker!"
| Patterns: |
|
| Since: | 2.8.0 |
Examples when it's called include; when a zombie gets cured and a villager spawns, an entity drowns in water like a zombie that turns to a drown, an entity that gets frozen in powder snow, a mooshroom that when sheared, spawns a new cow.
Examples:
on mooshroom transforming:
on zombie, skeleton or slime transform:
| Patterns: |
|
| Since: | 1.0, 2.6 (BlockData support) |
Examples:
on place of a furnace, crafting table or chest:
on break of chest[type=right] or chest[type=left]
| Patterns: |
|
| Since: | 2.7 |
Examples:
set {_xp} to event-experience
broadcast "%{_xp}%"
| Patterns: |
|
| Since: | 2.10 |
Experience cooldown is how long until a player can pick up another orb of experience.
Examples:
broadcast event-player
broadcast event-timespan
broadcast past event-timespan
broadcast xp cooldown change reason
| Patterns: |
|
| Since: | 2.0 |
Please note that this event will not fire for xp orbs spawned by plugins (including Skript) with Bukkit.
Examples:
world is "minigame_world"
cancel event
| Patterns: |
|
| Since: | 1.0, 2.6 (BlockData support) |
Examples:
on fade of snow[layers=2]
| Patterns: |
|
| Since: | 2.4 |
Examples:
if event-colors contains red:
on firework exploding colored red, light green and black:
on firework explosion colored rgb 0, 255, 0:
broadcast "A firework colored %colors% was exploded at %location%!"
| Patterns: |
|
| Since: | 1.3.7 |
Examples:
broadcast "Welcome %player% to the server!"
| Patterns: |
|
| Since: | 2.10 2.11 (state change) |
An entity hooked event is triggered when an entity gets caught by a fishing rod.
A fish escape event is called when the player fails to click on time, and the fish escapes.
A fish approaching event is when the bobber is waiting to be hooked, and a fish is approaching.
A fishing state change event is triggered whenever the fishing state changes.
Examples:
on entity caught: push event-entity vector from entity to player
on fishing state change: if event-fishing state is fish caught: broadcast "A fish has been caught!"
| Patterns: |
|
| Since: | 2.2-dev36 |
Examples:
if {game::%player%::playing} exists:
cancel event
| Patterns: |
|
| Since: | 1.0, 2.2-dev20 (plants), 2.8.0 (from, into, blockdata) |
"of" matches any grow event, "from" matches only the old state, "into" matches only the new state,and "from into" requires matching both the old and new states.
Using "and" lists in this event is equivalent to using "or" lists. The event will trigger if any one of the elements is what grew.
Examples:
on grow of tree:
on grow of wheat[age=7]:
on grow from a sapling:
on grow into tree:
on grow from a sapling into tree:
on grow of wheat, carrots, or potatoes:
on grow into tree, giant mushroom, cactus:
on grow from wheat[age=0] to wheat[age=1] or wheat[age=2]:
| Patterns: |
|
| Since: | 2.2-Fixes-V10 |
Examples:
| Patterns: |
|
| Since: | 1.0, 2.6 (BlockData support) |
Examples:
| Patterns: |
|
| Since: | 1.0, 2.10 (specific item) |
Examples:
| Patterns: |
|
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | unknown (before 2.1), 2.5 (entity) |
Examples:
on entity pickup of wheat:
| Patterns: |
|
| Since: | 2.2-dev21 |
Examples:
cancel the event # bad idea, but you CAN do it!
| Patterns: |
|
| Since: | 2.3 |
Works also when one or both of the slots are empty.
The event is called before the items are actually swapped,
so when you use the player's tool or player's offtool expressions,
they will return the values before the swap -
this enables you to cancel the event before anything happens.
Examples:
event-player's tool is a diamond sword
cancel event
| Patterns: |
|
| Since: | 1.4.4 |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | 2.1.1 |
This event cannot be cancelled.
Examples:
| Patterns: |
|
| Since: | 2.7 |
Examples:
if player's current inventory is {_gui}:
send "You can't drag your items here!" to player
cancel event
| Patterns: |
|
| Since: | 2.5.1 |
Examples:
| Patterns: |
|
| Since: | 2.2-dev21 |
Examples:
close player's inventory
| Patterns: |
|
| Since: | 2.2-Fixes-V10 |
Examples:
if event-item is stone:
give player 1 stone
remove 20$ from player's balance
| Patterns: |
|
| Since: | 2.2-dev21 |
Examples:
if player's location is {location}:
send "You exited the shop!"
| Patterns: |
|
| Since: | 2.7 |
Warning: setting the event-slot to a new item can result in an infinite loop.
Examples:
if event-item is a diamond:
send "You obtained a diamond!" to player
| Patterns: |
|
| Since: | 2.8.0 |
When this event is called, the initiator may have already removed the item from the source inventory and is ready to move it into the destination inventory.
If this event is cancelled, the items will be returned to the source inventory.
Examples:
broadcast "%holder of past event-inventory% is transporting %event-item% to %holder of event-inventory%!"
| Patterns: |
|
| Since: | 2.5 |
Examples:
cancel event
| Patterns: |
|
| Since: | 2.5.1 |
| Requirements: | Minecraft 1.13 or newer |
Examples:
chance of 50%:
cancel the event
send "Oops! Mending failed!" to player
| Patterns: |
|
| Since: | 1.0 |
The burn event will be called when the block is about do be destroyed by the fire.
Examples:
if event-block is a ladder:
cancel event
| Patterns: |
|
| Since: | 2.3 |
This event requires PaperSpigot.
Examples:
event-player does not have permission "jump"
cancel event
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
if projectile is an arrow:
send "you shot an arrow!" to shooter
| Patterns: |
|
| Since: | 2.7 |
For example, when opening a shipwreck chest.
Examples:
| Patterns: |
|
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | 1.0, 2.9.0 (by reason) |
Examples:
on player healing from a regeneration potion:
on healing of a zombie, cow or a wither:
heal reason is healing potion
cancel event
| Patterns: |
|
| Since: | 1.4.6 |
Examples:
on block physics:
block is sand
cancel event
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | 2.10 |
Cancelling will prevent piglins from dropping items, but will still make them pick up the input.
Examples:
if barter drops contain diamond:
send "Diamonds belong in the money pit!" to player
cancel event
| Patterns: |
|
| Since: | 1.0 |
Examples:
broadcast "A piston is extending!"
| Patterns: |
|
| Since: | 1.0 |
Examples:
broadcast "A piston is retracting!"
| Patterns: |
|
| Since: | 2.7 |
Examples:
chance of 50%:
cancel event
send "The trade was somehow denied!" to player
| Patterns: |
|
| Since: | 2.7 |
Cancelling this event will prevent the player from being counted as deeply sleeping unless they exit and re-enter the bed.
Examples:
send "Zzzz.." to player
| Patterns: |
|
| Since: | 2.7 |
Examples:
send "You entered a chunk: %past event-chunk% -&amp;gt; %event-chunk%!" to player
| Patterns: |
|
| Since: | 2.10 |
| Requirements: | Minecraft 1.21.3+ |
Note: The input keys event value is the set of keys the player is currently pressing, not the keys that were pressed or released.
Examples:
| Patterns: |
|
| Since: | 2.2-dev28 |
Examples:
world is "city"
send "Welcome to the City!"
| Patterns: |
|
| Since: | 2.8.0 |
Examples:
cancel the event
teleport event-projectile to block 5 above event-projectile
| Patterns: |
|
| Since: | 1.0, 2.5.3 (event-entity support) |
| Requirements: | Minecraft 1.14+ (event-entity support) |
In Minecraft 1.14+, you can use the player in this event.
Please note that there may not always be a player (or other entity) in this event.
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | 1.0, 2.5.3 (entities), 2.13 (location changers) |
Cancel the event to prevent the entity from teleporting.
Examples:
broadcast "%player% has entered a portal!"
on player portal:
player's world is world("wilderness")
set world of event-location to player's world
add 9000 to x-pos of event-location
on entity portal:
broadcast "A %type of event-entity% has entered a portal!
| Patterns: |
|
| Since: | 2.2-Fixes-V10 |
Examples:
| Patterns: |
|
| Since: | 1.0 (pressure plate), 1.4.4 (tripwire) |
Examples:
| Patterns: |
|
| Since: | 2.10 |
Examples:
set broadcast-message to "&amp;amp;c[BROADCAST] %broadcasted message%"
| Patterns: |
|
| Since: | 2.5 |
Examples:
teleport shooter of event-projectile to event-entity
| Patterns: |
|
| Since: | 1.0 |
Examples:
if victim's health &amp;lt;= 3:
delete event-projectile
| Patterns: |
|
| Since: | 2.5, 2.11 (equipment slots) |
Examples:
broadcast the old armor item
on helmet change:
| Patterns: |
|
| Since: | 2.12 |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
send "someone is using redstone" to console
| Patterns: |
|
| Since: | 2.4 |
send resource pack effect.
The resource pack condition can be used
to check the resource pack state.
This event will be triggered once when the player accepts or declines the resource pack request,
and once when the resource pack is successfully installed or failed to download.
Examples:
if the resource pack was declined or failed to download:
on resource pack deny:
kick the player due to "You have to install the resource pack to play in this server!"
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | 2.2-dev28 |
Examples:
entity is player
entity has permission "admin.undying"
uncancel the event
| Patterns: |
|
| Since: | 2.5 |
Note: the riptide action is performed client side, so manipulating the player in this event may have undesired effects.
Examples:
send "You are riptiding!"
| Patterns: |
|
| Since: | 2.0 |
The keyword 'async' indicates the trigger can be ran asynchronously,
Examples:
set {running::%script%} to true
on unload:
set {running::%script%} to false
| Patterns: |
|
| Since: | 2.3 |
The IP expression can be used to get the IP adress of the pinger.
This event can be cancelled on PaperSpigot 1.12.2+ only and this means the player will see the server as offline (but still can join).
Also you can use MOTD, Max Players, Online Players Count, Protocol Version, Version String, Hover List and Server Icon expressions, and Player Info Visibility and Hide Player from Server List effects to modify the server list.
Examples:
set the motd to "Welcome %{player-by-IP::%ip%}%! Join now!" if {player-by-IP::%ip%} is set, else "Join now!"
set the fake max players count to (online players count + 1)
set the shown icon to a random server icon out of {server-icons::*}
| Patterns: |
|
| Since: | 2.0 |
Examples:
on server stop:
| Patterns: |
|
| Since: | 1.0 (break), unknown (mine), 2.6 (BlockData support) |
Examples:
on break of stone:
on break of chest[facing=north]:
on break of potatoes[age=7]:
| Patterns: |
|
| Since: | 2.2-dev21 |
Examples:
cancel event
| Patterns: |
|
| Since: | 1.0 |
Examples:
on weather change to sunny:
| Patterns: |
|
| Since: | 1.0 |
Examples:
line 2 is empty
set line 1 to "&amp;amp;lt;red&amp;amp;gt;%line 1%"
| Patterns: |
|
| Since: | 2.2-dev26 |
Examples:
| Patterns: |
|
| Since: | 1.0, 2.10 (specific item) |
Examples:
on smelt of raw iron: broadcast smelted item set the smelted item to iron block
| Patterns: |
|
| Since: | 1.0 |
Examples:
on sneak toggle:
player is sneaking
push the player upwards at speed 0.5
| Patterns: |
|
| Since: | 1.0 |
Examples:
broadcast "someone changed the spawn!"
| Patterns: |
|
| Since: | 2.7 |
Examples:
| Patterns: |
|
| Since: | 2.5 |
| Requirements: | Minecraft 1.13 or newer |
Examples:
loop absorbed blocks:
broadcast "%loop-block% was absorbed by a sponge"!
| Patterns: |
|
| Since: | 1.0 |
Examples:
player is not sprinting
send "Run!"
| Patterns: |
|
| Since: | 2.10 |
Examples:
on smelting start of raw iron: add 20 seconds to total cook time
| Patterns: |
|
| Since: | 1.0, 2.4 (level up/down) |
Examples:
| Patterns: |
|
| Since: | 2.5.1 |
Examples:
push event-entity upwards at speed 2
| Patterns: |
|
| Since: | 2.8.0 |
Examples:
cancel the event
on stonecutting:
broadcast "%player% is using stonecutter to craft %event-item%!"
| Patterns: |
|
| Since: | 2.3 |
| Requirements: | 1.13 or newer |
Examples:
event-entity does not have permission "swim"
cancel event
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
target is a player
| Patterns: |
|
| Since: | 2.10 |
Examples:
send "Baaaaa--" to player
on player leash:
send "&amp;lt;%event-entity%&amp;gt; Let me go!" to player
on unleash:
broadcast "&amp;lt;%event-entity%&amp;gt; I'm free"
on player unleash:
send "&amp;lt;%event-entity%&amp;gt; Thanks for freeing me!" to player
| Patterns: |
|
| Since: | 2.11 |
Examples:
at 2:30am real time:
at 6:10 pm in real time:
at 5:00 am and 5:00 pm in real time:
at 5:00 and 17:00 in real time:
| Patterns: |
|
| Since: | 2.2-dev31 |
Examples:
| Patterns: |
|
| Since: | 2.2-dev31 |
Examples:
| Patterns: |
|
| Since: | 2.3 |
Examples:
if player's language starts with "en":
send "Hello!"
| Patterns: |
|
| Since: | 1.0, 2.9.0 (entity teleport) |
When teleporting entities, the event may also be called due to a result of natural causes, such as an enderman or shulker teleporting, or wolves teleporting to players.
When teleporting players, the event can be called by teleporting through a nether/end portal, or by other means (e.g. plugins).
Examples:
on player teleport:
on creeper teleport:
| Patterns: |
|
| Since: | 2.6, 2.8.0 (turn around) |
NOTE: Move event will only be called when the entity/player moves position, keyword 'turn around' is for orientation (ie: looking around), and the combined syntax listens for both.
NOTE: These events can be performance heavy as they are called quite often.
Examples:
if player does not have permission "player.can.move":
cancel event
on skeleton move:
if event-entity is not in world "world":
kill event-entity
on player turning around:
send action bar "You are currently turning your head around!" to player
| Patterns: |
|
| Since: | 2.0 |
Please note that using this event can cause lag if there are many players online.
Examples:
on stepping on stone:
| Patterns: |
|
| Since: | 2.12 |
| Requirements: | Minecraft 1.21.1+ |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
entity is a player
cancel event
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
cancel event
| Patterns: |
|
| Since: | 1.0 |
Examples:
if event-entity is a spider:
kill event-entity
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | 2.10 |
Please note that using this event can cause lag if there are multiple vehicle entities, i.e. Horse, Pig, Boat, Minecart
Examples:
broadcast past event-location
broadcast event-location
| Patterns: |
|
| Since: | 2.12 |
Examples:
| Patterns: |
|
| Since: | unknown (before 2.1) |
Examples:
broadcast "Someone dropped an iron sword!"
| Patterns: |
|
| Since: | 2.2-dev35 |
Examples:
cancel event
| Patterns: |
|
| Since: | 2.2-dev35 |
Examples:
send "Not my precious!"
cancel event
| Patterns: |
|
| Since: | 2.11 |
This event does not get called for virtual borders.
Examples:
broadcast "The diameter of %event-worldborder% is changing from %past event-number% to %event-number% over the next %event-timespan%"
| Patterns: |
|
| Since: | 2.11 |
This event does not get called for virtual borders.
Examples:
broadcast "Over the past %event-timespan%, the diameter of %event-worldborder% went from %past event-number% to %event-number%"
| Patterns: |
|
| Since: | 2.11 |
This event does not get called for virtual borders.
Examples:
broadcast "The center of %event-worldborder% has moved from %past event-location% to %event-location%"
| Patterns: |
|
| Since: | 1.0, 2.8.0 (defining worlds) |
any scripts are loaded, this event is only called for newly created worlds.
World management plugins might change the behaviour of this event though.
Examples:
| Patterns: |
|
| Since: | 1.0, 2.8.0 (defining worlds) |
Examples:
broadcast "The world %event-world% has been saved"
| Patterns: |
|
| Since: | 1.0, 2.8.0 (defining worlds) |
Examples:
broadcast "The world %event-world% has been loaded!"
| Patterns: |
|
| Since: | 1.0, 2.8.0 (defining worlds) |
Examples:
broadcast "the %event-world% has been unloaded!"
| Patterns: |
|
| Since: | 1.0, 2.7 (by entity) |
Examples:
on damage of a player:
on damage of player by zombie:
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
every minecraft hour:
every tick: # can cause lag depending on the code inside the event
every minecraft days:
| Patterns: | |
| Since: | 1.3.4 |
Examples:
at 7am in "world"
| Patterns: |
|
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | 2.10 |
Examples:
the amount of {thing}
| Patterns: |
|
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | 2.5 |
NOTE: Minecraft namespaces are supported, ex: 'minecraft:generic.attack_damage'.
Examples:
| Patterns: |
|
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | 1.4.4 |
NOTE: Minecraft namespaces are supported, ex: 'minecraft:basalt_deltas'.
Examples:
| Patterns: |
|
| Since: | 2.5 |
Examples:
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]
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | 2.4 |
| Requirements: | Minecraft 1.14 or newer |
NOTE: Minecraft namespaces are supported, ex: 'minecraft:british_shorthair'.
Examples:
| Patterns: |
|
| Since: | 2.12 |
| Requirements: | Minecraft 1.21.5+ |
NOTE: Minecraft namespaces are supported, ex: 'minecraft:warm'.
Examples:
| Patterns: |
|
| Since: | 2.0 |
Examples:
| Patterns: |
|
| Since: | 2.2-dev16b, 2.2-dev35 (renamed to click type) |
Examples:
| Patterns: |
|
| Since: | Unknown |
Examples:
set the color of the block to green
message "You're holding a &amp;amp;amp;amp;lt;%color of tool%&amp;amp;amp;amp;gt;%color of tool%&amp;amp;amp;amp;lt;reset&amp;amp;amp;amp;gt; wool block"
| Patterns: |
|
| Since: | 1.0 |
Examples:
trigger:
if arg-1 is not set:
if command sender is console:
send "You can't push yourself as a console :\" to sender
stop
push sender upwards with force 2
send "Yay!"
else:
push arg-1 upwards with force 2
send "Yay!" to sender and arg-1
| Patterns: |
|
| Since: | 2.10 |
Configs can be reloaded or navigated to find options.
Examples:
| Patterns: |
|
| Since: | 2.14 |
Examples:
| Patterns: |
|
| Since: | 2.12 |
| Requirements: | Minecraft 1.21.5+ |
NOTE: Minecraft namespaces are supported, ex: 'minecraft:warm'.
Examples:
| Patterns: |
|
| Since: | 2.0 |
Please note that support for this type is very rudimentary, e.g. lava, fire and burning, as well as projectile and attack are considered different types.
Examples:
| Patterns: |
|
| Since: | 2.12 |
Cannot change any attributes of the damage source from an 'on damage' or 'on death' event.
Examples:
| Patterns: |
|
| Since: | 2.12 |
Examples:
| Patterns: |
|
| Since: | 1.4 |
See time and timespan for the other time types of Skript.
Examples:
subtract a day from {_yesterday}
# now {_yesterday} represents the date 24 hours before now
| Patterns: |
|
| Since: | 2.3 |
Examples:
| Patterns: | |
| Since: | 2.0 |
Locations and some blocks also have a direction, but without a length.
Please note that directions have changed extensively in the betas and might not work perfectly. They can also not be used as command arguments.
Examples:
loop blocks from the block infront of the player to the block 10 below the player:
set the block behind the loop-block to water
| Patterns: |
|
| Since: | 2.14 |
Examples:
| Patterns: |
|
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | 1.4.6 |
NOTE: Minecraft namespaces are supported, ex: 'minecraft:basalt_deltas'.
As of Minecraft 1.21 this will also support custom enchantments using namespaces, ex: 'myenchants:explosive'.
Examples:
| Patterns: |
|
| Since: | 2.5 |
Examples:
set enchant offer 1 to sharpness 1
set the cost of enchant offer 1 to 10 levels
| Patterns: |
|
| Since: | 1.4.6 |
Examples:
helmet is enchanted with waterbreathing
| Patterns: |
|
| Since: | 1.0 |
Examples:
player is an op
projectile is an arrow
shoot a fireball from the player
| Patterns: |
|
| Since: | 2.14 |
Examples:
| Patterns: |
|
| Since: | 2.10 |
This includes all of the data associated with an entity (its name, health, attributes, etc.), at the time this expression is used. Essentially, these are a way to create templates for entities.
Individual attributes of a snapshot cannot be modified or retrieved.
Examples:
| Patterns: |
|
| Since: | 1.3 |
Examples:
spawn a creeper
| Patterns: |
|
| Since: | 1.3 |
Examples:
| Patterns: |
|
| Since: | 2.11 |
Examples:
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.2+ |
Examples:
| Patterns: |
|
| Since: | 2.10 |
This may also return a result.
Examples:
| Patterns: |
|
| Since: | 2.0 |
Examples:
| Patterns: |
|
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | 2.4 |
which can be used in the launch firework effect.
See the firework effect expression for detailed patterns.
Examples:
launch trailing flickering star colored purple, yellow, blue, green and red fading to pink at target entity
launch ball large colored red, purple and white fading to light green and black at player's location with duration 1
| Patterns: |
|
| Since: | 2.4 |
Examples:
| Patterns: |
|
| Since: | 2.11 |
Examples:
| Patterns: |
|
| Since: | 2.13 |
NOTE: Minecraft namespaces are supported, ex: 'minecraft:warm'.
Examples:
| Patterns: |
|
| Since: | 2.10 |
This can be executed (with arguments) and may return a result.
Examples:
set {_result} to the result of {_function}
| Patterns: |
|
| Since: | 2.14 |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
set the player argument's game mode to creative
| Patterns: |
|
| Since: | 2.5 |
| Requirements: | Minecraft 1.13 or newer |
Examples:
| Patterns: |
|
| Since: | 2.5 |
Examples:
| Patterns: |
|
| Since: | 2.4 |
| Requirements: | Minecraft 1.14 or newer |
Examples:
| Patterns: |
|
| Since: | 2.5 |
Examples:
| Patterns: |
|
| Since: | 2.10 |
| Requirements: | Minecraft 1.21.3+ |
Examples:
| Patterns: |
|
| Since: | 1.0 |
An inventory has a fixed amount of slots which represent a specific place in the inventory, e.g. the helmet slot for players (Please note that slot support is still very limited but will be improved eventually).
Examples:
| Patterns: |
|
| Since: | 2.2-dev16 |
Examples:
| Patterns: |
|
| Since: | 2.8.0 |
Examples:
| Patterns: |
|
| Since: | 2.2-dev32 |
Examples:
| Patterns: |
|
| Since: | 1.0 |
You don't usually need this type except when you want to make a command that only accepts an exact item.
Please note that currently 'material' is exactly the same as 'item', i.e. can have an amount & enchantments.
Examples:
{_item} is a torch
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.2+ |
Examples:
| Patterns: |
|
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | 1.0 |
An item type can also have one or more enchantments with or without a specific level defined, and can optionally start with 'all' or 'every' to make this item type represent all types that the alias represents, including data ranges.
Examples:
add oak slab to the inventory of the block
player's tool is a diamond sword of sharpness
block is dirt or farmland
| Patterns: |
|
| Since: | 1.0 |
Examples:
shoot a zombie from the creeper
| Patterns: |
|
| Since: | 1.0 |
Examples:
set {home::%uuid of player%} to location of the player
| Patterns: |
|
| Since: | 2.10 |
Some loot tables will require some values (i.e. looter, location, looted entity) in a loot context when generating loot whereas others may not.
For example, the loot table of a simple dungeon chest will only require a location, whereas the loot table of a cow will require a looting player, looted entity, and location.
You can find more information about this in https://minecraft.wiki/w/Loot_context
Examples:
| Patterns: |
|
| Since: | 2.10 |
You can find more information about this in https://minecraft.wiki/w/Loot_table
Examples:
| Patterns: |
|
| Since: | 2.2-dev36 |
Examples:
| Patterns: |
|
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | 2.0 |
| Requirements: | Vault, an economy plugin that supports Vault |
add 100$ to the player's balance and add 100 to the player's balance. Examples:
remove Fr. 9.95 from the player's money
set the victim's money to 0
increase the attacker's balance by the level of the victim * 100
| Patterns: |
|
| Since: | 2.7 |
Examples:
| Patterns: |
|
| Since: | 2.13 |
Examples:
| Patterns: |
|
| Since: | 2.10 |
This may have navigable children.
Examples:
| Patterns: |
|
| Since: | 1.0 |
Please note that many expressions only need integers, i.e. will discard any fractional parts of any numbers without producing an error.
Radians will be converted to degrees.
Examples:
set {_temp} to 2*{_temp} - 2.5
set {_angle} to 3.14 in radians # will be converted to degrees
| Patterns: |
|
| Since: | 1.0 |
Examples:
| Patterns: |
|
| Since: | 2.0 beta 8 |
Examples:
| Patterns: |
|
| Since: | 2.14 |
Examples:
| Patterns: |
|
| Since: | 2.12 |
| Requirements: | Minecraft 1.21.5+ |
NOTE: Minecraft namespaces are supported, ex: 'minecraft:warm'.
Examples:
| Patterns: |
|
| Since: | 1.0 |
You have two possibilities to use players as command arguments:
Examples:
set {_p} to "N" parsed as a player # returns Notch if Notch is online because their name starts with 'N' (case insensitive) however, it would return nothing if no player whose name starts with 'N' is online.
| Patterns: |
|
| Since: | 2.5.2 |
Examples:
| Patterns: |
|
| Since: | 2.14 |
'added' indicates the entity does not already have a potion effect of the event potion effect type.
'changed' indicates the entity already has a potion effect of the event potion effect type, but some property about the potion effect is changing.
'cleared' indicates that the effect is being removed because all of the entity's effects are being removed.
'removed' indicates that the event potion effect type has been specifically removed from the entity.
Examples:
| Patterns: |
|
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | 2.0 beta 3 |
Examples:
apply potion of speed 2 to the player for 60 seconds
remove invisibility from the victim
| Patterns: |
|
| Since: | 2.14 |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
shoot an arrow at speed 5 from the player
| Patterns: |
|
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | 2.10 |
Examples:
add "hello" to {queue}
broadcast the 1st element of {queue}
| Patterns: |
|
| Since: | 2.8.0 |
Examples:
| Patterns: |
|
| Since: | 2.1 |
| Requirements: | Supported regions plugin |
Please note that some regions plugins do not have named regions, some use numerical ids to identify regions, and some may have regions with the same name in different worlds, thus using regions like "region name" in scripts may or may not work.
Examples:
| Patterns: |
|
| Since: | 2.4 |
Examples:
| Patterns: |
|
| Since: | 2.14 |
Examples:
| Patterns: |
|
| Since: | 2.14 |
Examples:
| Patterns: |
|
| Since: | 2.10 |
Disabled scripts will report as being empty since their content has not been loaded.
Examples:
| Patterns: |
|
| Since: | 2.3 |
Examples:
| Patterns: |
|
| Since: | Unknown |
The most important property that distinguishes a slot from an item is its ability to be changed, e.g. it can be set, deleted, enchanted, etc. (Some item expressions can be changed as well, e.g. items stored in variables. For that matter: slots are never saved to variables, only the items they represent at the time when the variable is set).
Please note that tool can be regarded a slot, but it can actually change it's position, i.e. doesn't represent always the same slot.
Examples:
delete helmet of the victim
set the color of the player's tool to green
enchant the player's chestplate with projectile protection 5
| Patterns: |
|
| Since: | 2.4 |
Examples:
| Patterns: |
|
| Since: | 2.3 |
Examples:
| Patterns: |
|
| Since: | 2.2-dev35 |
Examples:
| Patterns: |
|
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Because scripts are also text, you have to put text into double quotes to tell Skript which part of the line is an effect/expression and which part is the text.
Please read the article on Texts and Variable Names to learn more.
Examples:
message "Hello %player%"
message "The id of ""%type of tool%"" is %id of tool%."
| Patterns: |
|
| Since: | 1.0 |
This type might be removed in the future as you can use 'time of world is between x and y' as a replacement.
Examples:
| Patterns: |
|
| Since: | 1.0, 2.6.1 (weeks, months, years) |
NOTE: Months always have the value of 30 days, and years of 365 days.
See date and time for the other time types of Skript.
Examples:
wait a minecraft second and 5 ticks
every 10 mc days and 12 hours:
halt for 12.7 irl minutes, 12 hours and 120.5 seconds
| Patterns: |
|
| Since: | 2.8.0 |
Examples:
| Patterns: |
|
| Since: | Unknown |
Examples:
grow a huge red mushroom above the block
| Patterns: |
|
| Since: | 2.0 |
This is mostly used for expressions like 'event-
Examples:
{variable} is a type # check whether the variable contains a type, e.g. number or player
{variable} is an object # will always succeed if the variable is set as everything is an object, even types.
disable PvP in the event-world
kill the loop-entity
| Patterns: |
|
| Since: | 2.11 |
Read more about UUIDs and how they are used in Minecraft in the wiki entry about UUIDs.
Examples:
| Patterns: |
|
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | 2.2-dev23 |
Examples:
| Patterns: |
|
| Since: | 2.10.2 |
Examples:
| Patterns: |
|
| Since: | 2.12 |
Examples:
| Patterns: |
|
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
is sunny in the player's world
message "It is %weather in the argument's world% in %world of the argument%"
| Patterns: |
|
| Since: | 2.10 |
| Requirements: | Minecraft 1.21+ |
NOTE: Minecraft namespaces are supported, ex: 'minecraft:ashen'.
Examples:
| Patterns: |
|
| Since: | 1.0, 2.2 (alternate syntax) |
Examples:
| Patterns: |
|
| Since: | 2.11 |
Examples:
| Patterns: |
|
| Since: | 2.7 |
Examples:
| Patterns: |
|
| Since: | 2.14 |
Examples:
| Patterns: |
|
| Since: | 2.2 |
| Return Type: | Number |
Examples:
abs(-2) = 2
| Patterns: |
|
| Since: | 2.2 |
| Return Type: | Number |
The returned angle is measured counterclockwise in a standard mathematical coordinate system (x to the right, y to the top).
Examples:
atan2(10, 0) = 90
atan2(-10, 5) = -63.4349
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Quaternion |
Examples:
| Patterns: |
|
| Since: | 2.2-dev32 |
| Return Type: | long |
Examples:
| Patterns: |
|
| Since: | 2.2 |
| Return Type: | long |
Examples:
ceil(2) = 2
ceil(2.99) = 3
| Patterns: |
|
| Since: | 2.8.0 |
| Return Type: | Number |
This function retains indices
Examples:
clamp(5.5, 0, 5) = 5
clamp(0.25, 0, 0.5) = 0.25
clamp(5, 7, 10) = 7
clamp((5, 0, 10, 9, 13), 7, 10) = (7, 7, 10, 9, 10)
set {_clamped::*} to clamp({_values::*}, 0, 10)
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | Number |
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.
Examples:
combinations(5, 3) = 10
combinations(size of {some list::*}, 2)
| Patterns: |
|
| Since: | 2.9.0 |
| Return Type: | Text |
Examples:
concat("foo ", 100, " bar") # foo 100 bar
| Patterns: |
|
| Since: | 2.2 |
| Return Type: | Date |
A time zone and DST offset can be specified as well (in minutes), if they are left out the server's time zone and DST offset are used (the created date will not retain this information).
Examples:
date(1990, 3, 5, 14, 30) # 14:30, 5th May 1990
date(1999, 12, 31, 23, 59, 59, 999, -3*60, 0) # almost year 2000 in parts of Brazil (-3 hours offset, no DST)
| Patterns: |
|
| Since: | 2.2 |
| Return Type: | Number |
Examples:
exp(1) = 2.7183
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | 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.
Examples:
factorial(3) = 3*2*1 = 6
factorial(5) = 5*4*3*2*1 = 120
factorial(171) = Infinity
| Patterns: |
|
| Since: | 2.2 |
| Return Type: | long |
Examples:
floor(2) = 2
floor(2.99) = 2
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Text |
Will return none if the format is invalid.
For further reference, see this article.
Examples:
aliases: bal
executable by: players
trigger:
set {_money} to formatNumber({money::%sender's uuid%})
send "Your balance: %{_money}%" to sender
| Patterns: |
|
| Since: | 2.14 |
| Return Type: | long |
Examples:
| Patterns: |
|
| Since: | 2.8.0 |
| Return Type: | Boolean |
Examples:
isNaN(0/0) # true
isNaN(sqrt(-1)) # true
| Patterns: |
|
| Since: | 2.2 |
| Return Type: | Number |
Returns NaN (not a number) if the argument is negative.
Examples:
ln(exp(5)) = 5
ln(2) = 0.6931
| Patterns: |
|
| Since: | 2.2 |
| Return Type: | Location |
If for whatever reason the world is not found, it will fallback to the server's main world.
Examples:
| Patterns: |
|
| Since: | 2.2 |
| Return Type: | Number |
log(base ^ exponent, base) = exponent for any positive number 'base' and any number 'exponent'.Another useful equation is
base ^ log(a, base) = a for any numbers 'base' and 'a'.Please note that due to how numbers are represented in computers, these equations do not hold for all numbers, as the computed values may slightly differ from the correct value.
Returns NaN (not a number) if any of the arguments are negative.
Examples:
log(16, 2) = 4 # 2^4 = 16
| Patterns: |
|
| Since: | 2.2 |
| Return Type: | Number |
Examples:
max(1, 2, 3, 4) = 4
max({some list variable::*})
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | Number |
You cannot get the mean of a set of numbers that includes infinity or NaN.
Examples:
mean(0, 5, 10) = 5
mean(13, 97, 376, 709) = 298.75
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | Number |
You cannot get the median of a set of numbers that includes NaN.
Examples:
median(1, 2, 3, 4, 5, 6) = 3.5
median(0, 123, 456, 789) = 289.5
| Patterns: |
|
| Since: | 2.2 |
| Return Type: | Number |
Examples:
min(1, 2, 3, 4) = 1
min({some list variable::*})
| Patterns: |
|
| Since: | 2.2 |
| Return Type: | Number |
d/m, where d and m are the arguments of this function.The returned value is always positive. Returns NaN (not a number) if the second argument is zero.
Examples:
mod(256436, 100) = 36
mod(-1, 10) = 9
| Patterns: |
|
| Since: | 2.8.0, 2.9.0 (prevent lookups) |
| Return Type: | Offline Player |
Examples:
set {_p} to offlineplayer("069a79f4-44e9-4726-a5be-fca90e38aaf5")
set {_p} to offlineplayer("Notch", false)
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | Number |
For example, permutations with 3 options and an arrangement size of 1, returns 3: (1), (2), (3)
Permutations with 3 options and an arrangement size of 2 returns 6: (1, 2), (1, 3), (2, 1), (2, 3), (3, 1), (3, 2)
Note that the bigger the 'options' and lower the 'selected' may result in approximations or even infinity values.
Permutations differ from combinations in that permutations account for the arrangement of elements within the set, whereas combinations focus on unique sets and ignore the order of elements.
Example: (1, 2) and (2, 1) are two distinct permutations because the positions of '1' and '2' are different, but they represent a single combination since order doesn't matter in combinations.
Examples:
permutations(10, 4) = 5040
permutations(size of {some list::*}, 2)
| Patterns: |
|
| Since: | 2.8.0 |
| Return Type: | Player |
Setting 'getExactPlayer' parameter to true will return the player whose name is exactly equal to the provided name instead of returning a player that their name starts with the provided name.
Examples:
set {_p} to player("Notch", true) # will return the only online player whose name is 'Notch'
set {_p} to player("069a79f4-44e9-4726-a5be-fca90e38aaf5") # <none> if player is offline
| Patterns: |
|
| Since: | 2.2 |
| Return Type: | Number |
Examples:
product(2, 3, 4) = 24
product({some list variable::*})
product(2, {_v::*}, and the player's y-coordinate)
| Patterns: |
|
| Since: | 2.10 |
| Return Type: | Quaternion |
Examples:
| Patterns: |
|
| Since: | 2.5, 2.10 (alpha) |
| Return Type: | Color |
Examples:
set the colour of a text display to rgb(10, 50, 100, 50)
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | Number |
Examples:
root(4, 16) = 2
root(-4, 16) = 0.5 # same as 16^(-1/4)
| Patterns: |
|
| Since: | 2.2, 2.7 (decimal placement) |
| Return Type: | Number |
Examples:
round(2) = 2
round(2.99) = 3
round(2.5) = 3
| Patterns: |
|
| Since: | 2.2 |
| Return Type: | Number |
Examples:
sin(60) = 0.866
| Patterns: |
|
| Since: | 2.2 |
| Return Type: | Number |
(argument) ^ (1/2) – other roots can be calculated via number ^ (1/root), e.g. set {_l} to {_volume}^(1/3).Returns NaN (not a number) if the argument is negative.
Examples:
sqrt(2) = 1.4142
sqrt(-1) = NaN
| Patterns: |
|
| Since: | 2.2 |
| Return Type: | Number |
Examples:
sum(2, 3, 4) = 9
sum({some list variable::*})
sum(2, {_v::*}, and the player's y-coordinate)
| Patterns: |
|
| Since: | 2.14 |
| Return Type: | Text |
Examples:
| Patterns: |
|
| Since: | 2.11 |
| Return Type: | UUID |
Examples:
| Patterns: |
|
| Since: | INSERT VERSION |
| Return Type: | Vector |
Examples: