| 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