Patterns: |
|
Since: | 2.10 |
Usable in events: | Unleash |
Examples:
if player is not set:
prevent the leash from dropping
else if player is op:
allow the leash to drop
Patterns: |
|
Since: | 2.10 |
Examples:
allow aging of entity
Patterns: |
|
Since: | 2.10 |
Usable in events: | Fishing |
Examples:
apply lure enchantment bonus
Patterns: |
|
Since: | 1.4, 2.1.1 (ban reason), 2.5 (timespan), 2.9.0 (kick) |
If a reason is given, it will be shown to the player when they try to join the server while banned.
A length of ban may also be given to apply a temporary ban. If it is absent for any reason, a permanent ban will be used instead.
We recommend that you test your scripts so that no accidental permanent bans are applied.
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+ |
For example, interrupting eating, or drawing back a bow.
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.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) |
If the command is a bungeecord side command, you can use the [bungeecord] option to execute command on the proxy.
Examples:
execute console command "/say Hello everyone!"
execute player bungeecord command "/alert &6Testing Announcement!"
Patterns: |
|
Since: | 2.10 |
Examples:
make command block {_block} unconditional if {_block} is conditional
Patterns: | |
Since: | 2.3, 2.10 (transfer) |
If the server is running Minecraft 1.20.5 or above, you may specify an IP and Port to transfer a player over to that server.
When transferring players using an IP, the transfer will not complete if the `accepts-transfers` option isn't enabled in `server.properties` for the server specified.
If the port is not provided, it will default to `25565`.
Examples:
transfer player to server "my.server.com"
transfer player to server "localhost" on port 25566
Patterns: |
|
Since: | 2.10 |
Requirements: | Paper |
Examples:
if the used firework will be consumed:
prevent the used firework from being consume
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 |
Note: Copying a value into a variable/list will overwrite the existing data.
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, 2.10 (damage cause) |
Requirements: | Spigot 1.20.4+ (for damage cause) |
Servers running Spigot 1.20.4+ can optionally choose to specify a fake damage cause.
Examples:
damage player by 3 hearts with fake cause fall
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.10 |
Examples:
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, 2.10 (unloading) |
Disabling a script unloads it and prepends - to its name so it will not be loaded the next time the server restarts. If the script reflection experiment is enabled: unloading a script terminates it and removes it from memory, but does not alter the file.
Examples:
enable script file "testing"
unload script file "script.sk"
set {_script} to the script "MyScript.sk"
reload {_script}
Patterns: |
|
Since: | 2.0 |
Examples:
disenchant the player's tool
Patterns: |
|
Since: | 2.9.0 |
Requirements: | MC 1.17+ |
All non-whitelisted players will be kicked upon enforcing the whitelist.
Examples:
unenforce the whitelist
Patterns: | |
Since: | 2.3, 2.10 (entities) |
Requirements: | Minecraft 1.19+ (entities) |
If no players are given, will hide the entities from all online players.
When reveal is used in combination of the hidden players expression and the viewers are not specified, this will default it to the given player in the hidden players expression.
Note: all previously hidden entities (including players) will be visible when a player leaves and rejoins.
Examples:
if event-entity is a chicken:
hide event-entity
reveal hidden players of players
Patterns: |
|
Since: | 1.0, 2.7 (multiple entities, unequip), 2.10 (wolves) |
This effect will replace any armor that the entity is already wearing.
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 |
Hint: use a force of 0 to create a fake explosion that does no damage whatsoever, or use the explosion effect introduced in Skript 2.0.
Starting with Bukkit 1.4.5 and Skript 2.0 you can use safe explosions which will damage entities but won't destroy any blocks.
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.10 |
Requirements: | Spigot 1.20.5+ |
Examples:
force the player's tool to stop glinting
Patterns: |
|
Since: | 2.2-dev21 |
Examples:
force event-player to respawn
Patterns: |
|
Since: | 2.10 |
Note that if the inventory is full, it will cause warnings in the console due to over-filling the inventory.
Examples:
generate loot using "minecraft:chests/shipwreck_supply" in {_inventory}
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+ |
If changing the 'entire' tooltip of an item, nothing will show up when a player hovers over it.
If changing the 'additional' tooltip, only specific parts (which change per item) will be hidden.
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, 2.10 (ignoring totem of undying) |
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 |
See Spigot's Javadocs for more info.
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 |
last loaded server icon expression.
Please note that the image must be 64x64 and the file path starts from the server folder.
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 |
The load effect will create a new world if world doesn't already exist.
When attempting to load a normal vanilla world you must define it's environment i.e "world_nether" must be loaded with nether environment
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) |
NB: Using 'server.log' as the log file will write to the default server log. Omitting the log file altogether will log the message as '[Skript] [<script>.sk] <message>' in the server log.
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.10 |
Examples:
entity is not an adult
make entity an adult
Patterns: |
|
Since: | 2.10 |
Examples:
make entity unbreedable
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 |
When setting an entity to invisible while using an invisibility potion on it, the potion will be overridden and when it runs out the entity keeps its invisibility.
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 |
in given string or in formatted expressions will be parsed.
Adding an optional sender allows the messages to be sent as if a specific player sent them.
This is useful with Minecraft 1.16.4's new chat ignore system, in which players can choose to ignore other players,
but for this to work, the message needs to be sent from a player.
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 |
Please note that currently 'show' and 'open' have the same effect, but 'show' will eventually show an unmodifiable view of the inventory in the future.
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 |
Please note that some effects can only be played on entities, e.g. wolf hearts or the hurt effect, and that these are always visible to all players.
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 |
The Vanilla Minecraft client will display ??? (dark gray) instead of player counts and will not show the
hover hist when hiding player info.
The version string can override the ???.
Also the Online Players Count and
Max Players expressions will return -1 when hiding player info.
Examples:
hide player related information in the server list
reveal all player related info
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.10 |
Usable in events: | Fishing |
Examples:
pull in hooked entity
Patterns: |
|
Since: | 2.10 |
Item tags should be used for contexts where the item is not placed down, while block tags should be used for contexts where the item is placed. For example, and item tag could be "skript:edible", while a block tag would be "skript:needs_water_above".
All custom tags will be given the namespace "skript", followed by the name you give it. The name must only include the characters A to Z, 0 to 9, and '/', '.', '_', and '-'. Otherwise, the tag will not register.
Please note that two tags can share a name if they are of different types. Registering a new tag of the same name and type will overwrite the existing tag. Tags will reset on server shutdown.
Examples:
register an item tag named "skript:wasp_weapons/swords" containing diamond sword and netherite sword
register block tag named "pokey" containing sweet berry bush and bamboo sapling
on player move:
block at player is tagged as tag "skript:pokey"
damage the player by 1 heart
Patterns: |
|
Since: | 2.0, 2.2-dev24 (multiple strings, items in inventory), 2.5 (replace first, case sensitivity), 2.10 (regex) |
Examples:
replace every "&" with "§" in line 1 of targeted block
# Very simple chat censor
on chat:
replace all "idiot" and "noob" with "****" in the message
regex replace "\b(idiot|noob)\b" with "****" in the message # Regex version using word boundaries for better results
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+ |
Optionally, the entity that rang the bell and the direction the bell should ring can be specified.
A bell can only ring in two directions, and the direction is determined by which way the bell is facing.
By default, the bell will ring in the direction it is facing.
Examples:
Patterns: |
|
Since: | 2.2-dev28, 2.10 (quaternions, displays) |
Vectors can only be rotated around the global X/Y/Z axes, or an arbitrary vector axis.
Quaternions are more flexible, allowing rotation around the global or local X/Y/Z axes, arbitrary vectors, or all 3 local axes at once.
Global axes are the ones in the Minecraft world. Local axes are relative to how the quaternion is already oriented.
Rotating a display is a shortcut for rotating its left rotation. If the right rotation needs to be modified, it should be acquired, rotated, and re-set.
Note that rotating a quaternion/display around a vector results in a rotation around the local vector, so results may not be what you expect. For example, rotating quaternions/displays around vector(1, 0, 0) is the same as rotating around the local X axis.
The same applies to rotations by all three axes at once. In addition, rotating around all three axes of a quaternion/display at once will rotate in ZYX order, meaning the Z rotation will be applied first and the X rotation last.
Examples:
rotate last spawned block display around y axis by 10 degrees
rotate {_vector} around vector(1, 1, 1) by 45
rotate {_quaternion} by x 45, y 90, z 135
Patterns: |
|
Since: | 2.10 |
Examples:
run {_function}
run {_function} with arguments {_things::*}
Patterns: |
|
Since: | 2.8.0 |
Note: saving many worlds at once may possibly cause the server to freeze.
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 resource pack in the background, and will automatically switch to it once the download is complete.
The URL must be a direct download link.
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: | 2.9.0, 2.10 (sort order) |
When using the full sort %~objects% (by|based on) <expression>
pattern, the input expression can be used to refer to the current item being sorted. (See input expression for more information.)
Examples:
sort {_words::*} # alphabetical sort
sort {_words::*} by length of input # shortest to longest
sort {_words::*} in descending order by length of input # longest to shortest
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: | 2.10 |
Examples:
untame {_horse}
Patterns: |
|
Since: | 1.0, 2.10 (flags) |
Requirements: | Paper 1.19+ (teleport flags) |
This effect is delayed by default on Paper, meaning certain syntax such as the return effect for functions cannot be used after this effect.
The keyword 'force' indicates this effect will not be delayed,
which may cause lag spikes or server crashes when using this effect to teleport entities to unloaded chunks.
Teleport flags are settings to retain during a teleport. Such as direction, passengers, x coordinate, etc.
Examples:
teleport the attacker to the victim
on dismount:
cancel event
teleport the player to {server::spawn} retaining vehicle and passengers
Patterns: | |
Since: | 2.10 |
Examples:
if {_display} has drop shadow:
remove drop shadow from the text of {_display}
Patterns: | |
Since: | 2.10 |
Examples:
prevent all text displays from being visible through walls
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: | 2.10 |
Evaluates the given expression for each element in the list, replacing the original element with the expression's result.
If the given expression returns a single value, the indices of the list will not change. If the expression returns multiple values, then then indices will be reset as a single index cannot contain multiple values.
Only variable lists can be transformed with this effect. For other lists, see the transform expression.
Examples:
transform {_a::*} using input * 2
# {_a::*} is now 2, 4, and 6
# get a list of the sizes of all clans without manually looping
set {_clan-sizes::*} to indices of {clans::*}
transform {_clan-sizes::*} using {clans::%input%::size}
# set all existing values of a list to 0:
transform {_list::*} to 0
Patterns: |
|
Since: | 1.0 |
This may require that there is enough space above the given location and that the block below is dirt/grass, but it is possible that the tree will just grow anyways, possibly replacing every block in its path.
Examples:
Patterns: |
|
Since: | 2.10 |
Using 'without physics' will not send updates to the surrounding blocks of the blocks being set.
Example: Updating a block next to a sand block in the air 'without physics' will not cause the sand block to fall.
Examples:
update {_blocks::*} to be sand without physics updates
update {_blocks::*} as stone without neighbouring updates
Patterns: |
|
Since: | 2.0 |
Examples:
make the attacker ride the victim
Patterns: |
|
Since: | 1.0 |
Examples:
deop all players
Patterns: |
|
Since: | 2.10 |
Examples:
shoot a pig from all players:
add event-entity to {_projectiles::*}
Patterns: |
|
Since: | 1.0, 2.6.1 (with section), 2.8.6 (dropped items), 2.10 (entity snapshots) |
Requirements: | Minecraft 1.20.2+ (entity snapshots) |
If it is used as a section, the section is run before the entity is added to the world.
You can modify the entity in this section, using for example 'event-entity' or 'cow'.
Do note that other event values, such as 'player', won't work in this section.
If you're spawning a display and want it to be empty on initialization, like not having a block display be stone, set hidden config node 'spawn empty displays' to true.
Note that when spawning an entity via entity snapshots, the code within the section will not run instantaneously as compared to spawning normally (via 'a zombie').
Examples:
spawn a ghast 5 meters above the player
spawn a zombie at the player:
set name of the zombie to ""
spawn a block display of a ladder[waterlogged=true] at location above player:
set billboard of event-display to center # allows the display to rotate around the center axis