Expressions

Values: players, items, numbers, text.

Absorbed blocks

  • expressions
  • Skript 2.5
[the] absorbed blocks

The blocks absorbed by a sponge block.

Returns
block
In Skript since
2.5
ID
ExprAbsorbedBlocks
View example
the absorbed blocks

Active Item

  • expressions
  • Skript 2.8.0
[the] (raised|active) (tool|item|weapon) of %living entities%%living entities%'[s] (raised|active) (tool|item|weapon)

Returns the item the entities are currently using (ie: the food they're eating, the bow they're drawing back, etc.). This cannot be changed. If an entity is not using any item, this will return null.

Returns
item
In Skript since
2.8.0
ID
ExprActiveItem
View example
on damage of player:
	if victim's active tool is a bow:
		interrupt player's active item use

Active Item Use Time

  • expressions
  • Skript 2.8.0
[the] [elapsed|remaining] (item|tool) us[ag]e time of %living entities%%living entities%'[s] [elapsed|remaining] (item|tool) us[ag]e time

Returns the time that the entities have either spent using an item, or the time left for them to finish using an item.

If an entity is not using any item, this will return 0 seconds.

Returns
time span
In Skript since
2.8.0
ID
ExprEntityItemUseTime
View example
on right click:
	broadcast player's remaining item use time
	wait 1 second
	broadcast player's item use time

Affected Entities

  • expressions
  • Skript 2.4
[the] affected entities

The affected entities in the area cloud effect event.

In Skript since
2.4
ID
ExprAffectedEntities
View example
on area cloud effect:
	loop affected entities:
		if loop-value is a player:
			send "WARNING: you've step on an area effect cloud!" to loop-value

Age of Block/Entity

  • expressions
  • Skript 2.7
[the] [max[imum]] age of %blocks/entities%%blocks/entities%'[s] [max[imum]] age

Returns the age or maximum age of blocks and age for entities (there in no maximum age for entities).

For blocks, 'Age' represents the different growth stages that a crop-like block can go through. A value of 0 indicates that the crop was freshly planted, whilst a value equal to 'maximum age' indicates that the crop is ripe and ready to be harvested.

For entities, 'Age' represents the time left for them to become adults and it's in minus increasing to be 0 which means they're adults, e.g. A baby cow needs 20 minutes to become an adult which equals to 24,000 ticks so their age will be -24000 once spawned.

Returns
integer
In Skript since
2.7
ID
ExprAge
View 2 examples
# Set targeted crop to fully grown crop
set age of targeted block to maximum age of targeted block
# Spawn a baby cow that will only need 1 minute to become an adult
spawn a baby cow at player
set age of last spawned entity to -1200 # in ticks = 60 seconds

All Banned Players/IPs

  • expressions
  • Skript 2.7
[all [[of] the]|the] banned (players|(ips|ip addresses))

Obtains the list of all banned players or IP addresses.

Returns
object
In Skript since
2.7
ID
ExprAllBannedEntries
View example
command /banlist:
	trigger:
		send all the banned players

All Commands

  • expressions
  • Skript 2.6
[all [[of] the]|the] [registered] [script] commands

Returns all registered commands or all script commands.

Returns
text
In Skript since
2.6
ID
ExprAllCommands
View 2 examples
send "Number of all commands: %size of all commands%"
send "Number of all script commands: %size of all script commands%"

All Functions

  • expressions
[all [[of] the]|the] functions (from|in) %script%

No matching entry in Skript's documentation.

Returns
function
ID
ExprAllFunctions

All Operators

  • expressions
  • Skript 2.7
[all [[of] the]|the] [server] [non(-| )]op[erator]s

The list of operators on the server.

In Skript since
2.7
ID
ExprOps
View example
set {_ops::*} to all operators

All Permissions

  • expressions
  • Skript 2.2-dev33
[(all [[of] the]|the)] permissions (from|of) %players%[(all [[of] the]|the)] %players%'[s] permissions

Returns all permissions of the defined player(s). Note that the modifications to resulting list do not actually change permissions.

Returns
text
In Skript since
2.2-dev33
ID
ExprPermissions
View example
set {_permissions::*} to all permissions of the player

All Persistent Data Keys

  • expressions
  • Skript 2.15
[all [[of] the]] [persistent] data [tag] keys of %objects%[all of] %objects%'[s] [persistent] data [tag] keys

Returns all persistent data keys stored in the specified objects.

This is not limited to tags set by Skript, but includes all keys regardless of their origin.

Returns
text
In Skript since
2.15
ID
ExprAllPersistentDataKeys
View 2 examples
set {_keys::*} to persistent data keys of player's tool
if size of {_keys::*} > 0:
    broadcast "The tool has the following persistent data keys: %{_keys::*}%"
else:
    broadcast "The tool has no persistent data keys."
for each {_key} in persistent data keys of player's tool:
    broadcast "Persistent data tag %{_key}%: %data tag {_key} of player's tool%"

All Scripts

  • expressions
  • Skript 2.10
[all [[of] the]|the] scripts [without ([subdirectory] paths|parents)][all [[of] the]|the] (enabled|loaded) scripts [without ([subdirectory] paths|parents)][all [[of] the]|the] (disabled|unloaded) scripts [without ([subdirectory] paths|parents)]

Returns all of the scripts, or just the enabled or disabled ones.

Returns
script
In Skript since
2.10
ID
ExprScripts
View example
command /scripts:
	trigger:
		send "All Scripts: %scripts%" to player
		send "Loaded Scripts: %enabled scripts%" to player
		send "Unloaded Scripts: %disabled scripts%" to player

All Tags of a Type

  • expressions
  • Skript 2.10
[all [[of] the]|the] [minecraft|datapack|paper|(custom|skript)] [item|block|entity [type]] tags

Returns all the tags.

`minecraft tag` will return only the vanilla tags, `datapack tag` will return only datapack-provided tags, `paper tag` will return only Paper's custom tags (if you are running Paper), and `custom tag` will look in the "skript" namespace for custom tags you've registered.

You can also filter by tag types using "item", "block", or "entity".

In Skript since
2.10
ID
ExprTagsOfType
View 3 examples
broadcast minecraft tags
send paper entity tags
broadcast all block tags

Allay Duplication Cooldown

  • expressions
  • Skript 2.11
[the] (duplicat(e|ing|ion)|clon(e|ing)) cool[ ]down [time] [of %living entities%]%living entities%'[s] (duplicat(e|ing|ion)|clon(e|ing)) cool[ ]down [time]

The cooldown time until an allay can duplicate again naturally.

Resetting the cooldown time will set the cooldown time to the same amount of time after an allay has duplicated.

Returns
time span
In Skript since
2.11
ID
ExprDuplicateCooldown
View 5 examples
set {_time} to the duplicate cooldown of last spawned allay
add 5 seconds to the duplication cool down time of last spawned allay
remove 3 seconds from the duplicating cooldown time of last spawned allay
clear the clone cool down of last spawned allay
reset the cloning cool down time of last spawned allay

Allay Target Jukebox

  • expressions
  • Skript 2.11
[the] target jukebox [of %living entities%]%living entities%'[s] target jukebox

The location of the jukebox an allay is set to.

Returns
location
In Skript since
2.11
ID
ExprAllayJukebox
View example
set {_loc} to the target jukebox of last spawned allay

Alpha/Red/Green/Blue Color Value

  • expressions
  • Skript 2.10
[the] (red|green|blue|alpha) (value|component)[s] of %colours%%colours%'[s] (red|green|blue|alpha) (value|component)[s]

The alpha, red, green, or blue value of colors. Ranges from 0 to 255.

Alpha represents opacity.

Returns
integer
In Skript since
2.10
ID
ExprARGB
View 2 examples
broadcast red value of rgb(100, 0, 50) # sends '100'
set {_red} to red's red value + 10

Alphabetical Sort

  • expressions
  • Skript 2.2-dev18b, 2.14
alphabetically sorted %texts%

Sorts given strings in alphabetical order.

Returns
text
In Skript since
2.2-dev18b, 2.14 (retain indices when looping)
ID
ExprAlphabetList
View example
set {_list::*} to alphabetically sorted {_strings::*}

Altitude

  • expressions
  • Skript 1.4.3
[the] altitude[s] of %locations%%locations%'[s] altitude[s]

Effectively an alias of 'y-coordinate of โ€ฆ', it represents the height of some location within the world.

Returns
number
In Skript since
1.4.3
ID
ExprAltitude
View example
on damage:
	altitude of the attacker is higher than the altitude of the victim
	set damage to damage * 1.2

Amount

  • expressions
[the] (amount|number|size)[s] of %objects%%objects%'[s] (amount|number|size)[s]

No matching entry in Skript's documentation.

Returns
integer
ID
ExprAmount

Amount of Items

  • expressions
  • Skript 2.0
[the] (amount|number) of %item types% (in|of) %inventories%

Counts how many of a particular item type are in a given inventory.

Returns
integer
In Skript since
2.0
ID
ExprAmountOfItems
View example
message "You have %number of tag values of minecraft tag "diamond_ores" in the player's inventory% diamond ores in your inventory."

An Eternity

  • expressions
  • Skript 2.12
[an] eternityforever[an] ([out] of|outside [of]) time[an] (infinite|indefinite) (duration|timespan)

Represents a timespan with an infinite duration. An eternity is also created when arithmetic results in a timespan larger than about 292 million years.

Infinite timespans generally follow the rules of infinity, where most math operations do nothing. However, operations that would return NaN with numbers will instead return a timespan of 0 seconds.

Note that an eternity will often be treated as the longest duration something supports, rather than a true eternity.

Returns
time span
In Skript since
2.12
ID
LitEternity
View example
set fire to the player for an eternity

Angle

  • expressions
  • Skript 2.10
%number% [in] deg[ree][s]%number% [in] (rad[ian][s])%numbers% in deg[ree][s]%numbers% in (rad[ian][s])

Represents the passed number value in degrees.

If radians is specified, converts the passed value to degrees. This conversion may not be entirely accurate, due to floating point precision.

Returns
number
In Skript since
2.10
ID
ExprAngle
View 4 examples
set {_angle} to 90 degrees
{_angle} is 90 # true
180 degrees is pi # true
pi radians is 180 degrees # true

Anvil Repair Cost

  • expressions
  • Skript 2.8.0
[the] [anvil] [item] [max[imum]] repair cost [of %inventories%]%inventories%'[s] [anvil] [item] [max[imum]] repair cost

Returns the experience cost (in levels) to complete the current repair or the maximum experience cost (in levels) to be allowed by the current repair.

The default value of max cost set by vanilla Minecraft is 40.

Returns
integer
In Skript since
2.8.0
ID
ExprAnvilRepairCost
View 2 examples
on inventory click:
	if {AnvilRepairSaleActive} = true:
		wait a tick # recommended, to avoid client bugs
		set anvil repair cost to anvil repair cost * 50%
		send "Anvil repair sale is ON!" to player
on inventory click:
	player have permission "anvil.repair.max.bypass"
	set max repair cost of event-inventory to 99999

Anvil Text Input

  • expressions
  • Skript 2.7
[the] anvil [inventory] (rename|text) input of %inventories%%inventories%'[s] anvil [inventory] (rename|text) input

An expression to get the name to be applied to an item in an anvil inventory.

Returns
text
In Skript since
2.7
ID
ExprAnvilText
View example
on inventory click:
	type of event-inventory is anvil inventory
	if the anvil text input of the event-inventory is "FREE OP":
		ban player

Any Of

  • expressions
  • Skript 2.11
(any [one]|one) of [the] %objects%

Returns an 'or list' composed of the given objects. For example, `any of (1, 2, and 3)` is equivalent to `1, 2, or 3`

Useful when doing comparisons with variable lists.

Returns
object
In Skript since
2.11
ID
ExprAnyOf
View 2 examples
if any of {_numbers::*} are 1:
if any of {teamA::*} are within location(0, 0, 0) and location(10, 10, 10):

Applied Beacon Effect

  • expressions
  • Skript 2.10
[the] applied [beacon] effect

The type of effect applied by a beacon.

In Skript since
2.10
ID
ExprAppliedEffect
View example
on beacon effect:
	if the applied effect is primary beacon effect:
		broadcast "Is Primary"
	else if applied effect = secondary effect:
		broadcast "Is Secondary"

Applied Enchantments

  • expressions
  • Skript 2.5
[the] applied enchant[ment]s

The applied enchantments in an enchant event.

Deleting or removing the applied enchantments will prevent the item's enchantment.

In Skript since
2.5
ID
ExprAppliedEnchantments
View example
on enchant:
	set the applied enchantments to sharpness 10 and fire aspect 5

Argument

  • expressions
  • Skript 1.0
[the] last arg[ument][the] arg[ument](-| )<(\d+)>[the] (first|second|third|<(\d*1)st|(\d*2)nd|(\d*3)rd|(\d*[4-90])th>) arg[ument][s][all [[of] the]|the] arg[ument][s]

A user provided value in a command execution.

For example, if the command "/tell <player> <text>" is used like "/tell Njol Hello Njol!", 'argument 1' is the player named "Njol" and 'argument 2' is the text "Hello Njol!".

One can also use the type of the argument instead of its index to address the argument.

For example, in the command example above, 'player-argument' is the same as 'argument 1'.

Usable in script commands and command events.

Please note that specifying the argument type is only supported in script commands.

Returns
object
In Skript since
1.0, 2.7 (support for command events)
ID
ExprArgument
View 5 examples
give the item-argument to the player-argument
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

Arithmetic

  • expressions
  • Skript 1.4.2
%object%[ ]+[ ]%object%%object%[ ]-[ ]%object%%object%[ ]*[ ]%object%%object%[ ]/[ ]%object%%object%[ ]^[ ]%object%

Arithmetic expressions, e.g. 1 + 2, (health of player - 2) / 3, etc.

Returns
object
In Skript since
1.4.2
ID
ExprArithmetic
View 3 examples
set the player's health to 10 - the player's health
loop (argument + 2) / 5 times:
	message "Two useless numbers: %loop-num * 2 - 5%, %2^loop-num - 1%"
message "You have %health of player * 2% half hearts of HP!"

Armor Change Item

  • expressions
  • Skript 2.11
[the] (old|unequipped) armo[u]r item[the] (new|equipped) armo[u]r item

Get the unequipped or equipped armor item from a 'armor change' event.

Returns
item
In Skript since
2.11
ID
ExprArmorChangeItem
View example
on armor change
	broadcast the old armor item

Armor Slot

  • expressions
  • Skript 1.0, 2.8.0
[the] (%equipment slots%|[the] armo[u]r[s]) [item[s]] of %living entities%%living entities%'[s] (%equipment slots%|[the] armo[u]r[s]) [item[s]]

Equipment of living entities, i.e. the boots, leggings, chestplate or helmet.

Body armor is a special slot that can only be used for:

  • Horses: Horse armour (doesn't work on zombie or skeleton horses)
  • Wolves: Wolf Armor
  • Llamas (regular or trader): Carpet
  • Happy Ghasts: Harness

Saddle is a special slot that can only be used for: pigs, striders and horse types (horse, camel, llama, mule, donkey).

Returns
slot
In Skript since
1.0, 2.8.0 (armor), 2.10 (body armor), 2.12 (saddle), 2.12.1 (happy ghast)
ID
ExprArmorSlot
View 2 examples
set chestplate of the player to a diamond chestplate
helmet of player is neither tag values of tag "paper:helmets" nor air # player is wearing a block, e.g. from another plugin

Arrow Attached Block

  • expressions
  • Skript 2.8.0, 2.12
[the] (attached|hit) block[s] of %entities%%entities%'[s] (attached|hit) block[s]

Returns the attached block of an arrow.

If running Paper 1.21.4+, the plural version of the expression should be used as it is more reliable compared to the single version.

Returns
block
Requires
Minecraft 1.21.4+ (multiple blocks)
In Skript since
2.8.0, 2.12 (multiple blocks)
ID
ExprAttachedBlock
View 2 examples
set hit block of last shot arrow to diamond block
on projectile hit:
	wait 1 tick
	break attached blocks of event-projectile
	kill event-projectile

Arrow Knockback Strength

  • expressions
  • Skript 2.5.1
[the] arrow knockback strength of %entities%%entities%'[s] arrow knockback strength

An arrow's knockback strength.

Returns
integer
In Skript since
2.5.1
ID
ExprArrowKnockbackStrength
View example
on shoot:
	event-projectile is an arrow
	set arrow knockback strength of event-projectile to 10

Arrow Pierce Level

  • expressions
[the] arrow pierce level of %entities%%entities%'[s] arrow pierce level

No matching entry in Skript's documentation.

Returns
integer
ID
ExprArrowPierceLevel

Arrows Stuck

  • expressions
  • Skript 2.5
[number of] arrow[s] stuck in %living entities%

The number of arrows stuck in a living entity.

Returns
integer
In Skript since
2.5
ID
ExprArrowsStuck
View example
set arrows stuck in player to 5

At

  • expressions
at

No matching entry in Skript's documentation.

Returns
direction
ID
LitAt

Attack Cooldown

  • expressions
  • Skript 2.6.1
[the] attack cooldown of %players%%players%'[s] attack cooldown

Returns the current cooldown for a player's attack. This is used to calculate damage, with 1.0 representing a fully charged attack and 0.0 representing a non-charged attack.

NOTE: Currently this can not be set to anything.

Returns
number
Requires
Minecraft 1.15+
In Skript since
2.6.1
ID
ExprAttackCooldown
View example
on damage:
	if attack cooldown of attacker < 1:
		set damage to 0
		send "Your hit was too weak! wait until your weapon is fully charged next time." to attacker

Attacked

  • expressions
  • Skript 1.3, 2.6.1
[the] (attacked|damaged|victim) [%entity type%]

The victim of a damage event, e.g. when a player attacks a zombie this expression represents the zombie.

Returns
entity
In Skript since
1.3, 2.6.1 (projectile hit event)
ID
ExprAttacked
View example
on damage:
	victim is a creeper
	damage the attacked by 1 heart

Attacker

  • expressions
  • Skript 1.3
[the] (attacker|damager)

The attacker of a damage event, e.g. when a player attacks a zombie this expression represents the player.",

Please note that the attacker can also be a block, e.g. a cactus or lava, but this expression will not be set in these cases.

Returns
entity
In Skript since
1.3
ID
ExprAttacker
View example
on damage:
	attacker is a player
	health of attacker is less than or equal to 2
	damage victim by 1 heart

Banner Pattern

  • expressions
  • Skript 2.10
[a] %banner pattern type% colo[u]red %colour%

Creates a new banner pattern.

In Skript since
2.10
ID
ExprNewBannerPattern
View 5 examples
set {_pattern} to a creeper banner pattern colored red
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)

Barter Drops

  • expressions
  • Skript 2.10
[the] [piglin] barter[ing] drops

The items dropped by the piglin in a piglin bartering event.

Returns
item type
In Skript since
2.10
ID
ExprBarterDrops
View example
on piglin barter:
	if the bartering drops contain a jack o lantern:
		remove jack o lantern from bartering output
		broadcast "it's not halloween yet!"

Barter Input

  • expressions
  • Skript 2.10
[the] [piglin] barter[ing] input

The item picked up by the piglin in a piglin bartering event.

Returns
item type
In Skript since
2.10
ID
ExprBarterInput
View example
on piglin barter:
	if the bartering input is a gold ingot:
		broadcast "my precious..."

Beacon Effects

  • expressions
  • Skript 2.10
[the] (primary|secondary) [beacon] effect [of %blocks%]%blocks%'[s] (primary|secondary) [beacon] effect

The active effects of a beacon.

The secondary effect can be set to anything, but the icon in the GUI will not display correctly.

The secondary effect can only be set when the beacon is at max tier.

The primary and secondary effect can not be the same, primary will always retain the potion type and secondary will be cleared.

In Skript since
2.10
ID
ExprBeaconEffects
View example
set primary beacon effect of {_block} to haste
set secondary effect of {_block} to resistance

Beacon Range

  • expressions
  • Skript 2.10
[the] beacon [effect] range of %blocks%%blocks%'[s] beacon [effect] range

The range of a beacon's effects, in blocks.

Returns
number
In Skript since
2.10
ID
ExprBeaconRange
View example
if the beacon tier of the clicked block is 4:
	set the beacon effect range of the clicked block to 100

Beacon Tier

  • expressions
  • Skript 2.10
[the] beacon tier of %blocks%%blocks%'[s] beacon tier

The tier of a beacon. Ranges from 0 to 4.

Returns
integer
In Skript since
2.10
ID
ExprBeaconTier
View example
if the beacon tier of the clicked block is 4:
	send "This is a max tier beacon!"

Bed

  • expressions
  • Skript 2.0, 2.7
[the] [((safe|valid)|(unsafe|invalid))] bed[s] [location[s]] of %offline players%%offline players%'[s] [((safe|valid)|(unsafe|invalid))] bed[s] [location[s]]

Returns the bed location of a player, i.e. the spawn point of a player if they ever slept in a bed and the bed still exists and is unobstructed however, you can set the unsafe bed location of players and they will respawn there even if it has been obstructed or doesn't exist anymore and that's the default behavior of this expression otherwise you will need to be specific i.e. safe bed location.

NOTE: Offline players can not have their bed location changed, only online players.

Returns
location
In Skript since
2.0, 2.7 (offlineplayers, safe bed)
ID
ExprBed
View 2 examples
if bed of player exists:
	teleport player the the player's bed
else:
	teleport the player to the world's spawn point
set the bed location of player to spawn location of world("world") # unsafe/invalid bed location
set the safe bed location of player to spawn location of world("world") # safe/valid bed location

Beehive Honey Level

  • expressions
  • Skript 2.11
[the] [max[imum]] honey level of %blocks%%blocks%'[s] [max[imum]] honey level

The current or max honey level of a beehive.

The max level is 5, which cannot be changed.

Returns
integer
In Skript since
2.11
ID
ExprBeehiveHoneyLevel
View example
set the honey level of {_beehive} to the max honey level of {_beehive}

Beehive Target Flower

  • expressions
  • Skript 2.11
[the] target flower of %blocks%%blocks%'[s] target flower

The flower a beehive has selected to pollinate from.

Returns
block
In Skript since
2.11
ID
ExprBeehiveFlower
View 2 examples
set the target flower of {_beehive} to location(0, 0, 0)
clear the target flower of {_beehive}

Biome

  • expressions
  • Skript 1.4.4, 2.6.1
[the] biome [(of|%direction%) %locations%]%locations%'[s] biome

The biome at a certain location. Please note that biomes are only defined for x/z-columns

(i.e. the altitude (y-coordinate) doesn't matter), up until Minecraft 1.15.x.

As of Minecraft 1.16, biomes are now 3D (per block vs column).

Returns
biome
In Skript since
1.4.4, 2.6.1 (3D biomes)
ID
ExprBiome
View example
# damage player in deserts constantly
every real minute:
	loop all players:
		biome at loop-player is desert
		damage the loop-player by 1

Blank Equippable Component

  • expressions
  • Skript 2.13
a (blank|empty) equippable component

Gets a blank equippable component.

NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.

Requires
Minecraft 1.21.2+
In Skript since
2.13
ID
ExprSecBlankEquipComp
View example
set {_component} to a blank equippable component:
	set the camera overlay to "custom_overlay"
	set the allowed entities to a zombie and a skeleton
	set the equip sound to "block.note_block.pling"
	set the equipped model id to "custom_model"
	set the shear sound to "ui.toast.in"
	set the equipment slot to chest slot
	allow event-equippable component to be damage when hurt
	allow event-equippable component to be dispensed
	allow event-equippable component to be equipped onto entities
	allow event-equippable component to be sheared off
	allow event-equippable component to swap equipment
set the equippable component of {_item} to {_component}

Block

  • expressions
  • Skript 1.0
[the] block[s] (at|of) %locations%[the] block %direction% [%location%]

The block involved in the event, e.g. the clicked block or the placed block.

Can optionally include a direction as well, e.g. 'block above' or 'block in front of the player'.

Returns
block
In Skript since
1.0
ID
ExprBlock-2
View 5 examples
block is iron ore
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

Block Break Speed

  • expressions
  • Skript 2.7
[the] break speed[s] [of %blocks%] [for %players%]%block%'[s] break speed[s] [for %players%]

Gets the speed at which the given player would break this block, taking into account tools, potion effects, whether or not the player is in water, enchantments, etc. The returned value is the amount of progress made in breaking the block each tick. When the total breaking progress reaches 1.0, the block is broken. Note that the break speed can change in the course of breaking a block, e.g. if a potion effect is applied or expires, or the player jumps/enters water.

Returns
number
Requires
1.17+
In Skript since
2.7
ID
ExprBreakSpeed
View example
on left click using diamond pickaxe:
	event-block is set
	send "Break Speed: %break speed for player%" to player

Block Data

  • expressions
  • Skript 2.5, 2.5.2
[the] block[ ]data of %blocks/entities%%blocks/entities%'[s] block[ ]data

Get the block data associated with a block.

This data can also be used to set blocks.

Returns
block data
In Skript since
2.5, 2.5.2 (set), 2.10 (block displays)
ID
ExprBlockData
View 3 examples
set {_data} to block data of target block
set block at player to {_data}
set block data of target block to oak_stairs[facing=south;waterlogged=true]

Block Hardness

  • expressions
  • Skript 2.6
[the] [block] hardness of %item types%%item types%'[s] [block] hardness

Obtains the block's hardness level (also known as "strength"). This number is used to calculate the time required to break each block.

Returns
number
Requires
Minecraft 1.13+
In Skript since
2.6
ID
ExprBlockHardness
View 2 examples
set {_hard} to block hardness of target block
if block hardness of target block > 5:

Block Sound

  • expressions
  • Skript 2.10
[the] (break|fall|hit|place|step) sound[s] of %blocks/block datas/item types%%blocks/block datas/item types%'[s] (break|fall|hit|place|step) sound[s]

Gets the sound that a given block, blockdata, or itemtype will use in a specific scenario.

This will return a string in the form of "SOUND_EXAMPLE", which can be used in the play sound syntax.

Check out this website for a list of sounds in Minecraft, or this one to go to the Sounds wiki page.

Returns
text
In Skript since
2.10
ID
ExprBlockSound
View 2 examples
play sound (break sound of dirt) at all players
set {_sounds::*} to place sounds of dirt, grass block, blue wool and stone

Block Sphere

  • expressions
  • Skript 1.0
[(all [[of] the]|the)] blocks in radius %number% [(of|around) %location%][(all [[of] the]|the)] blocks around %location% in radius %number%

All blocks in a sphere around a center, mostly useful for looping.

Returns
block
In Skript since
1.0
ID
ExprBlockSphere
View example
loop blocks in radius 5 around the player:
	set loop-block to air

Blocks

  • expressions
  • Skript 1.0, 2.5.1
[(all [[of] the]|the)] blocks %direction% [%locations%][(all [[of] the]|the)] blocks from %location% [on] %direction%[(all [[of] the]|the)] blocks from %location% to %location%[(all [[of] the]|the)] blocks between %location% and %location%[(all [[of] the]|the)] blocks within %location% and %location%[(all [[of] the]|the)] blocks (in|within) %chunk%

Blocks relative to other blocks or between other blocks.

Can be used to get blocks relative to other blocks or for looping.

Blocks from/to and between will return a straight line whereas blocks within will return a cuboid.

Returns
block
In Skript since
1.0, 2.5.1 (within/cuboid/chunk)
ID
ExprBlocks
View 5 examples
loop blocks above the player:
loop blocks between the block below the player and the targeted block:
set the blocks below the player, the victim and the targeted block to air
set all blocks within {loc1} and {loc2} to stone
set all blocks within chunk at player to air

Book Author

  • expressions
  • Skript 2.2-dev31
[the] [book] (author|writer|publisher) of %item types%%item types%'[s] [book] (author|writer|publisher)

The author of a book.

Returns
text
In Skript since
2.2-dev31
ID
ExprBookAuthor
View example
on book sign:
	broadcast "A new book has been created by %author of event-item%"

Book Pages

  • expressions
  • Skript 2.2-dev31, 2.7
[the] [book] (pages|content[s]) of %item types%%item types%'[s] [book] (pages|content[s])[the] [book] page %number% of %item types%%item types%'[s] [book] page %number%

The pages of a book (Supports Skript's chat format)

Note: In order to modify the pages of a new written book, you must have the title and author

of the book set. Skript will do this for you, but if you want your own, please set those values.

Returns
text
In Skript since
2.2-dev31, 2.7 (changers)
ID
ExprBookPages
View 2 examples
on book sign:
	if the number of pages of event-item is greater than 1:
		message "The second page of the authored book is: %page 2 of event-item%"
set page 1 of the player's held item to "This page was written with Skript!"

Book Title

  • expressions
  • Skript 2.2-dev31
  • Deprecated
[the] book (title|name) of %item types%%item types%'[s] book (title|name)

The title of a book.

Returns
text
In Skript since
2.2-dev31
ID
ExprBookTitle
View example
on book sign:
	message "You finished your book titled %title of event-item%"

Boss Bar From Boss

  • expressions
  • Skript 2.16
[the] boss[ ]bar of %entities%%entities%'[s] boss[ ]bar

Returns a boss bar from one or more bosses.

Returns
boss bar
In Skript since
2.16
ID
ExprBossBarFromEntity
View example
on spawn of wither:
    set title of boss bar of event-entity to "<red>Angry Wither"

Boss Bar From Key

  • expressions
  • Skript 2.16
[the] boss[ ]bar[s] (from|with) [the] (id|key)[s] %texts%

Obtains a keyed boss bar from the specified key.

In Skript since
2.16
ID
ExprBossBarFromKey
View example
set {_bar} to a keyed red boss bar with key "example":
    set title of event-bossbar to "My Test Title"
    set color of event-bossbar to red
    set progress of event-bossbar to 86%
    set style of event-bossbar to 6 notches

// some structure later on and you need to access it
set the title of the boss bar with the key "example" to "My Updated Test Title"

Breeding Family

  • expressions
  • Skript 2.10
[the] breeding mother[the] breeding father[the] [bred] (offspring|child)[the] breeder

Represents family members within a breeding event.

In Skript since
2.10
ID
ExprBreedingFamily
View example
on breeding:
	send "When a %breeding mother% and %breeding father% love each other very much, they make a %bred offspring%" to breeder

Brewing Results

  • expressions
  • Skript 2.13
[the] brewing results

The resulting items in an 'on brew complete' event.

Returns
item
In Skript since
2.13
ID
ExprBrewingResults
View example
on brew complete:
	set {_results::*} to the brewing results

Brewing Stand Fuel Level

  • expressions
  • Skript 2.13
[the] brewing [stand] fuel (level|amount) [of %blocks%]%blocks%'[s] brewing [stand] fuel (level|amount)

The fuel level of a brewing stand. The fuel level is decreased by one at the start of brewing each potion.

Returns
integer
In Skript since
2.13
ID
ExprBrewingFuelLevel
View example
set the brewing stand fuel level of {_block} to 10
clear the brewing stand fuel level of {_block}

Brewing Stand Slot

  • expressions
  • Skript 2.13
[the] [brewing stand['s]] (first|1st) bottle slot[s] [of %blocks%]%blocks%'[s] [brewing stand['s]] (first|1st) bottle slot[s][the] [brewing stand['s]] (second|2nd) bottle slot[s] [of %blocks%]%blocks%'[s] [brewing stand['s]] (second|2nd) bottle slot[s][the] [brewing stand['s]] (third|3rd) bottle slot[s] [of %blocks%]%blocks%'[s] [brewing stand['s]] (third|3rd) bottle slot[s][the] brewing [stand] ingredient slot[s] [of %blocks%]%blocks%'[s] brewing [stand] ingredient slot[s][the] brewing [stand] fuel slot[s] [of %blocks%]%blocks%'[s] brewing [stand] fuel slot[s]

A slot of a brewing stand, i.e. the first, second, or third bottle slot, the fuel slot or the ingredient slot.

Returns
item type
In Skript since
2.13
ID
ExprBrewingSlot
View 2 examples
set the 1st bottle slot of {_block} to potion of water
clear the brewing stand second bottle slot of {_block}

Brewing Time

  • expressions
  • Skript 2.13
[the] [current|remaining] brewing time [of %blocks%]%blocks%'[s] [current|remaining] brewing time

The remaining brewing time of a brewing stand.

Returns
time span
In Skript since
2.13
ID
ExprBrewingTime
View 2 examples
set the brewing time of {_block} to 10 seconds
clear the remaining brewing time of {_block}

Broadcast Message

  • expressions
  • Skript 2.10
[the] broadcast(-|[ed] )message

The message broadcasted in a broadcast event.

Returns
text
In Skript since
2.10
ID
ExprBroadcastMessage
View example
on broadcast:
	set broadcast message to "<light green>[BROADCAST] %broadcast message%"

Brushing Stage

  • expressions
  • Skript 2.12
[the] [max[imum]] (dust|brush)[ed|ing] (value|stage|progress[ion]) of %blocks/block datas%%blocks/block datas%'[s] [max[imum]] (dust|brush)[ed|ing] (value|stage|progress[ion])

Represents how far the block has been uncovered.

The only blocks that can currently be "brushed" are Suspicious Gravel and Suspicious Sand.

0 means the block is untouched, the max (usually 3) means nearly fulled brushed.

Resetting this value will set it to 0.

Returns
integer
In Skript since
2.12
ID
ExprDustedStage
View 2 examples
# prevent dusting past level 1
on player change block:
	if dusting progress of future event-blockdata > 1:
		cancel event
# draw particles when dusting is complete!
on player change block:
	if brushing progress of event-block is max brushing stage of event-block:
		draw 20 totem of undying particles at event-block

Buried Item

  • expressions
  • Skript 2.12
[the] brushable item of %blocks%%blocks%'[s] brushable item

Represents the item that is uncovered when dusting.

The only blocks that can currently be "dusted" are Suspicious Gravel and Suspicious Sand.

Returns
item type
Requires
Minecraft 1.20+
In Skript since
2.12
ID
ExprBrushableItem
View 2 examples
send target block's brushable item
set {_gravel}'s brushable item to emerald

Case Text

  • expressions
  • Skript 2.2-dev16
%texts% in ((upper|caps)[ ]case|lower[ ]case)(capitali(s|z)ed|upper[ ]case[d]|lower[ ]case[d]) %texts%%texts% in [(lenient|strict) ]((proper|title)[ ]case|camel[ ]case|pascal[ ]case)[(lenient|strict) ]((proper|title)[ ]case|camel[ ]case|pascal[ ]case) %texts%%texts% in [(lower|upper) ](snake[ ]case|kebab[ ]case)[(lower|upper) ](snake[ ]case|kebab[ ]case) %texts%

Copy of given text in Lowercase, Uppercase, Proper Case, camelCase, PascalCase, Snake_Case, and Kebab-Case

Returns
text
In Skript since
2.2-dev16 (lowercase and uppercase), 2.5 (advanced cases)
ID
ExprStringCase
View 14 examples
"Oops!" in lowercase # oops!
"oops!" in uppercase # OOPS!
"hellO i'm steve!" in proper case # HellO I'm Steve!
"hellO i'm steve!" in strict proper case # Hello I'm Steve!
"spAwn neW boSs ()" in camel case # spAwnNeWBoSs()
"spAwn neW boSs ()" in strict camel case # spawnNewBoss()
"geneRate ranDom numBer ()" in pascal case # GeneRateRanDomNumBer()
"geneRate ranDom numBer ()" in strict pascal case # GenerateRandomNumber()
"Hello Player!" in snake case # Hello_Player!
"Hello Player!" in lower snake case # hello_player!
"Hello Player!" in upper snake case # HELLO_PLAYER!
"What is your name?" in kebab case # What-is-your-name?
"What is your name?" in lower kebab case # what-is-your-name?
"What is your name?" in upper kebab case # WHAT-IS-YOUR-NAME?

Cast

  • expressions
[the] (<.+>|value[s]) (within|in) %objects%

No matching entry in Skript's documentation.

Returns
object
ID
ExprCast

Center of World Border

  • expressions
  • Skript 2.11
[the] world[ ]border (center|middle) [of %world borders%]%world borders%'[s] world[ ]border (center|middle)

The center of a world border.

Returns
location
In Skript since
2.11
ID
ExprWorldBorderCenter
View example
set world border center of {_worldborder} to location(10, 0, 20)

Character Codepoint

  • expressions
  • Skript 2.9.0
[the] [unicode|character] code([ ]point| position) of %texts%%texts%'[s] [unicode|character] code([ ]point| position)

Returns the Unicode codepoint of a character

Returns
integer
In Skript since
2.9.0
ID
ExprCodepoint
View example
function is_in_order(letters: strings) :: boolean:
	loop {_letters::*}:
		set {_codepoint} to codepoint of lowercase loop-value

		return false if {_codepoint} is not set # 'loop-value is not a single character'

		if:
			{_previous-codepoint} is set
			# if the codepoint of the current character is not
			#  1 more than the codepoint of the previous character
			#  then the letters are not in order
			{_codepoint} - {_previous-codepoint} is not 1
		then:
			return false

		set {_previous-codepoint} to {_codepoint}
	return true

Character from Codepoint

  • expressions
  • Skript 2.9.0
character (from|at|with) code([ ]point| position) %numbers%

Returns the character at the specified codepoint

Returns
text
In Skript since
2.9.0
ID
ExprCharacterFromCodepoint
View example
function chars_between(lower: string, upper: string) :: strings:
	set {_lower} to codepoint of {_lower}
	return {_none} if {_lower} is not set

	set {_upper} to codepoint of {_upper}
	return {_none} if {_upper} is not set

	loop integers between {_lower} and {_upper}:
		add character from codepoint loop-value to {_chars::*}
	return {_chars::*}

Characters Between

  • expressions
  • Skript 2.8.0
[(all [[of] the]|the)] [alphanumeric] characters (between|from) %text% (and|to) %text%

All characters between two given characters, useful for generating random strings. This expression uses the Unicode numerical code of a character to determine which characters are between the two given characters. The ASCII table linked here shows this ordering for the first 256 characters.

If you would like only alphanumeric characters you can use the 'alphanumeric' option in the expression.

If strings of more than one character are given, only the first character of each is used.

Returns
text
In Skript since
2.8.0
ID
ExprCharacters
View 3 examples
loop characters from "a" to "f":
	broadcast "%loop-value%"
# 0123456789:;<=>?@ABC... ...uvwxyz
send characters between "0" and "z"
# 0123456789ABC... ...uvwxyz
send alphanumeric characters between "0" and "z"

Chat Format

  • expressions
  • Skript 2.2-dev31
[the] (message|chat) format[ting]

Can be used to modify the chat format.

The sender of a message is represented by player.

The message is represented by message.

Returns
text
In Skript since
2.2-dev31
ID
ExprChatFormat
View example
set the chat format to "<yellow>%player%<light gray>: <green>%message%"

Chat Message

  • expressions
  • Skript 1.4.6, 2.15
[the] [chat( |-)]message

The chat message in a chat event.

Returns
text
In Skript since
1.4.6, 2.15 (support for reset)
ID
ExprChatMessage
View example
on chat:
	player has permission "admin"
	set the message to "<light red>%message%"

Chat Recipients

  • expressions
  • Skript 2.2-Fixes-v7, 2.2-dev35
[the] [chat( | -)]recipients

The recipients of a chat event

Returns
audience
In Skript since
2.2-Fixes-v7, 2.2-dev35 (clearing recipients), 2.15 (returns Audience)
ID
ExprChatRecipients
View example
chat recipients

Choice Argument

  • expressions
  • Skript 2.17
[the] choice arg[ument] <(\d+)>[the] (first|second|third|<(\d*1)st|(\d*2)nd|(\d*3)rd|(\d*[4-90])th>) choice arg[ument][s][the] [last] choice arg[ument]

Represents the literal argument out of a choice group selected by the command sender.

Choice arguments, just like regular arguments, are numbered in order of occurrence (left to right).

This expression also supports optional literal arguments.

Returns
object
In Skript since
2.17
ID
ExprChoiceArgument
View example
command /alert (restart|giveaway):
	trigger:
		if the choice argument is "restart":
			broadcast "<red>The server is restarting in 5 minutes!"
		else: # must be giveaway
			broadcast "<aqua>A giveaway is starting soon at spawn!"

Chunk

  • expressions
  • Skript 2.0, 2.8.0
[(all [[of] the]|the)] chunk[s] (of|%directions%) %locations%%locations%'[s] chunk[s][(all [[of] the]|the)] loaded chunks (of|in) %worlds%[the] chunk [at] %number%, %number% (in|of) %world%

Returns the chunk of a block, location or entity is in, or a list of the loaded chunks of a world.

Returns
chunk
In Skript since
2.0, 2.8.0 (loaded chunks)
ID
ExprChunk
View 2 examples
add the chunk at the player to {protected chunks::*}
set {_chunks::*} to the loaded chunks of the player's world

Class Info

  • expressions
(a|an) <.+>

No matching entry in Skript's documentation.

Returns
object
ID
LitClassInfo

Clicked Block/Entity/Inventory/Slot

  • expressions
  • Skript 1.0, 2.2-dev35
[the] (clicked [enchant[ment]] (button|option)|clicked (block|%item type/entity type%)|clicked slot|clicked inventory|click (type|action)|inventory action)

The clicked block, entity, inventory, inventory slot, inventory click type or inventory action.

Returns
object
In Skript since
1.0, 2.2-dev35 (more clickable things)
ID
ExprClicked
View example
message "You clicked on a %type of clicked entity%!"
if the clicked block is a chest:
	show the inventory of the clicked block to the player

Color from Hex Code

  • expressions
  • Skript 2.14
[the] colo[u]r[s] (from|of) hex[adecimal] code[s] %texts%

Returns a proper argb color from a hex code string. The hex code must contain RRGGBB values, but can also contain a leading # or AARRGGBB format. Invalid codes will cause runtime errors.

Returns
colour
In Skript since
2.14
ID
ExprColorFromHexCode
View 3 examples
send color from hex code "#FFBBA7"
send color from hex code "FFBBA7"
send color from hex code "#AAFFBBA7"

Color of

  • expressions
  • Skript 1.2, 2.10
[the] colo[u]r[s] of %item types/entities/potion effect types/boss bars%%item types/entities/potion effect types/boss bars%'[s] colo[u]r[s]

The color of an item, entity, block, firework effect, or text display.

This can also be used to color chat messages with "<%color of ...%>this text is colored!".

Do note that firework effects support setting, adding, removing, resetting, and deleting; text displays support setting and resetting; and items, entities, and blocks only support setting, and only for very few items/blocks.

Returns
colour
In Skript since
1.2, 2.10 (displays), 2.16 (boss bars)
ID
ExprColorOf
View example
on click on wool:
	if event-block is tagged with minecraft tag "wool":
		message "This wool block is <%color of block%>%color of block%<reset>!"
		set the color of the block to black

Colored/Formatted/Uncolored

  • expressions
  • Skript 2.0
(colo[u]r-|colo[u]red )%texts%(format-|formatted )%texts%

Parses or removes colors and, optionally, chat styles in/from a message.

In Skript since
2.0, 2.15 ('uncolored' vs 'unformatted' distinction)
ID
ExprColored
View 3 examples
on chat:
	set message to colored message # only safe tags, such as colors, will be parsed
command /fade <player>:
	trigger:
		set the display name of the player-argument to the uncolored display name of the player-argument
command /format <text>:
	trigger:
		message formatted text-argument # parses all tags, but this is okay as the output is sent back to the executor

Colored/Formatted/Uncolored

  • expressions
  • Skript 2.0
(un|non)[-](colo[u]r-|colo[u]red )%texts%(un|non)[-](format-|formatted )%texts%

Parses or removes colors and, optionally, chat styles in/from a message.

Returns
text
In Skript since
2.0, 2.15 ('uncolored' vs 'unformatted' distinction)
ID
ExprColored-un
View 3 examples
on chat:
	set message to colored message # only safe tags, such as colors, will be parsed
command /fade <player>:
	trigger:
		set the display name of the player-argument to the uncolored display name of the player-argument
command /format <text>:
	trigger:
		message formatted text-argument # parses all tags, but this is okay as the output is sent back to the executor

Command

  • expressions
  • Skript 2.0, 2.7
[the] (full|complete|whole) command[the] command [label|alias]

The command that caused an 'on command' event (excluding the leading slash and all arguments)

Returns
text
In Skript since
2.0, 2.7 (support for script commands)
ID
ExprCommand
View example
# prevent any commands except for the /exit command during some game
on command:
	if {game::%player%::playing} is true:
		if the command is not "exit":
			message "You're not allowed to use commands during the game"
			cancel the event

Command Block Command

  • expressions
  • Skript 2.10
[the] [command[ ]block] command of %blocks/entities%%blocks/entities%'[s] [command[ ]block] command

Gets or sets the command associated with a command block or minecart with command block.

Returns
text
In Skript since
2.10
ID
ExprCommandBlockCommand
View 2 examples
send command of {_block}
set command of {_cmdMinecart} to "say asdf"

Command Executor

  • expressions
  • Skript 2.17
[the] [command['s]] executor

The executor of a command.

This differs from the command sender in that the executor may not be the thing that triggered/initiated the command.

The executor of a command is often changed to be different from the command sender by using a vanilla command such as "/execute".

Returns
entity
In Skript since
2.17
ID
ExprCommandExecutor
View example
command /balance:
	# This works if you do "/execute as <player> run balance"
	# It will send the output to the command sender, but it will be as if "<player>" was the thing executing it.
	send "Your balance is %{balance::%uuid of the executor%}%" to the sender

Command Info

  • expressions
  • Skript 2.6
[the] main command [label|name] [of [[the] command[s]] %texts%]command[s] %texts%'[s] main command [label|name][the] description [of [[the] command[s]] %texts%]command[s] %texts%'[s] description[the] label [of [[the] command[s]] %texts%]command[s] %texts%'[s] label[the] usage [of [[the] command[s]] %texts%]command[s] %texts%'[s] usage[all [[of] the]|the] aliases [of [[the] command[s]] %texts%]command[s] %texts%'[s] aliases[the] permission [of [[the] command[s]] %texts%]command[s] %texts%'[s] permission[the] permission message [of [[the] command[s]] %texts%]command[s] %texts%'[s] permission message[the] plugin [owner] [of [[the] command[s]] %texts%]command[s] %texts%'[s] plugin [owner]

Get information about a command.

Returns
text
In Skript since
2.6
ID
ExprCommandInfo
View 8 examples
main command label of command "skript"
description of command "help"
label of command "pl"
usage of command "help"
aliases of command "bukkit:help"
permission of command "/op"
command "sk"'s plugin owner
command /greet <player>:
	usage: /greet <target>
	trigger:
		if arg-1 is sender:
			send "&cYou can't greet yourself! Usage: %the usage%"
			stop
		send "%sender% greets you!" to arg-1
		send "You greeted %arg-1%!"

Command Sender

  • expressions
  • Skript 2.0
[the] [command['s]] sender

The sender of a command. This differs from the command executor in that this is always the thing that originally triggered/initiated the command. It cannot be changed by commands like "/execute".

In Skript since
2.0
ID
ExprCommandSender
View 2 examples
make the command sender execute "/say hi!"
on command:
	log "%sender% used command /%command% %arguments%" to "commands.log"

Compass Target

  • expressions
  • Skript 2.0
[the] compass target of %players%%players%'[s] compass target

The location a player's compass is pointing at.

As of Minecraft 1.21.4, the compass is controlled by the resource pack and by default will not point to this compass target when used outside of the overworld dimension.

Returns
location
In Skript since
2.0
ID
ExprCompassTarget
View example
# make all player's compasses target a player stored in {compass::target::%player%}
every 5 seconds:
	loop all players:
		set the loop-player's compass target to location of {compass::target::%%loop-player%}

Config

  • expressions
  • Skript 2.10
[the] [skript] config

The Skript config.

This can be reloaded, or navigated to retrieve options.

Returns
node
In Skript since
2.10
ID
ExprConfig
View example
set {_node} to node "language" in the skript config
if text value of {_node} is "french":
	broadcast "Bonjour!"

Console

  • expressions
  • Skript 1.3.1
[the] (console|server)

Represents the server's console which can receive messages and execute commands

In Skript since
1.3.1
ID
LitConsole
View 2 examples
execute console command "/stop"
send "message to console" to the console

Consumed Item

  • expressions
  • Skript 2.11
[the] consumed item

Represents the item consumed within an entity shoot bow and item consume event.

Returns
item
In Skript since
2.11
ID
ExprConsumedItem
View 2 examples
on player or skeleton shoot projectile:
	if the consumed item is an arrow:
		cancel event
		send "You're now allowed to shoot your arrows." to shooter
on player consume:
	if the consumed item is cooked porkchop:
		send "Well aren't you just a little piggy wiggly!" to player
	if player has scoreboard tag "vegetarian":
		set the consumed item to a carrot

Create Boss Bar

  • expressions
  • Skript 2.16
[a] [new] [%colour%] boss[ ]bar [(with title|titled) %text%][a] [new] keyed [%colour%] boss[ ]bar with (id|key) %text% [(with title|titled) %text%]

Creates a new boss bar.

Boss bars can be pink/blue/red/green/yellow/purple/white, and will pick the closest valid color to the one you provide.

Boss bars can have viewers removed or added to them.

Making the boss bar 'keyed' will add it to the persistent storage of the server and will be editable by commands and restored after restart.

Returns
boss bar
In Skript since
2.16
ID
ExprSecCreateBossBar
View 2 examples
on join:
	set {_bar} to a boss bar:
		set color of event-bossbar to white
		set title of event-bossbar to "<green>Welcome %player%!"
		set progress of event-bossbar to 50%
		set style of event-bossbar to 6 notches
		make event-bossbar darken the sky
	add player to viewers of {_bar}
	wait 5 seconds
	remove player from viewers of {_bar}
command /createkeyedbar:
	trigger:
		set {_bar} to a keyed red bossbar with title "<red>My persistent red bar":
			set progress of event-bossbar to 14%
			set style of event-bossbar to 20 notches
		loop all operators:
			add loop-value to viewers of {_bar}

Create Loot Context

  • expressions
  • Skript 2.10
[a] loot context %direction% %location%

Create a loot context.

In Skript since
2.10
ID
ExprSecCreateLootContext
View example
set {_player} to player
set {_context} to a loot context at player:
    set loot luck value to 10
    set looter to {_player}
    set looted entity to last spawned pig
give player loot items of loot table "minecraft:entities/iron_golem" with loot context {_context}

Create WorldBorder

  • expressions
  • Skript 2.11
(a|[a] virtual) world[ ]border

Creates a new, unused world border. World borders can be assigned to either worlds or specific players.

Borders assigned to worlds apply to all players in that world.

Borders assigned to players apply only to those players, and different players can have different borders.

In Skript since
2.11
ID
ExprSecCreateWorldBorder
View 2 examples
on join:
	set {_location} to location of player
	set worldborder of player to a virtual worldborder:
		set worldborder radius to 25
		set world border center of event-worldborder to {_location}
on load:
	set worldborder of world "world" to a worldborder:
		set worldborder radius of event-worldborder to 200
		set worldborder center of event-worldborder to location(0, 64, 0)
		set worldborder warning distance of event-worldborder to 5

Created Damage Source

  • expressions
  • Skript 2.12
[the] created damage source

Get the created damage source being created/modified in a 'custom damage source' section.

In Skript since
2.12
ID
ExprCreatedDamageSource
View example
set {_source} to a custom damage source:
	set the damage type of the created damage source to magic

Created Potion Effect

  • expressions
  • Skript 2.14
created [potion] effecteffect

An expression to obtain the potion effect being made in a potion effect creation section.

In Skript since
2.14
ID
ExprSkriptPotionEffect
View example
set {_potion} to a potion effect of speed 2 for 10 minutes:
	hide the effect's icon
	hide the effect's particles

Creature/Entity/Player/Projectile/Villager/Powered Creeper/etc.

  • expressions
  • Skript 1.0
[the] [event-]<.+>

The entity involved in an event (an entity is a player, a creature or an inanimate object like ignited TNT, a dropped item or an arrow).

You can use the specific type of the entity that's involved in the event, e.g. in a 'death of a creeper' event you can use 'the creeper' instead of 'the entity'.

Returns
object
In Skript since
1.0
ID
ExprEventValue
View 4 examples
give a diamond sword of sharpness 3 to the player
kill the creeper
kill all powered creepers in the wolf's world
projectile is an arrow

Creeper Max Fuse Ticks

  • expressions
[the] [creeper] max[imum] fuse tick[s] of %living entities%%living entities%'[s] [creeper] max[imum] fuse tick[s]

No matching entry in Skript's documentation.

Returns
integer
ID
ExprCreeperMaxFuseTicks

Cursor Slot

  • expressions
  • Skript 2.2-dev17
[the] cursor slot of %players%%players%'[s] cursor slot

The item which the player has on their inventory cursor. This slot is always empty if player has no inventory open.

Returns
slot
In Skript since
2.2-dev17
ID
ExprCursorSlot
View 2 examples
cursor slot of player is dirt
set cursor slot of player to 64 diamonds

Custom Chest Inventory

  • expressions
  • Skript 2.2-dev34, 2.8.0
[a] [new] chest inventory (named|with name) %text% [with %number% row[s]][a] [new] chest inventory with %number% row[s] [(named|with name) %text%]

Returns a chest inventory with the given amount of rows and the name.

Use the open inventory effect to open it.

Returns
inventory
In Skript since
2.2-dev34, 2.8.0 (chat format)
ID
ExprChestInventory
View 3 examples
open chest inventory with 1 row named "test" to player
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

Custom Model Data

  • expressions
  • Skript 2.5
[the] [custom] model data of %item types%%item types%'[s] [custom] model data[the] [custom] model data (floats|flags|strings|colo[u]rs) of %item type%%item type%'[s] [custom] model data (floats|flags|strings|colo[u]rs)[the] ((complete|full)) [custom] model data of %item type%%item type%'[s] ((complete|full)) [custom] model data

Get/set the custom model data of an item. Using just `custom model data` will return an integer. Items without model data will return 0.

Since 1.21.4, custom model data instead consists of a list of numbers (floats), a list of booleans (flags), a list of strings, and a list of colours. Accessing and modifying these lists can be done type-by-type, or all at once with `complete custom model data`. This is the more accurate and recommended method of using custom model data.

Returns
object
Requires
Minecraft 1.21.4+ (floats/flags/strings/colours/full model data)
In Skript since
2.5, 2.12 (floats/flags/strings/colours/full model data)
ID
ExprCustomModelData
View 3 examples
set custom model data of player's tool to 3
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)

Damage

  • expressions
  • Skript 1.3.5, 2.8.0
[the] damage

How much damage is done in a entity/vehicle/item damage events.

For entity damage events, possibly ignoring armour, criticals and/or enchantments (remember that in Skript '1' is one full heart, not half a heart).

For items, it's the amount of durability damage the item will be taking.

Returns
number
In Skript since
1.3.5, 2.8.0 (item damage event)
ID
ExprDamage
View 2 examples
on item damage:
	event-item is any tool
	clear damage # unbreakable tools as the damage will be 0
on damage:
	increase the damage by 2

Damage Amount of World Border

  • expressions
  • Skript 2.11
[the] world[ ]border damage amount [of %world borders%]%world borders%'[s] world[ ]border damage amount

The amount of damage a player takes per second for each block they are outside the border plus the border buffer.

Players only take damage when outside of the world's world border, and the damage value cannot be less than 0.

Returns
number
In Skript since
2.11
ID
ExprWorldBorderDamageAmount
View example
set world border damage amount of {_worldborder} to 1

Damage Buffer of World Border

  • expressions
  • Skript 2.11
[the] world[ ]border damage buffer [of %world borders%]%world borders%'[s] world[ ]border damage buffer

The amount of blocks a player may safely be outside the border before taking damage.

Players only take damage when outside of the world's world border, and the damage buffer distance cannot be less than 0.

Returns
number
In Skript since
2.11
ID
ExprWorldBorderDamageBuffer
View example
set world border damage buffer of {_worldborder} to 10

Damage Cause

  • expressions
  • Skript 2.0
[the] damage cause

The damage cause of a damage event. Please click on the link for more information.

In Skript since
2.0
ID
ExprDamageCause
View example
damage cause is lava, fire or burning

Damage Source

  • expressions
  • Skript 2.12
[a] custom damage source [(with|using) [the|a] [damage type [of]] %damage type%]

Create a custom damage source and change the attributes.

When setting a 'causing entity' you must also set a 'direct entity'.

Attributes of a damage source cannot be changed once created, only while within the 'custom damage source' section.

In Skript since
2.12
ID
ExprSecDamageSource
View 2 examples
set {_source} to a custom damage source:
	set the damage type to magic
	set the causing entity to {_player}
	set the direct entity to {_arrow}
	set the damage location to location(0, 0, 10)
damage all players by 5 using {_source}
on damage:
	if the damage type of event-damage source is magic:
		set the damage to damage * 2

Damage Source - Causing Entity

  • expressions
  • Skript 2.12
[the] (causing|responsible) entity [of %damage sources%]%damage sources%'[s] (causing|responsible) entity

The causing entity of a damage source.

The causing entity is the entity that ultimately caused the damage. (e.g. the entity that shot an arrow)

When setting a 'causing entity' you must also set a 'direct entity'.

Attributes of a damage source cannot be changed once created, only while within the 'custom damage source' section.

Returns
entity
In Skript since
2.12
ID
ExprCausingEntity
View 2 examples
set {_source} to a custom damage source:
	set the damage type to magic
	set the causing entity to {_player}
	set the direct entity to {_arrow}
	set the damage location to location(0, 0, 10)
on damage:
	set {_causing} to the causing entity of event-damage source

Damage Source - Damage Location

  • expressions
  • Skript 2.12
[the] damage location [of %damage sources%]%damage sources%'[s] damage location

The location where the damage was originated from.

The 'damage location' on vanilla damage sources will be set if an entity did not cause the damage.

Attributes of a damage source cannot be changed once created, only while within the 'custom damage source' section.

Returns
location
In Skript since
2.12
ID
ExprDamageLocation
View 2 examples
damage all players by 5 using a custom damage source:
	set the damage type to magic
	set the causing entity to {_player}
	set the direct entity to {_arrow}
	set the damage location to location(0, 0, 10)
on death:
	set {_location} to the damage location of event-damage source

Damage Source - Damage Type

  • expressions
  • Skript 2.12
[the] damage type [of %damage sources%]%damage sources%'[s] damage type

The type of damage of a damage source.

Attributes of a damage source cannot be changed once created, only while within the 'custom damage source' section.

In Skript since
2.12
ID
ExprDamageType
View 2 examples
set {_source} to a custom damage source:
	set the damage type to magic
	set the causing entity to {_player}
	set the direct entity to {_arrow}
	set the damage location to location(0, 0, 10)
damage all players by 5 using {_source}
on death:
	set {_type} to the damage type of event-damage source

Damage Source - Direct Entity

  • expressions
  • Skript 2.12
[the] direct entity [of %damage sources%]%damage sources%'[s] direct entity

The direct entity of a damage source.

The direct entity is the entity that directly caused the damage. (e.g. the arrow that was shot)

Attributes of a damage source cannot be changed once created, only while within the 'custom damage source' section.

Returns
entity
In Skript since
2.12
ID
ExprDirectEntity
View 2 examples
set {_source} to a custom damage source:
	set the damage type to magic
	set the causing entity to {_player}
	set the direct entity to {_arrow}
	set the damage location to location(0, 0, 10)
damage all players by 5 using {_source}
on death:
	set {_direct} to the direct entity of event-damage source

Damage Source - Food Exhaustion

  • expressions
  • Skript 2.12
[the] food exhaustion [of %damage sources%]%damage sources%'[s] food exhaustion

The amount of hunger exhaustion caused by a damage source.

Returns
number
In Skript since
2.12
ID
ExprFoodExhaustion
View example
on damage:
	if the food exhaustion of event-damage source is 10:

Damage Source - Source Location

  • expressions
  • Skript 2.12
[the] source location [of %damage sources%]%damage sources%'[s] source location

The final location where the damage was originated from.

The 'source location' for vanilla damage sources will retrieve the 'damage location' if set. If 'damage location' is not set, will attempt to grab the location of the 'causing entity', otherwise, null.

Returns
location
In Skript since
2.12
ID
ExprSourceLocation
View example
on death:
	set {_location} to the source location of event-damage source

Damage Value/Durability

  • expressions
  • Skript 1.2, 2.7
[the] (damage[s] [value[s]]|durabilit(y|ies)) of %item types/items/slots%%item types/items/slots%'[s] (damage[s] [value[s]]|durabilit(y|ies))

The damage value/durability of an item.

Returns
integer
In Skript since
1.2, 2.7 (durability reversed)
ID
ExprDurability
View 3 examples
set damage value of player's tool to 10
reset the durability of {_item}
set durability of player's held item to 0

Damaged Item

  • expressions
  • Skript 2.4
%item type% with (damage|data) [value] %number%%item type% damaged by %number%

Directly damages an item. In MC versions 1.12.2 and lower, this can be used to apply data values to items/blocks

Returns
item type
In Skript since
2.4
ID
ExprDamagedItem
View 4 examples
give player diamond sword with damage value 100
set player's tool to diamond hoe damaged by 250
give player diamond sword with damage 700 named "BROKEN SWORD"
set {_item} to diamond hoe with damage value 50 named "SAD HOE"

Date Ago/Later

  • expressions
  • Skript 2.2-dev33
%time span% (ago|in the past|before [the] [date] %date%)%time span% (later|(from|after) [the] [date] %date%)

A date the specified timespan before/after another date.

Returns
date
In Skript since
2.2-dev33
ID
ExprDateAgoLater
View 3 examples
set {_yesterday} to 1 day ago
set {_hourAfter} to 1 hour after {someOtherDate}
set {_hoursBefore} to 5 hours before {someOtherDate}

De-queue Queue (Experimental)

  • expressions
  • Skript 2.10
(de|un)queued %queue%unrolled %queue%

Requires the using queues experimental feature flag to be enabled.

Unrolls a queue into a regular list of values, which can be stored in a list variable.

The order of the list will be the same as the order of the elements in the queue.

If a list variable is set to this, it will use numerical indices.

The original queue will not be changed.

Returns
object
In Skript since
2.10 (experimental)
ID
ExprDequeuedQueue
View example
set {queue} to a new queue
add "hello" and "there" to {queue}
set {list::*} to dequeued {queue}

Death Message

  • expressions
  • Skript 2.0
[the] death( |-)message

The message sent to all online players when a player dies.

Returns
text
In Skript since
2.0
ID
ExprDeathMessage
View example
on death of player:
	set the death message to "%player% died!"

Debug Info

  • expressions
  • Skript 2.13
[the] debug info[rmation] of %objects%%objects%'[s] debug info[rmation]

Returns a string version of the given objects, but with their type attached:

debug info of 1, "a", 0.5 -> 1 (long), "a" (string), 0.5 (double)

This is intended to make debugging easier, not as a reliable method of getting the type of a value.

Returns
text
In Skript since
2.13
ID
ExprDebugInfo
View example
broadcast debug info of {list::*}

Default Value

  • expressions
  • Skript 2.2-dev36
%objects% (otherwise|?) %objects%

A shorthand expression for giving things a default value. If the first thing isn't set, the second thing will be returned.

Returns
object
In Skript since
2.2-dev36
ID
ExprDefaultValue
View example
broadcast {score::%player's uuid%} otherwise "%player% has no score!"

Difference

  • expressions
  • Skript 1.4
difference (between|of) %object% and %object%

The difference between two values

Supported types include numbers, dates and times.

Returns
object
In Skript since
1.4
ID
ExprDifference
View example
if difference between {command::%player%::lastuse} and now is smaller than a minute:
	message "You have to wait a minute before using this command again!"

Difficulty

  • expressions
  • Skript 2.3
[the] difficult(y|ies) of %worlds%%worlds%'[s] difficult(y|ies)

The difficulty of a world.

Returns
difficulty
In Skript since
2.3
ID
ExprDifficulty
View example
set the difficulty of "world" to hard

Direction

  • expressions
  • Skript 1.0
[%number% [(block|met(er|re))[s]] [to the]] (north[(-| |)(east|west)][(ward(s|ly|)|er(n|ly|))] [of]|south[(-| |)(east|west)][(ward(s|ly|)|er(n|ly|))] [of]|(east|west)[(ward(s|ly|)|er(n|ly|))] [of]|above|over|(up|down)[ward(s|ly|)]|below|under[neath]|beneath) [%direction%][%number% [(block|met(er|re))[s]]] in [the] (direction|horizontal direction|facing|horizontal facing) of %entity/block% (of|from|)[%number% [(block|met(er|re))[s]]] in %entity/block%'[s] (direction|horizontal direction|facing|horizontal facing) (of|from|)[%number% [(block|met(er|re))[s]]] (in[ ]front [of]|forward[s]|behind|backwards|[to the] (right|left) [of])[%number% [(block|met(er|re))[s]]] horizontal[ly] (in[ ]front [of]|forward[s]|behind|backwards|to the (right|left) [of])

A helper expression for the direction type.

Returns
direction
In Skript since
1.0 (basic), 2.0 (extended)
ID
ExprDirection
View 12 examples
thrust the player upwards
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

Display Billboard

  • expressions
  • Skript 2.10
[the] bill[ |-]board[ing] [setting][s] [of %entities%]%entities%'[s] bill[ |-]board[ing] [setting][s]

Returns or changes the billboard setting of displays.

This describes the axes/points around which the display can pivot.

Displays spawn with the 'fixed' billboard by default. Resetting this expression will also set it to 'fixed'.

Returns
billboard
In Skript since
2.10
ID
ExprDisplayBillboard
View example
set billboard of the last spawned text display to center

Display Brightness

  • expressions
  • Skript 2.10
[the] [block|sky] (light [level]|brightness) override[s] [of %entities%]%entities%'[s] [block|sky] (light [level]|brightness) override[s]

Returns or changes the brightness override of displays.

Unmodified displays will not have a brightness override value set. Resetting or deleting this value will remove the override.

Use the 'block' or 'sky' options to get/change specific values or get both values as a list by using neither option.

NOTE: setting only one of the sky/block light overrides of a display without an existing override will set both sky and block light to the given value. Make sure to set both block and sky levels to your desired values for the best results. Likewise, you can only clear the brightness override, you cannot clear/reset the sky/block values individually.

Returns
integer
In Skript since
2.10
ID
ExprDisplayBrightness
View 3 examples
set sky light override of the last spawned text display to 7
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}

Display Glow Color Override

  • expressions
  • Skript 2.10
[the] glow[ing] colo[u]r[s] override[s] [of %entities%]%entities%'[s] glow[ing] colo[u]r[s] override[s]

Returns or changes the glowing color override of displays.

This overrides whatever color is already set for the scoreboard team of the displays.

Returns
colour
In Skript since
2.10
ID
ExprDisplayGlowOverride
View example
set glow color override of the last spawned text display to blue

Display Height/Width

  • expressions
  • Skript 2.10
[the] display (height|width) [of %entities%]%entities%'[s] display (height|width)

Returns or changes the height or width of displays.

The rendering culling bounding box spans horizontally width/2 from entity position, which determines the point at which the display will be frustum culled (no longer rendered because the game determines you are no longer able to see it).

If set to 0, no culling will occur on both the vertical and horizontal directions. Default is 0.0.

Returns
number
In Skript since
2.10
ID
ExprDisplayHeightWidth
View example
set display height of the last spawned text display to 2.5

Display Interpolation Delay/Duration

  • expressions
  • Skript 2.10
[the] interpolation (delay|duration)[s] [of %entities%]%entities%'[s] interpolation (delay|duration)[s]

Returns or changes the interpolation delay/duration of displays.

Interpolation duration is the amount of time a display will take to interpolate, or shift, between its current state and a new state.

Interpolation delay is the amount of ticks before client-side interpolation will commence.Setting to 0 seconds will make it immediate.

Resetting either value will return that value to 0.

Returns
time span
In Skript since
2.10
ID
ExprDisplayInterpolation
View example
set interpolation delay of the last spawned text display to 2 ticks

Display Rotation

  • expressions
[the] (left|right) [transformation] rotation[s] of %entities%%entities%'[s] (left|right) [transformation] rotation[s]

No matching entry in Skript's documentation.

Returns
quaternion
ID
ExprDisplayRotation

Display Shadow Radius/Strength

  • expressions
  • Skript 2.10
[the] shadow (radius|strength) [of %entities%]%entities%'[s] shadow (radius|strength)

Returns or changes the shadow radius/strength of displays.

Returns
number
In Skript since
2.10
ID
ExprDisplayShadow
View example
set shadow radius of the last spawned text display to 1.75

Display Teleport Duration

  • expressions
  • Skript 2.10
[the] teleport[ation] duration[s] [of %entities%]%entities%'[s] teleport[ation] duration[s]

The teleport duration of displays is the amount of time it takes to get between locations.

0 means that updates are applied immediately.

1 means that the display entity will move from current position to the updated one over one tick.

Higher values spread the movement over multiple ticks. Max of 59 ticks.

Returns
time span
Requires
Spigot 1.20.4+
In Skript since
2.10
ID
ExprDisplayTeleportationDuration
View example
set teleport duration of the last spawned text display to 2 ticks
teleport last spawned text display to {_location}
wait 2 ticks
message "display entity has arrived at %{_location}%"

Display Transformation Scale/Translation

  • expressions
  • Skript 2.10
[the] (display|[display] transformation) (scale|translation)[s] of %entities%%entities%'[s] (display|[display] transformation) (scale|translation)[s]

Returns or changes the transformation scale or translation of displays.

Returns
vector
In Skript since
2.10
ID
ExprDisplayTransformationScaleTranslation
View example
set transformation translation of display to vector from -0.5, -0.5, -0.5 # Center the display in the same position as a block

Display View Range

  • expressions
  • Skript 2.10
[the] view range [of %entities%]%entities%'[s] view range

Returns or changes the view range of displays.

Default value is 1.0. This value is then multiplied by 64 and the player's entity view distance setting to determine the actual range.

For example, a player with 150% entity view distance will see a block display with a view range of 1.2 at 1.2 * 64 * 150% = 115.2 blocks away.

Returns
number
In Skript since
2.10
ID
ExprDisplayViewRange
View example
set view range of the last spawned text display to 2.9

Distance

  • expressions
  • Skript 1.0
[the] distance between %location% and %location%

The distance between two points.

Returns
number
In Skript since
1.0
ID
ExprDistance
View example
if the distance between the player and {home::%uuid of player%} is smaller than 20:
	message "You're very close to your home!"

Dropped Item Owner

  • expressions
  • Skript 2.11
[the] uuid of [the] [dropped] item owner [of %entities%][the] [dropped] item owner's uuid [of %entities%]

The uuid of the owner of the dropped item.

Setting the owner of a dropped item means only that entity or player can pick it up.

Dropping an item does not automatically make the entity or player the owner.

Returns
uuid
In Skript since
2.11
ID
ExprItemOwner
View example
	set the uuid of the dropped item owner of last dropped item to player
	if the uuid of the dropped item owner of last dropped item is uuid of player:

Dropped Item Thrower

  • expressions
  • Skript 2.11
[the] uuid of [the] [dropped] item thrower [of %entities%][the] [dropped] item thrower's uuid [of %entities%]

The uuid of the entity or player that threw/dropped the dropped item.

Returns
uuid
In Skript since
2.11
ID
ExprItemThrower
View 2 examples
set the uuid of the dropped item thrower of {_dropped item} to player
if the uuid of the dropped item thrower of {_dropped item} is uuid of player:
clear the item thrower of {_dropped item}

Drops

  • expressions
  • Skript 1.0
[the] drops

This expression only works in death and harvest events.

In a death event, will hold the drops of the dying creature.

Drops can be prevented by removing them with "remove ... from drops", e.g. "remove all pickaxes from the drops", or "clear drops" if you don't want any drops at all.

Returns
item type
In Skript since
1.0
ID
ExprDrops
View 2 examples
clear drops
remove 4 planks from the drops

Drops Of Block

  • expressions
  • Skript 2.5.1
[(all|the|all [of] the)] drops of %blocks% [(using|with) %item type% [(as %entity%)]]%blocks%'s drops [(using|with) %item type% [(as %entity%)]]

A list of the items that will drop when a block is broken.

Returns
item type
Requires
Minecraft 1.15+ ('as %entity%')
In Skript since
2.5.1
ID
ExprDropsOfBlock
View example
on break of block:
	give drops of block using player's tool to player

Elements

  • expressions
  • Skript 2.0, 2.7
[the] (first|last) element [out] (of|in) %objects%[the] (first|last) %integer% elements [out] (of|in) %objects%[a] random element [out] (of|in) %objects%%integer% random [distinct] elements [out] (of|in) %objects%[the] %integer%(st|nd|rd|th) [[to] last] element [out] (of|in) %objects%[the] elements (from|between) %integer% (to|and) %integer% [out] (of|in) %objects%

The first, last, range or a random element of a set, e.g. a list variable, or a queue.

Asking for elements from a queue will also remove them from the queue, see the new queue expression for more information.

See also: random expression

Returns
object
In Skript since
2.0, 2.7 (relative to last element), 2.8.0 (range of elements)
ID
ExprElement
View 7 examples
broadcast the first 3 elements of {top players::*}
set {_last} to last element of {top players::*}
set {_random player} to random element out of all 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}

Enchant Item

  • expressions
  • Skript 2.5
[the] enchant[ed] item

The enchant item in an enchant prepare event or enchant event.

It can be modified, but enchantments will still be applied in the enchant event.

Returns
item type
In Skript since
2.5
ID
ExprEnchantItem
View 2 examples
on enchant:
	set the enchanted item to a diamond chestplate
on enchant prepare:
	set the enchant item to a wooden sword

Enchanting Experience Cost

  • expressions
  • Skript 2.5
[the] [displayed] ([e]xp[erience]|enchanting) cost

The cost of enchanting in an enchant event.

This is number that was displayed in the enchantment table, not the actual number of levels removed.

Returns
integer
In Skript since
2.5
ID
ExprEnchantingExpCost
View example
on enchant:
	send "Cost: %the displayed enchanting cost%" to player

Enchantment Bonus

  • expressions
  • Skript 2.5
[the] enchant[ment] bonus

The enchantment bonus in an enchant prepare event. This represents the number of bookshelves affecting/surrounding the enchantment table.

Returns
integer
In Skript since
2.5
ID
ExprEnchantmentBonus
View example
on enchant:
	send "There are %enchantment bonus% bookshelves surrounding this enchantment table!" to player

Enchantment Hint

  • expressions
  • Skript 2.16
[the] enchant[ment] hint

The enchantment hint in an enchant event.

This is the enchantment that was shown to the player when they hovered over the enchantment offer that they eventually selected.

In Skript since
2.16
ID
ExprEnchantmentHint
View example
on enchant:
	send "You got at least %the enchantment hint%!"

Enchantment Level

  • expressions
  • Skript 2.0
[the] [enchant[ment]] level[s] of %enchantments% (on|of) %item types%[the] %enchantments% [enchant[ment]] level[s] (on|of) %item types%%item types%'[s] %enchantments% [enchant[ment]] level[s]%item types%'[s] [enchant[ment]] level[s] of %enchantments%

The level of a particular enchantment on an item.

Returns
integer
In Skript since
2.0
ID
ExprEnchantmentLevel
View example
player's tool is a sword of sharpness:
	message "You have a sword of sharpness %level of sharpness of the player's tool% equipped"

Enchantment Offer

  • expressions
  • Skript 2.5
[all [[of] the]|the] enchant[ment] offersenchant[ment] offer[s] %integers%[the] %integer%(st|nd|rd|th) enchant[ment] offer

The enchantment offer in enchant prepare events.

In Skript since
2.5
ID
ExprEnchantmentOffer
View example
on enchant prepare:
	send "Your enchantment offers are: %the enchantment offers%" to player

Enchantment Offer Cost

  • expressions
  • Skript 2.5
[the] [enchant[ment]] cost of %enchantment offers%%enchantment offers%'[s] [enchant[ment]] cost

The cost of an enchantment offer. This is displayed to the right of an enchantment offer.

If the cost is changed, it will always be at least 1.

This changes how many levels are required to enchant, but does not change the number of levels removed.

To change the number of levels removed, use the enchant event.

Returns
integer
In Skript since
2.5
ID
ExprEnchantmentOfferCost
View example
set cost of enchantment offer 1 to 50

Ender Chest

  • expressions
  • Skript 2.0
[the] ender[ ]chest[s] of %players%%players%'[s] ender[ ]chest[s]

The ender chest of a player.

Returns
inventory
In Skript since
2.0
ID
ExprEnderChest
View example
open the player's ender chest to the player

Enderman Carrying BlockData

  • expressions
  • Skript 2.11
[the] carr(ied|ying) block[[ ]data] of %living entities%%living entities%'[s] carr(ied|ying) block[[ ]data]

The block data an enderman is carrying.

Custom attributes such as NBT or names do not transfer over.

Blocks, blockdatas and items are acceptable objects to change the carrying block.

Returns
block data
In Skript since
2.11
ID
ExprCarryingBlockData
View 5 examples
broadcast the carrying blockdata of last spawned enderman
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}

Entities

  • expressions
  • Skript 1.2.1, 2.5
(all [[of] the]|the) %entity types% [(in|of) (world[s] %worlds%|%chunks%)](all [[of] the]|the) entities of type[s] %entity types% [(in|of) (world[s] %worlds%|%chunks%)](all [[of] the]|the) %entity types% (within|[with]in radius) %number% [(block[s]|met(er|re)[s])] (of|around) %location%(all [[of] the]|the) entities of type[s] %entity types% in radius %number% (of|around) %location%(all [[of] the]|the) %entity types% within %location% and %location%%plural entity types%

All entities in all worlds, in a specific world, in a chunk, in a radius around a certain location or within two locations. e.g. all players, all creepers in the player's world, or players in radius 100 of the player.

Returns
entity
In Skript since
1.2.1, 2.5 (chunks), 2.10 (within)
ID
ExprEntities
View 6 examples
kill all creepers in the player's world
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 within {_corner::1} and {_corner::2}}

Entity AI

  • expressions
  • Skript 2.5
[the] (ai|artificial intelligence) of %living entities%%living entities%'[s] (ai|artificial intelligence)

Returns whether an entity has AI.

Returns
boolean
In Skript since
2.5
ID
ExprAI
View example
set artificial intelligence of target entity to false

Entity Attribute

  • expressions
  • Skript 2.5, 2.6.1
[the] %attribute type% [(total|final|modified)] attribute [value] of %entities%%entities%'[s] %attribute type% [(total|final|modified)] attribute [value]

The numerical value of an entity's particular attribute.

Note that the movement speed attribute cannot be reliably used for players. For that purpose, use the speed expression instead.

Resetting an entity's attribute is only available in Minecraft 1.11 and above.

Returns
number
In Skript since
2.5, 2.6.1 (final attribute value)
ID
ExprEntityAttribute
View example
on damage of player:
	send "You are wounded!" to victim
	set victim's attack speed attribute to 2

Entity Fire Burn Duration

  • expressions
  • Skript 2.7, 2.10
[the] [max[imum]] (burn[ing]|fire) (time|duration) of %entities%%entities%'[s] [max[imum]] (burn[ing]|fire) (time|duration)

How much time an entity will be burning for.

Returns
time span
In Skript since
2.7, 2.10 (maximum)
ID
ExprFireTicks
View 2 examples
send "You will stop burning in %fire time of player%"
send the max burn time of target

Entity Owner

  • expressions
  • Skript 2.5
[the] (owner|tamer) of %living entities%%living entities%'[s] (owner|tamer)

The owner of a tameable entity (i.e. horse or wolf).

In Skript since
2.5
ID
ExprEntityOwner
View example
	set owner of last spawned wolf to player
	if the owner of last spawned wolf is player:

Entity Size

  • expressions
  • Skript 2.11
[the] entity size of %living entities%%living entities%'[s] entity size

Changes the entity size of slimes and phantoms. This is not the same as changing the scale attribute of an entity.

When changing the size of a slime, its health is fully resorted and will have changes done to its max health, movement speed and attack damage.

The default minecraft size of a slime is anywhere between 0 and 2, with a maximum of 126.

The default minecraft size of a phantom is 0 with a maximum size of 64.

Returns
integer
In Skript since
2.11
ID
ExprEntitySize
View example
spawn a slime at player:
	set entity size of event-entity to 5
	set name of event-entity to "King Slime Jorg"

Entity Snapshot

  • expressions
  • Skript 2.10
[the] entity snapshot of %entities/entity types%%entities/entity types%'[s] entity snapshot

Returns the entity snapshot of a provided entity, which includes all the data associated with it (name, health, attributes, etc.) at the time this expression is used.

Individual attributes of a snapshot cannot be modified or retrieved.

Requires
Minecraft 1.20.2+
In Skript since
2.10
ID
ExprEntitySnapshot
View example
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
spawn {_snapshot} at location(0, 0, 0)

Entity Sound

  • expressions
  • Skript 2.10
[the] (damage|hurt) sound[s] of %living entities%%living entities%'[s] (damage|hurt) sound[s][the] death sound[s] of %living entities%%living entities%'[s] death sound[s][the] [(tall|high)|(low|normal)] fall damage sound[s] [from [[a] height [of]] %number%] of %living entities%%living entities%'[s] [(tall|high)|(low|normal)] fall [damage] sound[s] [from [[a] height [of]] %number%][the] swim[ming] sound[s] of %living entities%%living entities%'[s] swim[ming] sound[s][the] [(fast|speedy)] splash sound[s] of %living entities%%living entities%'[s] [(fast|speedy)] splash sound[s][the] eat[ing] sound[s] of %living entities% [(with|using|[while] eating [a]) %item type%]%living entities%'[s] eat[ing] sound[s][the] drink[ing] sound[s] of %living entities% [(with|using|[while] drinking [a]) %item type%]%living entities%'[s] drink[ing] sound[s][the] ambient sound[s] of %living entities%%living entities%'[s] ambient sound[s]

Gets the sound that a given entity will make in a specific scenario.

Returns
text
Requires
Spigot 1.19.2+
In Skript since
2.10
ID
ExprEntitySound
View 2 examples
play sound (hurt sound of player) at player
set {_sounds::*} to death sounds of (all mobs in radius 10 of player)

Entity Storage Entity Count

  • expressions
  • Skript 2.11
[the] [max[imum]] [stored] entity count [of %blocks%]%blocks%'[s] [max[imum]] [stored] entity count

The current number of entities stored inside an entity block storage (i.e. beehive).

The maximum amount of entities an entity block storage can hold.

Returns
integer
In Skript since
2.11
ID
ExprEntityStorageEntityCount
View 2 examples
broadcast the stored entity count of {_beehive}
set the maximum entity count of {_beehive} to 20

Entity/Player/World from UUID

  • expressions
  • Skript 2.11
(offline player|player|world|entit(y|ies))[s] from %uuids%

Get an entity, player, offline player or world from a UUID.

Unloaded entities or players that are offline (when using 'player from %uuid%') will return nothing.

Returns
object
In Skript since
2.11
ID
ExprFromUUID
View 4 examples
set {_player} to player from "a0789aeb-7b46-43f6-86fb-cb671fed5775" parsed as uuid
set {_offline player} to offline player from {_some uuid}
set {_entity} to entity from {_some uuid}
set {_world} to world from {_some uuid}

Equippable Component

  • expressions
  • Skript 2.13
[the] equippable component[s] of %slots/item types/items%%slots/item types/items%'[s] equippable component[s]

The equippable component of an item. Any changes made to the equippable component will be present on the item.

NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.

Requires
Minecraft 1.21.2+
In Skript since
2.13
ID
ExprEquippableComponent
View 3 examples
set {_component} to the equippable component of {_item}
set the equipment slot of {_component} to helmet slot
clear the equippable component of {_item}
reset the equippable component of {_item}

Equippable Component - Allowed Entities

  • expressions
  • Skript 2.13
[the] allowed entities [of %equippable components%]%equippable components%'[s] allowed entities

The entities allowed to wear the item.

NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.

Requires
Minecraft 1.21.2+
In Skript since
2.13
ID
ExprEquipCompEntities
View 2 examples
set the allowed entities of {_item} to a zombie and a skeleton
set {_component} to the equippable component of {_item}
clear the allowed entities of {_component}

Equippable Component - Camera Overlay

  • expressions
  • Skript 2.13
[the] camera overlay [of %equippable components%]%equippable components%'[s] camera overlay

The camera overlay for the player when the item is equipped.

Example: The jack-o'-lantern view when having a jack-o'-lantern equipped as a helmet.

The camera overlay is represented as a namespaced key.

A namespaced key can be formatted as 'namespace:id' or 'id'. It can only contain one ':' to separate the namespace and the id. Only alphanumeric characters, periods, underscores, and dashes can be used.

NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.

Returns
text
Requires
Minecraft 1.21.2+
In Skript since
2.13
ID
ExprEquipCompCameraOverlay
View 2 examples
set the camera overlay of {_item} to "custom_overlay"
set {_component} to the equippable component of {_item}
set the camera overlay of {_component} to "custom_overlay"

Equippable Component - Equip Sound

  • expressions
  • Skript 2.13
[the] equip sound [of %equippable components%]%equippable components%'[s] equip sound

The sound to be played when the item is equipped.

NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.

Returns
text
Requires
Minecraft 1.21.2+
In Skript since
2.13
ID
ExprEquipCompEquipSound
View 2 examples
set the equip sound of {_item} to "entity.experience_orb.pickup"
set {_component} to the equippable component of {_item}
set the equip sound of {_component} to "block.note_block.pling"

Equippable Component - Equipment Slot

  • expressions
  • Skript 2.13
[the] equipment slot [of %equippable components%]%equippable components%'[s] equipment slot

The equipment slot an item can be equipped to.

NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.

Requires
Minecraft 1.21.2+
In Skript since
2.13
ID
ExprEquipCompSlot
View 2 examples
set the equipment slot of {_item} to chest slot
set {_component} to the equippable component of {_item}
set the equipment slot of {_component} to boots slot

Equippable Component - Model

  • expressions
  • Skript 2.13
[the] equipped (model|asset) (key|id) [of %equippable components%]%equippable components%'[s] equipped (model|asset) (key|id)

The model of the item when equipped.

The model key is represented as a namespaced key.

A namespaced key can be formatted as 'namespace:id' or 'id'. It can only contain one ':' to separate the namespace and the id. Only alphanumeric characters, periods, underscores, and dashes can be used.

NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.

Returns
text
Requires
Minecraft 1.21.2+
In Skript since
2.13
ID
ExprEquipCompModel
View 2 examples
set the equipped model key of {_item} to "custom_model"
set {_component} to the equippable component of {_item}
set the equipped model id of {_component} to "custom_model"

Equippable Component - Shear Sound

  • expressions
  • Skript 2.13
[the] shear[ed [off]] sound [of %equippable components%]%equippable components%'[s] shear[ed [off]] sound

The sound to be played when the item is sheared off of an entity.

NOTE: Equippable component elements are experimental. Thus, they are subject to change and may not work as intended.

Returns
text
Requires
Minecraft 1.21.6+
In Skript since
2.13
ID
ExprEquipCompShearSound
View 2 examples
set the shear sound of {_item} to "entity.experience_orb.pickup"
set {_component} to the equippable component of {_item}
set the shear sound of {_component} to "block.note_block.pling"

Event Entity

  • expressions
the <.+>event-<.+>

No matching entry in Skript's documentation.

Returns
object
ID
ExprEventEntity

Event Entity Bare

  • expressions
<.+>

No matching entry in Skript's documentation.

Returns
object
ID
ExprEventEntityBare

Exact Item

  • expressions
  • Skript 2.12
[the] exact item[s] of %blocks%%blocks%'[s] exact item[s]

Get an exact item representation of a block, carrying over any data. For example, using this expression on a chest block with items stored inside will return a chest item with the exact same items in its inventory as the chest block.

Returns
item
In Skript since
2.12
ID
ExprExactItem
View example
set {_item} to exact item of block at location(0, 0, 0)

Except

  • expressions
  • Skript 2.12
%objects% (except|excluding|not including) %objects%

Filter a list by providing objects to be excluded.

Returns
object
In Skript since
2.12
ID
ExprExcept
View 2 examples
spawn zombie at location(0, 0, 0):
	hide entity from all players except {_player}
set {_items::*} to a copper ingot, an iron ingot and a gold ingot
set {_except::*} to {_items::*} excluding copper ingot

Exhaustion

  • expressions
  • Skript 2.2-dev35
[the] exhaustion of %players%%players%'[s] exhaustion

The exhaustion of a player. This is mainly used to determine the rate of hunger depletion.

Returns
number
In Skript since
2.2-dev35
ID
ExprExhaustion
View example
set exhaustion of all players to 1

Experience

  • expressions
  • Skript 2.1, 2.5.3
[the] (spawned|dropped|) [e]xp[erience] [orb[s]]

How much experience was spawned in an experience spawn or block break event. Can be changed.

Returns
experience
In Skript since
2.1, 2.5.3 (block break event), 2.7 (experience change event), 2.10 (breeding, fishing)
ID
ExprExperience
View 5 examples
on experience spawn:
	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

Experience Cooldown Change Reason

  • expressions
  • Skript 2.10
[the] (experience|[e]xp) cooldown change (reason|cause|type)

The experience change reason within an experience cooldown change event.

In Skript since
2.10
ID
ExprExperienceCooldownChangeReason
View example
on player experience cooldown change:
	if xp cooldown change reason is plugin:
		#Changed by a plugin
	else if xp cooldown change reason is orb pickup:
		#Changed by picking up xp orb

Experience Pickup Cooldown

  • expressions
  • Skript 2.10
[the] (experience|[e]xp) [pickup|collection] cooldown of %players%%players%'[s] (experience|[e]xp) [pickup|collection] cooldown

The experience cooldown of a player.

Experience cooldown is how long until a player can pick up another orb of experience.

The cooldown of a player must be 0 to pick up another orb of experience.

Returns
time span
In Skript since
2.10
ID
ExprExperienceCooldown
View 3 examples
send experience cooldown of player
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

Exploded Blocks

  • expressions
  • Skript 2.5, 2.8.6
[the] exploded blocks

Get all the blocks that were destroyed in an explode event. Supports add/remove/set/clear/delete blocks.

Returns
block
In Skript since
2.5, 2.8.6 (modify blocks)
ID
ExprExplodedBlocks
View 5 examples
on explode:
	loop exploded blocks:
		add loop-block to {exploded::blocks::*}
on explode:
	loop exploded blocks:
		if loop-block is grass:
			remove loop-block from exploded 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

Explosion Block Yield

  • expressions
  • Skript 2.5
[the] [explosion['s]] block (yield|amount)[the] percentage of blocks dropped

The percentage of exploded blocks dropped in an explosion event.

When changing the yield, a value greater than 1 will function the same as using 1.

Attempting to change the yield to a value less than 0 will have no effect.

Returns
number
In Skript since
2.5
ID
ExprExplosionBlockYield
View example
on explode:
	set the explosion's block yield to 10%

Explosion Yield

  • expressions
  • Skript 2.5
[the] explosion (yield|radius|size)[the] (yield|radius|size) of [the] explosion

The yield of the explosion in an explosion prime event. This is how big the explosion is.

When changing the yield, values less than 0 will be ignored.

Read this wiki page for more information

Returns
number
In Skript since
2.5
ID
ExprExplosionYield
View example
on explosion prime:
	set the yield of the explosion to 10

Explosive Yield

  • expressions
  • Skript 2.5, 2.11
[the] explosive (yield|radius|size|power) of %entities%%entities%'[s] explosive (yield|radius|size|power)

The yield of an explosive (creeper, ghast, primed tnt, fireball, etc.). This is how big of an explosion is caused by the entity.

Read this wiki page for more information.

The yield of ghasts can only be set to between 0 and 127.

Returns
number
In Skript since
2.5, 2.11 (ghasts)
ID
ExprExplosiveYield
View example
on spawn of a creeper:
	set the explosive yield of the event-entity to 10

Facing

  • expressions
  • Skript 1.4
[the] (horizontal|) facing of %living entities/blocks%%living entities/blocks%'[s] (horizontal|) facing

The facing of an entity or block, i.e. exactly north, south, east, west, up or down (unlike direction which is the exact direction, e.g. '0.5 south and 0.7 east')

Returns
direction
In Skript since
1.4
ID
ExprFacing
View example
# makes a bridge
loop blocks from the block below the player in the horizontal facing of the player:
	set loop-block to cobblestone

Fall Distance

  • expressions
  • Skript 2.5
[the] fall[en] (distance|height) of %entities%%entities%'[s] fall[en] (distance|height)

The distance an entity has fallen for.

Returns
number
In Skript since
2.5
ID
ExprFallDistance
View 2 examples
set all entities' fall distance to 10
on damage:
	send "%victim's fall distance%" to victim

Fertilized Blocks

  • expressions
  • Skript 2.5
[all] [the] fertilized blocks

The blocks fertilized in block fertilize events.

Returns
block
Requires
Minecraft 1.13 or newer
In Skript since
2.5
ID
ExprFertilizedBlocks
View example
the fertilized blocks

Filter

  • expressions
  • Skript 2.2-dev36, 2.10
%objects% (where|that match) [<.+>]%objects% (where|that match) (<.+>)

Filters a list based on a condition.

For example, if you ran 'broadcast "something" and "something else" where [string input is "something"]',

only "something" would be broadcast as it is the only string that matched the condition.

Returns
object
In Skript since
2.2-dev36, 2.10 (parenthesis pattern)
ID
ExprFilter
View 2 examples
send "congrats on being staff!" to all players where [player input has permission "staff"]
loop (all blocks in radius 5 of player) where [block input is not air]:

Final Damage

  • expressions
  • Skript 2.2-dev19
[the] final damage

How much damage is done in a damage event, considering all types of damage reduction. Can NOT be changed.

Returns
number
In Skript since
2.2-dev19
ID
ExprFinalDamage
View example
send "%final damage%" to victim

Firework Effect

  • expressions
  • Skript 2.4
(|flickering|trailing|flickering trailing|trailing flickering) %firework type% [firework [effect]] colo[u]red %colours%(|flickering|trailing|flickering trailing|trailing flickering) %firework type% [firework [effect]] colo[u]red %colours% fad(e|ing) [to] %colours%

Represents a 'firework effect' which can be used in the launch firework effect.

In Skript since
2.4
ID
ExprFireworkEffect
View 3 examples
launch flickering trailing burst firework colored blue and green at player
launch trailing flickering star colored purple, yellow, blue, green and red fading to pink at target entity
launch ball large colored red, purple and white fading to light green and black at player's location with duration 1

First Empty Slot in Inventory

  • expressions
  • Skript 2.12
[the] first empty slot[s] (in|of) %inventories%%inventories%'[s] first empty slot[s]

Returns the first empty slot in an inventory. If no empty slot is found, it returns nothing.

Returns
slot
In Skript since
2.12
ID
ExprFirstEmptySlot
View 2 examples
set the first empty slot in player's inventory to 5 diamonds
if the first empty slot in player's inventory is not set:
	message "No empty slot available in your inventory!" to player

Fishing Approach Angle

  • expressions
  • Skript 2.10
(min[imum]|max[imum]) fish[ing] approach[ing] angle

Returns the angle at which the fish will approach the fishing hook, after the wait time.

The angle is in degrees, with 0 being positive Z, 90 being negative X, 180 being negative Z, and 270 being positive X.

By default, returns a value between 0 and 360 degrees.

Returns
number
In Skript since
2.10
ID
ExprFishingApproachAngle
View example
on fish approach:
	if any:
		maximum fishing approach angle is bigger than 300.5 degrees
		min fishing approach angle is smaller than 59.5 degrees
	then:
		cancel event

Fishing Bite Time

  • expressions
  • Skript 2.10
fish[ing] bit(e|ing) [wait] time

Returns the time it takes a fish to bite the fishing hook, after it started approaching the hook.

May return a timespan of 0 seconds. If modifying the value, it should be at least 1 tick.

Returns
time span
In Skript since
2.10
ID
ExprFishingBiteTime
View example
on fish approach:
	set fishing bite time to 5 seconds

Fishing Hook

  • expressions
  • Skript 2.10
[the] fish[ing] (hook|bobber)

The fishing hook in a fishing event.

Returns
entity
In Skript since
2.10
ID
ExprFishingHook
View example
on fish line cast:
	wait a second
	teleport player to fishing hook

Fishing Hooked Entity

  • expressions
  • Skript 2.10
[the] hook[ed] entity

Returns the hooked entity in the hooked event.

Returns
entity
In Skript since
2.10
ID
ExprFishingHookEntity
View example
on entity hooked:
	if hooked entity is a player:
		teleport hooked entity to player

Fishing Wait Time

  • expressions
  • Skript 2.10
(min[imum]|max[imum]) fish[ing] wait[ing] time

Returns the minimum and/or maximum waiting time of the fishing hook.

Default minimum value is 5 seconds and maximum is 30 seconds, before lure is applied.

Returns
time span
In Skript since
2.10
ID
ExprFishingWaitTime
View example
on fishing line cast:
	set min fish waiting time to 10 seconds
	set max fishing waiting time to 20 seconds

Flight Mode

  • expressions
  • Skript 2.2-dev34
[the] fl(y[ing]|ight) (mode|state) of %players%%players%'[s] fl(y[ing]|ight) (mode|state)

Whether the player(s) are allowed to fly. Use Make Fly effect to force player(s) to fly.

Returns
boolean
In Skript since
2.2-dev34
ID
ExprFlightMode
View 2 examples
set flight mode of player to true
send "%flying state of all players%"

Food Level

  • expressions
  • Skript 1.0
[the] (food|hunger)[[ ](level|met(er|re)|bar)] [of %players%]%players%'[s] (food|hunger)[[ ](level|met(er|re)|bar)]

The food level of a player from 0 to 10. Has several aliases: food/hunger level/meter/bar.

Returns
number
In Skript since
1.0
ID
ExprFoodLevel
View example
set the player's food level to 10

Formatted Date

  • expressions
  • Skript 2.2-dev31, 2.7
%dates% formatted [human-readable] [(with|as) %text%][human-readable] formatted %dates% [(with|as) %text%]

Converts date to human-readable text format. By default, 'yyyy-MM-dd HH:mm:ss z' (e.g. '2018-03-30 16:03:12 +01') will be used. For reference, see this Wikipedia article.

Returns
text
In Skript since
2.2-dev31, 2.7 (support variables in format)
ID
ExprFormatDate
View example
command /date:
	trigger:
		send "Full date: %now formatted human-readable%" to sender
		send "Short date: %now formatted as "yyyy-MM-dd"%" to sender

Former/Future State

  • expressions
  • Skript 1.1
[the] (former|past|old) [state] [of] %objects%%objects% before [the event][the] (future|to-be|new) [state] [of] %objects%%objects%(-to-be| after[(wards| the event)])

Represents the value of an expression before an event happened or the value it will have directly after the event, e.g. the old or new level respectively in a level change event.

Note: The past, future and present states of an expression are sometimes called 'time states' of an expression.

Note 2: If you don't specify whether to use the past or future state of an expression that has different values, its default value will be used which is usually the value after the event.

Returns
object
In Skript since
1.1
ID
ExprTimeState
View 3 examples
on teleport:
	former world was "world_nether" # or 'world was'
	world will be "world" # or 'world after the event is'
on tool change:
	past tool is an axe
	the tool after the event will be air
on weather change:
	set {weather::%world%::old} to past weather
	set {weather::%world%::current} to the new weather

Free / Max / Total Memory

  • expressions
  • Skript 2.8.0
[the] [server] (free|max[imum]|total) (memory|ram)

The free, max or total memory of the server in Megabytes.

Returns
number
In Skript since
2.8.0
ID
ExprMemory
View example
while player is online:
	send action bar "Memory left: %free memory%/%max memory%MB" to player
	wait 5 ticks

Freeze Time

  • expressions
  • Skript 2.7
[the] freeze time of %entities%%entities%'[s] freeze time

How much time an entity has been in powdered snow for.

Returns
time span
In Skript since
2.7
ID
ExprFreezeTicks
View example
player's freeze time is less than 3 seconds:
	send "you're about to freeze!" to the player

Function

  • expressions
  • Skript 2.10
[the] function[s] [named] %texts% [(from|in) %script%]

Obtain a function by name, which can be executed.

Returns
function
In Skript since
2.10
ID
ExprFunction
View 2 examples
set {_function} to the function named "myFunction"
run {_function} with arguments 13 and true

Furnace Event Items

  • expressions
  • Skript 2.10
[the] (smelted item|result[ item])[the] extracted item[s][the] smelting item[the] burned (fuel|item)

Represents the different items in furnace events.

Only 'smelting item' can be changed.

Returns
item
In Skript since
2.10
ID
ExprFurnaceEventItems
View 4 examples
on furnace smelt:
	broadcast smelted item
	# Or 'result'
on furnace extract:
	broadcast extracted item
on fuel burn:
	broadcast burned fuel
on smelting start:
	broadcast smelting item
	clear smelting item

Furnace Slot

  • expressions
  • Skript 1.0, 2.8.0
[the] ((ore|input)|fuel|(result|output)) slot[s] [of %blocks%]%blocks%'[s] ((ore|input)|fuel|(result|output)) slot[s]

A slot of a furnace, i.e. either the ore, fuel or result slot.

Returns
item type
In Skript since
1.0, 2.8.0 (syntax rework)
ID
ExprFurnaceSlot
View 4 examples
set the fuel slot of the clicked block to a lava bucket
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

Furnace Times

  • expressions
  • Skript 2.10
[the] [furnace] cook[ing] time [of %blocks%]%blocks%'[s]cook[ing] time[the] [furnace] total cook[ing] time [of %blocks%]%blocks%'[s]total cook[ing] time[the] [furnace] fuel burn[ing] time [of %blocks%]%blocks%'[s]fuel burn[ing] time

The cook time, total cook time, and burn time of a furnace. Can be changed.

  • cook time: The amount of time an item has been smelting for.
  • total cook time: The amount of time required to finish smelting an item.
  • burn time: The amount of time left for the current fuel until consumption of another fuel item.
Returns
time span
In Skript since
2.10
ID
ExprFurnaceTime
View 4 examples
set the cooking time of {_block} to 10
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

Game Effects with Data

  • expressions
  • Skript 2.14
[record] song (of|using) %item type%[dispenser] black smoke effect [(in|with|using) [the] direction] %direction%[dispenser] white smoke effect [(in|with|using) [the] direction] %direction%%item type/block data% [foot]step[s] sound [effect]%item type/block data% (break|destroy) effect%item type/block data% (break|destroy) effect with sounddestroy progress effect on the %direction% [side|face]destroy progress effect on the %direction% [side|face] with sound%colour% [splash] potion break effect%colour% instant [splash] potion break effectcompost[er] [fill[ing]] (succe(ss|ed)|fail[ure|ed]) sound [effect]villager plant grow[th] effect [(with|using) %number% particles][fake] bone meal effect [(with|using) %number% particles](electric|lightning[ rod]|copper) spark effect [(in|using|along) the (x|y|z) axis]sculk (charge|spread) effect [(with|using) data %integer%]ender dragon egg teleport[ing] [to %vector%] effectshulker teleport[ing] [to %vector%] effectconsumable teleport[ing] [to %vector%] effectenderman teleport[ing] [to %vector%] effect[finish] brush[ing] %item type/block data% effecttrial spawner detect[ing|s] [%number%] player[s] effectominous trial spawner detect[ing|s] [%number%] player[s] effect[ominous] trial spawner spawn[ing] [mob] effect[ominous] trial spawner spawn[ing] [mob] effect with soundbee growth effect [(with|using) %number% particles][ominous] [trial] vault activate effect[ominous] [trial] vault deactivate effecttrial spawner become[ing] [not] ominous effect[ominous] trial spawner spawn[ing] item effectplace turtle egg effect [(with|using) %number% particles][mace] smash attack effect [(with|using) %number% particles]

Creates game effects that require some extra information, such as colors, particle counts, or block data.

Game effects consist of combinations particles and/or sounds that are used in Minecraft, such as the bone meal particles, the sound of footsteps on a specific block, or the particles and sound of breaking a splash potion.

Game effects not present here do not require data and can be found in the Game Effect type.

Data requirements vary from version to version, so these docs are only accurate for the most recent Minecraft version at time of release.

In Skript since
2.14
ID
ExprGameEffectWithData
View example
play compost success sound effect to player

Game Mode

  • expressions
  • Skript 1.0
[the] game[ ]mode of %players%%players%'[s] game[ ]mode

The gamemode of a player. See Gamemodes

Returns
game mode
In Skript since
1.0
ID
ExprGameMode
View 3 examples
player's gamemode is survival
set the player's gamemode to creative
set gamemode of player to adventure

Gamerule Value

  • expressions
  • Skript 2.5
[the] gamerule %gamerule% of %worlds%

The gamerule value of a world.

In Skript since
2.5
ID
ExprGameRule
View example
set the gamerule commandBlockOutput of world "world" to false

Gliding State

  • expressions
  • Skript 2.2-dev21
[the] (gliding|glider) [state] of %living entities%%living entities%'[s] (gliding|glider) [state]

Sets of gets gliding state of player. It allows you to set gliding state of entity even if they do not have an Elytra equipped.

Returns
boolean
In Skript since
2.2-dev21
ID
ExprGlidingState
View example
set gliding of player to off

Glowing

  • expressions
  • Skript 2.2-dev18
[the] glowing of %entities%%entities%'[s] glowing

Indicates if targeted entity is glowing (new 1.9 effect) or not. Glowing entities can be seen through walls.

Returns
boolean
In Skript since
2.2-dev18
ID
ExprGlowing
View example
set glowing of player to true

Gravity

  • expressions
  • Skript 2.2-dev21
[the] gravity of %entities%%entities%'[s] gravity

If entity is affected by gravity or not, i.e. if it has Minecraft 1.10+ NoGravity flag.

Returns
boolean
In Skript since
2.2-dev21
ID
ExprGravity
View example
set gravity of player off

Hanging Entity/Remover

  • expressions
  • Skript 2.6.2
[the] hanging (entity|remover)

Returns the hanging entity or remover in hanging break and place events.

Returns
entity
In Skript since
2.6.2
ID
ExprHanging
View example
on break of item frame:
	if item of hanging entity is diamond pickaxe:
		cancel event
		if hanging remover is a player:
			send "You can't break that item frame!" to hanging remover

Hash

  • expressions
  • Skript 2.0, 2.2-dev32
%texts% hash[ed] with (MD5|SHA-256|SHA-384|SHA-512)

Hashes the given text using the MD5 or SHA algorithms. Each algorithm is suitable for different use cases.

These hashing algorithms are not suitable for hashing passwords.

If handling passwords, use a hashing algorithm specifically designed for passwords.

MD5 is deprecated and may be removed in a future release. It is provided mostly for backwards compatibility, as it is outdated and not secure.

SHA is more secure, but is not suitable for hashing passwords (even with salting).

When hashing data, you must specify algorithms that will be used for security reasons!

Please note that a hash cannot be reversed under normal circumstances. You will not be able to get original value from a hash with Skript.

Returns
text
In Skript since
2.0, 2.2-dev32 (SHA-256 algorithm), 2.12 (SHA-384, SHA-512)
ID
ExprHash
View example
set {_hash} to "hello world" hashed with SHA-256

Hatching Entity Type

  • expressions
  • Skript 2.7
[the] hatching entity [type]

The type of the entity that will be hatched in a Player Egg Throw event.

In Skript since
2.7
ID
ExprHatchingType
View example
on player egg throw:
	set the hatching entity type to a primed tnt

Hatching Number

  • expressions
  • Skript 2.7
[the] hatching number

The number of entities that will be hatched in a Player Egg Throw event.

Please note that no more than 127 entities can be hatched at once.

Returns
integer
In Skript since
2.7
ID
ExprHatchingNumber
View example
on player egg throw:
	set the hatching number to 10

Head location

  • expressions
  • Skript 2.0
[the] (head|eye[s]) [location[s]] of %living entities%%living entities%'[s] (head|eye[s]) [location[s]]

The location of an entity's head, mostly useful for players and e.g. looping blocks in the player's line of sight.

Please note that this location is only accurate for entities whose head is exactly above their center, i.e. players, endermen, zombies, skeletons, etc., but not sheep, pigs or cows.

Returns
location
In Skript since
2.0
ID
ExprEyeLocation
View 3 examples
set the block at the player's head to air
set the block in front of the player's eyes to glass
loop blocks in front of the player's head:

Heal Amount

  • expressions
  • Skript 2.5.1
[the] heal[ing] amount

The amount of health healed in a heal event.

Returns
number
In Skript since
2.5.1
ID
ExprHealAmount
View example
on player healing:
	increase the heal amount by 2
	remove 0.5 from the healing amount

Heal Reason

  • expressions
  • Skript 2.5
[the] (regen|health regain|heal[ing]) (reason|cause)
In Skript since
2.5
ID
ExprHealReason
View example
on heal:
	heal reason is satiated
	send "You ate enough food and gained full health back!"

Health

  • expressions
  • Skript 1.0
[the] health of %living entities%%living entities%'[s] health

The health of a creature, e.g. a player, mob, villager, etc. The minimum value is 0, and the maximum is the creature's max health (e.g. 10 for players).

Returns
number
In Skript since
1.0
ID
ExprHealth
View example
message "You have %health% HP left."

Hex Code

  • expressions
  • Skript 2.14
[the] hex[adecimal] code[s] of %colours%%colours%'[s] hex[adecimal] code[s]

Returns the hexadecimal value representing the given color(s).

The hex value of a colour does not contain a leading #, just the RRGGBB value.

For those looking for hex values of numbers, see the asBase and fromBase functions.

Returns
text
In Skript since
2.14
ID
ExprHexCode
View example
send formatted "<#%hex code of rgb(100, 10, 10)%>darker red" to all players

Hidden Players

  • expressions
  • Skript 2.3
[(all [[of] the]|the)] hidden players (of|for) %players%[(all [[of] the]|the)] players hidden (from|for|by) %players%

The players hidden from a player that were hidden using the entity visibility effect.

Returns
player
In Skript since
2.3
ID
ExprHiddenPlayers
View example
message "&lt;light red&gt;You are currently hiding: &lt;light gray&gt;%hidden players of the player%"

Horse Domestication

  • expressions
  • Skript 2.10
[the] [max[imum]] domestication level of %living entities%%living entities%'[s] [max[imum]] domestication level

Gets and/or sets the (max) domestication of a horse.

The domestication of a horse is how close a horse is to becoming tame - the higher the domestication, the closer they are to becoming tame (must be between 1 and the max domestication level of the horse).

The max domestication of a horse is how long it will take for a horse to become tame (must be greater than 0).

Returns
integer
In Skript since
2.10
ID
ExprDomestication
View example
function domesticateAndTame(horse: entity, p: offline player, i: int = 10):
	add {_i} to domestication level of {_horse}
	if domestication level of {_horse} >= max domestication level of {_horse}:
		tame {_horse}
		set tamer of {_horse} to {_p}

Hostname

  • expressions
  • Skript 2.6.1
[the] (host|domain)[ ][name]

The hostname used by the connecting player to connect to the server in a connect event.

Returns
text
In Skript since
2.6.1
ID
ExprHostname
View example
on connect:
	hostname is "testers.example.com"
	send "Welcome back tester!"

Hotbar Button

  • expressions
  • Skript 2.5
[the] hotbar button

The hotbar button clicked in an inventory click event.

Returns
integer
In Skript since
2.5
ID
ExprHotbarButton
View example
on inventory click:
	send "You clicked the hotbar button %hotbar button%!"

Hotbar Slot

  • expressions
  • Skript 2.2-dev36
[the] [([currently] selected|current)] hotbar slot[s] [of %players%]%players%'[s] [([currently] selected|current)] hotbar slot[s]

The currently selected hotbar slot.

To retrieve its number use Slot Index expression.

Use future and past tense to grab the previous slot in an item change event, see example.

Returns
slot
In Skript since
2.2-dev36
ID
ExprHotbarSlot
View 4 examples
message "%player's current hotbar slot%"
set player's selected 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 selected hotbar slot was a diamond:
		set the currently selected hotbar slot to slot 5 of player

Hover List

  • expressions
  • Skript 2.3
[the] [custom] [player|server] (hover|sample) ([message] list|message)[the] [custom] player [hover|sample] list

The list when you hover on the player counts of the server in the server list.

This can be changed using texts or players in a server list ping event only. Adding players to the list means adding the name of the players.

And note that, for example if there are 5 online players (includes fake online count) in the server and the hover list is set to 3 values, Minecraft will show "... and 2 more ..." at end of the list.

Returns
text
In Skript since
2.3
ID
ExprHoverList
View example
on server list ping:
	clear the hover list
	add "&aWelcome to the &6Minecraft &aserver!" to the hover list
	add "" to the hover list # A blank line
	add "&cThere are &6%online player count% &conline players!" to the hover list

Humidity

  • expressions
  • Skript 2.2-dev35
[the] humidit(y|ies) of %blocks%%blocks%'[s] humidit(y|ies)

Humidity of given blocks.

Returns
number
In Skript since
2.2-dev35
ID
ExprHumidity
View example
set {_humidity} to event-block's humidity

Indices of List

  • expressions
  • Skript 2.4
[(the|all [[of] the])] (indexes|indices) of %objects%%objects%'[s] (indexes|indices)[sorted] (indices|indexes) of %objects% in (ascending|descending) order[sorted] %objects%'[s] (indices|indexes) in (ascending|descending) order

Returns all the indices of a list variable, optionally sorted by their values.

To sort the indices, all objects in the list must be comparable;

Otherwise, this expression will just return the unsorted indices.

Returns
text
In Skript since
2.4 (indices), 2.6.1 (sorting)
ID
ExprIndices
View example
set {l::*} to "some", "cool" and "values"
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

Indices of Value

  • expressions
  • Skript 2.1, 2.12
[the] [first|last|all] (position|positions|indices|index|indexes) of [[the] value] %texts% in %text%[the] [first|last|all] (position|positions) of [[the] value] %objects% in %objects%[the] [first|last|all] (index|indices|indexes) of [[the] value] %objects% in %objects%

Get the first, last or all positions of a character (or text) in another text using 'positions of %texts% in %text%'. Nothing is returned when the value does not occur in the text. Positions range from 1 to the length of the text (inclusive).

Using 'indices/positions of %objects% in %objects%', you can get the indices or positions of a list where the value at that index is the provided value. Indices are only supported for keyed expressions (e.g. variable lists) and will return the string indices of the given value. Positions can be used with any list and will return the numerical position of the value in the list, counting up from 1. Additionally, nothing is returned if the value is not found in the list.

Whether string comparison is case-sensitive or not can be configured in Skript's config file.

Returns
object
In Skript since
2.1, 2.12 (indices, positions of list)
ID
ExprIndicesOfValue
View 3 examples
set {_first} to the first position of "@" in the text argument
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

Infinity

  • expressions
  • Skript 2.2-dev32d
positive (infinity|โˆž) [value]โˆž [value]infinity valuevalue of [positive] (infinity|โˆž)

A number representing positive infinity.

Returns
number
In Skript since
2.2-dev32d
ID
LitInfinity
View example
if {_number} is infinity:

Initiator Inventory

  • expressions
  • Skript 2.8.0
[the] [event-]initiator[( |-)inventory]

Returns the initiator inventory in an on inventory item move event.

Returns
inventory
In Skript since
2.8.0
ID
ExprEvtInitiator
View example
on inventory item move:
	holder of event-initiator-inventory is a chest
	broadcast "Item transport happening at %location at holder of event-initiator-inventory%!"

Input

  • expressions
  • Skript 2.2-dev36, 2.9.0
input<.+> inputinput index

Represents the input in a filter expression or sort effect.

For example, if you ran 'broadcast "something" and "something else" where [input is "something"]

the condition would be checked twice, using "something" and "something else" as the inputs.

The 'input index' pattern can be used when acting on a variable to access the index of the input.

Returns
object
In Skript since
2.2-dev36, 2.9.0 (input index)
ID
ExprInput
View 2 examples
send "congrats on being staff!" to all players where [input has permission "staff"]
sort {_list::*} based on length of input index

Interaction Height/Width

  • expressions
  • Skript 2.14
[the] interaction (height|width)[s] of %entities%%entities%'[s] interaction (height|width)[s]

Returns the height or width of an interaction entity's hitbox. Both default to 1.

The width of the hitbox determines the x/z widths

Returns
number
In Skript since
2.14
ID
ExprInteractionDimensions
View 2 examples
set interaction height of last spawned interaction to 5.3
set interaction width of last spawned interaction to 2

Inventory

  • expressions
  • Skript 1.0
[the] inventor(y|ies) of %inventory holders/blocks/item types/items%%inventory holders/blocks/item types/items%'[s] inventor(y|ies)

The inventory of a block or player. You can usually omit this expression and can directly add or remove items to/from blocks or players.

Returns
inventory
In Skript since
1.0
ID
ExprInventory
View 3 examples
add a plank to the player's inventory
clear the player's inventory
remove 5 wool from the inventory of the clicked block

Inventory Action

  • expressions
  • Skript 2.2-dev16
[the] inventory action

The inventory action of an inventory event. Please click on the link for more information.

In Skript since
2.2-dev16
ID
ExprInventoryAction
View example
inventory action is pickup all

Inventory Close Reason

  • expressions
  • Skript 2.8.0
[the] inventory clos(e|ing) (reason|cause)

The inventory close reason of an inventory close event.

In Skript since
2.8.0
ID
ExprInventoryCloseReason
View example
on inventory close:
	inventory close reason is teleport
	send "Your inventory closed due to teleporting!" to player

Inventory Holder

  • expressions
[the] holder[s] of %inventories%%inventories%'[s] holder[s]

No matching entry in Skript's documentation.

ID
ExprInventoryHolder

Inventory Holder/Viewers/Rows/Slots

  • expressions
  • Skript 2.2-dev34, 2.5
([amount of] rows|[amount of] slots) of %inventories%%inventories%'[s] ([amount of] rows|[amount of] slots)

Gets the amount of rows/slots, viewers and holder of an inventory.

NOTE: 'Viewers' expression returns a list of players viewing the inventory. Note that a player is considered to be viewing their own inventory and internal crafting screen even when said inventory is not open.

Returns
integer
In Skript since
2.2-dev34, 2.5 (slots)
ID
ExprInventoryInfo
View 3 examples
event-inventory's amount of rows
holder of player's top inventory
{_inventory}'s viewers

Inventory Of Type

  • expressions
[a] [new] %inventory type% (named|with name) %text%[a] new %inventory type%

No matching entry in Skript's documentation.

Returns
inventory
ID
ExprInventoryOfType

Inventory Slot

  • expressions
  • Skript 2.2-dev24
[the] slot[s] %numbers% of %inventory%%inventory%'[s] slot[s] %numbers%

Represents a slot in an inventory. It can be used to change the item in an inventory too.

Returns
slot
In Skript since
2.2-dev24
ID
ExprInventorySlot
View example
if slot 0 of player is air:
	set slot 0 of player to 2 stones
	remove 1 stone from slot 0 of player
	add 2 stones to slot 0 of player
	clear slot 1 of player

Inverse Boolean

  • expressions
  • Skript 2.12
[the] (inverse|opposite)[s] of %booleans%

An expression to obtain the inverse value of a boolean

Returns
boolean
In Skript since
2.12
ID
ExprInverse
View example
set {_gravity} to inverse of player's flight mode

IP

  • expressions
  • Skript 1.4, 2.2-dev26
IP[s][( |-)address[es]] of %players%%players%'[s] IP[s][( |-)address[es]]IP[( |-)address]

The IP address of a player, or the connected player in a connect event, or the pinger in a server list ping event.

Returns
text
In Skript since
1.4, 2.2-dev26 (when used in connect event), 2.3 (when used in server list ping event)
ID
ExprIP
View 3 examples
ban the IP address of the player")
broadcast "Banned the IP %IP of player%"
on connect:
	log "[%now%] %player% (%ip%) is connected to the server."
on server list ping:
	send "%IP-address%" to the console

Item Amount

  • expressions
  • Skript 2.2-dev24
[the] item[[ ]stack] (amount|size|number) of %slots/item types/items%%slots/item types/items%'[s] item[[ ]stack] (amount|size|number)

The amount of an item stack.

Returns
integer
In Skript since
2.2-dev24
ID
ExprItemAmount
View example
send "You have got %item amount of player's tool% %player's tool% in your hand!" to player

Item Component - Copy

  • expressions
  • Skript 2.13
[the|a[n]] [item] component copy of %item components%[the] [item] component copies of %item components%

Grab a copy of an item component of an item. Any changes made to the copy will not be present on the item.

Requires
Minecraft 1.21.2+
In Skript since
2.13
ID
ExprItemCompCopy
View example
set {_component} to the item component copy of (the equippable component of {_item})

Item Cooldown

  • expressions
  • Skript 2.8.0
[the] [item] cooldown of %item types% for %players%%players%'[s] [item] cooldown for %item types%

Gets the current cooldown of a provided item for a player.

If the provided item has a cooldown group component specified the cooldown of the group will be prioritized.

Otherwise the cooldown of the item material will be used.

Returns
time span
Requires
MC 1.21.2 (cooldown group)
In Skript since
2.8.0, 2.12 (cooldown group)
ID
ExprItemCooldown
View example
on right click using stick:
	set item cooldown of player's tool for player to 1 minute
	set item cooldown of stone and grass for all players to 20 seconds
	reset item cooldown of cobblestone and dirt for all players

Item Display Transform

  • expressions
  • Skript 2.10
[the] item [display] transform[s] [of %entities%]%entities%'[s] item [display] transform[s]

Returns or changes the item display transform of item displays.

In Skript since
2.10
ID
ExprItemDisplayTransform
View 2 examples
set the item transform of the last spawned item display to first person left handed
set the item transform of the last spawned item display to no transform # Reset to default

Item Enchantments

  • expressions
  • Skript 2.2-dev36
[the] enchantments of %item types%%item types%'[s] enchantments

All the enchantments an item type has.

In Skript since
2.2-dev36
ID
ExprEnchantments
View example
clear enchantments of event-item

Item Flags

  • expressions
  • Skript 2.10
[the] item flags of %item types%%item types%'[s] item flags

The item flags of an item. Can be modified.

Returns
item flag
In Skript since
2.10
ID
ExprItemFlags
View 3 examples
set item flags of player's tool to hide enchants and hide attributes
add hide potion effects to item flags of player's held item
remove hide enchants from item flags of {legendary sword}

Item Model

  • expressions
  • Skript 2.17
[the] item model of %item types/slots%%item types/slots%'[s] item model

The item model of an item. Accepts a Namespaced Key which takes the form of "namespace:key", e.g. "minecraft:dirt". See this article for more detail.

Returns
text
In Skript since
2.17
ID
ExprItemModel
View 2 examples
set the item model of player's held item to "diamond"
set the item model of {_item} to "minecraft:dirt"

Item of an Entity

  • expressions
  • Skript 2.2-dev35, 2.2-dev36
[the] item [inside] of %entities%%entities%'[s] item [inside]

An item associated with an entity. For dropped item entities, it gets the item that was dropped.

For item frames, the item inside the frame is returned.

For throwable projectiles (snowballs, enderpearls etc.) or item displays, it gets the displayed item.

For arrows, it gets the item that will be picked up when retrieving the arrow. Note that setting the item may not change the displayed model, and that setting a spectral arrow to a non-spectral arrow or vice-versa will not affect the effects of the projectile.

Other entities do not have items associated with them.

Returns
slot
In Skript since
2.2-dev35, 2.2-dev36 (improved), 2.5.2 (throwable projectiles), 2.10 (item displays), 2.14.1 (arrows)
ID
ExprItemOfEntity
View 2 examples
item of event-entity
set the item inside of event-entity to a diamond sword named "Example"

Item Rarity

  • expressions
  • Skript 2.17
[the] item rarity of %item types/slots%%item types/slots%'[s] item rarity

The item rarity of an item.

In Skript since
2.17
ID
ExprItemRarity
View 3 examples
set the item rarity of player's tool to epic
set the item rarity of {_item} to uncommon
set {_rarity} to item rarity of player's held item

Item Unbreakable

  • expressions
unbreakable %item types%breakable %item types%

No matching entry in Skript's documentation.

Returns
item type
ID
ExprItemUnbreakable

Item with Custom Model Data

  • expressions
  • Skript 2.5
%item type% with [custom] model data %numbers/booleans/texts/colours%

Get an item with custom model data.

Returns
item type
Requires
Minecraft 1.21.4+ (boolean/string/color support)
In Skript since
2.5, 2.12 (boolean/string/color support)
ID
ExprItemWithCustomModelData
View 3 examples
give player a diamond sword with custom model data 2
set slot 1 of inventory of player to wooden hoe with custom model data 357
give player a diamond hoe with custom model data 2, true, true, "scythe", and rgb(0,0,100)

Item with Enchantment Glint

  • expressions
  • Skript 2.10
%item types% with[out] [enchant[ment]] glint

Get an item with or without enchantment glint.

Returns
item type
In Skript since
2.10
ID
ExprItemWithGlint
View 2 examples
set {_item with glint} to diamond with enchantment glint
set {_item without glint} to diamond without enchantment glint

Item with Item Flags

  • expressions
  • Skript 2.10, 2.11
%item types% with [the] item flag[s] %item flags%%item types% with [the] %item flags% item flag[s]%item types% with all [the] item flags

Creates a new item with the specified item flags.

Returns
item type
In Skript since
2.10, 2.11 (all itemflags)
ID
ExprItemWithItemFlags
View 4 examples
give player diamond sword with item flags hide enchants and hide attributes
set {_item} to player's tool with item flag hide additional tooltip
give player torch with hide placed on item flag
set {_item} to diamond sword with all item flags

Item With Item Model

  • expressions
%item types% with [an|the] [item] model %text%

No matching entry in Skript's documentation.

Returns
item type
ID
ExprItemWithItemModel

Item with Lore

  • expressions
  • Skript 2.3
%item type% with [a|the] lore %texts%

Returns a copy of an item with with new lore.

If passing multiple components, each with be a line of lore.

Returns
item type
In Skript since
2.3
ID
ExprItemWithLore
View example
set {_item} to stone with lore "line 1" and "line 2"
give {_item} to player

Item with Tooltip

  • expressions
  • Skript 2.11
%item types% with [entire|additional] tool[ ]tip[s]%item types% without [entire|additional] tool[ ]tip[s]

Get an item with or without entire/additional tooltip.

If changing the 'entire' tooltip of an item, nothing will show up when a player hovers over it.

If changing the 'additional' tooltip, only specific parts (which change per item) will be hidden.

Returns
item type
Requires
Minecraft 1.20.5+
In Skript since
2.11
ID
ExprItemWithTooltip
View 2 examples
set {_item with additional tooltip} to diamond with additional tooltip
set {_item without entire tooltip} to diamond without entire tooltip

Items

  • expressions
  • Skript 1.0 pre-5
[all [[of] the]|the] block[[ ]type]severy block[[ ]type][all [[of] the]|the|every] item[s] of type[s] %item types%[all [[of] the]|the|every] block[s] of type[s] %item types%

Items or blocks of a specific type, useful for looping.

Returns
item type
In Skript since
1.0 pre-5
ID
ExprItems
View 2 examples
loop tag values of tag "diamond_ores" and tag values of tag "oak_logs":
	block contains loop-item
	message "Theres at least one %loop-item% in this block"
drop all blocks at the player # drops one of every block at the player

Items In

  • expressions
  • Skript 2.0, 2.8.0
[all [[of] the]] items ([with]in|of|contained in|out of) [inventor(y|ies)] %inventories%all [[of] the] %item types% ([with]in|of|contained in|out of) [inventor(y|ies)] %inventories%

All items or specific type(s) of items in an inventory. Useful for looping or storing in a list variable.

Please note that the positions of the items in the inventory are not saved, only their order is preserved.

Returns
item type
In Skript since
2.0, 2.8.0 (specific types of items)
ID
ExprItemsIn
View 2 examples
loop all items in the player's inventory:
	loop-item is enchanted
	remove loop-item from the player
set {inventory::%uuid of player%::*} to items in the player's inventory

Join & Split

  • expressions
  • Skript 2.1, 2.5.2
(concat[enate]|join) %texts% [(with|using|by) [[the] delimiter] %text%]split %text% (at|using|by) [[the] delimiter] %text% [with case sensitivity] [without [the] trailing [empty] (string|text)]%text% split (at|using|by) [[the] delimiter] %text% [with case sensitivity] [without [the] trailing [empty] (string|text)]regex split %text% (at|using|by) [[the] delimiter] %text% [without [the] trailing [empty] (string|text)]regex %text% split (at|using|by) [[the] delimiter] %text% [without [the] trailing [empty] (string|text)]

Joins several texts with a common delimiter (e.g. ", "), or splits a text into multiple texts at a given delimiter.

Returns
text
In Skript since
2.1, 2.5.2 (regex support), 2.7 (case sensitivity), 2.10 (without trailing string)
ID
ExprJoinSplit
View 2 examples
message "Online players: %join all players' names with "" | ""%" # %all players% would use the default "x, y, and z"
set {_s::*} to the string argument split at ","

Join Message

  • expressions
  • Skript 1.4.9
[the] (join|log[ ]in)( |-)message

The message sent to all online players when a player joins the server.

Returns
text
In Skript since
1.4.9
ID
ExprJoinMessage
View 2 examples
on first join:
	set the join message to "Welcome %player% to our awesome server!"
on join:
	player has played before
	set the join message to "Welcome back, %player%!"

Key Of Boss Bar

  • expressions
  • Skript 2.16
[the] boss[ ]bar (key|id) of %boss bars%%boss bars%'[s] boss[ ]bar (key|id)

Returns the key of a keyed boss bar.

Does not return anything for normal boss bars.

Returns
text
In Skript since
2.16
ID
ExprKeyOfBossBar
View example
broadcast the boss bar key of {_mybar}

Keyed

  • expressions
  • Skript 2.12
keyed %objects%

This expression is used to explicitly pass the keys of an expression alongside its values.

For example, when setting a list variable or passing an expression to a function.

Returns
object
In Skript since
2.12
ID
ExprKeyed
View 3 examples
set {_first::foo} to "value1"
set {_first::bar} to "value2"
set {_second::*} to keyed {_first::*}
# {_second::foo} is "value1" and {_second::bar} is "value2"
function indices(objects: objects) returns strings:
	return indices of {_objects::*}

on load:
	set {_list::foo} to "value1"
	set {_list::bar} to "value2"
	set {_list::baz} to "value3"

	broadcast indices({_list::*}) # "1", "2", "3"
	broadcast indices(keyed {_list::*}) # "foo", "bar", "baz"
function plusOne(numbers: numbers) returns numbers:
	loop {_numbers::*}:
		set {_numbers::%loop-index%} to loop-value + 1
	return {_numbers::*}

on load:
	set {_numbers::foo} to 1
	set {_numbers::bar} to 2
	set {_numbers::baz} to 3

	set {_result::*} to keyed plusOne(keyed {_numbers::*})
	# {_result::foo} is 2, {_result::bar} is 3, {_result::baz} is 4

Kick Message

  • expressions
  • Skript 2.0 beta 9
[the] kick( |-)message

The message sent to all online players when a player is kicked from server.

Returns
text
In Skript since
2.0 beta 9
ID
ExprKickMessage
View example
on kick:
	set the kick message to "%player% was booted from the server! They won't be missed..."

Language

  • expressions
  • Skript 2.3
[the] [([currently] selected|current)] [game] (language|locale) [setting] of %players%%players%'[s] [([currently] selected|current)] [game] (language|locale) [setting]

Currently selected game language of a player. The value of the language is not defined properly.

The vanilla Minecraft client will use lowercase language / country pairs separated by an underscore, but custom resource packs may use any format they wish.

Returns
text
In Skript since
2.3
ID
ExprLanguage
View example
message player's current language

Last Attacker

  • expressions
  • Skript 2.5.1
[the] last attacker of %entity%%entity%'[s] last attacker

The last block or entity that attacked an entity.

Returns
entity
In Skript since
2.5.1
ID
ExprLastAttacker
View example
send "%last attacker of event-entity%"

Last Caught Errors

  • expressions
  • Skript 2.12
[the] last caught [run[ ]time] errors

Gets the last caught runtime errors from a 'catch runtime errors' section.

Returns
text
In Skript since
2.12
ID
ExprCaughtErrors
View example
catch runtime errors:
	set worldborder center of {_border} to location(0, 0, NaN value)
if last caught runtime errors contains "Your location can't have a NaN value as one of its components":
	set worldborder center of {_border} to location(0, 0, 0)

Last Damage

  • expressions
  • Skript 2.5.1
[the] last damage [taken] (of|by) %living entities%%living entities%'[s] last damage [taken]

The last damage that was done to an entity. Note that changing it doesn't deal more/less damage.

Returns
number
In Skript since
2.5.1
ID
ExprLastDamage
View example
set last damage of event-entity to 2

Last Damage Cause

  • expressions
  • Skript 2.2-Fixes-V10
[the] last damage (cause|reason|type) of %living entities%%living entities%'[s] last damage (cause|reason|type)

Cause of last damage done to an entity

In Skript since
2.2-Fixes-V10
ID
ExprLastDamageCause
View example
set last damage cause of event-entity to fire tick

Last Death Location

  • expressions
  • Skript 2.10
[the] [last] death location[s] of %offline players%%offline players%'[s] [last] death location[s]

Gets the last death location of a player, or offline player, if available.

Can also be set, reset, and deleted if the player is online.

Returns
location
In Skript since
2.10
ID
ExprLastDeathLocation
View 2 examples
set {_loc} to the last death location of player
teleport player to last death location of (random element out of all players)

Last Dropped Item

  • expressions
[the] [last[ly]] dropped item

No matching entry in Skript's documentation.

Returns
entity
ID
ExprLastDroppedItem

Last Interaction Date

  • expressions
  • Skript 2.14
[the] last (date|time)[s] [that|when] %entities% (were|was) (attacked|interacted with|clicked [on])

Returns the date of the last attack (left click), or interaction (right click) on an interaction entity

Using 'clicked on' will return the latest attack or interaction, whichever was more recent.

Returns
date
In Skript since
2.14
ID
ExprLastInteractionDate
View example
if the last time {_interaction} was clicked < 5 seconds ago

Last Interaction Player

  • expressions
  • Skript 2.14
[the] last player[s] to (attack|interact with|click [on]) %entities%[the] last player[s] (who|that) (attacked|interacted with|clicked [on]) %entities%

Returns the last player to attack (left click), or interact (right click) with an interaction entity.

If 'click on' or 'clicked on' are used, this will return the last player to either attack or interact with the entity whichever was most recent.

In Skript since
2.14
ID
ExprLastInteractionPlayer
View 2 examples
kill the last player that attacked the last spawned interaction
feed the last player who interacted with {_i}

Last Loaded Server Icon

  • expressions
  • Skript 2.3
[the] [last[ly]] loaded server icon

Returns the last loaded server icon with the load server icon effect.

In Skript since
2.3
ID
ExprLastLoadedServerIcon
View example
set {server-icon} to the last loaded server icon

Last Resource Pack Response

  • expressions
  • Skript 2.4
[the] [last] resource pack response[s] of %players%%players%'[s] [last] resource pack response[s]

Returns the last resource pack response received from a player.

In Skript since
2.4
ID
ExprLastResourcePackResponse
View example
if player's last resource pack response is deny or download fail:

Last Spawned Entity

  • expressions
  • Skript 1.3
[the] [last[ly]] (spawned|shot) %entity type%[the] [last[ly]] (launched|deployed) firework[the] [last[ly]] (created|struck) lightning

Holds the entity that was spawned most recently with the spawn effect (section), dropped with the drop effect, shot with the shoot effect or created with the lightning effect. Please note that even though you can spawn multiple mobs simultaneously (e.g. with 'spawn 5 creepers'), only the last spawned mob is saved and can be used. If you spawn an entity, shoot a projectile and drop an item you can however access all them together.

Returns
entity
In Skript since
1.3 (spawned entity), 2.0 (shot entity), 2.2-dev26 (dropped item), 2.7 (struck lightning, firework)
ID
ExprLastSpawnedEntity
View 5 examples
spawn a priest
set {healer::%spawned priest%} to true
shoot an arrow from the last spawned entity
ignite the shot projectile
drop a diamond sword
push last dropped item upwards
teleport player to last struck lightning
delete last launched firework

Last/First Login Time

  • expressions
  • Skript 2.5
[the] (last|first) login of %offline players%%offline players%'[s] (last|first) login

When a player last/first logged in the server. 'last login' requires paper to get the last login, otherwise it will get the last time they were seen on the server.

Returns
date
In Skript since
2.5
ID
ExprLastLoginTime
View example
command /onlinefor:
	trigger:
		send "You have been online for %difference between player's last login and now%."
		send "You first joined the server %difference between player's first login and now% ago."

Leash Holder

  • expressions
  • Skript 2.3, 2.16
[the] leash holder[s] of %entities%%entities%'[s] leash holder[s]

The leash holder of an entity.

Returns
entity
In Skript since
2.3, 2.16 (all leashable entities)
ID
ExprLeashHolder
View example
set {_example} to the leash holder of the target mob

Length

  • expressions
  • Skript 2.1
[the] length of %texts%%texts%'[s] length

The length of a text, in number of characters.

Returns
integer
In Skript since
2.1
ID
ExprLength
View example
set {_l} to length of the string argument

Level

  • expressions
[the] [xp|exp[erience]] level [of %players%]%players%'[s] [xp|exp[erience]] level

The experience level of a player.

Returns
integer
In Skript since
unknown (before 2.1), 2.13.2 (allow player default)
ID
ExprLevel
View 3 examples
reduce the victim's level by 1
set the player's level to 0
on level change:
	set {_diff} to future xp level - past exp level
	broadcast "%player%'s level changed by %{_diff}%!"

Level Progress

  • expressions
  • Skript 2.0
[the] level progress of %players%%players%'[s] level progress

The player's progress in reaching the next level, this represents the experience bar in the game. Please note that this value is between 0 and 1 (e.g. 0.5 = half experience bar).

Changing this value can cause the player's level to change if the resulting level progess is negative or larger than 1, e.g. increase the player's level progress by 0.5 will make the player gain a level if their progress was more than 50%.

Returns
number
In Skript since
2.0
ID
ExprLevelProgress
View example
# use the exp bar as mana
on rightclick with a blaze rod:
	player's level progress is larger than 0.2
	shoot a fireball from the player
	reduce the player's level progress by 0.2
every 2 seconds:
	loop all players:
		level progress of loop-player is smaller than 0.9:
			increase level progress of the loop-player by 0.1
		else:
			set level progress of the loop-player to 0.99
on xp spawn:
	cancel event

Light Level

  • expressions
  • Skript 1.3.4
[(sky|sun|block)[ ]]light[ ]level [(of|%direction%) %location%]

Gets the light level at a certain location which ranges from 0 to 15.

It can be separated into sunlight (15 = direct sunlight, 1-14 = indirect) and block light (torches, glowstone, etc.). The total light level of a block is the maximum of the two different light types.

Returns
integer
In Skript since
1.3.4
ID
ExprLightLevel
View example
# set vampire players standing in bright sunlight on fire
every 5 seconds:
	loop all players:
		{vampire::%uuid of loop-player%} is true
		sunlight level at the loop-player is greater than 10
		ignite the loop-player for 5 seconds

Loaded Plugins

  • expressions
  • Skript 2.7
[(all [[of] the]|the)] [loaded] plugins

An expression to obtain a list of the names of the server's loaded plugins.

Returns
text
In Skript since
2.7
ID
ExprPlugins
View 2 examples
if the loaded plugins contains "Vault":
	broadcast "This server uses Vault plugin!"
send "Plugins (%size of loaded plugins%): %plugins%" to player

Location

  • expressions
  • Skript 2.0
[the] (location|position) %directions% [%location%]

The location where an event happened (e.g. at an entity or block), or a location relative to another (e.g. 1 meter above another location).

Returns
location
In Skript since
2.0
ID
ExprLocation
View 2 examples
drop 5 apples at the event-location # exactly the same as writing 'drop 5 apples'
set {_loc} to the location 1 meter above the player

Location

  • expressions
(location|position) of %location%%location%'[s] (location|position)

The location of a block or entity. This not only represents the x, y and z coordinates of the location but also includes the world and the direction an entity is looking (e.g. teleporting to a saved location will make the teleported entity face the same saved direction every time).

Please note that the location of an entity is at it's feet, use head location to get the location of the head.

Returns
location
ID
ExprLocationOf
View 2 examples
set {home::%uuid of player%} to the location of the player
message "You home was set to %player's location% in %player's world%."

Location At

  • expressions
  • Skript 2.0
[the] (location|position) [at] [(][x[ ][=[ ]]]%number%, [y[ ][=[ ]]]%number%, [and] [z[ ][=[ ]]]%number%[)] [[(in|of) [[the] world]] %world%]

Allows to create a location from three coordinates and a world.

Returns
location
In Skript since
2.0
ID
ExprLocationAt
View 2 examples
set {_loc} to the location at arg-1, arg-2, arg-3 of the world arg-4
distance between the player and the location (0, 0, 0) is less than 200

Location with Yaw/Pitch

  • expressions
  • Skript 2.15
%locations% with [a] (yaw|pitch) [of] %number%%locations% with [a] yaw [of] %number% and [a] pitch [of] %number%

Returns the given locations with the specified yaw and/or pitch.

Returns
location
In Skript since
2.15
ID
ExprWithYawPitch
View example
set {_location} to player's location with yaw 0 and pitch 0

Loop value

  • expressions
  • Skript 1.0, 2.8.0
[the] [current] loop-<.+>[the] next loop-<.+>[the] previous loop-<.+>[the] loop <(?:counter|iteration)(?:-\d+)?>

Returns the previous, current, or next looped value.

Returns
object
In Skript since
1.0, 2.8.0 (loop-counter), 2.10 (previous, next)
ID
ExprLoopValue
View 4 examples
# Countdown
loop 10 times:
	message "%11 - loop-number%"
	wait a second
# Generate a 10x10 floor made of randomly colored wool below 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% has $%loop-value%"
loop shuffled (integers between 0 and 8):
	if all:
		previous loop-value = 1
		loop-value = 4
		next loop-value = 8
	then:
		 kill all players

Loot

  • expressions
  • Skript 2.7
[the] loot

The loot that will be generated in a 'loot generate' event.

Returns
item
In Skript since
2.7
ID
ExprLoot
View example
on loot generate:
	chance of 10%
	add 64 diamonds to loot
	send "You hit the jackpot!!"

Loot Location of Loot Context

  • expressions
  • Skript 2.10
[the] loot[ing] [context] location [of %loot contexts%]%loot contexts%'[s] loot[ing] [context] location

Returns the loot location of a loot context.

Returns
location
In Skript since
2.10
ID
ExprLootContextLocation
View example
set {_player} to player
set {_context} to a loot context at player:
	if {_player} is in "world_nether":
		set loot location to location of last spawned pig
send loot location of {_context} to player

Loot of Loot Table

  • expressions
  • Skript 2.10
[the] loot of %loot tables% [(with|using) [[loot] context] %loot context%]%loot tables%'[s] loot [(with|using) [[loot] context] %loot context%]

Returns the items of a loot table using a loot context. Not specifying a loot context will use a loot context with a location at the world's origin.

Returns
item
In Skript since
2.10
ID
ExprLootItems
View 2 examples
set {_items::*} to loot of the loot table "minecraft:chests/simple_dungeon" with loot context {_context}
# this will set {_items::*} to the items that would be dropped from the simple dungeon loot table with the given loot context
give player loot of entity's loot table with loot context {_context}
# this will give the player the items that the entity would drop with the given loot context

Loot Table

  • expressions
  • Skript 2.10
[the] loot[ ]table[s] of %entities/blocks%%entities/blocks%'[s] loot[ ]table[s]

Returns the loot table of an entity or block.

Setting the loot table of a block will update the block state, and once opened will generate loot of the specified loot table. Please note that doing so may cause warnings in the console due to over-filling the chest.

Please note that resetting/deleting the loot table of an ENTITY will reset the entity's loot table to its default.

Returns
loot table
In Skript since
2.10
ID
ExprLootTable
View 2 examples
set loot table of event-entity to "minecraft:entities/ghast"
# this will set the loot table of the entity to a ghast's loot table, thus dropping ghast tears and gunpowder
set loot table of event-block to "minecraft:chests/simple_dungeon"

Loot Table from Key

  • expressions
  • Skript 2.10
[the] loot[ ]table[s] %texts%

Returns the loot table from a namespaced key.

Returns
loot table
In Skript since
2.10
ID
ExprLootTableFromString
View example
set {_table} to loot table "minecraft:chests/simple_dungeon"

Looted Entity of Loot Context

  • expressions
  • Skript 2.10
[the] looted entity [of %loot contexts%]%loot contexts%'[s] looted entity

Returns the looted entity of a loot context.

Returns
entity
In Skript since
2.10
ID
ExprLootContextEntity
View 2 examples
set {_entity} to looted entity of {_context}
set {_context} to a loot context at player:
	set loot luck value to 10
	set looter to player
	set looted entity to last spawned pig

Looter of Loot Context

  • expressions
  • Skript 2.10
[the] (looter|looting player) [of %loot contexts%]%loot contexts%'[s] (looter|looting player)

Returns the looter of a loot context. Note that setting the looter will read the looter's tool enchantments (e.g. looting) when generating loot.

Returns
player
In Skript since
2.10
ID
ExprLootContextLooter
View 2 examples
set {_killer} to looter of {_context}
set {_context} to a loot context at player:
	set loot luck value to 10
	set looter to player
	set looted entity to last spawned pig

Lore

  • expressions
  • Skript 2.1
[the] lore of %item type/slot%%item type/slot%'[s] lore[the] line %number% of [the] lore of %item type/slot%[the] line %number% of %item type/slot%'[s] lore[the] %number%(st|nd|rd|th) line of [the] lore of %item type/slot%[the] %number%(st|nd|rd|th) line of %item type/slot%'[s] lore

Returns the lore of an item.

In Skript since
2.1
ID
ExprLore
View example
set the 1st line of the item's lore to "<orange>Excalibur 2.0"

Love Time

  • expressions
  • Skript 2.10
[the] love[d] time of %living entities%%living entities%'[s] love[d] time

The amount of time the animals have been in love for. Using a value of 30 seconds is equivalent to using an item to breed them.

Only works on animals that can be bred and returns '0 seconds' for animals that can't be bred.

Returns
time span
In Skript since
2.10
ID
ExprLoveTime
View example
on right click:
	send "%event-entity% has been in love for %love time of event-entity% more than you!" to player

Lowest/Highest Solid Block

  • expressions
  • Skript 2.2-dev34, 2.9.0
[the] (highest|lowest) [solid] block[s] (at|of) %locations%

An expression to obtain the lowest or highest solid (impassable) block at a location.

Note that the y-coordinate of the location is not taken into account for this expression.

Returns
block
In Skript since
2.2-dev34, 2.9.0 (lowest solid block, 'non-air' option removed, additional syntax option)
ID
ExprLowestHighestSolidBlock
View 2 examples
teleport the player to the block above the highest block at the player
set the highest solid block at the player's location to the lowest solid block at the player's location

Luck of Loot Context

  • expressions
  • Skript 2.10
[the] loot[ing] [context] luck [value|factor] [of %loot contexts%]%loot contexts%'[s] loot[ing] [context] luck [value|factor]

Returns the luck of a loot context as a float. This represents the luck potion effect that an entity can have.

Returns
number
In Skript since
2.10
ID
ExprLootContextLuck
View 2 examples
set {_luck} to loot luck value of {_context}
set {_context} to a loot context at player:
	set loot luck value to 10
	set looter to player
	set looted entity to last spawned pig

Max Durability

  • expressions
  • Skript 2.5, 2.9.0
[the] max[imum] (durabilit(y|ies)|damage) of %item types/items/slots%%item types/items/slots%'[s] max[imum] (durabilit(y|ies)|damage)

The maximum durability of an item. Changing requires Minecraft 1.20.5+

Note: 'delete' will remove the max durability from the item (making it a non-damageable item). Delete requires Paper 1.21+

Returns
integer
Requires
Minecraft 1.20.5+ (custom amount)
In Skript since
2.5, 2.9.0 (change)
ID
ExprMaxDurability
View 6 examples
maximum durability of diamond sword
if max durability of player's tool is not 0: # Item is damageable
set max durability of player's tool to 5000
add 5 to max durability of player's tool
reset max durability of player's tool
delete max durability of player's tool

Max Health

  • expressions
  • Skript 2.0
[the] max[imum] health of %living entities%%living entities%'[s] max[imum] health

The maximum health of an entity, e.g. 10 for a player.

Returns
number
In Skript since
2.0
ID
ExprMaxHealth
View 2 examples
on join:
	set the maximum health of the player to 100
spawn a giant
set the last spawned entity's max health to 1000

Max Item Use Time

  • expressions
  • Skript 2.8.0
[the] max[imum] [item] us(e|age) (time|duration) of %items%%items%'[s] max[imum] [item] us(e|age) (time|duration)

Returns the max duration an item can be used for before the action completes. E.g. it takes 1.6 seconds to drink a potion, or 1.4 seconds to load an unenchanted crossbow.

Some items, like bows and shields, do not have a limit to their use. They will return 1 hour.

Returns
time span
In Skript since
2.8.0
ID
ExprMaxItemUseTime
View example
on right click:
	broadcast max usage duration of player's tool

Max Minecart Speed

  • expressions
  • Skript 2.5.1
[the] max[imum] minecart (speed|velocity) of %entities%%entities%'[s] max[imum] minecart (speed|velocity)

The maximum speed of a minecart.

Returns
number
In Skript since
2.5.1
ID
ExprMaxMinecartSpeed
View example
on right click on minecart:
	set max minecart speed of event-entity to 1

Max Players

  • expressions
  • Skript 2.3, 2.7
[the] [(real|default)|(fake|shown|displayed)] max[imum] player[s] [count|amount|number|size][the] [(real|default)|(fake|shown|displayed)] max[imum] (count|amount|number|size) of players

The count of max players. This can be changed in a server list ping event only.

'real max players' returns the real count of max players of the server and can be modified on Paper 1.16 or later.

Returns
integer
In Skript since
2.3, 2.7 (modify max real players)
ID
ExprMaxPlayers
View example
on server list ping:
	set the max players count to (online players count + 1)

Maximum Double Value

  • expressions
  • Skript 2.13
[the] max[imum] double value

A number representing the maximum value of a double number type.

Returns
number
In Skript since
2.13
ID
LitDoubleMaxValue
View example
if {_number} >= maximum double value:

Maximum Float Value

  • expressions
  • Skript 2.13
[the] max[imum] float value

A number representing the maximum value of a float number type.

Returns
number
In Skript since
2.13
ID
LitFloatMaxValue
View example
if {_number} >= maximum float value:

Maximum Freeze Time

  • expressions
  • Skript 2.7
[the] max[imum] freeze time of %entities%%entities%'[s] max[imum] freeze time

The maximum amount of time an entity can spend in powdered snow before taking damage.

Returns
time span
In Skript since
2.7
ID
ExprMaxFreezeTicks
View example
difference between player's freeze time and player's max freeze time is less than 1 second:
	send "you're about to freeze!" to the player

Maximum Integer Value

  • expressions
  • Skript 2.13
[the] max[imum] integer value

A number representing the maximum value of an integer number type.

Returns
integer
In Skript since
2.13
ID
LitIntMaxValue
View example
if {_number} >= maximum integer value:

Maximum Long Value

  • expressions
  • Skript 2.13
[the] max[imum] long value

A number representing the maximum value of a long number type.

Returns
integer
In Skript since
2.13
ID
LitLongMaxValue
View example
if {_number} >= maximum long value:

Maximum Stack Size

  • expressions
  • Skript 2.1, 2.10
[the] max[imum] stack[[ ]size] of %item types/inventories%%item types/inventories%'[s] max[imum] stack[[ ]size]

The maximum stack size of an item (e.g. 64 for torches, 16 for buckets, 1 for swords, etc.) or inventory.

In 1.20.5+, the maximum stack size of items can be changed to any integer from 1 to 99, and stacked up to the maximum stack size of the inventory they're in.

Returns
integer
Requires
Spigot 1.20.5+ (changeable)
In Skript since
2.1, 2.10 (changeable, inventories)
ID
ExprMaxStack
View 4 examples
send "You can hold %max stack size of player's tool% of %type of player's tool% in a slot." to player
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}

Me

  • expressions
  • Skript 2.1.1
memy[self]

A 'me' expression that can be used in players' effect commands only.

Returns
player
In Skript since
2.1.1
ID
ExprMe
View 3 examples
!heal me
!kick myself
!give a diamond axe to me

Mending Repair Amount

  • expressions
  • Skript 2.5.1
[the] [mending] repair amount

The number of durability points an item is to be repaired in a mending event.

Modifying the repair amount will affect how much experience is given to the player after mending.

Returns
integer
In Skript since
2.5.1
ID
ExprMendingRepairAmount
View example
on item mend:
	set the mending repair amount to 100

Message of the Day

  • expressions
  • Skript 2.3
[the] [default|shown|displayed] (MOTD|message of [the] day)

The message of the day in the server list.

This can be changed in a server list ping event only.

Use 'default MOTD' to obtain the default MOTD set through the server configuration. This cannot be changed.

Returns
text
In Skript since
2.3
ID
ExprMOTD
View example
on server ling ping:
	set the motd to "<red>Join our server today!"

Metadata

  • expressions
  • Skript 2.2-dev36, 2.10
metadata [(value|tag)[s]] %texts% of %entities/blocks/worlds%%entities/blocks/worlds%'[s] metadata [(value|tag)[s]] %texts%

Metadata is a way to store temporary data on entities, blocks and more that disappears after a server restart.

Returns
object
In Skript since
2.2-dev36, 2.10 (add, remove)
ID
ExprMetadata
View 3 examples
set metadata value "healer" of player to true
broadcast "%metadata value "healer" of player%"
clear metadata value "healer" of player

Middle of Location

  • expressions
  • Skript 2.6.1
[the] (middle|center) [point] of %location%%location%'[s] (middle|center) [point]

Returns the middle/center of a location. In other words, returns the middle of the X, Z coordinates and the floor value of the Y coordinate of a location.

Returns
location
In Skript since
2.6.1
ID
ExprMiddleOfLocation
View example
command /stuck:
	executable by: players
	trigger:
		teleport player to the center of player's location
		send "You're no longer stuck."

Midpoint

  • expressions
  • Skript 2.13
[the] mid[-]point (of|between) %location/vector% and %location/vector%

Get the midpoint between two vectors or two locations in the same world.

Returns
object
In Skript since
2.13
ID
ExprMidpoint
View 2 examples
set {_center} to the midpoint between location(0, 0, 0) and location(10, 10, 10)
set {_centerBlock} to the block at {_center}
set {_midpoint} to the mid-point of vector(20, 10, 5) and vector(3, 6, 9)

Minecart Derailed / Flying Velocity

  • expressions
  • Skript 2.5.1
[the] [minecart] (derailed|flying) velocity of %entities%%entities%'[s] [minecart] (derailed|flying) velocity

The velocity of a minecart as soon as it has been derailed or as soon as it starts flying.

Returns
vector
In Skript since
2.5.1
ID
ExprMinecartDerailedFlyingVelocity
View example
on right click on minecart:
	set derailed velocity of event-entity to vector 2, 10, 2

Minimum Double Value

  • expressions
  • Skript 2.13
[the] min[imum] double value

A number representing the minimum value of a double number type.

Returns
number
In Skript since
2.13
ID
LitDoubleMinValue
View example
if {_number} <= minimum double value:

Minimum Float Value

  • expressions
  • Skript 2.13
[the] min[imum] float value

A number representing the minimum value of a float number type.

Returns
number
In Skript since
2.13
ID
LitFloatMinValue
View example
if {_number} <= minimum float value:

Minimum Integer Value

  • expressions
  • Skript 2.13
[the] min[imum] integer value

A number representing the minimum value of an integer number type.

Returns
integer
In Skript since
2.13
ID
LitIntMinValue
View example
if {_number} <= minimum integer value:

Minimum Long Value

  • expressions
  • Skript 2.13
[the] min[imum] long value

A number representing the minimum value of a long number type.

Returns
integer
In Skript since
2.13
ID
LitLongMinValue
View example
if {_number} <= minimum long value:

Minimum/Maximum Enchantment Level

  • expressions
  • Skript 2.16
[the] ((max|min)[imum]|starting) enchant[ment] level [of %enchantments%]%enchantments%'[s] ((max|min)[imum]|starting) enchant[ment] level

The minimum or maximum allowed level in Minecraft of a particular enchantment.

The minimum starting level is 1 for all existing enchantments as of 26.1.2.

Returns
integer
In Skript since
2.16
ID
ExprMinMaxEnchantmentLevel
View 2 examples
set {_maximum} to the maximum enchantment level of sharpness
if the level of sharpness of the player's tool is greater than {_maximum}:
	send "<gold>Your tool's sharpness level was capped out at the maximum allowed level.</gold>"
	set the level of sharpness of the player's tool to {_maximum}
set {_min} to the minimum enchantment level of sharpness
set {_max} to the maximum enchantment level of sharpness
loop integers between {_min} and {_max}:
	set slot loop-counter of {_gui} to enchanted book named "Sharpness %loop-value%" with lore "<reset>Click to enchant!"

Moon Phase

  • expressions
  • Skript 2.7
[the] (lunar|moon) phase[s] of %worlds%%worlds%'[s] (lunar|moon) phase[s]

The current moon phase of a world.

Returns
moon phase
In Skript since
2.7
ID
ExprMoonPhase
View example
if moon phase of player's world is full moon:
	send "Watch for the wolves!"

Moved blocks

  • expressions
  • Skript 2.2-dev27
[the] moved blocks

Blocks which are moved in a piston event. Cannot be used outside of piston events.

Returns
block
In Skript since
2.2-dev27
ID
ExprPushedBlocks
View example
the moved blocks

Name

  • expressions
[the] name[s] of %objects%%objects%'[s] name[s]

Represents the Minecraft account name of a player, or the custom name of an item, entity, block, inventory, gamerule, world, script or function.

Players: The Minecraft account name of the player. Can't be changed.

Entities: The custom name of the entity. Can be changed. But for living entities, the players will have to target the entity to see its name tag. For non-living entities, the name will not be visible at all. To prevent this, use 'display name'.

Items: The custom name of the item (not the Minecraft locale name). Can be changed.

Inventories: The name/title of the inventory. Changing name of an inventory means opening the same inventory with the same contents but with a different name to its current viewers.

Gamerules: The name of the gamerule. Cannot be changed.

Worlds: The name of the world. Cannot be changed.

Scripts: The name of a script, excluding its file extension.

In Skript since
before 2.1, 2.2-dev20 (inventory name), 2.4 (non-living entity support, changeable inventory name), 2.7 (worlds)
ID
PropExprName
View 4 examples
on join:
	player has permission "name.red"
	set the player's display name to "&lt;red&gt;[admin] &lt;gold&gt;%name of player%"
set the name of the player's tool to "Legendary Sword of Awesomeness"

Name

  • expressions
[the] (display|nick|chat|custom)[ ]name[s] of %objects%%objects%'[s] (display|nick|chat|custom)[ ]name[s]

Represents the Minecraft account name of a player, or the custom name of an item, entity, block, inventory, gamerule, world, script or function.

Players: The Minecraft account name of the player. Can't be changed.

Entities: The custom name of the entity. Can be changed. But for living entities, the players will have to target the entity to see its name tag. For non-living entities, the name will not be visible at all. To prevent this, use 'display name'.

Items: The custom name of the item (not the Minecraft locale name). Can be changed.

Inventories: The name/title of the inventory. Changing name of an inventory means opening the same inventory with the same contents but with a different name to its current viewers.

Gamerules: The name of the gamerule. Cannot be changed.

Worlds: The name of the world. Cannot be changed.

Scripts: The name of a script, excluding its file extension.

In Skript since
before 2.1, 2.2-dev20 (inventory name), 2.4 (non-living entity support, changeable inventory name), 2.7 (worlds)
ID
PropExprName-display
View 4 examples
on join:
	player has permission "name.red"
	set the player's display name to "&lt;red&gt;[admin] &lt;gold&gt;%name of player%"
set the name of the player's tool to "Legendary Sword of Awesomeness"

Named Item/Inventory

  • expressions
  • Skript 2.0, 2.2-dev34
%item type% (named|with name[s]) %text%

Directly names an item/inventory, useful for defining a named item/inventory in a script. If you want to (re)name existing items/inventories you can either use this expression or use set name of <item/inventory> to <text>.

Returns
item type
In Skript since
2.0, 2.2-dev34 (inventories)
ID
ExprNamed
View 4 examples
give a diamond sword of sharpness 100 named "<gold>Excalibur" to the player
set tool of player to the player's tool named "<gold>Wand"
set the name of the player's tool to "<gold>Wand"
open hopper inventory named "Magic Hopper" to player

NaN

  • expressions
  • Skript 2.2-dev32d
NaN [value]value of NaN

A number representing an undefined value. NaN occurs as a result of illegal math, like dividing 0 by 0.

NaN is deliberately not equal to any other number, including itself.

Returns
number
In Skript since
2.2-dev32d
ID
LitNaN
View 2 examples
if {_number} is not {_number}:
if isNaN({_number}) is true:

Nearest Entity

  • expressions
  • Skript 2.7
[the] (nearest|closest) %entity types% [[relative] to %entity/location%][the] %entity types% (nearest|closest) [to %entity/location%]

Gets the entity nearest to a location or another entity.

Returns
entity
In Skript since
2.7
ID
ExprNearestEntity
View 4 examples
kill the nearest pig and cow relative to player
teleport player to the nearest cow relative to player
teleport player to the nearest entity relative to player
on click:
	kill nearest pig

Negative Infinity

  • expressions
  • Skript 2.2-dev32d
negative (infinity|โˆž) [value]-(infinity|โˆž) [value]value of negative (infinity|โˆž)

A number representing negative infinity.

Returns
number
In Skript since
2.2-dev32d
ID
LitNegativeInfinity
View example
if {_number} is -infinity:

New Line

  • expressions
  • Skript 2.5
nlnew[ ]lineline[ ]break

Returns a line break separator.

Returns
text
In Skript since
2.5
ID
LitNewLine
View example
send "Hello%nl%Goodbye!" to player

New Potion Effect

  • expressions
  • Skript 2.5.2
[a[n]] [ambient] potion effect of %potion effect type% [[of tier] %number%] [for %time span%][an] (infinite|permanent) [ambient] potion effect of %potion effect type% [[of tier] %number%][an] (infinite|permanent) [ambient] %potion effect type% [[of tier] %number%] [potion [effect]][a] potion effect [of %potion effect type%] (from|using|based on) %potion effect%

Create a new potion effect that can be applied to an entity or item type.

In Skript since
2.5.2, 2.14 (syntax changes, infinite duration support)
ID
ExprSecPotionEffect
View 5 examples
set {_potion} to a potion effect of speed 2 for 10 minutes:
	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
# creates a potion effect with the properties of an existing potion effect
set {_potion} to a potion effect of slowness based on the player's speed effect

New Potion Effect

  • expressions
  • Skript 2.5.2
%potion effect type% %integer%

Create a new potion effect that can be applied to an entity or item type.

In Skript since
2.5.2, 2.14 (syntax changes, infinite duration support)
ID
ExprSecPotionEffect-2
View 5 examples
set {_potion} to a potion effect of speed 2 for 10 minutes:
	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
# creates a potion effect with the properties of an existing potion effect
set {_potion} to a potion effect of slowness based on the player's speed effect

No Damage Ticks

  • expressions
  • Skript 2.5, 2.11
  • Deprecated
[the] (invulnerability|invincibility|no damage) tick[s] [of %living entities%]%living entities%'[s] (invulnerability|invincibility|no damage) tick[s]

The number of ticks that an entity is invulnerable to damage for.

Returns
integer
In Skript since
2.5, 2.11 (deprecated)
ID
ExprNoDamageTicks
View example
on damage:
	set victim's invulnerability ticks to 20 #Victim will not take damage for the next second

No Damage Time

  • expressions
  • Skript 2.11
[the] (invulnerability|invincibility|no damage) time[[ ]span] [of %living entities%]%living entities%'[s] (invulnerability|invincibility|no damage) time[[ ]span]

The amount of time an entity is invulnerable to any damage.

Returns
time span
In Skript since
2.11
ID
ExprNoDamageTime
View 2 examples
on damage:
	set victim's invulnerability time to 20 ticks #Victim will not take damage for the next second
if the no damage timespan of {_entity} is 0 seconds:
	set the invincibility time span of {_entity} to 1 minute

Node

  • expressions
  • Skript 2.10
[the] node %text% (of|in) %node/script%%node/script%'[s] node %text%[the] nodes (of|in) %nodes/scripts%%nodes/scripts%'[s] nodes

Returns a node inside a config (or another section-node).

Nodes in Skript configs are written in the format `key: value`.

Section nodes can contain other nodes.

Returns
node
In Skript since
2.10
ID
ExprNode
View 2 examples
set {_node} to node "language" in the skript config
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

Now

  • expressions
  • Skript 1.4
now

The current system time of the server. Use time to get the Minecraft time of a world.

Returns
date
In Skript since
1.4
ID
ExprNow
View example
broadcast "Current server time: %now%"

Number of Characters

  • expressions
  • Skript 2.5
number of upper[ ]case char(acters|s) in %text%number of lower[ ]case char(acters|s) in %text%number of digit char(acters|s) in %text%

The number of uppercase, lowercase, or digit characters in a string.

Returns
integer
In Skript since
2.5
ID
ExprNumberOfCharacters
View example
#Simple Chat Filter
on chat:
	if number of uppercase chars in message / length of message > 0.5
		cancel event
		send "&lt;red&gt;Your message has to many caps!" to player

Numbers

  • expressions
  • Skript 1.4.6
[(all [[of] the]|the)] (numbers|integers|decimals) (between|from) %number% (and|to) %number%

All numbers between two given numbers, useful for looping.

Use 'numbers' if your start is not an integer and you want to keep the fractional part of the start number constant, or use 'integers' if you only want to loop integers.

You may also use 'decimals' if you want to use the decimal precision of the start number.

You may want to use the 'times' expression instead, for instance 'loop 5 times:'

Returns
number
In Skript since
1.4.6 (integers & numbers), 2.5.1 (decimals)
ID
ExprNumbers
View 3 examples
loop numbers from 2.5 to 5.5: # loops 2.5, 3.5, 4.5, 5.5
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

Offline players

  • expressions
  • Skript 2.2-dev35
[(all [[of] the]|the)] offline[ ]players

All players that have ever joined the server. This includes the players currently online.

In Skript since
2.2-dev35
ID
ExprOfflinePlayers
View example
send "Size of all players who have joined the server: %size of all offline players%"

On-Screen Kick Message

  • expressions
  • Skript 2.12
[the] on-screen kick message

The kick message that is displayed on a player's screen when they are kicked.

Returns
text
In Skript since
2.12
ID
ExprOnScreenKickMessage
View example
on kick:
	set the on-screen kick message to "You've been booted!"

Online Player Count

  • expressions
  • Skript 2.3
[the] [((real|default)|(fake|shown|displayed))] [online] player (count|amount|number)[the] [((real|default)|(fake|shown|displayed))] (count|amount|number|size) of online players

The amount of online players. This can be changed in a server list ping event only to show fake online player amount.

real online player count always return the real count of online players and can't be changed.

Returns
integer
In Skript since
2.3
ID
ExprOnlinePlayersCount
View example
on server list ping:
	# This will make the max players count 5 if there are 4 players online.
	set the fake max players count to (online player count + 1)

Opened Inventory

  • expressions
  • Skript 2.2-dev24, 2.2-dev35
[the] (current|open|top) inventory [of %players%]%players%'[s] (current|open|top) inventory

Return the currently opened inventory of a player.

If no inventory is open, it returns the own player's crafting inventory.

Returns
inventory
In Skript since
2.2-dev24, 2.2-dev35 (Just 'current inventory' works in player events)
ID
ExprOpenedInventory
View example
set slot 1 of player's current inventory to diamond sword

Panda Gene

  • expressions
  • Skript 2.11
[the] (main|hidden) gene[s] of %living entities%%living entities%'[s] (main|hidden) gene[s]

The main or hidden gene of a panda.

Returns
gene
In Skript since
2.11
ID
ExprPandaGene
View example
if the main gene of last spawned panda is lazy:
	set the main gene of last spawned panda to playful

Parse

  • expressions
  • Skript 2.0
%text% parsed as [a[n]] <.+>

Parses text as a given type, or as a given pattern.

This expression can be used in two different ways: One which parses the entire text as a single instance of a type, e.g. as a number, and one that parses the text according to a pattern.

If the given text could not be parsed, this expression will return nothing and the parse error will be set if some information is available.

Some notes about parsing with a pattern:

- The pattern must be a Skript pattern, e.g. percent signs are used to define where to parse which types, e.g. put a %number% or %items% in the pattern if you expect a number or some items there.

- You have to save the expression's value in a list variable, e.g. set {parsed::*} to message parsed as "...".

- The list variable will contain the parsed values from all %types% in the pattern in order. If a type was plural, e.g. %items%, the variable's value at the respective index will be a list variable, e.g. the values will be stored in {parsed::1::*}, not {parsed::1}.

Returns
object
In Skript since
2.0
ID
ExprParse
View 2 examples
set {var} to line 1 parsed as number
on chat:
	set {var::*} to message parsed as "buying %items% for %money%"
	if parse error is set:
		message "%parse error%"
	else if {var::*} is set:
		cancel event
		remove {var::2} from the player's balance
		give {var::1::*} to the player

Parse

  • expressions
  • Skript 2.0
%text% parsed as "<.*>"

Parses text as a given type, or as a given pattern.

This expression can be used in two different ways: One which parses the entire text as a single instance of a type, e.g. as a number, and one that parses the text according to a pattern.

If the given text could not be parsed, this expression will return nothing and the parse error will be set if some information is available.

Some notes about parsing with a pattern:

- The pattern must be a Skript pattern, e.g. percent signs are used to define where to parse which types, e.g. put a %number% or %items% in the pattern if you expect a number or some items there.

- You have to save the expression's value in a list variable, e.g. set {parsed::*} to message parsed as "...".

- The list variable will contain the parsed values from all %types% in the pattern in order. If a type was plural, e.g. %items%, the variable's value at the respective index will be a list variable, e.g. the values will be stored in {parsed::1::*}, not {parsed::1}.

Returns
object
In Skript since
2.0
ID
ExprParse-pattern
View 2 examples
set {var} to line 1 parsed as number
on chat:
	set {var::*} to message parsed as "buying %items% for %money%"
	if parse error is set:
		message "%parse error%"
	else if {var::*} is set:
		cancel event
		remove {var::2} from the player's balance
		give {var::1::*} to the player

Parse Error

  • expressions
  • Skript 2.0
[the] [last] [parse] error

The error which caused the last parse operation to fail, which might not be set if a pattern was used and the pattern didn't match the provided text at all.

Returns
text
In Skript since
2.0
ID
ExprParseError
View example
set {var} to line 1 parsed as integer
if {var} is not set:
	parse error is set:
		message "<red>Line 1 is invalid: %last parse error%"
	else:
		message "<red>Please put an integer on line 1!"

Particle Count

  • expressions
  • Skript 2.14
[the] particle count of %particle effects%%particle effects%'[s] particle count

Sets how many particles to draw.

Particle count has an influence on how the 'offset' and 'extra' values of a particle apply.

Offsets are treated as distributions if particle count is greater than 0.

Offsets are treated as velocity or some other special behavior if particle count is 0.

This means that setting the particle count may change how your particle behaves. Be careful!

More detailed information on particle behavior can be found at Paper's particle documentation.

Returns
number
In Skript since
2.14
ID
ExprParticleCount
View example
draw 7 blue dust particles at player

Particle Distribution

  • expressions
  • Skript 2.14
[the] particle distribution of %particle effects%%particle effects%'[s] particle distribution

Determines the normal distribution that particles may be drawn within.

The distribution is defined by a vector of x, y, and z standard deviations.

Particles will be randomly drawn based on these values, clustering towards the center. 68% of particles will be within 1 standard deviation, 95% within 2, and 99.7% within three.

The area the particles will spawn in can be roughly estimated as being within 2 times the standard deviation in each axis.

For example, a distribution of 1, 2, and 1 would spawn particles within roughly 2 blocks on the x and z axes, and within 4 blocks on the y axis.

Please note that distributions only take effect if the particle count is greater than 0!

Particles with counts of 0 do not have distributions.

If the particle count is 0, the offset is treated differently depending on the particle.

More detailed information on particle behavior can be found at Paper's particle documentation.

Returns
vector
In Skript since
2.14
ID
ExprParticleDistribution
View example
set the particle distribution of {_my-particle} to vector(1, 2, 1)

Particle Offset

  • expressions
  • Skript 2.14
[the] particle offset of %particle effects%%particle effects%'[s] particle offset

Determines the offset value for a particle.

Offsets are treated as distributions if particle count is greater than 0.

Offsets are treated as velocity or some other special behavior if particle count is 0.

Setting distribution/velocity with this method may change the particle count to 1/0 respectively.

More detailed information on particle behavior can be found at Paper's particle documentation.

Returns
vector
In Skript since
2.14
ID
ExprParticleOffset
View example
set the particle offset of {_my-particle} to vector(1, 2, 1)

Particle Speed/Extra Value

  • expressions
  • Skript 2.14
[the] (particle speed [value]|extra value) of %particle effects%%particle effects%'[s] (particle speed [value]|extra value)

Determines the specific 'speed' or 'extra' value of a particle.

This value is used in different ways depending on the particle, but in general it:

* acts as the speed at which the particle moves if the particle count is greater than 0.

* acts as a multiplier to the particle's offset if the particle count is 0.

More detailed information on particle behavior can be found at Paper's particle documentation.

Returns
number
In Skript since
2.14
ID
ExprParticleSpeed
View 2 examples
set the extra value of {_my-flame-particle} to 2
set the particle speed of {_my-flame-particle} to 0

Particle with Offset/Distribution/Velocity

  • expressions
  • Skript 2.14
%particle effects% with [an] offset [of] %vector%%particle effects% with [a] distribution [of] %vector%%directional particle effects% with [a] velocity [of] %vector%

Applies a specific offset to a particle.

Offsets are treated as distributions if particle count is greater than 0.

Offsets are treated as velocity or some other special behavior if particle count is 0.

Setting distribution/velocity with this method may change the particle count to 1/0 respectively.

More detailed information on particle behavior can be found at Paper's particle documentation.

In Skript since
2.14
ID
ExprParticleWithOffset
View 2 examples
draw an electric spark particle with a velocity of vector(1,2,3) at player
draw 12 red dust particles with a distribution of vector(1,2,1) at player's head location

Particle with Speed/Extra Value

  • expressions
  • Skript 2.14
%particle effects% with ([a] particle speed [value]|[an] extra value) [of] %number%

Applies a specific 'speed' or 'extra' value to a particle.

This value is used in different ways depending on the particle, but in general it:

* acts as the speed at which the particle moves if the particle count is greater than 0.

* acts as a multiplier to the particle's offset if the particle count is 0.

More detailed information on particle behavior can be found at Paper's particle documentation.

In Skript since
2.14
ID
ExprParticleWithSpeed
View 2 examples
draw an electric spark particle with a particle speed of 0 at player
draw 12 red dust particles with an extra value of 0.4 at player's head location

Particles with Data

  • expressions
  • Skript 2.14
[%number%|a[n]] %colour% effect particle[s] (of|with) power %number%[%number%|a[n]] %colour% instant effect particle[s] (of|with) power %number%[%number%|a[n]] %colour% flash particle[s][%number%|a[n]] %colour% (potion|entity) effect particle[s][%number%|a[n]] %colour% tinted leaves particle[s][%number%|a[n]] %colour% dust particle[s] [of size %number%][%number%|a[n]] %colour% dust particle[s] [of size %number%] that transitions to %colour%[%number%|a[n]] %item type/block data% block particle[s][%number%|a[n]] %item type/block data% [block] crumble particle[s][%number%|a[n]] %item type/block data% [block] marker particle[s][%number%|a[n]] %item type/block data% dust pillar particle[s][%number%|a[n]] falling %item type/block data% dust particle[s][%number%|a[n]] %item type% item particle[s][%number%|a[n]] sculk charge particle[s] [with [a] roll angle [of] %number%][%number%|a[n]] shriek particle[s] [delayed by %time span%][%number%|a[n]] vibration particle[s] moving to[wards] %entity/location% [over [a duration of] %time span%][%number%|a[n]] %colour% trail particle[s] moving to[wards] %location% [over [a duration of] %time span%][%number%|a[n]] dragon breath particle[s] [of power %number%]

Creates particles that require some extra information, such as colors, locations, or block data.

Particles not present here do not require data and can be found in the Particle type.

Data requirements vary from version to version, so these docs are only accurate for the most recent Minecraft version at time of release.

For example, between 1.21.8 and 1.21.9, the 'flash' particle became colourable and now requires a colour data.

In Skript since
2.14
ID
ExprParticleWithData
View 2 examples
set {blood-effect} to a red dust particle of size 1
draw 3 blue trail particles moving to player's target over 3 seconds at player

Passenger

  • expressions
  • Skript 2.0, 2.2-dev26
[all [[of] the]|the] passenger[s] of %entities%%entities%'[s] passenger[s]

The passenger of a vehicle, or the rider of a mob.

For 1.11.2 and above, it returns a list of passengers and you can use all changers in it.

See also: vehicle

Returns
entity
In Skript since
2.0, 2.2-dev26 (Multiple passengers for 1.11.2+)
ID
ExprPassenger
View example
passengers of the minecart contains a creeper or a cow
the boat's passenger contains a pig
add a cow and a zombie to passengers of last spawned boat
set passengers of player's vehicle to a pig and a horse
remove all pigs from player's vehicle
clear passengers of boat

Pathfinding Target Entity

  • expressions
  • Skript 2.16
[the] path[ ]finding target [entity]

The target entity that another entity is pathfinding towards in a pathfinding event.

Returns
entity
In Skript since
2.16
ID
ExprPathfindingTarget
View example
on pathfind:
	if the pathfinding target entity is a villager:
	    broadcast "I suspect a zombie is going towards a villager right now.."

Pathfinding Target Location

  • expressions
  • Skript 2.16
[the] path[ ]finding target location

The location that the entity is pathfinding towards.

Returns
location
In Skript since
2.16
ID
ExprPathfindingLocation
View example
on pathfind:
	if the pathfinding target location is within radius 5 of {mylocation}:
	    broadcast "A mob tried to pathfind near a forbidden location!"
	    cancel event

Percent of

  • expressions
  • Skript 2.8.0
%number%(%| percent) of %numbers%

Returns a percentage of one or more numbers.

Returns
number
In Skript since
2.8.0
ID
ExprPercent
View 5 examples
set damage to 10% of victim's health
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

Persistent Data Value

  • expressions
  • Skript 2.15
[the] [persistent] [<.+> ][list ]data (value|tag) %text% of %chunks/worlds/entities/blocks/item types/offline players%%chunks/worlds/entities/blocks/item types/offline players%'[s] [persistent] [<.+> ][list ]data (value|tag) %text%

Provides access to the 'persistent data container' Bukkit provides on many objects. These values are stored on the chunk/world/item/entity directly, like custom NBT, but are much faster and reliable to access.

Persistent values natively support numbers and text, but any Skript type that can be saved in a variable can also be stored in PDC via this expression. Lists of objects can also be saved.

If you attempt to save invalid types, runtime errors will be thrown.

The names of tags must be valid namespaced keys, i.e. a-z, 0-9, '_', '.', '/', and '-' are the allowed characters. If no namespace is provided, it will default to 'minecraft'.

Returns
object
In Skript since
2.15
ID
ExprPersistentData
View 4 examples
set persistent data tag "custom_damage" of player's tool to 10
on jump:
	if data tag "boost" of player's boots is set:
		push player upwards
on shoot:
	set {_strength} to number data tag "strength" of shooter's tool
	if {_strength} is set:
		set number data tag "damage" of projectile to {_strength}

on damage:
	set {_damage} to data tag "damage" of projectile
	if {_damage} is set:
		set damage to {_damage}
set {_pet-uuids::*} to list data tag "pets" of player

Pi

  • expressions
  • Skript 2.7
(pi|ฯ€)

Returns the mathematical constant pi. (approx. 3.1415926535)

Returns
number
In Skript since
2.7
ID
ExprPi
View example
set {_tau} to pi * 2

Picked Item/Block/Entity

  • expressions
  • Skript 2.15
[the] picked (item|block|entity)

The item, block, or entity picked by a player using the pick block key (default middle mouse button).

Returns
object
Requires
1.21.5+
In Skript since
2.15
ID
ExprPickedItem
View example
on player pick item:
	send "You picked %the picked item%!" to the player

Pickup Delay

  • expressions
  • Skript 2.7
[the] pick[ ]up delay of %entities%%entities%'[s] pick[ ]up delay

The amount of time before a dropped item can be picked up by an entity.

Returns
time span
In Skript since
2.7
ID
ExprPickupDelay
View 2 examples
drop diamond sword at {_location} without velocity
set pickup delay of last dropped item to 5 seconds

Ping

  • expressions
  • Skript 2.2-dev36
[the] ping of %players%%players%'[s] ping

Pings of players, as Minecraft server knows them. Note that they will almost certainly be different from the ones you'd get from using ICMP echo requests. This expression is only supported on some server software (PaperSpigot).

Returns
integer
In Skript since
2.2-dev36
ID
ExprPing
View example
command /ping <player=%player%>:
	trigger:
		send "%arg-1%'s ping is %arg-1's ping%"

Plain Item

  • expressions
  • Skript 2.6
[a[n]] (plain|unmodified) %item type%

A plain item is an item with no modifications. It can be used to convert items to their default state or to match with other default items.

Returns
item type
In Skript since
2.6
ID
ExprPlain
View example
if the player's tool is a plain diamond: # check if player's tool has no modifications
	send "You are holding a plain diamond!"

Player Chat Completions

  • expressions
  • Skript 2.10
[the] [custom] chat completion[s] of %players%%players%'[s] [custom] chat completion[s]

The custom chat completion suggestions. You can add, set, remove, and clear them. Removing the names of online players with this expression is ineffective.

This expression will not return anything due to Bukkit limitations.

Returns
text
Requires
Spigot 1.19+
In Skript since
2.10
ID
ExprPlayerChatCompletions
View 3 examples
add "Skript" and "Njol" to chat completions of all players
remove "text" from {_p}'s chat completions
clear player's chat completions

Player Input Keys

  • expressions
  • Skript 2.10
[the] [current] (inputs|input keys) of %players%%players%'[s] [current] (inputs|input keys)

Get the current input keys of a player.

Returns
input key
Requires
Minecraft 1.21.2+
In Skript since
2.10
ID
ExprCurrentInputKeys
View example
broadcast "%player% is pressing %current input keys of player%"

Player List Header and Footer

  • expressions
  • Skript 2.4
[the] (player|tab)[ ]list (header|footer) [text|message] of %players%%players%'[s] (player|tab)[ ]list (header|footer) [text|message]

The message above and below the player list in the tab menu.

Returns
text
In Skript since
2.4
ID
ExprPlayerListHeaderFooter
View 3 examples
set all players' tab list header to "Welcome to the Server!"
send "%the player's tab list header%" to player
reset all players' tab list header

Player List Name

  • expressions
[the] (player|tab)[ ]list name[s] of %players%%players%'[s] (player|tab)[ ]list name[s]

The name of a player in the player list in the tab menu.

Returns
text
In Skript since
Before 2.1
ID
ExprPlayerListName
View example
on join:
	player has permission "name.red"
	set the player's tab list name to "<red>%player's name%"

Player List Priority

  • expressions
  • Skript 2.16
[the] (player|tab)[ ]list priority of %players%%players%'[s] (player|tab)[ ]list priority

The priority of the player in the player list in the tab menu.

Used to sort players on the tab list. Lowest priority is at the bottom of tab and highest priority is at the top.

If 2 players have same priority then they will be sorted A-Z (but still be above those with lower priority).

Returns
integer
In Skript since
2.16
ID
ExprPlayerListPriority
View example
on join:
	player has permission "group.mod"
	set the player's tab list priority to 5

Player Protocol Version

  • expressions
  • Skript 2.6.2
[the] protocol version of %players%%players%'[s] protocol version

Player's protocol version. For more information and list of protocol versions visit wiki.vg.

Returns
integer
In Skript since
2.6.2
ID
ExprPlayerProtocolVersion
View example
command /protocolversion <player>:
	trigger:
		send "Protocol version of %arg-1%: %protocol version of arg-1%"

Player Skull

  • expressions
  • Skript 2.0
[the] skull of %offline players%%offline players%'[s] skull

Gets a skull item representing a player. Skulls for other entities are provided by the aliases.

Returns
item type
In Skript since
2.0
ID
ExprSkull
View 2 examples
give the victim's skull to the attacker
set the block at the entity to the entity's skull

Portal

  • expressions
  • Skript 2.4
[the] portal['s] blocks[the] blocks of [the] portal

The blocks associated with a portal in the portal creation event.

Returns
block
In Skript since
2.4
ID
ExprPortal
View example
on portal creation:
	loop portal blocks:
		broadcast "%loop-block% is part of a portal!"

Portal Cooldown

  • expressions
  • Skript 2.8.0
[the] portal cooldown of %entities%%entities%'[s] portal cooldown

The amount of time before an entity can use a portal. By default, it is 15 seconds after exiting a nether portal or end gateway.

Players in survival/adventure get a cooldown of 0.5 seconds, while those in creative get no cooldown.

Resetting will set the cooldown back to the default 15 seconds for non-player entities and 0.5 seconds for players.

Returns
time span
In Skript since
2.8.0
ID
ExprPortalCooldown
View example
on portal:
	wait 1 tick
	set portal cooldown of event-entity to 5 seconds

Potion Effect - Amplifier

  • expressions
  • Skript 2.7
[the] ([potion] amplifier|potion tier|potion level)[s] of %potion effects%%potion effects%'[s] ([potion] amplifier|potion tier|potion level)[s]

An expression to obtain the amplifier of a potion effect.

Returns
integer
In Skript since
2.7, 2.14 (support for potion effect objects, changing)
ID
ExprPotionAmplifier
View 2 examples
set the amplifier of {_potion} to 10
add 10 to the amplifier of the player's speed effect

Potion Effect - Duration

  • expressions
  • Skript 2.14
[the] ([potion] duration|potion length)[s] of %potion effects%%potion effects%'[s] ([potion] duration|potion length)[s]

An expression to obtain the duration of a potion effect.

Returns
time span
In Skript since
2.14
ID
ExprPotionDuration
View 2 examples
set the duration of {_potion} to 10 seconds
add 10 seconds to the duration of the player's speed effect

Potion Effect of Entity/Item

  • expressions
  • Skript 2.14
[the] [active|active and hidden] %potion effect types% [potion] effect[s] of %living entities/item types/slots%%living entities/item types/slots%'[s] [active|active and hidden] %potion effect types% [potion] effect[s]

An expression to obtain a specific potion effect type of an entity or item.

When an entity is affected by a potion effect but already has a weaker version of that effect type, the weaker version becomes hidden. If the weaker version has a longer duration, it returns after the stronger version expires.

NOTE: Hidden effects are not able to be changed.

Requires
Paper 1.20.4+ for hidden effects
In Skript since
2.14
ID
ExprPotionEffect
View 5 examples
set {_effect} to the player's active speed effect
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

Potion Effect of Entity/Item

  • expressions
  • Skript 2.14
[the] hidden %potion effect types% [potion] effect[s] of %living entities/item types/slots%%living entities/item types/slots%'[s] hidden %potion effect types% [potion] effect[s]

An expression to obtain a specific potion effect type of an entity or item.

When an entity is affected by a potion effect but already has a weaker version of that effect type, the weaker version becomes hidden. If the weaker version has a longer duration, it returns after the stronger version expires.

NOTE: Hidden effects are not able to be changed.

Requires
Paper 1.20.4+ for hidden effects
In Skript since
2.14
ID
ExprPotionEffect-hidden
View 5 examples
set {_effect} to the player's active speed effect
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

Potion Effect Type Category

  • expressions
  • Skript 2.14
[the] potion [effect [type]] categor(y|ies) of %potion effect types%%potion effect types%'[s] potion [effect [type]] categor(y|ies)

An expression to obtain the category of a potion effect type.

That is, whether the potion effect type is beneficial, harmful, or neutral.

Requires
Minecraft 1.21+
In Skript since
2.14
ID
ExprPotionEffectTypeCategory
View example
on entity potion effect modification:
	if the potion effect type category is harmful:
		 message "You have been afflicted with %potion effect type%"

Potion Effects of Entity/Item

  • expressions
  • Skript 2.5.2, 2.14
[the] [active|active and hidden] potion effects of %living entities/item types/slots%%living entities/item types/slots%'[s] [active|active and hidden] potion effects

An expression to obtain the active or hidden potion effects of an entity or item.

When an entity is affected by a potion effect but already has a weaker version of that effect type, the weaker version becomes hidden. If the weaker version has a longer duration, it returns after the stronger version expires.

NOTE: Hidden effects are not able to be changed.

NOTE: Clearing the base potion effects of a potion item is not possible. If you wish to do so, just set the item to a water bottle.

Requires
Paper 1.20.4+ for hidden effects
In Skript since
2.5.2, 2.14 (active/hidden support, more change modes)
ID
ExprPotionEffects
View 5 examples
set {_effects::*} to the active potion effects of the player
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

Potion Effects of Entity/Item

  • expressions
  • Skript 2.5.2, 2.14
[the] hidden potion effects of %living entities/item types/slots%%living entities/item types/slots%'[s] hidden potion effects

An expression to obtain the active or hidden potion effects of an entity or item.

When an entity is affected by a potion effect but already has a weaker version of that effect type, the weaker version becomes hidden. If the weaker version has a longer duration, it returns after the stronger version expires.

NOTE: Hidden effects are not able to be changed.

NOTE: Clearing the base potion effects of a potion item is not possible. If you wish to do so, just set the item to a water bottle.

Requires
Paper 1.20.4+ for hidden effects
In Skript since
2.5.2, 2.14 (active/hidden support, more change modes)
ID
ExprPotionEffects-hidden
View 5 examples
set {_effects::*} to the active potion effects of the player
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

Progress

  • expressions
  • Skript 2.16
[the] progress of %objects%%objects%'[s] progress

Represents the progress of something.

Returns
number
In Skript since
2.16
ID
PropExprProgress
View example
set progress of event-bossbar to 75%

Projectile Critical State

  • expressions
  • Skript 2.5.1
[the] (projectile|arrow) critical (state|ability|mode) of %entities%%entities%'[s] (projectile|arrow) critical (state|ability|mode)

A projectile's critical state. The only currently accepted projectiles are arrows and tridents.

Returns
boolean
In Skript since
2.5.1
ID
ExprProjectileCriticalState
View example
on shoot:
	event-projectile is an arrow
	set projectile critical mode of event-projectile to true

Projectile Force

  • expressions
  • Skript 2.11
[the] projectile force

Returns the force at which a projectile was shot within an entity shoot bow event.

Returns
number
In Skript since
2.11
ID
ExprProjectileForce
View example
on entity shoot projectile:
	set the velocity of shooter to vector(0,1,0) * projectile force

Protocol Version

  • expressions
  • Skript 2.3
[the] [server] [(sent|required|fake)] protocol version [number]

The protocol version that will be sent as the protocol version of the server in a server list ping event. For more information and list of protocol versions visit wiki.vg.

If this protocol version doesn't match with the protocol version of the client, the client will see the version string.

But please note that, this expression has no visual effect over the version string. For example if the server uses PaperSpigot 1.12.2, and you make the protocol version 107 (1.9),

the version string will not be "Paper 1.9", it will still be "Paper 1.12.2".

But then you can customize the version string as you wish.

Also if the protocol version of the player is higher than protocol version of the server, it will say

"Server out of date!", and if vice-versa "Client out of date!" when you hover on the ping bars.

This can be set in a server list ping event only

(increase and decrease effects cannot be used because that wouldn't make sense).

Returns
integer
In Skript since
2.3
ID
ExprProtocolVersion
View example
on server list ping:
	set the version string to "<light green>Version: <orange>%minecraft version%"
	set the protocol version to 0 # 13w41a (1.7) - so the player will see the custom version string almost always

Queue (Experimental)

  • expressions
  • Skript 2.10
[a] [new] queue [(of|with) %objects%]

Requires the using queues experimental feature flag to be enabled.

Creates a new queue.

A queue is a set of elements that can have things removed from the start and added to the end.

Any value can be added to a queue. Adding a non-existent value (e.g. `{variable that isn't set}`) will have no effect.

This means that removing an element from the queue will always return a value unless the queue is empty.

Requesting an element from a queue (e.g. `the 1st element of {queue}`) also removes it from the queue.

Returns
queue
In Skript since
2.10 (experimental)
ID
ExprQueue
View 2 examples
set {queue} to a new queue
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'

Queue Start/End (Experimental)

  • expressions
  • Skript 2.10
[the] (start|end) of %queue%%queue%'[s] (start|end)

Requires the using queues experimental feature flag to be enabled.

The first or last element in a queue. Asking for this does not remove the element from the queue.

This is designed for use with the add changer: to add or remove elements from the start or the end of the queue.

Returns
object
In Skript since
2.10 (experimental)
ID
ExprQueueStartEnd
View example
set {queue} to a new queue
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

Quit Message

  • expressions
  • Skript 1.4.9
[the] (quit|leave|log[ ]out)( |-)message

The message sent to all online players when a player quits the server.

Returns
text
In Skript since
1.4.9
ID
ExprQuitMessage
View example
on quit:
	if {vanish::%player's uuid%} is set:
		clear the quit message
	else:
		set the quit message to "%player% left this server... they will be missed!"

Quit Reason

  • expressions
  • Skript 2.8.0
[the] (quit|disconnect) (cause|reason)

The quit reason as to why a player disconnected in a quit event.

In Skript since
2.8.0
ID
ExprQuitReason
View example
on quit:
	quit reason was kicked
	player is banned
	clear {server::player::%uuid of player%::*}

Random

  • expressions
  • Skript 1.4.9
[a] random <.+> [out] (of|from) %objects%

Gets a random item out of a set, e.g. a random player out of all players online.

Returns
object
In Skript since
1.4.9
ID
ExprRandom
View 2 examples
give a diamond to a random player out of all players
give a random item out of all items to the player

Random Character

  • expressions
  • Skript 2.8.0
[a|%integer%] random [alphanumeric] character[s] (from|between) %text% (to|and) %text%

One or more random characters between two given characters. Use 'alphanumeric' if you want only alphanumeric characters.

This expression uses the Unicode numerical code of a character to determine which characters are between the two given characters.

If strings of more than one character are given, only the first character of each is used.

Returns
text
In Skript since
2.8.0
ID
ExprRandomCharacter
View 2 examples
set {_captcha} to join (5 random characters between "a" and "z") with ""
send 3 random alphanumeric characters between "0" and "z"

Random Numbers

  • expressions
  • Skript 1.4, 2.10
[a] random (integer|number)[s] (from|between) %number% (to|and) %number%%integer% random (integer|number)[s] (from|between) %number% (to|and) %number%

A given amount of random numbers or integers between two given numbers. Use 'number' if you want any number with decimal parts, or use use 'integer' if you only want whole numbers.

Please note that the order of the numbers doesn't matter, i.e. random number between 2 and 1 will work as well as random number between 1 and 2.

Returns
number
In Skript since
1.4, 2.10 (Multiple random numbers)
ID
ExprRandomNumber
View 4 examples
set the player's health to a random number between 5 and 10
send "You 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

Random UUID

  • expressions
  • Skript 2.5.1, 2.11
[a] random uuid

Returns a random UUID.

Returns
uuid
In Skript since
2.5.1, 2.11 (return UUIDs)
ID
ExprRandomUUID
View example
set {_uuid} to random uuid

Raw Name

  • expressions
(raw|minecraft|vanilla) name[s] of %item types%

The raw Minecraft material name of the given item. Note that this is not guaranteed to give same results on all servers.

Returns
text
In Skript since
unknown (2.2)
ID
ExprRawName
View example
raw name of tool of player

Raw String

  • expressions
  • Skript 2.7
raw %texts%

Returns the string without formatting (colors, decorations, etc.) and without stripping them from it.

For example, raw "&aHello There!" would output &aHello There!

In Skript since
2.7
ID
ExprRawString
View example
send raw "&aThis text is unformatted!" to all players

Readied Arrow/Bow

  • expressions
  • Skript 2.8.0
[the] (readied|selected|drawn) (arrow|bow)

The bow or arrow in a Ready Arrow event.

Returns
item
In Skript since
2.8.0
ID
ExprReadiedArrow
View example
on player ready arrow:
	selected bow's name is "Spectral Bow"
	if selected arrow is not a spectral arrow:
		cancel event

Recursive

  • expressions
  • Skript 2.14
recursive %objects%

Returns all values of an expression, including those in nested structures such as lists of lists.

Returns
object
In Skript since
2.14
ID
ExprRecursive
View example
on load:
	set {_data::a::b::c} to "value1"
	set {_data::a::b::d} to "value2"
	set {_data::a::e} to "value3"
	set {_data::f} to "value4"

	broadcast recursive {_data::*}
	# broadcasts "value1", "value2", "value3", "value4"

	broadcast recursive indices of {_data::*}
	# broadcasts "a::b::c", "a::b::d", "a::e", "f"

Recursive Size

  • expressions
  • Skript 1.0
[the] recursive (amount|number|size) of %objects%

The recursive size of list.

Returns the recursive size of the list with sublists included, e.g.

{list::*} Structure

โ”œโ”€โ”€โ”€โ”€ {list::1}: 1

โ”œโ”€โ”€โ”€โ”€ {list::2}: 2

โ”‚ โ”œโ”€โ”€โ”€โ”€ {list::2::1}: 3

โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€ {list::2::1::1}: 4

โ”‚ โ””โ”€โ”€โ”€โ”€ {list::2::2}: 5

โ””โ”€โ”€โ”€โ”€ {list::3}: 6

Where using %size of {list::*}% will only return 3 (the first layer of indices only), while %recursive size of {list::*}% will return 6 (the entire list)

Please note that getting a list's recursive size can cause lag if the list is large, so only use this expression if you need to!

Returns
integer
In Skript since
1.0
ID
ExprAmount-recursive
View example
if recursive size of {player-data::*} > 1000:

Redstone Block Power

  • expressions
  • Skript 2.5
[the] redstone power of %blocks%%blocks%'[s] redstone power

Power of a redstone block

Returns
integer
In Skript since
2.5
ID
ExprRedstoneBlockPower
View example
if redstone power of targeted block is 15:
	send "This block is very powerful!"

Reduce

  • expressions
  • Skript 2.15
%objects% (reduced|folded) (to|with|by) [<.+>]%objects% (reduced|folded) (to|with|by) (<.+>)

Reduces lists to single values by repeatedly applying an operation.

The reduce expression takes each element and combines it with an accumulator value.

Use 'reduced value' to access the current accumulated value and 'input' for the current element.

Returns
object
In Skript since
2.15
ID
ExprReduce
View 3 examples
set {_sum} to {_numbers::*} reduced with [reduced value + input]
set {_product} to {_values::*} reduced with [reduced value * input]
set {_concatenated} to {_strings::*} reduced with ["%reduced value%%input%"]

Reduced Value

  • expressions
  • Skript 2.15
[the] reduced value[the] (accumulator|accumulated) [value][the] folded value

Returns the current accumulated/reduced value within a reduce expression.

This represents the result of all previous reduction operations.

Can only be used inside the reduce expression's operation block.

Returns
object
In Skript since
2.15
ID
ExprReducedValue
View 3 examples
set {_sum} to {_numbers::*} reduced with [reduced value + input]
set {_max} to {_values::*} reduced with [reduced value if reduced value > input else input]
set {_combined} to {_items::*} reduced with ("%reduced value%, %input%")

Remaining Air

  • expressions
  • Skript 2.0
[the] remaining air of %living entities%%living entities%'[s] remaining air

How much time a player has left underwater before starting to drown.

Returns
time span
In Skript since
2.0
ID
ExprRemainingAir
View example
if the player's remaining air is less than 3 seconds:
	send "hurry, get to the surface!" to the player

Repeat String

  • expressions
  • Skript 2.8.0
%texts% repeated %integer% time[s]

Repeats inputted strings a given amount of times.

Returns
text
In Skript since
2.8.0
ID
ExprRepeat
View example
broadcast nl and nl repeated 200 times
broadcast "Hello World " repeated 5 times
if "aa" repeated 2 times is "aaaa":
	broadcast "Ahhhh" repeated 100 times

Resolve Text Component

  • expressions
  • Skript 2.16
%text components% resolved for %command sender% [(bypassing|ignoring) required permissions]

Resolves a component with the context of a command sender or other entity.

Certain kinds of components, such as NBT components, Score components, and Selector components, are required to be resolved to display a proper output.

Note that the option to bypass required permissions only applies for players.

In Skript since
2.16
ID
ExprResolvedComponent
View example
send formatted "Hello <selector:@e[limit=5]>, I'm <selector:@s>!" resolved for player

Resonating Time

  • expressions
  • Skript 2.9.0
[the] resonat(e|ing) time of %block%%block%'[s] resonat(e|ing) time

Returns the resonating time of a bell.

A bell will start resonating five game ticks after being rung, and will continue to resonate for 40 game ticks.

Returns
time span
In Skript since
2.9.0
ID
ExprResonatingTime
View example
broadcast "The bell has been resonating for %resonating time of target block%"

Respawn Anchor Charges

  • expressions
  • Skript 2.7
[the] [max[imum]] charge[s] of %blocks%%blocks%'[s] [max[imum]] charge[s]

The charges of a respawn anchor.

Returns
integer
Requires
Minecraft 1.16+
In Skript since
2.7
ID
ExprCharges
View example
set the charges of event-block to 3

Respawn Location

  • expressions
  • Skript 2.2-dev35
[the] respawn location

The location that a player should respawn at. This is used within the respawn event.

Returns
location
In Skript since
2.2-dev35
ID
ExprRespawnLocation
View example
on respawn:
	set respawn location to {example::spawn}

Respawn Reason

  • expressions
  • Skript 2.14
[the] respawn[ing] reason

The respawn reason in a respawn event.

In Skript since
2.14
ID
ExprRespawnReason
View example
on respawn:
	if respawn reason is end portal:
		broadcast "%player% took the end portal to the overworld!"

Result

  • expressions
  • Skript 2.10
[the] result[s] of [running|executing] %function% [with arg[ument]s %objects%]

Runs something (like a function) and returns its result.

If the thing is expected to return multiple values, use 'results' instead of 'result'.

Returns
object
In Skript since
2.10
ID
ExprResult
View 4 examples
set {_function} to the function named "myFunction"
set {_result} to the result of {_function}
set {_list::*} to the results of {_function}
set {_result} to the result of {_function} with arguments 13 and true

Reversed List

  • expressions
  • Skript 2.4, 2.14
reversed %objects%

Reverses given list.

Returns
object
In Skript since
2.4, 2.14 (retain indices when looping)
ID
ExprReversedList
View example
set {_list::*} to reversed {_list::*}

Ringing Time

  • expressions
  • Skript 2.9.0
[the] ring[ing] time of %block%%block%'[s] ring[ing] time

Returns the ringing time of a bell.

A bell typically rings for 50 game ticks.

Returns
time span
In Skript since
2.9.0
ID
ExprRingingTime
View example
broadcast "The bell has been ringing for %ringing time of target block%"

Rotated Quaternion/Vector

  • expressions
  • Skript 2.10
%vectors/quaternions% rotated around [the] [local] (x|y|z)(-| )axis by %number% [degrees]%quaternions% rotated by x %number%, y %number%(, [and]| and) z %number%

Rotates a quaternion or vector around an axis a set amount of degrees, or around all 3 axes at once.

Vectors can only be rotated around the global X/Y/Z axes, or an arbitrary vector axis.

Quaternions are more flexible, allowing rotation around the global or local X/Y/Z axes, arbitrary vectors, or all 3 local axes at once.

Global axes are the ones in the Minecraft world. Local axes are relative to how the quaternion is already oriented.

Note that rotating a quaternion around a vector results in a rotation around the local vector, so results may not be what you expect. For example, rotating around vector(1, 0, 0) is the same as rotating around the local X axis.

The same applies to rotations by all three axes at once. In addition, rotating around all three axes of a quaternion/display at once will rotate in ZYX order, meaning the Z rotation will be applied first and the X rotation last.

Returns
object
In Skript since
2.10
ID
ExprRotate
View 3 examples
set {_new} to {_quaternion} rotated around x axis by 10 degrees
set {_new} to {_vector} rotated around vector(1, 1, 1) by 45
set {_new} to {_quaternion} rotated by x 45, y 90, z 135

Rotation Axis/Angle

  • expressions
  • Skript 2.10
[the] rotation (angle|axis) of %quaternions%%quaternions%'[s] rotation (angle|axis)

Returns the axis or angle that a quaternion will rotate by/around.

All quaternions can be represented by a rotation of some amount around some axis, so this expression provides the ability to get that angle/axis.

Returns
object
In Skript since
2.10
ID
ExprQuaternionAxisAngle
View 5 examples
set {_quaternion} to axisAngle(45, vector(1, 2, 3))
send rotation axis of {_quaternion} # 1, 2, 3
send rotation angle of {_quaternion} # 45
set rotation angle of {_quaternion} to 135
set rotation axis of {_quaternion} to vector(0, 1, 0)

Rounding

  • expressions
  • Skript 2.0
[a|the] (round[ed] down|floored) %numbers%%numbers% (round[ed] down|floored)[a|the] round[ed] %numbers%%numbers% round[ed][a|the] (round[ed] up|ceil[ing]ed) %numbers%%numbers% (round[ed] up|ceil[ing]ed)

Rounds numbers normally, up (ceiling) or down (floor) respectively.

Returns
integer
In Skript since
2.0
ID
ExprRound
View 3 examples
set {var} to rounded health of player
set line 1 of the block to "%rounded (1.5 * player's level)%"
add rounded down argument to the player's health

Saturation

  • expressions
  • Skript 2.2-Fixes-v10, 2.2-dev35
[the] saturation of %players%%players%'[s] saturation

The saturation of a player. If used in a player event, it can be omitted and will default to event-player.

Returns
number
In Skript since
2.2-Fixes-v10, 2.2-dev35 (fully modifiable), 2.6.2 (syntax pattern changed)
ID
ExprSaturation
View example
set saturation of player to 20

Scale

  • expressions
  • Skript 2.14
[the] scale[s] of %objects%%objects%'[s] scale[s]

Represents the physical size/scale of something.

For example, the scale of a display entity would be a vector containing multipliers on its size in the x, y, and z axis.

For a particle effect like the sweeping edge particle, scale is a number determining how large the particle should be.

Returns
object
In Skript since
2.14
ID
PropExprScale
View 2 examples
set the scale of {_display} to vector(0,2,0)
set the scale of {_particle} to 1.5

Scoreboard Tags

  • expressions
  • Skript 2.3
[(all [[of] the]|the)] scoreboard tags of %entities%%entities%'[s] scoreboard tags

Scoreboard tags are simple list of texts stored directly in the data of an entity.

So this is a Minecraft related thing, not Bukkit, so the tags will not get removed when the server stops. You can visit visit Minecraft Wiki for more info.

This is changeable and valid for any type of entity. Also you can use use the Has Scoreboard Tag condition to check whether an entity has the given tags.

Requires Minecraft 1.11+ (actually added in 1.9 to the game, but added in 1.11 to Spigot).

Returns
text
In Skript since
2.3
ID
ExprScoreboardTags
View example
on spawn of a monster:
	if the spawn reason is mob spawner:
		add "spawned by a spawner" to the scoreboard tags of event-entity

on death of a monster:
	if the attacker is a player:
		if the victim doesn't have the scoreboard tag "spawned by a spawner":
			add 1$ to attacker's balance

Script

  • expressions
  • Skript 2.0
[the] [current] script

The current script, or a script from its (file) name.

If the script is enabled or disabled (or reloaded) this reference will become invalid.

Therefore, it is recommended to obtain a script reference when needed.

Returns
script
In Skript since
2.0
ID
ExprScript
View 5 examples
on script load:
	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

Script

  • expressions
  • Skript 2.0
[the] script[s] [named] %texts%[the] scripts in [directory|folder] %text%

The current script, or a script from its (file) name.

If the script is enabled or disabled (or reloaded) this reference will become invalid.

Therefore, it is recommended to obtain a script reference when needed.

Returns
script
In Skript since
2.0
ID
ExprScriptNamed
View 5 examples
on script load:
	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

Script Command Cooldown Information

  • expressions
  • Skript 2.2-dev33
[the] ((cooldown|wait) time|[wait] time of [the] (cooldown|wait) [(of|for) [the] [current] command])[the] [cooldown] bypass perm[ission] [of [the] (cooldown|wait) [(of|for) [the] [current] command]][the] remaining [time] [of [the] (cooldown|wait) [(of|for) [the] [current] command]][the] elapsed [time] [of [the] (cooldown|wait) [(of|for) [the] [current] command]]

Only usable in script commands.

Represents the cooldown time, the cooldown bypass permission, the remaining cooldown time, the elapsed cooldown time.

Returns
object
In Skript since
2.2-dev33
ID
ExprCmdCooldownInfo
View example
command /home:
	cooldown: 10 seconds
	cooldown message: You last teleported home %elapsed time% ago, you may teleport home again in %remaining time%.
	trigger:
		teleport player to {home::%player%}

Script Command Suggestion Input

  • expressions
  • Skript 2.17
[the] [command] [suggestion|tab completion] (full|complete) input[the] [command] [suggestion|tab completion] (current|arg[ument]) input[the] [command] [suggestion|tab completion] (current|arg[ument]) input [start[ing]] (position|index)

Usable in a script command's "suggestions" entry.

This provides information including the full content of what the player has typed so far, what they have typed as part of the current argument, and at what position within the full content the current argument starts (starting from 1).

Returns
object
In Skript since
2.17
ID
ExprCommandInput
View example
command /message <player> <text>:
	suggestions:
		player argument is set # they are writing the text argument
		if the current input contains "frick":
			set the suggestions for the text argument to "Keep your messages nice please!"
			disable filtering for the text argument's suggestions
	trigger:
		send "<grey><italic>%player% -> You: %text argument%" to player argument
		send "<grey><italic>You -> %player argument%: %text argument%" to player

Script Command Suggestions

  • expressions
  • Skript 2.17
[the] [command] (suggestions|tab completions) (of|for) %objects%%objects%'[s] [command] (suggestions|tab completions)

Usable in a script command's "suggestions" entry.

Allows modifying the suggestions displayed while a command is being typed.

Returns
object
In Skript since
2.17
ID
ExprCommandSuggestions
View 2 examples
command /menu <text> <text>:
	suggestions:
		if arg-1 is not set:
			set arg-1's suggestions to "Appetizers", "Entrees", and "Desserts"
		else if arg-1 is "Appetizers":
			set arg-2's suggestions to "Salads", "Breads", and "Fried Delights"
		else if arg-1 is "Entrees":
			set arg-2's suggestions to "Pastas", "Handhelds", and "Pizzas"
		else if arg-1 is "Desserts":
			set arg-2's suggestions to "Cakes", "Ice Creams", and "Pies"
	trigger:
		send "Yum!"
command /home:
	subcommand set <name: text>:
		trigger:
			set {homes::%player%::%{_name}%} to the player's location
	subcommand <name: text>:
		suggestions:
			loop {homes::%player%::*}:
				add formatted "<ttp:'Location: %loop-value%'>%loop-index%" to the suggestions for the text argument
		trigger:
			teleport the player to {homes::%player%::%{_name}%}

Sea Level

  • expressions
  • Skript 2.5.1
[the] sea level of %worlds%%worlds%'[s] sea level

Gets the sea level of a world.

Returns
integer
In Skript since
2.5.1
ID
ExprSeaLevel
View example
send "The sea level in your world is %sea level in player's world%"

Sea Pickles

  • expressions
  • Skript 2.7
[the] [(min|max)[imum]] [sea] pickle(s| (count|amount)) of %blocks%%blocks%'[s] [(min|max)[imum]] [sea] pickle(s| (count|amount))

An expression to obtain or modify data relating to the pickles of a sea pickle block.

Returns
integer
In Skript since
2.7
ID
ExprSeaPickles
View example
on block break:
	type of block is sea pickle
	send "Wow! This stack of sea pickles contained %event-block's sea pickle count% pickles!"
	send "It could've contained a maximum of %event-block's maximum sea pickle count% pickles!"
	send "It had to have contained at least %event-block's minimum sea pickle count% pickles!"
	cancel event
	set event-block's sea pickle count to event-block's maximum sea pickle count
	send "This bad boy is going to hold so many pickles now!!"

Seed of Loot Table

  • expressions
  • Skript 2.10
[the] loot[[ ]table] seed[s] of %entities/blocks%%entities/blocks%'[s] loot[[ ]table] seed[s]

Returns the seed of a loot table. Setting the seed of a block or entity that does not have a loot table will not do anything.

Returns
integer
In Skript since
2.10
ID
ExprLootTableSeed
View 2 examples
set {_seed} loot table seed of block
set loot table seed of entity to 123456789

Sent Command List

  • expressions
  • Skript 2.8.0
[the] [sent] [server] command[s] list

The commands that will be sent to the player in a send commands to player event.

Modifications will affect what commands show up for the player to tab complete. They will not affect what commands the player can actually run.

Adding new commands to the list is illegal behavior and will be ignored.

Returns
text
In Skript since
2.8.0
ID
ExprSentCommands
View example
on send command list:
	set command list to command list where [input does not contain ":"]
	remove "help" from command list

Server Icon

  • expressions
  • Skript 2.3
[the] [((default)|(shown|sent))] [server] icon

Icon of the server in the server list. Can be set to an icon that loaded using the

load server icon effect,

or can be reset to the default icon in a server list ping.

'default server icon' returns the default server icon (server-icon.png) always and cannot be changed.

In Skript since
2.3
ID
ExprServerIcon
View example
on script load:
	set {server-icons::default} to the default server icon

Sets

  • expressions
  • Skript 1.0 pre-5, 2.7
(all [[of] the]|every) <.+>

Returns a list of all the values of a type. Useful for looping.

Returns
object
In Skript since
1.0 pre-5, 2.7 (classinfo)
ID
ExprSets
View example
loop all attribute types:
	set loop-value attribute of player to 10
	message "Set attribute %loop-value% to 10!"

Sets

  • expressions
  • Skript 1.0 pre-5, 2.7
[all [[of] the]|the] (items|item[ ]stacks)every item[[ ]stack]

Returns a list of all the values of a type. Useful for looping.

Returns
item
In Skript since
1.0 pre-5, 2.7 (classinfo)
ID
ExprSets-items
View example
loop all attribute types:
	set loop-value attribute of player to 10
	message "Set attribute %loop-value% to 10!"

Sets

  • expressions
  • Skript 1.0 pre-5, 2.7
[all [[of] the]|the|every] item[ ]types

Returns a list of all the values of a type. Useful for looping.

Returns
item type
In Skript since
1.0 pre-5, 2.7 (classinfo)
ID
ExprSets-itemtypes
View example
loop all attribute types:
	set loop-value attribute of player to 10
	message "Set attribute %loop-value% to 10!"

Sets

  • expressions
  • Skript 1.0 pre-5, 2.7
(all [[of] the]|every) keyed boss[ ]bars

Returns a list of all the values of a type. Useful for looping.

In Skript since
1.0 pre-5, 2.7 (classinfo)
ID
ExprSets-keyedbossbar
View example
loop all attribute types:
	set loop-value attribute of player to 10
	message "Set attribute %loop-value% to 10!"

Shooter

  • expressions
  • Skript 1.3.7, 2.11
[the] shooter [of %entities%]

The shooter of a projectile.

In Skript since
1.3.7, 2.11 (entity shoot bow event)
ID
ExprShooter
View example
shooter is a skeleton

Shuffled List

  • expressions
  • Skript 2.2-dev32, 2.14
shuffled %objects%

Shuffles given list randomly.

Returns
object
In Skript since
2.2-dev32, 2.14 (retain indices when looping)
ID
ExprShuffledList
View example
set {_list::*} to shuffled {_list::*}

Sign Text

  • expressions
  • Skript 1.3
line %integer% [of [the] (front|back) [side]] [of %block%][the] (1st|first|2nd|second|3rd|third|4th|fourth) line [of [the] (front|back) [side]] [of %block%][all [[of] the]|the] lines [of [the] (front|back) [side]] [of %block%]

A line of text on a sign. Can be changed, but note that there is a 16 character limit per line. If a sign side is not specified, the front side will be used by default, unless in a sign change event and a block is not explicitly specified.

Returns
text
In Skript since
1.3, 2.17 (sign side support)
ID
ExprSignText
View 2 examples
on right click:
	clicked block is tagged as "minecraft:all_signs"
	if line 2 of the clicked block is "[Heal]":
		heal the player
on sign change:
	any of the lines contain "bad word"
	cancel the event
	send "<red>You may not write profanity on signs!" to the player

Simulation Distance

  • expressions
  • Skript 2.11
[the] simulation distance[s] of %worlds/players%%worlds/players%'[s] simulation distance[s]

The simulation distance of a world or a player.

Simulation distance is the minimum distance in chunks for entities to tick.

Simulation distance is capped to the current view distance of the world or player.

The view distance is capped between 2 and 32 chunks.

Returns
integer
In Skript since
2.11
ID
ExprSimulationDistance
View 4 examples
set simulation distance of player to 10
add 50 to the simulation distance of world "world"
reset the simulation distance of player
clear the simulation distance of world "world"

Size of World Border

  • expressions
  • Skript 2.11
[the] world[ ]border (size|diameter|radius) [of %world borders%]%world borders%'[s] world[ ]border (size|diameter|radius)

The size of a world border.

The size can not be smaller than 1.

Returns
number
In Skript since
2.11
ID
ExprWorldBorderSize
View example
set world border radius of {_worldborder} to 10

Skull Owner

  • expressions
  • Skript 2.9.0, 2.10
[the] (head|skull) owner of %slots/item types/items/blocks%%slots/item types/items/blocks%'[s] (head|skull) owner

The skull owner of a player skull.

In Skript since
2.9.0, 2.10 (of items)
ID
ExprSkullOwner
View 3 examples
set {_owner} to the skull owner of event-block
set skull owner of {_block} to "Njol" parsed as offlineplayer
set head owner of player's tool to {_player}

Skull Texture

  • expressions
  • Skript 2.16
[the] (skull|head) texture of %item types%%item types%'[s] (skull|head) texture

The skull texture of a player head. This allows you to give a skull a custom texture (e.g. instead of it being a Steve head, it's Notch's head).

The texture input is a base64 string containing the texture data to use (https://minecraft-heads.com is one site that provides easy access to base64 texture strings).

Resetting the texture of a skull will make it look like a Steve/Alex head.

Returns
text
In Skript since
2.16
ID
ExprSkullTexture
View example
set the skull texture of {_i} to "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTM4NmRmZDc0Y2JhZmJkMWRiZTQ3OWY1ZTAzNzRjMDliZjJlYjRlMzg2NjExZmM0ZmM2OTlmMDJlY2E0ZGQyYyJ9fX0="

Slot Index

  • expressions
  • Skript 2.2-dev35, 2.8.0
[the] [(raw|unique)] index of %slots%%slots%'[s] [(raw|unique)] index

Index of an an inventory slot. Other types of slots may or may not have indices. Note that comparing slots with numbers is also possible; if index of slot is same as the number, comparisonsucceeds. This expression is mainly for the cases where you must for some reason save the slot numbers.

Raw index of slot is unique for the view, see Minecraft Wiki

Returns
integer
In Skript since
2.2-dev35, 2.8.0 (raw index)
ID
ExprSlotIndex
View 2 examples
if index of event-slot is 10:
	send "You bought a pie!"
if display name of player's top inventory is "Custom Menu": # 3 rows inventory
	if raw index of event-slot > 27: # outside custom inventory
		cancel event

Sorted List

  • expressions
  • Skript 2.2-dev19, 2.14
sorted %objects%

Sorts given list in natural order. All objects in list must be comparable; if they're not, this expression will return nothing.

Returns
object
In Skript since
2.2-dev19, 2.14 (retain indices when looping)
ID
ExprSortedList
View 2 examples
set {_sorted::*} to sorted {_players::*}
command /leaderboard:
	trigger:
		loop reversed sorted {most-kills::*}:
			send "%loop-counter%. %loop-index% with %loop-value% kills" to sender

Source Block

  • expressions
  • Skript 2.7
[the] source block

The source block in a spread event.

Returns
block
In Skript since
2.7
ID
ExprSourceBlock
View example
on spread:
	if the source block is a grass block:
		set the source block to dirt

Spawn

  • expressions
  • Skript 1.4.2
[the] spawn[s] [(point|location)[s]] [of %worlds%]%worlds%'[s] spawn[s] [(point|location)[s]]

The spawn point of a world.

Returns
location
In Skript since
1.4.2
ID
ExprSpawn
View 2 examples
teleport all players to spawn
set the spawn point of "world" to the player's location

Spawn Egg Entity

  • expressions
  • Skript 2.10
[the] spawn egg entity of %items/item types/slots%%items/item types/slots%'[s] spawn egg entity

Gets or sets the entity snapshot that the provided spawn eggs will spawn when used.

Requires
Minecraft 1.20.2+, Minecraft 1.20.5+ (comparisons)
In Skript since
2.10
ID
ExprSpawnEggEntity
View 5 examples
set {_item} to a zombie spawn egg
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

Spawn Reason

  • expressions
  • Skript 2.3
[the] spawn[ing] reason

The spawn reason in a spawn event.

In Skript since
2.3
ID
ExprSpawnReason
View example
on spawn:
	spawn reason is reinforcements or breeding
	cancel event

Spawner Type

  • expressions
  • Skript 2.4, 2.9.2
[the] (spawner|entity|creature) type[s] of %blocks%%blocks%'[s] (spawner|entity|creature) type[s]

The entity type of a spawner (mob spawner).

Change the entity type, reset it (pig) or clear it (Minecraft 1.20.0+).

Requires
Minecraft 1.20.0+ (delete)
In Skript since
2.4, 2.9.2 (trial spawner), 2.12 (delete)
ID
ExprSpawnerType
View 4 examples
on right click:
	if event-block is a spawner:
		send "Spawner's type if %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+

Spectator Target

  • expressions
  • Skript 2.4-alpha4, 2.7
spectator target [of %players%]%players%'[s] spectator target

Grabs the spectator target entity of the players.

Returns
entity
In Skript since
2.4-alpha4, 2.7 (Paper Spectator Event)
ID
ExprSpectatorTarget
View 2 examples
on player start spectating of player:
	message "&c%spectator target% currently has %{game::kills::%spectator target%}% kills!" to the player
on player stop spectating:
	past spectator target was a zombie
	set spectator target to the nearest skeleton

Speed

  • expressions
[the] (walk[ing]|fl(y[ing]|ight))[( |-)]speed of %players%%players%'[s] (walk[ing]|fl(y[ing]|ight))[( |-)]speed

A player's walking or flying speed. Both can be changed, but values must be between -1 and 1 (excessive values will be changed to -1 or 1 respectively). Negative values reverse directions.

Please note that changing a player's speed will change their FOV just like potions do.

Returns
number
In Skript since
unknown (before 2.1)
ID
ExprSpeed
View 2 examples
set the player's walk speed to 1
increase the argument's fly speed by 0.1

Stored Enchantments

  • expressions
  • Skript 2.16
[the] stored enchant[ment]s of %item types%%item types%'[s] stored enchant[ment]s

The enchantments stored inside an enchanted book. This is different from enchanting the book, as for example a book

of sharpness does not deal more damage when used as a weapon. Corresponds to the minecraft:stored_enchantments data component.

Note that for example resetting the stored enchantments of an enchanted book of Sharpness III removes the sharpness enchantment, since

it is impossible to know what the original enchantments of the item were. Note also that only one entry can exist per enchantment type;

adding Sharpness III to a book with Sharpness V will convert it to a book of Sharpness III.

In Skript since
2.16
ID
ExprStoredEnchantments
View example
command /godbook:
	trigger:
		set {_item} to minecraft:enchanted_book
		add mending to stored enchants of {_item} # adds mending 1
		add knockback 12 to stored enchants of {_item}
		add fire aspect 3 to stored enchants of {_item}
		give {_item} to player

String Colors

  • expressions
  • Skript 2.11
[all [[of] the]|the] string colo[u]r[s] [code[s]] of %texts%[the] (first|last) string colo[u]r[s] [code[s]] of %texts%

Retrieve the first, the last, or all of the color objects or color codes of a string.

The retrieved color codes of the string will be formatted with the color symbol.

Returns
object
In Skript since
2.11
ID
ExprStringColor
View 2 examples
set {_colors::*} to the string colors of "<red>hey<blue>yo"
set {_color} to the first string color code of "&aGoodbye!"
send "%{_color}%Howdy!" to all players

Style

  • expressions
  • Skript 2.16
[the] style[s] of %objects%%objects%'[s] style[s]

Represents the style of something.

In Skript since
2.16
ID
PropExprStyle
View example
set style of event-bossbar to 6 notches

Substring

  • expressions
  • Skript 2.1, 2.5.2
[the] (part|sub[ ](text|string)) of %texts% (between|from) [ind(ex|ices)|character[s]] %number% (and|to) [(index|character)] %number%[the] (first|last) [%number%] character[s] of %texts%[the] %number% (first|last) characters of %texts%[the] character[s] at [(index|position|indexes|indices|positions)] %numbers% (in|of) %texts%

Extracts part of a text. You can either get the first <x> characters, the last <x> characters, the character at index <x>, or the characters between indices <x> and <y>. The indices <x> and <y> should be between 1 and the length of the text (other values will be fit into this range).

Returns
text
In Skript since
2.1, 2.5.2 (character at, multiple strings support)
ID
ExprSubstring
View 4 examples
set {_s} to the first 5 characters of the text argument
message "%subtext of {_s} from characters 2 to (the length of {_s} - 1)%" # removes the first and last character from {_s} and sends it to the player or console
set {_characters::*} to characters at 1, 2 and 7 in player's display name
send the last character of all players' names

Tablisted Players

  • expressions
  • Skript 2.13
[the] (tablist[ed]|listed) players [of %players%]%players%'[s] (tablist[ed]|listed) players

The players shown in the tab lists of the specified players.

`delete` will remove all the online players from the tab list.

`reset` will reset the tab list to the default state, which makes all players visible again.

Returns
player
In Skript since
2.13
ID
ExprTablistedPlayers
View example
tablist players of player

Tag

  • expressions
  • Skript 2.10
[the] [minecraft|datapack|paper|(custom|skript)] [item|block|entity [type]] tag[s] %texts%

Represents a tag which can be used to classify items, blocks, or entities.

Tags are composed of a value and an optional namespace: "minecraft:oak_logs".

If you omit the namespace, one will be provided for you, depending on what kind of tag you're using. For example, `tag "doors"` will be the tag "minecraft:doors", while `paper tag "doors"` will be "paper:doors".

`minecraft tag` will search through the vanilla tags, `datapack tag` will search for datapack-provided tags (a namespace is required here!), `paper tag` will search for Paper's custom tags if you are running Paper, and `custom tag` will look in the "skript" namespace for custom tags you've registered.

You can also filter by tag types using "item", "block", or "entity".

In Skript since
2.10
ID
ExprTag
View 8 examples
minecraft tag "dirt" # minecraft:dirt
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

Tag Namespaced Key

  • expressions
  • Skript 2.10
[the] [namespace[d]] key[s] of %minecraft tags%%minecraft tags%'[s] [namespace[d]] key[s]

The namespaced key of a minecraft tag. This takes the form of "namespace:key", e.g. "minecraft:dirt".

Returns
text
In Skript since
2.10
ID
ExprTagKey
View 2 examples
broadcast namespaced keys of the tags of player's tool
if the key of {_my-tag} is "minecraft:stone":
	return true

Tags Contents

  • expressions
  • Skript 2.10
[the] tag (contents|values) of %minecraft tag%%minecraft tag%'[s] tag (contents|values)

Returns all the values that a tag contains.

For item and block tags, this will return items. For entity tags, it will return entity datas (a creeper, a zombie).

Returns
object
In Skript since
2.10
ID
ExprTagContents
View 2 examples
broadcast tag values of minecraft tag "dirt"
broadcast (first element of player's tool's block tags)'s tag contents

Tags of X

  • expressions
  • Skript 2.10
[all [[of] the]|the] [minecraft|datapack|paper|(custom|skript)] [item|block|entity [type]] tags of %item types/blocks/block datas/entities/entity types%%item types/blocks/block datas/entities/entity types%'[s] [minecraft|datapack|paper|(custom|skript)] [item|block|entity [type]] tags

Returns all the tags of an item, block, or entity.

`minecraft tag` will return only the vanilla tags, `datapack tag` will return only datapack-provided tags, `paper tag` will return only Paper's custom tags (if you are running Paper), and `custom tag` will look in the "skript" namespace for custom tags you've registered.

You can also filter by tag types using "item", "block", or "entity".

In Skript since
2.10
ID
ExprTagsOf
View 3 examples
broadcast minecraft tags of dirt
send true if paper item tags of target block contains paper tag "doors"
broadcast the block tags of player's tool

Tamer

  • expressions
  • Skript 2.2-dev25
[the] tamer

The tamer of an entity. Can only be used in entity tame events. You can use 'event-entity' to refer tamed entity itself.

Returns
player
In Skript since
2.2-dev25
ID
ExprTamer
View example
on tame:
	if the tamer is a player:
		send "someone tamed something!" to console

Target

  • expressions
  • Skript 1.4.2, 2.7
[the] target[[ed] %entity type%] [of %living entities%] [ignoring blocks] [[with|at] [a] ray[ ]size [of] %number%]%living entities%'[s] target[[ed] %entity type%] [ignoring blocks] [[with|at] [a] ray[ ]size [of] %number%]

For players this is the entity at the crosshair.

For mobs and experience orbs this is the entity they are attacking/following (if any).

The 'ray size' and 'ignoring blocks' options are only valid for players' targets.

The 'ray size' option effectively increases the area around the crosshair an entity can be in. It does so by expanding the hitboxes of entities by the given amount. Display entities have a hit box of 0, so using the 'ray size' option can be helpful when targeting them.

May grab entities in unloaded chunks.

Returns
entity
In Skript since
1.4.2, 2.7 (Reset), 2.8.0 (ignore blocks, ray size)
ID
ExprTarget
View 4 examples
on entity target:
	if entity's target is a player:
		send "You're being followed by an %entity%!" to target of entity
reset target of entity # Makes the entity target-less
delete targeted entity of player # for players it will delete the target
delete target of last spawned zombie # for entities it will make them target-less

Targeted Block

  • expressions
  • Skript 1.0, 2.9.0
[the] [(actual[ly]|exact)] target[ed] block[s] [of %living entities%]%living entities%'[s] [(actual[ly]|exact)] target[ed] block[s]

The block at the crosshair. This regards all blocks that are not air as fully solid, e.g. torches will be like a solid stone block for this expression.

The actual target block will regard the actual hit box of the block.

Returns
block
In Skript since
1.0, 2.9.0 (actual/exact)
ID
ExprTargetedBlock
View 8 examples
set target block of player to stone
set target block of player to oak_stairs[waterlogged=true]
break target block of player using player's tool
give player 1 of type of target block
teleport player to location above target block
kill all entities in radius 3 around target block of player
set {_block} to actual target block of player
break actual target block of player

Teleport Cause

  • expressions
  • Skript 2.2-dev35
[the] teleport (cause|reason|type)

The teleport cause within a player teleport event.

In Skript since
2.2-dev35
ID
ExprTeleportCause
View example
on teleport:
	teleport cause is nether portal, end portal or end gateway
	cancel event

Temperature

  • expressions
  • Skript 2.2-dev35
[the] temperature[s] of %blocks%%blocks%'[s] temperature[s]

Temperature at given block.

Returns
number
In Skript since
2.2-dev35
ID
ExprTemperature
View example
message "%temperature of the targeted block%"

Ternary

  • expressions
  • Skript 2.2-dev36
%objects% if <.+>[,] (otherwise|else) %objects%

A shorthand expression for returning something based on a condition.

Returns
object
In Skript since
2.2-dev36
ID
ExprTernary
View example
set {points} to 500 if {admin::%player's uuid%} is set else 100

Text Display Alignment

  • expressions
  • Skript 2.10
[the] text alignment[s] [of %entities%]%entities%'[s] text alignment[s]

Returns or changes the alignment setting of text displays.

In Skript since
2.10
ID
ExprTextDisplayAlignment
View example
set text alignment of the last spawned text display to left aligned

Text Display Line Width

  • expressions
  • Skript 2.10
[the] line width[s] [of %entities%]%entities%'[s] line width[s]

Returns or changes the line width of text displays. Default is 200.

Returns
integer
In Skript since
2.10
ID
ExprTextDisplayLineWidth
View example
set the line width of the last spawned text display to 300

Text Display Opacity

  • expressions
  • Skript 2.10, 2.14
[the] [text] opacit(y|ies) [of %entities%]%entities%'[s] [text] opacit(y|ies)

Returns or changes the text opacity of text displays. The default is 255, fully opaque.

Values are between 0 and 255. 0 to 3 are treated the same as 255, meaning fully opaque.

Values from 4 to 26 are fully transparent, and opacity increases linearly from there up to 255.

For backwards compatability, setting negative values between -1 and -128 wrap around, so -1 is the same as 255 and -128 is the same as 128.

Adding or subtracting values will adjust the opacity within the bounds of 0-255, so subtracting 300 wil always result in an opacity of 0.

Returns
integer
In Skript since
2.10, 2.14 (0-255)
ID
ExprTextDisplayOpacity
View 4 examples
set the text opacity of the last spawned text display to 0 # fully opaque
set text opacity of all text displays to 255 # fully opaque
set text opacity of all text displays to 128 # semi-transparent
set text opacity of all text displays to 4 # fully transparent

Text Of

  • expressions
  • Skript 2.10
[the] text[s] [of %entities%]%entities%'[s] text[s]

Returns or changes the text/string of displays.

Note that currently you can only use Skript chat codes when running Paper.

Returns
text
In Skript since
2.10
ID
ExprTextOf
View example
set text of the last spawned text display to "example"

Text Replacement

  • expressions
  • Skript 2.16
%texts% where [([the] first instance[s]|all instances) of] %texts% (is|are) replaced with %text% [using regex|with case sensitivity]%texts% where [([the] first instance[s]|all instances) of] regex [pattern[s]] %texts% (is|are) replaced with %text%

Performs a text replacement on a given value, returning the result. Supports regex and case sensitive replacement.

Returns
text
In Skript since
2.16
ID
ExprReplace
View 4 examples
send "Welcome [player]" where "[player]" is replaced with "%player%" to player
# Function for sanitizing user inputs
# Strips the input of any non-alphanumeric characters using regex
function sanitizeInput(input: string) :: string:
	return {_input} where regex pattern "\W" is replaced with ""
# Function to convert &# hex color codes to <# > (mini message format)
function colorFormat(input: string) :: string:
	return {_input} where all instances of regex pattern "&#([a-fA-F0-9]{6})" are replaced with "<#$1>"
# Very simple chat censor
on chat:
	set message to message where all instances of "idiot", "noob" are replaced with "****"
	set message to message where regex "\b(idiot|noob)\b" is replaced with "****" # Regex version using word boundaries for better results

The Egg

  • expressions
  • Skript 2.7
[the] [thrown] egg

The egg thrown in a Player Egg Throw event.

Returns
entity
In Skript since
2.7
ID
ExprEgg
View example
spawn an egg at the egg

Time

  • expressions
  • Skript 1.0
[the] time[s] [([with]in|of) %worlds%]%worlds%'[s] time[s]

The time of a world.

Use the "minecraft timespan" syntax to change the time according to Minecraft's time intervals.

Since Minecraft uses discrete intervals for time (ticks), changing the time by real-world minutes or real-world seconds only changes it approximately.

Removing an amount of time from a world's time will move the clock forward a day.

Returns
time
In Skript since
1.0
ID
ExprTime
View 3 examples
set time of world "world" to 2:00
add 2 minecraft hours to time of world "world"
add 54 real seconds to time of world "world" # approximately 1 minecraft hour

Time Lived of Entity

  • expressions
  • Skript 2.13
[the] time (alive|lived) of %entities%%entities%'[s] time (alive|lived)

Returns the total amount of time the entity has lived.

Note: This does not reset when a player dies.

Returns
time span
In Skript since
2.13
ID
ExprTimeLived
View 2 examples
clear all entities where [input's time lived > 1 hour]
on right click on entity:
	send "%entity% has lived for %time lived of entity%" to player

Time Played

  • expressions
  • Skript 2.5, 2.7
[the] time played of %offline players%%offline players%'[s] time played

The amount of time a player has played for on the server. This info is stored in the player's statistics in the main world's data folder. Changing this will also change the player's stats which can be views in the client's statistics menu.

Using this expression on offline players on Minecraft 1.14 and below will return nothing <none>.

Returns
time span
Requires
MC 1.15+ (offline players)
In Skript since
2.5, 2.7 (offline players)
ID
ExprTimePlayed
View 3 examples
set {_t} to time played of player
if player's time played is greater than 10 minutes:
	give player a diamond sword
set player's time played to 0 seconds

Time Since/Until

  • expressions
  • Skript 2.5, 2.10
[the] time (since|until) %dates%[the] (elapsed time|time until) (since|until) %dates%

The time since a date has passed or the time until a date will pass.

This expression will return 0 seconds if the time since or time until would be negative, e.g. if one tries to get the time since a future date.

Returns
time span
In Skript since
2.5, 2.10 (time until)
ID
ExprTimeSince
View 2 examples
send "%time since 5 minecraft days ago% has passed since 5 minecraft days ago!" to player
send "%time until {countdown::end}% until the game begins!" to player

Timespan Details

  • expressions
  • Skript 2.9.0
[the] (ticks|seconds|minutes|hours|days|weeks|months|years) of %time spans%

Retrieve specific information of a timespan such as hours/minutes/etc.

Returns
number
In Skript since
2.9.0
ID
ExprTimespanDetails
View 2 examples
set {_t} to difference between now and {Payouts::players::%uuid of player%::last-date}
send "It has been %days of {_t}% day(s) since last payout."

Title

  • expressions
  • Skript 2.16
[the] title[s] of %objects%%objects%'[s] title[s]

Represents the title of something.

Returns
text
In Skript since
2.16
ID
PropExprTitle
View 2 examples
set title of event-bossbar to "<red>hello!"
on inventory click:
	if type of event-item is written book:
		set title of event-item to formatted "<obf>%random uuid%"
		send "Your book's title is now forever forgotten.." to player

Tool

  • expressions
  • Skript 1.0
[the] (tool|held item|weapon) [of %living entities%]%living entities%'[s] (tool|held item|weapon)[the] off[ ]hand (tool|item) [of %living entities%]%living entities%'[s] off[ ]hand (tool|item)

The item an entity is holding in their main or off hand.

Returns
slot
In Skript since
1.0
ID
ExprTool
View 4 examples
player's tool is tagged with minecraft tag "pickaxes"
player's off hand tool is a shield
set tool of all players to a diamond sword
set offhand tool of target entity to a bow

Total Experience

  • expressions
  • Skript 2.7
[the] [total] experience of %entities%%entities%'[s] [total] experience

The total experience, in points, of players or experience orbs.

Adding to a player's experience will trigger Mending, but setting their experience will not.

Returns
integer
In Skript since
2.7
ID
ExprTotalExperience
View 3 examples
set total experience of player to 100
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

TPS (ticks per second)

  • expressions
  • Skript 2.2-dev36
tps from [the] last ([1] minute|1[ ]m[inute])tps from [the] last 5[ ]m[inutes]tps from [the] last 15[ ]m[inutes][the] tps

Returns the 3 most recent TPS readings, like the /tps command. This expression is only supported on some server software (PaperSpigot).

Returns
number
In Skript since
2.2-dev36
ID
ExprTPS
View example
broadcast "%tps%"

Transform Reason

  • expressions
  • Skript 2.8.0
[the] transform[ing] (cause|reason|type)

The transform reason within an entity entity transform event.

In Skript since
2.8.0
ID
ExprTransformReason
View example
on entity transform:
	transform reason is infection, drowned or frozen

Transformed List

  • expressions
  • Skript 2.10
%objects% (transformed|mapped) (using|with) [<.+>]%objects% (transformed|mapped) (using|with) (<.+>)

Transforms (or 'maps') a list's values using a given expression. This is akin to looping over the list and getting a modified version of each value.

If the given expression returns a single value, the indices of the list will not change. If the expression returns multiple values, then then indices will be reset as a single index cannot contain multiple values.

Returns
object
In Skript since
2.10
ID
ExprTransform
View 2 examples
set {_a::*} to (1, 2, and 3) transformed using (input * 2 - 1, input * 2)
# {_a::*} is now 1, 2, 3, 4, 5, and 6
# get a list of the sizes of all clans without manually looping
set {_clan-sizes::*} to keyed {clans::*} transformed using [{clans::%input index%::size}]
# using the 'keyed' expression retains the indices of the clans list

Type of

  • expressions
  • Skript 1.4, 2.5.2
[the] type of %entity types/item types/potion effects/block datas/entities/blocks%%entity types/item types/potion effects/block datas/entities/blocks%'[s] type

Type of a block, item, entity, inventory, potion effect or enchantment type.

Types of items, blocks and block datas are item types similar to them but have amounts

of one, no display names and, on Minecraft 1.13 and newer versions, are undamaged.

Types of entities and inventories are entity types and inventory types known to Skript.

Types of potion effects are potion effect types.

Types of enchantment types are enchantments.

Returns
object
In Skript since
1.4, 2.5.2 (potion effect), 2.7 (block datas), 2.10 (enchantment type)
ID
ExprTypeOf
View example
on rightclick on an entity:
	message "This is a %type of clicked entity%!"

Typed Argument

  • expressions
[the] <.+>( |-)arg[ument][( |-)<\d+>][the] arg[ument]( |-)<.+>[( |-)<\d+>]

No matching entry in Skript's documentation.

Returns
object
ID
ExprTypedArgument

Unix Date

  • expressions
  • Skript 2.5
[the] unix date of %numbers%%numbers%'[s] unix date

Converts given Unix timestamp to a date. The Unix timespan represents the number of seconds elapsed since 1 January 1970.

Returns
date
In Skript since
2.5
ID
ExprUnixDate
View example
unix date of 946684800 #1 January 2000 12:00 AM (UTC Time)

Unix Timestamp

  • expressions
  • Skript 2.2-dev31
[the] unix timestamp of %dates%%dates%'[s] unix timestamp

Converts given date to Unix timestamp. This is roughly how many seconds have elapsed since 1 January 1970.

Returns
number
In Skript since
2.2-dev31
ID
ExprUnixTicks
View example
unix timestamp of now

Unknown Command Message

  • expressions
  • Skript 2.17
[the] (unknown|non-existent) command message

The message sent to a player when executing an unknown command.

Returns
text
In Skript since
2.17
ID
ExprUnknownCommandMessage
View example
	on unknown command execution:
		add 1 to {-command_fails::%player%}
		wait 30 seconds:
			remove 1 from {-command_fails::%player%}
		if {-command_fails::%player%} is greater than or equal to 5:
			push the player upwards
			set the unknown command message to "<red>You are executing too many unknown commands too fast!"

Unleash Reason

  • expressions
  • Skript 2.10
[the] unleash[ing] reason

The unleash reason in an unleash event.

In Skript since
2.10
ID
ExprUnleashReason
View example
if the unleash reason is distance:
	broadcast "The leash was snapped in half."

UUID

  • expressions
  • Skript 2.1.2, 2.2
[the] uuid[s] of %offline players/worlds/entities%%offline players/worlds/entities%'[s] uuid[s]

The UUID of a player, entity or world.

Returns
uuid
In Skript since
2.1.2, 2.2 (offline players' uuids), 2.2-dev24 (other entities' uuids)
ID
ExprUUID
View 2 examples
# prevents people from joining the server if they use the name of a player
# who has played on this server at least once since this script has been added
on login:
	if {uuid::%name of player%} exists:
		{uuid::%name of player%} is not uuid of player
		kick player due to "Someone with your name has played on this server before"
	else:
		set {uuid::%name of player%} to uuid of player
command /what-is-my-uuid:
	trigger:
		set {_uuid} to uuid of player
		send "Your UUID is '%string within {_uuid}%'"

Value

  • expressions
  • Skript 2.10
[the] [<.+>] value of %nodes%%nodes%'[s] [<.+>] value

Returns the value of something that has a value, e.g. a node in a config.

The value is automatically converted to the specified type (e.g. text, number) where possible.

Returns
object
In Skript since
2.10
ID
PropExprValueOf
View example
set {_node} to node "update check interval" in the skript config

broadcast text value of {_node}
# text value of {_node} = "12 hours" (text)

wait for {_node}'s timespan value
# timespan value of {_node} = 12 hours (duration)

Value of Subnode

  • expressions
  • Skript 2.10
[the] <.+> value [at] %text% (from|in) %node/script%

Returns the value of an sub-node of the given node, following the provided path.

The value is automatically converted to the specified type (e.g. text, number) where possible.

Returns
object
In Skript since
2.10
ID
ExprSubnodeValue
View example
set {_node} to node "language" in the skript config
broadcast the text value of {_node}

Vector Rotate Around Another

  • expressions
%vectors% rotated around %vector% by %number% [degrees]

No matching entry in Skript's documentation.

Returns
vector
ID
ExprVectorRotateAroundAnother

Vectors - Angle Between

  • expressions
  • Skript 2.2-dev28
[the] angle between [[the] vectors] %vector% and %vector%

Gets the angle between two vectors.

Returns
number
In Skript since
2.2-dev28
ID
ExprVectorAngleBetween
View example
send "%the angle between vector 1, 0, 0 and vector 0, 1, 1%"

Vectors - Create from Direction

  • expressions
  • Skript 2.8.0
vector[s] [from] %directions%%directions% vector[s]

Creates vectors from given directions.

Relative directions are relative to the origin, (0, 0, 0). Therefore, the vector from the direction 'forwards' is (0, 0, 1).

Returns
vector
In Skript since
2.8.0
ID
ExprVectorFromDirection
View 5 examples
set {_v} to vector from direction upwards
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

Vectors - Create from XYZ

  • expressions
  • Skript 2.2-dev28
[a] [new] vector [(from|at|to)] %number%,[ ]%number%(,[ ]| and )%number%

Creates a vector from x, y and z values.

Returns
vector
In Skript since
2.2-dev28
ID
ExprVectorFromXYZ
View example
set {_v} to vector 0, 1, 0

Vectors - Create Location from Vector

  • expressions
  • Skript 2.2-dev28
%vector% to location in %world%location (from|of) %vector% in %world%%vector% [to location] in %world% with yaw %number% and pitch %number%location (from|of) %vector% in %world% with yaw %number% and pitch %number%

Creates a location from a vector in a world.

Returns
location
In Skript since
2.2-dev28
ID
ExprLocationFromVector
View 3 examples
set {_loc} to {_v} to location in world "world"
set {_loc} to {_v} to location in world "world" with yaw 45 and pitch 90
set {_loc} to location of {_v} in "world" with yaw 45 and pitch 90

Vectors - Cross Product

  • expressions
  • Skript 2.2-dev28
%vector% cross %vector%

Gets the cross product between two vectors.

Returns
vector
In Skript since
2.2-dev28
ID
ExprVectorCrossProduct
View example
send "%vector 1, 0, 0 cross vector 0, 1, 0%"

Vectors - Cylindrical Shape

  • expressions
  • Skript 2.2-dev28
[a] [new] cylindrical vector [(from|with)] [radius] %number%, [yaw] %number%(,|[,] and) [height] %number%

Forms a 'cylindrical shaped' vector using yaw to manipulate the current point.

Returns
vector
In Skript since
2.2-dev28
ID
ExprVectorCylindrical
View 2 examples
loop 360 times:
	set {_v} to cylindrical vector radius 1, yaw loop-value, height 2
set {_v} to cylindrical vector radius 1, yaw 90, height 2

Vectors - Dot Product

  • expressions
  • Skript 2.2-dev28
%vector% dot %vector%

Gets the dot product between two vectors.

Returns
number
In Skript since
2.2-dev28
ID
ExprVectorDotProduct
View example
set {_dot} to {_v1} dot {_v2}

Vectors - Length

  • expressions
  • Skript 2.2-dev28
[the] (vector|standard|normal) length[s] of %vectors%%vectors%'[s] (vector|standard|normal) length[s]

Gets or sets the length of a vector.

Returns
number
In Skript since
2.2-dev28
ID
ExprVectorLength
View 4 examples
send "%standard length of vector 1, 2, 3%"
set {_v} to vector 1, 2, 3
set standard length of {_v} to 2
send "%standard length of {_v}%"

Vectors - Location Vector Offset

  • expressions
  • Skript 2.2-dev28, 2.14
%location% offset by [[the] vectors] %vectors% [using local axes]%location%[ ]~[~][ ]%vectors%

Returns the location offset by vectors. Supports both global and local axes. When using local axes, the vector is applied relative to the direction the location is facing.

Returns
location
In Skript since
2.2-dev28, 2.14 (local axes)
ID
ExprLocationVectorOffset
View 2 examples
set {_loc} to {_loc} ~ {_v}
# spawn a tnt 5 blocks in front of player
set {_l} to player's location offset by vector(0, 1, 5) using local axes
spawn tnt at {_l}

Vectors - Normalized

  • expressions
  • Skript 2.2-dev28
normali(z|s)e[d] %vectors%%vectors% normali(z|s)ed

Returns the same vector but with length 1.

Returns
vector
In Skript since
2.2-dev28
ID
ExprVectorNormalize
View 2 examples
set {_v} to normalized {_v}
set {_v} to normalised {_u}

Vectors - Random Vector

  • expressions
  • Skript 2.2-dev28, 2.7
[a] random vector

Creates a random unit vector.

Returns
vector
In Skript since
2.2-dev28, 2.7 (signed components)
ID
ExprVectorRandom
View example
set {_v} to a random vector

Vectors - Spherical Shape

  • expressions
  • Skript 2.2-dev28
[a] [new] spherical vector [(from|with)] [radius] %number%, [yaw] %number%(,|[,] and) [pitch] %number%

Forms a 'spherical shaped' vector using yaw and pitch to manipulate the current point.

Returns
vector
In Skript since
2.2-dev28
ID
ExprVectorSpherical
View 2 examples
loop 360 times:
	set {_v} to spherical vector radius 1, yaw loop-value, pitch loop-value
set {_v} to spherical vector radius 1, yaw 45, pitch 90

Vectors - Squared Length

  • expressions
  • Skript 2.2-dev28
[the] squared length[s] of %vectors%%vectors%'[s] squared length[s]

Gets the squared length of a vector.

Returns
number
In Skript since
2.2-dev28
ID
ExprVectorSquaredLength
View example
send "%squared length of vector 1, 2, 3%"

Vectors - Vector Between Locations

  • expressions
  • Skript 2.2-dev28
[the] vector (from|between) %location% (to|and) %location%

Creates a vector between two locations.

Returns
vector
In Skript since
2.2-dev28
ID
ExprVectorBetweenLocations
View example
set {_v} to vector between {_loc1} and {_loc2}

Vectors - Vector from Location

  • expressions
  • Skript 2.2-dev28
[the] vector (of|from|to) %locations%%locations%'[s] vector

Creates a vector from a location.

Returns
vector
In Skript since
2.2-dev28
ID
ExprVectorOfLocation
View example
set {_v} to vector of {_loc}

Vectors - Vector from Yaw and Pitch

  • expressions
  • Skript 2.2-dev28
[a] [new] vector (from|with) yaw %number% and pitch %number%

Creates a vector from a yaw and pitch value.

Returns
vector
In Skript since
2.2-dev28
ID
ExprVectorFromYawAndPitch
View example
set {_v} to vector from yaw 45 and pitch 45

Vectors - Vector Projection

  • expressions
  • Skript 2.8.0
[vector] projection [of] %vector% on[to] %vector%

An expression to get the vector projection of two vectors.

Returns
vector
In Skript since
2.8.0
ID
ExprVectorProjection
View example
set {_projection} to vector projection of vector(1, 2, 3) onto vector(4, 4, 4)

Vehicle

  • expressions
  • Skript 2.0
[the] vehicle[s] [of %entities%]%entities%'[s] vehicle[s]

The vehicle an entity is in, if any.

This can actually be any entity, e.g. spider jockeys are skeletons that ride on a spider, so the spider is the 'vehicle' of the skeleton.

See also: passenger

Returns
entity
In Skript since
2.0
ID
ExprVehicle
View 2 examples
set the vehicle of {game::players::*} to a saddled pig
give {game::players::*} a carrot on a stick
on vehicle enter:
	vehicle is a horse
	add 1 to {statistics::horseMounting::%uuid of player%}

Velocity

  • expressions
  • Skript 2.2-dev31
[the] velocit(y|ies) of %entities/directional particle effects%%entities/directional particle effects%'[s] velocit(y|ies)

Gets or changes velocity of an entity or particle.

Setting the velocity of a particle will remove its random dispersion and force it to be a single particle.

Returns
vector
In Skript since
2.2-dev31
ID
ExprVelocity
View 3 examples
set player's velocity to {_v}
set the velocity of {_particle} to vector(0, 1, 0)
if the vector length of the player's velocity is greater than 5:
    send "You're moving fast!" to the player

Version

  • expressions
  • Skript 2.0
([craft]bukkit|minecraft|skript)( |-)version

The version of Bukkit, Minecraft or Skript respectively.

Returns
text
In Skript since
2.0
ID
ExprVersion
View 2 examples
message "This server is running Minecraft %minecraft version% on Bukkit %bukkit version%"
message "This server is powered by Skript %skript version%"

Version String

  • expressions
  • Skript 2.3
[the] [shown|custom] version [string|text]

The text to show if the protocol version of the server doesn't match with protocol version of the client. You can check the protocol version expression for more information about this.

This can only be set in a server list ping event.

Returns
text
In Skript since
2.3
ID
ExprVersionString
View example
on server list ping:
	set the protocol version to 0 # 13w41a (1.7), so it will show the version string always
	set the version string to "&lt;light green&gt;Version: &lt;orange&gt;%minecraft version%"

View Distance

  • expressions
  • Skript 2.4, 2.11
[the] view distance[s] of %players/worlds%%players/worlds%'[s] view distance[s]

The view distance of a world or a player.

The view distance of a player is the distance in chunks sent by the server to the player. This has nothing to do with client side view distance settings.

View distance is capped between 2 to 32 chunks.

Returns
integer
In Skript since
2.4, 2.11 (worlds)
ID
ExprViewDistance
View 4 examples
set view distance of player to 10
add 50 to the view distance of world "world"
reset the view distance of player
clear the view distance of world "world"

View Distance of Client

  • expressions
  • Skript 2.5
[the] client view distance[s] of %players%%players%'[s] client view distance[s]

The view distance of the client. Can not be changed. This differs from the server side view distance of player as this will retrieve the view distance the player has set on their client.

Returns
integer
Requires
1.13.2+
In Skript since
2.5
ID
ExprClientViewDistance
View 2 examples
set {_clientView} to the client view distance of player
set view distance of player to client view distance of player

Viewers

  • expressions
  • Skript 2.16
[the] viewer[s] of %objects%%objects%'[s] viewer[s]

Represents something that is viewing something.

Returns
player
In Skript since
2.16
ID
PropExprViewers
View 2 examples
add {_player} to viewers of event-bossbar
on inventory open:
	set {_mylist::*} to viewers of event-inventory
	send "%size of {_list::*}% other players are viewing this inventory!"

Villager Level/Experience

  • expressions
  • Skript 2.10
[the] villager (level|experience) of %living entities%%living entities%'[s] villager (level|experience)

Represents the level/experience of a villager.

The level will determine which trades are available to players (value between 1 and 5, defaults to 1).

When a villager's level is 1, they may lose their profession if they don't have a workstation.

Experience works along with the leveling system, determining which level the villager will move to.

Experience must be greater than or equal to 0.

Learn more about villager levels on Minecraft Wiki

Returns
integer
In Skript since
2.10
ID
ExprVillagerLevel
View 6 examples
set {_level} to villager level of {_villager}
set villager level of last spawned villager to 2
add 1 to villager level of target entity
remove 1 from villager level of event-entity
reset villager level of event-entity
set villager experience of last spawned entity to 100

Villager Profession

  • expressions
  • Skript 2.10
[the] villager profession[s] of %living entities%%living entities%'[s] villager profession[s]

Represents the profession of a villager/zombie villager.

In Skript since
2.10
ID
ExprVillagerProfession
View 4 examples
set {_p} to villager profession of event-entity
villager profession of event-entity = nitwit profession
set villager profession of {_villager} to librarian profession
delete villager profession of event-entity

Villager Type

  • expressions
  • Skript 2.10
[the] villager type[s] of %living entities%%living entities%'[s] villager type[s]

Represents the type of a villager/zombie villager. This usually represents the biome the villager is from.

In Skript since
2.10
ID
ExprVillagerType
View 3 examples
set {_type} to villager type of {_villager}
villager type of {_villager} = plains
set villager type of event-entity to plains

Warden Anger Level

  • expressions
  • Skript 2.11
[the] anger level [of] %living entities% towards %living entities%%living entities%'[s] anger level towards %living entities%

The anger level a warden feels towards an entity.

A warden can be angry towards multiple entities with different anger levels.

If an entity reaches an anger level of 80+, the warden will pursue it.

Anger level maxes out at 150.

Returns
integer
In Skript since
2.11
ID
ExprWardenEntityAnger
View 2 examples
set the anger level of last spawned warden towards player to 20
clear the last spawned warden's anger level towards player

Warden Most Angered At

  • expressions
  • Skript 2.11
[the] most angered entity of %living entities%%living entities%'[s] most angered entity

The entity a warden is most angry at.

A warden can be angry towards multiple entities with different anger levels.

In Skript since
2.11
ID
ExprWardenAngryAt
View example
if the most angered entity of last spawned warden is not player:
	set the most angered entity of last spawned warden to player

Warning Distance of World Border

  • expressions
  • Skript 2.11
[the] world[ ]border warning distance [of %world borders%]%world borders%'[s] world[ ]border warning distance

The warning distance of a world border. The player's screen will be tinted red when they are within this distance of the border.

Players only see a red tint when approaching a world's worldborder and the warning distance has to be an integer greater than or equal to 0.

Returns
integer
In Skript since
2.11
ID
ExprWorldBorderWarningDistance
View example
set world border warning distance of {_worldborder} to 1

Warning Time of World Border

  • expressions
  • Skript 2.11
[the] world[ ]border warning time [of %world borders%]%world borders%'[s] world[ ]border warning time

The warning time of a world border. If the border is shrinking, the player's screen will be tinted red once the border will catch the player within this time period.

Returns
time span
In Skript since
2.11
ID
ExprWorldBorderWarningTime
View example
set world border warning time of {_worldborder} to 1 second

Weather

  • expressions
  • Skript 1.0
[the] weather [(in|of) %players/worlds%][the] (custom|client) weather [of %players%]%players/worlds%'[s] weather%players%'[s] (custom|client) weather

The weather of a world or player.

Clearing or resetting the weather of a player will make the player's weather match the weather of the world.

Clearing or resetting the weather of a world will make the weather clear.

In Skript since
1.0
ID
ExprWeather
View 4 examples
set weather to clear
weather in "world" is rainy
reset custom weather of player
set weather of player to clear

Whether

  • expressions
  • Skript 2.9.0
whether <.+>

A shorthand for returning the result of a condition (true or false). This is functionally identical to using 'true if <condition> else false'.

Many conditions also support being changed through this expression, typically using 'set'.

Returns
boolean
In Skript since
2.9.0, 2.17 (changing)
ID
ExprWhether
View 4 examples
set {fly} to whether player can fly
broadcast "Flying: %whether player is flying%"
set whether the player can fly to true
toggle whether the player can pick up items

Whitelist

  • expressions
  • Skript 2.5.2, 2.9.0
[the] white[ ]list[ed players]

An expression for obtaining and modifying the server's whitelist.

Players may be added and removed from the whitelist.

The whitelist can be enabled or disabled by setting the whitelist to true or false respectively.

In Skript since
2.5.2, 2.9.0 (delete)
ID
ExprWhitelist
View 3 examples
set the whitelist to false
add all players to whitelist
reset the whitelist

With Fire Resistance

  • expressions
  • Skript 2.9.0
%item types% with[out] fire[ ]resistancefire resistant %item types%

Creates a copy of an item with (or without) fire resistance.

Returns
item type
Requires
Spigot 1.20.5+
In Skript since
2.9.0
ID
ExprItemWithFireResistance
View 3 examples
set {_x} to diamond sword with fire resistance
equip player with netherite helmet without fire resistance
drop fire resistant stone at player

World

  • expressions
  • Skript 1.0
[the] world of %locations/entities/chunks%%locations/entities/chunks%'[s] world

The world the event occurred in.

Returns
world
In Skript since
1.0
ID
ExprWorld
View 4 examples
world is "world_nether"
teleport the player to the world's spawn
set the weather in the player's world to rain
set {_world} to world of event-chunk

World Border

  • expressions
  • Skript 2.11
[the] world[ ]border [of %worlds/players%]%worlds/players%'[s] world[ ]border

Get the border of a world or a player.

A player's world border is not persistent. Restarts, quitting, death or changing worlds will reset the border.

In Skript since
2.11
ID
ExprWorldBorder
View example
set {_border} to world border of player's world

World Environment

  • expressions
  • Skript 2.7
[the] [world] environment[s] of %worlds%%worlds%'[s] [world] environment[s]

The environment of a world

In Skript since
2.7
ID
ExprWorldEnvironment
View example
if environment of player's world is nether:
	apply fire resistance to player for 10 minutes

World from Name

  • expressions
  • Skript 2.6.1
[the] world [(named|with name)] %text%

Returns the world from a string.

Returns
world
In Skript since
2.6.1
ID
ExprWorldFromName
View 2 examples
world named {game::world-name}
the world "world"

World Seed

  • expressions
  • Skript 2.2-dev35
[the] seed[s] (from|of) %worlds%%worlds%'[s] seed[s]

The seed of given world. Note that it will be returned as Minecraft internally treats seeds, not as you specified it in world configuration.

Returns
integer
In Skript since
2.2-dev35
ID
ExprSeed
View example
broadcast "Seed: %seed of player's world%"

Worlds

  • expressions
  • Skript 1.0
[(all [[of] the]|the)] worlds

All worlds of the server, useful for looping.

Returns
world
In Skript since
1.0
ID
ExprWorlds
View example
loop all worlds:
	broadcast "You're in %loop-world%" to loop-world

WXYZ Component/Coordinate

  • expressions
  • Skript 2.2-dev28, 2.10
[the] (w|x|y|z)( |-)[component[s]|coord[inate][s]|(pos[ition[s]]|loc[ation][s])] of %objects%%objects%'[s] (w|x|y|z)( |-)[component[s]|coord[inate][s]|(pos[ition[s]]|loc[ation][s])]

Gets or changes the W, X, Y or Z component of anything with these components/coordinates, like locations, vectors, or quaternions.

The W axis is only used for quaternions, currently.

Returns
number
In Skript since
2.2-dev28, 2.10 (quaternions)
ID
PropExprWXYZ
View 2 examples
set {_v} to vector(1, 2, 3)
send "%x of {_v}%, %y of {_v}%, %z of {_v}%"
add 1 to x of {_v}
add 2 to y of {_v}
add 3 to z of {_v}
send "%x of {_v}%, %y of {_v}%, %z of {_v}%"
set x component of {_v} to 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

X of Item/Entity Type

  • expressions
  • Skript 1.2
%number% of %items/item types/entity types%

An expression for using an item or entity type with a different amount.

Returns
object
In Skript since
1.2
ID
ExprXOf
View example
give level of player of iron pickaxes to the player

X Times

  • expressions
  • Skript 1.4.6
%number% time[s](once|twice|thrice)

Integers between 1 and X, used in loops to loop X times.

Returns
integer
In Skript since
1.4.6
ID
ExprTimes
View example
loop 20 times:
	broadcast "%21 - loop-number% seconds left.."
	wait 1 second

Yaw / Pitch

  • expressions
  • Skript 2.0, 2.2-dev28
[the] (yaw|pitch)[s] of %entities/locations%%entities/locations%'[s] (yaw|pitch)[s]

The yaw or pitch of a location or vector.

A yaw of 0 or 360 represents the positive z direction. Adding a positive number to the yaw of a player will rotate it clockwise.

A pitch of 90 represents the negative y direction, or downward facing. A pitch of -90 represents upward facing. Adding a positive number to the pitch will rotate the direction downwards.

Only Paper 1.19+ users may directly change the yaw/pitch of players.

Returns
number
In Skript since
2.0, 2.2-dev28 (vector yaw/pitch), 2.9.0 (entity changers)
ID
ExprYawPitch
View 5 examples
log "%player%: %location of player%, %player's yaw%, %player's pitch%" to "playerlocs.log"
set {_yaw} to yaw of player
set {_p} to pitch of target entity
set pitch of player to -90 # Makes the player look upwards, Paper 1.19+ only
add 180 to yaw of target of player # Makes the target look behind themselves

Generated from NeoSkript 0.1.0-SNAPSHOT's registry on Paper 26.3. Descriptions and examples from Skript's documentation (Skript 2.17.0), GPL-3.0. 1172 of 1205 entries matched one of its entries by id, event name or pattern; the rest show only their patterns.