Patterns: |
|
Since: | 1.4, 2.1.1 (ban reason), 2.5 (timespan), 2.9.0 (kick) |
Note that banning people does not kick them from the server. You can optionally use 'and kick' or consider using the kick effect after applying a ban.
Examples:
ban "127.0.0.1"
IP-ban the player because "he is an idiot"
ban player due to "inappropriate language" for 2 days
ban and kick player due to "inappropriate language" for 2 days
Patterns: | |
Since: | 2.4 |
You can add a tool, which will spawn items based on how that tool would break the block (ie: When using a hand to break stone, it drops nothing, whereas with a pickaxe it drops cobblestone)
Examples:
break clicked block naturally
loop blocks in radius 10 around player:
break loop-block using player's tool
loop blocks in radius 10 around player:
break loop-block naturally using diamond pickaxe
Patterns: |
|
Since: | 2.8.0 |
Requirements: | Paper 1.16+ |
Examples:
if the victim's active tool is a bow:
interrupt the usage of the player's active item
Patterns: |
|
Since: | 2.2-dev34 |
Examples:
executable by: players
cooldown: 10 seconds
trigger:
if length of arg-1 is more than 16:
# Makes it so that invalid arguments don't make you wait for the cooldown again
cancel the cooldown
send "Your nickname may be at most 16 characters."
stop
set the player's display name to arg-1
Patterns: |
|
Since: | 2.4 |
Usable in events: | death, break / mine |
Requirements: | 1.12.2 or newer (cancelling item drops of blocks) |
Examples:
if name of the entity is "&cSpecial":
cancel drops of items
on break of a coal ore:
cancel the experience drops
Patterns: |
|
Since: | 1.0 |
Examples:
victim is a player
victim has the permission "skript.god"
cancel the event
Patterns: | |
Since: | 1.0 (set, add, remove, delete), 2.0 (remove all) |
Examples:
Set the player's display name to "<red>%name of player%"
set the block above the victim to lava
# add:
add 2 to the player's health # preferably use '<a href='#EffHealth'>heal</a>' for this
add argument to {blacklist::*}
give a diamond pickaxe of efficiency 5 to the player
increase the data value of the clicked block by 1
# remove:
remove 2 pickaxes from the victim
subtract 2.5 from {points::%uuid of player%}
# remove all:
remove every iron tool from the player
remove all minecarts from {entitylist::*}
# delete:
delete the block below the player
clear drops
delete {variable}
# reset:
reset walk speed of player
reset chunk at the targeted block
Patterns: |
|
Since: | 2.5 |
Examples:
charge the event-entity
Patterns: |
|
Since: | 2.0, 2.2-dev26 (maps and potions) |
(red, green, blue)
, where (0,0,0)
is black and (255,255,255)
is white. Armor is colorable for all Minecraft versions. With Minecraft 1.11 or newer you can also color potions and maps. Note that the colors might not look exactly how you'd expect. Examples:
color the player's tool red
Patterns: |
|
Since: | 1.0, 2.8.0 (bungeecord command) |
Examples:
execute console command "/say Hello everyone!"
execute player bungeecord command "/alert &6Testing Announcement!"
Patterns: |
|
Since: | 2.2-dev37, 2.7 (while loops), 2.8.0 (outer loops) |
Examples:
loop all players:
if loop-value does not have permission "moderator":
continue # filter out non moderators
broadcast "%loop-player% is a moderator!" # Only moderators get broadcast
# Game starting counter
set {_counter} to 11
while {_counter} > 0:
remove 1 from {_counter}
wait a second
if {_counter} != 1, 2, 3, 5 or 10:
continue # only print when counter is 1, 2, 3, 5 or 10
broadcast "Game starting in %{_counter}% second(s)"
Patterns: | |
Since: | 2.8.0 |
Examples:
set {_foo::sublist::foobar} to "hey"
copy {_foo::*} to {_copy::*}
broadcast indices of {_copy::*} # bar, sublist
broadcast {_copy::bar} # 1
broadcast {_copy::sublist::foobar} # "hey!"
Patterns: |
|
Since: | 1.0 |
Examples:
heal the player
repair tool of player
Patterns: |
|
Since: | 1.4 |
ban player → wait 7 days → unban player
will not work if you restart your server anytime within these 7 days. You also have to be careful even when using small delays! Examples:
halt for 5 minecraft hours
wait a tick
Patterns: |
|
Since: | 2.3 |
Examples:
give a diamond to the player if the player has permission "rank.vip"
Patterns: |
|
Since: | 1.0 |
Examples:
drop 1 TNT
Patterns: |
|
Since: | 2.4 |
Examples:
enable script file "testing"
unload script file "script.sk"
Patterns: |
|
Since: | 2.0 |
Examples:
disenchant the player's tool
Patterns: |
|
Since: | 2.9.0 |
Requirements: | MC 1.17+ |
Examples:
unenforce the whitelist
Patterns: |
|
Since: | 1.0, 2.7 (multiple entities, unequip) |
Examples:
equip player with all diamond armor
unequip diamond chestplate from player
unequip all armor from player
unequip player's armor
Patterns: |
|
Since: | unknown (before 2.1) |
Examples:
stop
message "%player% has no ores!"
loop blocks above the player:
loop-block is not air:
exit 2 sections
set loop-block to water
Patterns: |
|
Since: | 2.5 |
Requirements: | Paper 1.13 or newer/Spigot 1.14 or newer. Ignition can be stopped on Paper 1.13 or newer. |
Examples:
stop ignition of the last spawned creeper
Patterns: |
|
Since: | 1.0 |
Examples:
create an explosion of force 0 at the victim
Patterns: |
|
Since: | 2.5.1 |
Requirements: | Minecraft 1.15.2+ |
Examples:
make last spawned wolf attack player
Patterns: |
|
Since: | 2.2-dev21 |
Examples:
force event-player to respawn
Patterns: |
|
Since: | 2.8.0 |
Requirements: | Paper 1.17.1+ |
Examples:
make entity left handed
make all zombies in radius 10 of player right handed
Patterns: | |
Since: | 2.3 |
Examples:
hide {vanished::*} from the server list
Patterns: |
|
Since: | 2.9.0 |
Requirements: | Spigot 1.20.5+ |
Examples:
hide {_item}'s additional tool tip
Patterns: |
|
Since: | 2.4 |
Usable in events: | death |
Examples:
if the victim is an op:
keep the inventory and experiences
Patterns: |
|
Since: | 1.0 |
Examples:
kill all creepers in the player's world
kill all endermen, witches and bats
Patterns: |
|
Since: | 2.7 |
Requirements: | Paper 1.19.2+ |
Examples:
knock victim (vector from attacker to victim) with strength 10
Patterns: |
|
Since: | 2.4 |
Examples:
Patterns: |
|
Since: | 2.3 |
Examples:
leash event-entity to player
send "&aYou leashed &2%event-entity%!" to player
Patterns: |
|
Since: | 1.4 |
Examples:
strike lightning effect at the victim
Patterns: |
|
Since: | 2.3 |
Requirements: | Paper 1.12.2 or newer |
Examples:
clear {server-icons::*}
loop 5 times:
load server icon from file "icons/%loop-number%.png"
add the last loaded server icon to {server-icons::*}
on server list ping:
set the icon to a random server icon out of {server-icons::*}
Patterns: |
|
Since: | 2.8.0 |
Examples:
load the world "myCustomWorld"
unload "world_nether"
unload "world_the_end" without saving
unload all worlds
Patterns: |
|
Since: | 2.3 |
Examples:
suppress the variable save warnings
Patterns: | |
Since: | 2.0, 2.9.0 (severities) |
Examples:
log "%player% has just joined the server!"
on world change:
log "Someone just went to %event-world%!" to file "worldlog/worlds.log"
on command:
log "%player% just executed %full command%!" to file "server/commands.log" with a severity of warning
Patterns: |
|
Since: | 2.7 |
Requirements: | Paper 1.17+, Paper 1.19.1+ (Players & Look Anchors) |
Examples:
on entity explosion:
set {_player} to the nearest player
{_player} is set
distance between {_player} and the event-location is less than 15
make {_player} look towards vector from the {_player} to location of the event-entity
force {_enderman} to face the block 3 meters above {_location} at head rotation speed 100.5 and max head pitch -40
Patterns: |
|
Since: | 2.7 |
Usable in events: | Egg Throw |
Examples:
# EGGS FOR DAYZ!
make the egg hatch
Patterns: |
|
Since: | 2.9.0 |
Requirements: | Spigot 1.20.5+ |
Examples:
make {_items::*} not resistant to fire
Patterns: | |
Since: | 2.5 |
Examples:
make the explosion fiery
Patterns: |
|
Since: | 2.7 |
Examples:
Patterns: | |
Since: | 2.3 |
Examples:
force all players to send the message "I love this server"
Patterns: |
|
Since: | 2.8.0 |
Examples:
Patterns: |
|
Since: | 1.0, 2.2-dev26 (advanced features), 2.5.2 (optional sender), 2.6 (sending objects) |
Requirements: | Minecraft 1.16.4+ for optional sender |
Examples:
message "This message is a distraction. Mwahaha!"
send "Your kill streak is %{kill streak::%uuid of player%}%." to player
if the targeted entity exists:
message "You're currently looking at a %type of the targeted entity%!"
on chat:
cancel event
send "[%player%] >> %message%" to all players from player
Patterns: |
|
Since: | 2.0, 2.1.1 (closing), 2.2-Fixes-V10 (anvil), 2.4 (hopper, dropper, dispenser |
Examples:
open the player's inventory for the player
Patterns: |
|
Since: | 2.7 |
Requirements: | Paper |
Examples:
make all cows stop pathfinding
make event-entity pathfind towards player at speed 1
Patterns: |
|
Since: | 2.1 |
Examples:
show mob spawner flames at the targeted block to the player
Patterns: |
|
Since: | 2.2-dev28, 2.4 (sound categories), 2.9 (sound seed & entity emitter) |
Requirements: | Minecraft 1.18.1+ (entity emitters), Paper 1.19.4+ or Adventure API 4.12.0+ (sound seed) |
When running 1.19+, playing a sound from an entity directly will result in the sound coming from said entity, even while moving. If the sound is custom, a location emitter will follow the entity. Do note that pitch and volume are reflected based on the entity, and Minecraft may not use the values from this syntax.
If using Paper 1.19.4+ or Adventure API 4.12.0+ you can utilize sound seeds. Minecraft sometimes have a set of sounds under one sound ID that will randomly play, to counter this, you can directly state which seed to use.
Please note that sound names can get changed in any Minecraft or Spigot version, or even removed from Minecraft itself.
Examples:
play sound "entity.experience_orb.pickup" with volume 0.5 to the player
play sound "custom.music.1" in jukebox category at {speakerBlock}
play sound "BLOCK_AMETHYST_BLOCK_RESONATE" with seed 1 on target entity for the player #1.20.1+
Patterns: |
|
Since: | 2.3 |
Usable in events: | server list ping |
Requirements: | Paper 1.12.2 or newer |
Examples:
hide player related information in the server list
reveal all player related info
Patterns: | |
Since: | 2.3 |
Note: if a player was hidden and relogs, this player will be visible again.
Examples:
if {vanished::%player's uuid%} is true:
hide the player from all players
reveal hidden players of {_player}
Patterns: |
|
Since: | 1.3.2 |
Examples:
poison the victim for 20 seconds
cure the player from poison
Patterns: |
|
Since: | 2.0, 2.2-dev27 (ambient and particle-less potion effects), 2.5 (replacing existing effect), 2.5.2 (potion effects), 2.7 (icon and infinite) |
Examples:
remove haste from the victim
on join:
apply infinite potion of strength of tier {strength::%uuid of player%} to the player
apply potion of strength of tier {strength::%uuid of player%} to the player for 999 days # Before 1.19.4
apply potion effects of player's tool to player
apply haste potion of tier 3 without any particles whilst hiding the potion icon to the player # Hide potions
Patterns: |
|
Since: | 2.0, 2.2-dev24 (replace in multiple strings and replace items in inventory), 2.5 (replace first, case sensitivity) |
Examples:
replace every "&" with "§" in line 1
# The following acts as a simple chat censor, but it will e.g. censor mass, hassle, assassin, etc. as well:
on chat:
replace all "kys", "idiot" and "noob" with "****" in the message
replace all stone and dirt in player's inventory and player's top inventory with diamond
Patterns: |
|
Since: | 2.2, 2.8.0 (returns aliases) |
Examples:
return 2 * {_i}
function divide(i: number) returns number:
return {_i} / 2
Patterns: | |
Since: | 2.9.0 |
Requirements: | Spigot 1.19.4+ |
Examples:
Patterns: |
|
Since: | 2.8.0 |
Examples:
save all worlds
Patterns: |
|
Since: | 2.2-dev37c, 2.5.1 (block data support) |
Examples:
make player see target block as campfire[facing=south]
Patterns: | |
Since: | 2.4 |
The hash is used for caching, the player won't have to re-download the resource pack that way. The hash must be SHA-1, you can get SHA-1 hash of your resource pack using this online tool.
The resource pack request action can be used to check status of the sent resource pack request.
Examples:
send the resource pack from "URL" with hash "hash" to the player
Patterns: |
|
Since: | 2.0 (cows, sheep & snowmen), 2.8.0 (all shearable entities) |
Requirements: | Paper 1.19.4+ (all shearable entities) |
Please note that..:
- If your server is not running with Paper 1.19.4 or higher, this effect will only change its 'shear state', and the 'force' effect is unavailable
- Force-shearing or un-shearing on a sheared mushroom cow is not possible
Examples:
shear the clicked sheep
chance of 10%
force shear the clicked sheep
Patterns: |
|
Since: | 1.4 |
Examples:
make the player shoot a creeper at speed 10
shoot a pig from the creeper
Patterns: |
|
Since: | 2.9.0 |
Examples:
sort {_words::*} # alphabetical sort
sort {_words::*} by length of input # shortest to longest
sort {_words::*} based on {tastiness::%input%} # sort based on custom value
Patterns: |
|
Since: | 2.5 |
Examples:
restart server
Patterns: |
|
Since: | 2.4, 2.7 (stop all sounds) |
Requirements: | MC 1.17.1 (stop all sounds) |
Please note that sound names can get changed in any Minecraft or Spigot version, or even removed from Minecraft itself.
Examples:
stop playing sounds "ambient.underwater.loop" and "ambient.underwater.loop.additions" to the player
stop all sounds for all players
stop sound in the record category
Patterns: |
|
Since: | 2.5.1 |
Requirements: | Minecraft 1.15.2+ |
Examples:
Patterns: | |
Since: | 1.0 |
Examples:
teleport the attacker to the victim
Patterns: | |
Since: | 2.3 |
If you're sending only the subtitle, it will be shown only if there's a title displayed at the moment, otherwise it will be sent with the next title. To show only the subtitle, use: send title " " with subtitle "yourtexthere" to player
.
Note: if no input is given for the times, it will keep the ones from the last title sent, use the reset title effect to restore the default values.
Examples:
send title "Hi %player%" to player
send title "Loot Drop" with subtitle "starts in 3 minutes" to all players
send title "Hello %player%!" with subtitle "Welcome to our server" to player for 5 seconds with fadein 1 second and fade out 1 second
send subtitle "Party!" to all players
Patterns: |
|
Since: | 2.8.0 |
Examples:
send "You can no longer pick up items!" to player
on drop:
if player can't pick up items:
allow player to pick up items
Patterns: |
|
Since: | 1.0 |
Examples:
Patterns: |
|
Since: | 2.0 |
Examples:
make the attacker ride the victim
Patterns: |
|
Since: | 1.0 |
Examples:
deop all players
Patterns: |
|
Since: | 1.0, 2.6.1 (with section), 2.8.6 (dropped items) |
Examples:
spawn a ghast 5 meters above the player
spawn a zombie at the player:
set name of the zombie to ""