Attribute Type 🔗
Patterns: |
|
Since: | 2.5 |
Represents the type of an attribute. Note that this type does not contain any numerical values.See attribute types for more info.
Examples:
Biome 🔗
Patterns: |
|
Since: | 1.4.4 |
All possible biomes Minecraft uses to generate a world. Please remember biomes will differ based on Minecraft versions.
Examples:
biome at the player is desert
Block 🔗
Patterns: | |
Since: | 1.0 |
A block in a world. It has a location and a type, and can also have a direction (mostly a facing), an inventory, or other special properties.
Examples:
Block Data 🔗
Patterns: | |
Since: | 2.5 |
Block data is the detailed information about a block, referred to in Minecraft as BlockStates, allowing for the manipulation of different aspects of the block, including shape, waterlogging, direction the block is facing, and so much more. Information regarding each block's optional data can be found on Minecraft's Wiki. Find the block you're looking for and scroll down to 'Block States'. Different states must be separated by a semicolon (see examples). The 'minecraft:' namespace is optional, as well as are underscores.
Examples:
set block at player to campfire[lit=false]
set target block of player to oak stairs[facing=north;waterlogged=true]
set block at player to grass_block[snowy=true]
set loop-block to minecraft:chest[facing=north]
set block above player to oak_log[axis=y]
set target block of player to minecraft:oak_leaves[distance=2;persistent=false]
set target block of player to oak stairs[facing=north;waterlogged=true]
set block at player to grass_block[snowy=true]
set loop-block to minecraft:chest[facing=north]
set block above player to oak_log[axis=y]
set target block of player to minecraft:oak_leaves[distance=2;persistent=false]
Boolean 🔗
Patterns: |
|
Since: | 1.0 |
A boolean is a value that is either true or false. Other accepted names are 'on' and 'yes' for true, and 'off' and 'no' for false.
Examples:
set {config.%player%.use mod} to false
Cat Type 🔗
Patterns: |
|
Since: | 2.4 |
Represents the race/type of a cat entity.
Examples:
Chunk 🔗
Patterns: | |
Since: | 2.0 |
A chunk is a cuboid of 16×16×128 (x×z×y) blocks. Chunks are spread on a fixed rectangular grid in their world.
Examples:
Click Type 🔗
Patterns: |
|
Since: | 2.2-dev16b, 2.2-dev35 (renamed to click type) |
Click type, mostly for inventory events. Tells exactly which keys/buttons player pressed, assuming that default keybindings are used in client side.
Examples:
Colour 🔗
Patterns: |
|
Since: |
Wool, dye and chat colours.
Examples:
color of the sheep is red or black
set the colour of the block to green
message "You're holding a <%color of tool%>%color of tool% wool block"
set the colour of the block to green
message "You're holding a <%color of tool%>%color of tool%
Command Sender 🔗
Patterns: |
|
Since: | 1.0 |
A player or the console.
Examples:
on command /pm:
command sender is not the console
chance of 10%
give coal to the player
message "You got a piece of coal for sending that PM!"
command sender is not the console
chance of 10%
give coal to the player
message "You got a piece of coal for sending that PM!"
Damage Cause 🔗
Patterns: |
|
Since: | 2.0 |
The cause/type of a damage event, e.g. lava, fall, fire, drowning, explosion, poison, etc. Please note that support for this type is very rudimentary, e.g. lava, fire and burning, as well as projectile and attack are considered different types.
Examples:
Date 🔗
Patterns: | |
Since: | 1.4 |
A date is a certain point in the real world's time which can currently only be obtained with now. See time and timespan for the other time types of Skript.
Examples:
set {_yesterday} to now
subtract a day from {_yesterday}
# now {_yesterday} represents the date 24 hours before now
subtract a day from {_yesterday}
# now {_yesterday} represents the date 24 hours before now
Difficulty 🔗
Direction 🔗
Patterns: |
|
Since: | 2.0 |
A direction, e.g. north, east, behind, 5 south east, 1.3 meters to the right, etc. Locations and some blocks also have a direction, but without a length. Please note that directions have changed extensively in the betas and might not work perfectly. They can also not be used as command arguments.
Examples:
set the block below the victim to a chest
loop blocks from the block infront of the player to the block 10 below the player:
set the block behind the loop-block to water
loop blocks from the block infront of the player to the block 10 below the player:
set the block behind the loop-block to water
Enchantment 🔗
Patterns: |
|
Since: | 1.4.6 |
An enchantment, e.g. 'sharpness' or 'fortune'. Unlike enchantment type this type has no level, but you usually don't need to use this type anyway.
Examples:
Enchantment Offer 🔗
Patterns: | |
Since: | 2.5 |
The enchantmentoffer in an enchant prepare event.
Examples:
on enchant prepare:
set enchant offer 1 to sharpness 1
set the cost of enchant offer 1 to 10 levels
set enchant offer 1 to sharpness 1
set the cost of enchant offer 1 to 10 levels
Enchantment Type 🔗
Patterns: |
|
Since: | 1.4.6 |
An enchantment with an optional level, e.g. 'sharpness 2' or 'fortune'.
Examples:
enchant the player's tool with sharpness 5
helmet is enchanted with aqua affinity
helmet is enchanted with aqua affinity
Entity 🔗
Patterns: |
|
Since: | 1.0 |
An entity is something in a world that's not a block, e.g. a player, a skeleton, or a zombie, but also projectiles like arrows, fireballs or thrown potions, or special entities like dropped items, falling blocks or paintings.
Examples:
entity is a zombie or creeper
player is an op
projectile is an arrow
shoot a fireball from the player
player is an op
projectile is an arrow
shoot a fireball from the player
Entity Type 🔗
Patterns: |
|
Since: | 1.3 |
The type of an entity, e.g. player, wolf, powered creeper, etc.
Examples:
victim is a cow
spawn a creeper
spawn a creeper
Entity Type with Amount 🔗
Patterns: |
|
Since: | 1.3 |
An entity type with an amount, e.g. '2 zombies'. I might remove this type in the future and make a more general 'type' type, i.e. a type that has a number and a type.
Examples:
spawn 5 creepers behind the player
Experience 🔗
Patterns: |
|
Since: | 2.0 |
Experience points. Please note that Bukkit only allows to give XP, but not remove XP from players. You can however change a player's level and level progress freely.
Examples:
give 10 xp to the player
Firework Effect 🔗
Patterns: | |
Since: | 2.4 |
A configuration of effects that defines the firework when exploded.
Examples:
Firework Type 🔗
Game Mode 🔗
Patterns: |
|
Since: | 1.0 |
The gamemode of a player.
Examples:
player's gamemode is survival
set the player argument's game mode to creative
set the player argument's game mode to creative
Gamerule 🔗
Patterns: |
|
Since: | 2.5 |
A gamerule
Examples:
Gamerule Value 🔗
Patterns: | |
Since: | 2.5 |
A wrapper for the value of a gamerule for a world.
Examples:
Gene 🔗
Patterns: |
|
Since: | 2.4 |
Represents a Panda's main or hidden gene. See genetics for more info.
Examples:
Heal Reason 🔗
Patterns: |
|
Since: | 2.5 |
The heal reason in a heal event.
Examples:
Inventory 🔗
Patterns: | |
Since: | 1.0 |
An inventory of a player or block. Inventories have many effects and conditions regarding the items contained. An inventory has a fixed amount of slots which represent a specific place in the inventory, e.g. the helmet slot for players (Please note that slot support is still very limited but will be improved eventually).
Examples:
Inventory Action 🔗
Patterns: |
|
Since: | 2.2-dev16 |
What player just did in inventory event. Note that when in creative game mode, most actions do not work correctly.
Examples:
Inventory Slot 🔗
Patterns: | |
Since: |
Represents a single slot of an inventory. Notable slots are the armour slots and furnace slots. The most important property that distinguishes a slot from an item is its ability to be changed, e.g. it can be set, deleted, enchanted, etc. (Some item expressions can be changed as well, e.g. items stored in variables. For that matter: slots are never saved to variables, only the items they represent at the time when the variable is set). Please note that tool can be regarded a slot, but it can actually change it's position, i.e. doesn't represent always the same slot.
Examples:
set tool of player to dirt
delete helmet of the victim
set the colour of the player's tool to green
enchant the player's chestplate with projectile protection 5
delete helmet of the victim
set the colour of the player's tool to green
enchant the player's chestplate with projectile protection 5
Inventory Type 🔗
Patterns: |
|
Since: | 2.2-dev32 |
Minecraft has several different inventory types with their own use cases.
Examples:
Item / Material 🔗
Patterns: |
|
Since: | 1.0 |
An item, e.g. a stack of torches, a furnace, or a wooden sword of sharpness 2. Unlike item type an item can only represent exactly one item (e.g. an upside-down cobblestone stair facing west), while an item type can represent a whole range of items (e.g. any cobble stone stairs regardless of direction). You don't usually need this type except when you want to make a command that only accepts an exact item. Please note that currently 'material' is exactly the same as 'item', i.e. can have an amount & enchantments.
Examples:
set {_item} to type of the targeted block
{_item} is a torch
{_item} is a torch
Item Type 🔗
Patterns: |
|
Since: | 1.0 |
An item type is an alias, e.g. 'a pickaxe', 'all plants', etc., and can result in different items when added to an inventory, and unlike items they are well suited for checking whether an inventory contains a certain item or whether a certain item is of a certain type. An item type can also have one or more enchantments with or without a specific level defined, and can optionally start with 'all' or 'every' to make this item type represent all types that the alias represents, including data ranges.
Examples:
give 4 torches to the player
add all slabs to the inventory of the block
player's tool is a diamond sword of sharpness
remove a pickaxes of fortune 4 from {stored items::*}
set {_item} to 10 of every upside-down stair
block is dirt or farmland
add all slabs to the inventory of the block
player's tool is a diamond sword of sharpness
remove a pickaxes of fortune 4 from {stored items::*}
set {_item} to 10 of every upside-down stair
block is dirt or farmland
Living Entity 🔗
Patterns: |
|
Since: | 1.0 |
Examples:
spawn 5 powered creepers
shoot a zombie from the creeper
shoot a zombie from the creeper
Location 🔗
Patterns: | |
Since: | 1.0 |
A location in a world. Locations are world-specific and even store a direction, e.g. if you save a location and later teleport to it you will face the exact same direction you did when you saved the location.
Examples:
Merchant Inventory 🔗
Patterns: |
|
Since: | INSERT VERSION |
Represents a villager trading inventory. These differ from regular inventories as they can not have slots set.
Examples:
Metadata Holder 🔗
Patterns: | |
Since: | 2.2-dev36 |
Something that can hold metadata (e.g. an entity or block)
Examples:
set metadata value "super cool" of player to true
Number 🔗
Patterns: |
|
Since: | 1.0 |
A number, e.g. 2.5, 3, or -9812454. Please note that many expressions only need integers, i.e. will discard any fractional parts of any numbers without producing an error.
Examples:
set the player's health to 5.5
set {_temp} to 2*{_temp} - 2.5
set {_temp} to 2*{_temp} - 2.5
Object 🔗
Patterns: | |
Since: | 1.0 |
The supertype of all types, meaning that if %object% is used in e.g. a condition it will accept all kinds of expressions.
Examples:
Offline Player 🔗
Patterns: | |
Since: |
A player that is possibly offline. See player for more information. Please note that while all effects and conditions that require a player can be used with an offline player as well, they will not work if the player is not actually online.
Examples:
Player 🔗
Patterns: | |
Since: | 1.0 |
A player. Depending on whether a player is online or offline several actions can be performed with them, though you won't get any errors when using effects that only work if the player is online (e.g. changing their inventory) on an offline player. You have two possibilities to use players as command arguments: <player> and <offline player>. The first requires that the player is online and also accepts only part of the name, while the latter doesn't require that the player is online, but the player's name has to be entered exactly.
Examples:
Potion Effect 🔗
Patterns: |
|
Since: | 2.5.2 |
A potion effect, including the potion effect type, tier and duration. See potion effect expression.
Examples:
speed of tier 1 for 10 seconds
Potion Effect Type 🔗
Patterns: |
|
Since: |
A potion effect type, e.g. 'strength' or 'speed'.
Examples:
apply speed 5 to the player
apply potion of speed 2 to the player for 60 seconds
remove invisibility from the victim
apply potion of speed 2 to the player for 60 seconds
remove invisibility from the victim
Projectile 🔗
Patterns: |
|
Since: | 1.0 |
A projectile, e.g. an arrow, snowball or thrown potion.
Examples:
projectile is a snowball
shoot an arrow at speed 5 from the player
shoot an arrow at speed 5 from the player
Resource Pack State 🔗
Patterns: |
|
Since: | 2.4 |
The state in a resource pack request response event.
Examples:
Server Icon 🔗
Sound Category 🔗
Patterns: |
|
Since: | 2.4 |
The category of a sound, they are used for sound options of Minecraft. See the play sound and stop sound effects.
Examples:
Spawn Reason 🔗
Patterns: |
|
Since: | 2.3 |
The spawn reason in a spawn event.
Examples:
Teleport Cause 🔗
Patterns: |
|
Since: | 2.2-dev35 |
The teleport cause in a teleport event.
Examples:
Text 🔗
Patterns: |
|
Since: | 1.0 |
Text is simply text, i.e. a sequence of characters, which can optionally contain expressions which will be replaced with a meaningful representation (e.g. %player% will be replaced with the player's name). Because scripts are also text, you have to put text into double quotes to tell Skript which part of the line is an effect/expression and which part is the text. Please read the article on Texts and Variable Names to learn more.
Examples:
broadcast "Hello World!"
message "Hello %player%"
message "The id of ""%type of tool%"" is %id of tool%."
message "Hello %player%"
message "The id of ""%type of tool%"" is %id of tool%."
Time 🔗
Patterns: |
|
Since: | 1.0 |
A time is a point in a minecraft day's time (i.e. ranges from 0:00 to 23:59), which can vary per world. See date and timespan for the other time types of Skript.
Examples:
at 20:00:
time is 8 pm
broadcast "It's %time%"
time is 8 pm
broadcast "It's %time%"
Timeperiod 🔗
Patterns: |
|
Since: | 1.0 |
A period of time between two times. Mostly useful since you can use this to test for whether it's day, night, dusk or dawn in a specific world. This type might be removed in the future as you can use 'time of world is between x and y' as a replacement.
Examples:
time in world is night
Timespan 🔗
Patterns: |
|
Since: | 1.0 |
A timespan is a difference of two different dates or times, e.g '10 minutes'. Timespans are always displayed as real life time, but can be defined as minecraft time, e.g. '5 minecraft days and 12 hours'. See date and time for the other time types of Skript.
Examples:
every 5 minecraft days:
wait a minecraft second and 5 ticks
every 10 mc days and 12 hours:
halt for 12.7 irl minutes, 12 hours and 120.5 seconds
wait a minecraft second and 5 ticks
every 10 mc days and 12 hours:
halt for 12.7 irl minutes, 12 hours and 120.5 seconds
Tree Type 🔗
Patterns: |
|
Since: | (unknown) |
A tree type represents a tree species or a huge mushroom species. These can be generated in a world with the generate tree effect.
Examples:
grow tall birch tree at the block
grow a mega redwood tree above the block
grow a mega redwood tree above the block
Type 🔗
Patterns: |
|
Since: | 2.0 |
Represents a type, e.g. number, object, item type, location, block, world, entity type, etc. This is mostly used for expressions like 'event-<type>', '<type>-argument', 'loop-<type>', etc., e.g. event-world, number-argument and loop-player.
Examples:
{variable} is a number # check whether the variable contains a number, e.g. -1 or 5.5
{variable} is a type # check whether the variable contains a type, e.g. number or player
{variable} is an object # will always succeed if the variable is set as everything is an object, even types.
disable PvP in the event-world
kill the loop-entity
{variable} is a type # check whether the variable contains a type, e.g. number or player
{variable} is an object # will always succeed if the variable is set as everything is an object, even types.
disable PvP in the event-world
kill the loop-entity
Vector 🔗
Patterns: |
|
Since: | 2.2-dev23 |
Vector is a collection of numbers. In Minecraft, 3D vectors are used to express velocities of entities.
Examples:
Visual Effect 🔗
Patterns: |
|
Since: | 2.1 |
A visible effect, e.g. particles.
Examples:
show wolf hearts on the clicked wolf
play mob spawner flames at the targeted block to the player
play mob spawner flames at the targeted block to the player
Weather Type 🔗
Patterns: |
|
Since: | 1.0 |
The weather types sunny, rainy, and thundering.
Examples:
is raining
is sunny in the player's world
message "It is %weather in the argument's world% in %world of the argument%"
is sunny in the player's world
message "It is %weather in the argument's world% in %world of the argument%"
World 🔗
Patterns: |
|
Since: | 1.0, 2.2 (alternate syntax) |
One of the server's worlds. Worlds can be put into scripts by surrounding their name with double quotes, e.g. "world_nether", but this might not work reliably as text uses the same syntax.
Examples:
broadcast "Hello!" to the world "world_nether"