Can Build 🔗
Patterns: |
|
Since: | 2.0 |
Tests whether a player is allowed to build at a certain location. This condition requires a supported regions plugin to be installed.
Examples:
command /setblock :
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
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
Can Fly 🔗
Patterns: | |
Since: | 2.3 |
Whether a player is allowed to fly.
Examples:
player can fly
Can Hold 🔗
Patterns: |
|
Since: | 1.0 |
Tests whether a player or a chest can hold the given item.
Examples:
block can hold 200 cobblestone
player has enough space for 64 feathers
player has enough space for 64 feathers
Can See 🔗
Patterns: | |
Since: | 2.3 |
Checks whether the given players can see another players.
Examples:
if the player can't see the player-argument:
message "The player %player-argument% is not online!"
message "
Chance 🔗
Patterns: |
|
Since: | 1.0 |
A condition that randomly succeeds or fails. Valid values are between 0% and 100%, or if the percent sign is omitted between 0 and 1.
Examples:
chance of 50%:
drop a diamond
chance of {chance}% # {chance} between 0 and 100
chance of {chance} # {chance} between 0 and 1
drop a diamond
chance of {chance}% # {chance} between 0 and 100
chance of {chance} # {chance} between 0 and 1
Comparison 🔗
Patterns: |
|
Since: | 1.0 |
A very general condition, it simply compares two values. Usually you can only compare for equality (e.g. block is/isn't of <type>), but some values can also be compared using greater than/less than. In that case you can also test for whether an object is between two others. 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:
the clicked block is a stone slab or a double stone slab
time in the player's world is greater than 8:00
the creature is not an enderman or an ender dragon
time in the player's world is greater than 8:00
the creature is not an enderman or an ender dragon
Contains 🔗
Patterns: |
|
Since: | 1.0 |
Checks whether an inventory contains the given item, a text contains another piece of text, or a list of objects (e.g. a {list variable::*}) contains another object.
Examples:
block contains 20 cobblestone
player has 4 flint and 2 iron ingots
player has 4 flint and 2 iron ingots
Damage Cause 🔗
Patterns: |
|
Since: | 2.0 |
Tests what kind of damage caused a damage event. Refer to the Damage Cause type for a list of all possible causes.
Examples:
# make players use their potions of fire resistance whenever they take any kind of fire damage
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
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
Event Cancelled 🔗
Patterns: |
|
Since: | 2.2-dev36 |
Checks whether or not the event is cancelled.
Examples:
on click:
if event is cancelled:
broadcast "no clicks allowed!"
if event is cancelled:
broadcast "no clicks allowed!"
Exists/Is Set 🔗
Patterns: | |
Since: | 1.2 |
Checks whether a given expression or variable is set.
Examples:
{teams::%player's uuid%::preferred-team} is not set
on damage:
projectile exists
broadcast "%attacker% used a %projectile% to attack %victim%!"
on damage:
projectile exists
broadcast "%attacker% used a %projectile% to attack %victim%!"
Has Client Weather 🔗
Patterns: | |
Since: | 2.3 |
Checks whether the given players have a custom client weather
Examples:
if the player has custom weather:
message "Your custom weather is %player's weather%"
message "Your custom weather is %player's weather%"
Has Metadata 🔗
Patterns: |
|
Since: | 2.2-dev36 |
Checks whether a metadata holder has a metadata tag.
Examples:
if player has metadata value "healer":
Has Permission 🔗
Patterns: |
|
Since: | 1.0 |
Test whether a player has a certain permission.
Examples:
player has permission "skript.tree"
victim has the permission "admin":
send "You're attacking an admin!" to attacker
victim has the permission "admin":
send "You're attacking an admin!" to attacker
Has Played Before 🔗
Patterns: |
|
Since: | 1.4 |
Checks whether a player has played on this server before. You can also use on first join if you want to make triggers for new players.
Examples:
player has played on this server before
player hasn't played before
player hasn't played before
Has Scoreboard Tag 🔗
Patterns: | |
Since: | 2.3 |
Checks whether the given entities has the given scoreboard tags.
Examples:
if the targeted armor stand has the scoreboard tag "test tag":
Is Alive 🔗
Patterns: |
|
Since: | 2.0 |
Checks whether an entity is alive. This is mostly useful to check whether an entity stored in a variable does still exist.
Examples:
{villager-buddy::%player's uuid%} is dead
Is Banned 🔗
Patterns: |
|
Since: | 1.4 |
Checks whether a player or IP is banned.
Examples:
player is banned
victim is not IP-banned
"127.0.0.1" is banned
victim is not IP-banned
"127.0.0.1" is banned
Is Blocking 🔗
Patterns: | |
Since: | unknown (before 2.1) |
Checks whether a player is blocking with his shield.
Examples:
on damage of player:
victim is blocking
damage attacker by 0.5 hearts
victim is blocking
damage attacker by 0.5 hearts
Is Burning 🔗
Patterns: | |
Since: | 1.4.4 |
Checks whether an entity is on fire, e.g. a zombie due to being in sunlight, or any entity after falling into lava.
Examples:
# increased attack against burning targets
victim is burning:
increase damage by 2
victim is burning:
increase damage by 2
Is Edible 🔗
Patterns: |
|
Since: | 2.2-dev36 |
Checks whether an item is edible.
Examples:
steak is edible
player's tool is edible
player's tool is edible
Is Empty 🔗
Patterns: |
|
Since: | unknown (before 2.1) |
Checks whether an inventory, an inventory slot, or a text is empty.
Examples:
player's inventory is empty
Is Enchanted 🔗
Patterns: |
|
Since: | 1.4.6 |
Checks whether an item is enchanted.
Examples:
tool of the player is enchanted with efficiency 2
helm, chestplate, leggings or boots are enchanted
helm, chestplate, leggings or boots are enchanted
Is Flammable 🔗
Patterns: |
|
Since: | 2.2-dev36 |
Checks whether an item is flammable.
Examples:
wood is flammable
player's tool is flammable
player's tool is flammable
Is Flying 🔗
Patterns: | |
Since: | 1.4.4 |
Checks whether a player is flying.
Examples:
player is not flying
Is Holding 🔗
Patterns: |
|
Since: | 1.0 |
Checks whether a player is holding a specific item. Cannot be used with endermen, use 'entity is [not] an enderman holding <item type>' instead.
Examples:
player is holding a stick
victim isn't holding a sword of sharpness
victim isn't holding a sword of sharpness
Is Loaded 🔗
Patterns: | |
Since: | 2.3 |
Checks whether or not a chunk/world is loaded
Examples:
if chunk at {home::%player's uuid%} is loaded:
Is Member/Owner of Region 🔗
Patterns: |
|
Since: | 2.1 |
Checks whether a player is a member or owner of a particular region. This condition requires a supported regions plugin to be installed.
Examples:
on region enter:
player is the owner of the region
message "Welcome back to %region%!"
send "%player% just entered %region%!" to all members of the region
player is the owner of the region
message "Welcome back to %region%!"
send "%player% just entered %region%!" to all members of the region
Is Online 🔗
Patterns: |
|
Since: | 1.4 |
Checks whether a player is online.
Examples:
player is online
player-argument is offline
player-argument is offline
Is Poisoned 🔗
Patterns: |
|
Since: | 1.4.4 |
Checks whether an entity is poisoned.
Examples:
player is poisoned:
cure the player from poison
message "You have been cured!"
cure the player from poison
message "You have been cured!"
Is Riding 🔗
Patterns: |
|
Since: | 2.0 |
Tests whether an entity is riding another or is in a vehicle.
Examples:
player is riding a saddled pig
Is Script Loaded 🔗
Patterns: | |
Since: | 2.2-dev31 |
Check if the current script, or another script, is currently loaded.
Examples:
script is loaded
script "example.sk" is loaded
script "example.sk" is loaded
Is Sleeping 🔗
Patterns: | |
Since: | 1.4.4 |
Checks whether a player is sleeping.
Examples:
# cut your enemies' throats in their sleep >=)
on attack:
attacker is holding a sword
victim is sleeping
increase the damage by 1000
on attack:
attacker is holding a sword
victim is sleeping
increase the damage by 1000
Is Slime Chunk 🔗
Patterns: | |
Since: | 2.3 |
Tests whether a chunk is a so-called slime chunk. Slimes can generally spawn in the swamp biome and in slime chunks. For more info, see the Minecraft wiki.
Examples:
command /slimey:
trigger:
if chunk at player is a slime chunk:
send "Yeah, it is!"
else:
send "Nope, it isn't"
trigger:
if chunk at player is a slime chunk:
send "Yeah, it is!"
else:
send "Nope, it isn't"
Is Sneaking 🔗
Patterns: | |
Since: | 1.4.4 |
Checks whether a player is sneaking.
Examples:
# prevent mobs from seeing sneaking players if they are at least 4 meters apart
on target:
target is sneaking
distance of target and the entity is bigger than 4
cancel the event
on target:
target is sneaking
distance of target and the entity is bigger than 4
cancel the event
Is Solid 🔗
Patterns: |
|
Since: | 2.2-dev36 |
Checks whether an item is solid.
Examples:
grass block is solid
player's tool isn't solid
player's tool isn't solid
Is Sprinting 🔗
Patterns: | |
Since: | 1.4.4 |
Checks whether a player is sprinting.
Examples:
player is not sprinting
Is Swimming 🔗
Patterns: |
|
Since: | 2.3 |
Requirements: | 1.13 or newer |
Checks whether a living entity is swimming.
Examples:
player is swimming
Is Transparent 🔗
Patterns: |
|
Since: | 2.2-dev36 |
Checks whether an item is transparent.
Examples:
glass is transparent
player's tool is transparent.
player's tool is transparent.
Is Wearing 🔗
Patterns: |
|
Since: | 1.0 |
Checks whether a player is wearing some armour.
Examples:
player is wearing an iron chestplate and iron leggings
player is wearing all diamond armour
player is wearing all diamond armour
Is in World 🔗
Patterns: | |
Since: | 1.4 |
Checks whether an entity is in a specific world.
Examples:
player is in "world"
argument isn't in world "world_nether"
the player is in the world of the victim
argument isn't in world "world_nether"
the player is in the world of the victim
Is of Type 🔗
Patterns: |
|
Since: | 1.4 |
Checks whether an item of an entity is of the given type. This is mostly useful for variables, as you can use the general 'is' condition otherwise (e.g. 'victim is a creeper').
Examples:
tool is of type {selected type}
victim is of type {villager type}
victim is of type {villager type}
Is on Ground 🔗
Patterns: | |
Since: | 2.2-dev26 |
Checks whether an entity is on ground.
Examples:
player is not on ground
PvP 🔗
Patterns: | |
Since: | 1.3.4 |
Checks the PvP state of a world.
Examples:
PvP is enabled
PvP is disabled in "world"
PvP is disabled in "world"
Region Contains 🔗
Patterns: |
|
Since: | 2.1 |
Checks whether a location is contained in a particular region. This condition requires a supported regions plugin to be installed.
Examples:
player is in the region {regions::3}
on region enter:
region contains {flags.%world%.red}
message "The red flag is near!"
on region enter:
region contains {flags.%world%.red}
message "The red flag is near!"
Starts/Ends With 🔗
Patterns: | |
Since: | 2.2-dev36 |
Checks if a text starts or ends with another.
Examples:
if the argument starts with "test":
send "Stop!"
send "Stop!"
Time 🔗
Patterns: | |
Since: | 2.0 |
Examples:
command /command-with-cooldown:
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 ...
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 ...
Weather 🔗
Patterns: |
|
Since: | 1.0 |
Checks whether the weather in a world is of a specific type. I welcome any ideas how to write this condition differently.
Examples:
is thundering
is raining in "world" or "world2"
is raining in "world" or "world2"