Absorbed blocks
🔗Patterns: |
|
Since: | 2.5 |
Usable in events: | sponge absorb |
Examples:
Affected Entities
🔗Patterns: |
|
Since: | 2.4 |
Examples:
loop affected entities:
if loop-value is a player:
send "WARNING: you've step on an area effect cloud!" to loop-value
All Groups
🔗Patterns: |
|
Since: | 2.2-dev35 |
Requirements: | Vault, a permission plugin that supports Vault |
Examples:
trigger:
if argument is "list":
send "%all groups%"
All Permissions
🔗Patterns: | |
Since: | 2.2-dev33 |
Examples:
All Scripts
🔗Patterns: |
|
Since: | 2.5 |
Examples:
trigger:
send "All Scripts: %scripts%" to player
send "Loaded Scripts: %enabled scripts%" to player
send "Unloaded Scripts: %disabled scripts%" to player
All commands
🔗Patterns: |
|
Since: | 2.6 |
Examples:
send "Number of all script commands: %size of all script commands%"
Alphabetical Sort
🔗Patterns: |
|
Since: | 2.2-dev18b |
Examples:
Altitude
🔗Patterns: | |
Since: | 1.4.3 |
Examples:
altitude of the attacker is higher than the altitude of the victim
set damage to damage * 1.2
Amount
🔗Patterns: | |
Since: | 1.0 |
amount of %items%
will not return the number of items, but the number of stacks, e.g. 1 for a stack of 64 torches. To get the amount of items in a stack, see the item amount expression.Also, you can get the recursive size of a list, which will return the recursive size of the list with sublists included, e.g.
{list::*} Structure
├──── {list::1}: 1
├──── {list::2}: 2
│ ├──── {list::2::1}: 3
│ │ └──── {list::2::1::1}: 4
│ └──── {list::2::2}: 5
└──── {list::3}: 6
Where using %size of {list::*}% will only return 3 (the first layer of indices only), while %recursive size of {list::*}% will return 6 (the entire list) Please note that getting a list's recursive size can cause lag if the list is large, so only use this expression if you need to!
Examples:
Amount of Items
🔗Patterns: |
|
Since: | 2.0 |
Examples:
Applied Enchantments
🔗Patterns: |
|
Since: | 2.5 |
Usable in events: | enchant |
Examples:
set the applied enchantments to sharpness 10 and fire aspect 5
Argument
🔗Patterns: | |
Since: | 1.0 |
Examples:
damage the player-argument by the number-argument
give a diamond pickaxe to the argument
add argument 1 to argument 2
heal the last argument
Arithmetic
🔗Patterns: |
|
Since: | 1.4.2 |
Examples:
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!"
Armour Slot
🔗Patterns: |
|
Since: | 1.0 |
Examples:
helmet of player is neither a helmet nor air # player is wearing a block, e.g. from another plugin
Arrow Knockback Strength
🔗Patterns: |
|
Since: | 2.5.1 |
Examples:
event-projectile is an arrow
set arrow knockback strength of event-projectile to 10
Arrows Stuck
🔗Patterns: |
|
Since: | 2.5 |
Examples:
Attack Cooldown
🔗Patterns: | |
Since: | 2.6.1 |
Requirements: | Minecraft 1.15+ |
Examples:
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
🔗Patterns: |
|
Since: | 1.3, 2.6.1 (projectile hit event) |
Usable in events: | damage, death, projectile hit |
Examples:
victim is a creeper
damage the attacked by 1 heart
Attacker
🔗Patterns: |
|
Since: | 1.3 |
Usable in events: | damage, death, destroy |
Examples:
attacker is a player
health of attacker is less than or equal to 2
damage victim by 1 heart
Bed
🔗Patterns: | |
Since: | 2.0 |
Examples:
teleport player the the player's bed
else:
teleport the player to the world's spawn point
Biome
🔗Patterns: | |
Since: | 1.4.4, 2.6.1 (3D biomes) |
Examples:
every real minute:
loop all players:
biome at loop-player is desert
damage the loop-player by 1
Block
🔗Patterns: |
|
Since: | 1.0 |
Examples:
set block below to air
spawn a creeper above the block
loop blocks in radius 4:
loop-block is obsidian
set loop-block to water
block is a chest:
clear the inventory of the block
Block
🔗Patterns: | |
Since: | 1.0 |
Examples:
set block below to air
spawn a creeper above the block
loop blocks in radius 4:
loop-block is obsidian
set loop-block to water
block is a chest:
clear the inventory of the block
Block Data
🔗Patterns: | |
Since: | 2.5, 2.5.2 (set) |
Requirements: | Minecraft 1.13+ |
Examples:
set block at player to {data}
set block data of target block to oak_stairs[facing=south;waterlogged=true]
Block Hardness
🔗Patterns: |
|
Since: | 2.6 |
Requirements: | Minecraft 1.13+ |
Examples:
if block hardness of target block > 5:
Block Sphere
🔗Patterns: | |
Since: | 1.0 |
Examples:
set loop-block to air
Blocks
🔗Patterns: |
|
Since: | 1.0, 2.5.1 (within/cuboid/chunk) |
Examples:
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
Blocks in Region
🔗Book Author
🔗Patterns: |
|
Since: | 2.2-dev31 |
Examples:
message "Book Title: %author of event-item%"
Book Pages
🔗Patterns: |
|
Since: | 2.2-dev31 |
Examples:
message "Book Pages: %pages of event-item%"
message "Book Page 1: %page 1 of event-item%"
Book Title
🔗Patterns: |
|
Since: | 2.2-dev31 |
Examples:
message "Book Title: %title of event-item%"
Burn/Cook Time
🔗Patterns: | |
Since: | 2.3 |
Examples:
if fuel slot is coal:
set burning time to 1 tick
Case Text
🔗Patterns: |
|
Since: | 2.2-dev16 (lowercase and uppercase), 2.5 (advanced cases) |
Examples:
"oops!" in uppercase # OOPS!
"hellO i'm steve!" in proper case # HellO I'm Steve!
"hellO i'm steve!" in strict proper case # Hello I'm Steve!
"spAwn neW boSs ()" in camel case # spAwnNeWBoSs()
"spAwn neW boSs ()" in strict camel case # spawnNewBoss()
"geneRate ranDom numBer ()" in pascal case # GeneRateRanDomNumBer()
"geneRate ranDom numBer ()" in strict pascal case # GenerateRandomNumber()
"Hello Player!" in snake case # Hello_Player!
"Hello Player!" in lower snake case # hello_player!
"Hello Player!" in upper snake case # HELLO_PLAYER!
"What is your name?" in kebab case # What-is-your-name?
"What is your name?" in lower kebab case # what-is-your-name?
"What is your name?" in upper kebab case # WHAT-IS-YOUR-NAME?
Chat Format
🔗Patterns: |
|
Since: | 2.2-dev31 |
Examples:
Chat Recipients
🔗Patterns: |
|
Since: | 2.2-Fixes-v7, 2.2-dev35 (clearing recipients) |
Examples:
Chunk
🔗Patterns: |
|
Since: | 2.0 |
Examples:
Clicked Block/Entity/Inventory/Slot
🔗Patterns: |
|
Since: | 1.0, 2.2-dev35 (more clickable things) |
Usable in events: | click, inventory click |
Examples:
if the clicked block is a chest:
show the inventory of the clicked block to the player
Colour of
🔗Patterns: |
|
Since: | 1.2 |
Examples:
message "This wool block is <%colour of block%>%colour of block%
set the colour of the block to black
Coloured / Uncoloured
🔗Patterns: | |
Since: | 2.0 |
Examples:
set message to coloured message # Safe; only colors get parsed
command /fade <player>:
trigger:
set display name of the player-argument to uncoloured display name of the player-argument
command /format <text>:
trigger:
message formatted text-argument # Safe, because we're sending to whoever used this command
Command
🔗Patterns: |
|
Since: | 2.0 |
Usable in events: | command |
Examples:
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 Info
🔗Patterns: |
|
Since: | 2.6 |
Examples:
description of command "help"
label of command "pl"
usage of command "help"
aliases of command "bukkit:help"
permission of command "/op"
command "op"'s permission message
command "sk"'s plugin owner
Command Sender
🔗Patterns: |
|
Since: | 2.0 |
Usable in events: | command |
Examples:
on command:
log "%executor% used command /%command% %arguments%" to "commands.log"
Compass Target
🔗Patterns: | |
Since: | 2.0 |
Examples:
every 5 seconds:
loop all players:
set the loop-player's compass target to location of {compass::target::%%loop-player%}
Console
🔗Patterns: |
|
Since: | 1.3.1 |
Examples:
send "message to console" to the console
Cooldown Time/Remaining Time/Elapsed Time/Last Usage/Bypass Permission
🔗Patterns: |
|
Since: | 2.2-dev33 |
Examples:
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%}
Coordinate
🔗Creature/Entity/Player/Projectile/Villager/Powered Creeper/etc.
🔗Patterns: |
|
Since: | 1.0 |
Examples:
kill the creeper
kill all powered creepers in the wolf's world
projectile is an arrow
Cursor Slot
🔗Custom Chest Inventory
🔗Patterns: | |
Since: | 2.2-dev34 |
Examples:
set {_inventory} to chest inventory with 1 row
Custom Model Data
🔗Patterns: |
|
Since: | 2.5 |
Requirements: | 1.14+ |
Examples:
set {_model} to custom model data of player's tool
Damage
🔗Patterns: |
|
Since: | 1.3.5 |
Usable in events: | damage |
Examples:
Damage Cause
🔗Patterns: |
|
Since: | 2.0 |
Examples:
Damaged Item
🔗Patterns: | |
Since: | 2.4 |
Examples:
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"
set target block of player to wool with data value 1
set target block of player to potato plant with data value 7
Data/Damage Value
🔗Patterns: |
|
Since: | 1.2 |
Examples:
set data value of target block of player to 3
add 1 to the data value of the clicked block
reset data value of block at player
Date Ago/Later
🔗Patterns: | |
Since: | 2.2-dev33 |
Examples:
set {_hourAfter} to 1 hour after {someOtherDate}
set {_hoursBefore} to 5 hours before {someOtherDate}
Default Value
🔗Difference
🔗Difficulty
🔗Direction
🔗Patterns: |
|
Since: | 1.0 (basic), 2.0 (extended) |
Examples:
set the block behind the player to water
loop blocks above the player:
set {_rand} to a random integer between 1 and 10
set the block {_rand} meters south east of the loop-block to stone
block in horizontal facing of the clicked entity from the player is air
spawn a creeper 1.5 meters horizontally behind the player
spawn a TNT 5 meters above and 2 meters horizontally behind the player
thrust the last spawned TNT in the horizontal direction of the player with speed 0.2
push the player upwards and horizontally forward at speed 0.5
push the clicked entity in in the direction of the player at speed -0.5
open the inventory of the block 2 blocks below the player to the player
teleport the clicked entity behind the player
grow a regular tree 2 meters horizontally behind the player
Distance
🔗Drops
🔗Patterns: |
|
Since: | 1.0 |
Usable in events: | death |
Examples:
remove 4 planks from the drops
Drops Of Block
🔗Patterns: | |
Since: | 2.5.1 |
Requirements: | Minecraft 1.15+ ('as %entity%') |
Examples:
give drops of block using player's tool to player
Element of
🔗Enchant Item
🔗Patterns: |
|
Since: | 2.5 |
Usable in events: | enchant prepare, enchant |
Examples:
set the enchanted item to a diamond chestplate
on enchant prepare:
set the enchant item to a wooden sword
Enchanting Experience Cost
🔗Patterns: |
|
Since: | 2.5 |
Usable in events: | enchant |
Examples:
send "Cost: %the displayed enchanting cost%" to player
Enchantment Bonus
🔗Patterns: |
|
Since: | 2.5 |
Usable in events: | enchant prepare |
Examples:
send "There are %enchantment bonus% bookshelves surrounding this enchantment table!" to player
Enchantment Level
🔗Patterns: |
|
Since: | 2.0 |
Examples:
message "You have a sword of sharpness %level of sharpness of the player's tool% equipped"
Enchantment Offer
🔗Patterns: | |
Since: | 2.5 |
Usable in events: | enchant prepare |
Requirements: | 1.11 or newer |
Examples:
send "Your enchantment offers are: %the enchantment offers%" to player
Enchantment Offer Enchantment Cost
🔗Patterns: |
|
Since: | 2.5 |
Requirements: | 1.11 or newer |
Examples:
Ender Chest
🔗Entities
🔗Patterns: |
|
Since: | 1.2.1, 2.5 (chunks) |
Examples:
send "Psst!" to all players within 100 meters of the player
give a diamond to all ops
heal all tamed wolves in radius 2000 around {town center}
delete all monsters in chunk at player
Entity AI
🔗Patterns: |
|
Since: | 2.5 |
Examples:
Entity Attribute
🔗Patterns: |
|
Since: | 2.5, 2.6.1 (final attribute value) |
Examples:
send "You are wounded!"
set victim's attack speed attribute to 2
Entity Owner
🔗Patterns: |
|
Since: | 2.5 |
Examples:
delete owner of target entity
set {_t} to uuid of tamer of target entity
Exhaustion
🔗Experience
🔗Patterns: |
|
Since: | 2.1, 2.5.3 (block break event) |
Usable in events: | experience spawn, break / mine |
Examples:
add 5 to the spawned experience
on break of coal ore:
clear dropped experience
on break of diamond ore:
if tool of player = diamond pickaxe:
add 100 to dropped experience
Exploded Blocks
🔗Patterns: |
|
Since: | 2.5 |
Usable in events: | explode |
Examples:
loop exploded blocks:
add loop-block to {exploded::blocks::*}
Explosion Block Yield
🔗Patterns: |
|
Since: | 2.5 |
Usable in events: | explosion |
Examples:
set the explosion's block yield to 10%
Explosion Yield
🔗Patterns: |
|
Since: | 2.5 |
Usable in events: | explosion prime |
Examples:
set the yield of the explosion to 10
Explosive Yield
🔗Patterns: | |
Since: | 2.5 |
Requirements: | Minecraft 1.12 or newer for creepers |
Examples:
set the explosive yield of the event-entity to 10
Facing
🔗Patterns: |
|
Since: | 1.4 |
Examples:
loop blocks from the block below the player in the horizontal facing of the player:
set loop-block to cobblestone
Fall Distance
🔗Fertilized Blocks
🔗Patterns: |
|
Since: | 2.5 |
Usable in events: | block fertilize |
Requirements: | Minecraft 1.13 or newer |
Examples:
Filter
🔗Patterns: |
|
Since: | 2.2-dev36 |
Examples:
Filter Input
🔗Patterns: |
|
Since: | 2.2-dev36 |
Examples:
Final Damage
🔗Patterns: |
|
Since: | 2.2-dev19 |
Usable in events: | damage |
Examples:
Firework Effect
🔗Patterns: |
|
Since: | 2.4 |
Examples:
launch trailing flickering star coloured purple, yellow, blue, green and red fading to pink at target entity
launch ball large coloured red, purple and white fading to light green and black at player's location with duration 1
Flight Mode
🔗Food Level
🔗Formatted Time
🔗Patterns: | |
Since: | 2.2-dev31 |
Examples:
Former/Future State
🔗Patterns: | |
Since: | 1.1 |
Examples:
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
Furnace Slot
🔗Patterns: | |
Since: | 1.0 |
Usable in events: | smelt, fuel burn |
Examples:
set the block's ore slot to 64 iron ore
give the result of the block to the player
clear the result slot of the block
Game Mode
🔗Gamerule Value
🔗Gliding State
🔗Patterns: |
|
Since: | 2.2-dev21 |
Examples:
Glowing
🔗Gravity
🔗Group
🔗Patterns: |
|
Since: | 2.2-dev35 |
Requirements: | Vault, a permission plugin that supports Vault |
Examples:
broadcast "%group of player%" # this is the player's primary group
broadcast "%groups of player%" # this is all of the player's groups
Hanging Entity/Remover
🔗Patterns: |
|
Since: | 2.6.2 |
Examples:
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
🔗Patterns: |
|
Since: | 2.0, 2.2-dev32 (SHA-256 algorithm) |
MD5 is provided mostly for backwards compatibility, as it is outdated and not secure. SHA-256 is more secure, and can used to hash somewhat confidental data like IP addresses and even passwords. It is not that secure out of the box, so please consider using salt when dealing with passwords! When hashing data, you must specify algorithms that will be used for security reasons!
Please note that a hash cannot be reversed under normal circumstanses. You will not be able to get original value from a hash with Skript.
Examples:
trigger:
set {password::%uuid of player%} to text-argument hashed with SHA-256
command /login <text>:
trigger:
if text-argument hashed with SHA-256 is {password::%uuid of player%}:
message "Login successful."
else:
message "Wrong password!"
Head location
🔗Patterns: |
|
Since: | 2.0 |
Examples:
set the block in front of the player's eyes to glass
loop blocks in front of the player's head:
Heal Amount
🔗Patterns: |
|
Since: | 2.5.1 |
Usable in events: | heal |
Examples:
remove 0.5 from heal amount
Heal Reason
🔗Patterns: |
|
Since: | 2.5 |
Examples:
if heal reason = satiated:
send "You ate enough food and gained health back!" to player
Health
🔗Patterns: |
|
Since: | 1.0 |
Usable in events: | damage |
Examples:
Hidden Players
🔗Patterns: | |
Since: | 2.3 |
Examples:
Highest Solid Block
🔗Patterns: |
|
Since: | 2.2-dev34 |
Examples:
Hostname
🔗Patterns: |
|
Since: | 2.6.1 |
Examples:
hostname is "testers.example.com"
send "Welcome back tester!"
Hotbar Button
🔗Patterns: |
|
Since: | 2.5 |
Examples:
send "You clicked the hotbar button %hotbar button%!"
Hotbar Slot
🔗Patterns: | |
Since: | 2.2-dev36 |
Examples:
set player's selected hotbar slot to slot 4 of player
Hover List
🔗Patterns: |
|
Since: | 2.3 |
Usable in events: | server list ping |
Requirements: | Paper 1.12.2 or newer |
Examples:
clear the hover list
add "&aWelcome to the &6Minecraft &aserver!" to the hover list
add "" to the hover list # A blank line
add "&cThere are &6%online players count% &conline players!" to the hover list
Humidity
🔗IP
🔗Patterns: | |
Since: | 1.4, 2.2-dev26 (when used in connect event), 2.3 (when used in server list ping event) |
Examples:
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
Id
🔗Index Of
🔗Patterns: | |
Since: | 2.1 |
Examples:
if {_s} contains "abc":
set {_s} to the first (index of "abc" in {_s} + 3) characters of {_s} # removes everything after the first "abc" from {_s}
Indices of List
🔗Patterns: | |
Since: | 2.4 (indices), 2.6.1 (sorting) |
Examples:
broadcast "%indices of {l::*}%" # result is 1, 2 and 3
set {_leader-board::first} to 17
set {_leader-board::third} to 30
set {_leader-board::second} to 25
set {_leader-board::fourth} to 42
set {_ascending-indices::*} to sorted indices of {_leader-board::*} in ascending order
broadcast "%{_ascending-indices::*}%" #result is first, second, third, fourth
set {_descending-indices::*} to sorted indices of {_leader-board::*} in descending order
broadcast "%{_descending-indices::*}%" #result is fourth, third, second, first
Inventory
🔗Patterns: |
|
Since: | 1.0 |
Examples:
clear the player's inventory
remove 5 wool from the inventory of the clicked block
Inventory Action
🔗Patterns: |
|
Since: | 2.2-dev16 |
Examples:
Inventory Holder/Viewers/Rows/Slots
🔗Patterns: |
|
Since: | 2.2-dev34, 2.5 (slots) |
Examples:
holder of player's top inventory
{_inventory}'s viewers
Inventory Slot
🔗Patterns: | |
Since: | 2.2-dev24 |
Examples:
set slot 0 of player to 2 stones
remove 1 stone from slot 0 of player
add 2 stones to slot 0 of player
clear slot 1 of player
Item
🔗Patterns: |
|
Since: | unknown (before 2.1) |
Examples:
item is a clock
set the time to 6:00
Item Amount
🔗Patterns: |
|
Since: | 2.2-dev24 |
Examples:
Item Enchantments
🔗Patterns: |
|
Since: | 2.2-dev36 |
Examples:
Item of an Entity
🔗Patterns: | |
Since: | 2.2-dev35, 2.2-dev36 (improved), 2.5.2 (throwable projectiles) |
Requirements: | Minecraft 1.15.2+ (throwable projectiles) |
Examples:
Item with CustomModelData
🔗Patterns: | |
Since: | 2.5 |
Requirements: | 1.14+ |
Examples:
set slot 1 of inventory of player to wooden hoe with custom model data 357
Item with Lore
🔗Items
🔗Patterns: |
|
Since: | unknown (before 2.1) |
Examples:
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
🔗Patterns: |
|
Since: | 2.0 |
Examples:
loop-item is enchanted
remove loop-item from the player
set {inventory::%uuid of player%::*} to items in the player's inventory
Join & Split
🔗Patterns: | |
Since: | 2.1, 2.5.2 (regex support) |
Examples:
set {_s::*} to the string argument split at ","
Language
🔗Patterns: | |
Since: | 2.3 |
Examples:
Last Attacker
🔗Last Color
🔗Last Damage
🔗Patterns: |
|
Since: | 2.5.1 |
Examples:
Last Damage Cause
🔗Patterns: |
|
Since: | 2.2-Fixes-V10 |
Examples:
Last Loaded Server Icon
🔗Patterns: |
|
Since: | 2.3 |
Requirements: | Paper 1.12.2 or newer |
Examples:
Last Resource Pack Response
🔗Last Spawned Entity
🔗Patterns: |
|
Since: | 1.3 (spawned entity), 2.0 (shot entity), 2.2-dev26 (dropped item) |
Examples:
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
Last/First Login Time
🔗Patterns: |
|
Since: | 2.5 |
Examples:
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
🔗Patterns: |
|
Since: | 2.3 |
Examples:
Length
🔗Level
🔗Patterns: | |
Since: | unknown (before 2.1) |
Usable in events: | level change |
Examples:
set the player's level to 0
Level Progress
🔗Patterns: | |
Since: | 2.0 |
Usable in events: | level change |
increase the player's level progress by 0.5
will make the player gain a level if their progress was more than 50%. Examples:
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
🔗Patterns: | |
Since: | 1.3.4 |
Examples:
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
Location
🔗Patterns: |
|
Since: | 2.0 |
Examples:
set {_loc} to the location 1 meter above the player
Location
🔗Patterns: |
|
Since: | 2.0 |
Examples:
set {_loc} to the location 1 meter above the player
Location
🔗Patterns: | |
Since: | Unknown |
Examples:
message "You home was set to %player's location% in %player's world%."
Location At
🔗Patterns: | |
Since: | 2.0 |
Examples:
distance between the player and the location (0, 0, 0) is less than 200
Loop value
🔗Patterns: |
|
Since: | 1.0 |
Examples:
loop 10 times:
message "%11 - loop-number%"
wait a second
# generate a 10x10 floor made of randomly coloured 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
Lore
🔗Patterns: |
|
Since: | 2.1 |
Examples:
MOTD
🔗Patterns: |
|
Since: | 2.3 |
Examples:
set the motd to "Join now!"
Max Durability
🔗Patterns: |
|
Since: | 2.5 |
Examples:
if max durability of player's tool is not 0: # Item is damageable
Max Health
🔗Patterns: |
|
Since: | 2.0 |
Usable in events: | damage, death |
Examples:
set the maximum health of the player to 100
spawn a giant
set the last spawned entity's max health to 1000
Max Minecart Speed
🔗Max Players
🔗Patterns: |
|
Since: | 2.3 |
Examples:
set the max players count to (online players count + 1)
Maximum Stack Size
🔗Patterns: | |
Since: | 2.1 |
Examples:
Me
🔗Patterns: |
|
Since: | 2.1.1 |
Examples:
!kick myself
!give a diamond axe to me
Mending Repair Amount
🔗Patterns: |
|
Since: | 2.5.1 |
Examples:
set the mending repair amount to 100
Message
🔗Patterns: |
|
Since: | 1.4.6 (chat message), 1.4.9 (join & quit messages), 2.0 (death message) |
Usable in events: | chat, join, quit, death |
Examples:
player has permission "admin"
set message to "&c%message%"
on first join:
set join message to "Welcome %player% to our awesome server!"
on join:
player has played before
set join message to "Welcome back, %player%!"
on quit:
set quit message to "%player% left this awesome server!"
on death:
set the death message to "%player% died!"
Metadata
🔗Patterns: |
|
Since: | 2.2-dev36 |
Examples:
broadcast "%metadata value ""healer"" of player%"
clear metadata value "healer" of player
Middle of Location
🔗Patterns: | |
Since: | 2.6.1 |
Examples:
executable by: players
trigger:
teleport player to the center of player's location
send "You're no longer stuck."
Minecart Derailed / Flying Velocity
🔗Patterns: | |
Since: | 2.5.1 |
Examples:
set derailed velocity of event-entity to vector 2, 10, 2
Money
🔗Patterns: |
|
Since: | 2.0, 2.5 (offline player support) |
Requirements: | Vault, a permission plugin that supports Vault |
Examples:
remove 20$ from the player's balance # replace '$' by whatever currency you use
add 200 to the player's account # or omit the currency alltogether
Moved blocks
🔗Patterns: |
|
Since: | 2.2-dev27 |
Examples:
Name / Display Name / Tab List Name
🔗Patterns: |
|
Since: | before 2.1, 2.2-dev20 (inventory name), 2.4 (non-living entity support, changeable inventory name) |
- Players
- Name: The Minecraft account name of the player. Can't be changed, but 'display name' can be changed.
- Display Name: The name of the player that is displayed in messages. This name can be changed freely and can include colour codes, and is shared among all plugins (e.g. chat plugins will use the display name).
- Entities
- Name: 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'.
- Display Name: The custom name of the entity. Can be changed, which will also enable custom name visibility of the entity so name tag of the entity will be visible always.
- Items
- Name and Display Name: The custom name of the item (not the Minecraft locale name). Can be changed.
- Inventories
- Name and Display Name: 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 (1.13+)
- Name: The name of the gamerule. Cannot be changed.
Examples:
player has permission "name.red"
set the player's display name to "<red>[admin] <gold>%name of player%"
set the player's tab list name to "<green>%player's name%"
set the name of the player's tool to "Legendary Sword of Awesomeness"
Name / Display Name / Tab List Name
🔗Patterns: | |
Since: | before 2.1, 2.2-dev20 (inventory name), 2.4 (non-living entity support, changeable inventory name) |
- Players
- Name: The Minecraft account name of the player. Can't be changed, but 'display name' can be changed.
- Display Name: The name of the player that is displayed in messages. This name can be changed freely and can include colour codes, and is shared among all plugins (e.g. chat plugins will use the display name).
- Entities
- Name: 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'.
- Display Name: The custom name of the entity. Can be changed, which will also enable custom name visibility of the entity so name tag of the entity will be visible always.
- Items
- Name and Display Name: The custom name of the item (not the Minecraft locale name). Can be changed.
- Inventories
- Name and Display Name: 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 (1.13+)
- Name: The name of the gamerule. Cannot be changed.
Examples:
player has permission "name.red"
set the player's display name to "<red>[admin] <gold>%name of player%"
set the player's tab list name to "<green>%player's name%"
set the name of the player's tool to "Legendary Sword of Awesomeness"
Named Item/Inventory
🔗Patterns: |
|
Since: | 2.0, 2.2-dev34 (inventories) |
set name of <item/inventory> to <text>
. Examples:
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
New Line
🔗Patterns: |
|
Since: | 2.5 |
Examples:
No Damage Ticks
🔗Patterns: |
|
Since: | 2.5 |
Examples:
set victim's invulnerability ticks to 20 #Victim will not take damage for the next second
Now
🔗Patterns: |
|
Since: | 1.4 |
Examples:
Number of Characters
🔗Patterns: | |
Since: | 2.5 |
Examples:
on chat:
if number of uppercase chars in message / length of message > 0.5
cancel event
send "<red>Your message has to many caps!" to player
Numbers
🔗Patterns: | |
Since: | 1.4.6 (integers & numbers), 2.5.1 (decimals) |
Examples:
loop integers from 2.9 to 5.1: # same as '3 to 5', i.e. loops 3, 4, 5
loop decimals from 3.94 to 4: # loops 3.94, 3.95, 3.96, 3.97, 3.98, 3.99, 4
Offline players
🔗Patterns: |
|
Since: | 2.2-dev35 |
Examples:
Online Player Count
🔗Patterns: |
|
Since: | 2.3 |
Fake online player count requires PaperSpigot 1.12.2+.
Examples:
# This will make the max players count 5 if there are 4 players online.
set the fake max players count to (online players count + 1)
Opened Inventory
🔗Patterns: | |
Since: | 2.2-dev24, 2.2-dev35 (Just 'current inventory' works in player events) |
Examples:
Parse
🔗Patterns: | |
Since: | 2.0 |
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}. Examples:
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
🔗Patterns: |
|
Since: | 2.0 |
Examples:
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!"
Passenger
🔗Patterns: | |
Since: | 2.0, 2.2-dev26 (Multiple passengers for 1.11.2+) |
Examples:
passenger of the minecart is a creeper or a cow
the saddled pig's passenger is a player
#for 1.11.2+
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
Ping
🔗Patterns: | |
Since: | 2.2-dev36 |
Examples:
trigger:
send "%arg-1%'s ping is %arg-1's ping%"
Plain Item
🔗Patterns: |
|
Since: | 2.6 |
Examples:
send "You are holding a plain diamond!"
Player Protocol Version
🔗Patterns: | |
Since: | 2.6.2 |
Requirements: | Paper 1.12.2 or newer |
Examples:
trigger:
send "Protocol version of %arg-1%: %protocol version of arg-1%"
Player Skull
🔗Patterns: |
|
Since: | 2.0 |
Examples:
set the block at the entity to the entity's skull
Player Weather
🔗Portal
🔗Patterns: |
|
Since: | 2.4 |
Usable in events: | portal_create |
Examples:
loop portal blocks:
broadcast "%loop-block% is part of a portal!"
Potion Effect
🔗Patterns: | |
Since: | 2.5.2 |
Examples:
add {_p} to potion effects of player's tool
add {_p} to potion effects of target entity
add potion effect of speed 1 to potion effects of player
Potion Effects
🔗Patterns: |
|
Since: | 2.5.2 |
Examples:
clear all the potion effects of player
clear all the potion effects of player's tool
add potion effects of player to potion effects of player's tool
add speed to potion effects of target entity
remove speed and night vision from potion effects of player
Prefix/Suffix
🔗Patterns: | |
Since: | 2.0 |
Examples:
cancel event
broadcast "%player's prefix%%player's display name%%player's suffix%: %message%" to the player's world
set the player's prefix to "[<red>Admin
Projectile Bounce State
🔗Patterns: |
|
Since: | 2.5.1 |
Examples:
set projectile bounce mode of event-projectile to true
Projectile Critical State
🔗Patterns: |
|
Since: | 2.5.1 |
Examples:
event-projectile is an arrow
set projectile critical mode of event-projectile to true
Protocol Version
🔗Patterns: |
|
Since: | 2.3 |
Usable in events: | server list ping |
Requirements: | Paper 1.12.2 or newer |
This can be set in a server list ping event only (increase and decrease effects cannot be used because that wouldn't make sense).
Examples:
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
Random
🔗Random Number
🔗Patterns: | |
Since: | 1.4 |
random number between 2 and 1
will work as well as random number between 1 and 2
. Examples:
send "You rolled a %random integer from 1 to 6%!" to the player
Random UUID
🔗Patterns: |
|
Since: | 2.5.1 |
Examples:
Raw Name
🔗Patterns: |
|
Since: | unknown (2.2) |
Examples:
Redstone Block Power
🔗Region
🔗Patterns: |
|
Since: | 2.1 |
Examples:
region is {forbidden region}
cancel the event
Region Members & Owners
🔗Patterns: | |
Since: | 2.1 |
Examples:
message "You're entering %region% whose owners are %owners of region%".
Regions At
🔗Patterns: | |
Since: | 2.1 |
Examples:
line 1 of the clicked block is "[region info]"
set {_regions::*} to regions at the clicked block
if {_regions::*} is empty:
message "No regions exist at this sign."
else:
message "Regions containing this sign: <gold>%{_regions::*}%
Remaining Air
🔗Patterns: |
|
Since: | unknown (before 2.1) |
Examples:
send "hurry, get to the surface!" to the player
Respawn location
🔗Patterns: |
|
Since: | 2.2-dev35 |
Examples:
set respawn location to {example::spawn}
Reversed List
🔗Patterns: |
|
Since: | 2.4 |
Examples:
Rounding
🔗Patterns: | |
Since: | 2.0 |
Examples:
set line 1 of the block to rounded "%(1.5 * player's level)%"
add rounded down argument to the player's health
Saturation
🔗Scoreboard Tags
🔗Patterns: | |
Since: | 2.3 |
Requires Minecraft 1.11+ (actually added in 1.9 to the game, but added in 1.11 to Spigot).
Examples:
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 Name
🔗Patterns: |
|
Since: | 2.0 |
Usable in events: | Script Load/Unload |
Examples:
set {running::%script%} to true
on script unload:
set {running::%script%} to false
Sea Level
🔗Server Icon
🔗Patterns: |
|
Since: | 2.3 |
Requirements: | Paper 1.12.2 or newer |
Examples:
set {server-icons::default} to the default server icon
Shooter
🔗Patterns: |
|
Since: | 1.3.7 |
Examples:
Shuffled List
🔗Patterns: |
|
Since: | 2.2-dev32 |
Examples:
Sign Text
🔗Patterns: | |
Since: | 1.3 |
Examples:
line 2 of the clicked block is "[Heal]":
heal the player
set line 3 to "%player%"
Slot Index
🔗Patterns: | |
Since: | 2.2-dev35 |
Examples:
send "You bought a pie!"
Sorted List
🔗Patterns: |
|
Since: | 2.2-dev19 |
Examples:
Spawn
🔗Spawn Reason
🔗Patterns: |
|
Since: | 2.3 |
Examples:
spawn reason is reinforcements or breeding
Spawner Type
🔗Special Number
🔗Patterns: |
|
Since: | 2.2-dev32d |
Examples:
Speed
🔗Patterns: | |
Since: | unknown (before 2.1) |
Examples:
increase the argument's fly speed by 0.1
Subtext
🔗Patterns: |
|
Since: | 2.1, 2.5.2 (character at, multiple strings support) |
Examples:
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
TPS (ticks per second)
🔗Patterns: |
|
Since: | 2.2-dev36 |
Examples:
Tamer
🔗Patterns: |
|
Since: | 2.2-dev25 |
Examples:
if the tamer is a player:
send "someone tamed something!" to console
Target
🔗Patterns: |
|
Since: | unknown (before 2.1) |
Examples:
entity's target is a player
send "You're being followed by an %entity%!" to target of entity
Targeted Block
🔗Patterns: | |
Since: | 1.0 |
Examples:
command /setblock <material>:
trigger:
set targeted block to argument
Teleport Cause
🔗Patterns: |
|
Since: | 2.2-dev35 |
Examples:
teleport cause is nether portal, end portal or end gateway
Temperature
🔗Ternary
🔗Time
🔗Time Played
🔗Patterns: |
|
Since: | 2.5 |
Examples:
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
🔗Patterns: |
|
Since: | 2.5 |
Examples:
Tool
🔗Patterns: |
|
Since: | 1.0 |
Examples:
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
Type of
🔗Patterns: |
|
Since: | 1.4, 2.5.2 (potion effect) |
Examples:
message "This is a %type of clicked entity%!"
UUID
🔗Patterns: |
|
Since: | 2.1.2, 2.2 (offline players' UUIDs), 2.2-dev24 (other entities' UUIDs) |
Examples:
# 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
Unbreakable Items
🔗Patterns: |
|
Since: | 2.2-dev13b |
Examples:
Unix Date
🔗Unix Timestamp
🔗Vectors - Angle Between
🔗Vectors - Arithmetic
🔗Patterns: | |
Since: | 2.2-dev28 |
Examples:
set {_v} to {_v} ++ {_v}
set {_v} to {_v} ++ 5
set {_v} to {_v} -- {_v}
set {_v} to {_v} -- 5
set {_v} to {_v} ** {_v}
set {_v} to {_v} ** 5
set {_v} to {_v} // {_v}
set {_v} to {_v} // 5
Vectors - Create from XYZ
🔗Vectors - Cross Product
🔗Vectors - Cylindrical Shape
🔗Patterns: | |
Since: | 2.2-dev28 |
Examples:
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
🔗Vectors - Length
🔗Patterns: | |
Since: | 2.2-dev28 |
Examples:
set {_v} to vector 1, 2, 3
set standard length of {_v} to 2
send "%standard length of {_v}%"
Vectors - Location Vector Offset
🔗Vectors - Normalized
🔗Vectors - Random Vector
🔗Patterns: |
|
Since: | 2.2-dev28 |
Examples:
Vectors - Spherical Shape
🔗Patterns: | |
Since: | 2.2-dev28 |
Examples:
set {_v} to spherical vector radius 1, yaw loop-value, pitch loop-value
set {_v} to spherical vector radius 1, yaw 45, pitch 90
Vectors - Squared Length
🔗Vectors - Vector Between Locations
🔗Vectors - Vector from Location
🔗Vectors - Vector from Pitch and Yaw
🔗Vectors - Velocity
🔗Vectors - XYZ Component
🔗Patterns: | |
Since: | 2.2-dev28 |
Examples:
send "%x of {_v}%, %y of {_v}%, %z of {_v}%"
add 1 to x of {_v}
add 2 to y of {_v}
add 3 to z of {_v}
send "%x of {_v}%, %y of {_v}%, %z of {_v}%"
set x component of {_v} to 1
set y component of {_v} to 2
set z component of {_v} to 3
send "%x component of {_v}%, %y component of {_v}%, %z component of {_v}%"
Vehicle
🔗Patterns: | |
Since: | 2.0 |
Examples:
Version
🔗Patterns: |
|
Since: | 2.0 |
Examples:
message "This server is powered by Skript %skript version%"
Version String
🔗Patterns: |
|
Since: | 2.3 |
Usable in events: | server list ping |
Requirements: | Paper 1.12.2 or newer |
Examples:
set the protocol version to 0 # 13w41a (1.7), so it will show the version string always
set the version string to "<light green>Version: <orange>%minecraft version%"
View Distance of Client
🔗Patterns: | |
Since: | 2.5 |
Requirements: | 1.13.2+ |
Examples:
set view distance of player to client view distance of player
Weather
🔗Patterns: | |
Since: | 1.0 |
Usable in events: | weather change |
Examples:
weather in "world" is rainy
Whitelist
🔗Patterns: |
|
Since: | 2.5.2 |
Examples:
add all players to whitelist
reset the whitelist
World
🔗World Seed
🔗World from Name
🔗Patterns: |
|
Since: | 2.6.1 |
Examples:
the world "world"
Worlds
🔗Patterns: |
|
Since: | 1.0 |
Examples:
broadcast "You're in %loop-world%" to loop-world
X of Item
🔗Patterns: |
|
Since: | 1.2 |
Examples:
Yaw / Pitch
🔗Patterns: | |
Since: | 2.0, 2.2-dev28 (vector yaw/pitch) |
Examples:
set {_yaw} to yaw of player
set {_p} to pitch of target entity