Patterns: |
|
Since: | 1.4, 2.1.1 (ban reason), 2.5 (timespan) |
Note that banning people does not kick them from the server. 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
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.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 'heal' 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 |
Examples:
execute console command "/say Hello everyone!"
Patterns: |
|
Since: | 2.2-dev37, 2.7 (while loops) |
Examples:
if loop-value does not have permission "moderator":
continue # filter out non moderators
broadcast "%loop-player% is a moderator!" # Only moderators get broadcast
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: | 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.3 |
Examples:
hide {vanished::*} from the server list
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.4 |
Examples:
Patterns: |
|
Since: | 2.3 |
Examples:
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.3 |
Examples:
suppress the variable save warnings
Patterns: | |
Since: | 2.0 |
Examples:
log "%player% placed TNT in %world% at %location of block%" to "tnt/placement.log"
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.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: | 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) |
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}
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) |
Examples:
remove haste from the victim
on join:
apply potion of strength of tier {strength.%player%} to the player for 999 days
apply potion effects of player's tool to player
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 |
Examples:
return 2 * {_i}
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 |
Examples:
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.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 sound for all players
stop sound in 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: | 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) |
Examples:
spawn a ghast 5 meters above the player
spawn a zombie at the player:
set name of the zombie to ""