Patterns: | |
Since: | 2.9.0 |
Requirements: | Spigot 1.19.4+ |
A bell will start resonating five game ticks after being rung, and will continue to resonate for 40 game ticks.
Examples:
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: | 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 |
Requirements: | Paper |
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 |
Requirements: | Paper |
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.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.8.0 |
Requirements: | MC 1.13+ (cows, sheep & snowmen), Paper 1.19.4+ (all shearable entities) |
Examples:
send "This entity has nothing left to shear!" to player
Patterns: | |
Since: | 2.6.1 |
Requirements: | Minecraft 1.16+ (in water), Paper 1.16+ (in rain, lava and bubble column) |
Examples:
if player is in water:
player is in lava:
player is in bubble column
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 is applied:
cancel event
Patterns: |
|
Since: | 2.5 |
Examples:
Patterns: | |
Since: | 2.10 |
Requirements: | Paper |
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 |
Requirements: | 1.14+ |
Examples:
Patterns: |
|
Since: | 2.8.0 |
Examples:
Patterns: |
|
Since: | 2.8.0 |
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 |
Requirements: | Paper 1.9 or newer |
Examples:
Patterns: | |
Since: | 2.3 |
Examples:
Patterns: |
|
Since: | 2.5 |
Requirements: | Paper 1.13 or newer |
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.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.2-dev36 |
Examples:
player's tool is edible
Patterns: |
|
Since: | unknown (before 2.1) |
Examples:
Patterns: |
|
Since: | 1.4.6 |
Examples:
helm, chestplate, leggings or boots are enchanted
Patterns: | |
Since: | 2.10 |
Examples:
if 11 cannot be evenly divided by 10:
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 |
Requirements: | PaperMC |
Examples:
Patterns: |
|
Since: | 2.5.1 |
Requirements: | Minecraft 1.11.2+ |
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 |
Requirements: | Paper |
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 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:
Patterns: |
|
Since: | 2.5.2 |
Requirements: | Minecraft 1.13+ |
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) |
Requirements: | Paper 1.20.6+ (gamemodes) |
Examples:
loop all gamemodes:
if loop-value is not invulnerable:
broadcast "the gamemode %loop-value% is vulnerable!"
Patterns: |
|
Since: | 2.8.0 |
Requirements: | Paper 1.15+ |
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 wool block
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 |
Requirements: | Paper 1.20+ (Connected) |
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 |
Requirements: | Minecraft 1.13.2+ |
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 |
Requirements: | Paper |
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.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 |
Examples:
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.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.7 |
Examples:
birch wood is stackable
torch is stackable
Patterns: |
|
Since: | 2.3 |
Requirements: | 1.13 or newer |
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:
player is wearing all diamond armour
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 |
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
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 |
Requirements: | Paper 1.16+ |
Examples:
if the leash will drop:
prevent the leash from dropping
else:
allow the leash to drop
Patterns: |
|
Since: | 2.8.0 |
Requirements: | Paper 1.17.1+ (entities) |
Paper 1.17.1+ is required for non-player entities.
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.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.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 |
Requirements: | Paper |
Examples:
if the used firework will be consumed:
prevent the used firework from being consume