| Patterns: |
|
| Since: | 2.11 |
Examples:
disallow last spawned to duplicate
| Patterns: |
|
| Since: | 2.13 |
| Usable in events: | Brewing Fuel |
Examples:
if the brewing stand will consume the fuel:
prevent the brewing stand from consuming the fuel
| Patterns: |
|
| Since: | 2.11 |
Examples:
kill last spawned camel
| Patterns: |
|
| Since: | 2.10 |
Examples:
entity can't age
broadcast "An immortal has been born!" to player
| Patterns: |
|
| Since: | 2.10 |
Examples:
event-entity can't breed
send "Turns out %event-entity% is not breedable. Must be a Skript user!" to player
| Patterns: |
|
| Since: | 2.0 |
| Requirements: | Supported regions plugin |
This condition requires a supported regions plugin to be installed.
Examples:
description: set the block at your crosshair to a different type
trigger:
player cannot build at the targeted block:
message "You do not have permission to change blocks there!"
stop
set the targeted block to argument
| Patterns: |
|
| Since: | 2.11 |
More information on what and when entities despawn can be found at reference.
Examples:
make last spawned entity not despawn on chunk unload
| Patterns: |
|
| Since: | 1.0 |
Examples:
player has enough space for 64 feathers
| Patterns: |
|
| Since: | 2.8.0 |
Examples:
send "You can pick up items!" to player
on drop:
if player can't pick up items:
send "Be careful, you won't be able to pick that up!" to player
| Patterns: | |
| Since: | 2.3, 2.10 (entities) |
| Requirements: | Minecraft 1.19+ (entities) |
Examples:
message "who dat?"
if the player can see the last spawned entity:
message "hello there!"
| Patterns: | |
| Since: | 2.10 |
Examples:
send "Find the red word in <red>this<reset> message."
else:
send "You cannot partake in finding the colored word."
| Patterns: | |
| Since: | 2.10 |
Examples:
send "You can see all messages."
if player can only see commands:
send "This game doesn't work with commands-only chat."
if player can't see any messages:
send action bar "Server shutting down in 5 minutes!"
| Patterns: |
|
| Since: | 1.0 |
Valid values are between 0% and 100%, or if the percent sign is omitted between 0 and 1.
Examples:
drop a diamond
chance of {chance}% # {chance} between 0 and 100
chance of {chance} # {chance} between 0 and 1
| Patterns: |
|
| Since: | 1.0 |
Note: This is the only element where not all patterns are shown. It has actually another two sets of similar patters, but with
(was|were) or will be instead of (is|are) respectively, which check different time states of the first expression. Examples:
time in the player's world is greater than 8:00
the creature is not an enderman or an ender dragon
| Patterns: |
|
| Since: | 1.0 |
Examples:
player has 4 flint and 2 iron ingots
{list::*} contains 5
| Patterns: |
|
| Since: | 2.0 |
Examples:
on damage:
damage was caused by lava, fire or burning
victim is a player
victim has a potion of fire resistance
cancel event
apply fire resistance to the victim for 30 seconds
remove 1 potion of fire resistance from the victim
# prevent mobs from dropping items under certain circumstances
on death:
entity is not a player
damage wasn't caused by a block explosion, an attack, a projectile, a potion, fire, burning, thorns or poison
clear drops
| Patterns: |
|
| Since: | 2.12 |
| Requirements: | Minecraft 1.20.4+ |
Examples:
if event-damage source scales damage with difficulty:
| Patterns: |
|
| Since: | 2.12 |
| Requirements: | Minecraft 1.20.4+ |
Vanilla damage sources are considered indirect if the 'causing entity' and the 'direct entity' are not the same. For example, taking damage from an arrow that was shot by an entity.
Examples:
if event-damage source was indirectly caused:
| Patterns: |
|
| Since: | 2.7 |
| Requirements: | Minecraft 1.16+ |
Examples:
| Patterns: |
|
| Since: | 2.7 |
| Usable in events: | Egg Throw |
Examples:
if an entity won't hatch:
send "Better luck next time!" to the player
| Patterns: |
|
| Since: | 2.11 |
This will return true as long as the entity that stared at the enderman is still alive.
Examples:
| Patterns: |
|
| Since: | 2.8.0 |
Examples:
send "This entity has nothing left to shear!" to player
| Patterns: | |
| Since: | 2.11 |
Examples:
release the entity storage of {_beehive}
| Patterns: | |
| Since: | 2.6.1 |
Examples:
if player is in water:
player is in lava:
player is in bubble column
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.2+ |
Examples:
add "Dispensable" to lore of {_item}
set {_component} to the equippable component of {_item}
if {_component} is not able to be dispensed:
allow {_component} to be dispensed
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.6+ |
Examples:
add "Shearable" to lore of {_item}
set {_component} to the equippable component of {_item}
if {_component} can not be sheared off:
allow {_component} to be sheared off
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.5+ |
Examples:
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.2+ |
Examples:
add "Swappable" to lore of {_item}
set {_component} to the equippable component of {_item}
if {_component} can not be equipped when right clicked:
make {_component} swappable
| Patterns: |
|
| Since: | 2.13 |
| Requirements: | Minecraft 1.21.2+ |
Examples:
add "Damageable on injury" to lore of {_item}
set {_component} to the equippable component of {_item}
if {_component} won't lose durability on injury:
make {_component} lose durability when injured
| Patterns: |
|
| Since: | 2.2-dev36 |
Examples:
if event is cancelled:
broadcast "no clicks allowed!"
| Patterns: | |
| Since: | 1.2 |
Examples:
on damage:
projectile exists
broadcast "%attacker% used a %projectile% to attack %victim%!"
| Patterns: |
|
| Since: | 2.10 |
| Usable in events: | Fishing |
Examples:
if lure enchantment bonus is applied:
cancel event
| Patterns: |
|
| Since: | 2.11 |
Examples:
make last spawned goat have both horns
if {_goat} has a right horn:
force {_goat} to not have a right horn
| Patterns: |
|
| Since: | 2.5 |
Examples:
| Patterns: | |
| Since: | 2.10 |
Examples:
send "<gray>This server may contain mature chat messages. You have been warned!" to player
| Patterns: | |
| Since: | 2.3 |
Examples:
message "Your custom weather is %player's weather%"
| Patterns: |
|
| Since: | 2.5, 2.12 (expanded data types) |
| Requirements: | Minecraft 1.21.4+ (floats/flags/strings/colours) |
Examples:
if player's tool has custom model data flags:
loop custom model data flags of player's tool:
send "Flag %loop-index%: %loop-value%"
set {_coloured} to whether player's tool has model data colours
| Patterns: |
|
| Since: | 2.8.0 |
Examples:
| Patterns: |
|
| Since: | 2.8.0 2.12 (cooldown group) |
| Requirements: | MC 1.21.2 (cooldown group) |
Examples:
send "You can't use this item right now. Wait %item cooldown of player's tool for player%"
| Patterns: |
|
| Since: | 2.9.0 |
| Requirements: | Spigot 1.20.5+ |
The 'entire tooltip' is what shows to the player when they hover an item (i.e. name, lore, etc.).
The 'additional tooltip' hides certain information from certain items (potions, maps, books, fireworks, and banners).
Examples:
if additional tooltip of {_item} is hidden:
| Patterns: |
|
| Since: | 2.8.0 |
Examples:
victim has line of sight to attacker
player has no line of sight to location 100 blocks in front of player
| Patterns: | |
| Since: | 2.10 |
Examples:
if event-block has a loot table:
# this will never happen, because it doesn't have a loot table.
set loot table of event-block to "minecraft:chests/simple_dungeon"
if event-block has a loot table:
# this will happen, because it now has a loot table.
| Patterns: |
|
| Since: | 2.2-dev36 |
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
victim has the permission "admin":
send "You're attacking an admin!" to attacker
| Patterns: |
|
| Since: | 1.4, 2.7 (multiple players) |
Examples:
player hasn't played before
| Patterns: |
|
| Since: | 2.6.1 |
Examples:
send "You are sonic!"
if all players have potion effects speed and haste:
broadcast "You are ready to MINE!"
| Patterns: | |
| Since: | 2.4 |
Examples:
| Patterns: | |
| Since: | 2.3 |
Examples:
| Patterns: |
|
| Since: | 2.5 |
Examples:
loop all players in radius 3 of the last spawned creeper
send "RUN!!!" to the loop-player
| Patterns: | |
| Since: | 2.10 |
Note that using the 'now' expression will not be in the past or future when used directly in the condition.
Examples:
wait 5 seconds
if {_date} is in the past:
# this will be true
if now is in the future:
# this will be false
set {_dates::*} to 1 day from now, 12 days from now, and 1 year from now
if {_dates::*} are in the future:
# this will be true
if {_dates::*} have passed:
# this will be false
| Patterns: |
|
| Since: | 2.10 |
Examples:
event-entity is not an adult
kill event-entity
| Patterns: | |
| Since: | 2.0, 2.4-alpha4 (non-living entity support) |
Examples:
on shoot:
while the projectile is alive:
| Patterns: |
|
| Since: | 2.10 |
Examples:
event-entity is a baby
kill event-entity
| Patterns: |
|
| Since: | 1.4 |
Examples:
victim is not IP-banned
"127.0.0.1" is banned
| Patterns: |
|
| Since: | 2.7 |
| Usable in events: | respawn |
| Requirements: | Minecraft 1.16+ |
Examples:
the respawn location is a bed
broadcast "%player% is respawning in their bed! So cozy!"
| Patterns: |
|
| Since: | 2.4 |
Examples:
{list::*} are blocks
| Patterns: | |
| Since: | 2.5 |
Examples:
send "This block is well-powered by redstone!"
if clicked block is indirectly redstone powered:
send "This block is indirectly redstone powered."
| Patterns: | |
| Since: | unknown (before 2.1) |
Examples:
victim is blocking
damage attacker by 0.5 hearts
| Patterns: | |
| Since: | 1.4.4 |
Examples:
victim is burning:
increase damage by 2
| Patterns: | |
| Since: | 2.5, 2.10 (withers, wither skulls) |
Examples:
broadcast "A charged creeper is at %location of last spawned creeper%"
| Patterns: |
|
| Since: | 2.11 |
Examples:
kill last spawned ghast
| Patterns: |
|
| Since: | 2.8.0 |
| Requirements: | Minecraft 1.17+ |
Examples:
wait a second
if the last spawned spider is climbing:
message"The spider is now climbing!"
| Patterns: | |
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | 2.11 |
Examples:
broadcast "Dance Party!"
| Patterns: |
|
| Since: | 2.11 |
Examples:
force last spawned panda to stop eating
| Patterns: |
|
| Since: | 2.2-dev36 |
Examples:
player's tool is edible
| Patterns: |
|
| Since: | unknown (before 2.1) |
Examples:
| Patterns: |
|
| Since: | 1.4.6, 2.12 ('or better') |
Examples:
if player's helmet or player's boots are enchanted with protection 3 or better:
if player's chestplate is enchanted with protection
| Patterns: |
|
| Since: | 2.10, 2.12 (tolerance) |
Examples:
if 11 cannot be evenly divided by 10:
if 0.3 can be evenly divided by 0.1 with a tolerance of 0.0000001:
| Patterns: |
|
| Since: | 2.9.0 |
| Requirements: | Spigot 1.20.5+ |
Examples:
if {_items::*} aren't resistant to fire:
| Patterns: | |
| Since: | 2.10 |
| Usable in events: | Fishing |
Open water is defined by a 5x4x5 area of water, air and lily pads. If in open water, treasure items may be caught.
Examples:
if fish hook is in open water:
send "You will catch a shark soon!"
| Patterns: |
|
| Since: | 2.2-dev36 |
Examples:
player's tool is flammable
| Patterns: | |
| Since: | 2.10 |
Examples:
| Patterns: |
|
| Since: | 2.5.1 |
Examples:
if player's tool is not fuel:
send "Please hold a valid fuel item in your hand"
cancel event
| Patterns: |
|
| Since: | 2.7 |
Examples:
| Patterns: |
|
| Since: | 2.8.0 |
Hands are raised when an entity is using an item (eg: blocking, drawing a bow, eating).
Examples:
if victim's main hand is raised:
drop player's tool at player
set player's tool to air
| Patterns: |
|
| Since: | 1.0 |
Examples:
victim isn't holding a diamond sword of sharpness
| Patterns: |
|
| Since: | 2.10 |
Examples:
if entity is in love:
broadcast "That was quick!"
| Patterns: | |
| Since: | 2.5 |
Examples:
if the explosion is fiery:
broadcast "A fiery explosive has been ignited!"
| Patterns: |
|
| Since: | 2.7 |
Examples:
if timespan argument is infinite:
| Patterns: |
|
| Since: | 2.5.2 |
Examples:
if event-block is interactable:
cancel event
send "You cannot break interactable blocks!"
| Patterns: |
|
| Since: | 2.7 |
Examples:
| Patterns: | |
| Since: | 2.5, 2.10 (gamemode) |
Examples:
loop all gamemodes:
if loop-value is not invulnerable:
broadcast "the gamemode %loop-value% is vulnerable!"
| Patterns: |
|
| Since: | 2.8.0 |
Examples:
while event-entity is not jumping:
wait 5 ticks
push event-entity upwards
| Patterns: |
|
| Since: | 2.5 |
Examples:
| Patterns: | |
| Since: | 2.3, 2.5 (revamp with chunk at location/coords), 2.10 (Scripts) |
'chunk at 1, 1' uses chunk coordinates, which are location coords divided by 16.
Examples:
if chunk 1, 10 in world "world" is loaded:
if world("lobby") is loaded:
if script named "MyScript.sk" is loaded:
| Patterns: | |
| Since: | 2.10 |
Examples:
set {_pig} to last spawned entity
if {_pig} is lootable:
set loot table of {_pig} to "minecraft:entities/cow"
# the pig will now drop the loot of a cow when killed, because it is indeed a lootable entity.
set block at event-location to chest
if block at event-location is lootable:
set loot table of block at event-location to "minecraft:chests/simple_dungeon"
# the chest will now generate the loot of a simple dungeon when opened, because it is indeed a lootable block.
set block at event-location to white wool
if block at event-location is lootable:
# uh oh, nothing will happen because a wool is not a lootable block.
| Patterns: |
|
| Since: | 2.1 |
| Requirements: | Supported regions plugin |
This condition requires a supported regions plugin to be installed.
Examples:
player is the owner of the region
message "Welcome back to %region%!"
send "%player% just entered %region%!" to all members of the region
| Patterns: |
|
| Since: | 2.5.1 |
Examples:
| Patterns: |
|
| Since: | 1.4 |
Examples:
player-argument is offline
while player is connected:
wait 60 seconds
send "hello!" to player
# The following will act like `{_player} is online`.
# Using variables with `is connected` will not behave the same as with non-variables.
while {_player} is connected:
broadcast "online!"
wait 1 tick
| Patterns: |
|
| Since: | 2.7 |
Examples:
| Patterns: | |
| Since: | 2.5.1 |
A block is passable if it has no colliding parts that would prevent players from moving through it.
Blocks like tall grass, flowers, signs, etc. are passable, but open doors, fence gates, trap doors, etc. are not because they still have parts that can be collided with.
Examples:
| Patterns: |
|
| Since: | 2.9.0 |
Can only be a living entity that is a Mob.
Examples:
while {_entity} is pathfinding
wait a second
launch flickering trailing burst firework colored red at location of {_entity}
subtract 10 from {defence::tower::health}
clear entity within {_entity}
| Patterns: | |
| Since: | 2.11 |
Persistence of entities is whether they are retained through server restarts.
Persistence of leaves is whether they should decay when not connected to a log block within 6 meters.
Persistence of players is if the player's playerdata should be saved when they leave the server. Players' persistence is reset back to 'true' when they join the server.
Passengers inherit the persistence of their vehicle, meaning a persistent zombie put on a non-persistent chicken will become non-persistent. This does not apply to players.
By default, all entities are persistent.
Examples:
if event-entity is persistent:
make event-entity not persistent
| Patterns: |
|
| Since: | 2.11 |
Examples:
make last spawned axolotl stop playing dead
| Patterns: | |
| Since: | 2.6 |
Plugin names can be found in the plugin's 'plugin.yml' file or by using the '/plugins' command, they are NOT the name of the plugin's jar file.
When checking if a plugin is not enabled, this will return true if the plugin is either disabled or not on the server.
When checking if a plugin is disabled, this will return true if the plugin is on the server and is disabled.
Examples:
if plugin "WorldGuard" is not enabled:
if plugins "Essentials" and "Vault" are enabled:
if plugin "MyBrokenPlugin" is disabled:
| Patterns: |
|
| Since: | 1.4.4 |
Examples:
cure the player from poison
message "You have been cured!"
| Patterns: |
|
| Since: | 2.7 |
| Requirements: | 1.16.5+, Paper 1.19.2+ (blockdata) |
Examples:
event-block is set
if player's tool is the preferred tool for event-block:
break event-block naturally using player's tool
else:
cancel event
| Patterns: |
|
| Since: | 2.10 |
| Requirements: | Minecraft 1.21.2+ |
Examples:
if player is pressing forward movement key:
send "You are moving forward!"
| Patterns: |
|
| Since: | 2.0, 2.11 (entities) |
Examples:
if player is riding an entity:
if player is riding a saddled pig:
if player is riding last spawned horse:
| Patterns: |
|
| Since: | 2.5 |
Examples:
| Patterns: |
|
| Since: | 2.10 |
If 'properly' is used, this will only return true if the entity is wearing specifically a saddle item.
Examples:
| Patterns: |
|
| Since: | 2.11 |
Examples:
make last spawned goat scream
if {_enderman} is screaming:
force {_enderman} to stop screaming
| Patterns: |
|
| Since: | 1.4.4, 2.11 (living entities) |
Examples:
make player wake up without spawn location update
if last spawned fox is sleeping:
make last spawned fox stop sleeping
| Patterns: | |
| Since: | 2.3 |
Slimes can generally spawn in the swamp biome and in slime chunks.
For more info, see the Minecraft wiki.
Examples:
trigger:
if chunk at player is a slime chunk:
send "Yeah, it is!"
else:
send "Nope, it isn't"
| Patterns: | |
| Since: | 1.4.4 |
Examples:
on target:
target is sneaking
distance of target and the entity is bigger than 4
cancel the event
| Patterns: |
|
| Since: | 2.2-dev36 |
Examples:
player's tool isn't solid
| Patterns: |
|
| Since: | 2.13 |
Examples:
if a monster can be spawned in {_world}: # false
| Patterns: |
|
| Since: | 2.7 |
Examples:
birch wood is stackable
torch is stackable
| Patterns: |
|
| Since: | 2.3 |
Examples:
| Patterns: |
|
| Since: | 2.10 |
Examples:
enchant player's tool with sharpness 1
if all logs are tagged with tag "minecraft:logs"
| Patterns: |
|
| Since: | 2.5 |
Examples:
if victim is tameable:
cancel event
| Patterns: |
|
| Since: | 2.2-dev36 |
Examples:
| Patterns: |
|
| Since: | 2.5.1, 2.9.0 (breakable) |
Examples:
send "This item is unbreakable!" to player
if tool of {_p} is breakable:
send "Your tool is breakable!" to {_p}
| Patterns: | |
| Since: | 2.9.0 |
Examples:
on load:
if the script is using "example feature":
broadcast "You're using an experimental feature!"
| Patterns: | |
| Since: | 2.7, 2.10 (Scripts & Configs) |
An invalid entity may have died or de-spawned for some other reason.
An invalid script reference may have been reloaded, moved or disabled since.
Examples:
| Patterns: |
|
| Since: | 1.0 |
Examples:
target is wearing wolf armor
| Patterns: |
|
| Since: | 2.5.2, 2.9.0 (enforce, offline players) |
| Requirements: | MC 1.17+ (enforce) |
Examples:
if the server is whitelisted:
if the server whitelist is enforced:
| Patterns: |
|
| Since: | 2.7, 2.11 (world borders) |
| Requirements: | MC 1.17+ (within block) |
Note that using the is between condition will refer to a straight line between locations, while this condition will refer to the cuboid between locations.
Examples:
send "You are in a PvP zone!" to player
if player is in world("world"):
send "You are in the overworld!" to player
if attacker's location is inside of victim:
cancel event
send "Back up!" to attacker and victim
if player is in world "world1" or world "world2":
kill player
if player is in world "world" and chunk at location(0, 0, 0):
give player 1 diamond
| Patterns: | |
| Since: | 2.7 |
Examples:
if attacker's location is within 10 blocks around {_spawn}:
cancel event
send "You can't PVP in spawn."
| Patterns: |
|
| Since: | 1.4 |
Examples:
victim is of type {villager type}
| Patterns: |
|
| Since: | 2.10 |
| Requirements: | Spigot 1.20.5+ |
Examples:
send "Your tool has the enchantment glint override." to player
if {_item} is forced to glint:
send "This item is forced to glint." to player
else if {_item} is forced to not glint:
send "This item is forced to not glint." to player
else:
send "This item does not have any glint override." to player
| Patterns: |
|
| Since: | 2.10 |
| Requirements: | Spigot 1.20.5+ |
Examples:
send "Your tool has the enchantment glint override." to player
if {_item} is forced to glint:
send "This item is forced to glint." to player
else if {_item} is forced to not glint:
send "This item is forced to not glint." to player
else:
send "This item does not have any glint override." to player
| Patterns: |
|
| Since: | 2.10 |
| Usable in events: | Unleash |
Examples:
if the leash will drop:
prevent the leash from dropping
else:
allow the leash to drop
| Patterns: |
|
| Since: | 2.8.0 |
Examples:
if victim is left handed:
cancel event
| Patterns: | |
| Since: | 2.10 |
Examples:
open the lid of {_block}
| Patterns: | |
| Since: | 2.5.2 |
Examples:
if message partially matches "\d":
send "Message contains a digit!"
if message doesn't match "[A-Za-z]+":
send "Message doesn't only contain letters!"
| Patterns: |
|
| Since: | 2.11 |
Examples:
make last spawned panda get off its back
| Patterns: |
|
| Since: | 2.11 |
Examples:
make last spawned panda stop rolling
| Patterns: |
|
| Since: | 2.11 |
Examples:
| Patterns: |
|
| Since: | 2.11 |
Examples:
make last spawned panda stop sneezing
| Patterns: |
|
| Since: | 2.1 |
| Requirements: | Supported regions plugin |
This condition requires a supported regions plugin to be installed.
Examples:
on region enter:
region contains {flags.%world%.red}
message "The red flag is near!"
| Patterns: |
|
| Since: | 2.4 |
| Usable in events: | resource pack request response |
Examples:
if the resource pack wasn't accepted:
kick the player due to "You have to install the resource pack to play in this server!"
| Patterns: |
|
| Since: | 2.5 |
Examples:
| Patterns: |
|
| Since: | 2.12 |
Examples:
make last spawned strider stop shivering
| Patterns: | |
| Since: | 2.10 |
Examples:
remove drop shadow from the text of {_display}
| Patterns: | |
| Since: | 2.10 |
Examples:
prevent last spawned text display from being visible through walls
| Patterns: | |
| Since: | 2.0 |
Examples:
trigger:
{command::%player's uuid%::last-usage} was less than a minute ago:
message "Please wait a minute between uses of this command."
stop
set {command::%player's uuid%::last-usage} to now
# ... actual command trigger here ...
| Patterns: |
|
| Since: | 2.10 |
Examples:
if the used firework will be consumed:
prevent the used firework from being consume
| Patterns: |
|
| Since: | 2.11 |
Examples:
prevent all dropped items from naturally despawning
| Patterns: |
|
| Since: | 2.11 |
Examples:
prevent all dropped items from naturally despawning