diff --git a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/assets/icon.png b/docs/nightly/enhancement/merge-master-into-feature-attempt-2/assets/icon.png deleted file mode 100644 index 8c93b07d381..00000000000 Binary files a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/assets/icon.png and /dev/null differ diff --git a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/assets/light-off.svg b/docs/nightly/enhancement/merge-master-into-feature-attempt-2/assets/light-off.svg deleted file mode 100644 index 1b7db07723c..00000000000 --- a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/assets/light-off.svg +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/assets/light-on.svg b/docs/nightly/enhancement/merge-master-into-feature-attempt-2/assets/light-on.svg deleted file mode 100644 index 601ccea1f8e..00000000000 --- a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/assets/light-on.svg +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/assets/search.svg b/docs/nightly/enhancement/merge-master-into-feature-attempt-2/assets/search.svg deleted file mode 100644 index 9895c46a2d2..00000000000 --- a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/assets/search.svg +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/classes.html b/docs/nightly/enhancement/merge-master-into-feature-attempt-2/classes.html deleted file mode 100644 index a3c369ac667..00000000000 --- a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/classes.html +++ /dev/null @@ -1 +0,0 @@ - Skript Documentation - 2.8.0-dev-nightly-49c4fae

Types

Attribute Type

🔗

Type

Patterns:
  • luck, generic movement speed, horse jump strength, generic luck, generic max absorption, follow range, movement speed, max absorption, generic follow range, zombie spawn reinforcements, generic attack knockback, knockback resistance, attack knockback, generic armor toughness, generic attack speed, max health, flying speed, attack damage, generic attack damage, generic armor, generic flying speed, generic knockback resistance, armor, attack speed, armor toughness, generic max health
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:

Missing examples.

Biome

🔗

Type

Patterns:
  • roofed forest, old growth pine taiga, mesa forest, the void, snowy taiga, hell, jagged peaks, spiked ice plains, crimson forest, stone shore, birch forest, cold taiga, cold beach, savanna, giant tree taiga, marsh, windswept forest, wooded badlands, sky, nether, void, cold ocean, giant spruce taiga, lush caves, deep lukewarm ocean, deep frozen ocean, small end islands, ice spikes, old growth birch forest, badlands, badlands forest, ocean, lukewarm ocean, ice plains spikes, gravelly mountains, frozen peaks, stony peaks, jungle, basalt deltas, snowy beach, frozen ocean, mountains, forest, wooded mesa, eroded mesa, the end, dripstone caves, swampland, end barrens, ice plains with spikes, windswept hills, sea, unknown, black forest, soul sand valley, deep dark, mesa, plains, eroded badlands, mushroom fields, windswept gravelly hills, mushroom island, wooded mountains, shattered savanna, sunflower plains, snowy plains, meadow, snowy slopes, flower forest, windswept savanna, nether wastes, stony shore, taiga, frozen river, warm ocean, custom, old growth spruce taiga, deep cold ocean, swamp, mangrove swamp, deep ocean, end highlands, end midlands, cherry grove, sparse jungle, dark forest, jungle edge, grove, snowy tundra, beach, bamboo jungle, savanna plateau, river, tall birch forest, warped forest, desert
Since: 1.4.4
All possible biomes Minecraft uses to generate a world.

Examples:

biome at the player is desert

Block

🔗

Type

Patterns:
  • Missing 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:

Missing examples.

Block Data

🔗

Type

Patterns:
  • Missing 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]

Boolean

🔗

Type

Patterns:
  • true/yes/on or false/no/off
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

🔗

Type

Patterns:
  • red, all black, british shorthair, ragdoll, white, jellie, siamese, black, tabby, calico, persian
Since: 2.4
Requirements: Minecraft 1.14 or newer
Represents the race/type of a cat entity.

Examples:

Missing examples.

Chunk

🔗

Type

Patterns:
  • Missing 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:

Missing examples.

Click Type

🔗

Type

Patterns:
  • lmb, number key, mmb, rmb, drop item, drop key, window border using left mouse button, unknown, window border using right mouse, shift+rmb, unsupported, shift+lmb, ctrl+q, swap shield, left mouse button, left mouse with shift, left mouse, 0-9, double click, double click using mouse, border using rmb, right mouse button, right mouse button with shift, border using lmb, middle mouse, drop key with control, window border using right mouse button, swap offhand, custom, q, right mouse with shift, middle mouse button, drop stack, left mouse button with shift, right mouse, creative action
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:

Missing examples.

Color

🔗

Type

Patterns:
  • black, dark grey/dark gray, grey/light grey/gray/light gray/silver, white, blue/dark blue, cyan/aqua/dark cyan/dark aqua, light blue/light cyan/light aqua, green/dark green, light green/lime/lime green, yellow/light yellow, orange/gold/dark yellow, red/dark red, pink/light red, purple/dark purple, magenta/light purple, brown/indigo
Since: Unknown
Wool, dye and chat colors.

Examples:

color of the sheep is red or black
set the color of the block to green
message "You're holding a <%color of tool%>%color of tool%<reset> wool block"

Command Sender

🔗

Type

Patterns:
Since: 1.0
A player or the console.

Examples:

command /push [<player>]:
    trigger:
        if arg-1 is not set:
            if command sender is console:
                send "You can't push yourself as a console :\" to sender
                stop
            push sender upwards with force 2
            send "Yay!"
        else:
            push arg-1 upwards with force 2
            send "Yay!" to sender and arg-1

Damage Cause

🔗

Type

Patterns:
  • sweep attack, thorns, the void, magma, a lightning, drowning, dragonfire, an attack, drown, an entity attack, melt, freeze, falling block, contact, fire, an entity explosion, lightning, a fall, entity explosion, void, a lightning strike, suffocation, suicide, wither effect, a plugin, lightning strike, entity attack, a potion, a wither, sweeping, melting, a falling block, unknown, starvation, lava, fall, hot floor, attack, a block explosion, dryout, burn, hitting wall while flying, potion, world border, flying into a wall, cramming, poison, sonic boom, suffocate, custom, kill, killed, a fire, burning, a projectile, plugin, wither potion effect, block explosion, projectile, wither, dragon's breath
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:

Missing examples.

Date

🔗

Type

Patterns:
  • Missing patterns.
Since: 1.4
A date is a certain point in the real world's time which can be obtained with now expression, unix date expression and date function. 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

Difficulty

🔗

Type

Patterns:
  • normal, medium, hard, easy, peaceful
Since: 2.3
The difficulty of a world.

Examples:

Missing examples.

Direction

🔗

Type

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

Enchantment

🔗

Type

Patterns:
  • Efficiency, Looting, Soul Speed, Silk Touch, Quick Charge, Flame, Fortune, Aqua Affinity, Multishot, Channeling, Loyalty, Curse of Binding, Punch, Projectile Protection, Power, Sharpness, Frost Walker, Fire Protection, Impaling, Luck of The Sea, Riptide, Protection, Mending, Respiration, Piercing, Unbreaking, Swift Sneak, Feather Falling, Lure, Smite, Fire Aspect, Knockback, Depth Strider, Sweeping Edge, Infinity, Curse of Vanishing, Blast Protection, Bane of Arthropods, Thorns
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:

Missing examples.

Enchantment Offer

🔗

Type

Patterns:
  • Missing 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

Enchantment Type

🔗

Type

Patterns:
  • <enchantment> [<level>]
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 waterbreathing

Entity

🔗

Type

Patterns:
  • player, op, wolf, tamed ocelot, powered creeper, zombie, unsaddled pig, fireball, arrow, dropped item, item frame, etc.
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

Entity Type

🔗

Type

Patterns:
  • Detailed usage will be added eventually
Since: 1.3
The type of an entity, e.g. player, wolf, powered creeper, etc.

Examples:

victim is a cow
spawn a creeper

Entity Type with Amount

🔗

Type

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

🔗

Type

Patterns:
  • [<number>] ([e]xp|experience [point[s]])
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

🔗

Type

Patterns:
Since: 2.4
A configuration of effects that defines the firework when exploded which can be used in the launch firework effect. See the firework effect expression for detailed patterns.

Examples:

launch flickering trailing burst firework colored blue and green at player
launch trailing flickering star colored purple, yellow, blue, green and red fading to pink at target entity
launch ball large colored red, purple and white fading to light green and black at player's location with duration 1

Firework Type

🔗

Type

Patterns:
  • small, ball, star shaped, large, star, creeper face, small ball, large ball, burst, ball large, creeper
Since: 2.4
The type of a fireworkeffect.

Examples:

Missing examples.

Game Mode

🔗

Type

Patterns:
  • adventure, survival, spectator, creative
Since: 1.0
The game modes survival, creative, adventure and spectator.

Examples:

player's gamemode is survival
set the player argument's game mode to creative

Gamerule

🔗

Type

Patterns:
  • doWardenSpawning, tntExplosionDropDecay, globalSoundEvents, enderPearlsVanishOnDeath, doFireTick, maxCommandChainLength, doVinesSpread, fireDamage, reducedDebugInfo, waterSourceConversion, disableElytraMovementCheck, lavaSourceConversion, announceAdvancements, drowningDamage, commandBlockOutput, forgiveDeadPlayers, doMobSpawning, maxEntityCramming, disableRaids, doWeatherCycle, mobExplosionDropDecay, doDaylightCycle, showDeathMessages, doTileDrops, universalAnger, playersSleepingPercentage, snowAccumulationHeight, doInsomnia, doImmediateRespawn, blockExplosionDropDecay, naturalRegeneration, doMobLoot, fallDamage, keepInventory, doEntityDrops, doLimitedCrafting, mobGriefing, randomTickSpeed, spawnRadius, freezeDamage, doTraderSpawning, commandModificationBlockLimit, logAdminCommands, spectatorsGenerateChunks, sendCommandFeedback, doPatrolSpawning
Since: 2.5
Requirements: Minecraft 1.13 or newer
A gamerule

Examples:

Missing examples.

Gamerule Value

🔗

Type

Patterns:
  • Missing patterns.
Since: 2.5
A wrapper for the value of a gamerule for a world.

Examples:

Missing examples.

Gene

🔗

Type

Patterns:
  • normal, lazy, happy, worried, worrisome, aggressive, brown, brownish, savage, playful, wild, weak
Since: 2.4
Requirements: Minecraft 1.14 or newer
Represents a Panda's main or hidden gene. See genetics for more info.

Examples:

Missing examples.

Heal Reason

🔗

Type

Patterns:
  • an ender crystal, magic, a magic regeneration, magic regeneration, fed, sated, a magic regen, regen potion, a wither spawn, peaceful, unknown, a regeneration potion, consuming, a wither effect, peaceful regeneration, wither summoning, healing potion, wither potion, an end crystal, satiated, regeneration potion, potion, satisfied, ingesting, withered, custom, a wither spawning, end crystal, eating, wither spawning, a wither summoning, wither effect, a plugin, a regen potion, plugin, withering, a potion, wither spawn, a healing potion, ender crystal, magic regen, wither, peaceful regen
Since: 2.5
The heal reason in a heal event.

Examples:

Missing examples.

Inventory

🔗

Type

Patterns:
  • Missing 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:

Missing examples.

Inventory Action

🔗

Type

Patterns:
  • drop stack from slot, swap items with hotbar, swap cursor stack, pickup single item, pickup some, drop all from cursor, move to other inventory, drop cursor stack, pickup all, swap with hotbar, nothing, drop all from slot, swap cursor, drop cursor, pickup all items, drop slot item, place all, drop cursor item, drop slot stack, drop single item from slot, swap with cursor, place some, pickup one item, drop single item from cursor, collect items to cursor, unknown, clone stack, drop stack from cursor, drop one item from slot, drop one item from cursor, unsupported, do nothing, drop one from cursor, pickup half, drop items from slot, swap stack with cursor, place all items, collect to cursor, pickup some items, drop slot, drop items from cursor, hotbar move and readd, shift move, custom, pickup single, place one item, hotbar swap items, drop one from slot, place some items, place one, pickup half stack, instant move, hotbar swap
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:

Missing examples.

Inventory Close Reasons

🔗

Type

Patterns:
  • disconnect, death, teleport, cannot use, new opened, unknown, can't use, unloaded, disconnected, plugin, can not use, open new, player
Since: INSERT VERSION
Requirements: Paper
The inventory close reason in an inventory close event.

Examples:

Missing examples.

Inventory Type

🔗

Type

Patterns:
  • barrel inventory, a loom inventory, a blast furnace inventory, workbench inventory, ender chest inventory, loom inventory, a workbench inventory, hopper inventory, a merchant inventory, a hopper inventory, chiseled bookshelf, an ender chest inventory, new smithing table, bookshelf, a jukebox, beacon inventory, shulker box inventory, a barrel inventory, a shulker box inventory, lectern inventory, chest inventory, a villager inventory, a smoker inventory, a brewing stand inventory, a smithing inventory, grindstone inventory, a crafting table inventory, a player inventory, furnace inventory, a creative inventory, blast furnace inventory, upgrade gear, a composter inventory, an enchanting table inventory, jukebox, a dropper inventory, a cartography table inventory, a upgrade gear, smoker inventory, composter inventory, a chest inventory, upgrade gear table, a upgrade gear table, dispenser inventory, player inventory, stonecutter inventory, a stonecutter inventory, a lectern inventory, merchant inventory, cartography table inventory, a chiseled bookshelf, a new smithing table, a furnace inventory, anvil inventory, a dispenser inventory, a grindstone inventory, smithing inventory, dropper inventory, brewing stand inventory, villager inventory, enchanting table inventory, a beacon inventory, a bookshelf, creative inventory, crafting table inventory, an anvil inventory
Since: 2.2-dev32
Minecraft has several different inventory types with their own use cases.

Examples:

Missing examples.

Item

🔗

Type

Patterns:
  • [<number> [of]] <alias> [of <enchantment> <level>], Where <alias> must be an alias that represents exactly one item (i.e cannot be a general alias like 'sword' or 'plant')
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 Type

🔗

Type

Patterns:
  • [<number> [of]] [all/every] <alias> [of <enchantment> [<level>] [,/and <more enchantments...>]]
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

Living Entity

🔗

Type

Patterns:
  • see entity, but ignore inanimate objects
Since: 1.0
A living entity, i.e. a mob or player, not inanimate entities like projectiles or dropped items.

Examples:

spawn 5 powered creepers
shoot a zombie from the creeper

Location

🔗

Type

Patterns:
  • Missing 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:

Missing examples.

Metadata Holder

🔗

Type

Patterns:
  • Missing 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

Money

🔗

Type

Patterns:
  • <number> $ or $ <number>, where '$' is your server's currency, e.g. '10 rupees' or '£5.00'
Since: 2.0
Requirements: Vault, an economy plugin that supports Vault
A certain amount of money. Please note that this differs from numbers as it includes a currency symbol or name, but usually the two are interchangeable, e.g. you can both add 100$ to the player's balance and add 100 to the player's balance.

Examples:

add 10£ to the player's account
remove Fr. 9.95 from the player's money
set the victim's money to 0
increase the attacker's balance by the level of the victim * 100

Moon Phase

🔗

Type

Patterns:
  • last quarter, waning crescent, waxing gibbous, full moon, waning gibbous, waxing crescent, new moon, first quarter
Since: 2.7
Requirements: Paper 1.16+
Represents the phase of a moon.

Examples:

Missing examples.

Number

🔗

Type

Patterns:
  • [-]###[.###] (any amount of digits; very large numbers will be truncated though)
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

Object

🔗

Type

Patterns:
  • Missing 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:

Missing examples.

Offline Player

🔗

Type

Patterns:
  • Missing patterns.
Since: Unknown
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:

Missing examples.

Player

🔗

Type

Patterns:
  • Missing 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:

Missing examples.

Potion Effect

🔗

Type

Patterns:
  • speed of tier 1 for 10 seconds
Since: 2.5.2
A potion effect, including the potion effect type, tier and duration.

Examples:

Missing examples.

Potion Effect Type

🔗

Type

Patterns:
  • null, speed, slowness, haste, mining fatigue, strength, instant health, instant damage, jump boost, nausea, regeneration, resistance, fire resistance, water breathing, invisibility, blindness, night vision, hunger, weakness, poison, wither, health boost, absorption, saturation, glowing, levitation, luck, bad luck, slow falling, conduit power, dolphins grace, bad omen, hero of the village, darkness
Since: Unknown
A potion effect type, e.g. 'strength' or 'swiftness'.

Examples:

apply swiftness 5 to the player
apply potion of speed 2 to the player for 60 seconds
remove invisibility from the victim

Projectile

🔗

Type

Patterns:
  • arrow, fireball, snowball, thrown potion, etc.
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

Quit Reason

🔗

Type

Patterns:
  • disconnected, erroneous state, kicked, quit, timed out, erroneous
Since: INSERT VERSION
Requirements: Paper 1.16.5+
Represents a quit reason from a player quit server event.

Examples:

Missing examples.

Region

🔗

Type

Patterns:
  • "region name"
Since: 2.1
Requirements: Supported regions plugin
A region of a regions plugin. Skript currently supports WorldGuard, Factions, GriefPrevention and PreciousStones. Please note that some regions plugins do not have named regions, some use numerical ids to identify regions, and some may have regions with the same name in different worlds, thus using regions like "region name" in scripts may or may not work.

Examples:

Missing examples.

Resource Pack State

🔗

Type

Patterns:
  • refused, rejected, accepted, failed, failed to download, successfully loaded, accept, fail, successfully load, refuse, declined, successfully install, success, reject, decline, successfully installed, download fail
Since: 2.4
The state in a resource pack request response event.

Examples:

Missing examples.

Server Icon

🔗

Type

Patterns:
  • Missing patterns.
Since: 2.3
A server icon that was loaded using the load server icon effect.

Examples:

Missing examples.

Slot

🔗

Type

Patterns:
  • Missing patterns.
Since: Unknown
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 color of the player's tool to green
enchant the player's chestplate with projectile protection 5

Sound Category

🔗

Type

Patterns:
  • hostile creatures category, speech category, records category, friendly creature category, noteblock category, hostile creature category, note block category, voice category, ambient category, noteblocks category, note blocks category, weather category, block category, friendly mob category, jukebox category, hostile mob category, master category, master volume category, hostile category, record category, blocks category, environment category, jukeboxes category, player category, players category, hostile mobs category, friendly mobs category, music category, friendly creatures category, neutral category
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:

Missing examples.

Spawn Reason

🔗

Type

Patterns:
  • dispense egg, egg, village defense, ocelot baby, silverfish trap, village invading, trap, dispensing egg, shoulder, drowned, metamorphosis, lightning, silverfish reveal, spell, built iron golem, natural, village invasion, frozen, mount, build wither, built wither, iron golem defense, ender pearl, creature spawner, reinforcements, build snowman, build iron golem, breeding, raid, infection, customized, spawn egg, jockey, beehive, default, golem defense, patrol, slime split, infected, sheared, mob spawner, nether portal, shear, perching, custom, built snowman, chunk generation, breed, command, duplication, explosion, spawner, cured, customised, piglin zombification
Since: 2.3
The spawn reason in a spawn event.

Examples:

Missing examples.

Teleport Cause

🔗

Type

Patterns:
  • bed exit, nether portal, ender gateway, exiting bed, chorus fruit, ender portal, command, unknown, plugin, dismounted, ender pearl, spectator, spectate, end gateway, chorus, exit bed, gateway, dismount, end portal
Since: 2.2-dev35
The teleport cause in a teleport event.

Examples:

Missing examples.

Text

🔗

Type

Patterns:
  • simple: "..."
  • quotes: "...""..."
  • expressions: "...%expression%..."
  • percent signs: "...%%..."
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%."

Time

🔗

Type

Patterns:
  • ##:##
  • ##[:##][ ]am/pm
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%"

Timeperiod

🔗

Type

Patterns:
  • ##:## - ##:##
  • dusk/day/dawn/night
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

🔗

Type

Patterns:
  • <number> [minecraft/mc/real/rl/irl] ticks/seconds/minutes/hours/days/weeks/months/years [[,/and] <more...>]
  • [###:]##:##[.####] ([hours:]minutes:seconds[.milliseconds])
Since: 1.0, 2.6.1 (weeks, months, years)
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'. NOTE: Months always have the value of 30 days, and years of 365 days. 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

Tree Type

🔗

Type

Patterns:
  • [any] <general tree/mushroom type>, e.g. tree/any jungle tree/etc.
  • <specific tree/mushroom species>, e.g. red mushroom/small jungle tree/big regular tree/etc.
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 any regular tree at the block
grow a huge red mushroom above the block

Type

🔗

Type

Patterns:
  • See the type name patterns of all types - including this one
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

Vector

🔗

Type

Patterns:
  • vector(x, y, z)
Since: 2.2-dev23
Vector is a collection of numbers. In Minecraft, 3D vectors are used to express velocities of entities.

Examples:

Missing examples.

Visual Effect

🔗

Type

Patterns:
  • smoke, potion break, ender signal, mobspawner flames, arrow particles, jumping rabbit, hurt, wolf smoke, wolf hearts, wolf shaking, sheep eating, iron golem offering rose, villager hearts, angry villager entity, happy villager entity, witch magic, zombie turning to a villager, firework explosion, love hearts, squid rotation reset, entity poof, guardian target, block with shield, shield break, armor stand hit, hurt by thorns, iron golem sheathing rose, resurrection by totem, hurt by drowning, hurt by explosion, explosion, large explosion, huge explosion, firework's spark, water bubble, water splash, water wake, suspended, void fog, critical hit, magical critical hit, smoke particle, large smoke, spell, spell, potion swirl, transparent potion swirl, witch spell, water drip, lava drip, angry villager, happy villager, small smoke, note, portal, flying glyph, flame, lava pop, cloud, coloured dust, snowball break, snow shovel, slime, heart, item crack, block break, block dust, water drop, mob appearance, dragon breath, end rod, damage indicator, sweep attack, falling dust, totem, spit, squid ink, bubble pop, current down, bubble column up, nautilus, dolphin, sneeze, campfire cosy smoke, campfire signal smoke, composter, flash, falling lava, landing lava, falling water, dripping honey, falling honey, landing honey, falling nectar, soul fire flame, ash, crimson spore, warped spore, soul, dripping obsidian tear, falling obsidian tear, landing obsidian tear, reverse portal, white ash, falling spore blossom, spore blossom air, small flame, snowflake, dripping dripstone lava, falling dripstone lava, dripping dripstone water, falling dripstone water, glow squid ink, glow, wax on, wax off, electric spark, scrape, sonic boom, sculk soul, sculk charge, sculk charge pop, shriek
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

Weather Type

🔗

Type

Patterns:
  • clear/sun/sunny, rain/rainy/raining, and thunder/thundering/thunderstorm
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%"

World

🔗

Type

Patterns:
  • "world_name", e.g. "world"
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"

World Environment

🔗

Type

Patterns:
  • normal, nether, the end, the overworld, custom, the nether, end, overworld
Since: 2.7
Represents the environment of a world.

Examples:

Missing examples.
\ No newline at end of file diff --git a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/conditions.html b/docs/nightly/enhancement/merge-master-into-feature-attempt-2/conditions.html deleted file mode 100644 index aa36971805b..00000000000 --- a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/conditions.html +++ /dev/null @@ -1 +0,0 @@ - Skript Documentation - 2.8.0-dev-nightly-49c4fae

Conditions

Alphanumeric

🔗

Condition

Patterns:
  • %texts% (is|are) alphanumeric
  • %texts% (isn't|is not|aren't|are not) alphanumeric
Since: 2.4
Checks if the given string is alphanumeric.

Examples:

if the argument is not alphanumeric:
    send "Invalid name!"

Can Build

🔗

Condition

Patterns:
Since: 2.0
Requirements: Supported regions plugin
Tests whether a player is allowed to build at a certain location. This condition requires a supported regions plugin to be installed.

Examples:

command /setblock &lt;material&gt;:
    description: set the block at your crosshair to a different type
    trigger:
        player cannot build at the targeted block:
            message "You do not have permission to change blocks there!"
            stop
        set the targeted block to argument

Can Fly

🔗

Condition

Patterns:
Since: 2.3
Whether a player is allowed to fly.

Examples:

player can fly

Can Hold

🔗

Condition

Patterns:
Since: 1.0
Tests whether a player or a chest can hold the given item.

Examples:

block can hold 200 cobblestone
player has enough space for 64 feathers

Can Pick Up Items

🔗

Condition

Patterns:
Since: INSERT VERSION
Whether living entities are able to pick up items off the ground or not.

Examples:

if player can pick items up:
    send "You can pick up items!" to player

on drop:
    if player can't pick    up items:
        send "Be careful, you won't be able to pick that up!" to player

Can See

🔗

Condition

Patterns:
Since: 2.3
Checks whether the given players can see another players.

Examples:

if the player can't see the player-argument:
    message "&lt;light red&gt;The player %player-argument% is not online!"

Chance

🔗

Condition

Patterns:
Since: 1.0
A condition that randomly succeeds or fails. Valid values are between 0% and 100%, or if the percent sign is omitted between 0 and 1.

Examples:

chance of 50%:
    drop a diamond
chance of {chance}% # {chance} between 0 and 100
chance of {chance} # {chance} between 0 and 1

Comparison

🔗

Condition

Patterns:
  • [(neither)] %objects% ((is|are)[(n't| not| neither)] ((greater|more|higher|bigger|larger) than|above)|>) %objects%
  • [(neither)] %objects% ((is|are)[(n't| not| neither)] (greater|more|higher|bigger|larger|above) [than] or (equal to|the same as)|>=) %objects%
  • [(neither)] %objects% ((is|are)[(n't| not| neither)] ((less|smaller|lower) than|below)|<) %objects%
  • [(neither)] %objects% ((is|are)[(n't| not| neither)] (less|smaller|lower|below) [than] or (equal to|the same as)|<=) %objects%
  • [(neither)] %objects% ((is|are) (not|neither)|isn't|aren't|!=) [equal to] %objects%
  • [(neither)] %objects% (is|are|=) [(equal to|the same as)] %objects%
  • [(neither)] %objects% (is|are) between %objects% and %objects%
  • [(neither)] %objects% (is not|are not|isn't|aren't) between %objects% and %objects%
  • [(neither)] %objects% (was|were)[(n't| not| neither)] ((greater|more|higher|bigger|larger) than|above) %objects%
  • [(neither)] %objects% (was|were)[(n't| not| neither)] (greater|more|higher|bigger|larger|above) [than] or (equal to|the same as) %objects%
  • [(neither)] %objects% (was|were)[(n't| not| neither)] ((less|smaller|lower) than|below) %objects%
  • [(neither)] %objects% (was|were)[(n't| not| neither)] (less|smaller|lower|below) [than] or (equal to|the same as) %objects%
  • [(neither)] %objects% ((was|were) (not|neither)|wasn't|weren't) [equal to] %objects%
  • [(neither)] %objects% (was|were) [(equal to|the same as)] %objects%
  • [(neither)] %objects% (was|were) between %objects% and %objects%
  • [(neither)] %objects% (was not|were not|wasn't|weren't) between %objects% and %objects%
  • [(neither)] %objects% (will be|(will (not|neither) be|won't be)) ((greater|more|higher|bigger|larger) than|above) %objects%
  • [(neither)] %objects% (will be|(will (not|neither) be|won't be)) (greater|more|higher|bigger|larger|above) [than] or (equal to|the same as) %objects%
  • [(neither)] %objects% (will be|(will (not|neither) be|won't be)) ((less|smaller|lower) than|below) %objects%
  • [(neither)] %objects% (will be|(will (not|neither) be|won't be)) (less|smaller|lower|below) [than] or (equal to|the same as) %objects%
  • [(neither)] %objects% ((will (not|neither) be|won't be)|(isn't|aren't|is not|are not) (turning|changing) [in]to) [equal to] %objects%
  • [(neither)] %objects% (will be [(equal to|the same as)]|(is|are) (turning|changing) [in]to) %objects%
  • [(neither)] %objects% will be between %objects% and %objects%
  • [(neither)] %objects% (will not be|won't be) between %objects% and %objects%
Since: 1.0
A very general condition, it simply compares two values. Usually you can only compare for equality (e.g. block is/isn't of <type>), but some values can also be compared using greater than/less than. In that case you can also test for whether an object is between two others. Note: This is the only element where not all patterns are shown. It has actually another two sets of similar patters, but with (was|were) or will be instead of (is|are) respectively, which check different time states of the first expression.

Examples:

the clicked block is a stone slab or a double stone slab
time in the player's world is greater than 8:00
the creature is not an enderman or an ender dragon

Contains

🔗

Condition

Patterns:
Since: 1.0
Checks whether an inventory contains an item, a text contains another piece of text, or a list (e.g. {list variable::*} or 'drops') contains another object.

Examples:

block contains 20 cobblestone
player has 4 flint and 2 iron ingots
{list::*} contains 5

Damage Cause

🔗

Condition

Patterns:
  • [the] damage (was|is|has)[n('|o)t] [been] (caused|done|made) by %damage cause%
Since: 2.0
Tests what kind of damage caused a damage event. Refer to the Damage Cause type for a list of all possible causes.

Examples:

# make players use their potions of fire resistance whenever they take any kind of fire damage
on damage:
    damage was caused by lava, fire or burning
    victim is a player
    victim has a potion of fire resistance
    cancel event
    apply fire resistance to the victim for 30 seconds
    remove 1 potion of fire resistance from the victim
# prevent mobs from dropping items under certain circumstances
on death:
    entity is not a player
    damage wasn't caused by a block explosion, an attack, a projectile, a potion, fire, burning, thorns or poison
    clear drops

Do Respawn Anchors Work

🔗

Condition

Patterns:
  • respawn anchors [do[(n't| not)]] work in %worlds%
Since: 2.7
Requirements: Minecraft 1.16+
Checks whether or not respawn anchors work in a world.

Examples:

respawn anchors work in world "world_nether"

Egg Will Hatch

🔗

Condition

Patterns:
  • [the] egg (will|will not|won't) hatch
Since: 2.7
Usable in events: Egg Throw
Whether the egg will hatch in a Player Egg Throw event.

Examples:

on player egg throw:
    if an entity won't hatch:
        send "Better luck next time!" to the player

Entity Is Sheared

🔗

Condition

Patterns:
Since: INSERT VERSION
Requirements: MC 1.13+ (cows, sheep & snowmen), Paper 1.19.4+ (all shearable entities)
Checks whether entities are sheared. This condition only works on cows, sheep and snowmen for versions below 1.19.4.

Examples:

if targeted entity of player is sheared:
    send "This entity has nothing left to shear!" to player

Entity is Wet

🔗

Condition

Patterns:
Since: 2.6.1
Requirements: Paper 1.16+
Checks whether an entity is wet or not (in water, rain or a bubble column).

Examples:

if player is wet:

Entity is in Liquid

🔗

Condition

Patterns:
  • %entities% (is|are) in (water|lava|[a] bubble[ ]column|rain)
  • %entities% (isn't|is not|aren't|are not) in (water|lava|[a] bubble[ ]column|rain)
Since: 2.6.1
Requirements: Minecraft 1.16+ (in water), Paper 1.16+ (in rain, lava and bubble column)
Checks whether an entity is in rain, lava, water or a bubble column.

Examples:

if player is in rain:
if player is in water:
player is in lava:
player is in bubble column

Event Cancelled

🔗

Condition

Patterns:
  • [the] event is cancel[l]ed
  • [the] event (is not|isn't) cancel[l]ed
Since: 2.2-dev36
Checks whether or not the event is cancelled.

Examples:

on click:
    if event is cancelled:
        broadcast "no clicks allowed!"

Exists/Is Set

🔗

Condition

Patterns:
  • %~objects% (exist[s]|(is|are) set)
  • %~objects% (do[es](n't| not) exist|(is|are)(n't| not) set)
Since: 1.2
Checks whether a given expression or variable is set.

Examples:

{teams::%player's uuid%::preferred-team} is not set
on damage:
    projectile exists
    broadcast "%attacker% used a %projectile% to attack %victim%!"

Has AI

🔗

Condition

Patterns:
Since: 2.5
Checks whether an entity has AI.

Examples:

target entity has ai

Has Client Weather

🔗

Condition

Patterns:
  • %players% (has|have) [a] (client|custom) weather [set]
  • %players% (doesn't|does not|do not|don't) have [a] (client|custom) weather [set]
Since: 2.3
Checks whether the given players have a custom client weather

Examples:

if the player has custom weather:
    message "Your custom weather is %player's weather%"

Has Custom Model Data

🔗

Condition

Patterns:
  • %item types% (has|have) [custom] model data
  • %item types% (doesn't|does not|do not|don't) have [custom] model data
Since: 2.5
Requirements: 1.14+
Check if an item has a custom model data tag

Examples:

player's tool has custom model data

Has Item Cooldown

🔗

Condition

Patterns:
Since: INSERT VERSION
Check whether a cooldown is active on the specified material for a specific player.

Examples:

if player has player's tool on cooldown:
    send "You can't use this item right now. Wait %item cooldown of player's tool for player%"

Has Line of Sight

🔗

Condition

Patterns:
Since: INSERT VERSION
Checks whether living entities have an unobstructed line of sight to other entities or locations.

Examples:

player has direct line of sight to location 5 blocks to the right of player
victim has line of sight to attacker
player has no line of sight to location 100 blocks in front of player

Has Metadata

🔗

Condition

Patterns:
Since: 2.2-dev36
Checks whether a metadata holder has a metadata tag.

Examples:

if player has metadata value "healer":

Has Permission

🔗

Condition

Patterns:
Since: 1.0
Test whether a player has a certain permission.

Examples:

player has permission "skript.tree"
victim has the permission "admin":
    send "You're attacking an admin!" to attacker

Has Played Before

🔗

Condition

Patterns:
  • %offline players% [(has|have|did)] [already] play[ed] [on (this|the) server] (before|already)
  • %offline players% (has not|hasn't|have not|haven't|did not|didn't) [(already|yet)] play[ed] [on (this|the) server] (before|already|yet)
Since: 1.4, 2.7 (multiple players)
Checks whether a player has played on this server before. You can also use on first join if you want to make triggers for new players.

Examples:

player has played on this server before
player hasn't played before

Has Potion

🔗

Condition

Patterns:
Since: 2.6.1
Checks whether the given living entities have specific potion effects.

Examples:

if player has potion speed:
    send "You are sonic!"

if all players have potion effects speed and haste:
    broadcast "You are ready to MINE!"

Has Resource Pack

🔗

Condition

Patterns:
  • %players% (has|have) [a] resource pack [(loaded|installed)]
  • %players% (doesn't|does not|do not|don't) have [a] resource pack [(loaded|installed)]
Since: 2.4
Requirements: Paper 1.9 or newer
Checks whether the given players have a server resource pack loaded. Please note that this can't detect player's own resource pack, only the resource pack that sent by the server.

Examples:

if the player has a resource pack loaded:

Has Scoreboard Tag

🔗

Condition

Patterns:
  • %entities% (has|have) [the] score[ ]board tag[s] %texts%
  • %entities% (doesn't|does not|do not|don't) have [the] score[ ]board tag[s] %texts%
Since: 2.3
Checks whether the given entities has the given scoreboard tags.

Examples:

if the targeted armor stand has the scoreboard tag "test tag":

Ignition Process

🔗

Condition

Patterns:
  • [creeper[s]] %living entities% ((is|are)|(isn't|is not|aren't|are not)) going to explode
  • [creeper[s]] %living entities% ((is|are)|(isn't|is not|aren't|are not)) in the (ignition|explosion) process
  • creeper[s] %living entities% ((is|are)|(isn't|is not|aren't|are not)) ignited
Since: 2.5
Requirements: Paper 1.13 or newer
Checks if a creeper is going to explode.

Examples:

if the last spawned creeper is going to explode:
    loop all players in radius 3 of the last spawned creeper
        send "RUN!!!" to the loop-player

Is Alive

🔗

Condition

Patterns:
  • %entities% (is|are) (alive|dead)
  • %entities% (isn't|is not|aren't|are not) (alive|dead)
Since: 2.0, 2.4-alpha4 (non-living entity support)
Checks whether an entity is alive. Works for non-living entities too.

Examples:

if {villager-buddy::%player's uuid%} is not dead:

on shoot:
    while the projectile is alive:

Is Banned

🔗

Condition

Patterns:
Since: 1.4
Checks whether a player or IP is banned.

Examples:

player is banned
victim is not IP-banned
"127.0.0.1" is banned

Is Bed/Anchor Spawn

🔗

Condition

Patterns:
  • [the] respawn location (was|is)[(n'| no)t] [a] (bed|respawn anchor)
Since: 2.7
Usable in events: respawn
Requirements: Minecraft 1.16+
Checks what the respawn location of a player in the respawn event is.

Examples:

on respawn:
    the respawn location is a bed
    broadcast "%player% is respawning in their bed! So cozy!"

Is Block

🔗

Condition

Patterns:
  • %item types% (is|are) ([a] block|blocks)
  • %item types% (isn't|is not|aren't|are not) ([a] block|blocks)
Since: 2.4
Checks whether an item is a block.

Examples:

player's held item is a block
{list::*} are blocks

Is Block Redstone Powered

🔗

Condition

Patterns:
  • %blocks% (is|are) redstone powered
  • %blocks% (is|are) indirectly redstone powered
  • %blocks% (is|are)(n't| not) redstone powered
  • %blocks% (is|are)(n't| not) indirectly redstone powered
Since: 2.5
Checks if a block is indirectly or directly powered by redstone

Examples:

if clicked block is redstone powered:
    send "This block is well-powered by redstone!"
if clicked block is indirectly redstone powered:
    send "This block is indirectly redstone powered."

Is Blocking

🔗

Condition

Patterns:
  • %players% (is|are) (blocking|defending) [with [a] shield]
  • %players% (isn't|is not|aren't|are not) (blocking|defending) [with [a] shield]
Since: unknown (before 2.1)
Checks whether a player is blocking with their shield.

Examples:

on damage of player:
    victim is blocking
    damage attacker by 0.5 hearts

Is Burning

🔗

Condition

Patterns:
  • %entities% (is|are) (burning|ignited|on fire)
  • %entities% (isn't|is not|aren't|are not) (burning|ignited|on fire)
Since: 1.4.4
Checks whether an entity is on fire, e.g. a zombie due to being in sunlight, or any entity after falling into lava.

Examples:

# increased attack against burning targets
victim is burning:
    increase damage by 2

Is Charged

🔗

Condition

Patterns:
Since: 2.5
Checks if a creeper is charged (powered).

Examples:

if the last spawned creeper is charged:
    broadcast "A charged creeper is at %location of last spawned creeper%"

Is Climbing

🔗

Condition

Patterns:
Since: INSERT VERSION
Requirements: Minecraft 1.17+
Whether a living entity is climbing, such as a spider up a wall or a player on a ladder.

Examples:

spawn a spider at location of spawn
wait a second
if the last spawned spider is climbing:
    message"The spider is now climbing!"

Is Edible

🔗

Condition

Patterns:
Since: 2.2-dev36
Checks whether an item is edible.

Examples:

steak is edible
player's tool is edible

Is Empty

🔗

Condition

Patterns:
Since: unknown (before 2.1)
Checks whether an inventory, an inventory slot, or a text is empty.

Examples:

player's inventory is empty

Is Enchanted

🔗

Condition

Patterns:
Since: 1.4.6
Checks whether an item is enchanted.

Examples:

tool of the player is enchanted with efficiency 2
helm, chestplate, leggings or boots are enchanted

Is Flammable

🔗

Condition

Patterns:
Since: 2.2-dev36
Checks whether an item is flammable.

Examples:

wood is flammable
player's tool is flammable

Is Flying

🔗

Condition

Patterns:
  • %players% (is|are) flying
  • %players% (isn't|is not|aren't|are not) flying
Since: 1.4.4
Checks whether a player is flying.

Examples:

player is not flying

Is Frozen

🔗

Condition

Patterns:
Since: 2.7
Checks whether an entity is frozen.

Examples:

if player is frozen:
    kill player

Is Fuel

🔗

Condition

Patterns:
Since: 2.5.1
Requirements: Minecraft 1.11.2+
Checks whether an item can be used as fuel in a furnace.

Examples:

on right click on furnace:
    if player's tool is not fuel:
        send "Please hold a valid fuel item in your hand"
        cancel event

Is Gliding

🔗

Condition

Patterns:
Since: 2.7
Checks whether a living entity is gliding.

Examples:

if player is gliding

Is Holding

🔗

Condition

Patterns:
Since: 1.0
Checks whether a player is holding a specific item. Cannot be used with endermen, use 'entity is [not] an enderman holding <item type>' instead.

Examples:

player is holding a stick
victim isn't holding a sword of sharpness

Is Incendiary

🔗

Condition

Patterns:
  • %entities% ((is|are) incendiary|cause[s] a[n] (incendiary|fiery) explosion)
  • %entities% ((is not|are not|isn't|aren't) incendiary|(does not|do not|doesn't|don't) cause[s] a[n] (incendiary|fiery) explosion)
  • the [event(-| )]explosion (is|(is not|isn't)) (incendiary|fiery)
Since: 2.5
Checks if an entity will create fire when it explodes. This condition is also usable in an explosion prime event.

Examples:

on explosion prime:
    if the explosion is fiery:
        broadcast "A fiery explosive has been ignited!"

Is Infinite

🔗

Condition

Patterns:
Since: 2.7
Checks whether potion effects are infinite.

Examples:

all of the active potion effects of the player are infinite

Is Interactable

🔗

Condition

Patterns:
Since: 2.5.2
Requirements: Minecraft 1.13+
Checks wether or not a block is interactable.

Examples:

on block break:
    if event-block is interactable:
        cancel event
        send "You cannot break interactable blocks!"

Is Invisible

🔗

Condition

Patterns:
Since: 2.7
Checks whether a living entity is invisible.

Examples:

target entity is invisible

Is Invulnerable

🔗

Condition

Patterns:
  • %entities% (is|are) invulnerable
  • %entities% (isn't|is not|aren't|are not) invulnerable
Since: 2.5
Checks whether an entity is invulnerable.

Examples:

target entity is invulnerable

Is Jumping

🔗

Condition

Patterns:
Since: INSERT VERSION
Requirements: Paper 1.15+
Checks whether a living entity is jumping. This condition does not work on players.

Examples:

on spawn of zombie:
    while event-entity is not jumping:
        wait 5 ticks
    push event-entity upwards

Is Leashed

🔗

Condition

Patterns:
Since: 2.5
Checks to see if an entity is currently leashed.

Examples:

target entity is leashed

Is Loaded

🔗

Condition

Patterns:
Since: 2.3, 2.5 (revamp with chunk at location/coords)
Checks whether or not a chunk/world is loaded. 'chunk at 1, 1' uses chunk coords, which are location coords divided by 16.

Examples:

if chunk at {home::%player's uuid%} is loaded:
if chunk 1, 10 in world "world" is loaded:
if world("lobby") is loaded:

Is Member/Owner of Region

🔗

Condition

Patterns:
Since: 2.1
Requirements: Supported regions plugin
Checks whether a player is a member or owner of a particular region. This condition requires a supported regions plugin to be installed.

Examples:

on region enter:
    player is the owner of the region
    message "Welcome back to %region%!"
    send "%player% just entered %region%!" to all members of the region

Is Normalized

🔗

Condition

Patterns:
  • %vectors% (is|are) normalized
  • %vectors% (isn't|is not|aren't|are not) normalized
Since: 2.5.1
Requirements: Minecraft 1.13.2+
Checks whether a vector is normalized i.e. length of 1

Examples:

vector of player's location is normalized

Is Occluding

🔗

Condition

Patterns:
Since: 2.5.1
Checks whether an item is a block and completely blocks vision.

Examples:

player's tool is occluding

Is Online

🔗

Condition

Patterns:
Since: 1.4
Checks whether a player is online.

Examples:

player is online
player-argument is offline

Is Operator

🔗

Condition

Patterns:
Since: 2.7
Checks whether a player is a server operator.

Examples:

player is an operator

Is Passable

🔗

Condition

Patterns:
  • %blocks% (is|are) passable
  • %blocks% (isn't|is not|aren't|are not) passable
Since: 2.5.1
Requirements: Minecraft 1.13.2+
Checks whether a block is passable. A block is passable if it has no colliding parts that would prevent players from moving through it. Blocks like tall grass, flowers, signs, etc. are passable, but open doors, fence gates, trap doors, etc. are not because they still have parts that can be collided with.

Examples:

if player's targeted block is passable

Is Plugin Enabled

🔗

Condition

Patterns:
  • plugin[s] %texts% (is|are) enabled
  • plugin[s] %texts% (is|are)(n't| not) enabled
  • plugin[s] %texts% (is|are) disabled
Since: 2.6
Check if a plugin is enabled/disabled on the server. Plugin names can be found in the plugin's 'plugin.yml' file or by using the '/plugins' command, they are NOT the name of the plugin's jar file. When checking if a plugin is not enabled, this will return true if the plugin is either disabled or not on the server. When checking if a plugin is disabled, this will return true if the plugin is on the server and is disabled.

Examples:

if plugin "Vault" is enabled:
if plugin "WorldGuard" is not enabled:
if plugins "Essentials" and "Vault" are enabled:
if plugin "MyBrokenPlugin" is disabled:

Is Poisoned

🔗

Condition

Patterns:
Since: 1.4.4
Checks whether an entity is poisoned.

Examples:

player is poisoned:
    cure the player from poison
    message "You have been cured!"

Is Preferred Tool

🔗

Condition

Patterns:
Since: 2.7
Requirements: 1.16.5+, Paper 1.19.2+ (blockdata)
Checks whether an item is the preferred tool for a block. A preferred tool is one that will drop the block's item when used. For example, a wooden pickaxe is a preferred tool for grass and stone blocks, but not for iron ore.

Examples:

on left click:
    event-block is set
    if player's tool is the preferred tool for event-block:
        break event-block naturally using player's tool
    else:
        cancel event

Is Riding

🔗

Condition

Patterns:
Since: 2.0
Tests whether an entity is riding another or is in a vehicle.

Examples:

player is riding a saddled pig

Is Riptiding

🔗

Condition

Patterns:
Since: 2.5
Checks to see if an entity is currently using the Riptide enchantment.

Examples:

target entity is riptiding

Is Script Loaded

🔗

Condition

Patterns:
  • script[s] [%texts%] (is|are) loaded
  • script[s] [%texts%] (isn't|is not|aren't|are not) loaded
Since: 2.2-dev31
Check if the current script, or another script, is currently loaded.

Examples:

script is loaded
script "example.sk" is loaded

Is Silent

🔗

Condition

Patterns:
Since: 2.5
Checks whether an entity is silent i.e. its sounds are disabled.

Examples:

target entity is silent

Is Sleeping

🔗

Condition

Patterns:
  • %players% (is|are) sleeping
  • %players% (isn't|is not|aren't|are not) sleeping
Since: 1.4.4
Checks whether a player is sleeping.

Examples:

# cut your enemies' throats in their sleep >=)
on attack:
    attacker is holding a sword
    victim is sleeping
    increase the damage by 1000

Is Slime Chunk

🔗

Condition

Patterns:
  • %chunk% (is|are) ([a] slime chunk|slime chunks|slimey)
  • %chunk% (isn't|is not|aren't|are not) ([a] slime chunk|slime chunks|slimey)
Since: 2.3
Tests whether a chunk is a so-called slime chunk. Slimes can generally spawn in the swamp biome and in slime chunks. For more info, see the Minecraft wiki.

Examples:

command /slimey:
    trigger:
        if chunk at player is a slime chunk:
            send "Yeah, it is!"
        else:
            send "Nope, it isn't"

Is Sneaking

🔗

Condition

Patterns:
  • %players% (is|are) sneaking
  • %players% (isn't|is not|aren't|are not) sneaking
Since: 1.4.4
Checks whether a player is sneaking.

Examples:

# prevent mobs from seeing sneaking players if they are at least 4 meters apart
on target:
    target is sneaking
    distance of target and the entity is bigger than 4
    cancel the event

Is Solid

🔗

Condition

Patterns:
Since: 2.2-dev36
Checks whether an item is solid.

Examples:

grass block is solid
player's tool isn't solid

Is Sprinting

🔗

Condition

Patterns:
  • %players% (is|are) sprinting
  • %players% (isn't|is not|aren't|are not) sprinting
Since: 1.4.4
Checks whether a player is sprinting.

Examples:

player is not sprinting

Is Stackable

🔗

Condition

Patterns:
Since: 2.7
Checks whether an item is stackable.

Examples:

diamond axe is stackable
birch wood is stackable
torch is stackable

Is Swimming

🔗

Condition

Patterns:
Since: 2.3
Requirements: 1.13 or newer
Checks whether a living entity is swimming.

Examples:

player is swimming

Is Tameable

🔗

Condition

Patterns:
Since: 2.5
Check if an entity is tameable.

Examples:

on damage:
    if victim is tameable:
        cancel event

Is Transparent

🔗

Condition

Patterns:
Since: 2.2-dev36
Checks whether an item is transparent. Note that this condition may not work for all blocks, due to the transparency list used by Spigot not being completely accurate.

Examples:

player's tool is transparent.

Is Unbreakable

🔗

Condition

Patterns:
Since: 2.5.1
Requirements: Minecraft 1.11+
Checks whether an item is unbreakable.

Examples:

if event-item is unbreakable

Is Valid

🔗

Condition

Patterns:
Since: 2.7
Checks whether an entity has died or been despawned for some other reason.

Examples:

if event-entity is valid

Is Wearing

🔗

Condition

Patterns:
Since: 1.0
Checks whether a player is wearing some armour.

Examples:

player is wearing an iron chestplate and iron leggings
player is wearing all diamond armour

Is Whitelisted

🔗

Condition

Patterns:
  • [the] server (is|is(n't| not)) white[ ]listed
  • %players% (is|are)[(n't| not)] white[ ]listed
Since: 2.5.2
Whether or not the server or a player is whitelisted.

Examples:

if server is whitelisted:
if player is whitelisted

Is Within

🔗

Condition

Patterns:
Since: 2.7
Requirements: MC 1.17+ (within block)
Whether a location is within something else. The "something" can be a block, an entity, a chunk, a world, or a cuboid formed by two other locations. Note that using the is between condition will refer to a straight line between locations, while this condition will refer to the cuboid between locations.

Examples:

if player's location is within {_loc1} and {_loc2}:
    send "You are in a PvP zone!" to player

if player is in world("world"):
    send "You are in the overworld!" to player

if attacker's location is inside of victim:
    cancel event
    send "Back up!" to attacker and victim

Is Within Radius

🔗

Condition

Patterns:
Since: 2.7
Checks whether a location is within a certain radius of another location.

Examples:

on damage:
    if attacker's location is within 10 blocks around {_spawn}:
        cancel event
        send "You can't PVP in spawn."

Is a Skript command

🔗

Condition

Patterns:
  • %text% (is|are) [a] s(k|c)ript (command|cmd)
  • %text% (isn't|is not|aren't|are not) [a] s(k|c)ript (command|cmd)
Since: 2.6
Checks whether a command/string is a custom Skript command.

Examples:

# Example 1
on command:
    command is a skript command

# Example 2
"sometext" is a skript command

Is of Type

🔗

Condition

Patterns:
Since: 1.4
Checks whether an item of an entity is of the given type. This is mostly useful for variables, as you can use the general 'is' condition otherwise (e.g. 'victim is a creeper').

Examples:

tool is of type {selected type}
victim is of type {villager type}

Is on Ground

🔗

Condition

Patterns:
  • %entities% (is|are) on [the] ground
  • %entities% (isn't|is not|aren't|are not) on [the] ground
Since: 2.2-dev26
Checks whether an entity is on ground.

Examples:

player is not on ground

Left Handed

🔗

Condition

Patterns:
Since: INSERT VERSION
Requirements: Paper 1.17.1+ (entities)
Checks if living entities or players are left or right-handed. Armor stands are neither right nor left-handed. Paper 1.17.1+ is required for non-player entities.

Examples:

on damage of player:
    if victim is left handed:
        cancel event

Matches

🔗

Condition

Patterns:
  • %texts% (match[es]|do[es](n't| not) match) %texts%
  • %texts% (partially match[es]|do[es](n't| not) partially match) %texts%
Since: 2.5.2
Checks whether the defined strings match the input regexes (Regular expressions).

Examples:

on chat:
    if message partially matches "\d":
        send "Message contains a digit!"
    if message doesn't match "[A-Za-z]+":
        send "Message doesn't only contain letters!"

PvP

🔗

Condition

Patterns:
  • (is PvP|PvP is) enabled [in %worlds%]
  • (is PvP|PvP is) disabled [in %worlds%]
Since: 1.3.4
Checks the PvP state of a world.

Examples:

PvP is enabled
PvP is disabled in "world"

Region Contains

🔗

Condition

Patterns:
Since: 2.1
Requirements: Supported regions plugin
Checks whether a location is contained in a particular region. This condition requires a supported regions plugin to be installed.

Examples:

player is in the region {regions::3}

on region enter:
    region contains {flags.%world%.red}
    message "The red flag is near!"

Resource Pack

🔗

Condition

Patterns:
Since: 2.4
Usable in events: resource pack request response
Checks state of the resource pack in a resource pack request response event.

Examples:

on resource pack response:
    if the resource pack wasn't accepted:
        kick the player due to "You have to install the resource pack to play in this server!"

Running Minecraft

🔗

Condition

Patterns:
  • running [below] minecraft %text%
Since: 2.5
Checks if current Minecraft version is given version or newer.

Examples:

running minecraft "1.14"

Starts/Ends With

🔗

Condition

Patterns:
  • %texts% (start|end)[s] with %texts%
  • %texts% (doesn't|does not|do not|don't) (start|end) with %texts%
Since: 2.2-dev36, 2.5.1 (multiple strings support)
Checks if a text starts or ends with another.

Examples:

if the argument starts with "test" or "debug":
    send "Stop!"

Time

🔗

Condition

Patterns:
Since: 2.0
Tests whether a given real time was more or less than some time span ago.

Examples:

command /command-with-cooldown:
    trigger:
        {command::%player's uuid%::last-usage} was less than a minute ago:
            message "Please wait a minute between uses of this command."
            stop
        set {command::%player's uuid%::last-usage} to now
        # ... actual command trigger here ...
\ No newline at end of file diff --git a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/css/styles.css b/docs/nightly/enhancement/merge-master-into-feature-attempt-2/css/styles.css deleted file mode 100644 index eaf92d8dd28..00000000000 --- a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/css/styles.css +++ /dev/null @@ -1,1214 +0,0 @@ -:root { - --font-color: #f7f7f7; - --bg-color: #1e1e1e; - - --search-color: white; - --search-bg-color: rgb(15, 15, 15); - --search-ver-bg-color: rgb(51, 51, 51); - - --table-row-color: rgba(38, 38, 38, 0.3); - --table-row2-color: rgba(0, 0, 0, 0.3); - --table-side-color: rgba(114, 114, 114, 0.1); - --table-side2-color: rgba(116, 116, 116, 0.05); - --table-desc-color: rgba(0, 0, 0, 0.45); - - --code-font-color: white; - --code-bg-color: rgba(99, 99, 99, 0.2); - - --sidebar-items-bg: rgba(0, 0, 0, .2); - - --element-bottom-border: rgba(255, 255, 255, .2); - - --link-color: #ffad32; - --link-hover-color: #dd8500; - --link-visited-color: #ff9800; - - --table-shadow: 0 0 20px rgba(0, 0, 0, .4); - - --box-font-color: black; - --box-inner-font-color: white; - --box-bg: rgba(0, 0, 0, 0.4) !important; - --red-box-font-color: #1e1e1e; - --red-box-bg: rgba(0, 0, 0, 0.4); - - --syntax-item-shadow: 0px 0px 15px rgba(0, 0, 0, .5); - - --wrapper-bg-color: transparent; - - --scrollbar-track-bg-color: rgba(255, 255, 255, 0.2); - --scrollbar-thumb-bg-color: rgba(255, 255, 255, 0.4); - - --inline-code-bg-color: #3e3e3e9e; -} - -[data-theme="white"] { - --font-color: black; - --font-secondary-color: rgba(0, 0, 0, .65); - --bg-color: #f5f5f5; - --table-color: white; - - --search-color: black; - --search-bg-color: white; - --search-ver-bg-color: rgba(253, 253, 253, 0.7); - - --table-row-color: rgba(0, 0, 0, 0.02); - --table-row2-color: rgba(0, 0, 0, 0.05); - --table-side-color: rgb(224 224 224 / 60%); - --table-side2-color: rgb(202 202 202 / 45%); - --table-desc-color: rgb(211 211 211 / 40%); - - --code-font-color: white; - --code-bg-color: rgb(41, 41, 41); - - --sidebar-items-bg: rgba(0, 0, 0, 0.07); - - --element-bottom-border: rgba(0, 0, 0, 0.1); - - --link-color: #bb7000; - --link-hover-color: #dd8500; - --link-visited-color: #ff9800; - - --table-shadow: 0 0 20px rgba(0, 0, 0, 0.15); - - --box-font-color: black; - --box-inner-font-color: white; - --box-bg: rgb(41, 41, 41) !important; - --red-box-font-color: white; - --red-box-bg: rgba(0, 0, 0, 0.1); - - --syntax-item-shadow: 0px 0px 15px rgba(0, 0, 0, .2); - - --wrapper-bg-color: white; - - --scrollbar-track-bg-color: rgba(0, 0, 0, 0.03); - --scrollbar-thumb-bg-color: rgba(48, 48, 51, 0.4); - - --inline-code-bg-color: #a9a9a99e; - - /* transition: all 1s; */ -} - -::selection { - background-color: #ff9800; - color: black; -} - -html { - scroll-behavior: smooth; -} - -::-webkit-scrollbar { - width: 6px; - height: 6px; -} - -::-webkit-scrollbar-track { - background-color: var(--scrollbar-track-bg-color); - border-radius: 10px; -} - -::-webkit-scrollbar-thumb { - background-color: var(--scrollbar-thumb-bg-color); - border-radius: 10px; -} - -* { - margin: 0px; - padding: 0px; -} - -body { - font-family: "Poppins", sans-serif; - overflow: hidden; -} - -#docs-body { - background-color: var(--bg-color); - display: grid; - /* - grid-template-rows: 100vh 100vh; - grid-template-columns: minmax(15em, 18em) minmax(80%, 100%); - */ - grid-template-columns: 16vw 84vw; - grid-template-rows: 55px 94vh; - overflow: hidden; -} - -.main-page { - grid-template-columns: 16vw 84vw; -} - -a { - color: var(--link-color); - transition: all 0.1s; - text-decoration: none; -} - -a:hover { - color: var(--link-hover-color); -} - -a:visited { - color: var(--link-visited-color); -} - -.item-wrapper { - box-shadow: var(--syntax-item-shadow); - border-left: 5px solid rgb(255, 152, 0); - margin: 35px 0; - background-color: var(--wrapper-bg-color) -} - -.type-Event { - border-left: 5px solid rgb(28, 181, 152); -} - -.type-Event .item-type { - color: rgb(28, 181, 152); -} - -.type-Event .item-examples p { - background-color: rgb(28, 181, 152); -} - -.type-Effect { - border-left: 5px solid rgb(139, 255, 0); -} - -.type-Effect .item-type { - color: rgb(139, 255, 0); -} - -.type-Effect .item-examples p { - background-color: rgb(139, 255, 0); -} - -.type-Expression { - border-left: 5px solid rgb(255, 152, 0); -} - -.type-Expression .item-type { - color: rgb(255, 152, 0); -} - -.type-Expression .item-examples p { - background-color: rgb(255, 152, 0); -} - -.type-Condition { - border-left: 5px solid rgb(181, 28, 28); -} - -.type-Condition .item-type { - color: rgb(181, 28, 28); -} - -.type-Condition .item-examples p { - background-color: rgb(181, 28, 28); - color: white; -} - -.type-Section { - border-left: 5px solid rgb(181, 28, 121); -} - -.type-Section .item-type { - color: rgb(181, 28, 121); -} - -.type-Section .item-examples p { - background-color: rgb(181, 28, 121); - color: white; -} - -.type-EffectSection { - border-left: 5px solid rgb(199, 0, 255); -} - -.type-EffectSection .item-type { - color: rgb(199, 0, 255); -} - -.type-EffectSection .item-examples p { - background-color: rgb(199, 0, 255); - color: white; -} - -.type-Type { - border-left: 5px solid rgb(0, 100, 255); -} - -.type-Type .item-type { - color: rgb(0, 100, 255); -} - -.type-Type .item-examples p { - background-color: rgb(0, 100, 255); - color: white; -} - -.type-Function { - border-left: 5px solid rgb(128, 0, 255); -} - -.type-Function .item-type { - color: rgb(128, 0, 255); -} - -.type-Function .item-examples p { - background-color: rgb(128, 0, 255); - color: white; -} - -.type-Structure { - border-left: 5px solid rgb(0, 219, 255); -} - -.type-Structure .item-type { - color: rgb(0, 219, 255); -} - -.type-Structure .item-examples p { - background-color: rgb(0, 219, 255); -} - -/* Pattern right section list items */ - -.item-details:nth-child(1) ul li:nth-child(odd) { - background-color: var(--table-row-color); - color: var(--font-color); - border-left: 2px solid rgb(255, 152, 0); -} - -.item-details:nth-child(1) ul li:nth-child(even) { - background-color: var(--table-row2-color); - color: var(--font-color); - border-left: 1px solid rgb(255, 152, 0); -} - -.no-list-style { - list-style: none; -} - -#global-navigation { - grid-row-start: 1; - grid-row-end: 1; - grid-column-start: 2; - position: sticky; - top: 0em; - background-color: #292929; - padding: 15px; - z-index: 100; - bottom: 0px; - display: flex; -} - -#global-navigation li { - display: inline; -} - -#global-navigation a { - text-decoration: none; - color: #ffffff; - padding: 10px; - padding-bottom: 16px; - transition: all 0.1s; -} - -/* Active tab for menu items */ -#global-navigation a:hover, -.active-tab { - color: #ffc107; - /*border-bottom: 3px solid #ff9800;*/ - box-shadow: inset 0 -3px 0 #ff9800; -} - -/* Active syntax */ -div.active-syntax { - border-left: 5px solid #ff4e4e; -} - -div.active-syntax .item-examples p { - background-color: #ff4e4e; - color: white; -} - -.item-examples p { - cursor: pointer; -} - -.example-details-closed:before { - content: '▶ '; -} - -.example-details-opened:before { - content: '▼ '; -} - -/* Active tab for sub menus */ -.menu-subtabs .active-tab { - color: #ffc107 !important; - /* border-left: 3px solid #ff9800; */ - background: #3a3a3a; - box-shadow: unset; -} - -#side-nav { - grid-row-start: 1; - grid-row-end: 1; - grid-column-start: 1; - grid-column-end: 1; - position: sticky; - top: 60px; - height: max-content; -} - -#nav-title { - grid-row-start: 1; - grid-row-end: 1; - grid-column-start: 1; - grid-column-end: 1; - position: fixed; - border-left: solid 3px #ff9800; - text-decoration: none; - background-color: #353535; - font-size: 30px; - font-weight: bold; - color: #ff9800; - height: 35px; - padding: 10px; - padding-left: 25px; - z-index: 50; - transition: color 0.2s; - width: 100%; - line-height: 1.2; -} - -/* #nav-title { - font-size: clamp(1.25em, 1.35vw, 2em); -} */ - -#nav-title:hover { - color: rgba(255, 152, 0, 0.9); -} - -#nav-contents { - /* height: calc(100vh - 60px); */ - height: 93vh; - /* Fix the TOP css of #side-nav */ - width: 100%; - overflow: scroll; - overflow-x: hidden; - position: sticky; -} - -#nav-contents>a { - display: block; - font-size: 18px; - background-color: var(--sidebar-items-bg); - text-decoration: none; - color: var(--font-color); - margin: 6px 10px; - word-wrap: break-word; - padding: 5px 15px; - transition: background-color 0.1s, font 0.1s; - word-break: break-word; -} - -#side-nav a:focus { - font-weight: bold; -} - -#nav-contents a:hover, -.active-item { - color: var(--font-color); - background-color: rgba(0, 0, 0, 0.08); - border-left: solid 3px #ff9800; - /* font-weight: bold; */ -} - -#content { - grid-row-start: 1; - grid-row-end: 1; - grid-column-start: 2; - padding-left: 30px; - position: relative; - /* top: 110px; */ - margin-top: 110px; - height: calc(100vh - 110px); - /* Fixed the TOP CSS 110px due to body having overflow hidden and top = 110px so the last 110px is hidden, this will fix it */ - /* padding: calc(0.22em + 30px); */ - /* When applied it will break the padding when an anchor is clicked */ - padding-right: 30px; - overflow-x: hidden; - overflow-y: scroll; -} - -#content.no-left-panel { - grid-column-start: 1; - grid-column-end: none; - padding: 0 8vw; - margin-left: unset; -} - -#content-no-docs { - grid-row-start: 1; - grid-row-end: 1; - grid-column-start: 2; - margin-left: 30px; - position: relative; - top: 55px; - height: calc(100vh - 55px); - /* Fixed the TOP CSS 55px due to body having overflow hidden and top = 55px so the last 55px is hidden, this will fix it */ - padding: 0.22em; - padding-right: 30px; - overflow-x: hidden; - overflow-y: scroll; -} - -#content-no-docs.no-left-panel { - grid-column-start: 1; - grid-column-end: none; - padding: 0 8vw; - margin-left: unset; -} - -#side-nav.no-left-panel { - display: none; -} - -div p { - padding: 10px; -} - -table { - width: 100%; - border-collapse: collapse; -} - -.item-title { - font-size: 14px; - font-weight: bold; - padding-bottom: 10px; - padding-top: 0.5em; - padding-left: 10px; - color: var(--font-color); -} - -.item-title>a { - text-decoration: none; - font-size: 100%; -} - -.item-type { - font-size: 16px; - padding: 10px; - color: var(--font-color); - padding: 10px; - padding-right: 20px; - float: right; -} - -#search-icon { - position: fixed; - right: 1vw; - top: 60px; - cursor: pointer; -} - -.new-element { - background: red; - color: white; - font-size: 12px; - padding: 3px; - border-radius: 5px; - margin-left: 10px; - cursor: pointer; - display: inline; - position: relative; - top: -2px; -} - -.item-content { - padding-bottom: 25px; - border-bottom: 1px solid var(--element-bottom-border); - content-visibility: auto; -} - -.item-table-label { - background-color: #deb887; - text-align: center; - font-weight: bold; - color: var(--font-color); - width: 8em; - padding: 0.3em; -} - -.item-content .item-details:nth-child(odd) td:nth-child(2) { - background-color: var(--table-row-color); - color: var(--font-color); -} - -.item-content .item-details:nth-child(even) td:nth-child(2) { - background-color: var(--table-row2-color); - color: var(--font-color); -} - - -/* OVERRIDE */ - -.item-content .item-details:nth-child(1) td:nth-child(1) { - /* Patterns */ - background-color: var(--table-side-color); -} - -/* .item-content .item-details:nth-child(1) td:nth-child(2) { - background-color: var(--table-side2-color); -} */ - - -/* OVERRIDE */ - -.item-content .item-details:nth-child(odd) .item-table-label { - background-color: var(--table-side-color); -} - -.item-content .item-details:nth-child(even) .item-table-label { - background-color: var(--table-side2-color); -} - -.item-details { - border-collapse: collapse; - width: 80vw; - max-width: 80vw; -} - -.item-content tr:nth-child(1n + 2) td:nth-child(2) { - /* 1n+2 will choose all elements excpet the first */ - padding: 8px; - font-weight: 500; - color: var(--font-secondary-color); -} - -.noleftpad { - padding-left: 0em !important; -} - -td ul { - padding: 0em; - list-style-type: none; -} - -.item-description { - padding: 15px; - background-color: var(--table-desc-color); - color: var(--font-color); -} - -.item-description>p { - margin-top: 0.7em; -} - -.skript-code-block { - padding: 6px; - font-family: "Source Code Pro", monospace; -} - -.item-examples { - /* margin: 25px 10px 0 10px; */ - margin-top: 25px; -} - -.item-examples p { - background-color: rgb(255, 152, 0); - /* border-left: 3px solid rgba(255, 152, 0, 0.5); */ - padding: 5px; - color: var(--box-font-color); - width: max-content; - margin-top: 25px; -} - -.item-examples .skript-code-block { - background-color: var(--code-bg-color); - visibility: visible; - font-family: "Source Code Pro", monospace; - font-weight: 400; -} - -.skript-code-block>a { - text-decoration: none; -} - -.item-examples>.skript-code-block { - /* border-left: solid 3px #ff9800; */ - padding: 30px; - font-size: 0.9em; - color: var(--code-font-color); - display: none; -} - -.box-title { - background-color: #ff9800; - width: max-content; - padding: 5px; - padding-right: 7px; - margin-top: 20px; - color: var(--box-font-color); -} - -.box { - border-left: 3px solid #ff9800; - padding: 15px; - background-color: var(--box-bg); - margin-bottom: 10px; - color: var(--box-inner-font-color); -} - -.box-title-red { - background-color: #ff4e4e; - width: max-content; - padding: 5px; - padding-right: 7px; - margin-top: 20px; - color: var(--red-box-font-color); - font-weight: bold; -} - -.box-red { - border-left: 3px solid #ff4e4e; - padding: 15px; - background-color: var(--red-box-bg); - color: var(--font-color); - margin-bottom: 10px; -} - - - -@media (max-width: 1200px) { - #docs-body { - grid-template-columns: 20% minmax(80%, 100%); - } - - #global-navigation li { - white-space: nowrap; - } - - #global-navigation { - display: flex; - } - - #global-navigation { - grid-column-start: 1; - grid-column-end: none; - } - - #global-navigation>a { - padding: 10px; - padding-top: 0.1em; - padding-bottom: 0.1em; - } - - #nav-title { - display: none; - } - - span .search-bar-version { - /* More specific to override the other */ - left: calc(20% + 150px) !important; - } - - input#search-bar { - left: 20%; - } - - #search-version { - left: 20% !important; - } -} - - -@media (max-width: 1024px) { - #docs-body { - grid-template-columns: 20% minmax(80%, 100%); - } - - #global-navigation>a { - padding: 10px; - padding-top: 0.1em; - padding-bottom: 0.1em; - } -} - -@media (max-width: 768px) { - #docs-body { - grid-template-columns: 20% minmax(80%, 100%); - } - - #global-navigation { - display: flex; - flex-wrap: wrap; - } - - #nav-contents>a { - font-size: 12px; - } - - .item-description { - font-size: 14px; - } - - .item-table-label { - width: 5em; - } - - #cookies-bar { - flex-direction: column; - } -} - -@media (max-width: 550px) { - #docs-body { - grid-template-columns: 0 100%; - } - - #global-navigation { - /* +2px due to 18px padding botton not 16px */ - height: calc(4.1em + 2px); - } - - #nav-contents { - display: none; - } - - #content { - padding-top: 0px !important; - top: 50px; - margin-left: 10px; - height: calc(100vh - 160px); - /* !important to override home */ - } - - img#theme-switch { - width: 45px; - } - - #global-navigation>li { - padding-bottom: 18px; - } - - input#search-bar { - top: calc(4.1em + 24px) !important; - left: 0; - width: 100% !important; - } - - a#search-icon { - top: calc(4.1em + 38px); - right: 3vw; - } - - #search-bar-after { - top: calc(4.1em + 94px) !important; - } - - span .search-bar-version { - /* More specific to override the other */ - left: 150px !important; - } - - #search-version { - top: calc(4.1em + 24px) !important; - left: 0% !important; - } - - #global-navigation>a { - padding: 10px; - padding-top: 0.1em; - padding-bottom: 0.1em; - } - - div.item-content { - max-width: 100vw; - } - - div.grid-container { - grid-template-columns: initial; - } - - .box.code { - height: 300px; - font-size: 14px; - } - - p.item-type { - display: none; - } -} - -.title { - margin-top: 32px; - color: var(--font-color); -} - -.subtitle { - padding-left: 20px !important; - color: var(--font-color); -} - -p, h1, h2, h3, h4, h5 { - color: var(--font-color); -} - -.left-margin { - margin-left: 20px !important; -} - -.colors-table { - width: 75%; - margin: 32px auto; - border-collapse: collapse; - font-size: 0.9em; - font-family: "Poppins", sans-serif; - box-shadow: var(--table-shadow); - color: var(--font-color); - /*border-radius: 5px;*/ -} - -.colors-table th, -.colors-table td { - padding: 12px 15px; -} - -.colors-table tbody tr { - border-bottom: 1px solid rgba(0, 0, 0, .1); -} - -.colors-table tbody tr:nth-of-type(even) { - background-color: rgba(0, 0, 0, 0.02); -} - -.colors-table tbody tr:last-of-type { - border-bottom: 2px solid #ff9800; -} - -ol.custom-list { - margin-left: 16px; - list-style: none; - counter-reset: my-awesome-counter; -} - -ol.custom-list li { - counter-increment: my-awesome-counter; -} - -ol.custom-list li::before { - content: counter(my-awesome-counter) ". "; - font-weight: bold; -} - -code { - font-family: "Source Code Pro", monospace; - background-color: var(--inline-code-bg-color); - padding: 0px 5px; - border-radius: 5px; -} - -pre { - font-family: "Source Code Pro", monospace; -} - -pre code { /* override styling for code blocks */ - font-family: "Source Code Pro", monospace; - background-color: transparent; - padding: 0; - border-radius: 0; -} - -#notification-box { - background-color: rgb(36, 36, 36); - border-radius: 15px; - box-shadow: 0px 3px 10px 0px rgba(0, 0, 0, .2); - text-align: center; - color: rgb(40, 236, 40); - font-weight: bold; - transition: all .2s; - /*transition-delay: .3s;*/ - opacity: 0; - position: fixed; - left: 50%; - top: 92%; - padding: 10px; - transform: translate(-50%, -50%); -} - -.activate-notification { - opacity: 1 !important; - transform: translateY(-20px); -} - -.grid-container { - width: 100%; - display: inline-grid; - grid-template-columns: calc(33% - 1.7%) calc(33% - 1.7%) calc(33% - 1.7%); - grid-column-gap: 3%; - overflow: hidden; -} - -.link { - display: inline-block; -} - -.padding { - padding: 32px 0; -} - -.bottom-padding { - padding-bottom: 32px; -} - -.bottom-padding { - padding-bottom: 32px; -} - -.top-padding { - padding-top: 32px; -} - -.top-padding-2 { - padding-top: 64px; -} - -#search-version { - padding: 12px; - border: none; - font-size: 18px; - font-weight: bold; - position: fixed; - background: var(--search-ver-bg-color); - width: 150px; - left: 16vw; - top: 55px; - box-shadow: 0 3px 5px 0 rgba(0, 0, 0, .05); - color: var(--search-color); - /* border-bottom: 2px solid rgba(255, 152, 0, 0.9); */ -} - -#search-bar { - padding: 12px; - border: none; - font-size: 18px; - position: fixed; - background: var(--search-bg-color); - width: calc(84vw); - left: 16vw; - top: 55px; - box-shadow: 0 3px 5px 0 rgba(0, 0, 0, .05); - color: var(--search-color); -} - -.search-bar-version { - left: calc(16vw + 150px) !important; -} - -#search-bar:focus { - outline: none; -} - -#search-bar-after { - padding: 3px; - font-size: 12px; - position: fixed; - background: var(--search-bg-color); - color: var(--search-color); - box-shadow: 0 3px 5px 0 rgba(0, 0, 0, .05); - right: 15px; - top: 100px; - text-align: right; -} - -.pre { - white-space: pre; -} - -.pre-wrap { - white-space: pre-wrap; -} - -#theme-switch { - position: fixed; - right: 40px; - bottom: 30px; - text-align: right; - display: inline-block; - width: 60px; -} - -#theme-switch:hover { - cursor: pointer; -} - -.link-icon { - margin-left: 5px; -} - - -.menu-tab { - color: white; - font-size: 16px; - border: none; -} - -.menu-subtabs { - display: none; - position: absolute; - top: 55px; - background-color: #292929; - min-width: 120px; - box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2); - z-index: 9; - transition: all 3s ease-out; - opacity: 0; - transform: translateY(-10px); -} - -/* Links inside the dropdown */ -.menu-subtabs a { - color: white; - background: #292929; - padding: 12px 16px; - text-decoration: none; - display: block; -} - -/* Change color of dropdown links on hover */ -.menu-subtabs a:hover { - background-color: #3a3a3a; -} - -/* Show the dropdown menu on hover */ -.menu-tab:hover .menu-subtabs { - transition: all 3s ease-out; - display: block; - opacity: 1; - transform: translateY(0px); -} - -/* Keep the bottom border when hover over the sub-tabs */ -.menu-tab:hover .menu-tab-item { - box-shadow: inset 0 -3px 0 #ff9800; -} - -/* Hover over submenu items */ -#global-navigation .menu-subtabs a:hover { - box-shadow: unset; - /* border-left: 3px solid #ff9800; */ - background: rgba(0, 0, 0, .1); -} - -/* Syntax Highlighting */ -.sk-cond, -.sk-loop { - color: #a52e91; - font-weight: bold; -} - -.sk-eff { - color: rgb(255, 174, 0); -} - -.sk-expr { - color: rgb(255, 174, 25); -} - -.sk-event { - color: #c23838; -} - -.sk-command { - color: #c27715; -} - -.sk-arg-type { - color: #dbab28; -} - -.sk-loop-value { - color: #ff6600; -} - -.sk-false { - color: #b10000; - font-weight: bold; -} - -.sk-true { - color: #20b628; - font-weight: bold; -} - -.sk-operators { - font-weight: bold; -} - -.sk-var { - color: #e74040; -} - -.sk-string [class*="sk-"], -.sk-string { - /* More specific = higher priority to override other css in strings and comments */ - color: #34a52a !important; - font-weight: unset; -} - -.sk-comment, -.sk-comment [class*="sk-"] { - color: #696969 !important; - font-weight: unset; -} - -.sk-function { - color: #e873ff; - font-weight: bold; -} - -.sk-timespan { - color: #ff5967; - font-style: italic; -} - -.new-tab { - color: rgb(255, 91, 91) !important; - font-weight: 600; -} - -#cookies-bar { - position: sticky; - margin: 0; - bottom: 0; - background-color: #353535; - color: white; - padding: 10px; - z-index: 100; - display: flex; - align-items: center; - justify-content: center; -} - -#cookies-accept { - padding: 5px 10px; - border: unset; - background-color: rgb(29, 167, 29); - margin: 0 5px; - cursor: pointer; - color: white; -} - -#cookies-deny { - padding: 5px 10px; - border: unset; - background-color: rgb(167, 29, 29); - margin: 0 5px; - cursor: pointer; - color: white; -} \ No newline at end of file diff --git a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/docs.html b/docs/nightly/enhancement/merge-master-into-feature-attempt-2/docs.html deleted file mode 100644 index 72b9b2f0b7a..00000000000 --- a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/docs.html +++ /dev/null @@ -1 +0,0 @@ - Skript Documentation - 2.8.0-dev-nightly-49c4fae

All Elements

Aliases

🔗

Structure

Patterns:
  • aliases
Since: 1.0
Used for registering custom aliases for a script.

Examples:

aliases:
    blacklisted items = TNT, bedrock, obsidian, mob spawner, lava, lava bucket
    shiny swords = gold sword, iron sword, diamond sword

Command

🔗

Structure

Patterns:
  • command <.+>
Required Entries: trigger
Optional Entries: usage, description, prefix, permission, permission message, aliases, executable by, cooldown, cooldown message, cooldown bypass, cooldown storage
Since: 1.0
Used for registering custom commands.

Examples:

command /broadcast <string>:
    usage: A command for broadcasting a message to all players.
    permission: skript.command.broadcast
    permission message: You don't have permission to broadcast messages
    aliases: /bc
    executable by: players and console
    cooldown: 15 seconds
    cooldown message: You last broadcast a message %elapsed time% ago. You can broadcast another message in %remaining time%.
    cooldown bypass: skript.command.broadcast.admin
    cooldown storage: {cooldown::%player%}
    trigger:
        broadcast the argument

Function

🔗

Structure

Patterns:
  • [local] function <.+>
Since: 2.2, 2.7 (local functions)
Functions are structures that can be executed with arguments/parameters to run code. They can also return a value to the trigger that is executing the function. Note that local functions come before global functions execution

Examples:

function sayMessage(message: text):
    broadcast {_message} # our message argument is available in '{_message}'

local function giveApple(amount: number) :: item:
    return {_amount} of apple

function getPoints(p: player) returns number:
    return {points::%{_p}%}

Options

🔗

Structure

Patterns:
  • options
Since: 1.0
Options are used for replacing parts of a script with something else. For example, an option may represent a message that appears in multiple locations. Take a look at the example below that showcases this.

Examples:

options:
    no_permission: You're missing the required permission to execute this command!

command /ping:
    permission: command.ping
    permission message: {@no_permission}
    trigger:
        message "Pong!"

command /pong:
    permission: command.pong
    permission message: {@no_permission}
    trigger:
        message "Ping!"

Variables

🔗

Structure

Patterns:
  • variables
Since: 1.0
Used for defining variables present within a script. This section is not required, but it ensures that a variable has a value if it doesn't exist when the script is loaded.

Examples:

variables:
    {joins} = 0
    {balance::%player%} = 0

on join:
    add 1 to {joins}
    message "Your balance is %{balance::%player%}%"

Absorbed blocks

🔗

Expression

Patterns:
  • [the] absorbed blocks
Since: 2.5
Usable in events: sponge absorb
Return Type: Block
The blocks absorbed by a sponge block.

Examples:

the absorbed blocks

Affected Entities

🔗

Expression

Patterns:
  • [the] affected entities
Since: 2.4
Return Type: Living Entity
The affected entities in the area cloud effect event.

Examples:

on area cloud effect:
    loop affected entities:
        if loop-value is a player:
            send "WARNING: you've step on an area effect cloud!" to loop-value

Age of Block/Entity

🔗

Expression

Patterns:
Since: 2.7
Return Type: integer
Returns the age or maximum age of blocks and age for entities (there in no maximum age for entities). For blocks, 'Age' represents the different growth stages that a crop-like block can go through. A value of 0 indicates that the crop was freshly planted, whilst a value equal to 'maximum age' indicates that the crop is ripe and ready to be harvested. For entities, 'Age' represents the time left for them to become adults and it's in minus increasing to be 0 which means they're adults, e.g. A baby cow needs 20 minutes to become an adult which equals to 24,000 ticks so their age will be -24000 once spawned.

Examples:

# Set targeted crop to fully grown crop
set age of targeted block to maximum age of targeted block

# Spawn a baby cow that will only need 1 minute to become an adult
spawn a baby cow at player
set age of last spawned entity to -1200 # in ticks = 60 seconds

All Banned Players/IPs

🔗

Expression

Patterns:
  • [all [[of] the]|the] banned (players|(ips|ip addresses))
Since: 2.7
Return Type: Object
Obtains the list of all banned players or IP addresses.

Examples:

command /banlist:
    trigger:
        send all the banned players

All Groups

🔗

Expression

Patterns:
  • all groups
Since: 2.2-dev35
Requirements: Vault, a permission plugin that supports Vault
Return Type: Text
All the groups a player can have. This expression requires Vault and a compatible permissions plugin to be installed.

Examples:

command /group &lt;text&gt;:
    trigger:
        if argument is "list":
            send "%all groups%"

All Operators

🔗

Expression

Patterns:
  • [all [[of] the]|the] [server] [non(-| )]op[erator]s
Since: 2.7
Return Type: Offline Player
The list of operators on the server.

Examples:

set {_ops::*} to all operators

All Permissions

🔗

Expression

Patterns:
  • [(all [[of] the]|the)] permissions (from|of) %players%
  • [(all [[of] the]|the)] %players%'[s] permissions
Since: 2.2-dev33
Return Type: Text
Returns all permissions of the defined player(s). Note that the modifications to resulting list do not actually change permissions.

Examples:

set {_permissions::*} to all permissions of the player

All Scripts

🔗

Expression

Patterns:
  • [all [of the]] scripts [(without ([subdirectory] paths|parents))]
  • [all [of the]] (enabled|loaded) scripts [(without ([subdirectory] paths|parents))]
  • [all [of the]] (disabled|unloaded) scripts [(without ([subdirectory] paths|parents))]
Since: 2.5
Return Type: Text
Returns all of the scripts, or just the enabled or disabled ones.

Examples:

command /scripts:
    trigger:
        send "All Scripts: %scripts%" to player
        send "Loaded Scripts: %enabled scripts%" to player
        send "Unloaded Scripts: %disabled scripts%" to player

All commands

🔗

Expression

Patterns:
  • [(all|the|all [of] the)] [registered] [script] commands
Since: 2.6
Return Type: Text
Returns all registered commands or all script commands.

Examples:

send "Number of all commands: %size of all commands%"
send "Number of all script commands: %size of all script commands%"

Alphabetical Sort

🔗

Expression

Patterns:
  • alphabetically sorted %texts%
Since: 2.2-dev18b
Return Type: Text
Sorts given strings in alphabetical order.

Examples:

set {_list::*} to alphabetically sorted {_strings::*}

Altitude

🔗

Expression

Patterns:
Since: 1.4.3
Return Type: Number
Effectively an alias of 'y-coordinate of …', it represents the height of some object above bedrock.

Examples:

on damage:
    altitude of the attacker is higher than the altitude of the victim
    set damage to damage * 1.2

Amount

🔗

Expression

Patterns:
  • [the] (amount|number|size) of %objects%
  • [the] recursive (amount|number|size) of %objects%
Since: 1.0
Return Type: long
The amount of something. Please note that 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:

message "There are %number of all players% players online!"

Amount of Items

🔗

Expression

Patterns:
Since: 2.0
Return Type: long
Counts how many of a particular item type are in a given inventory.

Examples:

message "You have %number of ores in the player's inventory% ores in your inventory."

Anvil Repair Cost

🔗

Expression

Patterns:
  • [the] [anvil] [item] [max[imum]] repair cost [of %inventories%]
  • %inventories%'[s] [anvil] [item] [max[imum]] repair cost
Since: INSERT VERSION
Return Type: integer
Returns the experience cost (in levels) to complete the current repair or the maximum experience cost (in levels) to be allowed by the current repair. The default value of max cost set by vanilla Minecraft is 40.

Examples:

on inventory click:
    if {AnvilRepairSaleActive} = true:
        wait a tick # recommended, to avoid client bugs
        set anvil repair cost to anvil repair cost * 50%
        send "Anvil repair sale is ON!" to player

on inventory click:
    player have permission "anvil.repair.max.bypass"
    set max repair cost of event-inventory to 99999

Anvil Text Input

🔗

Expression

Patterns:
  • [the] anvil [inventory] (rename|text) input of %inventories%
  • %inventories%'[s] anvil [inventory] (rename|text) input
Since: 2.7
Return Type: Text
An expression to get the name to be applied to an item in an anvil inventory.

Examples:

on inventory click:
    type of event-inventory is anvil inventory
    if the anvil input text of the event-inventory is "FREE OP":
        ban player

Applied Enchantments

🔗

Expression

Patterns:
  • [the] applied enchant[ment]s
Since: 2.5
Usable in events: enchant
Return Type: Enchantment Type
The applied enchantments in an enchant event. Deleting or removing the applied enchantments will prevent the item's enchantment.

Examples:

on enchant:
    set the applied enchantments to sharpness 10 and fire aspect 5

Argument

🔗

Expression

Patterns:
  • [the] last arg[ument]
  • [the] arg[ument](-| )<(\d+)>
  • [the] <(\d*1)st|(\d*2)nd|(\d*3)rd|(\d*[4-90])th> arg[ument][s]
  • [(all [[of] the]|the)] arg[ument][s]
  • [the] %*type%( |-)arg[ument][( |-)<\d+>]
  • [the] arg[ument]( |-)%*type%[( |-)<\d+>]
Since: 1.0, 2.7 (support for command events)
Return Type: Object
Usable in script commands and command events. Holds the value of an argument given to the command, e.g. if the command "/tell <player> <text>" is used like "/tell Njol Hello Njol!" argument 1 is the player named "Njol" and argument 2 is "Hello Njol!". One can also use the type of the argument instead of its index to address the argument, e.g. in the above example 'player-argument' is the same as 'argument 1'. Please note that specifying the argument type is only supported in script commands.

Examples:

give the item-argument to the player-argument
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

🔗

Expression

Patterns:
Since: 1.4.2
Return Type: Number
Arithmetic expressions, e.g. 1 + 2, (health of player - 2) / 3, etc.

Examples:

set the player's health to 10 - the player's health
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

🔗

Expression

Patterns:
  • [the] ((boots|shoes|leg[ging]s|chestplate[s]|helmet[s]) [(item|slot)]|armo[u]r[s]) of %living entities%
  • %living entities%'[s] ((boots|shoes|leg[ging]s|chestplate[s]|helmet[s]) [(item|slot)]|armo[u]r[s])
Since: 1.0, INSERT VERSION (Armour)
Return Type: Slot
Equipment of living entities, i.e. the boots, leggings, chestplate or helmet.

Examples:

set chestplate of the player to a diamond chestplate
helmet of player is neither a helmet nor air # player is wearing a block, e.g. from another plugin

Arrow Attached Block

🔗

Expression

Patterns:
Since: INSERT VERSION
Return Type: Block
Returns the attached block of an arrow.

Examples:

set hit block of last shot arrow to diamond block

Arrow Knockback Strength

🔗

Expression

Patterns:
Since: 2.5.1
Return Type: long
An arrow's knockback strength.

Examples:

on shoot:
    event-projectile is an arrow
    set arrow knockback strength of event-projectile to 10

Arrows Stuck

🔗

Expression

Patterns:
Since: 2.5
Return Type: long
The number of arrows stuck in a living entity.

Examples:

set arrows stuck in player to 5

Attack Cooldown

🔗

Expression

Patterns:
Since: 2.6.1
Requirements: Minecraft 1.15+
Return Type: float
Returns the current cooldown for a player's attack. This is used to calculate damage, with 1.0 representing a fully charged attack and 0.0 representing a non-charged attack. NOTE: Currently this can not be set to anything.

Examples:

on damage:
    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

🔗

Expression

Patterns:
  • [the] (attacked|damaged|victim) [<(.+)>]
Since: 1.3, 2.6.1 (projectile hit event)
Usable in events: damage, death, projectile hit
Return Type: Entity
The victim of a damage event, e.g. when a player attacks a zombie this expression represents the zombie. When using Minecraft 1.11+, this also covers the hit entity in a projectile hit event.

Examples:

on damage:
    victim is a creeper
    damage the attacked by 1 heart

Attacker

🔗

Expression

Patterns:
  • [the] (attacker|damager)
Since: 1.3
Usable in events: damage, death, destroy
Return Type: Entity
The attacker of a damage event, e.g. when a player attacks a zombie this expression represents the player. Please note that the attacker can also be a block, e.g. a cactus or lava, but this expression will not be set in these cases.

Examples:

on damage:
    attacker is a player
    health of attacker is less than or equal to 2
    damage victim by 1 heart

Bed

🔗

Expression

Patterns:
  • [the] [((safe|valid)|(unsafe|invalid))] bed[s] [location[s]] of %offline players%
  • %offline players%'[s] [((safe|valid)|(unsafe|invalid))] bed[s] [location[s]]
Since: 2.0, 2.7 (offlineplayers, safe bed)
Return Type: Location
Returns the bed location of a player, i.e. the spawn point of a player if they ever slept in a bed and the bed still exists and is unobstructed however, you can set the unsafe bed location of players and they will respawn there even if it has been obstructed or doesn't exist anymore and that's the default behavior of this expression otherwise you will need to be specific i.e. safe bed location.

NOTE: Offline players can not have their bed location changed, only online players.

Examples:

if bed of player exists:
    teleport player the the player's bed
else:
    teleport the player to the world's spawn point

set the bed location of player to spawn location of world("world") # unsafe/invalid bed location
set the safe bed location of player to spawn location of world("world") # safe/valid bed location

Biome

🔗

Expression

Patterns:
Since: 1.4.4, 2.6.1 (3D biomes)
Return Type: Biome
The biome at a certain location. Please note that biomes are only defined for x/z-columns (i.e. the altitude (y-coordinate) doesn't matter), up until Minecraft 1.15.x. As of Minecraft 1.16, biomes are now 3D (per block vs column).

Examples:

# damage player in deserts constantly
every real minute:
    loop all players:
        biome at loop-player is desert
        damage the loop-player by 1

Block

🔗

Expression

Patterns:
  • [the] [event-]block
Since: 1.0
Return Type: Block
The block involved in the event, e.g. the clicked block or the placed block. Can optionally include a direction as well, e.g. 'block above' or 'block in front of the player'.

Examples:

block is ore
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

🔗

Expression

Patterns:
Since: 1.0
Return Type: Block
The block involved in the event, e.g. the clicked block or the placed block. Can optionally include a direction as well, e.g. 'block above' or 'block in front of the player'.

Examples:

block is ore
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 Break Speed

🔗

Expression

Patterns:
Since: 2.7
Requirements: 1.17+
Return Type: float
Gets the speed at which the given player would break this block, taking into account tools, potion effects, whether or not the player is in water, enchantments, etc. The returned value is the amount of progress made in breaking the block each tick. When the total breaking progress reaches 1.0, the block is broken. Note that the break speed can change in the course of breaking a block, e.g. if a potion effect is applied or expires, or the player jumps/enters water.

Examples:

on left click using diamond pickaxe:
    event-block is set
    send "Break Speed: %break speed for player%" to player

Block Data

🔗

Expression

Patterns:
Since: 2.5, 2.5.2 (set)
Requirements: Minecraft 1.13+
Return Type: Block Data
Get the block data associated with a block. This data can also be used to set blocks.

Examples:

set {data} to block data of target block
set block at player to {data}
set block data of target block to oak_stairs[facing=south;waterlogged=true]

Block Hardness

🔗

Expression

Patterns:
Since: 2.6
Requirements: Minecraft 1.13+
Return Type: Number
Obtains the block's hardness level (also known as "strength"). This number is used to calculate the time required to break each block.

Examples:

set {_hard} to block hardness of target block
if block hardness of target block > 5:

Block Sphere

🔗

Expression

Patterns:
  • [(all [[of] the]|the)] blocks in radius %number% [(of|around) %location%]
  • [(all [[of] the]|the)] blocks around %location% in radius %number%
Since: 1.0
Return Type: Block
All blocks in a sphere around a center, mostly useful for looping.

Examples:

loop blocks in radius 5 around the player:
    set loop-block to air

Blocks

🔗

Expression

Patterns:
Since: 1.0, 2.5.1 (within/cuboid/chunk)
Return Type: Block
Blocks relative to other blocks or between other blocks. Can be used to get blocks relative to other blocks or for looping. Blocks from/to and between will return a straight line whereas blocks within will return a cuboid.

Examples:

loop blocks above the player:
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

🔗

Expression

Patterns:
  • [(all|the)] blocks (in|of) [[the] region[s]] %regions%
Since: 2.1
Requirements: Supported regions plugin
Return Type: Block
All blocks in a region. This expression requires a supported regions plugin to be installed.

Examples:

loop all blocks in the region {arena.%{faction.%player%}%}:
    clear the loop-block

Book Author

🔗

Expression

Patterns:
  • [the] [book] (author|writer|publisher) of %item types%
  • %item types%'[s] [book] (author|writer|publisher)
Since: 2.2-dev31
Return Type: Text
The author of a book.

Examples:

on book sign:
    message "Book Title: %author of event-item%"

Book Pages

🔗

Expression

Patterns:
Since: 2.2-dev31, 2.7 (changers)
Return Type: Text
The pages of a book (Supports Skript's chat format) Note: In order to modify the pages of a new written book, you must have the title and author of the book set. Skript will do this for you, but if you want your own, please set those values.

Examples:

on book sign:
    message "Book Pages: %pages of event-item%"
    message "Book Page 1: %page 1 of event-item%"

set page 1 of player's held item to "Book writing"

Book Title

🔗

Expression

Patterns:
Since: 2.2-dev31
Return Type: Text
The title of a book.

Examples:

on book sign:
    message "Book Title: %title of event-item%"

Burn/Cook Time

🔗

Expression

Patterns:
  • [the] burn[ing] time
  • [the] (burn|cook)[ing] time of %blocks%
  • %blocks%'[s] (burn|cook)[ing] time
Since: 2.3
Return Type: Timespan
The time a furnace takes to burn an item in a fuel burn event. Can also be used to change the burn/cook time of a placed furnace.

Examples:

on fuel burn:
    if fuel slot is coal:
        set burning time to 1 tick

Case Text

🔗

Expression

Patterns:
  • %texts% in (upper|lower)[ ]case
  • (upper|lower)[ ]case %texts%
  • capitali(s|z)ed %texts%
  • %texts% in [(lenient|strict) ](proper|title)[ ]case
  • [(lenient|strict) ](proper|title)[ ]case %texts%
  • %texts% in [(lenient|strict) ]camel[ ]case
  • [(lenient|strict) ]camel[ ]case %texts%
  • %texts% in [(lenient|strict) ]pascal[ ]case
  • [(lenient|strict) ]pascal[ ]case %texts%
  • %texts% in [(lower|upper|capital|screaming)[ ]]snake[ ]case
  • [(lower|upper|capital|screaming)[ ]]snake[ ]case %texts%
  • %texts% in [(lower|upper|capital)[ ]]kebab[ ]case
  • [(lower|upper|capital)[ ]]kebab[ ]case %texts%
Since: 2.2-dev16 (lowercase and uppercase), 2.5 (advanced cases)
Return Type: Text
Copy of given text in Lowercase, Uppercase, Proper Case, camelCase, PascalCase, Snake_Case, and Kebab-Case

Examples:

"Oops!" in lowercase # oops!
"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?

Characters Between

🔗

Expression

Patterns:
  • [(all [[of] the]|the)] [alphanumeric] characters (between|from) %text% (and|to) %text%
Since: INSERT VERSION
Return Type: Text
All characters between two given characters, useful for generating random strings. This expression uses the Unicode numerical code of a character to determine which characters are between the two given characters. The ASCII table linked here shows this ordering for the first 256 characters. If you would like only alphanumeric characters you can use the 'alphanumeric' option in the expression. If strings of more than one character are given, only the first character of each is used.

Examples:

loop characters from "a" to "f":
    broadcast "%loop-value%"

# 0123456789:;<=>?@ABC... ...uvwxyz
send characters between "0" and "z"

# 0123456789ABC... ...uvwxyz
send alphanumeric characters between "0" and "z"

Chat Format

🔗

Expression

Patterns:
  • [the] (message|chat) format[ting]
Since: 2.2-dev31
Return Type: Text
Can be used to get/retrieve the chat format. The sender of a message is represented by [player] or [sender], and the message by [message] or [msg].

Examples:

set the chat format to "&lt;yellow&gt;[player]&lt;light gray&gt;: &lt;green&gt;[message]"

Chat Recipients

🔗

Expression

Patterns:
  • [chat][( |-)]recipients
Since: 2.2-Fixes-v7, 2.2-dev35 (clearing recipients)
Return Type: Player
Recipients of chat events where this is called.

Examples:

chat recipients

Chunk

🔗

Expression

Patterns:
Since: 2.0, INSERT VERSION (loaded chunks)
Return Type: Chunk
Returns the chunk of a block, location or entity is in, or a list of the loaded chunks of a world.

Examples:

add the chunk at the player to {protected chunks::*}
set {_chunks::*} to the loaded chunks of the player's world

Clicked Block/Entity/Inventory/Slot

🔗

Expression

Patterns:
  • [the] (clicked [enchant[ment]] (button|option)|clicked (block|%*item type/entity type%)|clicked slot|clicked inventory|click (type|action)|inventory action)
Since: 1.0, 2.2-dev35 (more clickable things)
Usable in events: click, inventory click
Return Type: Object
The clicked block, entity, inventory, inventory slot, inventory click type or inventory action.

Examples:

message "You clicked on a %type of clicked entity%!"
if the clicked block is a chest:
    show the inventory of the clicked block to the player

Color of

🔗

Expression

Patterns:
Since: 1.2
Return Type: Color
The color of an item, can also be used to color chat messages with "<%color of ...%>this text is colored!".

Examples:

on click on wool:
    message "This wool block is <%color of block%>%color of block%<reset>!"
    set the color of the block to black

Colored / Uncolored

🔗

Expression

Patterns:
  • (colo[u]r-|colo[u]red )%texts%
  • (format-|formatted )%texts%
  • (un|non)[-](colo[u]r-|colo[u]red |format-|formatted )%texts%
Since: 2.0
Return Type: Text
Parses <color>s and, optionally, chat styles in a message or removes any colors and chat styles from the message. Parsing all chat styles requires this expression to be used in same line with the send effect.

Examples:

on chat:
    set message to colored message # Safe; only colors get parsed
command /fade &lt;player&gt;:
    trigger:
        set display name of the player-argument to uncolored display name of the player-argument
command /format &lt;text&gt;:
    trigger:
        message formatted text-argument # Safe, because we're sending to whoever used this command

Command

🔗

Expression

Patterns:
  • [the] (full|complete|whole) command
  • [the] command [(label|alias)]
Since: 2.0, 2.7 (support for script commands)
Usable in events: command
Return Type: Text
The command that caused an 'on command' event (excluding the leading slash and all arguments)

Examples:

# prevent any commands except for the /exit command during some game
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

🔗

Expression

Patterns:
  • [the] main command [label|name] [of [[the] command[s] %texts%]]
  • command[s] %texts%'[s] main command [label|name]
  • [the] description [of [[the] command[s] %texts%]]
  • command[s] %texts%'[s] description
  • [the] label [of [[the] command[s] %texts%]]
  • command[s] %texts%'[s] label
  • [the] usage [of [[the] command[s] %texts%]]
  • command[s] %texts%'[s] usage
  • [(all|the|all [of] the)] aliases [of [[the] command[s] %texts%]]
  • command[s] %texts%'[s] aliases
  • [the] permission [of [[the] command[s] %texts%]]
  • command[s] %texts%'[s] permission
  • [the] permission message [of [[the] command[s] %texts%]]
  • command[s] %texts%'[s] permission message
  • [the] plugin [owner] [of [[the] command[s] %texts%]]
  • command[s] %texts%'[s] plugin [owner]
Since: 2.6
Return Type: Text
Get information about a command.

Examples:

main command label of command "skript"
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 /greet <player>:
    usage: /greet <target>
    trigger:
        if arg-1 is sender:
            send "&cYou can't greet yourself! Usage: %the usage%"
            stop
        send "%sender% greets you!" to arg-1
        send "You greeted %arg-1%!"

Command Sender

🔗

Expression

Patterns:
  • [the] [command['s]] (sender|executor)
Since: 2.0
Usable in events: command
Return Type: Command Sender
The player or the console who sent a command. Mostly useful in commands and command events. If the command sender is a command block, its location can be retrieved by using %block's location%

Examples:

make the command sender execute "/say hi!"

on command:
    log "%executor% used command /%command% %arguments%" to "commands.log"

Compass Target

🔗

Expression

Patterns:
Since: 2.0
Return Type: Location
The location a player's compass is pointing at.

Examples:

# make all player's compasses target a player stored in {compass::target::%player%}
every 5 seconds:
    loop all players:
        set the loop-player's compass target to location of {compass::target::%%loop-player%}

Console

🔗

Expression

Patterns:
  • [the] (console|server)
Since: 1.3.1
Return Type: Command Sender
Represents the server's console which can receive messages and execute commands

Examples:

execute console command "/stop"
send "message to console" to the console

Cooldown Time/Remaining Time/Elapsed Time/Last Usage/Bypass Permission

🔗

Expression

Patterns:
  • [the] remaining [time] [of [the] (cooldown|wait) [(of|for) [the] [current] command]]
  • [the] elapsed [time] [of [the] (cooldown|wait) [(of|for) [the] [current] command]]
  • [the] ((cooldown|wait) time|[wait] time of [the] (cooldown|wait) [(of|for) [the] [current] command])
  • [the] last usage [date] [of [the] (cooldown|wait) [(of|for) [the] [current] command]]
  • [the] [cooldown] bypass perm[ission] [of [the] (cooldown|wait) [(of|for) [the] [current] command]]
Since: 2.2-dev33
Return Type: Object
Only usable in command events. Represents the cooldown time, the remaining time, the elapsed time, the last usage date, or the cooldown bypass permission.

Examples:

command /home:
    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

🔗

Expression

Patterns:
  • [the] (x|y|z)(-| )(coord[inate]|pos[ition]|loc[ation])[s] of %locations%
  • %locations%'[s] (x|y|z)(-| )(coord[inate]|pos[ition]|loc[ation])[s]
Since: 1.4.3
Return Type: Number
Represents a given coordinate of a location.

Examples:

player's y-coordinate is smaller than 40:
    message "Watch out for lava!"

Creature/Entity/Player/Projectile/Villager/Powered Creeper/etc.

🔗

Expression

Patterns:
  • [the] [event-]<.+>
Since: 1.0
Return Type: Entity
The entity involved in an event (an entity is a player, a creature or an inanimate object like ignited TNT, a dropped item or an arrow). You can use the specific type of the entity that's involved in the event, e.g. in a 'death of a creeper' event you can use 'the creeper' instead of 'the entity'.

Examples:

give a diamond sword of sharpness 3 to the player
kill the creeper
kill all powered creepers in the wolf's world
projectile is an arrow

Cursor Slot

🔗

Expression

Patterns:
Since: 2.2-dev17
Return Type: Slot
The item which the player has on their inventory cursor. This slot is always empty if player has no inventory open.

Examples:

cursor slot of player is dirt
set cursor slot of player to 64 diamonds

Custom Chest Inventory

🔗

Expression

Patterns:
  • [a] [new] chest inventory (named|with name) %text% [with %number% row[s]]
  • [a] [new] chest inventory with %number% row[s] [(named|with name) %text%]
Since: 2.2-dev34, INSERT VERSION (chat format)
Requirements: Paper 1.16+ (chat format)
Return Type: Inventory
Returns a chest inventory with the given amount of rows and the name. Use the open inventory effect to open it.

Examples:

open chest inventory with 1 row named "test" to player

set {_inventory} to a chest inventory with 1 row
set slot 4 of {_inventory} to a diamond named "example"
open {_inventory} to player

open chest inventory named "<##00ff00>hex coloured title!" with 6 rows to player

Custom Model Data

🔗

Expression

Patterns:
Since: 2.5
Requirements: 1.14+
Return Type: long
Get/set the CustomModelData tag for an item. (Value is an integer between 0 and 99999999)

Examples:

set custom model data of player's tool to 3
set {_model} to custom model data of player's tool

Damage

🔗

Expression

Patterns:
  • [the] damage
Since: 1.3.5, INSERT VERSION (item damage event)
Usable in events: Damage, Vehicle Damage, Item Damage
Return Type: Number
How much damage is done in a entity/vehicle/item damage events. For entity damage events, possibly ignoring armour, criticals and/or enchantments (remember that in Skript '1' is one full heart, not half a heart). For items, it's the amount of durability damage the item will be taking.

Examples:

on item damage:
    event-item is any tool
    clear damage # unbreakable tools as the damage will be 0
on damage:
    increase the damage by 2

Damage Cause

🔗

Expression

Patterns:
  • [the] damage (cause|type)
Since: 2.0
Return Type: Damage Cause
The damage cause of a damage event. Please click on the link for more information.

Examples:

damage cause is lava, fire or burning

Damage Value/Durability

🔗

Expression

Patterns:
Since: 1.2, 2.7 (durability reversed)
Return Type: integer
The damage value/durability of an item.

Examples:

set damage value of player's tool to 10
reset the durability of {_item}
set durability of player's held item to 0

Damaged Item

🔗

Expression

Patterns:
Since: 2.4
Return Type: Item Type
Directly damages an item. In MC versions 1.12.2 and lower, this can be used to apply data values to items/blocks

Examples:

give player diamond sword with damage value 100
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

Date Ago/Later

🔗

Expression

Patterns:
Since: 2.2-dev33
Return Type: Date
A date the specified timespan before/after another date.

Examples:

set {_yesterday} to 1 day ago
set {_hourAfter} to 1 hour after {someOtherDate}
set {_hoursBefore} to 5 hours before {someOtherDate}

Default Value

🔗

Expression

Patterns:
Since: 2.2-dev36
Return Type: Object
A shorthand expression for giving things a default value. If the first thing isn't set, the second thing will be returned.

Examples:

broadcast {score::%player's uuid%} otherwise "%player% has no score!"

Difference

🔗

Expression

Patterns:
Since: 1.4
Return Type: Object
The difference between two values, e.g. numbers, dates or times.

Examples:

if difference between {command::%player%::lastuse} and now is smaller than a minute:
    message "You have to wait a minute before using this command again!"

Difficulty

🔗

Expression

Patterns:
  • [the] difficult(y|ies) of %worlds%
  • %worlds%'[s] difficult(y|ies)
Since: 2.3
Return Type: Difficulty
The difficulty of a world.

Examples:

set the difficulty of "world" to hard

Direction

🔗

Expression

Patterns:
  • [%number% [(block|met(er|re))[s]] [to the]] (north[[(-| )](east|west)][(ward[(s|ly)]|er[(n|ly)])] [of]|south[[(-| )](east|west)][(ward[(s|ly)]|er[(n|ly)])] [of]|(east|west)[(ward[(s|ly)]|er[(n|ly)])] [of]|above|over|(up|down)[ward[(s|ly)]]|below|under[neath]|beneath) [%direction%]
  • [%number% [(block|met(er|re))[s]]] in [the] (direction|horizontal direction|facing|horizontal facing) of %entity/block% [(of|from)]
  • [%number% [(block|met(er|re))[s]]] in %entity/block%'[s] (direction|horizontal direction|facing|horizontal facing) [(of|from)]
  • [%number% [(block|met(er|re))[s]]] (in[ ]front [of]|forward[s]|behind|backwards|[to the] (right|left) [of])
  • [%number% [(block|met(er|re))[s]]] horizontal[ly] (in[ ]front [of]|forward[s]|behind|backwards|to the (right|left) [of])
Since: 1.0 (basic), 2.0 (extended)
Return Type: Direction
A helper expression for the direction type.

Examples:

thrust the player upwards
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

🔗

Expression

Patterns:
Since: 1.0
Return Type: Number
The distance between two points.

Examples:

if the distance between the player and {home::%uuid of player%} is smaller than 20:
    message "You're very close to your home!"

Drops

🔗

Expression

Patterns:
  • [the] drops
Since: 1.0
Usable in events: death
Return Type: Item Type
Only works in death events. Holds the drops of the dying creature. Drops can be prevented by removing them with "remove ... from drops", e.g. "remove all pickaxes from the drops", or "clear drops" if you don't want any drops at all.

Examples:

clear drops
remove 4 planks from the drops

Drops Of Block

🔗

Expression

Patterns:
Since: 2.5.1
Requirements: Minecraft 1.15+ ('as %entity%')
Return Type: Item Type
A list of the items that will drop when a block is broken.

Examples:

on break of block:
    give drops of block using player's tool to player

Element of

🔗

Expression

Patterns:
  • ([the] first|[the] last|[a] random|[the] %number%(st|nd|rd|th)|[the] %number%(st|nd|rd|th) [to] last) element [out] of %objects%
Since: 2.0, 2.7 (relative to last element)
Return Type: Object
The first, last or a random element of a set, e.g. a list variable. See also: random

Examples:

give a random element out of {free items::*} to the player

Enchant Item

🔗

Expression

Patterns:
  • [the] enchant[ed] item
Since: 2.5
Usable in events: enchant prepare, enchant
Return Type: Item Type
The enchant item in an enchant prepare event or enchant event. It can be modified, but enchantments will still be applied in the enchant event.

Examples:

on enchant:
    set the enchanted item to a diamond chestplate
on enchant prepare:
    set the enchant item to a wooden sword

Enchanting Experience Cost

🔗

Expression

Patterns:
  • [the] [displayed] ([e]xp[erience]|enchanting) cost
Since: 2.5
Usable in events: enchant
Return Type: long
The cost of enchanting in an enchant event. This is number that was displayed in the enchantment table, not the actual number of levels removed.

Examples:

on enchant:
    send "Cost: %the displayed enchanting cost%" to player

Enchantment Bonus

🔗

Expression

Patterns:
  • [the] enchantment bonus
Since: 2.5
Usable in events: enchant prepare
Return Type: long
The enchantment bonus in an enchant prepare event. This represents the number of bookshelves affecting/surrounding the enchantment table.

Examples:

on enchant:
    send "There are %enchantment bonus% bookshelves surrounding this enchantment table!" to player

Enchantment Level

🔗

Expression

Patterns:
Since: 2.0
Return Type: long
The level of a particular enchantment on an item.

Examples:

player's tool is a sword of sharpness:
    message "You have a sword of sharpness %level of sharpness of the player's tool% equipped"

Enchantment Offer

🔗

Expression

Patterns:
  • [all [of]] [the] enchant[ment] offers
  • enchant[ment] offer[s] %numbers%
  • [the] %number%(st|nd|rd|th) enchant[ment] offer
Since: 2.5
Usable in events: enchant prepare
Requirements: 1.11 or newer
Return Type: Enchantment Offer
The enchantment offer in enchant prepare events.

Examples:

on enchant prepare:
    send "Your enchantment offers are: %the enchantment offers%" to player

Enchantment Offer Cost

🔗

Expression

Patterns:
Since: 2.5
Requirements: 1.11 or newer
Return Type: long
The cost of an enchantment offer. This is displayed to the right of an enchantment offer. If the cost is changed, it will always be at least 1. This changes how many levels are required to enchant, but does not change the number of levels removed. To change the number of levels removed, use the enchant event.

Examples:

set cost of enchantment offer 1 to 50

Ender Chest

🔗

Expression

Patterns:
Since: 2.0
Return Type: Inventory
The ender chest of a player.

Examples:

open the player's ender chest to the player

Entities

🔗

Expression

Patterns:
Since: 1.2.1, 2.5 (chunks)
Return Type: Entity
All entities in all worlds, in a specific world, in a chunk or in a radius around a certain location, e.g. all players, all creepers in the player's world, or players in radius 100 of the player.

Examples:

kill all creepers in the player's world
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

🔗

Expression

Patterns:
Since: 2.5
Return Type: Boolean
Returns whether an entity has AI.

Examples:

set artificial intelligence of target entity to false

Entity Attribute

🔗

Expression

Patterns:
Since: 2.5, 2.6.1 (final attribute value)
Return Type: Number
The numerical value of an entity's particular attribute. Note that the movement speed attribute cannot be reliably used for players. For that purpose, use the speed expression instead. Resetting an entity's attribute is only available in Minecraft 1.11 and above.

Examples:

on damage of player:
    send "You are wounded!" to victim
    set victim's attack speed attribute to 2

Entity Fire Burn Duration

🔗

Expression

Patterns:
  • [the] (burn[ing]|fire) (time|duration) of %entities%
  • %entities%'[s] (burn[ing]|fire) (time|duration)
Since: 2.7
Return Type: Timespan
How much time an entity will be burning for.

Examples:

send "You will stop burning in %fire time of player%"

Entity Owner

🔗

Expression

Patterns:
Since: 2.5
Return Type: Offline Player
The owner of a tameable entity, such as a horse or wolf.

Examples:

set owner of target entity to player
delete owner of target entity
set {_t} to uuid of tamer of target entity

Exhaustion

🔗

Expression

Patterns:
Since: 2.2-dev35
Return Type: Number
The exhaustion of a player. This is mainly used to determine the rate of hunger depletion.

Examples:

set exhaustion of all players to 1

Experience

🔗

Expression

Patterns:
  • [the] [(spawned|dropped)] [e]xp[erience] [orb[s]]
Since: 2.1, 2.5.3 (block break event), 2.7 (experience change event)
Usable in events: experience spawn, break / mine, experience change
Return Type: Experience
How much experience was spawned in an experience spawn or block break event. Can be changed.

Examples:

on experience spawn:
    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

🔗

Expression

Patterns:
  • [the] exploded blocks
Since: 2.5
Usable in events: explode
Return Type: Block
Get all the blocks that were destroyed in an explode event

Examples:

on explode:
    loop exploded blocks:
        add loop-block to {exploded::blocks::*}

Explosion Block Yield

🔗

Expression

Patterns:
  • [the] [explosion['s]] block (yield|amount)
  • [the] percentage of blocks dropped
Since: 2.5
Usable in events: explosion
Return Type: Number
The percentage of exploded blocks dropped in an explosion event. When changing the yield, a value greater than 1 will function the same as using 1. Attempting to change the yield to a value less than 0 will have no effect.

Examples:

on explode:
set the explosion's block yield to 10%

Explosion Yield

🔗

Expression

Patterns:
  • [the] explosion (yield|radius|size)
  • [the] (yield|radius|size) of [the] explosion
Since: 2.5
Usable in events: explosion prime
Return Type: Number
The yield of the explosion in an explosion prime event. This is how big the explosion is. When changing the yield, values less than 0 will be ignored. Read this wiki page for more information

Examples:

on explosion prime:
    set the yield of the explosion to 10

Explosive Yield

🔗

Expression

Patterns:
  • [the] explosive (yield|radius|size) of %entities%
  • %entities%'[s] explosive (yield|radius|size)
Since: 2.5
Requirements: Minecraft 1.12 or newer for creepers
Return Type: Number
The yield of an explosive (creeper, primed tnt, fireball, etc.). This is how big of an explosion is caused by the entity. Read this wiki page for more information

Examples:

on spawn of a creeper:
    set the explosive yield of the event-entity to 10

Facing

🔗

Expression

Patterns:
Since: 1.4
Return Type: Direction
The facing of an entity or block, i.e. exactly north, south, east, west, up or down (unlike direction which is the exact direction, e.g. '0.5 south and 0.7 east')

Examples:

# makes a bridge
loop blocks from the block below the player in the horizontal facing of the player:
    set loop-block to cobblestone

Fall Distance

🔗

Expression

Patterns:
  • [the] fall[en] (distance|height) of %entities%
  • %entities%'[s] fall[en] (distance|height)
Since: 2.5
Return Type: Number
The distance an entity has fallen for.

Examples:

set all entities' fall distance to 10
on damage:
    send "%victim's fall distance%" to victim

Fertilized Blocks

🔗

Expression

Patterns:
  • [all] [the] fertilized blocks
Since: 2.5
Usable in events: block fertilize
Requirements: Minecraft 1.13 or newer
Return Type: Block
The blocks fertilized in block fertilize events.

Examples:

the fertilized blocks

Filter

🔗

Expression

Patterns:
  • %objects% (where|that match) \[<.+>\]
Since: 2.2-dev36
Return Type: Object
Filters a list based on a condition. For example, if you ran 'broadcast "something" and "something else" where [string input is "something"]', only "something" would be broadcast as it is the only string that matched the condition.

Examples:

send "congrats on being staff!" to all players where [player input has permission "staff"]

Filter Input

🔗

Expression

Patterns:
  • input
  • %*type% input
Since: 2.2-dev36
Return Type: Object
Represents the input in a filter expression. For example, if you ran 'broadcast "something" and "something else" where [input is "something"]the condition would be checked twice, using "something" and "something else" as the inputs.

Examples:

send "congrats on being staff!" to all players where [input has permission "staff"]

Final Damage

🔗

Expression

Patterns:
  • [the] final damage
Since: 2.2-dev19
Usable in events: damage
Return Type: Number
How much damage is done in a damage event, considering all types of damage reduction. Can NOT be changed.

Examples:

send "%final damage%" to victim

Firework Effect

🔗

Expression

Patterns:
  • [(flickering|trailing|flickering trailing|trailing flickering)] %firework type% [firework [effect]] colo[u]red %colors%
  • [(flickering|trailing|flickering trailing|trailing flickering)] %firework type% [firework [effect]] colo[u]red %colors% fad(e|ing) [to] %colors%
Since: 2.4
Return Type: Firework Effect
Represents a 'firework effect' which can be used in the launch firework effect.

Examples:

launch flickering trailing burst firework colored blue and green at player
launch trailing flickering star colored purple, yellow, blue, green and red fading to pink at target entity
launch ball large colored red, purple and white fading to light green and black at player's location with duration 1

Flight Mode

🔗

Expression

Patterns:
  • [the] fl(y[ing]|ight) (mode|state) of %players%
  • %players%'[s] fl(y[ing]|ight) (mode|state)
Since: 2.2-dev34
Return Type: Boolean
Whether the player(s) are allowed to fly. Use Make Fly effect to force player(s) to fly.

Examples:

set flight mode of player to true
send "%flying state of all players%"

Food Level

🔗

Expression

Patterns:
  • [the] (food|hunger)[[ ](level|met(er|re)|bar)] [of %players%]
  • %players%'[s] (food|hunger)[[ ](level|met(er|re)|bar)]
Since: 1.0
Return Type: Number
The food level of a player from 0 to 10. Has several aliases: food/hunger level/meter/bar.

Examples:

set the player's food level to 10

Formatted Date

🔗

Expression

Patterns:
  • %dates% formatted [human-readable] [(with|as) %text%]
  • [human-readable] formatted %dates% [(with|as) %text%]
Since: 2.2-dev31, 2.7 (support variables in format)
Return Type: Text
Converts date to human-readable text format. By default, 'yyyy-MM-dd HH:mm:ss z' (e.g. '2018-03-30 16:03:12 +01') will be used. For reference, see this Wikipedia article.

Examples:

command /date:
    trigger:
        send "Full date: %now formatted human-readable%" to sender
        send "Short date: %now formatted as "yyyy-MM-dd"%" to sender

Former/Future State

🔗

Expression

Patterns:
  • [the] (former|past|old) [state] [of] %~object%
  • %~object% before [the event]
  • [the] (future|to-be|new) [state] [of] %~object%
  • %~object%(-to-be| after[(wards| the event)])
Since: 1.1
Return Type: Object
Represents the value of an expression before an event happened or the value it will have directly after the event, e.g. the old or new level respectively in a level change event. Note: The past, future and present states of an expression are sometimes called 'time states' of an expression. Note 2: If you don't specify whether to use the past or future state of an expression that has different values, its default value will be used which is usually the value after the event.

Examples:

on teleport:
    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

Free / Max / Total Memory

🔗

Expression

Patterns:
  • [the] [server] (free|max[imum]|total) (memory|ram)
Since: INSERT VERSION
Return Type: double
The free, max or total memory of the server in Megabytes.

Examples:

while player is online:
    send action bar "Memory left: %free memory%/%max memory%MB" to player
    wait 5 ticks

Freeze Time

🔗

Expression

Patterns:
Since: 2.7
Return Type: Timespan
How much time an entity has been in powdered snow for.

Examples:

player's freeze time is less than 3 seconds:
    send "you're about to freeze!" to the player

Furnace Slot

🔗

Expression

Patterns:
  • (fuel|result) [slot]
  • (ore|fuel|result)[s] [slot[s]] of %blocks%
  • %blocks%'[s] (ore|fuel|result)[s] [slot[s]]
Since: 1.0
Usable in events: smelt, fuel burn
Return Type: Slot
A slot of a furnace, i.e. either the ore, fuel or result slot. Remember to use 'block' and not 'furnace', as 'furnace' is not an existing expression.

Examples:

set the fuel slot of the clicked block to a lava bucket
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

🔗

Expression

Patterns:
Since: 1.0
Return Type: Game Mode
The gamemode of a player. (Gamemodes)

Examples:

player's gamemode is survival
set the player's gamemode to creative

Gamerule Value

🔗

Expression

Patterns:
Since: 2.5
Requirements: Minecraft 1.13+
Return Type: Gamerule Value
The gamerule value of a world.

Examples:

set the gamerule commandBlockOutput of world "world" to false

Gliding State

🔗

Expression

Patterns:
Since: 2.2-dev21
Return Type: Boolean
Sets of gets gliding state of player. It allows you to set gliding state of entity even if they do not have an Elytra equipped.

Examples:

set gliding of player to off

Glowing

🔗

Expression

Patterns:
Since: 2.2-dev18
Return Type: Boolean
Indicates if targeted entity is glowing (new 1.9 effect) or not. Glowing entities can be seen through walls.

Examples:

set glowing of player to true

Gravity

🔗

Expression

Patterns:
Since: 2.2-dev21
Return Type: Boolean
If entity is affected by gravity or not, i.e. if it has Minecraft 1.10+ NoGravity flag.

Examples:

set gravity of player off

Group

🔗

Expression

Patterns:
Since: 2.2-dev35
Requirements: Vault, a permission plugin that supports Vault
Return Type: Text
The primary group or all groups of a player. This expression requires Vault and a compatible permissions plugin to be installed. If you have LuckPerms, ensure you have vault integration enabled in the luck perms configurations.

Examples:

on join:
    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

🔗

Expression

Patterns:
  • [the] hanging (entity|remover)
Since: 2.6.2
Return Type: Entity
Returns the hanging entity or remover in hanging break and place events.

Examples:

on break of item frame:
    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

🔗

Expression

Patterns:
  • %texts% hash[ed] with (MD5|SHA-256)
Since: 2.0, 2.2-dev32 (SHA-256 algorithm)
Return Type: Text
Hashes the given text using the MD5 or SHA-256 algorithms. Each algorithm is suitable for different use cases.

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:

command /setpass &lt;text&gt;:
    trigger:
        set {password::%uuid of player%} to text-argument hashed with SHA-256
command /login &lt;text&gt;:
    trigger:
        if text-argument hashed with SHA-256 is {password::%uuid of player%}:
            message "Login successful."
        else:
            message "Wrong password!"

Hatching Entity Type

🔗

Expression

Patterns:
  • [the] hatching entity [type]
Since: 2.7
Usable in events: Egg Throw
Return Type: Entity Type
The type of the entity that will be hatched in a Player Egg Throw event.

Examples:

on player egg throw:
    set the hatching entity type to a primed tnt

Hatching Number

🔗

Expression

Patterns:
  • [the] hatching number
Since: 2.7
Usable in events: Egg Throw
Return Type: byte
The number of entities that will be hatched in a Player Egg Throw event. Please note that no more than 127 entities can be hatched at once.

Examples:

on player egg throw:
    set the hatching number to 10

Head location

🔗

Expression

Patterns:
Since: 2.0
Return Type: Location
The location of an entity's head, mostly useful for players and e.g. looping blocks in the player's line of sight. Please note that this location is only accurate for entities whose head is exactly above their center, i.e. players, endermen, zombies, skeletons, etc., but not sheep, pigs or cows.

Examples:

set the block at the player's head to air
set the block in front of the player's eyes to glass
loop blocks in front of the player's head:

Heal Amount

🔗

Expression

Patterns:
  • [the] heal amount
Since: 2.5.1
Usable in events: heal
Return Type: Number
The amount of health healed in a healing event.

Examples:

increase heal amount by 2
remove 0.5 from heal amount

Heal Reason

🔗

Expression

Patterns:
  • (regen|health regain|heal) (reason|cause)
Since: 2.5
Return Type: Heal Reason
The heal reason of a heal event. Please click on the link for more information.

Examples:

on heal:
    if heal reason = satiated:
        send "You ate enough food and gained health back!" to player

Health

🔗

Expression

Patterns:
Since: 1.0
Usable in events: damage
Return Type: Number
The health of a creature, e.g. a player, mob, villager, etc. The minimum value is 0, and the maximum is the creature's max health (e.g. 10 for players).

Examples:

message "You have %health% HP left."

Hidden Players

🔗

Expression

Patterns:
  • [(all [[of] the]|the)] hidden players (of|for) %players%
  • [(all [[of] the]|the)] players hidden (from|for|by) %players%
Since: 2.3
Return Type: Player
The players hidden from a player that were hidden using the player visibility effect.

Examples:

message "&lt;light red&gt;You are currently hiding: &lt;light gray&gt;%hidden players of the player%"

Highest Solid Block

🔗

Expression

Patterns:
  • highest [(solid|non-air)] block at %locations%
Since: 2.2-dev34
Return Type: Block
Returns the highest solid block at the x and z coordinates of the world of a given location.

Examples:

highest block at location of arg-player

Hostname

🔗

Expression

Patterns:
  • [the] (host|domain)[ ][name]
Since: 2.6.1
Return Type: Text
The hostname used by the connecting player to connect to the server in a connect event.

Examples:

on connect:
    hostname is "testers.example.com"
    send "Welcome back tester!"

Hotbar Button

🔗

Expression

Patterns:
  • [the] hotbar button
Since: 2.5
Return Type: long
The hotbar button clicked in an inventory click event.

Examples:

on inventory click:
    send "You clicked the hotbar button %hotbar button%!"

Hotbar Slot

🔗

Expression

Patterns:
  • [the] [the] [([currently] selected|current)] hotbar slot[s] [of %players%]
  • %players%'[s] [the] [([currently] selected|current)] hotbar slot[s]
Since: 2.2-dev36
Return Type: Slot
The currently selected hotbar slot. To retrieve its number use Slot Index expression. Use future and past tense to grab the previous slot in an item change event, see example.

Examples:

message "%player's current hotbar slot%"
set player's selected hotbar slot to slot 4 of player

send "index of player's current hotbar slot = 1" # second slot from the left

on item held change:
    if the selected hotbar slot was a diamond:
        set the currently selected hotbar slot to slot 5 of player

Hover List

🔗

Expression

Patterns:
  • [the] [custom] [(player|server)] (hover|sample) ([message] list|message)
  • [the] [custom] player [(hover|sample)] list
Since: 2.3
Usable in events: server list ping
Requirements: Paper 1.12.2 or newer
Return Type: Text
The list when you hover on the player counts of the server in the server list. This can be changed using texts or players in a server list ping event only. Adding players to the list means adding the name of the players. And note that, for example if there are 5 online players (includes fake online count) in the server and the hover list is set to 3 values, Minecraft will show "... and 2 more ..." at end of the list.

Examples:

on server list ping:
    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

🔗

Expression

Patterns:
  • [the] humidit(y|ies) of %blocks%
  • %blocks%'[s] humidit(y|ies)
Since: 2.2-dev35
Return Type: Number
Humidity of given blocks.

Examples:

set {_humidity} to event-block's humidity

IP

🔗

Expression

Patterns:
  • IP[s][( |-)address[es]] of %players%
  • %players%'[s] IP[s][( |-)address[es]]
  • IP[( |-)address]
Since: 1.4, 2.2-dev26 (when used in connect event), 2.3 (when used in server list ping event)
Return Type: Text
The IP address of a player, or the connected player in a connect event, or the pinger in a server list ping event.

Examples:

ban the IP address of the player
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

Index Of

🔗

Expression

Patterns:
  • [the] [(first|last)] index of %text% in %text%
Since: 2.1
Return Type: long
The first or last index of a character (or text) in a text, or -1 if it doesn't occur in the text. Indices range from 1 to the length of the text.

Examples:

set {_first} to the first index of "@" in the text argument
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

🔗

Expression

Patterns:
  • [(the|all [[of] the])] (indexes|indices) of %~objects%
  • %~objects%'[s] (indexes|indices)
  • [sorted] (indices|indexes) of %~objects% in (ascending|descending) order
  • [sorted] %~objects%'[s] (indices|indexes) in (ascending|descending) order
Since: 2.4 (indices), 2.6.1 (sorting)
Return Type: Text
Returns all the indices of a list variable, optionally sorted by their values. To sort the indices, all objects in the list must be comparable; Otherwise, this expression will just return the unsorted indices.

Examples:

set {l::*} to "some", "cool" and "values"
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

Initiator Inventory

🔗

Expression

Patterns:
  • [the] [event-]initiator[( |-)inventory]
Since: INSERT VERSION
Usable in events: Inventory Item Move
Return Type: Inventory
Returns the initiator inventory in an on inventory item move event.

Examples:

on inventory item move:
    holder of event-initiator-inventory is a chest
    broadcast "Item transport requested at %location at holder of event-initiator-inventory%..."

Inventory

🔗

Expression

Patterns:
  • [the] inventor(y|ies) of %inventoryholders%
  • %inventoryholders%'[s] inventor(y|ies)
Since: 1.0
Return Type: Object
The inventory of a block or player. You can usually omit this expression and can directly add or remove items to/from blocks or players.

Examples:

add a plank to the player's inventory
clear the player's inventory
remove 5 wool from the inventory of the clicked block

Inventory Action

🔗

Expression

Patterns:
  • [the] inventory action
Since: 2.2-dev16
Return Type: Inventory Action
The inventory action of an inventory event. Please click on the link for more information.

Examples:

inventory action is pickup all

Inventory Close Reason

🔗

Expression

Patterns:
  • [the] inventory clos(e|ing) (reason|cause)
Since: INSERT VERSION
Usable in events: Inventory Close
Requirements: Paper
Return Type: Inventory Close Reasons

Examples:

on inventory close:
    inventory close reason is teleport
    send "Your inventory closed due to teleporting!" to player

Inventory Holder/Viewers/Rows/Slots

🔗

Expression

Patterns:
  • (holder[s]|viewers|[amount of] rows|[amount of] slots) of %inventories%
  • %inventories%'[s] (holder[s]|viewers|[amount of] rows|[amount of] slots)
Since: 2.2-dev34, 2.5 (slots)
Return Type: Object
Gets the amount of rows/slots, viewers and holder of an inventory.

NOTE: 'Viewers' expression returns a list of players viewing the inventory. Note that a player is considered to be viewing their own inventory and internal crafting screen even when said inventory is not open.

Examples:

event-inventory's amount of rows
holder of player's top inventory
{_inventory}'s viewers

Inventory Slot

🔗

Expression

Patterns:
Since: 2.2-dev24
Return Type: Slot
Represents a slot in an inventory. It can be used to change the item in an inventory too.

Examples:

if slot 0 of player is air:
    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

🔗

Expression

Patterns:
  • [the] item
Since: unknown (before 2.1)
Return Type: Item
The item involved in an event, e.g. in a drop, dispense, pickup or craft event.

Examples:

on dispense:
    item is a clock
    set the time to 6:00

Item Amount

🔗

Expression

Patterns:
Since: 2.2-dev24
Return Type: long
The amount of an item stack.

Examples:

send "You have got %item amount of player's tool% %player's tool% in your hand!" to player

Item Cooldown

🔗

Expression

Patterns:
Since: INSERT VERSION
Return Type: Timespan
Change the cooldown of a specific material to a certain amount of Timespan.

Examples:

on right click using stick:
    set item cooldown of player's tool for player to 1 minute
    set item cooldown of stone and grass for all players to 20 seconds
    reset item cooldown of cobblestone and dirt for all players

Item Enchantments

🔗

Expression

Patterns:
Since: 2.2-dev36
Return Type: Enchantment Type
All the enchantments an item type has.

Examples:

clear enchantments of event-item

Item of an Entity

🔗

Expression

Patterns:
Since: 2.2-dev35, 2.2-dev36 (improved), 2.5.2 (throwable projectiles)
Requirements: Minecraft 1.15.2+ (throwable projectiles)
Return Type: Slot
An item associated with an entity. For dropped item entities, it gets, obviously, the item that was dropped. For item frames, the item inside the frame is returned. For throwable projectiles (snowballs, enderpearls etc.),it gets the displayed item. Other entities do not have items associated with them.

Examples:

Missing examples.

Item with CustomModelData

🔗

Expression

Patterns:
Since: 2.5
Requirements: 1.14+
Return Type: Item Type
Get an item with a CustomModelData tag. (Value is an integer between 0 and 99999999)

Examples:

give player a diamond sword with custom model data 2
set slot 1 of inventory of player to wooden hoe with custom model data 357

Item with Lore

🔗

Expression

Patterns:
Since: 2.3
Return Type: Item Type
Returns the given item type with the specified lore added to it. If multiple strings are passed, each of them will be a separate line in the lore.

Examples:

set {_test} to stone with lore "line 1" and "line 2"
give {_test} to player

Items

🔗

Expression

Patterns:
  • [all [[of] the]|the] block[[ ]type]s
  • every block[[ ]type]
  • [all [[of] the]|the|every] block[s] of type[s] %item types%
  • [all [[of] the]|the|every] item[s] of type[s] %item types%
Since: 1.0 pre-5
Return Type: Item Type
Items or blocks of a specific type, useful for looping.

Examples:

loop items of type ore and log:
    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

🔗

Expression

Patterns:
  • [(all [[of] the]|the)] items ([with]in|of|contained in|out of) [inventor(y|ies)] %inventories%
Since: 2.0
Return Type: Slot
All items in an inventory. Useful for looping or storing in a list variable. Please note that the positions of the items in the inventory are not saved, only their order is preserved.

Examples:

loop all items in the player's inventory:
    loop-item is enchanted
    remove loop-item from the player
set {inventory::%uuid of player%::*} to items in the player's inventory

Join & Split

🔗

Expression

Patterns:
  • (concat[enate]|join) %texts% [(with|using|by) [[the] delimiter] %text%]
  • split %text% (at|using|by) [[the] delimiter] %text% [with case sensitivity]
  • %text% split (at|using|by) [[the] delimiter] %text% [with case sensitivity]
  • regex split %text% (at|using|by) [[the] delimiter] %text%
  • regex %text% split (at|using|by) [[the] delimiter] %text%
Since: 2.1, 2.5.2 (regex support), 2.7 (case sensitivity)
Return Type: Text
Joins several texts with a common delimiter (e.g. ", "), or splits a text into multiple texts at a given delimiter.

Examples:

message "Online players: %join all players with "" | ""%" # %all players% would use the default "x, y, and z"
set {_s::*} to the string argument split at ","

Language

🔗

Expression

Patterns:
  • [the] [([currently] selected|current)] [game] (language|locale) [setting] of %players%
  • %players%'[s] [([currently] selected|current)] [game] (language|locale) [setting]
Since: 2.3
Return Type: Text
Currently selected game language of a player. The value of the language is not defined properly. The vanilla Minecraft client will use lowercase language / country pairs separated by an underscore, but custom resource packs may use any format they wish.

Examples:

message player's current language

Last Attacker

🔗

Expression

Patterns:
  • [the] last attacker of %entity%
  • %entity%'[s] last attacker
Since: 2.5.1
Return Type: Object
The last block or entity that attacked an entity.

Examples:

send "%last attacker of event-entity%"

Last Color

🔗

Expression

Patterns:
  • [the] last color[s] of %texts%
  • %texts%'[s] last color[s]
Since: 2.6
Return Type: Text
The colors used at the end of a string. The colors of the returned string will be formatted with their symbols.

Examples:

set {_color} to the last colors of "<red>hey<blue>yo"

Last Damage

🔗

Expression

Patterns:
Since: 2.5.1
Return Type: Number
The last damage that was done to an entity. Note that changing it doesn't deal more/less damage.

Examples:

set last damage of event-entity to 2

Last Damage Cause

🔗

Expression

Patterns:
Since: 2.2-Fixes-V10
Return Type: Damage Cause
Cause of last damage done to an entity

Examples:

set last damage cause of event-entity to fire tick

Last Loaded Server Icon

🔗

Expression

Patterns:
  • [the] [last[ly]] loaded server icon
Since: 2.3
Requirements: Paper 1.12.2 or newer
Return Type: Server Icon
Returns the last loaded server icon with the load server icon effect.

Examples:

set {server-icon} to the last loaded server icon

Last Resource Pack Response

🔗

Expression

Patterns:
  • [the] [last] resource pack response[s] of %players%
  • %players%'[s] [last] resource pack response[s]
Since: 2.4
Requirements: Paper 1.9 or newer
Return Type: Resource Pack State
Returns the last resource pack response received from a player.

Examples:

if player's last resource pack response is deny or download fail:

Last Spawned Entity

🔗

Expression

Patterns:
  • [the] [last[ly]] (spawned|shot) %*entity type%
  • [the] [last[ly]] dropped (item)
  • [the] [last[ly]] (created|struck) (lightning)
  • [the] [last[ly]] (launched|deployed) (firework)
Since: 1.3 (spawned entity), 2.0 (shot entity), 2.2-dev26 (dropped item), 2.7 (struck lightning, firework)
Return Type: Entity
Holds the entity that was spawned most recently with the spawn effect (section), dropped with the drop effect, shot with the shoot effect or created with the lightning effect. Please note that even though you can spawn multiple mobs simultaneously (e.g. with 'spawn 5 creepers'), only the last spawned mob is saved and can be used. If you spawn an entity, shoot a projectile and drop an item you can however access all them together.

Examples:

spawn a priest
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
teleport player to last struck lightning
delete last launched firework

Last/First Login Time

🔗

Expression

Patterns:
Since: 2.5
Return Type: Date
When a player last/first logged in the server. 'last login' requires paper to get the last login, otherwise it will get the last time they were seen on the server.

Examples:

command /onlinefor:
    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

🔗

Expression

Patterns:
Since: 2.3
Return Type: Entity
The leash holder of a living entity.

Examples:

set {_example} to the leash holder of the target mob

Length

🔗

Expression

Patterns:
Since: 2.1
Return Type: long
The length of a text, in number of characters.

Examples:

set {_l} to length of the string argument

Level

🔗

Expression

Patterns:
Since: unknown (before 2.1)
Usable in events: level change
Return Type: long
The level of a player.

Examples:

reduce the victim's level by 1
set the player's level to 0

Level Progress

🔗

Expression

Patterns:
Since: 2.0
Usable in events: level change
Return Type: Number
The player's progress in reaching the next level, this represents the experience bar in the game. Please note that this value is between 0 and 1 (e.g. 0.5 = half experience bar). Changing this value can cause the player's level to change if the resulting level progess is negative or larger than 1, e.g. increase the player's level progress by 0.5 will make the player gain a level if their progress was more than 50%.

Examples:

# use the exp bar as mana
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

🔗

Expression

Patterns:
Since: 1.3.4
Return Type: byte
Gets the light level at a certain location which ranges from 0 to 15. It can be separated into sunlight (15 = direct sunlight, 1-14 = indirect) and block light (torches, glowstone, etc.). The total light level of a block is the maximum of the two different light types.

Examples:

# set vampire players standing in bright sunlight on fire
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

Loaded Plugins

🔗

Expression

Patterns:
  • [(all [[of] the]|the)] [loaded] plugins
Since: 2.7
Return Type: Text
An expression to obtain a list of the names of the server's loaded plugins.

Examples:

if the loaded plugins contains "Vault":
    broadcast "This server uses Vault plugin!"

send "Plugins (%size of loaded plugins%): %plugins%" to player

Location

🔗

Expression

Patterns:
  • [the] [event-](location|position)
Since: 2.0
Return Type: Location
The location where an event happened (e.g. at an entity or block), or a location relative to another (e.g. 1 meter above another location).

Examples:

drop 5 apples at the event-location # exactly the same as writing 'drop 5 apples'
set {_loc} to the location 1 meter above the player

Location

🔗

Expression

Patterns:
Since: 2.0
Return Type: Location
The location where an event happened (e.g. at an entity or block), or a location relative to another (e.g. 1 meter above another location).

Examples:

drop 5 apples at the event-location # exactly the same as writing 'drop 5 apples'
set {_loc} to the location 1 meter above the player

Location

🔗

Expression

Patterns:
Since: Unknown
Return Type: Location
The location of a block or entity. This not only represents the x, y and z coordinates of the location but also includes the world and the direction an entity is looking (e.g. teleporting to a saved location will make the teleported entity face the same saved direction every time). Please note that the location of an entity is at it's feet, use head location to get the location of the head.

Examples:

set {home::%uuid of player%} to the location of the player
message "You home was set to %player's location% in %player's world%."

Location At

🔗

Expression

Patterns:
  • [the] (location|position) [at] [\(][x[ ][=[ ]]]%number%, [y[ ][=[ ]]]%number%, [and] [z[ ][=[ ]]]%number%[\)] [[(in|of) [[the] world]] %world%]
Since: 2.0
Return Type: Location
Allows to create a location from three coordinates and a world.

Examples:

set {_loc} to the location at arg-1, arg-2, arg-3 of the world arg-4
distance between the player and the location (0, 0, 0) is less than 200

Loop Iteration

🔗

Expression

Patterns:
  • [the] loop(-| )(counter|iteration)[-%*number%]
Since: INSERT VERSION
Return Type: long
Returns the loop's current iteration count (for both normal and while loops).

Examples:

while player is online:
    give player 1 stone
    wait 5 ticks
    if loop-counter > 30:
        stop loop

loop {top-balances::*}:
    if loop-iteration <= 10:
        broadcast "##%loop-iteration% %loop-index% has $%loop-value%"

Loop value

🔗

Expression

Patterns:
  • [the] loop-<.+>
Since: 1.0, INSERT VERSION (loop-counter)
Return Type: Object
Returns the currently looped value.

Examples:

# Countdown
loop 10 times:
    message "%11 - loop-number%"
    wait a second

# Generate a 10x10 floor made of randomly colored 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

loop {top-balances::*}:
    loop-iteration <= 10
    send "##%loop-iteration% %loop-index% has $%loop-value%"

Loot

🔗

Expression

Patterns:
  • [the] loot
Since: 2.7
Requirements: MC 1.16+
Return Type: Item
The loot that will be generated in a 'loot generate' event.

Examples:

on loot generate:
    chance of %10
    add 64 diamonds
    send "You hit the jackpot!!"

Lore

🔗

Expression

Patterns:
Since: 2.1
Return Type: Text
An item's lore.

Examples:

set the 1st line of the item's lore to "&lt;orange&gt;Excalibur 2.0"

MOTD

🔗

Expression

Patterns:
  • [the] [(default)|(shown|displayed)] (MOTD|message of [the] day)
Since: 2.3
Return Type: Text
The message of the day in the server list. This can be changed in a server list ping event only. 'default MOTD' returns the default MOTD always and can't be changed.

Examples:

on server list ping:
    set the motd to "Join now!"

Max Durability

🔗

Expression

Patterns:
Since: 2.5
Return Type: long
The maximum durability of an item.

Examples:

maximum durability of diamond sword
if max durability of player's tool is not 0: # Item is damageable

Max Health

🔗

Expression

Patterns:
Since: 2.0
Usable in events: damage, death
Return Type: Number
The maximum health of an entity, e.g. 10 for a player.

Examples:

on join:
    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

🔗

Expression

Patterns:
  • [the] max[imum] minecart (speed|velocity) of %entities%
  • %entities%'[s] max[imum] minecart (speed|velocity)
Since: 2.5.1
Return Type: Number
The maximum speed of a minecart.

Examples:

on right click on minecart:
    set max minecart speed of event-entity to 1

Max Players

🔗

Expression

Patterns:
  • [the] [(real|default)|(fake|shown|displayed)] max[imum] player[s] [count|amount|number|size]
  • [the] [(real|default)|(fake|shown|displayed)] max[imum] (count|amount|number|size) of players
Since: 2.3, 2.7 (modify max real players)
Requirements: Paper 1.16+ (modify max real players)
Return Type: integer
The count of max players. This can be changed in a server list ping event only. 'real max players' returns the real count of max players of the server and can be modified on Paper 1.16 or later.

Examples:

on server list ping:
    set the max players count to (online players count + 1)

Maximum Freeze Time

🔗

Expression

Patterns:
  • [the] max[imum] freeze time of %entities%
  • %entities%'[s] max[imum] freeze time
Since: 2.7
Return Type: Timespan
The maximum amount of time an entity can spend in powdered snow before taking damage.

Examples:

difference between player's freeze time and player's max freeze time is less than 1 second:
    send "you're about to freeze!" to the player

Maximum Stack Size

🔗

Expression

Patterns:
Since: 2.1
Return Type: long
The maximum stack size of the specified material, e.g. 64 for torches, 16 for buckets, and 1 for swords.

Examples:

send "You can only pick up %max stack size of player's tool% of %type of (player's tool)%" to player

Me

🔗

Expression

Patterns:
  • me
  • my[self]
Since: 2.1.1
Return Type: Player
A 'me' expression that can be used in players' effect commands only.

Examples:

!heal me
!kick myself
!give a diamond axe to me

Mending Repair Amount

🔗

Expression

Patterns:
  • [the] [mending] repair amount
Since: 2.5.1
Return Type: long
The number of durability points an item is to be repaired in a mending event. Modifying the repair amount will affect how much experience is given to the player after mending.

Examples:

on item mend:
    set the mending repair amount to 100

Message

🔗

Expression

Patterns:
  • [the] [chat( |-)]message
  • [the] (join|log[ ]in)( |-)message
  • [the] (quit|leave|log[ ]out|kick)( |-)message
  • [the] death( |-)message
Since: 1.4.6 (chat message), 1.4.9 (join & quit messages), 2.0 (death message)
Usable in events: chat, join, quit, death
Return Type: Text
The (chat) message of a chat event, the join message of a join event, the quit message of a quit event, or the death message on a death event. This expression is mostly useful for being changed.

Examples:

on chat:
    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

🔗

Expression

Patterns:
Since: 2.2-dev36
Return Type: Object
Metadata is a way to store temporary data on entities, blocks and more that disappears after a server restart.

Examples:

set metadata value "healer" of player to true
broadcast "%metadata value ""healer"" of player%"
clear metadata value "healer" of player

Middle of Location

🔗

Expression

Patterns:
  • [the] (middle|center) [point] of %location%
  • %location%'[s] (middle|center) [point]
Since: 2.6.1
Return Type: Location
Returns the middle/center of a location. In other words, returns the middle of the X, Z coordinates and the floor value of the Y coordinate of a location.

Examples:

command /stuck:
    executable by: players
    trigger:
        teleport player to the center of player's location
        send "You're no longer stuck."

Minecart Derailed / Flying Velocity

🔗

Expression

Patterns:
  • [the] [minecart] (derailed|flying) velocity of %entities%
  • %entities%'[s] [minecart] (derailed|flying) velocity
Since: 2.5.1
Return Type: Vector
The velocity of a minecart as soon as it has been derailed or as soon as it starts flying.

Examples:

on right click on minecart:
    set derailed velocity of event-entity to vector 2, 10, 2

Money

🔗

Expression

Patterns:
Since: 2.0, 2.5 (offline players)
Requirements: Vault, an economy plugin that supports Vault
Return Type: Money
How much virtual money a player has (can be changed).

Examples:

message "You have %player's money%" # the currency name will be added automatically
remove 20$ from the player's balance # replace '$' by whatever currency you use
add 200 to the player's account # or omit the currency altogether

Moon Phase

🔗

Expression

Patterns:
  • [the] (lunar|moon) phase[s] of %worlds%
  • %worlds%'[s] (lunar|moon) phase[s]
Since: 2.7
Requirements: Paper 1.16+
Return Type: Moon Phase
The current moon phase of a world.

Examples:

if moon phase of player's world is full moon:
    send "Watch for the wolves!"

Moved blocks

🔗

Expression

Patterns:
  • [the] moved blocks
Since: 2.2-dev27
Return Type: Block
Blocks which are moved in a piston event. Cannot be used outside of piston events.

Examples:

the moved blocks

Name / Display Name / Tab List Name

🔗

Expression

Patterns:
Since: before 2.1, 2.2-dev20 (inventory name), 2.4 (non-living entity support, changeable inventory name), 2.7 (worlds)
Return Type: Text
Represents the Minecraft account, display or tab list name of a player, or the custom name of an item, entity, block, inventory, gamerule or world.

        
  • 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 color 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.
    •         
        
  •     
  • Worlds         
                  
    • Name: The name of the world. Cannot be changed.
    •         
        

Examples:

on join:
    player has permission "name.red"
    set the player's display name to "&lt;red&gt;[admin] &lt;gold&gt;%name of player%"
    set the player's tab list name to "&lt;green&gt;%player's name%"
set the name of the player's tool to "Legendary Sword of Awesomeness"

Name / Display Name / Tab List Name

🔗

Expression

Patterns:
  • [the] ((player|tab)[ ]list name[s]) of %players%
  • %players%'[s] ((player|tab)[ ]list name[s])
Since: before 2.1, 2.2-dev20 (inventory name), 2.4 (non-living entity support, changeable inventory name), 2.7 (worlds)
Return Type: Text
Represents the Minecraft account, display or tab list name of a player, or the custom name of an item, entity, block, inventory, gamerule or world.

        
  • 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 color 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.
    •         
        
  •     
  • Worlds         
                  
    • Name: The name of the world. Cannot be changed.
    •         
        

Examples:

on join:
    player has permission "name.red"
    set the player's display name to "&lt;red&gt;[admin] &lt;gold&gt;%name of player%"
    set the player's tab list name to "&lt;green&gt;%player's name%"
set the name of the player's tool to "Legendary Sword of Awesomeness"

Named Item/Inventory

🔗

Expression

Patterns:
Since: 2.0, 2.2-dev34 (inventories)
Return Type: Object
Directly names an item/inventory, useful for defining a named item/inventory in a script. If you want to (re)name existing items/inventories you can either use this expression or use set name of <item/inventory> to <text>.

Examples:

give a diamond sword of sharpness 100 named "&lt;gold&gt;Excalibur" to the player
set tool of player to the player's tool named "&lt;gold&gt;Wand"
set the name of the player's tool to "&lt;gold&gt;Wand"
open hopper inventory named "Magic Hopper" to player

Nearest Entity

🔗

Expression

Patterns:
Since: 2.7
Return Type: Entity
Gets the entity nearest to a location or another entity.

Examples:

kill the nearest pig and cow relative to player
teleport player to the nearest cow relative to player
teleport player to the nearest entity relative to player

on click:
    kill nearest pig

New Line

🔗

Expression

Patterns:
  • n[ew]l[ine]
  • line[ ]break
Since: 2.5
Return Type: Text
Returns a line break separator.

Examples:

send "Hello%nl%Goodbye!" to player

No Damage Ticks

🔗

Expression

Patterns:
Since: 2.5
Return Type: long
The number of ticks that an entity is invulnerable to damage for.

Examples:

on damage:
    set victim's invulnerability ticks to 20 #Victim will not take damage for the next second

Now

🔗

Expression

Patterns:
  • now
Since: 1.4
Return Type: Date
The current system time of the server. Use time to get the Minecraft time of a world.

Examples:

broadcast "Current server time: %now%"

Number of Characters

🔗

Expression

Patterns:
  • number of upper[ ]case char(acters|s) in %text%
  • number of lower[ ]case char(acters|s) in %text%
  • number of digit char(acters|s) in %text%
Since: 2.5
Return Type: long
The number of uppercase, lowercase, or digit characters in a string.

Examples:

#Simple Chat Filter
on chat:
    if number of uppercase chars in message / length of message > 0.5
        cancel event
        send "&lt;red&gt;Your message has to many caps!" to player

Numbers

🔗

Expression

Patterns:
  • [(all [[of] the]|the)] (numbers|integers|decimals) (between|from) %number% (and|to) %number%
Since: 1.4.6 (integers & numbers), 2.5.1 (decimals)
Return Type: Number
All numbers between two given numbers, useful for looping. Use 'numbers' if your start is not an integer and you want to keep the fractional part of the start number constant, or use 'integers' if you only want to loop integers. You may also use 'decimals' if you want to use the decimal precision of the start number. You may want to use the 'times' expression instead, for instance 'loop 5 times:'

Examples:

loop numbers from 2.5 to 5.5: # loops 2.5, 3.5, 4.5, 5.5
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

🔗

Expression

Patterns:
  • [(all [[of] the]|the)] offline[ ]players
Since: 2.2-dev35
Return Type: Offline Player
All players that have ever joined the server. This includes the players currently online.

Examples:

send "Size of all players who have joined the server: %size of all offline players%"

Online Player Count

🔗

Expression

Patterns:
  • [the] [((real|default)|(fake|shown|displayed))] [online] player (count|amount|number)
  • [the] [((real|default)|(fake|shown|displayed))] (count|amount|number|size) of online players
Since: 2.3
Requirements: Paper (fake count)
Return Type: long
The amount of online players. This can be changed in a server list ping event only to show fake online player amount. real online player count always return the real count of online players and can't be changed.

Examples:

on server list ping:
    # This will make the max players count 5 if there are 4 players online.
    set the fake max players count to (online player count + 1)

Opened Inventory

🔗

Expression

Patterns:
  • [the] (current|open|top) inventory [of %players%]
  • %players%'[s] (current|open|top) inventory
Since: 2.2-dev24, 2.2-dev35 (Just 'current inventory' works in player events)
Return Type: Inventory
Return the currently opened inventory of a player. If no inventory is open, it returns the own player's crafting inventory.

Examples:

set slot 1 of player's current inventory to diamond sword

Parse

🔗

Expression

Patterns:
Since: 2.0
Return Type: Object
Parses text as a given type, or as a given pattern. This expression can be used in two different ways: One which parses the entire text as a single instance of a type, e.g. as a number, and one that parses the text according to a pattern. If the given text could not be parsed, this expression will return nothing and the parse error will be set if some information is available. Some notes about parsing with a pattern: - The pattern must be a Skript pattern, e.g. percent signs are used to define where to parse which types, e.g. put a %number% or %items% in the pattern if you expect a number or some items there. - You have to save the expression's value in a list variable, e.g. 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:

set {var} to line 1 parsed as number
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

🔗

Expression

Patterns:
  • [the] [last] [parse] error
Since: 2.0
Return Type: Text
The error which caused the last parse operation to fail, which might not be set if a pattern was used and the pattern didn't match the provided text at all.

Examples:

set {var} to line 1 parsed as integer
if {var} is not set:
    parse error is set:
        message "&lt;red&gt;Line 1 is invalid: %last parse error%"
    else:
        message "&lt;red&gt;Please put an integer on line 1!"

Passenger

🔗

Expression

Patterns:
Since: 2.0, 2.2-dev26 (Multiple passengers for 1.11.2+)
Return Type: Entity
The passenger of a vehicle, or the rider of a mob. For 1.11.2 and above, it returns a list of passengers and you can use all changers in it. See also: vehicle

Examples:

#for 1.11 and lower
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

Percent of

🔗

Expression

Patterns:
Since: INSERT VERSION
Return Type: Number
Returns a percentage of one or more numbers.

Examples:

set damage to 10% of victim's health
set damage to 125 percent of damage
set {_result} to {_percent} percent of 999
set {_result::*} to 10% of {_numbers::*}
set experience to 50% of player's total experience

Pi

🔗

Expression

Patterns:
  • (pi|π)
Since: 2.7
Return Type: double
Returns the mathematical constant pi. (approx. 3.1415926535)

Examples:

set {_tau} to pi * 2

Pickup Delay

🔗

Expression

Patterns:
Since: 2.7
Return Type: Timespan
The amount of time before a dropped item can be picked up by an entity.

Examples:

drop diamond sword at {_location} without velocity
set pickup delay of last dropped item to 5 seconds

Ping

🔗

Expression

Patterns:
Since: 2.2-dev36
Return Type: long
Pings of players, as Minecraft server knows them. Note that they will almost certainly be different from the ones you'd get from using ICMP echo requests. This expression is only supported on some server software (PaperSpigot).

Examples:

command /ping <player=%player%>:
    trigger:
        send "%arg-1%'s ping is %arg-1's ping%"

Plain Item

🔗

Expression

Patterns:
Since: 2.6
Return Type: Item Type
A plain item is an item with no modifications. It can be used to convert items to their default state or to match with other default items.

Examples:

if the player's tool is a plain diamond: # check if player's tool has no modifications
    send "You are holding a plain diamond!"

Player List Header and Footer

🔗

Expression

Patterns:
  • [the] (player|tab)[ ]list (header|footer) [(text|message)] of %players%
  • %players%'[s] (player|tab)[ ]list (header|footer) [(text|message)]
Since: 2.4
Requirements: Minecraft 1.13 or newer
Return Type: Text
The message above and below the player list in the tab menu.

Examples:

set all players' tab list header to "Welcome to the Server!"
send "%the player's tab list header%" to player
reset all players' tab list header

Player Protocol Version

🔗

Expression

Patterns:
Since: 2.6.2
Requirements: Paper 1.12.2 or newer
Return Type: integer
Player's protocol version. For more information and list of protocol versions visit wiki.vg.

Examples:

command /protocolversion &ltplayer&gt:
    trigger:
        send "Protocol version of %arg-1%: %protocol version of arg-1%"

Player Skull

🔗

Expression

Patterns:
Since: 2.0
Return Type: Item Type
Gets a skull item representing a player. Skulls for other entities are provided by the aliases.

Examples:

give the victim's skull to the attacker
set the block at the entity to the entity's skull

Player Weather

🔗

Expression

Patterns:
  • [the] [(client|custom)] weather of %players%
  • %players%'[s] [(client|custom)] weather
Since: 2.2-dev34
Return Type: Weather Type
The weather for a player.

Examples:

set weather of arg-player to rainy
reset player's weather
if arg-player's weather is rainy

Portal

🔗

Expression

Patterns:
  • [the] portal['s] blocks
  • [the] blocks of [the] portal
Since: 2.4
Usable in events: portal_create
Return Type: Block
The blocks associated with a portal in the portal creation event.

Examples:

on portal creation:
    loop portal blocks:
        broadcast "%loop-block% is part of a portal!"

Portal Cooldown

🔗

Expression

Patterns:
Since: INSERT VERSION
Return Type: Timespan
The amount of time before an entity can use a portal. By default, it is 15 seconds after exiting a nether portal or end gateway. Players in survival/adventure get a cooldown of 0.5 seconds, while those in creative get no cooldown. Resetting will set the cooldown back to the default 15 seconds for non-player entities and 0.5 seconds for players.

Examples:

on portal:
    wait 1 tick
    set portal cooldown of event-entity to 5 seconds

Potion Effect

🔗

Expression

Patterns:
  • [new] potion effect of %potion% [potion] [[[of] tier] %number%] [without particles] [for %time span%]
  • [new] ambient potion effect of %potion% [potion] [[[of] tier] %number%] [without particles] [for %time span%]
Since: 2.5.2
Return Type: Potion Effect
Create a new potion effect to apply to an entity or item type. Do note that when applying potion effects to tipped arrows/lingering potions, Minecraft reduces the timespan.

Examples:

set {_p} to potion effect of speed of tier 1 without particles for 10 minutes
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 Effect Tier

🔗

Expression

Patterns:
Since: 2.7
Return Type: integer
An expression to obtain the amplifier of a potion effect applied to an entity.

Examples:

if the amplifier of haste of player >= 3:

Potion Effects

🔗

Expression

Patterns:
Since: 2.5.2
Return Type: Potion Effect
Represents the active potion effects of entities and itemtypes. You can clear all potion effects of an entity/itemtype and add/remove a potion effect/type to/from an entity/itemtype. Do note you will not be able to clear the base potion effects of a potion item. In that case, just set the item to a water bottle. When adding a potion effect type (rather than a potion effect), it will default to 15 seconds with tier 1.

Examples:

set {_p::*} to active potion effects of player
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

🔗

Expression

Patterns:
  • [the] [chat] (prefix|suffix) of %players%
  • %players%'[s] [chat] (prefix|suffix)
Since: 2.0
Requirements: Vault, a chat plugin that supports Vault
Return Type: Text
The prefix or suffix as defined in the server's chat plugin.

Examples:

on chat:
    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 "[&lt;red&gt;Admin<reset>] "

Projectile Critical State

🔗

Expression

Patterns:
  • [the] (projectile|arrow) critical (state|ability|mode) of %projectiles%
  • %projectiles%'[s] (projectile|arrow) critical (state|ability|mode)
Since: 2.5.1
Return Type: Boolean
A projectile's critical state. The only currently accepted projectiles are arrows and tridents.

Examples:

on shoot:
    event-projectile is an arrow
    set projectile critical mode of event-projectile to true

Protocol Version

🔗

Expression

Patterns:
  • [the] [server] [(sent|required|fake)] protocol version [number]
Since: 2.3
Usable in events: server list ping
Requirements: Paper 1.12.2 or newer
Return Type: long
The protocol version that will be sent as the protocol version of the server in a server list ping event. For more information and list of protocol versions visit wiki.vg. If this protocol version doesn't match with the protocol version of the client, the client will see the version string. But please note that, this expression has no visual effect over the version string. For example if the server uses PaperSpigot 1.12.2, and you make the protocol version 107 (1.9), the version string will not be "Paper 1.9", it will still be "Paper 1.12.2". But then you can customize the version string as you wish. Also if the protocol version of the player is higher than protocol version of the server, it will say "Server out of date!", and if vice-versa "Client out of date!" when you hover on the ping bars.

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:

on server list ping:
    set the version string to "&lt;light green&gt;Version: &lt;orange&gt;%minecraft version%"
    set the protocol version to 0 # 13w41a (1.7) - so the player will see the custom version string almost always

Quit Reason

🔗

Expression

Patterns:
  • [the] (quit|disconnect) (cause|reason)
Since: INSERT VERSION
Requirements: Paper 1.16.5+
Return Type: Quit Reason
The quit reason as to why a player disconnected in a quit event.

Examples:

on quit:
    quit reason was kicked
    player is banned
    clear {server::player::%uuid of player%::*}

Random

🔗

Expression

Patterns:
Since: 1.4.9
Return Type: Object
Gets a random item out of a set, e.g. a random player out of all players online.

Examples:

give a diamond to a random player out of all players
give a random item out of all items to the player

Random Character

🔗

Expression

Patterns:
  • [a|%number%] random [alphanumeric] character[s] (from|between) %text% (to|and) %text%
Since: INSERT VERSION
Return Type: Text
One or more random characters between two given characters. Use 'alphanumeric' if you want only alphanumeric characters. This expression uses the Unicode numerical code of a character to determine which characters are between the two given characters. If strings of more than one character are given, only the first character of each is used.

Examples:

set {_captcha} to join (5 random characters between "a" and "z") with ""
send 3 random alphanumeric characters between "0" and "z"

Random Number

🔗

Expression

Patterns:
  • [a] random (integer|number) (from|between) %number% (to|and) %number%
Since: 1.4
Return Type: Number
A random number or integer between two given numbers. Use 'number' if you want any number with decimal parts, or use use 'integer' if you only want whole numbers. Please note that the order of the numbers doesn't matter, i.e. random number between 2 and 1 will work as well as random number between 1 and 2.

Examples:

set the player's health to a random number between 5 and 10
send "You rolled a %random integer from 1 to 6%!" to the player

Random UUID

🔗

Expression

Patterns:
  • [a] random uuid
Since: 2.5.1
Return Type: Text
Returns a random UUID.

Examples:

set {_uuid} to random uuid

Raw Name

🔗

Expression

Patterns:
Since: unknown (2.2)
Return Type: Text
The raw Minecraft material name of the given item. Note that this is not guaranteed to give same results on all servers.

Examples:

raw name of tool of player

Raw String

🔗

Expression

Patterns:
Since: 2.7
Return Type: Text
Returns the string without formatting (colors etc.) and without stripping them from it, e.g. raw "&aHello There!" would output &aHello There!

Examples:

send raw "&aThis text is unformatted!" to all players

Redstone Block Power

🔗

Expression

Patterns:
  • [the] redstone power of %blocks%
  • %blocks%'[s] redstone power
Since: 2.5
Return Type: long
Power of a redstone block

Examples:

if redstone power of targeted block is 15:
    send "This block is very powerful!"

Region

🔗

Expression

Patterns:
  • [the] [event-]region
Since: 2.1
Requirements: Supported regions plugin
Return Type: Region
The region involved in an event. This expression requires a supported regions plugin to be installed.

Examples:

on region enter:
    region is {forbidden region}
    cancel the event

Region Members & Owners

🔗

Expression

Patterns:
  • [(all|the)] (members|owner[s]) of [[the] region[s]] %regions%
  • [[the] region[s]] %regions%'[s] (members|owner[s])
Since: 2.1
Requirements: Supported regions plugin
Return Type: Offline Player
A list of members or owners of a region. This expression requires a supported regions plugin to be installed.

Examples:

on entering of a region:
    message "You're entering %region% whose owners are %owners of region%"

Regions At

🔗

Expression

Patterns:
Since: 2.1
Requirements: Supported regions plugin
Return Type: Region
All regions at a particular location. This expression requires a supported regions plugin to be installed.

Examples:

On click on a sign:
    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: &lt;gold&gt;%{_regions::*}%<r>."

Remaining Air

🔗

Expression

Patterns:
Since: unknown (before 2.1)
Return Type: Timespan
How much time a player has left underwater before starting to drown.

Examples:

player's remaining air is less than 3 seconds:
    send "hurry, get to the surface!" to the player

Respawn Anchor Charges

🔗

Expression

Patterns:
  • [the] [max[imum]] charge[s] of %blocks%
  • %blocks%'[s] [max[imum]] charge[s]
Since: 2.7
Requirements: Minecraft 1.16+
Return Type: integer
The charges of a respawn anchor.

Examples:

set the charges of event-block to 3

Respawn location

🔗

Expression

Patterns:
  • [the] respawn location
Since: 2.2-dev35
Return Type: Location
The location that a player should respawn at. This is used within the respawn event.

Examples:

on respawn:
    set respawn location to {example::spawn}

Reversed List

🔗

Expression

Patterns:
Since: 2.4
Return Type: Object
Reverses given list.

Examples:

set {_list::*} to reversed {_list::*}

Rounding

🔗

Expression

Patterns:
  • [(a|the)] round[ed] down %number%
  • [(a|the)] round[ed] %number%
  • [(a|the)] round[ed] up %number%
Since: 2.0
Return Type: long
Rounds numbers normally, up (ceiling) or down (floor) respectively.

Examples:

set {var} to rounded health of player
set line 1 of the block to rounded "%(1.5 * player's level)%"
add rounded down argument to the player's health

Saturation

🔗

Expression

Patterns:
Since: 2.2-Fixes-v10, 2.2-dev35 (fully modifiable), 2.6.2 (syntax pattern changed)
Return Type: Number
The saturation of a player. If used in a player event, it can be omitted and will default to event-player.

Examples:

set saturation of player to 20

Scoreboard Tags

🔗

Expression

Patterns:
  • [(all [[of] the]|the)] scoreboard tags of %entities%
  • %entities%'[s] scoreboard tags
Since: 2.3
Return Type: Text
Scoreboard tags are simple list of texts stored directly in the data of an entity. So this is a Minecraft related thing, not Bukkit, so the tags will not get removed when the server stops. You can visit visit Minecraft Wiki for more info. This is changeable and valid for any type of entity. Also you can use use the Has Scoreboard Tag condition to check whether an entity has the given tags.

Requires Minecraft 1.11+ (actually added in 1.9 to the game, but added in 1.11 to Spigot).

Examples:

on spawn of a monster:
    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

🔗

Expression

Patterns:
  • [the] script[['s] name]
  • name of [the] script
Since: 2.0
Usable in events: Script Load/Unload
Return Type: Text
Holds the current script's name (the file name without '.sk').

Examples:

on script load:
    set {running::%script%} to true
on script unload:
    set {running::%script%} to false

Sea Level

🔗

Expression

Patterns:
Since: 2.5.1
Return Type: long
Gets the sea level of a world.

Examples:

send "The sea level in your world is %sea level in player's world%"

Sea Pickles

🔗

Expression

Patterns:
  • [the] [(min|max)[imum]] [sea] pickle(s| (count|amount)) of %blocks%
  • %blocks%'[s] [(min|max)[imum]] [sea] pickle(s| (count|amount))
Since: 2.7
Return Type: integer
An expression to obtain or modify data relating to the pickles of a sea pickle block.

Examples:

on block break:
    type of block is sea pickle
    send "Wow! This stack of sea pickles contained %event-block's sea pickle count% pickles!"
    send "It could've contained a maximum of %event-block's maximum sea pickle count% pickles!"
    send "It had to have contained at least %event-block's minimum sea pickle count% pickles!"
    cancel event
    set event-block's sea pickle count to event-block's maximum sea pickle count
    send "This bad boy is going to hold so many pickles now!!"

Server Icon

🔗

Expression

Patterns:
  • [the] [((default)|(shown|sent))] [server] icon
Since: 2.3
Requirements: Paper 1.12.2 or newer
Return Type: Server Icon
Icon of the server in the server list. Can be set to an icon that loaded using the load server icon effect, or can be reset to the default icon in a server list ping. 'default server icon' returns the default server icon (server-icon.png) always and cannot be changed.

Examples:

on script load:
    set {server-icons::default} to the default server icon

Sets

🔗

Expression

Patterns:
  • [all [[of] the]|the|every] %*type%
Since: 1.0 pre-5, 2.7 (classinfo)
Return Type: Object
Returns a list of all the values of a type. Useful for looping.

Examples:

loop all attribute types:
    set loop-value attribute of player to 10
    message "Set attribute %loop-value% to 10!"

Shooter

🔗

Expression

Patterns:
Since: 1.3.7
Return Type: Living Entity
The shooter of a projectile.

Examples:

shooter is a skeleton

Shuffled List

🔗

Expression

Patterns:
Since: 2.2-dev32
Return Type: Object
Shuffles given list randomly. This is done by replacing indices by random numbers in resulting list.

Examples:

set {_list::*} to shuffled {_list::*}

Sign Text

🔗

Expression

Patterns:
  • [the] line %number% [of %block%]
  • [the] (1st|first|2nd|second|3rd|third|4th|fourth) line [of %block%]
Since: 1.3
Return Type: Text
A line of text on a sign. Can be changed, but remember that there is a 16 character limit per line (including color codes that use 2 characters each).

Examples:

on rightclick on sign:
    line 2 of the clicked block is "[Heal]":
        heal the player
    set line 3 to "%player%"

Slot Index

🔗

Expression

Patterns:
  • [the] [(raw|unique)] index of %slots%
  • %slots%'[s] [(raw|unique)] index
Since: 2.2-dev35, INSERT VERSION (raw index)
Return Type: long
Index of an an inventory slot. Other types of slots may or may not have indices. Note that comparing slots with numbers is also possible; if index of slot is same as the number, comparisonsucceeds. This expression is mainly for the cases where you must for some reason save the slot numbers.

Raw index of slot is unique for the view, see Minecraft Wiki

Examples:

if index of event-slot is 10:
    send "You bought a pie!"

if display name of player's top inventory is "Custom Menu": # 3 rows inventory
    if raw index of event-slot > 27: # outside custom inventory
        cancel event

Sorted List

🔗

Expression

Patterns:
Since: 2.2-dev19
Return Type: Object
Sorts given list in natural order. All objects in list must be comparable; if they're not, this expression will return nothing.

Examples:

set {_sorted::*} to sorted {_players::*}

Source Block

🔗

Expression

Patterns:
  • [the] source block
Since: 2.7
Usable in events: Spread
Return Type: Block
The source block in a spread event.

Examples:

on spread:
    if the source block is a grass block:
        set the source block to a dirt block

Spawn

🔗

Expression

Patterns:
  • [the] spawn[s] [(point|location)[s]] [of %worlds%]
  • %worlds%'[s] spawn[s] [(point|location)[s]]
Since: 1.4.2
Return Type: Location
The spawn point of a world.

Examples:

teleport all players to spawn
set the spawn point of "world" to the player's location

Spawn Reason

🔗

Expression

Patterns:
  • [the] spawn[ing] reason
Since: 2.3
Return Type: Spawn Reason
The spawn reason in a spawn event.

Examples:

on spawn:
    spawn reason is reinforcements or breeding
    cancel event

Spawner Type

🔗

Expression

Patterns:
  • [the] (spawner|entity|creature) type[s] of %blocks%
  • %blocks%'[s] (spawner|entity|creature) type[s]
Since: 2.4
Return Type: Entity Type
Retrieves, sets, or resets the spawner's entity type

Examples:

on right click:
    if event-block is spawner:
        send "Spawner's type is %target block's entity type%"

Special Number

🔗

Expression

Patterns:
  • (NaN|[(-|minus)](infinity|∞)) value
  • value of (NaN|[(-|minus)](infinity|∞))
Since: 2.2-dev32d
Return Type: Number
Special number values, namely NaN, Infinity and -Infinity

Examples:

if {_number} is infinity value:

Spectator Target

🔗

Expression

Patterns:
Since: 2.4-alpha4, 2.7 (Paper Spectator Event)
Requirements: Paper
Return Type: Entity
Grabs the spectator target entity of the players.

Examples:

on player start spectating of player:
    message "&c%spectator target% currently has %{game::kills::%spectator target%}% kills!" to the player

on player stop spectating:
    past spectator target was a zombie
    set spectator target to the nearest skeleton

Speed

🔗

Expression

Patterns:
  • [the] (walk[ing]|fl(y[ing]|ight))[( |-)]speed of %players%
  • %players%'[s] (walk[ing]|fl(y[ing]|ight))[( |-)]speed
Since: unknown (before 2.1)
Return Type: Number
A player's walking or flying speed. Both can be changed, but values must be between -1 and 1 (excessive values will be changed to -1 or 1 respectively). Negative values reverse directions. Please note that changing a player's speed will change their FOV just like potions do.

Examples:

set the player's walk speed to 1
increase the argument's fly speed by 0.1

Substring

🔗

Expression

Patterns:
  • [the] (part|sub[ ](text|string)) of %texts% (between|from) [ind(ex|ices)|character[s]] %number% (and|to) [(index|character)] %number%
  • [the] (first|last) [%number%] character[s] of %texts%
  • [the] %number% (first|last) characters of %texts%
  • [the] character[s] at [(index|position|indexes|indices|positions)] %numbers% (in|of) %texts%
Since: 2.1, 2.5.2 (character at, multiple strings support)
Return Type: Text
Extracts part of a text. You can either get the first <x> characters, the last <x> characters, the character at index <x>, or the characters between indices <x> and <y>. The indices <x> and <y> should be between 1 and the length of the text (other values will be fit into this range).

Examples:

set {_s} to the first 5 characters of the text argument
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)

🔗

Expression

Patterns:
  • tps from [the] last ([1] minute|1[ ]m[inute])
  • tps from [the] last 5[ ]m[inutes]
  • tps from [the] last 15[ ]m[inutes]
  • [the] tps
Since: 2.2-dev36
Return Type: Number
Returns the 3 most recent TPS readings, like the /tps command. This expression is only supported on some server software (PaperSpigot).

Examples:

broadcast "%tps%"

Tamer

🔗

Expression

Patterns:
  • [the] tamer
Since: 2.2-dev25
Return Type: Player
The tamer of an entity. Can only be used in entity tame events. You can use 'event-entity' to refer tamed entity itself.

Examples:

on tame:
    if the tamer is a player:
        send "someone tamed something!" to console

Target

🔗

Expression

Patterns:
Since: 1.4.2, 2.7 (Reset)
Return Type: Entity
For players this is the entity at the crosshair. For mobs and experience orbs this is the entity they are attacking/following (if any).

Examples:

on entity target:
    if entity's target is a player:
        send "You're being followed by an %entity%!" to target of entity

reset target of entity # Makes the entity target-less
delete targeted entity of player # for players it will delete the target
delete target of last spawned zombie # for entities it will make them target-less

Targeted Block

🔗

Expression

Patterns:
  • [the] target[ed] block[s] [of %players%]
  • %players%'[s] target[ed] block[s]
  • [the] actual[ly] target[ed] block[s] [of %players%]
  • %players%'[s] actual[ly] target[ed] block[s]
Since: 1.0
Return Type: Block
The block at the crosshair. This regards all blocks that are not air as fully solid, e.g. torches will be like a solid stone block for this expression.

Examples:

# A command to set the block a player looks at to a specific type:
command /setblock &lt;material&gt;:
    trigger:
        set targeted block to argument

Teleport Cause

🔗

Expression

Patterns:
  • [the] teleport (cause|reason|type)
Since: 2.2-dev35
Return Type: Teleport Cause
The teleport cause within a player teleport event.

Examples:

on teleport:
    teleport cause is nether portal, end portal or end gateway
    cancel event

Temperature

🔗

Expression

Patterns:
  • [the] temperature[s] of %blocks%
  • %blocks%'[s] temperature[s]
Since: 2.2-dev35
Return Type: Number
Temperature at given block.

Examples:

message "%temperature of the targeted block%"

Ternary

🔗

Expression

Patterns:
Since: 2.2-dev36
Return Type: Object
A shorthand expression for returning something based on a condition.

Examples:

set {points} to 500 if {admin::%player's uuid%} is set else 100

The Egg

🔗

Expression

Patterns:
  • [the] [thrown] egg
Since: 2.7
Usable in events: Egg Throw
Return Type: Projectile
The egg thrown in a Player Egg Throw event.

Examples:

spawn an egg at the egg

Time

🔗

Expression

Patterns:
  • [the] time[s] [([with]in|of) %worlds%]
  • %worlds%'[s] time[s]
Since: 1.0
Return Type: Time
The time of a world.

Examples:

time in world is between 18:00 and 6:00:
    broadcast "It's night-time, watch out for monsters!"

Time Played

🔗

Expression

Patterns:
Since: 2.5, 2.7 (offline players)
Requirements: MC 1.15+ (offline players)
Return Type: Timespan
The amount of time a player has played for on the server. This info is stored in the player's statistics in the main world's data folder. Changing this will also change the player's stats which can be views in the client's statistics menu. Using this expression on offline players on Minecraft 1.14 and below will return nothing <none>.

Examples:

set {_t} to time played of player
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

🔗

Expression

Patterns:
  • [the] time since %dates%
Since: 2.5
Return Type: Timespan
The time that has passed since a date. If the given date is in the future, a value will not be returned.

Examples:

send "%time since 5 minecraft days ago% has passed since 5 minecraft days ago!" to player

Tool

🔗

Expression

Patterns:
  • [the] ((tool|held item|weapon)|(off[ ]hand (tool|item))) [of %living entities%]
  • %living entities%'[s] ((tool|held item|weapon)|(off[ ]hand (tool|item)))
Since: 1.0
Return Type: Slot
The item an entity is holding in their main or off hand.

Examples:

player's tool is a pickaxe
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

Total Experience

🔗

Expression

Patterns:
Since: 2.7
Return Type: integer
The total experience, in points, of players or experience orbs. Adding to a player's experience will trigger Mending, but setting their experience will not.

Examples:

set total experience of player to 100

add 100 to player's experience

if player's total experience is greater than 100:
    set player's total experience to 0
    give player 1 diamond

Type of

🔗

Expression

Patterns:
Since: 1.4, 2.5.2 (potion effect), 2.7 (block datas)
Return Type: Object
Type of a block, item, entity, inventory or potion effect. Types of items, blocks and block datas are item types similar to them but have amounts of one, no display names and, on Minecraft 1.13 and newer versions, are undamaged. Types of entities and inventories are entity types and inventory types known to Skript. Types of potion effects are potion effect types.

Examples:

on rightclick on an entity:
    message "This is a %type of clicked entity%!"

UUID

🔗

Expression

Patterns:
Since: 2.1.2, 2.2 (offline players' UUIDs), 2.2-dev24 (other entities' UUIDs)
Return Type: Text
The UUID of a player, entity or world. In the future there will be an option to use a player's UUID instead of the name in variable names (i.e. when %player% is used), but for now this can be used. Please note that this expression does not work for offline players if you are under 1.8!

Examples:

# prevents people from joining the server if they use the name of a player
# 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

🔗

Expression

Patterns:
Since: 2.2-dev13b
Return Type: Item Type
Creates unbreakable copies of given items.

Examples:

unbreakable iron sword #Creates unbreakable iron sword

Unix Date

🔗

Expression

Patterns:
Since: 2.5
Return Type: Date
Converts given Unix timestamp to a date. The Unix timespan represents the number of seconds elapsed since 1 January 1970.

Examples:

unix date of 946684800 #1 January 2000 12:00 AM (UTC Time)

Unix Timestamp

🔗

Expression

Patterns:
  • [the] unix timestamp of %dates%
  • %dates%'[s] unix timestamp
Since: 2.2-dev31
Return Type: Number
Converts given date to Unix timestamp. This is roughly how many seconds have elapsed since 1 January 1970.

Examples:

unix timestamp of now

Value Within

🔗

Expression

Patterns:
Since: 2.7
Return Type: Object
Gets the value within objects. Usually used with variables to get the value they store rather than the variable itself, or with lists to get the values of a type.

Examples:

set {_entity} to a random entity out of all entities
delete entity within {_entity} # This deletes the entity itself and not the value stored in the variable

set {_list::*} to "something", 10, "test" and a zombie
broadcast the strings within {_list::*} # "something", "test"

Vectors - Angle Between

🔗

Expression

Patterns:
Since: 2.2-dev28
Return Type: Number
Gets the angle between two vectors.

Examples:

send "%the angle between vector 1, 0, 0 and vector 0, 1, 1%"

Vectors - Arithmetic

🔗

Expression

Patterns:
Since: 2.2-dev28
Return Type: Vector
Arithmetic expressions for vectors.

Examples:

set {_v} to vector 1, 2, 3 // vector 5, 5, 5
set {_v} to {_v} ++ {_v}
set {_v} to {_v} -- {_v}
set {_v} to {_v} ** {_v}
set {_v} to {_v} // {_v}

Vectors - Create from Direction

🔗

Expression

Patterns:
Since: INSERT VERSION
Return Type: Vector
Creates vectors from given directions. Relative directions are relative to the origin, (0, 0, 0). Therefore, the vector from the direction 'forwards' is (0, 0, 1).

Examples:

set {_v} to vector from direction upwards
set {_v} to vector in direction of player
set {_v} to vector in horizontal direction of player
set {_v} to vector from facing of player
set {_v::*} to vectors from north, south, east, and west

Vectors - Create from XYZ

🔗

Expression

Patterns:
Since: 2.2-dev28
Return Type: Vector
Creates a vector from x, y and z values.

Examples:

set {_v} to vector 0, 1, 0

Vectors - Cross Product

🔗

Expression

Patterns:
Since: 2.2-dev28
Return Type: Vector
Gets the cross product between two vectors.

Examples:

send "%vector 1, 0, 0 cross vector 0, 1, 0%"

Vectors - Cylindrical Shape

🔗

Expression

Patterns:
  • [a] [new] cylindrical vector [(from|with)] [radius] %number%, [yaw] %number%(,| and) [height] %number%
Since: 2.2-dev28
Return Type: Vector
Forms a 'cylindrical shaped' vector using yaw to manipulate the current point.

Examples:

loop 360 times:
    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

🔗

Expression

Patterns:
Since: 2.2-dev28
Return Type: Number
Gets the dot product between two vectors.

Examples:

set {_dot} to {_v1} dot {_v2}

Vectors - Length

🔗

Expression

Patterns:
  • [the] (vector|standard|normal) length[s] of %vectors%
  • %vectors%'[s] (vector|standard|normal) length[s]
Since: 2.2-dev28
Return Type: Number
Gets or sets the length of a vector.

Examples:

send "%standard length of vector 1, 2, 3%"
set {_v} to vector 1, 2, 3
set standard length of {_v} to 2
send "%standard length of {_v}%"

Vectors - Location Vector Offset

🔗

Expression

Patterns:
Since: 2.2-dev28
Return Type: Location
Returns the location offset by vectors.

Examples:

set {_loc} to {_loc} ~ {_v}

Vectors - Normalized

🔗

Expression

Patterns:
Since: 2.2-dev28
Return Type: Vector
Returns the same vector but with length 1.

Examples:

set {_v} to normalized {_v}

Vectors - Random Vector

🔗

Expression

Patterns:
  • [a] random vector
Since: 2.2-dev28, 2.7 (signed components)
Return Type: Vector
Creates a random unit vector.

Examples:

set {_v} to a random vector

Vectors - Spherical Shape

🔗

Expression

Patterns:
  • [new] spherical vector [(from|with)] [radius] %number%, [yaw] %number%(,| and) [pitch] %number%
Since: 2.2-dev28
Return Type: Vector
Forms a 'spherical shaped' vector using yaw and pitch to manipulate the current point.

Examples:

loop 360 times:
    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

🔗

Expression

Patterns:
  • [the] squared length[s] of %vectors%
  • %vectors%'[s] squared length[s]
Since: 2.2-dev28
Return Type: Number
Gets the squared length of a vector.

Examples:

send "%squared length of vector 1, 2, 3%"

Vectors - Vector Between Locations

🔗

Expression

Patterns:
Since: 2.2-dev28
Return Type: Vector
Creates a vector between two locations.

Examples:

set {_v} to vector between {_loc1} and {_loc2}

Vectors - Vector Projection

🔗

Expression

Patterns:
Since: INSERT VERSION
Return Type: Vector
An expression to get the vector projection of two vectors.

Examples:

set {_projection} to vector projection of vector(1, 2, 3) onto vector(4, 4, 4)

Vectors - Vector from Location

🔗

Expression

Patterns:
Since: 2.2-dev28
Return Type: Vector
Creates a vector from a location.

Examples:

set {_v} to vector of {_loc}

Vectors - Vector from Pitch and Yaw

🔗

Expression

Patterns:
  • [a] [new] vector (from|with) yaw %number% and pitch %number%
Since: 2.2-dev28
Return Type: Vector
Creates a vector from a yaw and pitch value.

Examples:

set {_v} to vector from yaw 45 and pitch 45

Vectors - Velocity

🔗

Expression

Patterns:
Since: 2.2-dev31
Return Type: Vector
Gets or changes velocity of an entity.

Examples:

set player's velocity to {_v}

Vectors - XYZ Component

🔗

Expression

Patterns:
  • [the] [vector] (x|y|z) [component[s]] of %vectors%
  • %vectors%'[s] [vector] (x|y|z) [component[s]]
Since: 2.2-dev28
Return Type: Number
Gets or changes the x, y or z component of a vector.

Examples:

set {_v} to vector 1, 2, 3
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

🔗

Expression

Patterns:
Since: 2.0
Return Type: Entity
The vehicle an entity is in, if any. This can actually be any entity, e.g. spider jockeys are skeletons that ride on a spider, so the spider is the 'vehicle' of the skeleton. See also: passenger

Examples:

vehicle of the player is a minecart

Version

🔗

Expression

Patterns:
  • ([craft]bukkit|minecraft|skript)( |-)version
Since: 2.0
Return Type: Text
The version of Bukkit, Minecraft or Skript respectively.

Examples:

message "This server is running Minecraft %minecraft version% on Bukkit %bukkit version%"
message "This server is powered by Skript %skript version%"

Version String

🔗

Expression

Patterns:
  • [the] [shown|custom] version [string|text]
Since: 2.3
Usable in events: Server List Ping
Requirements: Paper 1.12.2+
Return Type: Text
The text to show if the protocol version of the server doesn't match with protocol version of the client. You can check the protocol version expression for more information about this. This can only be set in a server list ping event.

Examples:

on server list ping:
    set the protocol version to 0 # 13w41a (1.7), so it will show the version string always
    set the version string to "&lt;light green&gt;Version: &lt;orange&gt;%minecraft version%"

View Distance

🔗

Expression

Patterns:
Since: 2.4
Requirements: Paper
Return Type: integer
The view distance of a player as set by the server. Can be changed. NOTE: This is the view distance sent by the server to the player. This has nothing to do with client side view distance settings NOTE: This may not work on some versions (such as MC 1.14.x). The return value in this case will be the view distance set in system.properties.

Examples:

set view distance of player to 10
set {_view} to view distance of player
reset view distance of all players
add 2 to view distance of player

View Distance of Client

🔗

Expression

Patterns:
  • [the] client view distance[s] of %players%
  • %players%'[s] client view distance[s]
Since: 2.5
Requirements: 1.13.2+
Return Type: long
The view distance of the client. Can not be changed. This differs from the server side view distance of player as this will retrieve the view distance the player has set on their client.

Examples:

set {_clientView} to the client view distance of player
set view distance of player to client view distance of player

Weather

🔗

Expression

Patterns:
Since: 1.0
Usable in events: weather change
Return Type: Weather Type
The weather in the given or the current world.

Examples:

set weather to clear
weather in "world" is rainy

Whitelist

🔗

Expression

Patterns:
  • [the] white[ ]list
Since: 2.5.2
Return Type: Offline Player
A server's whitelist.This expression can be used to add/remove players to/from the whitelist, to enable it and disable it (set whitelist to true / set whitelist to false), and to empty it (reset whitelist)

Examples:

set whitelist to false
add all players to whitelist
reset the whitelist

World

🔗

Expression

Patterns:
Since: 1.0
Return Type: World
The world the event occurred in.

Examples:

world is "world_nether"
teleport the player to the world's spawn
set the weather in the player's world to rain
set {_world} to world of event-chunk

World Environment

🔗

Expression

Patterns:
  • [the] [world] environment of %worlds%
  • %worlds%'[s] [world] environment
Since: 2.7
Return Type: World Environment
The environment of a world

Examples:

if environment of player's world is nether:
    apply fire resistance to player for 10 minutes

World Seed

🔗

Expression

Patterns:
Since: 2.2-dev35
Return Type: long
The seed of given world. Note that it will be returned as Minecraft internally treats seeds, not as you specified it in world configuration.

Examples:

broadcast "Seed: %seed of player's world%"

World from Name

🔗

Expression

Patterns:
  • [the] world [(named|with name)] %text%
Since: 2.6.1
Return Type: World
Returns the world from a string.

Examples:

world named {game::world-name}
the world "world"

Worlds

🔗

Expression

Patterns:
  • [(all [[of] the]|the)] worlds
Since: 1.0
Return Type: World
All worlds of the server, useful for looping.

Examples:

loop all worlds:
    broadcast "You're in %loop-world%" to loop-world

X Times

🔗

Expression

Patterns:
Since: 1.4.6
Return Type: long
Integers between 1 and X, used in loops to loop X times.

Examples:

loop 20 times:
    broadcast "%21 - loop-number% seconds left.."
    wait 1 second

X of Item

🔗

Expression

Patterns:
Since: 1.2
Return Type: Object
An expression to be able to use a certain amount of items where the amount can be any expression. Please note that this expression is not stable and might be replaced in the future.

Examples:

give level of player of pickaxes to the player

Yaw / Pitch

🔗

Expression

Patterns:
Since: 2.0, 2.2-dev28 (vector yaw/pitch)
Return Type: Number
The yaw or pitch of a location or vector.

Examples:

log "%player%: %location of player%, %player's yaw%, %player's pitch%" to "playerlocs.log"
set {_yaw} to yaw of player
set {_p} to pitch of target entity

Action Bar

🔗

Effect

Patterns:
  • send [the] action[ ]bar [with text] %text% [to %players%]
Since: 2.3
Sends an action bar message to the given player(s).

Examples:

send action bar "Hello player!" to player

Apply Bone Meal

🔗

Effect

Patterns:
Since: INSERT VERSION
Requirements: MC 1.16.2+
Applies bone meal to a crop, sapling, or composter

Examples:

apply 3 bone meal to event-block

Ban

🔗

Effect

Patterns:
Since: 1.4, 2.1.1 (ban reason), 2.5 (timespan)
Bans or unbans a player or an IP address. 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. Consider using the kick effect after applying a ban.

Examples:

unban player
ban "127.0.0.1"
IP-ban the player because "he is an idiot"
ban player due to "inappropriate language" for 2 days

Break Block

🔗

Effect

Patterns:
Since: 2.4
Breaks the block and spawns items as if a player had mined it

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:

on right click:
    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

Broadcast

🔗

Effect

Patterns:
Since: 1.0, 2.6 (broadcasting objects), 2.6.1 (using advanced formatting)
Broadcasts a message to the server.

Examples:

broadcast "Welcome %player% to the server!"
broadcast "Woah! It's a message!"

Cancel Command Cooldown

🔗

Effect

Patterns:
  • (cancel|ignore) [the] [current] [command] cooldown
  • un(cancel|ignore) [the] [current] [command] cooldown
Since: 2.2-dev34
Only usable in commands. Makes it so the current command usage isn't counted towards the cooldown.

Examples:

command /nick &lt;text&gt;:
    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

Cancel Drops

🔗

Effect

Patterns:
  • (cancel|clear|delete) [the] drops [of (items|[e]xp[erience][s])]
  • (cancel|clear|delete) [the] (item|[e]xp[erience]) drops
Since: 2.4
Usable in events: death, break / mine
Requirements: 1.12.2 or newer (cancelling item drops of blocks)
Cancels drops of items or experiences in a death or block break event. Please note that this doesn't keep items or experiences of a dead player. If you want to do that, use the Keep Inventory / Experience effect.

Examples:

on death of a zombie:
    if name of the entity is "&cSpecial":
        cancel drops of items

on break of a coal ore:
    cancel the experience drops

Cancel Event

🔗

Effect

Patterns:
  • cancel [the] event
  • uncancel [the] event
Since: 1.0
Cancels the event (e.g. prevent blocks from being placed, or damage being taken).

Examples:

on damage:
    victim is a player
    victim has the permission "skript.god"
    cancel the event

Change: Set/Add/Remove/Delete/Reset

🔗

Effect

Patterns:
Since: 1.0 (set, add, remove, delete), 2.0 (remove all)
A very general effect that can change many expressions. Many expressions can only be set and/or deleted, while some can have things added to or removed from them.

Examples:

# set:
Set the player's display name to "&lt;red&gt;%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

Charge Creeper

🔗

Effect

Patterns:
  • make %living entities% [a[n]] (charged|powered|((un|non[-])charged|(un|non[-])powered)) [creeper[s]]
  • (charge|power|(uncharge|unpower)) %living entities%
Since: 2.5
Charges or uncharges a creeper. A creeper is charged when it has been struck by lightning.

Examples:

on spawn of creeper:
    charge the event-entity

Color Items

🔗

Effect

Patterns:
Since: 2.0, 2.2-dev26 (maps and potions)
Colors items in a given color. You can also use RGB codes if you feel limited with the 16 default colors. RGB codes are three numbers from 0 to 255 in the order (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:

dye player's helmet blue
color the player's tool red

Command

🔗

Effect

Patterns:
Since: 1.0, INSERT VERSION (bungeecord command)
Executes a command. This can be useful to use other plugins in triggers. If the command is a bungeecord side command, you can use the [bungeecord] option to execute command on the proxy.

Examples:

make player execute command "/home"
execute console command "/say Hello everyone!"
execute player bungeecord command "/alert &6Testing Announcement!"

Connect

🔗

Effect

Patterns:
Since: 2.3
Connects a player to another bungeecord server

Examples:

connect all players to "hub"

Continue

🔗

Effect

Patterns:
  • continue [this loop|[the] [current] loop]
  • continue [the] %*integer%(st|nd|rd|th) loop
Since: 2.2-dev37, 2.7 (while loops), INSERT VERSION (outer loops)
Moves the loop to the next iteration. You may also continue an outer loop from an inner one. The loops are labelled from 1 until the current loop, starting with the outermost one.

Examples:

# Broadcast online moderators
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)"

Damage/Heal/Repair

🔗

Effect

Patterns:
Since: 1.0
Damage/Heal/Repair an entity, or item.

Examples:

damage player by 5 hearts
heal the player
repair tool of player

Delay

🔗

Effect

Patterns:
Since: 1.4
Delays the script's execution by a given timespan. Please note that delays are not persistent, e.g. trying to create a tempban script with 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:

wait 2 minutes
halt for 5 minecraft hours
wait a tick

Do If

🔗

Effect

Patterns:
  • <.+> if <.+>
Since: 2.3
Execute an effect if a condition is true.

Examples:

on join:
    give a diamond to the player if the player has permission "rank.vip"

Drop

🔗

Effect

Patterns:
Since: 1.0
Drops one or more items.

Examples:

on death of creeper:
    drop 1 TNT

Enable/Disable/Reload Script File

🔗

Effect

Patterns:
  • ((enable|load)|reload|(disable|unload)) s(c|k)ript [file] %text%
Since: 2.4
Enables, disables, or reloads a script file.

Examples:

reload script "test"
enable script file "testing"
unload script file "script.sk"

Enchant/Disenchant

🔗

Effect

Patterns:
Since: 2.0
Enchant or disenchant an existing item.

Examples:

enchant the player's tool with sharpness 5
disenchant the player's tool

Equip

🔗

Effect

Patterns:
Since: 1.0, 2.7 (multiple entities, unequip)
Equips or unequips an entity with some given armor. This will replace any armor that the entity is wearing.

Examples:

equip player with diamond helmet
equip player with all diamond armor
unequip diamond chestplate from player
unequip all armor from player
unequip player's armor

Exit

🔗

Effect

Patterns:
  • (exit|stop) [trigger]
  • (exit|stop) [(1|a|the|this)] (section|loop|conditional)
  • (exit|stop) <\d+> (section|loop|conditional)s
  • (exit|stop) all (section|loop|conditional)s
Since: unknown (before 2.1)
Exits a given amount of loops and conditionals, or the entire trigger.

Examples:

if player has any ore:
    stop
message "%player% has no ores!"
loop blocks above the player:
    loop-block is not air:
        exit 2 sections
    set loop-block to water

Explode Creeper

🔗

Effect

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.
Starts the explosion process of a creeper or instantly explodes it.

Examples:

start explosion of the last spawned creeper
stop ignition of the last spawned creeper

Explosion

🔗

Effect

Patterns:
Since: 1.0
Creates an explosion of a given force. The Minecraft Wiki has an article on explosions which lists the explosion forces of TNT, creepers, etc. 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 10 at the player
create an explosion of force 0 at the victim

Feed

🔗

Effect

Patterns:
Since: 2.2-dev34
Feeds the specified players.

Examples:

feed all players
feed the player by 5 beefs

Force Attack

🔗

Effect

Patterns:
Since: 2.5.1
Requirements: Minecraft 1.15.2+
Makes a living entity attack an entity with a melee attack.

Examples:

spawn a wolf at player's location
make last spawned wolf attack player

Force Respawn

🔗

Effect

Patterns:
Since: 2.2-dev21
Forces player(s) to respawn if they are dead. If this is called without delay from death event, one tick is waited before respawn attempt.

Examples:

on death of player:
    force event-player to respawn

Handedness

🔗

Effect

Patterns:
Since: INSERT VERSION
Requirements: Paper 1.17.1+
Make mobs left or right-handed. This does not affect players.

Examples:

spawn skeleton at spawn of world "world":
    make entity left handed

make all zombies in radius 10 of player right handed

Hide Player from Server List

🔗

Effect

Patterns:
  • hide %players% (in|on|from) [the] server list
  • hide %players%'[s] info[rmation] (in|on|from) [the] server list
Since: 2.3
Hides a player from the hover list and decreases the online players count (only if the player count wasn't changed before).

Examples:

on server list ping:
    hide {vanished::*} from the server list

Ignite/Extinguish

🔗

Effect

Patterns:
Since: 1.4
Lights entities on fire or extinguishes them.

Examples:

ignite the player
extinguish the player

Keep Inventory / Experience

🔗

Effect

Patterns:
  • keep [the] (inventory|items) [(and [e]xp[erience][s] [point[s]])]
  • keep [the] [e]xp[erience][s] [point[s]] [(and (inventory|items))]
Since: 2.4
Usable in events: death
Keeps the inventory or/and experiences of the dead player in a death event.

Examples:

on death of a player:
    if the victim is an op:
        keep the inventory and experiences

Kick

🔗

Effect

Patterns:
  • kick %players% [(by reason of|because [of]|on account of|due to) %text%]
Since: 1.0
Kicks a player from the server.

Examples:

on place of TNT, lava, or obsidian:
    kick the player due to "You may not place %block%!"
    cancel the event

Kill

🔗

Effect

Patterns:
Since: 1.0
Kills an entity. Note: This effect does not set the entity's health to 0 (which causes issues), but damages the entity by 100 times its maximum health.

Examples:

kill the player
kill all creepers in the player's world
kill all endermen, witches and bats

Knockback

🔗

Effect

Patterns:
Since: 2.7
Requirements: Paper 1.19.2+
Apply the same velocity as a knockback to living entities in a direction. Mechanics such as knockback resistance will be factored in.

Examples:

knockback player north
knock victim (vector from attacker to victim) with strength 10

Launch firework

🔗

Effect

Patterns:
Since: 2.4
Launch firework effects at the given location(s).

Examples:

launch ball large colored red, purple and white fading to light green and black at player's location with duration 1

Leash entities

🔗

Effect

Patterns:
Since: 2.3
Leash living entities to other entities.

Examples:

leash the player to the target entity

Lightning

🔗

Effect

Patterns:
Since: 1.4
Strike lightning at a given location. Can use 'lightning effect' to create a lightning that does not harm entities or start fires.

Examples:

strike lightning at the player
strike lightning effect at the victim

Load Server Icon

🔗

Effect

Patterns:
  • load [the] server icon (from|of) [the] [image] [file] %text%
Since: 2.3
Requirements: Paper 1.12.2 or newer
Loads server icons from the given files. You can get the loaded icon using the last loaded server icon expression. Please note that the image must be 64x64 and the file path starts from the server folder.

Examples:

on load:
    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::*}

Locally Suppress Warning

🔗

Effect

Patterns:
  • [local[ly]] suppress [the] (conflict|variable save|[missing] conjunction[s]|starting [with] expression[s]) warning[s]
Since: 2.3
Suppresses target warnings from the current script.

Examples:

locally suppress missing conjunction warnings
suppress the variable save warnings

Log

🔗

Effect

Patterns:
Since: 2.0
Writes text into a .log file. Skript will write these files to /plugins/Skript/logs. 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:

on place of TNT:
    log "%player% placed TNT in %world% at %location of block%" to "tnt/placement.log"

Look At

🔗

Effect

Patterns:
Since: 2.7
Requirements: Paper 1.17+, Paper 1.19.1+ (Players & Look Anchors)
Forces the mob(s) or player(s) to look at an entity, vector or location. Vanilla max head pitches range from 10 to 50.

Examples:

force the head of the player to look towards event-entity's feet

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

Make Egg Hatch

🔗

Effect

Patterns:
  • make [the] egg [not] hatch
Since: 2.7
Usable in events: Egg Throw
Makes the egg hatch in a Player Egg Throw event.

Examples:

on player egg throw:
    # EGGS FOR DAYZ!
    make the egg hatch

Make Fly

🔗

Effect

Patterns:
Since: 2.2-dev34
Forces a player to start/stop flying.

Examples:

make player fly
force all players to stop flying

Make Incendiary

🔗

Effect

Patterns:
  • make %entities% [not] incendiary
  • make %entities%'[s] explosion [not] (incendiary|fiery)
  • make [the] [event(-| )]explosion [not] (incendiary|fiery)
Since: 2.5
Sets if an entity's explosion will leave behind fire. This effect is also usable in an explosion prime event.

Examples:

on explosion prime:
    make the explosion fiery

Make Invisible

🔗

Effect

Patterns:
Since: 2.7
Makes a living entity visible/invisible. This is not a potion and therefore does not have features such as a time limit or particles. 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:

make target entity invisible

Make Invulnerable

🔗

Effect

Patterns:
Since: 2.5
Makes an entity invulnerable/not invulnerable.

Examples:

make target entity invulnerable

Make Say

🔗

Effect

Patterns:
Since: 2.3
Forces a player to send a message to the chat. If the message starts with a slash it will force the player to use command.

Examples:

make the player say "Hello."
force all players to send the message "I love this server"

Message

🔗

Effect

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
Sends a message to the given player. Only styles written 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 "A wild %player% appeared!"
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

Open Book

🔗

Effect

Patterns:
Since: 2.5.1
Requirements: Minecraft 1.14.2+
Opens a written book to a player.

Examples:

open book player's tool to player

Open/Close Inventory

🔗

Effect

Patterns:
  • (open|show) (((crafting [table]|workbench)|chest|anvil|hopper|dropper|dispenser) [(view|window|inventory)]|%inventory/inventory type%) (to|for) %players%
  • close [the] inventory [view] (to|of|for) %players%
  • close %players%'[s] inventory [view]
Since: 2.0, 2.1.1 (closing), 2.2-Fixes-V10 (anvil), 2.4 (hopper, dropper, dispenser
Opens an inventory to a player. The player can then access and modify the inventory as if it was a chest that he just opened. 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:

show the victim's inventory to the player
open the player's inventory for the player

Pathfind

🔗

Effect

Patterns:
Since: 2.7
Requirements: Paper
Make an entity pathfind towards a location or another entity. Not all entities can pathfind. If the pathfinding target is another entity, the entities may or may not continuously follow the target.

Examples:

make all creepers pathfind towards player
make all cows stop pathfinding
make event-entity pathfind towards player at speed 1

Play Effect

🔗

Effect

Patterns:
Since: 2.1
Plays a visual effect at a given location or on a given entity. 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:

play wolf hearts on the clicked wolf
show mob spawner flames at the targeted block to the player

Play Sound

🔗

Effect

Patterns:
Since: 2.2-dev28, 2.4 (sound categories)
Plays a sound at given location for everyone or just for given players, or plays a sound to specified players. Both Minecraft sound names and Spigot sound names are supported. Playing resource pack sounds are supported too. The sound category is 'master' by default.

Please note that sound names can get changed in any Minecraft or Spigot version, or even removed from Minecraft itself.

Examples:

play sound "block.note_block.pling" # It is block.note.pling in 1.12.2
play sound "entity.experience_orb.pickup" with volume 0.5 to the player
play sound "custom.music.1" in jukebox category at {speakerBlock}

Player Info Visibility

🔗

Effect

Patterns:
  • hide [all] player [related] info[rmation] [(in|on|from) [the] server list]
  • (show|reveal) [all] player [related] info[rmation] [(in|to|on|from) [the] server list]
Since: 2.3
Usable in events: server list ping
Requirements: Paper 1.12.2 or newer
Sets whether all player related information is hidden in the server list. 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 info
hide player related information in the server list
reveal all player related info

Player Visibility

🔗

Effect

Patterns:
Since: 2.3
Change visibility of a player for the given 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: if a player was hidden and relogs, this player will be visible again.

Examples:

on join:
    if {vanished::%player's uuid%} is true:
        hide the player from all players

reveal hidden players of {_player}

Poison/Cure

🔗

Effect

Patterns:
Since: 1.3.2
Poison or cure a creature.

Examples:

poison the player
poison the victim for 20 seconds
cure the player from poison

Potion Effects

🔗

Effect

Patterns:
  • apply %potion effects% to %living entities%
  • apply infinite [ambient] [potion of] %potions% [potion] [[[of] tier] %number%] [without [any] particles] [(whilst hiding [the]|without (the|a)) [potion] icon] to %living entities% [replacing [the] existing effect]
  • apply [ambient] [potion of] %potions% [potion] [[[of] tier] %number%] [without [any] particles] [(whilst hiding [the]|without (the|a)) [potion] icon] to %living entities% [for %time span%] [replacing [the] existing effect]
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)
Apply or remove potion effects to/from entities.

Examples:

apply ambient swiftness 2 to the player
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

Push

🔗

Effect

Patterns:
Since: 1.4.6
Push entities around.

Examples:

push the player upwards
push the victim downwards at speed 0.5

PvP

🔗

Effect

Patterns:
Since: 1.3.4
Set the PvP state for a given world.

Examples:

enable PvP #(current world only)
disable PvP in all worlds

Replace

🔗

Effect

Patterns:
Since: 2.0, 2.2-dev24 (replace in multiple strings and replace items in inventory), 2.5 (replace first, case sensitivity)
Replaces all occurrences of a given text with another text. Please note that you can only change variables and a few expressions, e.g. a message or a line of a sign.

Examples:

replace "<item>" in {textvar} with "%item%"
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

Return

🔗

Effect

Patterns:
Since: 2.2, INSERT VERSION (returns aliases)
Makes a function return a value

Examples:

function double(i: number) :: number:
    return 2 * {_i}

function divide(i: number) returns number:
    return {_i} / 2

Send Block Change

🔗

Effect

Patterns:
Since: 2.2-dev37c, 2.5.1 (block data support)
Makes a player see a block as something it really isn't. BlockData support is only for MC 1.13+

Examples:

make player see block at player as dirt
make player see target block as campfire[facing=south]

Send Resource Pack

🔗

Effect

Patterns:
  • send [the] resource pack [from [[the] URL]] %text% to %players%
  • send [the] resource pack [from [[the] URL]] %text% with hash %text% to %players%
Since: 2.4
Request that the player's client download and switch resource packs. The client will download 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:

on join:
    send the resource pack from "URL" with hash "hash" to the player

Shear

🔗

Effect

Patterns:
Since: 2.0 (cows, sheep & snowmen), INSERT VERSION (all shearable entities)
Requirements: Paper 1.19.4+ (all shearable entities)
Shears or un-shears a shearable entity with drops by shearing and a 'sheared' sound. Using with 'force' will force this effect despite the entity's 'shear state'.

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:

on rightclick on a sheep holding a sword:
    shear the clicked sheep
    chance of 10%
    force shear the clicked sheep

Shoot

🔗

Effect

Patterns:
Since: 1.4
Shoots a projectile (or any other entity) from a given entity.

Examples:

shoot an arrow
make the player shoot a creeper at speed 10
shoot a pig from the creeper

Silence Entity

🔗

Effect

Patterns:
Since: 2.5
Controls whether or not an entity is silent.

Examples:

make target entity silent

Stop Server

🔗

Effect

Patterns:
  • (stop|shut[ ]down) [the] server
  • restart [the] server
Since: 2.5
Stops or restarts the server. If restart is used when the restart-script spigot.yml option isn't defined, the server will stop instead.

Examples:

stop the server
restart server

Stop Sound

🔗

Effect

Patterns:
Since: 2.4, 2.7 (stop all sounds)
Requirements: MC 1.17.1 (stop all sounds)
Stops specific or all sounds from playing to a group of players. Both Minecraft sound names and Spigot sound names are supported. Resource pack sounds are supported too. The sound category is 'master' by default. A sound can't be stopped from a different category.

Please note that sound names can get changed in any Minecraft or Spigot version, or even removed from Minecraft itself.

Examples:

stop sound "block.chest.open" for the player
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

Swing Hand

🔗

Effect

Patterns:
Since: 2.5.1
Requirements: Minecraft 1.15.2+
Makes an entity swing their hand. This does nothing if the entity does not have an animation for swinging their hand.

Examples:

make player swing their main hand

Teleport

🔗

Effect

Patterns:
Since: 1.0
Teleport an entity to a specific location. 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.

Examples:

teleport the player to {homes.%player%}
teleport the attacker to the victim

Title - Reset

🔗

Effect

Patterns:
  • reset [the] title[s] [of %players%]
  • reset [the] %players%'[s] title[s]
Since: 2.3
Resets the title of the player to the default values.

Examples:

reset the titles of all players
reset the title

Title - Send

🔗

Effect

Patterns:
Since: 2.3
Sends a title/subtitle to the given player(s) with optional fadein/stay/fadeout times for Minecraft versions 1.11 and above.

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 "Competition Started" with subtitle "Have fun, Stay safe!" to player for 5 seconds
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

Toggle

🔗

Effect

Patterns:
  • (close|turn off|de[-]activate) %blocks%
  • (toggle|switch) [[the] state of] %blocks%
  • (open|turn on|activate) %blocks%
Since: 1.4
Toggle the state of a block.

Examples:

# use arrows to toggle switches, doors, etc.
on projectile hit:
    projectile is arrow
    toggle the block at the arrow

Toggle Flight

🔗

Effect

Patterns:
  • (allow|enable) (fly|flight) (for|to) %players%
  • (disallow|disable) (fly|flight) (for|to) %players%
Since: 2.3
Toggle the flight mode of a player.

Examples:

allow flight to event-player

Toggle Picking Up Items

🔗

Effect

Patterns:
Since: INSERT VERSION
Determines whether living entities are able to pick up items or not

Examples:

forbid player from picking up items
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

Tree

🔗

Effect

Patterns:
Since: 1.0
Creates a tree. 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:

grow a tall redwood tree above the clicked block

Vectors - Rotate Around Vector

🔗

Effect

Patterns:
Since: 2.2-dev28
Rotates one or more vectors around another vector

Examples:

rotate {_v} around vector 1, 0, 0 by 90

Vectors - Rotate around XYZ

🔗

Effect

Patterns:
Since: 2.2-dev28
Rotates one or more vectors around the x, y, or z axis by some amount of degrees

Examples:

rotate {_v} around x-axis by 90
rotate {_v} around y-axis by 90
rotate {_v} around z-axis by 90 degrees

Vehicle

🔗

Effect

Patterns:
  • (make|let|force) %entities% [to] (ride|mount) [(in|on)] %entities/entity types%
  • (make|let|force) %entities% [to] (dismount|(dismount|leave) [(from|of)] [(any|the[ir]|his|her)] vehicle[s])
  • (eject|dismount) [(any|the)] passenger[s] (of|from) %entities%
Since: 2.0
Makes an entity ride another entity, e.g. a minecart, a saddled pig, an arrow, etc.

Examples:

make the player ride a saddled pig
make the attacker ride the victim

op/deop

🔗

Effect

Patterns:
Since: 1.0
Grant/revoke a user operator state.

Examples:

op the player
deop all players

Spawn

🔗

EffectSection

Patterns:
Since: 1.0, 2.6.1 (with section)
Spawn a creature. This can be used as an effect and as a section. 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.

Examples:

spawn 3 creepers at the targeted block
spawn a ghast 5 meters above the player
spawn a zombie at the player:
    set name of the zombie to ""

Alphanumeric

🔗

Condition

Patterns:
  • %texts% (is|are) alphanumeric
  • %texts% (isn't|is not|aren't|are not) alphanumeric
Since: 2.4
Checks if the given string is alphanumeric.

Examples:

if the argument is not alphanumeric:
    send "Invalid name!"

Can Build

🔗

Condition

Patterns:
Since: 2.0
Requirements: Supported regions plugin
Tests whether a player is allowed to build at a certain location. This condition requires a supported regions plugin to be installed.

Examples:

command /setblock &lt;material&gt;:
    description: set the block at your crosshair to a different type
    trigger:
        player cannot build at the targeted block:
            message "You do not have permission to change blocks there!"
            stop
        set the targeted block to argument

Can Fly

🔗

Condition

Patterns:
Since: 2.3
Whether a player is allowed to fly.

Examples:

player can fly

Can Hold

🔗

Condition

Patterns:
Since: 1.0
Tests whether a player or a chest can hold the given item.

Examples:

block can hold 200 cobblestone
player has enough space for 64 feathers

Can Pick Up Items

🔗

Condition

Patterns:
Since: INSERT VERSION
Whether living entities are able to pick up items off the ground or not.

Examples:

if player can pick items up:
    send "You can pick up items!" to player

on drop:
    if player can't pick    up items:
        send "Be careful, you won't be able to pick that up!" to player

Can See

🔗

Condition

Patterns:
Since: 2.3
Checks whether the given players can see another players.

Examples:

if the player can't see the player-argument:
    message "&lt;light red&gt;The player %player-argument% is not online!"

Chance

🔗

Condition

Patterns:
Since: 1.0
A condition that randomly succeeds or fails. Valid values are between 0% and 100%, or if the percent sign is omitted between 0 and 1.

Examples:

chance of 50%:
    drop a diamond
chance of {chance}% # {chance} between 0 and 100
chance of {chance} # {chance} between 0 and 1

Comparison

🔗

Condition

Patterns:
  • [(neither)] %objects% ((is|are)[(n't| not| neither)] ((greater|more|higher|bigger|larger) than|above)|>) %objects%
  • [(neither)] %objects% ((is|are)[(n't| not| neither)] (greater|more|higher|bigger|larger|above) [than] or (equal to|the same as)|>=) %objects%
  • [(neither)] %objects% ((is|are)[(n't| not| neither)] ((less|smaller|lower) than|below)|<) %objects%
  • [(neither)] %objects% ((is|are)[(n't| not| neither)] (less|smaller|lower|below) [than] or (equal to|the same as)|<=) %objects%
  • [(neither)] %objects% ((is|are) (not|neither)|isn't|aren't|!=) [equal to] %objects%
  • [(neither)] %objects% (is|are|=) [(equal to|the same as)] %objects%
  • [(neither)] %objects% (is|are) between %objects% and %objects%
  • [(neither)] %objects% (is not|are not|isn't|aren't) between %objects% and %objects%
  • [(neither)] %objects% (was|were)[(n't| not| neither)] ((greater|more|higher|bigger|larger) than|above) %objects%
  • [(neither)] %objects% (was|were)[(n't| not| neither)] (greater|more|higher|bigger|larger|above) [than] or (equal to|the same as) %objects%
  • [(neither)] %objects% (was|were)[(n't| not| neither)] ((less|smaller|lower) than|below) %objects%
  • [(neither)] %objects% (was|were)[(n't| not| neither)] (less|smaller|lower|below) [than] or (equal to|the same as) %objects%
  • [(neither)] %objects% ((was|were) (not|neither)|wasn't|weren't) [equal to] %objects%
  • [(neither)] %objects% (was|were) [(equal to|the same as)] %objects%
  • [(neither)] %objects% (was|were) between %objects% and %objects%
  • [(neither)] %objects% (was not|were not|wasn't|weren't) between %objects% and %objects%
  • [(neither)] %objects% (will be|(will (not|neither) be|won't be)) ((greater|more|higher|bigger|larger) than|above) %objects%
  • [(neither)] %objects% (will be|(will (not|neither) be|won't be)) (greater|more|higher|bigger|larger|above) [than] or (equal to|the same as) %objects%
  • [(neither)] %objects% (will be|(will (not|neither) be|won't be)) ((less|smaller|lower) than|below) %objects%
  • [(neither)] %objects% (will be|(will (not|neither) be|won't be)) (less|smaller|lower|below) [than] or (equal to|the same as) %objects%
  • [(neither)] %objects% ((will (not|neither) be|won't be)|(isn't|aren't|is not|are not) (turning|changing) [in]to) [equal to] %objects%
  • [(neither)] %objects% (will be [(equal to|the same as)]|(is|are) (turning|changing) [in]to) %objects%
  • [(neither)] %objects% will be between %objects% and %objects%
  • [(neither)] %objects% (will not be|won't be) between %objects% and %objects%
Since: 1.0
A very general condition, it simply compares two values. Usually you can only compare for equality (e.g. block is/isn't of <type>), but some values can also be compared using greater than/less than. In that case you can also test for whether an object is between two others. Note: This is the only element where not all patterns are shown. It has actually another two sets of similar patters, but with (was|were) or will be instead of (is|are) respectively, which check different time states of the first expression.

Examples:

the clicked block is a stone slab or a double stone slab
time in the player's world is greater than 8:00
the creature is not an enderman or an ender dragon

Contains

🔗

Condition

Patterns:
Since: 1.0
Checks whether an inventory contains an item, a text contains another piece of text, or a list (e.g. {list variable::*} or 'drops') contains another object.

Examples:

block contains 20 cobblestone
player has 4 flint and 2 iron ingots
{list::*} contains 5

Damage Cause

🔗

Condition

Patterns:
  • [the] damage (was|is|has)[n('|o)t] [been] (caused|done|made) by %damage cause%
Since: 2.0
Tests what kind of damage caused a damage event. Refer to the Damage Cause type for a list of all possible causes.

Examples:

# make players use their potions of fire resistance whenever they take any kind of fire damage
on damage:
    damage was caused by lava, fire or burning
    victim is a player
    victim has a potion of fire resistance
    cancel event
    apply fire resistance to the victim for 30 seconds
    remove 1 potion of fire resistance from the victim
# prevent mobs from dropping items under certain circumstances
on death:
    entity is not a player
    damage wasn't caused by a block explosion, an attack, a projectile, a potion, fire, burning, thorns or poison
    clear drops

Do Respawn Anchors Work

🔗

Condition

Patterns:
  • respawn anchors [do[(n't| not)]] work in %worlds%
Since: 2.7
Requirements: Minecraft 1.16+
Checks whether or not respawn anchors work in a world.

Examples:

respawn anchors work in world "world_nether"

Egg Will Hatch

🔗

Condition

Patterns:
  • [the] egg (will|will not|won't) hatch
Since: 2.7
Usable in events: Egg Throw
Whether the egg will hatch in a Player Egg Throw event.

Examples:

on player egg throw:
    if an entity won't hatch:
        send "Better luck next time!" to the player

Entity Is Sheared

🔗

Condition

Patterns:
Since: INSERT VERSION
Requirements: MC 1.13+ (cows, sheep & snowmen), Paper 1.19.4+ (all shearable entities)
Checks whether entities are sheared. This condition only works on cows, sheep and snowmen for versions below 1.19.4.

Examples:

if targeted entity of player is sheared:
    send "This entity has nothing left to shear!" to player

Entity is Wet

🔗

Condition

Patterns:
Since: 2.6.1
Requirements: Paper 1.16+
Checks whether an entity is wet or not (in water, rain or a bubble column).

Examples:

if player is wet:

Entity is in Liquid

🔗

Condition

Patterns:
  • %entities% (is|are) in (water|lava|[a] bubble[ ]column|rain)
  • %entities% (isn't|is not|aren't|are not) in (water|lava|[a] bubble[ ]column|rain)
Since: 2.6.1
Requirements: Minecraft 1.16+ (in water), Paper 1.16+ (in rain, lava and bubble column)
Checks whether an entity is in rain, lava, water or a bubble column.

Examples:

if player is in rain:
if player is in water:
player is in lava:
player is in bubble column

Event Cancelled

🔗

Condition

Patterns:
  • [the] event is cancel[l]ed
  • [the] event (is not|isn't) cancel[l]ed
Since: 2.2-dev36
Checks whether or not the event is cancelled.

Examples:

on click:
    if event is cancelled:
        broadcast "no clicks allowed!"

Exists/Is Set

🔗

Condition

Patterns:
  • %~objects% (exist[s]|(is|are) set)
  • %~objects% (do[es](n't| not) exist|(is|are)(n't| not) set)
Since: 1.2
Checks whether a given expression or variable is set.

Examples:

{teams::%player's uuid%::preferred-team} is not set
on damage:
    projectile exists
    broadcast "%attacker% used a %projectile% to attack %victim%!"

Has AI

🔗

Condition

Patterns:
Since: 2.5
Checks whether an entity has AI.

Examples:

target entity has ai

Has Client Weather

🔗

Condition

Patterns:
  • %players% (has|have) [a] (client|custom) weather [set]
  • %players% (doesn't|does not|do not|don't) have [a] (client|custom) weather [set]
Since: 2.3
Checks whether the given players have a custom client weather

Examples:

if the player has custom weather:
    message "Your custom weather is %player's weather%"

Has Custom Model Data

🔗

Condition

Patterns:
  • %item types% (has|have) [custom] model data
  • %item types% (doesn't|does not|do not|don't) have [custom] model data
Since: 2.5
Requirements: 1.14+
Check if an item has a custom model data tag

Examples:

player's tool has custom model data

Has Item Cooldown

🔗

Condition

Patterns:
Since: INSERT VERSION
Check whether a cooldown is active on the specified material for a specific player.

Examples:

if player has player's tool on cooldown:
    send "You can't use this item right now. Wait %item cooldown of player's tool for player%"

Has Line of Sight

🔗

Condition

Patterns:
Since: INSERT VERSION
Checks whether living entities have an unobstructed line of sight to other entities or locations.

Examples:

player has direct line of sight to location 5 blocks to the right of player
victim has line of sight to attacker
player has no line of sight to location 100 blocks in front of player

Has Metadata

🔗

Condition

Patterns:
Since: 2.2-dev36
Checks whether a metadata holder has a metadata tag.

Examples:

if player has metadata value "healer":

Has Permission

🔗

Condition

Patterns:
Since: 1.0
Test whether a player has a certain permission.

Examples:

player has permission "skript.tree"
victim has the permission "admin":
    send "You're attacking an admin!" to attacker

Has Played Before

🔗

Condition

Patterns:
  • %offline players% [(has|have|did)] [already] play[ed] [on (this|the) server] (before|already)
  • %offline players% (has not|hasn't|have not|haven't|did not|didn't) [(already|yet)] play[ed] [on (this|the) server] (before|already|yet)
Since: 1.4, 2.7 (multiple players)
Checks whether a player has played on this server before. You can also use on first join if you want to make triggers for new players.

Examples:

player has played on this server before
player hasn't played before

Has Potion

🔗

Condition

Patterns:
Since: 2.6.1
Checks whether the given living entities have specific potion effects.

Examples:

if player has potion speed:
    send "You are sonic!"

if all players have potion effects speed and haste:
    broadcast "You are ready to MINE!"

Has Resource Pack

🔗

Condition

Patterns:
  • %players% (has|have) [a] resource pack [(loaded|installed)]
  • %players% (doesn't|does not|do not|don't) have [a] resource pack [(loaded|installed)]
Since: 2.4
Requirements: Paper 1.9 or newer
Checks whether the given players have a server resource pack loaded. Please note that this can't detect player's own resource pack, only the resource pack that sent by the server.

Examples:

if the player has a resource pack loaded:

Has Scoreboard Tag

🔗

Condition

Patterns:
  • %entities% (has|have) [the] score[ ]board tag[s] %texts%
  • %entities% (doesn't|does not|do not|don't) have [the] score[ ]board tag[s] %texts%
Since: 2.3
Checks whether the given entities has the given scoreboard tags.

Examples:

if the targeted armor stand has the scoreboard tag "test tag":

Ignition Process

🔗

Condition

Patterns:
  • [creeper[s]] %living entities% ((is|are)|(isn't|is not|aren't|are not)) going to explode
  • [creeper[s]] %living entities% ((is|are)|(isn't|is not|aren't|are not)) in the (ignition|explosion) process
  • creeper[s] %living entities% ((is|are)|(isn't|is not|aren't|are not)) ignited
Since: 2.5
Requirements: Paper 1.13 or newer
Checks if a creeper is going to explode.

Examples:

if the last spawned creeper is going to explode:
    loop all players in radius 3 of the last spawned creeper
        send "RUN!!!" to the loop-player

Is Alive

🔗

Condition

Patterns:
  • %entities% (is|are) (alive|dead)
  • %entities% (isn't|is not|aren't|are not) (alive|dead)
Since: 2.0, 2.4-alpha4 (non-living entity support)
Checks whether an entity is alive. Works for non-living entities too.

Examples:

if {villager-buddy::%player's uuid%} is not dead:

on shoot:
    while the projectile is alive:

Is Banned

🔗

Condition

Patterns:
Since: 1.4
Checks whether a player or IP is banned.

Examples:

player is banned
victim is not IP-banned
"127.0.0.1" is banned

Is Bed/Anchor Spawn

🔗

Condition

Patterns:
  • [the] respawn location (was|is)[(n'| no)t] [a] (bed|respawn anchor)
Since: 2.7
Usable in events: respawn
Requirements: Minecraft 1.16+
Checks what the respawn location of a player in the respawn event is.

Examples:

on respawn:
    the respawn location is a bed
    broadcast "%player% is respawning in their bed! So cozy!"

Is Block

🔗

Condition

Patterns:
  • %item types% (is|are) ([a] block|blocks)
  • %item types% (isn't|is not|aren't|are not) ([a] block|blocks)
Since: 2.4
Checks whether an item is a block.

Examples:

player's held item is a block
{list::*} are blocks

Is Block Redstone Powered

🔗

Condition

Patterns:
  • %blocks% (is|are) redstone powered
  • %blocks% (is|are) indirectly redstone powered
  • %blocks% (is|are)(n't| not) redstone powered
  • %blocks% (is|are)(n't| not) indirectly redstone powered
Since: 2.5
Checks if a block is indirectly or directly powered by redstone

Examples:

if clicked block is redstone powered:
    send "This block is well-powered by redstone!"
if clicked block is indirectly redstone powered:
    send "This block is indirectly redstone powered."

Is Blocking

🔗

Condition

Patterns:
  • %players% (is|are) (blocking|defending) [with [a] shield]
  • %players% (isn't|is not|aren't|are not) (blocking|defending) [with [a] shield]
Since: unknown (before 2.1)
Checks whether a player is blocking with their shield.

Examples:

on damage of player:
    victim is blocking
    damage attacker by 0.5 hearts

Is Burning

🔗

Condition

Patterns:
  • %entities% (is|are) (burning|ignited|on fire)
  • %entities% (isn't|is not|aren't|are not) (burning|ignited|on fire)
Since: 1.4.4
Checks whether an entity is on fire, e.g. a zombie due to being in sunlight, or any entity after falling into lava.

Examples:

# increased attack against burning targets
victim is burning:
    increase damage by 2

Is Charged

🔗

Condition

Patterns:
Since: 2.5
Checks if a creeper is charged (powered).

Examples:

if the last spawned creeper is charged:
    broadcast "A charged creeper is at %location of last spawned creeper%"

Is Climbing

🔗

Condition

Patterns:
Since: INSERT VERSION
Requirements: Minecraft 1.17+
Whether a living entity is climbing, such as a spider up a wall or a player on a ladder.

Examples:

spawn a spider at location of spawn
wait a second
if the last spawned spider is climbing:
    message"The spider is now climbing!"

Is Edible

🔗

Condition

Patterns:
Since: 2.2-dev36
Checks whether an item is edible.

Examples:

steak is edible
player's tool is edible

Is Empty

🔗

Condition

Patterns:
Since: unknown (before 2.1)
Checks whether an inventory, an inventory slot, or a text is empty.

Examples:

player's inventory is empty

Is Enchanted

🔗

Condition

Patterns:
Since: 1.4.6
Checks whether an item is enchanted.

Examples:

tool of the player is enchanted with efficiency 2
helm, chestplate, leggings or boots are enchanted

Is Flammable

🔗

Condition

Patterns:
Since: 2.2-dev36
Checks whether an item is flammable.

Examples:

wood is flammable
player's tool is flammable

Is Flying

🔗

Condition

Patterns:
  • %players% (is|are) flying
  • %players% (isn't|is not|aren't|are not) flying
Since: 1.4.4
Checks whether a player is flying.

Examples:

player is not flying

Is Frozen

🔗

Condition

Patterns:
Since: 2.7
Checks whether an entity is frozen.

Examples:

if player is frozen:
    kill player

Is Fuel

🔗

Condition

Patterns:
Since: 2.5.1
Requirements: Minecraft 1.11.2+
Checks whether an item can be used as fuel in a furnace.

Examples:

on right click on furnace:
    if player's tool is not fuel:
        send "Please hold a valid fuel item in your hand"
        cancel event

Is Gliding

🔗

Condition

Patterns:
Since: 2.7
Checks whether a living entity is gliding.

Examples:

if player is gliding

Is Holding

🔗

Condition

Patterns:
Since: 1.0
Checks whether a player is holding a specific item. Cannot be used with endermen, use 'entity is [not] an enderman holding <item type>' instead.

Examples:

player is holding a stick
victim isn't holding a sword of sharpness

Is Incendiary

🔗

Condition

Patterns:
  • %entities% ((is|are) incendiary|cause[s] a[n] (incendiary|fiery) explosion)
  • %entities% ((is not|are not|isn't|aren't) incendiary|(does not|do not|doesn't|don't) cause[s] a[n] (incendiary|fiery) explosion)
  • the [event(-| )]explosion (is|(is not|isn't)) (incendiary|fiery)
Since: 2.5
Checks if an entity will create fire when it explodes. This condition is also usable in an explosion prime event.

Examples:

on explosion prime:
    if the explosion is fiery:
        broadcast "A fiery explosive has been ignited!"

Is Infinite

🔗

Condition

Patterns:
Since: 2.7
Checks whether potion effects are infinite.

Examples:

all of the active potion effects of the player are infinite

Is Interactable

🔗

Condition

Patterns:
Since: 2.5.2
Requirements: Minecraft 1.13+
Checks wether or not a block is interactable.

Examples:

on block break:
    if event-block is interactable:
        cancel event
        send "You cannot break interactable blocks!"

Is Invisible

🔗

Condition

Patterns:
Since: 2.7
Checks whether a living entity is invisible.

Examples:

target entity is invisible

Is Invulnerable

🔗

Condition

Patterns:
  • %entities% (is|are) invulnerable
  • %entities% (isn't|is not|aren't|are not) invulnerable
Since: 2.5
Checks whether an entity is invulnerable.

Examples:

target entity is invulnerable

Is Jumping

🔗

Condition

Patterns:
Since: INSERT VERSION
Requirements: Paper 1.15+
Checks whether a living entity is jumping. This condition does not work on players.

Examples:

on spawn of zombie:
    while event-entity is not jumping:
        wait 5 ticks
    push event-entity upwards

Is Leashed

🔗

Condition

Patterns:
Since: 2.5
Checks to see if an entity is currently leashed.

Examples:

target entity is leashed

Is Loaded

🔗

Condition

Patterns:
Since: 2.3, 2.5 (revamp with chunk at location/coords)
Checks whether or not a chunk/world is loaded. 'chunk at 1, 1' uses chunk coords, which are location coords divided by 16.

Examples:

if chunk at {home::%player's uuid%} is loaded:
if chunk 1, 10 in world "world" is loaded:
if world("lobby") is loaded:

Is Member/Owner of Region

🔗

Condition

Patterns:
Since: 2.1
Requirements: Supported regions plugin
Checks whether a player is a member or owner of a particular region. This condition requires a supported regions plugin to be installed.

Examples:

on region enter:
    player is the owner of the region
    message "Welcome back to %region%!"
    send "%player% just entered %region%!" to all members of the region

Is Normalized

🔗

Condition

Patterns:
  • %vectors% (is|are) normalized
  • %vectors% (isn't|is not|aren't|are not) normalized
Since: 2.5.1
Requirements: Minecraft 1.13.2+
Checks whether a vector is normalized i.e. length of 1

Examples:

vector of player's location is normalized

Is Occluding

🔗

Condition

Patterns:
Since: 2.5.1
Checks whether an item is a block and completely blocks vision.

Examples:

player's tool is occluding

Is Online

🔗

Condition

Patterns:
Since: 1.4
Checks whether a player is online.

Examples:

player is online
player-argument is offline

Is Operator

🔗

Condition

Patterns:
Since: 2.7
Checks whether a player is a server operator.

Examples:

player is an operator

Is Passable

🔗

Condition

Patterns:
  • %blocks% (is|are) passable
  • %blocks% (isn't|is not|aren't|are not) passable
Since: 2.5.1
Requirements: Minecraft 1.13.2+
Checks whether a block is passable. A block is passable if it has no colliding parts that would prevent players from moving through it. Blocks like tall grass, flowers, signs, etc. are passable, but open doors, fence gates, trap doors, etc. are not because they still have parts that can be collided with.

Examples:

if player's targeted block is passable

Is Plugin Enabled

🔗

Condition

Patterns:
  • plugin[s] %texts% (is|are) enabled
  • plugin[s] %texts% (is|are)(n't| not) enabled
  • plugin[s] %texts% (is|are) disabled
Since: 2.6
Check if a plugin is enabled/disabled on the server. Plugin names can be found in the plugin's 'plugin.yml' file or by using the '/plugins' command, they are NOT the name of the plugin's jar file. When checking if a plugin is not enabled, this will return true if the plugin is either disabled or not on the server. When checking if a plugin is disabled, this will return true if the plugin is on the server and is disabled.

Examples:

if plugin "Vault" is enabled:
if plugin "WorldGuard" is not enabled:
if plugins "Essentials" and "Vault" are enabled:
if plugin "MyBrokenPlugin" is disabled:

Is Poisoned

🔗

Condition

Patterns:
Since: 1.4.4
Checks whether an entity is poisoned.

Examples:

player is poisoned:
    cure the player from poison
    message "You have been cured!"

Is Preferred Tool

🔗

Condition

Patterns:
Since: 2.7
Requirements: 1.16.5+, Paper 1.19.2+ (blockdata)
Checks whether an item is the preferred tool for a block. A preferred tool is one that will drop the block's item when used. For example, a wooden pickaxe is a preferred tool for grass and stone blocks, but not for iron ore.

Examples:

on left click:
    event-block is set
    if player's tool is the preferred tool for event-block:
        break event-block naturally using player's tool
    else:
        cancel event

Is Riding

🔗

Condition

Patterns:
Since: 2.0
Tests whether an entity is riding another or is in a vehicle.

Examples:

player is riding a saddled pig

Is Riptiding

🔗

Condition

Patterns:
Since: 2.5
Checks to see if an entity is currently using the Riptide enchantment.

Examples:

target entity is riptiding

Is Script Loaded

🔗

Condition

Patterns:
  • script[s] [%texts%] (is|are) loaded
  • script[s] [%texts%] (isn't|is not|aren't|are not) loaded
Since: 2.2-dev31
Check if the current script, or another script, is currently loaded.

Examples:

script is loaded
script "example.sk" is loaded

Is Silent

🔗

Condition

Patterns:
Since: 2.5
Checks whether an entity is silent i.e. its sounds are disabled.

Examples:

target entity is silent

Is Sleeping

🔗

Condition

Patterns:
  • %players% (is|are) sleeping
  • %players% (isn't|is not|aren't|are not) sleeping
Since: 1.4.4
Checks whether a player is sleeping.

Examples:

# cut your enemies' throats in their sleep >=)
on attack:
    attacker is holding a sword
    victim is sleeping
    increase the damage by 1000

Is Slime Chunk

🔗

Condition

Patterns:
  • %chunk% (is|are) ([a] slime chunk|slime chunks|slimey)
  • %chunk% (isn't|is not|aren't|are not) ([a] slime chunk|slime chunks|slimey)
Since: 2.3
Tests whether a chunk is a so-called slime chunk. Slimes can generally spawn in the swamp biome and in slime chunks. For more info, see the Minecraft wiki.

Examples:

command /slimey:
    trigger:
        if chunk at player is a slime chunk:
            send "Yeah, it is!"
        else:
            send "Nope, it isn't"

Is Sneaking

🔗

Condition

Patterns:
  • %players% (is|are) sneaking
  • %players% (isn't|is not|aren't|are not) sneaking
Since: 1.4.4
Checks whether a player is sneaking.

Examples:

# prevent mobs from seeing sneaking players if they are at least 4 meters apart
on target:
    target is sneaking
    distance of target and the entity is bigger than 4
    cancel the event

Is Solid

🔗

Condition

Patterns:
Since: 2.2-dev36
Checks whether an item is solid.

Examples:

grass block is solid
player's tool isn't solid

Is Sprinting

🔗

Condition

Patterns:
  • %players% (is|are) sprinting
  • %players% (isn't|is not|aren't|are not) sprinting
Since: 1.4.4
Checks whether a player is sprinting.

Examples:

player is not sprinting

Is Stackable

🔗

Condition

Patterns:
Since: 2.7
Checks whether an item is stackable.

Examples:

diamond axe is stackable
birch wood is stackable
torch is stackable

Is Swimming

🔗

Condition

Patterns:
Since: 2.3
Requirements: 1.13 or newer
Checks whether a living entity is swimming.

Examples:

player is swimming

Is Tameable

🔗

Condition

Patterns:
Since: 2.5
Check if an entity is tameable.

Examples:

on damage:
    if victim is tameable:
        cancel event

Is Transparent

🔗

Condition

Patterns:
Since: 2.2-dev36
Checks whether an item is transparent. Note that this condition may not work for all blocks, due to the transparency list used by Spigot not being completely accurate.

Examples:

player's tool is transparent.

Is Unbreakable

🔗

Condition

Patterns:
Since: 2.5.1
Requirements: Minecraft 1.11+
Checks whether an item is unbreakable.

Examples:

if event-item is unbreakable

Is Valid

🔗

Condition

Patterns:
Since: 2.7
Checks whether an entity has died or been despawned for some other reason.

Examples:

if event-entity is valid

Is Wearing

🔗

Condition

Patterns:
Since: 1.0
Checks whether a player is wearing some armour.

Examples:

player is wearing an iron chestplate and iron leggings
player is wearing all diamond armour

Is Whitelisted

🔗

Condition

Patterns:
  • [the] server (is|is(n't| not)) white[ ]listed
  • %players% (is|are)[(n't| not)] white[ ]listed
Since: 2.5.2
Whether or not the server or a player is whitelisted.

Examples:

if server is whitelisted:
if player is whitelisted

Is Within

🔗

Condition

Patterns:
Since: 2.7
Requirements: MC 1.17+ (within block)
Whether a location is within something else. The "something" can be a block, an entity, a chunk, a world, or a cuboid formed by two other locations. Note that using the is between condition will refer to a straight line between locations, while this condition will refer to the cuboid between locations.

Examples:

if player's location is within {_loc1} and {_loc2}:
    send "You are in a PvP zone!" to player

if player is in world("world"):
    send "You are in the overworld!" to player

if attacker's location is inside of victim:
    cancel event
    send "Back up!" to attacker and victim

Is Within Radius

🔗

Condition

Patterns:
Since: 2.7
Checks whether a location is within a certain radius of another location.

Examples:

on damage:
    if attacker's location is within 10 blocks around {_spawn}:
        cancel event
        send "You can't PVP in spawn."

Is a Skript command

🔗

Condition

Patterns:
  • %text% (is|are) [a] s(k|c)ript (command|cmd)
  • %text% (isn't|is not|aren't|are not) [a] s(k|c)ript (command|cmd)
Since: 2.6
Checks whether a command/string is a custom Skript command.

Examples:

# Example 1
on command:
    command is a skript command

# Example 2
"sometext" is a skript command

Is of Type

🔗

Condition

Patterns:
Since: 1.4
Checks whether an item of an entity is of the given type. This is mostly useful for variables, as you can use the general 'is' condition otherwise (e.g. 'victim is a creeper').

Examples:

tool is of type {selected type}
victim is of type {villager type}

Is on Ground

🔗

Condition

Patterns:
  • %entities% (is|are) on [the] ground
  • %entities% (isn't|is not|aren't|are not) on [the] ground
Since: 2.2-dev26
Checks whether an entity is on ground.

Examples:

player is not on ground

Left Handed

🔗

Condition

Patterns:
Since: INSERT VERSION
Requirements: Paper 1.17.1+ (entities)
Checks if living entities or players are left or right-handed. Armor stands are neither right nor left-handed. Paper 1.17.1+ is required for non-player entities.

Examples:

on damage of player:
    if victim is left handed:
        cancel event

Matches

🔗

Condition

Patterns:
  • %texts% (match[es]|do[es](n't| not) match) %texts%
  • %texts% (partially match[es]|do[es](n't| not) partially match) %texts%
Since: 2.5.2
Checks whether the defined strings match the input regexes (Regular expressions).

Examples:

on chat:
    if message partially matches "\d":
        send "Message contains a digit!"
    if message doesn't match "[A-Za-z]+":
        send "Message doesn't only contain letters!"

PvP

🔗

Condition

Patterns:
  • (is PvP|PvP is) enabled [in %worlds%]
  • (is PvP|PvP is) disabled [in %worlds%]
Since: 1.3.4
Checks the PvP state of a world.

Examples:

PvP is enabled
PvP is disabled in "world"

Region Contains

🔗

Condition

Patterns:
Since: 2.1
Requirements: Supported regions plugin
Checks whether a location is contained in a particular region. This condition requires a supported regions plugin to be installed.

Examples:

player is in the region {regions::3}

on region enter:
    region contains {flags.%world%.red}
    message "The red flag is near!"

Resource Pack

🔗

Condition

Patterns:
Since: 2.4
Usable in events: resource pack request response
Checks state of the resource pack in a resource pack request response event.

Examples:

on resource pack response:
    if the resource pack wasn't accepted:
        kick the player due to "You have to install the resource pack to play in this server!"

Running Minecraft

🔗

Condition

Patterns:
  • running [below] minecraft %text%
Since: 2.5
Checks if current Minecraft version is given version or newer.

Examples:

running minecraft "1.14"

Starts/Ends With

🔗

Condition

Patterns:
  • %texts% (start|end)[s] with %texts%
  • %texts% (doesn't|does not|do not|don't) (start|end) with %texts%
Since: 2.2-dev36, 2.5.1 (multiple strings support)
Checks if a text starts or ends with another.

Examples:

if the argument starts with "test" or "debug":
    send "Stop!"

Time

🔗

Condition

Patterns:
Since: 2.0
Tests whether a given real time was more or less than some time span ago.

Examples:

command /command-with-cooldown:
    trigger:
        {command::%player's uuid%::last-usage} was less than a minute ago:
            message "Please wait a minute between uses of this command."
            stop
        set {command::%player's uuid%::last-usage} to now
        # ... actual command trigger here ...

Conditionals

🔗

Section

Patterns:
  • else
  • else [parse] if <.+>
  • else [parse] if (any|at least one [of])
  • else [parse] if [all]
  • [parse] if (any|at least one [of])
  • [parse] if [all]
  • [parse] if <.+>
  • then [run]
  • implicit:<.+>
Since: 1.0
Conditional sections if: executed when its condition is true else if: executed if all previous chained conditionals weren't executed, and its condition is true else: executed if all previous chained conditionals weren't executed

parse if: a special case of 'if' condition that its code will not be parsed if the condition is not true else parse if: another special case of 'else if' condition that its code will not be parsed if all previous chained conditionals weren't executed, and its condition is true

Examples:

if player's health is greater than or equal to 4:
    send "Your health is okay so far but be careful!"

else if player's health is greater than 2:
    send "You need to heal ASAP, your health is very low!"

else: # Less than 2 hearts
    send "You are about to DIE if you don't heal NOW. You have only %player's health% heart(s)!"

parse if plugin "SomePluginName" is enabled: # parse if %condition%
    # This code will only be executed if the condition used is met otherwise Skript will not parse this section therefore will not give any errors/info about this section

Loop

🔗

Section

Patterns:
Since: 1.0
Loop sections repeat their code with multiple values.

A loop will loop through all elements of the given expression, e.g. all players, worlds, items, etc. The conditions & effects inside the loop will be executed for every of those elements, which can be accessed with ‘loop-’, e.g. send "hello" to loop-player. When a condition inside a loop is not fulfilled the loop will start over with the next element of the loop. You can however use stop loop to exit the loop completely and resume code execution after the end of the loop.

Loopable Values All expressions that represent more than one value, e.g. ‘all players’, ‘worlds’, etc., as well as list variables, can be looped. You can also use a list of expressions, e.g. loop the victim and the attacker, to execute the same code for only a few values.

List Variables When looping list variables, you can also use loop-index in addition to loop-value inside the loop. loop-value is the value of the currently looped variable, and loop-index is the last part of the variable's name (the part where the list variable has its asterisk *).

Examples:

loop all players:
    send "Hello %loop-player%!" to loop-player

loop items in player's inventory:
    if loop-item is dirt:
        set loop-item to air

loop 10 times:
    send title "%11 - loop-value%" and subtitle "seconds left until the game begins" to player for 1 second # 10, 9, 8 etc.
    wait 1 second

loop {Coins::*}:
    set {Coins::%loop-index%} to loop-value + 5 # Same as "add 5 to {Coins::%loop-index%}" where loop-index is the uuid of the player and loop-value is the actually coins value such as 200

While Loop

🔗

Section

Patterns:
  • [do] while <.+>
Since: 2.0, 2.6 (do while)
While Loop sections are loops that will just keep repeating as long as a condition is met.

Examples:

while size of all players < 5:
    send "More players are needed to begin the adventure" to all players
    wait 5 seconds

set {_counter} to 1
do while {_counter} > 1: # false but will increase {_counter} by 1 then get out
    add 1 to {_counter}

# Be careful when using while loops with conditions that are almost
# always true for a long time without using 'wait %timespan%' inside it,
# otherwise it will probably hang and crash your server.
while player is online:
    give player 1 dirt
    wait 1 second # without using a delay effect the server will crash

At Time

🔗

Event

Patterns:
Since: 1.3.4
An event that occurs at a given minecraft time in every world or only in specific worlds.

Examples:

at 18:00
at 7am in "world"

On Anvil Damage

🔗

Event

Patterns:
  • [on] anvil damag(e|ing)
Since: 2.7
Requirements: Paper
Called when an anvil is damaged/broken from being used to repair/rename items. Note: this does not include anvil damage from falling.

Examples:

on anvil damage:
    cancel the event

On Anvil Prepare

🔗

Event

Patterns:
  • [on] anvil prepar(e|ing)
Since: 2.7
Called when an item is put in a slot for repair by an anvil. Please note that this event is called multiple times in a single item slot move.

Examples:

on anvil prepare:
    event-item is set # result item
    chance of 5%:
        set repair cost to repair cost * 50%
        send "You're LUCKY! You got 50% discount." to player

On AoE Cloud Effect

🔗

Event

Patterns:
  • [on] (area|AoE) [cloud] effect
Since: 2.2-dev21
Called when area effect cloud applies its potion effect. This happens every 5 ticks by default.

Examples:

on area cloud effect:

On Arm Swing

🔗

Event

Patterns:
  • [on] [player] arm swing
Since: 2.5.1
Called when a player swings their arm.

Examples:

on arm swing:
    send "You swung your arm!"

On Armor Change

🔗

Event

Patterns:
  • [on] [player] armor change[d]
Since: 2.5
Requirements: Paper
Called when armor pieces of a player are changed.

Examples:

on armor change:
    send "You equipped %event-item%!"

On Bed Enter

🔗

Event

Patterns:
  • [on] bed enter[ing]
  • [on] [player] enter[ing] [a] bed
Since: 1.0
Called when a player starts sleeping.

Examples:

on bed enter:

On Bed Leave

🔗

Event

Patterns:
  • [on] bed leav(e|ing)
  • [on] [player] leav(e|ing) [a] bed
Since: 1.0
Called when a player leaves a bed.

Examples:

on player leaving a bed:

On Block Damage

🔗

Event

Patterns:
  • [on] block damag(ing|e)
Since: 1.0
Called when a player starts to break a block. You can usually just use the leftclick event for this.

Examples:

on block damaging:
    if block is log:
        send "You can't break the holy log!"

On Block Fertilize

🔗

Event

Patterns:
  • [on] [block] fertilize
Since: 2.5
Requirements: Minecraft 1.13 or newer
Called when a player fertilizes blocks.

Examples:

on block fertilize:
    send "Fertilized %size of fertilized blocks% blocks got fertilized."

On Block Growth

🔗

Event

Patterns:
  • [on] (plant|crop|block) grow[(th|ing)] [[of] %item types%]
Since: 2.2-Fixes-V10
Called when a crop grows. Alternative to new form of generic grow event.

Examples:

on crop growth:

On Book Edit

🔗

Event

Patterns:
  • [on] book (edit|change|write)
Since: 2.2-dev31
Called when a player edits a book.

Examples:

on book edit:

On Book Sign

🔗

Event

Patterns:
  • [on] book sign[ing]
Since: 2.2-dev31
Called when a player signs a book.

Examples:

on book sign:

On Break / Mine

🔗

Event

Patterns:
Since: 1.0 (break), unknown (mine), 2.6 (BlockData support)
Called when a block is broken by a player. If you use 'on mine', only events where the broken block dropped something will call the trigger.

Examples:

on mine:
on break of stone:
on mine of any ore:
on break of chest[facing=north]:
on break of potatoes[age=7]:

On Bucket Empty

🔗

Event

Patterns:
  • [on] bucket empty[ing]
  • [on] [player] empty[ing] [a] bucket
Since: 1.0
Called when a player empties a bucket. You can also use the place event with a check for water or lava.

Examples:

on bucket empty:

On Bucket fill

🔗

Event

Patterns:
  • [on] bucket fill[ing]
  • [on] [player] fill[ing] [a] bucket
Since: 1.0
Called when a player fills a bucket.

Examples:

on player filling a bucket:

On Burn

🔗

Event

Patterns:
Since: 1.0, 2.6 (BlockData support)
Called when a block is destroyed by fire.

Examples:

on burn:
on burn of wood, fences, or chests:
on burn of oak_log[axis=y]:

On Can Build Check

🔗

Event

Patterns:
  • [on] [block] can build check
Since: 1.0 (basic), 2.0 ([un]cancellable)
Called when a player rightclicks on a block while holding a block or a placeable item. You can either cancel the event to prevent the block from being built, or uncancel it to allow it. Please note that the data value of the block to be placed is not available in this event, only its ID.

Examples:

on block can build check:
    cancel event

On Chat

🔗

Event

Patterns:
  • [on] chat
Since: 1.4.1
Called whenever a player chats. Use chat format to change message format. Use chat recipients to edit chat recipients.

Examples:

on chat:
    if player has permission "owner":
        set chat format to "&amp;lt;red&amp;gt;[player]&amp;lt;light gray&amp;gt;: &amp;lt;light red&amp;gt;[message]"
    else if player has permission "admin":
        set chat format to "&amp;lt;light red&amp;gt;[player]&amp;lt;light gray&amp;gt;: &amp;lt;orange&amp;gt;[message]"
    else: #default message format
        set chat format to "&amp;lt;orange&amp;gt;[player]&amp;lt;light gray&amp;gt;: &amp;lt;white&amp;gt;[message]"

On Chunk Generate

🔗

Event

Patterns:
  • [on] chunk (generat|populat)(e|ing)
Since: 1.0
Called after a new chunk was generated.

Examples:

on chunk generate:

On Chunk Load

🔗

Event

Patterns:
  • [on] chunk load[ing]
Since: 1.0
Called when a chunk loads. The chunk might or might not contain mobs when it's loaded.

Examples:

on chunk load:

On Chunk Unload

🔗

Event

Patterns:
  • [on] chunk unload[ing]
Since: 1.0
Called when a chunk is unloaded due to not being near any player.

Examples:

on chunk unload:

On Click

🔗

Event

Patterns:
Since: 1.0
Called when a user clicks on a block, an entity or air with or without an item in their hand. Please note that rightclick events with an empty hand while not looking at a block are not sent to the server, so there's no way to detect them. Also note that a leftclick on an entity is an attack and thus not covered by the 'click' event, but the 'damage' event.

Examples:

on click:
on rightclick holding a fishing rod:
on leftclick on a stone or obsidian:
on rightclick on a creeper:
on click with a sword:

On Combust

🔗

Event

Patterns:
  • [on] combust[ing]
Since: 1.0
Called when an entity is set on fire, e.g. by fire or lava, a fireball, or by standing in direct sunlight (zombies, skeletons).

Examples:

on combust:

On Command

🔗

Event

Patterns:
  • [on] command [%text%]
Since: 2.0
Called when a player enters a command (not necessarily a Skript command) but you can check if command is a skript command, see Is a Skript command condition.

Examples:

on command:
on command "/stop":
on command "pm Njol ":

On Connect

🔗

Event

Patterns:
  • [on] [player] connect[ing]
Since: 2.0
Called when the player connects to the server. This event is called before the player actually joins the server, so if you want to prevent players from joining you should prefer this event over on join.

Examples:

on connect:
    player doesn't have permission "VIP"
    number of players is greater than 15
    kick the player due to "The last 5 slots are reserved for VIP players."

On Consume

🔗

Event

Patterns:
  • [on] [player] ((eat|drink)[ing]|consum(e|ing)) [[of] %item types%]
Since: 2.0
Called when a player is done eating/drinking something, e.g. an apple, bread, meat, milk or a potion.

Examples:

on consume:

On Craft

🔗

Event

Patterns:
Since: unknown (before 2.1)
Called when a player crafts an item.

Examples:

on craft:

On Creeper Power

🔗

Event

Patterns:
  • [on] creeper power
Since: 1.0
Called when a creeper is struck by lighting and gets powered. Cancel the event to prevent the creeper from being powered.

Examples:

on creeper power:

On Damage

🔗

Event

Patterns:
Since: 1.0, 2.7 (by entity)
Called when an entity receives damage, e.g. by an attack from another entity, lava, fire, drowning, fall, suffocation, etc.

Examples:

on damage:
on damage of a player:
on damage of player by zombie:

On Death

🔗

Event

Patterns:
Since: 1.0
Called when a living entity (including players) dies.

Examples:

on death:
on death of player:
on death of a wither or ender dragon:
    broadcast "A %entity% has been slain in %world%!"

On Dispense

🔗

Event

Patterns:
Since: unknown (before 2.1)
Called when a dispenser dispenses an item.

Examples:

on dispense of iron block:
    send "that'd be 19.99 please!"

On Drop

🔗

Event

Patterns:
  • [on] [player|entity] drop[ping] [[of] %item types%]
Since: unknown (before 2.1), 2.7 (entity)
Called when a player drops an item from their inventory, or an entity drops an item, such as a chicken laying an egg.

Examples:

on drop:
    if event-item is compass:
        cancel event

on entity drop of an egg:
    if event-entity is a chicken:
        set item of event-dropped item to a diamond

On Egg Throw

🔗

Event

Patterns:
  • [on] throw[ing] [of] [an] egg
  • [on] [player] egg throw
Since: 1.0
Called when a player throws an egg and it lands. You can just use the shoot event in most cases. However, this event allows modification of properties like the hatched entity type and the number of entities to hatch.

Examples:

on throw of an egg:

On Enchant

🔗

Event

Patterns:
  • [on] [item] enchant
Since: 2.5
Called when a player successfully enchants an item. To get the enchanted item, see the enchant item expression

Examples:

on enchant:
    if the clicked button is 1: # offer 1
        set the applied enchantments to sharpness 10 and unbreaking 10

On Enchant Prepare

🔗

Event

Patterns:
  • [on] [item] enchant prepare
Since: 2.5
Called when a player puts an item into enchantment table. This event may be called multiple times. To get the enchant item, see the enchant item expression

Examples:

on enchant prepare:
    set enchant offer 1 to sharpness 1
    set the cost of enchant offer 1 to 10 levels

On Enderman/Sheep/Silverfish/Falling Block

🔗

Event

Patterns:
  • [on] enderman place
  • [on] enderman pickup
  • [on] sheep eat
  • [on] silverfish enter
  • [on] silverfish exit
  • [on] falling block fall[ing]
  • [on] falling block land[ing]
  • [on] (entity|%*-entitydatas%) chang(e|ing) block[s]
Since: unknown, 2.5.2 (falling block), INSERT VERSION (any entity support)
Called when an enderman places or picks up a block, a sheep eats grass, a silverfish boops into/out of a block or a falling block lands and turns into a block respectively. event-block represents the old block and event-blockdata represents the new replacement that'll be applied to the block.

Examples:

on sheep eat:
    kill event-entity
    broadcast "A sheep stole some grass!"

on falling block land:
    event-entity is a falling dirt
    cancel event

On Entity Dismount

🔗

Event

Patterns:
  • [on] dismount[ing]
Since: 2.2-dev13b
Called when an entity dismounts.

Examples:

on dismount:
    kill event-entity

On Entity Jump

🔗

Event

Patterns:
  • [on] entity jump[ing]
Since: 2.7
Requirements: Paper 1.15.2+
Called when an entity jumps.

Examples:

on entity jump:
    if entity is a wither skeleton:
        cancel event

On Entity Mount

🔗

Event

Patterns:
  • [on] mount[ing]
Since: 2.2-dev13b
Called when entity starts riding another.

Examples:

on mount:
    cancel event

On Entity Portal

🔗

Event

Patterns:
  • [on] entity portal
Since: 2.5.3
Called when an entity uses a nether or end portal. Cancel the event to prevent the entity from teleporting.

Examples:

on entity portal:
    broadcast "A %type of event-entity% has entered a portal!

On Experience Change

🔗

Event

Patterns:
  • [on] [player] (level progress|[e]xp|experience) (change|update|increase|decrease)
Since: 2.7
Called when a player's experience changes.

Examples:

on level progress change:
    set {_xp} to event-experience
    broadcast "%{_xp}%"

On Experience Spawn

🔗

Event

Patterns:
  • [on] [e]xp[erience] [orb] spawn
  • [on] spawn of [a[n]] [e]xp[erience] [orb]
Since: 2.0
Called whenever experience is about to spawn. Please note that this event will not fire for xp orbs spawned by plugins (including Skript) with Bukkit.

Examples:

on xp spawn:
    world is "minigame_world"
    cancel event

On Explode

🔗

Event

Patterns:
  • [on] explo(d(e|ing)|sion)
Since: 1.0
Called when an entity (a primed TNT or a creeper) explodes.

Examples:

on explosion:

On Explosion Prime

🔗

Event

Patterns:
  • [on] explosion prime
Since: 1.0
Called when an explosive is primed, i.e. an entity will explode shortly. Creepers can abort the explosion if the player gets too far away, while TNT will explode for sure after a short time.

Examples:

on explosion prime:

On Fade

🔗

Event

Patterns:
Since: 1.0, 2.6 (BlockData support)
Called when a block 'fades away', e.g. ice or snow melts.

Examples:

on fade of snow or ice:
on fade of snow[layers=2]

On Firework Explode

🔗

Event

Patterns:
  • [on] [a] firework explo(d(e|ing)|sion) [colo[u]red %colors%]
Since: 2.4
Called when a firework explodes.

Examples:

on firework explode
on firework exploding colored red, light green and black
on firework explosion colored light green:
    broadcast "A firework colored %colors% was exploded at %location%!"

On First Join

🔗

Event

Patterns:
  • [on] first (join|login)
Since: 1.3.7
Called when a player joins the server for the first time.

Examples:

on first join:
    broadcast "Welcome %player% to the server!"

On Fishing

🔗

Event

Patterns:
  • [on] [player] fish[ing]
Since: 1.0
Called when a player fishes something. This is not of much use yet.

Examples:

on fish:

On Flight Toggle

🔗

Event

Patterns:
  • [on] [player] flight toggl(e|ing)
  • [on] [player] toggl(e|ing) flight
Since: 2.2-dev36
Called when a players stops/starts flying.

Examples:

on flight toggle:
    if {game::%player%::playing} exists:
        cancel event

On Flow

🔗

Event

Patterns:
  • [on] [block] flow[ing]
  • [on] block mov(e|ing)
Since: 1.0
Called when a blocks flows or teleports to another block. This not only applies to water and lava, but teleporting dragon eggs as well.

Examples:

on block flow:
    if event-block is water:
        broadcast "Build more dams! It's starting to get wet in here"

On Form

🔗

Event

Patterns:
Since: 1.0, 2.6 (BlockData support)
Called when a block is created, but not by a player, e.g. snow forms due to snowfall, water freezes in cold biomes. This isn't called when block spreads (mushroom growth, water physics etc.), as it has its own event (see spread event).

Examples:

on form of snow:
on form of a mushroom:

On Fuel Burn

🔗

Event

Patterns:
  • [on] fuel burn[ing]
Since: 1.0
Called when a furnace burns an item from its fuel slot.

Examples:

on fuel burning:

On Gamemode Change

🔗

Event

Patterns:
  • [on] game[ ]mode change [to %gamemode%]
Since: 1.0
Called when a player's gamemode changes.

Examples:

on gamemode change:
on gamemode change to adventure:

On Gliding State Change

🔗

Event

Patterns:
  • [on] (gliding state change|toggl(e|ing) gliding)
Since: 2.2-dev21
Called when an entity toggles glider on or off, or when server toggles gliding state of an entity forcibly.

Examples:

on toggling gliding:
    cancel the event # bad idea, but you CAN do it!

On Grow

🔗

Event

Patterns:
Since: 1.0, 2.2-dev20 (plants), INSERT VERSION (from, into, blockdata)
Called when a tree, giant mushroom or plant grows to next stage. "of" matches any grow event, "from" matches only the old state, "into" matches only the new state,and "from into" requires matching both the old and new states. Using "and" lists in this event is equivalent to using "or" lists. The event will trigger if any one of the elements is what grew.

Examples:

on grow:
on grow of tree:
on grow of wheat[age=7]:
on grow from a sapling:
on grow into tree:
on grow from a sapling into tree:
on grow of wheat, carrots, or potatoes:
on grow into tree, giant mushroom, cactus:
on grow from wheat[age=0] to wheat[age=1] or wheat[age=2]:

On Hand Item Swap

🔗

Event

Patterns:
  • [on] swap[ping of] [(hand|held)] item[s]
Since: 2.3
Called whenever a player swaps the items in their main- and offhand slots. Works also when one or both of the slots are empty. The event is called before the items are actually swapped, so when you use the player's tool or player's offtool expressions, they will return the values before the swap - this enables you to cancel the event before anything happens.

Examples:

on swap hand items:
    event-player's tool is a diamond sword
    cancel event

On Heal

🔗

Event

Patterns:
  • [on] heal[ing]
Since: 1.0
Called when an entity is healed, e.g. by eating (players), being fed (pets), or by the effect of a potion of healing (overworld mobs) or harm (nether mobs).

Examples:

on heal:

On Horse Jump

🔗

Event

Patterns:
  • [on] horse jump
Since: 2.5.1
Called when a horse jumps.

Examples:

on horse jump:
    push event-entity upwards at speed 2

On Hunger Meter Change

🔗

Event

Patterns:
  • [on] (food|hunger) (level|met(er|re)|bar) chang(e|ing)
Since: 1.4.4
Called when the hunger bar of a player changes, i.e. either increases by eating or decreases over time.

Examples:

on food bar change:

On Ignition

🔗

Event

Patterns:
  • [on] [block] ignit(e|ion)
Since: 1.0
Called when a block starts burning, i.e. a fire block is placed next to it and this block is flammable. The burn event will be called when the block is about do be destroyed by the fire.

Examples:

on block ignite:
    if event-block is a ladder:
        cancel event

On Inventory Click

🔗

Event

Patterns:
  • [on] [player] inventory(-| )click[ing] [[at] %item types%]
Since: 2.2-Fixes-V10
Called when clicking on inventory slot.

Examples:

on inventory click:
    if event-item is stone:
        give player 1 stone
        remove 20$ from player's balance

On Inventory Close

🔗

Event

Patterns:
  • [on] inventory clos(ing|e[d])
Since: 2.2-dev21
Called when player's currently viewed inventory is closed.

Examples:

on inventory close:
    if player's location is {location}:
        send "You exited the shop!"

On Inventory Drag

🔗

Event

Patterns:
  • [on] inventory drag[ging]
Since: 2.7
Called when a player drags an item in their cursor across the inventory.

Examples:

on inventory drag:
    if player's current inventory is {_gui}:
        send "You can't drag your items here!" to player
        cancel event

On Inventory Item Move

🔗

Event

Patterns:
  • [on] inventory item (move|transport)
Since: INSERT VERSION
Called when an entity or block (e.g. hopper) tries to move items directly from one inventory to another. When this event is called, the initiator may have already removed the item from the source inventory and is ready to move it into the destination inventory. If this event is cancelled, the items will be returned to the source inventory.

Examples:

on inventory item move:
    broadcast "%holder of past event-inventory% is transporting %event-item% to %holder of event-inventory%!"

On Inventory Open

🔗

Event

Patterns:
  • [on] inventory open[ed]
Since: 2.2-dev21
Called when an inventory is opened for player.

Examples:

on inventory open:
    close player's inventory

On Inventory Pickup

🔗

Event

Patterns:
  • [on] inventory pick[ ]up
Since: 2.5.1
Called when an inventory (a hopper, a hopper minecart, etc.) picks up an item

Examples:

on inventory pickup:

On Inventory Slot Change

🔗

Event

Patterns:
  • [on] [player] inventory slot chang(e|ing)
Since: 2.7
Requirements: Paper 1.19.2+
Called when a slot in a player's inventory is changed. Warning: setting the event-slot to a new item can result in an infinite loop.

Examples:

on inventory slot change:
    if event-item is a diamond:
        send "You obtained a diamond!" to player

On Item Break

🔗

Event

Patterns:
  • [on] [player] tool break[ing]
  • [on] [player] break[ing] [(a|the)] tool
Since: 2.1.1
Called when a player breaks their tool because its damage reached the maximum value. This event cannot be cancelled.

Examples:

on tool break:

On Item Damage

🔗

Event

Patterns:
  • [on] item damag(e|ing)
Since: 2.5
Called when an item is damaged. Most tools are damaged by using them; armor is damaged when the wearer takes damage.

Examples:

on item damage:
    cancel event

On Item Despawn

🔗

Event

Patterns:
  • [on] (item[ ][stack]|[item] %item types%) despawn[ing]
  • [on] [item[ ][stack]] despawn[ing] [[of] %item types%]
Since: 2.2-dev35
Called when an item is about to be despawned from the world, usually 5 minutes after it was dropped.

Examples:

on item despawn of diamond:
    send "Not my precious!"
    cancel event

On Item Mend

🔗

Event

Patterns:
  • [on] item mend[ing]
Since: 2.5.1
Requirements: Minecraft 1.13 or newer
Called when a player has an item repaired via the Mending enchantment.

Examples:

on item mend:
    chance of 50%:
        cancel the event
        send "Oops! Mending failed!" to player

On Item Merge

🔗

Event

Patterns:
  • [on] (item[ ][stack]|[item] %item types%) merg(e|ing)
  • [on] item[ ][stack] merg(e|ing) [[of] %item types%]
Since: 2.2-dev35
Called when dropped items merge into a single stack. event-entity will be the entity which is trying to merge, and future event-entity will be the entity which is being merged into.

Examples:

on item merge of gold blocks:
    cancel event

On Item Spawn

🔗

Event

Patterns:
Since: unknown (before 2.1)
Called whenever an item stack is spawned in a world, e.g. as drop of a block or mob, a player throwing items out of their inventory, or a dispenser dispensing an item (not shooting it).

Examples:

on item spawn of iron sword:
    broadcast "Someone dropped an iron sword!"

On Join

🔗

Event

Patterns:
  • [on] [player] (login|logging in|join[ing])
Since: 1.0
Called when the player joins the server. The player is already in a world when this event is called, so if you want to prevent players from joining you should prefer on connect over this event.

Examples:

on join:
    message "Welcome on our awesome server!"
    broadcast "%player% just joined the server!"

On Jump

🔗

Event

Patterns:
  • [on] [player] jump[ing]
Since: 2.3
Called whenever a player jumps. This event requires PaperSpigot.

Examples:

on jump:
    event-player does not have permission "jump"
    cancel event

On Kick

🔗

Event

Patterns:
  • [on] [player] (kick|being kicked)
Since: 1.0
Called when a player is kicked from the server. You can change the kick message or cancel the event entirely.

Examples:

on kick:

On Language Change

🔗

Event

Patterns:
  • [on] [player] (language|locale) chang(e|ing)
  • [on] [player] chang(e|ing) (language|locale)
Since: 2.3
Called after a player changed their language in the game settings. You can use the language expression to get the current language of the player. This event requires Minecraft 1.12+.

Examples:

on language change:
    if player's language starts with "en":
        send "Hello!"

On Leaves Decay

🔗

Event

Patterns:
  • [on] leaves decay[ing]
Since: 1.0
Called when a leaf block decays due to not being connected to a tree.

Examples:

on leaves decay:

On Level Change

🔗

Event

Patterns:
  • [on] [player] level (change|up|down)
Since: 1.0, 2.4 (level up/down)
Called when a player's level changes, e.g. by gathering experience or by enchanting something.

Examples:

on level change:

On Lightning Strike

🔗

Event

Patterns:
  • [on] lightning [strike]
Since: 1.0
Called when lightning strikes.

Examples:

on lightning:
    spawn a zombie at location of event-entity

On Loot Generate

🔗

Event

Patterns:
  • [on] loot generat(e|ing)
Since: 2.7
Requirements: MC 1.16+
Called when a loot table of an inventory is generated in the world. For example, when opening a shipwreck chest.

Examples:

on loot generate:
    chance of 10%
    add 64 diamonds to the loot
    send "You hit the jackpot at %event-location%!"

On Move / Rotate

🔗

Event

Patterns:
  • [on] %entity type% (move|walk|step|(turn[ing] around|rotate))
  • [on] %entity type% (move|walk|step) or (turn[ing] around|rotate)
  • [on] %entity type% (turn[ing] around|rotate) or (move|walk|step)
Since: 2.6, INSERT VERSION (turn around)
Requirements: Paper 1.16.5+ (entity move)
Called when a player or entity moves or rotates their head. NOTE: Move event will only be called when the entity/player moves position, keyword 'turn around' is for orientation (ie: looking around), and the combined syntax listens for both. NOTE: These events can be performance heavy as they are called quite often.

Examples:

on player move:
    if player does not have permission "player.can.move":
        cancel event
on skeleton move:
    if event-entity is not in world "world":
        kill event-entity
on player turning around:
send action bar "You are currently turning your head around!" to player

On Move On

🔗

Event

Patterns:
Since: 2.0
Called when a player moves onto a certain type of block. Please note that using this event can cause lag if there are many players online.

Examples:

on walking on dirt or grass:
on stepping on stone:

On Physics

🔗

Event

Patterns:
  • [on] [block] physics
Since: 1.4.6
Called when a physics check is done on a block. By cancelling this event you can prevent some things from happening, e.g. sand falling, dirt turning into grass, torches dropping if their supporting block is destroyed, etc.Please note that using this event might cause quite some lag since it gets called extremely often.

Examples:

# prevents sand from falling
on block physics:
    block is sand
    cancel event

On Pick Up

🔗

Event

Patterns:
  • [on] [(player|entity)] (pick[ ]up|picking up) [[of] %item types%]
Since: unknown (before 2.1), 2.5 (entity)
Called when a player/entity picks up an item. Please note that the item is still on the ground when this event is called.

Examples:

on pick up:
on entity pickup of wheat:

On Pig Zap

🔗

Event

Patterns:
  • [on] pig[ ]zap
Since: 1.0
Called when a pig is stroke by lightning and transformed into a zombie pigman. Cancel the event to prevent the transformation.

Examples:

on pig zap:

On Piston Extend

🔗

Event

Patterns:
  • [on] piston extend[ing]
Since: 1.0
Called when a piston is about to extend.

Examples:

on piston extend:
    broadcast "A piston is extending!"

On Piston Retract

🔗

Event

Patterns:
  • [on] piston retract[ing]
Since: 1.0
Called when a piston is about to retract.

Examples:

on piston retract:
    broadcast "A piston is retracting!"

On Place

🔗

Event

Patterns:
Since: 1.0, 2.6 (BlockData support)
Called when a player places a block.

Examples:

on place:
on place of a furnace, workbench or chest:
on break of chest[type=right] or chest[type=left]

On Player Chunk Enter

🔗

Event

Patterns:
  • [on] [player] (enter[s] [a] chunk|chunk enter[ing])
Since: 2.7
Called when a player enters a chunk. Note that this event is based on 'player move' event, and may be called frequent internally.

Examples:

on player enters a chunk:
    send "You entered a chunk: %past event-chunk% -&gt; %event-chunk%!" to player

On Player Deep Sleep

🔗

Event

Patterns:
  • [on] [player] deep sleep[ing]
Since: 2.7
Requirements: Paper 1.16+
Called when a player has slept long enough to count as passing the night/storm. Cancelling this event will prevent the player from being counted as deeply sleeping unless they exit and re-enter the bed.

Examples:

on player deep sleeping:
    send "Zzzz.." to player

On Player Pickup Arrow

🔗

Event

Patterns:
  • [on] [player] (pick[ing| ]up [an] arrow|arrow pick[ing| ]up)
Since: INSERT VERSION
Requirements: Minecraft 1.14+ (event-projectile)
Called when a player picks up an arrow from the ground.

Examples:

on arrow pickup:
    cancel the event
    teleport event-projectile to block 5 above event-projectile

On Player Trade

🔗

Event

Patterns:
  • [on] player trad(e|ing)
Since: 2.7
Requirements: Paper 1.16.5+
Called when a player has traded with a villager.

Examples:

on player trade:
    chance of 50%:
        cancel event
        send "The trade was somehow denied!" to player

On Player World Change

🔗

Event

Patterns:
  • [on] [player] world chang(ing|e[d])
Since: 2.2-dev28
Called when a player enters a world. Does not work with other entities!

Examples:

on player world change:
    world is "city"
    send "Welcome to the City!"

On Portal

🔗

Event

Patterns:
  • [on] [player] portal
Since: 1.0
Called when a player uses a nether or end portal. Cancel the event to prevent the player from teleporting.

Examples:

on player portal:

On Portal Create

🔗

Event

Patterns:
  • [on] portal creat(e|ion)
Since: 1.0, 2.5.3 (event-entity support)
Requirements: Minecraft 1.14+ (event-entity support)
Called when a portal is created, either by a player or mob lighting an obsidian frame on fire, or by a nether portal creating its teleportation target in the nether/overworld. In Minecraft 1.14+, you can use the player in this event. Please note that there may not always be a player (or other entity) in this event.

Examples:

on portal create:

On Portal Enter

🔗

Event

Patterns:
  • [on] portal enter[ing]
  • [on] entering [a] portal
Since: 1.0
Called when an entity enters a nether portal or an end portal. Please note that this event will be fired many times for a nether portal.

Examples:

on portal enter:

On Prepare Craft

🔗

Event

Patterns:
  • [on] [player] (preparing|beginning) craft[ing] [[of] %item types%]
Since: 2.2-Fixes-V10
Called just before displaying crafting result to player. Note that setting the result item might or might not work due to Bukkit bugs.

Examples:

on preparing craft of torch:

On Pressure Plate / Trip

🔗

Event

Patterns:
  • [on] [step[ping] on] [a] [pressure] plate
  • [on] (trip|[step[ping] on] [a] tripwire)
Since: 1.0 (pressure plate), 1.4.4 (tripwire)
Called when a player steps on a pressure plate or tripwire respectively.

Examples:

on step on pressure plate:

On Projectile Collide

🔗

Event

Patterns:
  • [on] projectile collide
Since: 2.5
Requirements: Paper
Called when a projectile collides with an entity.

Examples:

on projectile collide:
    teleport shooter of event-projectile to event-entity

On Projectile Hit

🔗

Event

Patterns:
  • [on] projectile hit
Since: 1.0
Called when a projectile hits an entity or a block. Use the damage event with a check for a projectile to be able to use the entity that got hit in the case when the projectile hit a living entity. A damage event will even be fired if the damage is 0, e.g. when throwing snowballs at non-nether mobs.

Examples:

on projectile hit:
    event-projectile is arrow
    delete event-projectile

On Quit

🔗

Event

Patterns:
  • [on] (quit[ting]|disconnect[ing]|log[ ]out|logging out|leav(e|ing))
Since: 1.0 (simple disconnection)
Called when a player leaves the server.

Examples:

on quit:
on disconnect:

On Redstone

🔗

Event

Patterns:
  • [on] redstone [current] [chang(e|ing)]
Since: 1.0
Called when the redstone current of a block changes. This event is of not much use yet.

Examples:

on redstone change:
    send "someone is using redstone" to console

On Region Enter/Leave

🔗

Event

Patterns:
  • [on] (enter[ing]|leav(e|ing)|exit[ing]) [of] ([a] region|[[the] region] %regions%)
  • [on] region (enter[ing]|leav(e|ing)|exit[ing])
Since: 2.1
Requirements: Supported regions plugin
Called when a player enters or leaves a region. This event requires a supported regions plugin to be installed.

Examples:

on region exit:
    message "Leaving %region%."

On Resource Pack Request Response

🔗

Event

Patterns:
Since: 2.4
Called when a player takes action on a resource pack request sent via the send resource pack effect. The resource pack condition can be used to check the resource pack state.

This event will be triggered once when the player accepts or declines the resource pack request, and once when the resource pack is successfully installed or failed to download.

Examples:

on resource pack request response:
    if the resource pack was declined or failed to download:

on resource pack deny:
    kick the player due to "You have to install the resource pack to play in this server!"

On Respawn

🔗

Event

Patterns:
  • [on] [player] respawn[ing]
Since: 1.0
Called when a player respawns. You should prefer this event over the death event as the player is technically alive when this event is called.

Examples:

on respawn:

On Resurrect Attempt

🔗

Event

Patterns:
  • [on] [entity] resurrect[ion] [attempt]
Since: 2.2-dev28
Called when an entity dies, always. If they are not holding a totem, this is cancelled - you can, however, uncancel it.

Examples:

on resurrect attempt:
    entity is player
    entity has permission "admin.undying"
    uncancel the event

On Riptide

🔗

Event

Patterns:
  • [on] [use of] riptide [enchant[ment]]
Since: 2.5
Called when the player activates the riptide enchantment, using their trident to propel them through the air. Note: the riptide action is performed client side, so manipulating the player in this event may have undesired effects.

Examples:

on riptide:
    send "You are riptiding!"

On Script Load/Unload

🔗

Event

Patterns:
  • [on] [async] [script] (load|init|enable)
  • [on] [async] [script] (unload|stop|disable)
Since: 2.0
Called directly after the trigger is loaded, or directly before the whole script is unloaded. The keyword 'async' indicates the trigger can be ran asynchronously,

Examples:

on load:
    set {running::%script%} to true
on unload:
    set {running::%script%} to false

On Server List Ping

🔗

Event

Patterns:
  • [on] server [list] ping
Since: 2.3
Called when a server list ping is coming in, generally when a Minecraft client pings the server to show its information in the server list. The IP expression can be used to get the IP adress of the pinger. This event can be cancelled on PaperSpigot 1.12.2+ only and this means the player will see the server as offline (but still can join).

Also you can use MOTD, Max Players, Online Players Count, Protocol Version, Version String, Hover List and Server Icon expressions, and Player Info Visibility and Hide Player from Server List effects to modify the server list.

Examples:

on server list ping:
    set the motd to "Welcome %{player-by-IP::%ip%}%! Join now!" if {player-by-IP::%ip%} is set, else "Join now!"
    set the fake max players count to (online players count + 1)
    set the shown icon to a random server icon out of {server-icons::*}

On Server Start/Stop

🔗

Event

Patterns:
  • [on] (server|skript) (start|load|enable)
  • [on] (server|skript) (stop|unload|disable)
Since: 2.0
Called when the server starts or stops (actually, when Skript starts or stops, so a /reload will trigger these events as well).

Examples:

on skript start:
on server stop:

On Sheep Regrow Wool

🔗

Event

Patterns:
  • [on] sheep [re]grow[ing] wool
Since: 2.2-dev21
Called when sheep regrows its sheared wool back.

Examples:

on sheep grow wool:
    cancel event

On Shoot

🔗

Event

Patterns:
  • [on] [projectile] shoot
Since: 1.0
Called whenever a projectile is shot. Use the shooter expression to get who shot the projectile.

Examples:

on shoot:
    if projectile is an arrow:
        send "you shot an arrow!" to shooter

On Sign Change

🔗

Event

Patterns:
  • [on] sign (chang[e]|edit)[ing]
  • [on] [player] (chang[e]|edit)[ing] [a] sign
Since: 1.0
As signs are placed empty, this event is called when a player is done editing a sign.

Examples:

on sign change:
    line 2 is empty
    set line 1 to "&amp;lt;red&amp;gt;%line 1%"

On Slime Split

🔗

Event

Patterns:
  • [on] slime split[ting]
Since: 2.2-dev26
Called when a slime splits. Usually this happens when a big slime dies.

Examples:

on slime split:

On Smelt

🔗

Event

Patterns:
  • [on] [ore] smelt[ing]
  • [on] smelt[ing] of ore
Since: 1.0
Called when a furnace smelts an item in its ore slot.

Examples:

on smelt:

On Sneak Toggle

🔗

Event

Patterns:
  • [on] [player] toggl(e|ing) sneak
  • [on] [player] sneak toggl(e|ing)
Since: 1.0
Called when a player starts or stops sneaking. Use is sneaking to get whether the player was sneaking before the event was called.

Examples:

# make players that stop sneaking jump
on sneak toggle:
    player is sneaking
    push the player upwards at speed 0.5

On Spawn

🔗

Event

Patterns:
Since: 1.0, 2.5.1 (non-living entities)
Called when an entity spawns (excluding players).

Examples:

on spawn of a zombie:
on spawn of an ender dragon:
    broadcast "A dragon has been sighted in %world%!"

On Spawn Change

🔗

Event

Patterns:
  • [on] [world] spawn change
Since: 1.0
Called when the spawn point of a world changes.

Examples:

on spawn change:
    broadcast "someone changed the spawn!"

On Spectate

🔗

Event

Patterns:
Since: 2.7
Requirements: Paper
Called with a player starts, stops or swaps spectating an entity.

Examples:

on player start spectating of a zombie:

On Sponge Absorb

🔗

Event

Patterns:
  • [on] sponge absorb
Since: 2.5
Requirements: Minecraft 1.13 or newer
Called when a sponge absorbs blocks.

Examples:

on sponge absorb:
    loop absorbed blocks:
        broadcast "%loop-block% was absorbed by a sponge"!

On Spread

🔗

Event

Patterns:
  • [on] spread[ing]
Since: 1.0
Called when a new block forms as a result of a block that can spread, e.g. water or mushrooms.

Examples:

on spread:

On Sprint Toggle

🔗

Event

Patterns:
  • [on] [player] toggl(e|ing) sprint
  • [on] [player] sprint toggl(e|ing)
Since: 1.0
Called when a player starts or stops sprinting. Use is sprinting to get whether the player was sprinting before the event was called.

Examples:

on sprint toggle:
    player is not sprinting
    send "Run!"

On Stonecutter Recipe Select

🔗

Event

Patterns:
Since: INSERT VERSION
Requirements: Paper 1.16+
Called when a player selects a recipe in a stonecutter.

Examples:

on stonecutting stone slabs
    cancel the event

on stonecutting:
    broadcast "%player% is using stonecutter to craft %event-item%!"

On Swim Toggle

🔗

Event

Patterns:
  • [on] [entity] toggl(e|ing) swim
  • [on] [entity] swim toggl(e|ing)
Since: 2.3
Requirements: 1.13 or newer
Called when an entity swims or stops swimming.

Examples:

on swim toggle:
    event-entity does not have permission "swim"
    cancel event

On Tame

🔗

Event

Patterns:
  • [on] [entity] tam(e|ing)
Since: 1.0
Called when a player tames a wolf or ocelot. Can be cancelled to prevent the entity from being tamed.

Examples:

on tame:

On Target

🔗

Event

Patterns:
  • [on] [entity] target
  • [on] [entity] un[-]target
Since: 1.0
Called when a mob starts/stops following/attacking another entity, usually a player.

Examples:

on entity target:
    target is a player

On Teleport

🔗

Event

Patterns:
  • [on] [player] teleport[ing]
Since: 1.0
Called whenever a player is teleported, either by a nether/end portal or other means (e.g. by plugins).

Examples:

on teleport:

On Tool Change

🔗

Event

Patterns:
  • [on] [player['s]] (tool|item held|held item) chang(e|ing)
Since: 1.0
Called whenever a player changes their held item by selecting a different slot (e.g. the keys 1-9 or the mouse wheel), not by dropping or replacing the item in the current slot.

Examples:

on player's held item change:

On Vehicle Create

🔗

Event

Patterns:
  • [on] vehicle create
  • [on] creat(e|ing|ion of) [a] vehicle
Since: 1.0
Called when a new vehicle is created, e.g. when a player places a boat or minecart.

Examples:

on vehicle create:

On Vehicle Damage

🔗

Event

Patterns:
  • [on] vehicle damage
  • [on] damag(e|ing) [a] vehicle
Since: 1.0
Called when a vehicle gets damage. Too much damage will destroy the vehicle.

Examples:

on vehicle damage:

On Vehicle Destroy

🔗

Event

Patterns:
  • [on] vehicle destroy
  • [on] destr(oy[ing]|uction of) [a] vehicle
Since: 1.0
Called when a vehicle is destroyed. Any passenger will be ejected and the vehicle might drop some item(s).

Examples:

on vehicle destroy:
    cancel event

On Vehicle Enter

🔗

Event

Patterns:
  • [on] vehicle enter
  • [on] enter[ing] [a] vehicle
Since: 1.0
Called when an entity enters a vehicle, either deliberately (players) or by falling into them (mobs).

Examples:

on vehicle enter:
    entity is a player
    cancel event

On Vehicle Exit

🔗

Event

Patterns:
  • [on] vehicle exit
  • [on] exit[ing] [a] vehicle
Since: 1.0
Called when an entity exits a vehicle.

Examples:

on vehicle exit:
    if event-entity is a spider:
        kill event-entity

On Weather Change

🔗

Event

Patterns:
Since: 1.0
Called when a world's weather changes.

Examples:

on weather change:
on weather change to sunny:

On World Init

🔗

Event

Patterns:
  • [on] world init[ialization]
Since: 1.0
Called when a world is initialised. As all default worlds are initialised before any scripts are loaded, this event is only called for newly created worlds. World management plugins might change the behaviour of this event though.

Examples:

on world init:

On World Load

🔗

Event

Patterns:
  • [on] world load[ing]
Since: 1.0
Called when a world is loaded. As with the world init event, this event will not be called for the server's default world(s).

Examples:

on world load:
    send "World is loading..." to console

On World Save

🔗

Event

Patterns:
  • [on] world sav(e|ing)
Since: 1.0
Called when a world is saved to disk. Usually all worlds are saved simultaneously, but world management plugins could change this.

Examples:

on world saving:
    broadcast "World has been saved!"

On World Unload

🔗

Event

Patterns:
  • [on] world unload[ing]
Since: 1.0
Called when a world is unloaded. This event might never be called if you don't have a world management plugin.

Examples:

on world unload:
    cancel event

On Zombie Break Door

🔗

Event

Patterns:
  • [on] zombie break[ing] [a] [wood[en]] door
Since: 1.0
Called when a zombie is done breaking a wooden door. Can be cancelled to prevent the zombie from breaking the door.

Examples:

on zombie breaking a wood door:

Periodical

🔗

Event

Patterns:
Since: 1.0
An event that is called periodically.

Examples:

every 2 seconds:
every minecraft hour:
every tick: # can cause lag depending on the code inside the event
every minecraft days:

Periodical

🔗

Event

Patterns:
Since: 1.0
An event that is called periodically.

Examples:

every 2 seconds in "world":
every minecraft hour in "flatworld":
every tick in "world": # can cause lag depending on the code inside the event
every minecraft days in "plots":

Attribute Type

🔗

Type

Patterns:
  • luck, generic movement speed, horse jump strength, generic luck, generic max absorption, follow range, movement speed, max absorption, generic follow range, zombie spawn reinforcements, generic attack knockback, knockback resistance, attack knockback, generic armor toughness, generic attack speed, max health, flying speed, attack damage, generic attack damage, generic armor, generic flying speed, generic knockback resistance, armor, attack speed, armor toughness, generic max health
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:

Missing examples.

Biome

🔗

Type

Patterns:
  • roofed forest, old growth pine taiga, mesa forest, the void, snowy taiga, hell, jagged peaks, spiked ice plains, crimson forest, stone shore, birch forest, cold taiga, cold beach, savanna, giant tree taiga, marsh, windswept forest, wooded badlands, sky, nether, void, cold ocean, giant spruce taiga, lush caves, deep lukewarm ocean, deep frozen ocean, small end islands, ice spikes, old growth birch forest, badlands, badlands forest, ocean, lukewarm ocean, ice plains spikes, gravelly mountains, frozen peaks, stony peaks, jungle, basalt deltas, snowy beach, frozen ocean, mountains, forest, wooded mesa, eroded mesa, the end, dripstone caves, swampland, end barrens, ice plains with spikes, windswept hills, sea, unknown, black forest, soul sand valley, deep dark, mesa, plains, eroded badlands, mushroom fields, windswept gravelly hills, mushroom island, wooded mountains, shattered savanna, sunflower plains, snowy plains, meadow, snowy slopes, flower forest, windswept savanna, nether wastes, stony shore, taiga, frozen river, warm ocean, custom, old growth spruce taiga, deep cold ocean, swamp, mangrove swamp, deep ocean, end highlands, end midlands, cherry grove, sparse jungle, dark forest, jungle edge, grove, snowy tundra, beach, bamboo jungle, savanna plateau, river, tall birch forest, warped forest, desert
Since: 1.4.4
All possible biomes Minecraft uses to generate a world.

Examples:

biome at the player is desert

Block

🔗

Type

Patterns:
  • Missing 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:

Missing examples.

Block Data

🔗

Type

Patterns:
  • Missing 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]

Boolean

🔗

Type

Patterns:
  • true/yes/on or false/no/off
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

🔗

Type

Patterns:
  • red, all black, british shorthair, ragdoll, white, jellie, siamese, black, tabby, calico, persian
Since: 2.4
Requirements: Minecraft 1.14 or newer
Represents the race/type of a cat entity.

Examples:

Missing examples.

Chunk

🔗

Type

Patterns:
  • Missing 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:

Missing examples.

Click Type

🔗

Type

Patterns:
  • lmb, number key, mmb, rmb, drop item, drop key, window border using left mouse button, unknown, window border using right mouse, shift+rmb, unsupported, shift+lmb, ctrl+q, swap shield, left mouse button, left mouse with shift, left mouse, 0-9, double click, double click using mouse, border using rmb, right mouse button, right mouse button with shift, border using lmb, middle mouse, drop key with control, window border using right mouse button, swap offhand, custom, q, right mouse with shift, middle mouse button, drop stack, left mouse button with shift, right mouse, creative action
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:

Missing examples.

Color

🔗

Type

Patterns:
  • black, dark grey/dark gray, grey/light grey/gray/light gray/silver, white, blue/dark blue, cyan/aqua/dark cyan/dark aqua, light blue/light cyan/light aqua, green/dark green, light green/lime/lime green, yellow/light yellow, orange/gold/dark yellow, red/dark red, pink/light red, purple/dark purple, magenta/light purple, brown/indigo
Since: Unknown
Wool, dye and chat colors.

Examples:

color of the sheep is red or black
set the color of the block to green
message "You're holding a &amp;lt;%color of tool%&amp;gt;%color of tool%&amp;lt;reset&amp;gt; wool block"

Command Sender

🔗

Type

Patterns:
Since: 1.0
A player or the console.

Examples:

command /push [&amp;amp;lt;player&amp;amp;gt;]:
    trigger:
        if arg-1 is not set:
            if command sender is console:
                send "You can't push yourself as a console :\" to sender
                stop
            push sender upwards with force 2
            send "Yay!"
        else:
            push arg-1 upwards with force 2
            send "Yay!" to sender and arg-1

Damage Cause

🔗

Type

Patterns:
  • sweep attack, thorns, the void, magma, a lightning, drowning, dragonfire, an attack, drown, an entity attack, melt, freeze, falling block, contact, fire, an entity explosion, lightning, a fall, entity explosion, void, a lightning strike, suffocation, suicide, wither effect, a plugin, lightning strike, entity attack, a potion, a wither, sweeping, melting, a falling block, unknown, starvation, lava, fall, hot floor, attack, a block explosion, dryout, burn, hitting wall while flying, potion, world border, flying into a wall, cramming, poison, sonic boom, suffocate, custom, kill, killed, a fire, burning, a projectile, plugin, wither potion effect, block explosion, projectile, wither, dragon's breath
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:

Missing examples.

Date

🔗

Type

Patterns:
  • Missing patterns.
Since: 1.4
A date is a certain point in the real world's time which can be obtained with now expression, unix date expression and date function. 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

Difficulty

🔗

Type

Patterns:
  • normal, medium, hard, easy, peaceful
Since: 2.3
The difficulty of a world.

Examples:

Missing examples.

Direction

🔗

Type

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

Enchantment

🔗

Type

Patterns:
  • Efficiency, Looting, Soul Speed, Silk Touch, Quick Charge, Flame, Fortune, Aqua Affinity, Multishot, Channeling, Loyalty, Curse of Binding, Punch, Projectile Protection, Power, Sharpness, Frost Walker, Fire Protection, Impaling, Luck of The Sea, Riptide, Protection, Mending, Respiration, Piercing, Unbreaking, Swift Sneak, Feather Falling, Lure, Smite, Fire Aspect, Knockback, Depth Strider, Sweeping Edge, Infinity, Curse of Vanishing, Blast Protection, Bane of Arthropods, Thorns
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:

Missing examples.

Enchantment Offer

🔗

Type

Patterns:
  • Missing 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

Enchantment Type

🔗

Type

Patterns:
  • <enchantment> [<level>]
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 waterbreathing

Entity

🔗

Type

Patterns:
  • player, op, wolf, tamed ocelot, powered creeper, zombie, unsaddled pig, fireball, arrow, dropped item, item frame, etc.
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

Entity Type

🔗

Type

Patterns:
  • Detailed usage will be added eventually
Since: 1.3
The type of an entity, e.g. player, wolf, powered creeper, etc.

Examples:

victim is a cow
spawn a creeper

Entity Type with Amount

🔗

Type

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

🔗

Type

Patterns:
  • [<number>] ([e]xp|experience [point[s]])
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

🔗

Type

Patterns:
Since: 2.4
A configuration of effects that defines the firework when exploded which can be used in the launch firework effect. See the firework effect expression for detailed patterns.

Examples:

launch flickering trailing burst firework colored blue and green at player
launch trailing flickering star colored purple, yellow, blue, green and red fading to pink at target entity
launch ball large colored red, purple and white fading to light green and black at player's location with duration 1

Firework Type

🔗

Type

Patterns:
  • small, ball, star shaped, large, star, creeper face, small ball, large ball, burst, ball large, creeper
Since: 2.4
The type of a fireworkeffect.

Examples:

Missing examples.

Game Mode

🔗

Type

Patterns:
  • adventure, survival, spectator, creative
Since: 1.0
The game modes survival, creative, adventure and spectator.

Examples:

player's gamemode is survival
set the player argument's game mode to creative

Gamerule

🔗

Type

Patterns:
  • doWardenSpawning, tntExplosionDropDecay, globalSoundEvents, enderPearlsVanishOnDeath, doFireTick, maxCommandChainLength, doVinesSpread, fireDamage, reducedDebugInfo, waterSourceConversion, disableElytraMovementCheck, lavaSourceConversion, announceAdvancements, drowningDamage, commandBlockOutput, forgiveDeadPlayers, doMobSpawning, maxEntityCramming, disableRaids, doWeatherCycle, mobExplosionDropDecay, doDaylightCycle, showDeathMessages, doTileDrops, universalAnger, playersSleepingPercentage, snowAccumulationHeight, doInsomnia, doImmediateRespawn, blockExplosionDropDecay, naturalRegeneration, doMobLoot, fallDamage, keepInventory, doEntityDrops, doLimitedCrafting, mobGriefing, randomTickSpeed, spawnRadius, freezeDamage, doTraderSpawning, commandModificationBlockLimit, logAdminCommands, spectatorsGenerateChunks, sendCommandFeedback, doPatrolSpawning
Since: 2.5
Requirements: Minecraft 1.13 or newer
A gamerule

Examples:

Missing examples.

Gamerule Value

🔗

Type

Patterns:
  • Missing patterns.
Since: 2.5
A wrapper for the value of a gamerule for a world.

Examples:

Missing examples.

Gene

🔗

Type

Patterns:
  • normal, lazy, happy, worried, worrisome, aggressive, brown, brownish, savage, playful, wild, weak
Since: 2.4
Requirements: Minecraft 1.14 or newer
Represents a Panda's main or hidden gene. See genetics for more info.

Examples:

Missing examples.

Heal Reason

🔗

Type

Patterns:
  • an ender crystal, magic, a magic regeneration, magic regeneration, fed, sated, a magic regen, regen potion, a wither spawn, peaceful, unknown, a regeneration potion, consuming, a wither effect, peaceful regeneration, wither summoning, healing potion, wither potion, an end crystal, satiated, regeneration potion, potion, satisfied, ingesting, withered, custom, a wither spawning, end crystal, eating, wither spawning, a wither summoning, wither effect, a plugin, a regen potion, plugin, withering, a potion, wither spawn, a healing potion, ender crystal, magic regen, wither, peaceful regen
Since: 2.5
The heal reason in a heal event.

Examples:

Missing examples.

Inventory

🔗

Type

Patterns:
  • Missing 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:

Missing examples.

Inventory Action

🔗

Type

Patterns:
  • drop stack from slot, swap items with hotbar, swap cursor stack, pickup single item, pickup some, drop all from cursor, move to other inventory, drop cursor stack, pickup all, swap with hotbar, nothing, drop all from slot, swap cursor, drop cursor, pickup all items, drop slot item, place all, drop cursor item, drop slot stack, drop single item from slot, swap with cursor, place some, pickup one item, drop single item from cursor, collect items to cursor, unknown, clone stack, drop stack from cursor, drop one item from slot, drop one item from cursor, unsupported, do nothing, drop one from cursor, pickup half, drop items from slot, swap stack with cursor, place all items, collect to cursor, pickup some items, drop slot, drop items from cursor, hotbar move and readd, shift move, custom, pickup single, place one item, hotbar swap items, drop one from slot, place some items, place one, pickup half stack, instant move, hotbar swap
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:

Missing examples.

Inventory Close Reasons

🔗

Type

Patterns:
  • disconnect, death, teleport, cannot use, new opened, unknown, can't use, unloaded, disconnected, plugin, can not use, open new, player
Since: INSERT VERSION
Requirements: Paper
The inventory close reason in an inventory close event.

Examples:

Missing examples.

Inventory Type

🔗

Type

Patterns:
  • barrel inventory, a loom inventory, a blast furnace inventory, workbench inventory, ender chest inventory, loom inventory, a workbench inventory, hopper inventory, a merchant inventory, a hopper inventory, chiseled bookshelf, an ender chest inventory, new smithing table, bookshelf, a jukebox, beacon inventory, shulker box inventory, a barrel inventory, a shulker box inventory, lectern inventory, chest inventory, a villager inventory, a smoker inventory, a brewing stand inventory, a smithing inventory, grindstone inventory, a crafting table inventory, a player inventory, furnace inventory, a creative inventory, blast furnace inventory, upgrade gear, a composter inventory, an enchanting table inventory, jukebox, a dropper inventory, a cartography table inventory, a upgrade gear, smoker inventory, composter inventory, a chest inventory, upgrade gear table, a upgrade gear table, dispenser inventory, player inventory, stonecutter inventory, a stonecutter inventory, a lectern inventory, merchant inventory, cartography table inventory, a chiseled bookshelf, a new smithing table, a furnace inventory, anvil inventory, a dispenser inventory, a grindstone inventory, smithing inventory, dropper inventory, brewing stand inventory, villager inventory, enchanting table inventory, a beacon inventory, a bookshelf, creative inventory, crafting table inventory, an anvil inventory
Since: 2.2-dev32
Minecraft has several different inventory types with their own use cases.

Examples:

Missing examples.

Item

🔗

Type

Patterns:
  • [<number> [of]] <alias> [of <enchantment> <level>], Where <alias> must be an alias that represents exactly one item (i.e cannot be a general alias like 'sword' or 'plant')
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 Type

🔗

Type

Patterns:
  • [<number> [of]] [all/every] <alias> [of <enchantment> [<level>] [,/and <more enchantments...>]]
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

Living Entity

🔗

Type

Patterns:
  • see entity, but ignore inanimate objects
Since: 1.0
A living entity, i.e. a mob or player, not inanimate entities like projectiles or dropped items.

Examples:

spawn 5 powered creepers
shoot a zombie from the creeper

Location

🔗

Type

Patterns:
  • Missing 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:

Missing examples.

Metadata Holder

🔗

Type

Patterns:
  • Missing 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

Money

🔗

Type

Patterns:
  • <number> $ or $ <number>, where '$' is your server's currency, e.g. '10 rupees' or '£5.00'
Since: 2.0
Requirements: Vault, an economy plugin that supports Vault
A certain amount of money. Please note that this differs from numbers as it includes a currency symbol or name, but usually the two are interchangeable, e.g. you can both add 100$ to the player's balance and add 100 to the player's balance.

Examples:

add 10£ to the player's account
remove Fr. 9.95 from the player's money
set the victim's money to 0
increase the attacker's balance by the level of the victim * 100

Moon Phase

🔗

Type

Patterns:
  • last quarter, waning crescent, waxing gibbous, full moon, waning gibbous, waxing crescent, new moon, first quarter
Since: 2.7
Requirements: Paper 1.16+
Represents the phase of a moon.

Examples:

Missing examples.

Number

🔗

Type

Patterns:
  • [-]###[.###] (any amount of digits; very large numbers will be truncated though)
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

Object

🔗

Type

Patterns:
  • Missing 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:

Missing examples.

Offline Player

🔗

Type

Patterns:
  • Missing patterns.
Since: Unknown
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:

Missing examples.

Player

🔗

Type

Patterns:
  • Missing 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:

Missing examples.

Potion Effect

🔗

Type

Patterns:
  • speed of tier 1 for 10 seconds
Since: 2.5.2
A potion effect, including the potion effect type, tier and duration.

Examples:

Missing examples.

Potion Effect Type

🔗

Type

Patterns:
  • null, speed, slowness, haste, mining fatigue, strength, instant health, instant damage, jump boost, nausea, regeneration, resistance, fire resistance, water breathing, invisibility, blindness, night vision, hunger, weakness, poison, wither, health boost, absorption, saturation, glowing, levitation, luck, bad luck, slow falling, conduit power, dolphins grace, bad omen, hero of the village, darkness
Since: Unknown
A potion effect type, e.g. 'strength' or 'swiftness'.

Examples:

apply swiftness 5 to the player
apply potion of speed 2 to the player for 60 seconds
remove invisibility from the victim

Projectile

🔗

Type

Patterns:
  • arrow, fireball, snowball, thrown potion, etc.
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

Quit Reason

🔗

Type

Patterns:
  • disconnected, erroneous state, kicked, quit, timed out, erroneous
Since: INSERT VERSION
Requirements: Paper 1.16.5+
Represents a quit reason from a player quit server event.

Examples:

Missing examples.

Region

🔗

Type

Patterns:
  • "region name"
Since: 2.1
Requirements: Supported regions plugin
A region of a regions plugin. Skript currently supports WorldGuard, Factions, GriefPrevention and PreciousStones. Please note that some regions plugins do not have named regions, some use numerical ids to identify regions, and some may have regions with the same name in different worlds, thus using regions like "region name" in scripts may or may not work.

Examples:

Missing examples.

Resource Pack State

🔗

Type

Patterns:
  • refused, rejected, accepted, failed, failed to download, successfully loaded, accept, fail, successfully load, refuse, declined, successfully install, success, reject, decline, successfully installed, download fail
Since: 2.4
The state in a resource pack request response event.

Examples:

Missing examples.

Server Icon

🔗

Type

Patterns:
  • Missing patterns.
Since: 2.3
A server icon that was loaded using the load server icon effect.

Examples:

Missing examples.

Slot

🔗

Type

Patterns:
  • Missing patterns.
Since: Unknown
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 color of the player's tool to green
enchant the player's chestplate with projectile protection 5

Sound Category

🔗

Type

Patterns:
  • hostile creatures category, speech category, records category, friendly creature category, noteblock category, hostile creature category, note block category, voice category, ambient category, noteblocks category, note blocks category, weather category, block category, friendly mob category, jukebox category, hostile mob category, master category, master volume category, hostile category, record category, blocks category, environment category, jukeboxes category, player category, players category, hostile mobs category, friendly mobs category, music category, friendly creatures category, neutral category
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:

Missing examples.

Spawn Reason

🔗

Type

Patterns:
  • dispense egg, egg, village defense, ocelot baby, silverfish trap, village invading, trap, dispensing egg, shoulder, drowned, metamorphosis, lightning, silverfish reveal, spell, built iron golem, natural, village invasion, frozen, mount, build wither, built wither, iron golem defense, ender pearl, creature spawner, reinforcements, build snowman, build iron golem, breeding, raid, infection, customized, spawn egg, jockey, beehive, default, golem defense, patrol, slime split, infected, sheared, mob spawner, nether portal, shear, perching, custom, built snowman, chunk generation, breed, command, duplication, explosion, spawner, cured, customised, piglin zombification
Since: 2.3
The spawn reason in a spawn event.

Examples:

Missing examples.

Teleport Cause

🔗

Type

Patterns:
  • bed exit, nether portal, ender gateway, exiting bed, chorus fruit, ender portal, command, unknown, plugin, dismounted, ender pearl, spectator, spectate, end gateway, chorus, exit bed, gateway, dismount, end portal
Since: 2.2-dev35
The teleport cause in a teleport event.

Examples:

Missing examples.

Text

🔗

Type

Patterns:
  • simple: "..."
  • quotes: "...""..."
  • expressions: "...%expression%..."
  • percent signs: "...%%..."
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%."

Time

🔗

Type

Patterns:
  • ##:##
  • ##[:##][ ]am/pm
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%"

Timeperiod

🔗

Type

Patterns:
  • ##:## - ##:##
  • dusk/day/dawn/night
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

🔗

Type

Patterns:
  • <number> [minecraft/mc/real/rl/irl] ticks/seconds/minutes/hours/days/weeks/months/years [[,/and] <more...>]
  • [###:]##:##[.####] ([hours:]minutes:seconds[.milliseconds])
Since: 1.0, 2.6.1 (weeks, months, years)
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'. NOTE: Months always have the value of 30 days, and years of 365 days. 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

Tree Type

🔗

Type

Patterns:
  • [any] <general tree/mushroom type>, e.g. tree/any jungle tree/etc.
  • <specific tree/mushroom species>, e.g. red mushroom/small jungle tree/big regular tree/etc.
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 any regular tree at the block
grow a huge red mushroom above the block

Type

🔗

Type

Patterns:
  • See the type name patterns of all types - including this one
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

Vector

🔗

Type

Patterns:
  • vector(x, y, z)
Since: 2.2-dev23
Vector is a collection of numbers. In Minecraft, 3D vectors are used to express velocities of entities.

Examples:

Missing examples.

Visual Effect

🔗

Type

Patterns:
  • smoke, potion break, ender signal, mobspawner flames, arrow particles, jumping rabbit, hurt, wolf smoke, wolf hearts, wolf shaking, sheep eating, iron golem offering rose, villager hearts, angry villager entity, happy villager entity, witch magic, zombie turning to a villager, firework explosion, love hearts, squid rotation reset, entity poof, guardian target, block with shield, shield break, armor stand hit, hurt by thorns, iron golem sheathing rose, resurrection by totem, hurt by drowning, hurt by explosion, explosion, large explosion, huge explosion, firework's spark, water bubble, water splash, water wake, suspended, void fog, critical hit, magical critical hit, smoke particle, large smoke, spell, spell, potion swirl, transparent potion swirl, witch spell, water drip, lava drip, angry villager, happy villager, small smoke, note, portal, flying glyph, flame, lava pop, cloud, coloured dust, snowball break, snow shovel, slime, heart, item crack, block break, block dust, water drop, mob appearance, dragon breath, end rod, damage indicator, sweep attack, falling dust, totem, spit, squid ink, bubble pop, current down, bubble column up, nautilus, dolphin, sneeze, campfire cosy smoke, campfire signal smoke, composter, flash, falling lava, landing lava, falling water, dripping honey, falling honey, landing honey, falling nectar, soul fire flame, ash, crimson spore, warped spore, soul, dripping obsidian tear, falling obsidian tear, landing obsidian tear, reverse portal, white ash, falling spore blossom, spore blossom air, small flame, snowflake, dripping dripstone lava, falling dripstone lava, dripping dripstone water, falling dripstone water, glow squid ink, glow, wax on, wax off, electric spark, scrape, sonic boom, sculk soul, sculk charge, sculk charge pop, shriek
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

Weather Type

🔗

Type

Patterns:
  • clear/sun/sunny, rain/rainy/raining, and thunder/thundering/thunderstorm
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%"

World

🔗

Type

Patterns:
  • "world_name", e.g. "world"
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"

World Environment

🔗

Type

Patterns:
  • normal, nether, the end, the overworld, custom, the nether, end, overworld
Since: 2.7
Represents the environment of a world.

Examples:

Missing examples.

abs

🔗

Function

Patterns:
  • abs(n: number)
Since: 2.2
Return Type: Number
Returns the absolute value of the argument, i.e. makes the argument positive.

Examples:

abs(3) = 3
abs(-2) = 2

acos

🔗

Function

Patterns:
  • acos(n: number)
Since: 2.2
Return Type: Number
The inverse of the cosine, also called arccos. Returns result in degrees, not radians. Only returns values from 0 to 180.

Examples:

acos(0) = 90
acos(1) = 0
acos(0.5) = 30

asin

🔗

Function

Patterns:
  • asin(n: number)
Since: 2.2
Return Type: Number
The inverse of the sine, also called arcsin. Returns result in degrees, not radians. Only returns values from -90 to 90.

Examples:

asin(0) = 0
asin(1) = 90
asin(0.5) = 30

atan

🔗

Function

Patterns:
  • atan(n: number)
Since: 2.2
Return Type: Number
The inverse of the tangent, also called arctan. Returns result in degrees, not radians. Only returns values from -90 to 90.

Examples:

atan(0) = 0
atan(1) = 45
atan(10000) = 89.9943

atan2

🔗

Function

Patterns:
  • atan2(x: number, y: number)
Since: 2.2
Return Type: Number
Similar to atan, but requires two coordinates and returns values from -180 to 180. The returned angle is measured counterclockwise in a standard mathematical coordinate system (x to the right, y to the top).

Examples:

atan2(0, 1) = 0
atan2(10, 0) = 90
atan2(-10, 5) = -63.4349

calcExperience

🔗

Function

Patterns:
  • calcExperience(level: long)
Since: 2.2-dev32
Return Type: long
Calculates the total amount of experience needed to achieve given level from scratch in Minecraft.

Examples:

Missing examples.

caseEquals

🔗

Function

Patterns:
  • caseEquals(strs: strings)
Since: 2.5
Return Type: Boolean
Checks if the contents of a list of strings are strictly equal with case sensitivity.

Examples:

caseEquals("hi", "Hi") = false
caseEquals("text", "text", "text") = true
caseEquals({some list variable::*})

ceil

🔗

Function

Patterns:
  • ceil(n: number)
Since: 2.2
Return Type: long
Rounds a number up, i.e. returns the closest integer larger than or equal to the argument.

Examples:

ceil(2.34) = 3
ceil(2) = 2
ceil(2.99) = 3

ceiling

🔗

Function

Patterns:
  • ceiling(n: number)
Since: 2.2
Return Type: long
Alias of ceil.

Examples:

ceiling(2.34) = 3
ceiling(2) = 2
ceiling(2.99) = 3

clamp

🔗

Function

Patterns:
  • clamp(values: numbers, min: number, max: number)
Since: INSERT VERSION
Return Type: Number
Clamps one or more values between two numbers.

Examples:

clamp(5, 0, 10) = 5
clamp(5.5, 0, 5) = 5
clamp(0.25, 0, 0.5) = 0.25
clamp(5, 7, 10) = 7
clamp((5, 0, 10, 9, 13), 7, 10) = (7, 7, 10, 9, 10)
set {_clamped::*} to clamp({_values::*}, 0, 10)

cos

🔗

Function

Patterns:
  • cos(n: number)
Since: 2.2
Return Type: Number
The cosine function. This is basically the sine shifted by 90°, i.e. cos(a) = sin(a + 90°), for any number a. Uses degrees, not radians.

Examples:

cos(0) = 1
cos(90) = 0

date

🔗

Function

Patterns:
  • date(year: number, month: number, day: number, hour: number = [[integer:0]], minute: number = [[integer:0]], second: number = [[integer:0]], millisecond: number = [[integer:0]], zone_offset: number = [[double:NaN]], dst_offset: number = [[double:NaN]])
Since: 2.2
Return Type: Date
Creates a date from a year, month, and day, and optionally also from hour, minute, second and millisecond. A time zone and DST offset can be specified as well (in minutes), if they are left out the server's time zone and DST offset are used (the created date will not retain this information).

Examples:

date(2014, 10, 1) # 0:00, 1st October 2014
date(1990, 3, 5, 14, 30) # 14:30, 5th May 1990
date(1999, 12, 31, 23, 59, 59, 999, -3*60, 0) # almost year 2000 in parts of Brazil (-3 hours offset, no DST)

exp

🔗

Function

Patterns:
  • exp(n: number)
Since: 2.2
Return Type: Number
The exponential function. You probably don't need this if you don't know what this is.

Examples:

exp(0) = 1
exp(1) = 2.7183

floor

🔗

Function

Patterns:
  • floor(n: number)
Since: 2.2
Return Type: long
Rounds a number down, i.e. returns the closest integer smaller than or equal to the argument.

Examples:

floor(2.34) = 2
floor(2) = 2
floor(2.99) = 2

isNaN

🔗

Function

Patterns:
  • isNaN(n: number)
Since: INSERT VERSION
Return Type: Boolean
Returns true if the input is NaN (not a number).

Examples:

isNaN(0) # false
isNaN(0/0) # true
isNaN(sqrt(-1)) # true

ln

🔗

Function

Patterns:
  • ln(n: number)
Since: 2.2
Return Type: Number
The natural logarithm. You probably don't need this if you don't know what this is. Returns NaN (not a number) if the argument is negative.

Examples:

ln(1) = 0
ln(exp(5)) = 5
ln(2) = 0.6931

location

🔗

Function

Patterns:
  • location(x: number, y: number, z: number, world: world = event-world, yaw: number = [[integer:0]], pitch: number = [[integer:0]])
Since: 2.2
Return Type: Location
Creates a location from a world and 3 coordinates, with an optional yaw and pitch. If for whatever reason the world is not found, it will fallback to the server's main world.

Examples:

location(0, 128, 0)
location(player's x-coordinate, player's y-coordinate + 5, player's z-coordinate, player's world, 0, 90)
location(0, 64, 0, world "world_nether")
location(100, 110, -145, world("my_custom_world"))

log

🔗

Function

Patterns:
  • log(n: number, base: number = [[integer:10]])
Since: 2.2
Return Type: Number
A logarithm, with base 10 if none is specified. This is the inverse operation to exponentiation (for positive bases only), i.e. log(base ^ exponent, base) = exponent for any positive number 'base' and any number 'exponent'. Another useful equation is base ^ log(a, base) = a for any numbers 'base' and 'a'. Please note that due to how numbers are represented in computers, these equations do not hold for all numbers, as the computed values may slightly differ from the correct value. Returns NaN (not a number) if any of the arguments are negative.

Examples:

log(100) = 2 # 10^2 = 100
log(16, 2) = 4 # 2^4 = 16

max

🔗

Function

Patterns:
  • max(ns: numbers)
Since: 2.2
Return Type: Number
Returns the maximum number from a list of numbers.

Examples:

max(1) = 1
max(1, 2, 3, 4) = 4
max({some list variable::*})

min

🔗

Function

Patterns:
  • min(ns: numbers)
Since: 2.2
Return Type: Number
Returns the minimum number from a list of numbers.

Examples:

min(1) = 1
min(1, 2, 3, 4) = 1
min({some list variable::*})

mod

🔗

Function

Patterns:
  • mod(d: number, m: number)
Since: 2.2
Return Type: Number
Returns the modulo of the given arguments, i.e. the remainder of the division d/m, where d and m are the arguments of this function. The returned value is always positive. Returns NaN (not a number) if the second argument is zero.

Examples:

mod(3, 2) = 1
mod(256436, 100) = 36
mod(-1, 10) = 9

offlineplayer

🔗

Function

Patterns:
  • offlineplayer(nameoruuid: string)
Since: INSERT VERSION
Return Type: Offline Player
Returns a offline player from their name or UUID. This function will still return the player if they're online.

Examples:

set {_p} to offlineplayer("Notch")
set {_p} to offlineplayer("069a79f4-44e9-4726-a5be-fca90e38aaf5")

player

🔗

Function

Patterns:
  • player(nameoruuid: string, getexactplayer: boolean = [[boolean:false]])
Since: INSERT VERSION
Return Type: Player
Returns an online player from their name or UUID, if player is offline function will return nothing. Setting 'getExactPlayer' parameter to true will return the player whose name is exactly equal to the provided name instead of returning a player that their name starts with the provided name.

Examples:

set {_p} to player("Notch") # will return an online player whose name is or starts with 'Notch'
set {_p} to player("Notch", true) # will return the only online player whose name is 'Notch'
set {_p} to player("069a79f4-44e9-4726-a5be-fca90e38aaf5") # &lt;none&gt; if player is offline

product

🔗

Function

Patterns:
  • product(ns: numbers)
Since: 2.2
Return Type: Number
Calculates the product of a list of numbers.

Examples:

product(1) = 1
product(2, 3, 4) = 24
product({some list variable::*})
product(2, {_v::*}, and the player's y-coordinate)

rgb

🔗

Function

Patterns:
  • rgb(red: long, green: long, blue: long)
Since: 2.5
Return Type: Color
Returns a RGB color from the given red, green and blue parameters.

Examples:

dye player's leggings rgb(120, 30, 45)

round

🔗

Function

Patterns:
  • round(n: number, d: number = [[integer:0]])
Since: 2.2, 2.7 (decimal placement)
Return Type: Number
Rounds a number, i.e. returns the closest integer to the argument. Place a second argument to define the decimal placement.

Examples:

round(2.34) = 2
round(2) = 2
round(2.99) = 3
round(2.5) = 3

sin

🔗

Function

Patterns:
  • sin(n: number)
Since: 2.2
Return Type: Number
The sine function. It starts at 0° with a value of 0, goes to 1 at 90°, back to 0 at 180°, to -1 at 270° and then repeats every 360°. Uses degrees, not radians.

Examples:

sin(90) = 1
sin(60) = 0.866

sqrt

🔗

Function

Patterns:
  • sqrt(n: number)
Since: 2.2
Return Type: Number
The square root, which is the inverse operation to squaring a number (for positive numbers only). This is the same as (argument) ^ (1/2) – other roots can be calculated via number ^ (1/root), e.g. set {_l} to {_volume}^(1/3). Returns NaN (not a number) if the argument is negative.

Examples:

sqrt(4) = 2
sqrt(2) = 1.4142
sqrt(-1) = NaN

sum

🔗

Function

Patterns:
  • sum(ns: numbers)
Since: 2.2
Return Type: Number
Sums a list of numbers.

Examples:

sum(1) = 1
sum(2, 3, 4) = 9
sum({some list variable::*})
sum(2, {_v::*}, and the player's y-coordinate)

tan

🔗

Function

Patterns:
  • tan(n: number)
Since: 2.2
Return Type: Number
The tangent function. This is basically sin(arg)/cos(arg). Uses degrees, not radians.

Examples:

tan(0) = 0
tan(45) = 1
tan(89.99) = 5729.5779

vector

🔗

Function

Patterns:
  • vector(x: number, y: number, z: number)
Since: 2.2-dev23
Return Type: Vector
Creates a new vector, which can be used with various expressions, effects and functions.

Examples:

vector(0, 0, 0)

world

🔗

Function

Patterns:
  • world(name: string)
Since: 2.2
Return Type: World
Gets a world from its name.

Examples:

set {_nether} to world("%{_world}%_nether")
\ No newline at end of file diff --git a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/docs.json b/docs/nightly/enhancement/merge-master-into-feature-attempt-2/docs.json deleted file mode 100644 index d343404d7be..00000000000 --- a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/docs.json +++ /dev/null @@ -1,9498 +0,0 @@ -{ - "skriptVersion" : "2.8.0-dev-nightly-49c4fae", - - "classes" : [ - { - "id" : "attributetype", - "name" : "Attribute Type", - "patterns" : [ - "luck, generic movement speed, horse jump strength, generic luck, generic max absorption, follow range, movement speed, max absorption, generic follow range, zombie spawn reinforcements, generic attack knockback, knockback resistance, attack knockback, generic armor toughness, generic attack speed, max health, flying speed, attack damage, generic attack damage, generic armor, generic flying speed, generic knockback resistance, armor, attack speed, armor toughness, generic max health", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Represents the type of an attribute. Note that this type does not contain any numerical values.See attribute types for more info.", - "examples" : "Missing examples." -}, -{ - "id" : "biome", - "name" : "Biome", - "patterns" : [ - "roofed forest, old growth pine taiga, mesa forest, the void, snowy taiga, hell, jagged peaks, spiked ice plains, crimson forest, stone shore, birch forest, cold taiga, cold beach, savanna, giant tree taiga, marsh, windswept forest, wooded badlands, sky, nether, void, cold ocean, giant spruce taiga, lush caves, deep lukewarm ocean, deep frozen ocean, small end islands, ice spikes, old growth birch forest, badlands, badlands forest, ocean, lukewarm ocean, ice plains spikes, gravelly mountains, frozen peaks, stony peaks, jungle, basalt deltas, snowy beach, frozen ocean, mountains, forest, wooded mesa, eroded mesa, the end, dripstone caves, swampland, end barrens, ice plains with spikes, windswept hills, sea, unknown, black forest, soul sand valley, deep dark, mesa, plains, eroded badlands, mushroom fields, windswept gravelly hills, mushroom island, wooded mountains, shattered savanna, sunflower plains, snowy plains, meadow, snowy slopes, flower forest, windswept savanna, nether wastes, stony shore, taiga, frozen river, warm ocean, custom, old growth spruce taiga, deep cold ocean, swamp, mangrove swamp, deep ocean, end highlands, end midlands, cherry grove, sparse jungle, dark forest, jungle edge, grove, snowy tundra, beach, bamboo jungle, savanna plateau, river, tall birch forest, warped forest, desert", - - "pattern_end" - ], - "since" : "1.4.4", - "description" : "All possible biomes Minecraft uses to generate a world.", - "examples" : "biome at the player is desert" -}, -{ - "id" : "block", - "name" : "Block", - "patterns" : [ - "Missing patterns.", - - "pattern_end" - ], - "since" : "1.0", - "description" : "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" : "Missing examples." -}, -{ - "id" : "blockdata", - "name" : "Block Data", - "patterns" : [ - "Missing patterns.", - - "pattern_end" - ], - "since" : "2.5", - "description" : "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]\\nset target block of player to oak stairs[facing=north;waterlogged=true]\\nset block at player to grass_block[snowy=true]\\nset loop-block to minecraft:chest[facing=north]\\nset block above player to oak_log[axis=y]\\nset target block of player to minecraft:oak_leaves[distance=2;persistent=false]" -}, -{ - "id" : "boolean", - "name" : "Boolean", - "patterns" : [ - "true/yes/on or false/no/off", - - "pattern_end" - ], - "since" : "1.0", - "description" : "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" -}, -{ - "id" : "CatType", - "name" : "Cat Type", - "patterns" : [ - "red, all black, british shorthair, ragdoll, white, jellie, siamese, black, tabby, calico, persian", - - "pattern_end" - ], - "since" : "2.4", - "description" : "Represents the race/type of a cat entity.", - "examples" : "Missing examples." -}, -{ - "id" : "chunk", - "name" : "Chunk", - "patterns" : [ - "Missing patterns.", - - "pattern_end" - ], - "since" : "2.0", - "description" : "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" : "Missing examples." -}, -{ - "id" : "clicktype", - "name" : "Click Type", - "patterns" : [ - "lmb, number key, mmb, rmb, drop item, drop key, window border using left mouse button, unknown, window border using right mouse, shift+rmb, unsupported, shift+lmb, ctrl+q, swap shield, left mouse button, left mouse with shift, left mouse, 0-9, double click, double click using mouse, border using rmb, right mouse button, right mouse button with shift, border using lmb, middle mouse, drop key with control, window border using right mouse button, swap offhand, custom, q, right mouse with shift, middle mouse button, drop stack, left mouse button with shift, right mouse, creative action", - - "pattern_end" - ], - "since" : "2.2-dev16b, 2.2-dev35 (renamed to click type)", - "description" : "Click type, mostly for inventory events. Tells exactly which keys/buttons player pressed, assuming that default keybindings are used in client side.", - "examples" : "Missing examples." -}, -{ - "id" : "color", - "name" : "Color", - "patterns" : [ - "black, dark grey/dark gray, grey/light grey/gray/light gray/silver, white, blue/dark blue, cyan/aqua/dark cyan/dark aqua, light blue/light cyan/light aqua, green/dark green, light green/lime/lime green, yellow/light yellow, orange/gold/dark yellow, red/dark red, pink/light red, purple/dark purple, magenta/light purple, brown/indigo", - - "pattern_end" - ], - "since" : "Unknown", - "description" : "Wool, dye and chat colors.", - "examples" : "color of the sheep is red or black\\nset the color of the block to green\\nmessage \"You're holding a &amp;amp;amp;amp;lt;%color of tool%&amp;amp;amp;amp;gt;%color of tool%&amp;amp;amp;amp;lt;reset&amp;amp;amp;amp;gt; wool block\"" -}, -{ - "id" : "commandsender", - "name" : "Command Sender", - "patterns" : [ - "use the console for the console", -"see player for players.", - - "pattern_end" - ], - "since" : "1.0", - "description" : "A player or the console.", - "examples" : "command /push [&amp;amp;amp;amp;amp;lt;player&amp;amp;amp;amp;amp;gt;]:\\n trigger:\\n if arg-1 is not set:\\n if command sender is console:\\n send \"You can't push yourself as a console :\\\" to sender\\n stop\\n push sender upwards with force 2\\n send \"Yay!\"\\n else:\\n push arg-1 upwards with force 2\\n send \"Yay!\" to sender and arg-1" -}, -{ - "id" : "damagecause", - "name" : "Damage Cause", - "patterns" : [ - "sweep attack, thorns, the void, magma, a lightning, drowning, dragonfire, an attack, drown, an entity attack, melt, freeze, falling block, contact, fire, an entity explosion, lightning, a fall, entity explosion, void, a lightning strike, suffocation, suicide, wither effect, a plugin, lightning strike, entity attack, a potion, a wither, sweeping, melting, a falling block, unknown, starvation, lava, fall, hot floor, attack, a block explosion, dryout, burn, hitting wall while flying, potion, world border, flying into a wall, cramming, poison, sonic boom, suffocate, custom, kill, killed, a fire, burning, a projectile, plugin, wither potion effect, block explosion, projectile, wither, dragon's breath", - - "pattern_end" - ], - "since" : "2.0", - "description" : "The cause/type of a damage event, e.g. lava, fall, fire, drowning, explosion, poison, etc.\\nPlease 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" : "Missing examples." -}, -{ - "id" : "date", - "name" : "Date", - "patterns" : [ - "Missing patterns.", - - "pattern_end" - ], - "since" : "1.4", - "description" : "A date is a certain point in the real world's time which can be obtained with now expression, unix date expression and date function.\\nSee time and timespan for the other time types of Skript.", - "examples" : "set {_yesterday} to now\\nsubtract a day from {_yesterday}\\n# now {_yesterday} represents the date 24 hours before now" -}, -{ - "id" : "difficulty", - "name" : "Difficulty", - "patterns" : [ - "normal, medium, hard, easy, peaceful", - - "pattern_end" - ], - "since" : "2.3", - "description" : "The difficulty of a world.", - "examples" : "Missing examples." -}, -{ - "id" : "direction", - "name" : "Direction", - "patterns" : [ - "see direction (expression)", - - "pattern_end" - ], - "since" : "2.0", - "description" : "A direction, e.g. north, east, behind, 5 south east, 1.3 meters to the right, etc.\\nLocations and some blocks also have a direction, but without a length.\\nPlease 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\\nloop blocks from the block infront of the player to the block 10 below the player:\\n set the block behind the loop-block to water" -}, -{ - "id" : "enchantment", - "name" : "Enchantment", - "patterns" : [ - "Efficiency, Looting, Soul Speed, Silk Touch, Quick Charge, Flame, Fortune, Aqua Affinity, Multishot, Channeling, Loyalty, Curse of Binding, Punch, Projectile Protection, Power, Sharpness, Frost Walker, Fire Protection, Impaling, Luck of The Sea, Riptide, Protection, Mending, Respiration, Piercing, Unbreaking, Swift Sneak, Feather Falling, Lure, Smite, Fire Aspect, Knockback, Depth Strider, Sweeping Edge, Infinity, Curse of Vanishing, Blast Protection, Bane of Arthropods, Thorns", - - "pattern_end" - ], - "since" : "1.4.6", - "description" : "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" : "Missing examples." -}, -{ - "id" : "enchantmentoffer", - "name" : "Enchantment Offer", - "patterns" : [ - "Missing patterns.", - - "pattern_end" - ], - "since" : "2.5", - "description" : "The enchantmentoffer in an enchant prepare event.", - "examples" : "on enchant prepare:\\n set enchant offer 1 to sharpness 1\\n set the cost of enchant offer 1 to 10 levels" -}, -{ - "id" : "enchantmenttype", - "name" : "Enchantment Type", - "patterns" : [ - "<enchantment> [<level>]", - - "pattern_end" - ], - "since" : "1.4.6", - "description" : "An enchantment with an optional level, e.g. 'sharpness 2' or 'fortune'.", - "examples" : "enchant the player's tool with sharpness 5\\nhelmet is enchanted with waterbreathing" -}, -{ - "id" : "entity", - "name" : "Entity", - "patterns" : [ - "player, op, wolf, tamed ocelot, powered creeper, zombie, unsaddled pig, fireball, arrow, dropped item, item frame, etc.", - - "pattern_end" - ], - "since" : "1.0", - "description" : "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\\nplayer is an op\\nprojectile is an arrow\\nshoot a fireball from the player" -}, -{ - "id" : "entitydata", - "name" : "Entity Type", - "patterns" : [ - "Detailed usage will be added eventually", - - "pattern_end" - ], - "since" : "1.3", - "description" : "The type of an entity, e.g. player, wolf, powered creeper, etc.", - "examples" : "victim is a cow\\nspawn a creeper" -}, -{ - "id" : "entitytype", - "name" : "Entity Type with Amount", - "patterns" : [ - "<number> <entity type>", - - "pattern_end" - ], - "since" : "1.3", - "description" : "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" -}, -{ - "id" : "experience", - "name" : "Experience", - "patterns" : [ - "[<number>] ([e]xp|experience [point[s]])", - - "pattern_end" - ], - "since" : "2.0", - "description" : "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" -}, -{ - "id" : "fireworkeffect", - "name" : "Firework Effect", - "patterns" : [ - "See Firework Types", - - "pattern_end" - ], - "since" : "2.4", - "description" : "A configuration of effects that defines the firework when exploded\\nwhich can be used in the launch firework effect.\\nSee the firework effect expression for detailed patterns.", - "examples" : "launch flickering trailing burst firework colored blue and green at player\\nlaunch trailing flickering star colored purple, yellow, blue, green and red fading to pink at target entity\\nlaunch ball large colored red, purple and white fading to light green and black at player's location with duration 1" -}, -{ - "id" : "FireworkType", - "name" : "Firework Type", - "patterns" : [ - "small, ball, star shaped, large, star, creeper face, small ball, large ball, burst, ball large, creeper", - - "pattern_end" - ], - "since" : "2.4", - "description" : "The type of a fireworkeffect.", - "examples" : "Missing examples." -}, -{ - "id" : "gamemode", - "name" : "Game Mode", - "patterns" : [ - "adventure, survival, spectator, creative", - - "pattern_end" - ], - "since" : "1.0", - "description" : "The game modes survival, creative, adventure and spectator.", - "examples" : "player's gamemode is survival\\nset the player argument's game mode to creative" -}, -{ - "id" : "gamerule", - "name" : "Gamerule", - "patterns" : [ - "doWardenSpawning, tntExplosionDropDecay, globalSoundEvents, enderPearlsVanishOnDeath, doFireTick, maxCommandChainLength, doVinesSpread, fireDamage, reducedDebugInfo, waterSourceConversion, disableElytraMovementCheck, lavaSourceConversion, announceAdvancements, drowningDamage, commandBlockOutput, forgiveDeadPlayers, doMobSpawning, maxEntityCramming, disableRaids, doWeatherCycle, mobExplosionDropDecay, doDaylightCycle, showDeathMessages, doTileDrops, universalAnger, playersSleepingPercentage, snowAccumulationHeight, doInsomnia, doImmediateRespawn, blockExplosionDropDecay, naturalRegeneration, doMobLoot, fallDamage, keepInventory, doEntityDrops, doLimitedCrafting, mobGriefing, randomTickSpeed, spawnRadius, freezeDamage, doTraderSpawning, commandModificationBlockLimit, logAdminCommands, spectatorsGenerateChunks, sendCommandFeedback, doPatrolSpawning", - - "pattern_end" - ], - "since" : "2.5", - "description" : "A gamerule", - "examples" : "Missing examples." -}, -{ - "id" : "gamerulevalue", - "name" : "Gamerule Value", - "patterns" : [ - "Missing patterns.", - - "pattern_end" - ], - "since" : "2.5", - "description" : "A wrapper for the value of a gamerule for a world.", - "examples" : "Missing examples." -}, -{ - "id" : "gene", - "name" : "Gene", - "patterns" : [ - "normal, lazy, happy, worried, worrisome, aggressive, brown, brownish, savage, playful, wild, weak", - - "pattern_end" - ], - "since" : "2.4", - "description" : "Represents a Panda's main or hidden gene. See genetics for more info.", - "examples" : "Missing examples." -}, -{ - "id" : "healreason", - "name" : "Heal Reason", - "patterns" : [ - "an ender crystal, magic, a magic regeneration, magic regeneration, fed, sated, a magic regen, regen potion, a wither spawn, peaceful, unknown, a regeneration potion, consuming, a wither effect, peaceful regeneration, wither summoning, healing potion, wither potion, an end crystal, satiated, regeneration potion, potion, satisfied, ingesting, withered, custom, a wither spawning, end crystal, eating, wither spawning, a wither summoning, wither effect, a plugin, a regen potion, plugin, withering, a potion, wither spawn, a healing potion, ender crystal, magic regen, wither, peaceful regen", - - "pattern_end" - ], - "since" : "2.5", - "description" : "The heal reason in a heal event.", - "examples" : "Missing examples." -}, -{ - "id" : "inventory", - "name" : "Inventory", - "patterns" : [ - "Missing patterns.", - - "pattern_end" - ], - "since" : "1.0", - "description" : "An inventory of a player or block. Inventories have many effects and conditions regarding the items contained.\\nAn 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" : "Missing examples." -}, -{ - "id" : "inventoryaction", - "name" : "Inventory Action", - "patterns" : [ - "drop stack from slot, swap items with hotbar, swap cursor stack, pickup single item, pickup some, drop all from cursor, move to other inventory, drop cursor stack, pickup all, swap with hotbar, nothing, drop all from slot, swap cursor, drop cursor, pickup all items, drop slot item, place all, drop cursor item, drop slot stack, drop single item from slot, swap with cursor, place some, pickup one item, drop single item from cursor, collect items to cursor, unknown, clone stack, drop stack from cursor, drop one item from slot, drop one item from cursor, unsupported, do nothing, drop one from cursor, pickup half, drop items from slot, swap stack with cursor, place all items, collect to cursor, pickup some items, drop slot, drop items from cursor, hotbar move and readd, shift move, custom, pickup single, place one item, hotbar swap items, drop one from slot, place some items, place one, pickup half stack, instant move, hotbar swap", - - "pattern_end" - ], - "since" : "2.2-dev16", - "description" : "What player just did in inventory event. Note that when in creative game mode, most actions do not work correctly.", - "examples" : "Missing examples." -}, -{ - "id" : "inventoryclosereason", - "name" : "Inventory Close Reasons", - "patterns" : [ - "disconnect, death, teleport, cannot use, new opened, unknown, can't use, unloaded, disconnected, plugin, can not use, open new, player", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "The inventory close reason in an inventory close event.", - "examples" : "Missing examples." -}, -{ - "id" : "inventorytype", - "name" : "Inventory Type", - "patterns" : [ - "barrel inventory, a loom inventory, a blast furnace inventory, workbench inventory, ender chest inventory, loom inventory, a workbench inventory, hopper inventory, a merchant inventory, a hopper inventory, chiseled bookshelf, an ender chest inventory, new smithing table, bookshelf, a jukebox, beacon inventory, shulker box inventory, a barrel inventory, a shulker box inventory, lectern inventory, chest inventory, a villager inventory, a smoker inventory, a brewing stand inventory, a smithing inventory, grindstone inventory, a crafting table inventory, a player inventory, furnace inventory, a creative inventory, blast furnace inventory, upgrade gear, a composter inventory, an enchanting table inventory, jukebox, a dropper inventory, a cartography table inventory, a upgrade gear, smoker inventory, composter inventory, a chest inventory, upgrade gear table, a upgrade gear table, dispenser inventory, player inventory, stonecutter inventory, a stonecutter inventory, a lectern inventory, merchant inventory, cartography table inventory, a chiseled bookshelf, a new smithing table, a furnace inventory, anvil inventory, a dispenser inventory, a grindstone inventory, smithing inventory, dropper inventory, brewing stand inventory, villager inventory, enchanting table inventory, a beacon inventory, a bookshelf, creative inventory, crafting table inventory, an anvil inventory", - - "pattern_end" - ], - "since" : "2.2-dev32", - "description" : "Minecraft has several different inventory types with their own use cases.", - "examples" : "Missing examples." -}, -{ - "id" : "itemstack", - "name" : "Item", - "patterns" : [ - "[<number> [of]] <alias> [of <enchantment> <level>], Where <alias> must be an alias that represents exactly one item (i.e cannot be a general alias like 'sword' or 'plant')", - - "pattern_end" - ], - "since" : "1.0", - "description" : "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).\\nYou don't usually need this type except when you want to make a command that only accepts an exact item.\\nPlease 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\\n{_item} is a torch" -}, -{ - "id" : "itemtype", - "name" : "Item Type", - "patterns" : [ - "[<number> [of]] [all/every] <alias> [of <enchantment> [<level>] [,/and <more enchantments...>]]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "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.\\nAn 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\\nadd all slabs to the inventory of the block\\nplayer's tool is a diamond sword of sharpness\\nremove a pickaxes of fortune 4 from {stored items::*}\\nset {_item} to 10 of every upside-down stair\\nblock is dirt or farmland" -}, -{ - "id" : "livingentity", - "name" : "Living Entity", - "patterns" : [ - "see entity, but ignore inanimate objects", - - "pattern_end" - ], - "since" : "1.0", - "description" : "A living entity, i.e. a mob or player, not inanimate entities like projectiles or dropped items.", - "examples" : "spawn 5 powered creepers\\nshoot a zombie from the creeper" -}, -{ - "id" : "location", - "name" : "Location", - "patterns" : [ - "Missing patterns.", - - "pattern_end" - ], - "since" : "1.0", - "description" : "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" : "Missing examples." -}, -{ - "id" : "metadataholder", - "name" : "Metadata Holder", - "patterns" : [ - "Missing patterns.", - - "pattern_end" - ], - "since" : "2.2-dev36", - "description" : "Something that can hold metadata (e.g. an entity or block)", - "examples" : "set metadata value \"super cool\" of player to true" -}, -{ - "id" : "money", - "name" : "Money", - "patterns" : [ - "<number> $ or $ <number>, where '$' is your server's currency, e.g. '10 rupees' or '£5.00'", - - "pattern_end" - ], - "since" : "2.0", - "description" : "A certain amount of money. Please note that this differs from numbers as it includes a currency symbol or name, but usually the two are interchangeable, e.g. you can both add 100$ to the player's balance and add 100 to the player's balance.", - "examples" : "add 10£ to the player's account\\nremove Fr. 9.95 from the player's money\\nset the victim's money to 0\\nincrease the attacker's balance by the level of the victim * 100" -}, -{ - "id" : "moonphase", - "name" : "Moon Phase", - "patterns" : [ - "last quarter, waning crescent, waxing gibbous, full moon, waning gibbous, waxing crescent, new moon, first quarter", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Represents the phase of a moon.", - "examples" : "Missing examples." -}, -{ - "id" : "number", - "name" : "Number", - "patterns" : [ - "[-]###[.###] (any amount of digits; very large numbers will be truncated though)", - - "pattern_end" - ], - "since" : "1.0", - "description" : "A number, e.g. 2.5, 3, or -9812454.\\nPlease 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\\nset {_temp} to 2*{_temp} - 2.5" -}, -{ - "id" : "object", - "name" : "Object", - "patterns" : [ - "Missing patterns.", - - "pattern_end" - ], - "since" : "1.0", - "description" : "The supertype of all types, meaning that if %object% is used in e.g. a condition it will accept all kinds of expressions.", - "examples" : "Missing examples." -}, -{ - "id" : "offlineplayer", - "name" : "Offline Player", - "patterns" : [ - "Missing patterns.", - - "pattern_end" - ], - "since" : "Unknown", - "description" : "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" : "Missing examples." -}, -{ - "id" : "player", - "name" : "Player", - "patterns" : [ - "Missing patterns.", - - "pattern_end" - ], - "since" : "1.0", - "description" : "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.\\nYou 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" : "Missing examples." -}, -{ - "id" : "potioneffect", - "name" : "Potion Effect", - "patterns" : [ - "speed of tier 1 for 10 seconds", - - "pattern_end" - ], - "since" : "2.5.2", - "description" : "A potion effect, including the potion effect type, tier and duration.", - "examples" : "Missing examples." -}, -{ - "id" : "potioneffecttype", - "name" : "Potion Effect Type", - "patterns" : [ - "null, speed, slowness, haste, mining fatigue, strength, instant health, instant damage, jump boost, nausea, regeneration, resistance, fire resistance, water breathing, invisibility, blindness, night vision, hunger, weakness, poison, wither, health boost, absorption, saturation, glowing, levitation, luck, bad luck, slow falling, conduit power, dolphins grace, bad omen, hero of the village, darkness", - - "pattern_end" - ], - "since" : "Unknown", - "description" : "A potion effect type, e.g. 'strength' or 'swiftness'.", - "examples" : "apply swiftness 5 to the player\\napply potion of speed 2 to the player for 60 seconds\\nremove invisibility from the victim" -}, -{ - "id" : "projectile", - "name" : "Projectile", - "patterns" : [ - "arrow, fireball, snowball, thrown potion, etc.", - - "pattern_end" - ], - "since" : "1.0", - "description" : "A projectile, e.g. an arrow, snowball or thrown potion.", - "examples" : "projectile is a snowball\\nshoot an arrow at speed 5 from the player" -}, -{ - "id" : "quitreason", - "name" : "Quit Reason", - "patterns" : [ - "disconnected, erroneous state, kicked, quit, timed out, erroneous", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Represents a quit reason from a player quit server event.", - "examples" : "Missing examples." -}, -{ - "id" : "region", - "name" : "Region", - "patterns" : [ - ""region name"", - - "pattern_end" - ], - "since" : "2.1", - "description" : "A region of a regions plugin. Skript currently supports WorldGuard, Factions, GriefPrevention and PreciousStones.\\nPlease note that some regions plugins do not have named regions, some use numerical ids to identify regions, and some may have regions with the same name in different worlds, thus using regions like \"region name\" in scripts may or may not work.", - "examples" : "Missing examples." -}, -{ - "id" : "resourcepackstate", - "name" : "Resource Pack State", - "patterns" : [ - "refused, rejected, accepted, failed, failed to download, successfully loaded, accept, fail, successfully load, refuse, declined, successfully install, success, reject, decline, successfully installed, download fail", - - "pattern_end" - ], - "since" : "2.4", - "description" : "The state in a resource pack request response event.", - "examples" : "Missing examples." -}, -{ - "id" : "cachedservericon", - "name" : "Server Icon", - "patterns" : [ - "Missing patterns.", - - "pattern_end" - ], - "since" : "2.3", - "description" : "A server icon that was loaded using the load server icon effect.", - "examples" : "Missing examples." -}, -{ - "id" : "slot", - "name" : "Slot", - "patterns" : [ - "Missing patterns.", - - "pattern_end" - ], - "since" : "Unknown", - "description" : "Represents a single slot of an inventory. Notable slots are the armour slots and furnace slots. \\nThe 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).\\nPlease 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\\ndelete helmet of the victim\\nset the color of the player's tool to green\\nenchant the player's chestplate with projectile protection 5" -}, -{ - "id" : "soundcategory", - "name" : "Sound Category", - "patterns" : [ - "hostile creatures category, speech category, records category, friendly creature category, noteblock category, hostile creature category, note block category, voice category, ambient category, noteblocks category, note blocks category, weather category, block category, friendly mob category, jukebox category, hostile mob category, master category, master volume category, hostile category, record category, blocks category, environment category, jukeboxes category, player category, players category, hostile mobs category, friendly mobs category, music category, friendly creatures category, neutral category", - - "pattern_end" - ], - "since" : "2.4", - "description" : "The category of a sound, they are used for sound options of Minecraft. See the play sound and stop sound effects.", - "examples" : "Missing examples." -}, -{ - "id" : "spawnreason", - "name" : "Spawn Reason", - "patterns" : [ - "dispense egg, egg, village defense, ocelot baby, silverfish trap, village invading, trap, dispensing egg, shoulder, drowned, metamorphosis, lightning, silverfish reveal, spell, built iron golem, natural, village invasion, frozen, mount, build wither, built wither, iron golem defense, ender pearl, creature spawner, reinforcements, build snowman, build iron golem, breeding, raid, infection, customized, spawn egg, jockey, beehive, default, golem defense, patrol, slime split, infected, sheared, mob spawner, nether portal, shear, perching, custom, built snowman, chunk generation, breed, command, duplication, explosion, spawner, cured, customised, piglin zombification", - - "pattern_end" - ], - "since" : "2.3", - "description" : "The spawn reason in a spawn event.", - "examples" : "Missing examples." -}, -{ - "id" : "teleportcause", - "name" : "Teleport Cause", - "patterns" : [ - "bed exit, nether portal, ender gateway, exiting bed, chorus fruit, ender portal, command, unknown, plugin, dismounted, ender pearl, spectator, spectate, end gateway, chorus, exit bed, gateway, dismount, end portal", - - "pattern_end" - ], - "since" : "2.2-dev35", - "description" : "The teleport cause in a teleport event.", - "examples" : "Missing examples." -}, -{ - "id" : "string", - "name" : "Text", - "patterns" : [ - "simple: "..."", -"quotes: "...""..."", -"expressions: "...%expression%..."", -"percent signs: "...%%..."", - - "pattern_end" - ], - "since" : "1.0", - "description" : "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).\\nBecause 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.\\nPlease read the article on Texts and Variable Names to learn more.", - "examples" : "broadcast \"Hello World!\"\\nmessage \"Hello %player%\"\\nmessage \"The id of \"\"%type of tool%\"\" is %id of tool%.\"" -}, -{ - "id" : "time", - "name" : "Time", - "patterns" : [ - "##:##", -"##[:##][ ]am/pm", - - "pattern_end" - ], - "since" : "1.0", - "description" : "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.\\nSee date and timespan for the other time types of Skript.", - "examples" : "at 20:00:\\n time is 8 pm\\n broadcast \"It's %time%\"" -}, -{ - "id" : "timeperiod", - "name" : "Timeperiod", - "patterns" : [ - "##:## - ##:##", -"dusk/day/dawn/night", - - "pattern_end" - ], - "since" : "1.0", - "description" : "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.\\nThis 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" -}, -{ - "id" : "timespan", - "name" : "Timespan", - "patterns" : [ - "<number> [minecraft/mc/real/rl/irl] ticks/seconds/minutes/hours/days/weeks/months/years [[,/and] <more...>]", -"[###:]##:##[.####] ([hours:]minutes:seconds[.milliseconds])", - - "pattern_end" - ], - "since" : "1.0, 2.6.1 (weeks, months, years)", - "description" : "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'.\\nNOTE: Months always have the value of 30 days, and years of 365 days.\\nSee date and time for the other time types of Skript.", - "examples" : "every 5 minecraft days:\\n wait a minecraft second and 5 ticks\\nevery 10 mc days and 12 hours:\\n halt for 12.7 irl minutes, 12 hours and 120.5 seconds" -}, -{ - "id" : "structuretype", - "name" : "Tree Type", - "patterns" : [ - "[any] <general tree/mushroom type>, e.g. tree/any jungle tree/etc.", -"<specific tree/mushroom species>, e.g. red mushroom/small jungle tree/big regular tree/etc.", - - "pattern_end" - ], - "since" : "Unknown", - "description" : "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 any regular tree at the block\\ngrow a huge red mushroom above the block" -}, -{ - "id" : "classinfo", - "name" : "Type", - "patterns" : [ - "See the type name patterns of all types - including this one", - - "pattern_end" - ], - "since" : "2.0", - "description" : "Represents a type, e.g. number, object, item type, location, block, world, entity type, etc.\\nThis 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\\n{variable} is a type # check whether the variable contains a type, e.g. number or player\\n{variable} is an object # will always succeed if the variable is set as everything is an object, even types.\\ndisable PvP in the event-world\\nkill the loop-entity" -}, -{ - "id" : "vector", - "name" : "Vector", - "patterns" : [ - "vector(x, y, z)", - - "pattern_end" - ], - "since" : "2.2-dev23", - "description" : "Vector is a collection of numbers. In Minecraft, 3D vectors are used to express velocities of entities.", - "examples" : "Missing examples." -}, -{ - "id" : "visualeffect", - "name" : "Visual Effect", - "patterns" : [ - "smoke, potion break, ender signal, mobspawner flames, arrow particles, jumping rabbit, hurt, wolf smoke, wolf hearts, wolf shaking, sheep eating, iron golem offering rose, villager hearts, angry villager entity, happy villager entity, witch magic, zombie turning to a villager, firework explosion, love hearts, squid rotation reset, entity poof, guardian target, block with shield, shield break, armor stand hit, hurt by thorns, iron golem sheathing rose, resurrection by totem, hurt by drowning, hurt by explosion, explosion, large explosion, huge explosion, firework's spark, water bubble, water splash, water wake, suspended, void fog, critical hit, magical critical hit, smoke particle, large smoke, spell, spell, potion swirl, transparent potion swirl, witch spell, water drip, lava drip, angry villager, happy villager, small smoke, note, portal, flying glyph, flame, lava pop, cloud, coloured dust, snowball break, snow shovel, slime, heart, item crack, block break, block dust, water drop, mob appearance, dragon breath, end rod, damage indicator, sweep attack, falling dust, totem, spit, squid ink, bubble pop, current down, bubble column up, nautilus, dolphin, sneeze, campfire cosy smoke, campfire signal smoke, composter, flash, falling lava, landing lava, falling water, dripping honey, falling honey, landing honey, falling nectar, soul fire flame, ash, crimson spore, warped spore, soul, dripping obsidian tear, falling obsidian tear, landing obsidian tear, reverse portal, white ash, falling spore blossom, spore blossom air, small flame, snowflake, dripping dripstone lava, falling dripstone lava, dripping dripstone water, falling dripstone water, glow squid ink, glow, wax on, wax off, electric spark, scrape, sonic boom, sculk soul, sculk charge, sculk charge pop, shriek", - - "pattern_end" - ], - "since" : "2.1", - "description" : "A visible effect, e.g. particles.", - "examples" : "show wolf hearts on the clicked wolf\\nplay mob spawner flames at the targeted block to the player" -}, -{ - "id" : "weathertype", - "name" : "Weather Type", - "patterns" : [ - "clear/sun/sunny, rain/rainy/raining, and thunder/thundering/thunderstorm", - - "pattern_end" - ], - "since" : "1.0", - "description" : "The weather types sunny, rainy, and thundering.", - "examples" : "is raining\\nis sunny in the player's world\\nmessage \"It is %weather in the argument's world% in %world of the argument%\"" -}, -{ - "id" : "world", - "name" : "World", - "patterns" : [ - ""world_name", e.g. "world"", - - "pattern_end" - ], - "since" : "1.0, 2.2 (alternate syntax)", - "description" : "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\"" -}, -{ - "id" : "environment", - "name" : "World Environment", - "patterns" : [ - "normal, nether, the end, the overworld, custom, the nether, end, overworld", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Represents the environment of a world.", - "examples" : "Missing examples." -}, - - {"end" : true} - ], - - "conditions" : [ - { - "id" : "CondAlphanumeric", - "name" : "Alphanumeric", - "patterns" : [ - "%texts% (is|are) alphanumeric", -"%texts% (isn't|is not|aren't|are not) alphanumeric", - - "pattern_end" - ], - "since" : "2.4", - "description" : "Checks if the given string is alphanumeric.", - "examples" : "if the argument is not alphanumeric:\\n send \"Invalid name!\"" -}, -{ - "id" : "CondCanBuild", - "name" : "Can Build", - "patterns" : [ - "%players% (can|(is|are) allowed to) build %directions% %locations%", -"%players% (can('t|not)|(is|are)(n't| not) allowed to) build %directions% %locations%", - - "pattern_end" - ], - "since" : "2.0", - "description" : "Tests whether a player is allowed to build at a certain location. -This condition requires a supported regions plugin to be installed.", - "examples" : "command /setblock &lt;material&gt;:\\n description: set the block at your crosshair to a different type\\n trigger:\\n player cannot build at the targeted block:\\n message \"You do not have permission to change blocks there!\"\\n stop\\n set the targeted block to argument" -}, -{ - "id" : "CondCanFly", - "name" : "Can Fly", - "patterns" : [ - "%players% can fly", -"%players% (can't|cannot|can not) fly", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Whether a player is allowed to fly.", - "examples" : "player can fly" -}, -{ - "id" : "CondCanHold", - "name" : "Can Hold", - "patterns" : [ - "%inventories% (can hold|ha(s|ve) [enough] space (for|to hold)) %item types%", -"%inventories% (can(no|')t hold|(ha(s|ve) not|ha(s|ve)n't|do[es]n't have) [enough] space (for|to hold)) %item types%", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Tests whether a player or a chest can hold the given item.", - "examples" : "block can hold 200 cobblestone\\nplayer has enough space for 64 feathers" -}, -{ - "id" : "CondCanPickUpItems", - "name" : "Can Pick Up Items", - "patterns" : [ - "%living entities% can pick([ ]up items| items up)", -"%living entities% (can't|cannot|can not) pick([ ]up items| items up)", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Whether living entities are able to pick up items off the ground or not.", - "examples" : "if player can pick items up:\\n send \"You can pick up items!\" to player\\n\\non drop:\\n if player can't pick up items:\\n send \"Be careful, you won't be able to pick that up!\" to player" -}, -{ - "id" : "CondCanSee", - "name" : "Can See", - "patterns" : [ - "%players% (is|are) [in]visible for %players%", -"%players% can see %players%", -"%players% (is|are)(n't| not) [in]visible for %players%", -"%players% can('t| not) see %players%", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Checks whether the given players can see another players.", - "examples" : "if the player can't see the player-argument:\\n message \"&lt;light red&gt;The player %player-argument% is not online!\"" -}, -{ - "id" : "CondChance", - "name" : "Chance", - "patterns" : [ - "chance of %number%[(\\%)]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "A condition that randomly succeeds or fails. -Valid values are between 0% and 100%, or if the percent sign is omitted between 0 and 1.", - "examples" : "chance of 50%:\\n drop a diamond\\nchance of {chance}% # {chance} between 0 and 100\\nchance of {chance} # {chance} between 0 and 1" -}, -{ - "id" : "CondCompare", - "name" : "Comparison", - "patterns" : [ - "[(neither)] %objects% ((is|are)[(n't| not| neither)] ((greater|more|higher|bigger|larger) than|above)|>) %objects%", -"[(neither)] %objects% ((is|are)[(n't| not| neither)] (greater|more|higher|bigger|larger|above) [than] or (equal to|the same as)|>=) %objects%", -"[(neither)] %objects% ((is|are)[(n't| not| neither)] ((less|smaller|lower) than|below)|<) %objects%", -"[(neither)] %objects% ((is|are)[(n't| not| neither)] (less|smaller|lower|below) [than] or (equal to|the same as)|<=) %objects%", -"[(neither)] %objects% ((is|are) (not|neither)|isn't|aren't|!=) [equal to] %objects%", -"[(neither)] %objects% (is|are|=) [(equal to|the same as)] %objects%", -"[(neither)] %objects% (is|are) between %objects% and %objects%", -"[(neither)] %objects% (is not|are not|isn't|aren't) between %objects% and %objects%", -"[(neither)] %objects% (was|were)[(n't| not| neither)] ((greater|more|higher|bigger|larger) than|above) %objects%", -"[(neither)] %objects% (was|were)[(n't| not| neither)] (greater|more|higher|bigger|larger|above) [than] or (equal to|the same as) %objects%", -"[(neither)] %objects% (was|were)[(n't| not| neither)] ((less|smaller|lower) than|below) %objects%", -"[(neither)] %objects% (was|were)[(n't| not| neither)] (less|smaller|lower|below) [than] or (equal to|the same as) %objects%", -"[(neither)] %objects% ((was|were) (not|neither)|wasn't|weren't) [equal to] %objects%", -"[(neither)] %objects% (was|were) [(equal to|the same as)] %objects%", -"[(neither)] %objects% (was|were) between %objects% and %objects%", -"[(neither)] %objects% (was not|were not|wasn't|weren't) between %objects% and %objects%", -"[(neither)] %objects% (will be|(will (not|neither) be|won't be)) ((greater|more|higher|bigger|larger) than|above) %objects%", -"[(neither)] %objects% (will be|(will (not|neither) be|won't be)) (greater|more|higher|bigger|larger|above) [than] or (equal to|the same as) %objects%", -"[(neither)] %objects% (will be|(will (not|neither) be|won't be)) ((less|smaller|lower) than|below) %objects%", -"[(neither)] %objects% (will be|(will (not|neither) be|won't be)) (less|smaller|lower|below) [than] or (equal to|the same as) %objects%", -"[(neither)] %objects% ((will (not|neither) be|won't be)|(isn't|aren't|is not|are not) (turning|changing) [in]to) [equal to] %objects%", -"[(neither)] %objects% (will be [(equal to|the same as)]|(is|are) (turning|changing) [in]to) %objects%", -"[(neither)] %objects% will be between %objects% and %objects%", -"[(neither)] %objects% (will not be|won't be) between %objects% and %objects%", - - "pattern_end" - ], - "since" : "1.0", - "description" : "A very general condition, it simply compares two values. Usually you can only compare for equality (e.g. block is/isn't of <type>), but some values can also be compared using greater than/less than. In that case you can also test for whether an object is between two others. -Note: This is the only element where not all patterns are shown. It has actually another two sets of similar patters, but with (was|were) or will be instead of (is|are) respectively, which check different time states of the first expression.", - "examples" : "the clicked block is a stone slab or a double stone slab\\ntime in the player's world is greater than 8:00\\nthe creature is not an enderman or an ender dragon" -}, -{ - "id" : "CondContains", - "name" : "Contains", - "patterns" : [ - "%inventories% (has|have) %item types% [in [(the[ir]|his|her|its)] inventory]", -"%inventories% (doesn't|does not|do not|don't) have %item types% [in [(the[ir]|his|her|its)] inventory]", -"%inventories/texts/objects% contain[s] %item types/texts/objects%", -"%inventories/texts/objects% (doesn't|does not|do not|don't) contain %item types/texts/objects%", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Checks whether an inventory contains an item, a text contains another piece of text, or a list (e.g. {list variable::*} or 'drops') contains another object.", - "examples" : "block contains 20 cobblestone\\nplayer has 4 flint and 2 iron ingots\\n{list::*} contains 5" -}, -{ - "id" : "CondDamageCause", - "name" : "Damage Cause", - "patterns" : [ - "[the] damage (was|is|has)[n('|o)t] [been] (caused|done|made) by %damage cause%", - - "pattern_end" - ], - "since" : "2.0", - "description" : "Tests what kind of damage caused a damage event. Refer to the Damage Cause type for a list of all possible causes.", - "examples" : "# make players use their potions of fire resistance whenever they take any kind of fire damage\\non damage:\\n damage was caused by lava, fire or burning\\n victim is a player\\n victim has a potion of fire resistance\\n cancel event\\n apply fire resistance to the victim for 30 seconds\\n remove 1 potion of fire resistance from the victim\\n# prevent mobs from dropping items under certain circumstances\\non death:\\n entity is not a player\\n damage wasn't caused by a block explosion, an attack, a projectile, a potion, fire, burning, thorns or poison\\n clear drops" -}, -{ - "id" : "CondAnchorWorks", - "name" : "Do Respawn Anchors Work", - "patterns" : [ - "respawn anchors [do[(n't| not)]] work in %worlds%", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Checks whether or not respawn anchors work in a world.", - "examples" : "respawn anchors work in world \"world_nether\"" -}, -{ - "id" : "CondWillHatch", - "name" : "Egg Will Hatch", - "patterns" : [ - "[the] egg (will|will not|won't) hatch", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Whether the egg will hatch in a Player Egg Throw event.", - "examples" : "on player egg throw:\\n if an entity won't hatch:\\n send \"Better luck next time!\" to the player" -}, -{ - "id" : "CondIsSheared", - "name" : "Entity Is Sheared", - "patterns" : [ - "%living entities% (is|are) (sheared|shorn)", -"%living entities% (isn't|is not|aren't|are not) (sheared|shorn)", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Checks whether entities are sheared. This condition only works on cows, sheep and snowmen for versions below 1.19.4.", - "examples" : "if targeted entity of player is sheared:\\n send \"This entity has nothing left to shear!\" to player" -}, -{ - "id" : "CondEntityIsWet", - "name" : "Entity is Wet", - "patterns" : [ - "%entities% (is|are) wet", -"%entities% (isn't|is not|aren't|are not) wet", - - "pattern_end" - ], - "since" : "2.6.1", - "description" : "Checks whether an entity is wet or not (in water, rain or a bubble column).", - "examples" : "if player is wet:" -}, -{ - "id" : "CondEntityIsInLiquid", - "name" : "Entity is in Liquid", - "patterns" : [ - "%entities% (is|are) in (water|lava|[a] bubble[ ]column|rain)", -"%entities% (isn't|is not|aren't|are not) in (water|lava|[a] bubble[ ]column|rain)", - - "pattern_end" - ], - "since" : "2.6.1", - "description" : "Checks whether an entity is in rain, lava, water or a bubble column.", - "examples" : "if player is in rain:\\nif player is in water:\\nplayer is in lava:\\nplayer is in bubble column" -}, -{ - "id" : "CondCancelled", - "name" : "Event Cancelled", - "patterns" : [ - "[the] event is cancel[l]ed", -"[the] event (is not|isn't) cancel[l]ed", - - "pattern_end" - ], - "since" : "2.2-dev36", - "description" : "Checks whether or not the event is cancelled.", - "examples" : "on click:\\n if event is cancelled:\\n broadcast \"no clicks allowed!\"" -}, -{ - "id" : "CondIsSet", - "name" : "Exists/Is Set", - "patterns" : [ - "%~objects% (exist[s]|(is|are) set)", -"%~objects% (do[es](n't| not) exist|(is|are)(n't| not) set)", - - "pattern_end" - ], - "since" : "1.2", - "description" : "Checks whether a given expression or variable is set.", - "examples" : "{teams::%player's uuid%::preferred-team} is not set\\non damage:\\n projectile exists\\n broadcast \"%attacker% used a %projectile% to attack %victim%!\"" -}, -{ - "id" : "CondAI", - "name" : "Has AI", - "patterns" : [ - "%living entities% (has|have) (ai|artificial intelligence)", -"%living entities% (doesn't|does not|do not|don't) have (ai|artificial intelligence)", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Checks whether an entity has AI.", - "examples" : "target entity has ai" -}, -{ - "id" : "CondHasClientWeather", - "name" : "Has Client Weather", - "patterns" : [ - "%players% (has|have) [a] (client|custom) weather [set]", -"%players% (doesn't|does not|do not|don't) have [a] (client|custom) weather [set]", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Checks whether the given players have a custom client weather", - "examples" : "if the player has custom weather:\\n message \"Your custom weather is %player's weather%\"" -}, -{ - "id" : "CondHasCustomModelData", - "name" : "Has Custom Model Data", - "patterns" : [ - "%item types% (has|have) [custom] model data", -"%item types% (doesn't|does not|do not|don't) have [custom] model data", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Check if an item has a custom model data tag", - "examples" : "player's tool has custom model data" -}, -{ - "id" : "CondHasItemCooldown", - "name" : "Has Item Cooldown", - "patterns" : [ - "%players% (has|have) [([an] item|a)] cooldown (on|for) %item types%", -"%players% (has|have) %item types% on [(item|a)] cooldown", -"%players% (doesn't|does not|do not|don't) have [([an] item|a)] cooldown (on|for) %item types%", -"%players% (doesn't|does not|do not|don't) have %item types% on [(item|a)] cooldown", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Check whether a cooldown is active on the specified material for a specific player.", - "examples" : "if player has player's tool on cooldown:\\n send \"You can't use this item right now. Wait %item cooldown of player's tool for player%\"" -}, -{ - "id" : "CondHasLineOfSight", - "name" : "Has Line of Sight", - "patterns" : [ - "%living entities% (has|have) [a] [direct] line of sight to %entities/locations%", -"%living entities% does(n't| not) have [a] [direct] line of sight to %entities/locations%", -"%living entities% (has|have) no [direct] line of sight to %entities/locations%", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Checks whether living entities have an unobstructed line of sight to other entities or locations.", - "examples" : "player has direct line of sight to location 5 blocks to the right of player\\nvictim has line of sight to attacker\\nplayer has no line of sight to location 100 blocks in front of player" -}, -{ - "id" : "CondHasMetadata", - "name" : "Has Metadata", - "patterns" : [ - "%metadata holders% (has|have) metadata [(value|tag)[s]] %texts%", -"%metadata holders% (doesn't|does not|do not|don't) have metadata [(value|tag)[s]] %texts%", - - "pattern_end" - ], - "since" : "2.2-dev36", - "description" : "Checks whether a metadata holder has a metadata tag.", - "examples" : "if player has metadata value \"healer\":" -}, -{ - "id" : "CondPermission", - "name" : "Has Permission", - "patterns" : [ - "%command senders% (has|have) [the] permission[s] %texts%", -"%command senders% (doesn't|does not|do not|don't) have [the] permission[s] %texts%", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Test whether a player has a certain permission.", - "examples" : "player has permission \"skript.tree\"\\nvictim has the permission \"admin\":\\n send \"You're attacking an admin!\" to attacker" -}, -{ - "id" : "CondPlayedBefore", - "name" : "Has Played Before", - "patterns" : [ - "%offline players% [(has|have|did)] [already] play[ed] [on (this|the) server] (before|already)", -"%offline players% (has not|hasn't|have not|haven't|did not|didn't) [(already|yet)] play[ed] [on (this|the) server] (before|already|yet)", - - "pattern_end" - ], - "since" : "1.4, 2.7 (multiple players)", - "description" : "Checks whether a player has played on this server before. You can also use on first join if you want to make triggers for new players.", - "examples" : "player has played on this server before\\nplayer hasn't played before" -}, -{ - "id" : "CondHasPotion", - "name" : "Has Potion", - "patterns" : [ - "%living entities% (has|have) potion[s] [effect[s]] %potions%", -"%living entities% (doesn't|does not|do not|don't) have potion[s] [effect[s]] %potions%", - - "pattern_end" - ], - "since" : "2.6.1", - "description" : "Checks whether the given living entities have specific potion effects.", - "examples" : "if player has potion speed:\\n send \"You are sonic!\"\\n\\nif all players have potion effects speed and haste:\\n broadcast \"You are ready to MINE!\"" -}, -{ - "id" : "CondHasResourcePack", - "name" : "Has Resource Pack", - "patterns" : [ - "%players% (has|have) [a] resource pack [(loaded|installed)]", -"%players% (doesn't|does not|do not|don't) have [a] resource pack [(loaded|installed)]", - - "pattern_end" - ], - "since" : "2.4", - "description" : "Checks whether the given players have a server resource pack loaded. Please note that this can't detect player's own resource pack, only the resource pack that sent by the server.", - "examples" : "if the player has a resource pack loaded:" -}, -{ - "id" : "CondHasScoreboardTag", - "name" : "Has Scoreboard Tag", - "patterns" : [ - "%entities% (has|have) [the] score[ ]board tag[s] %texts%", -"%entities% (doesn't|does not|do not|don't) have [the] score[ ]board tag[s] %texts%", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Checks whether the given entities has the given scoreboard tags.", - "examples" : "if the targeted armor stand has the scoreboard tag \"test tag\":" -}, -{ - "id" : "CondIgnitionProcess", - "name" : "Ignition Process", - "patterns" : [ - "[creeper[s]] %living entities% ((is|are)|(isn't|is not|aren't|are not)) going to explode", -"[creeper[s]] %living entities% ((is|are)|(isn't|is not|aren't|are not)) in the (ignition|explosion) process", -"creeper[s] %living entities% ((is|are)|(isn't|is not|aren't|are not)) ignited", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Checks if a creeper is going to explode.", - "examples" : "if the last spawned creeper is going to explode:\\n loop all players in radius 3 of the last spawned creeper\\n send \"RUN!!!\" to the loop-player" -}, -{ - "id" : "CondIsAlive", - "name" : "Is Alive", - "patterns" : [ - "%entities% (is|are) (alive|dead)", -"%entities% (isn't|is not|aren't|are not) (alive|dead)", - - "pattern_end" - ], - "since" : "2.0, 2.4-alpha4 (non-living entity support)", - "description" : "Checks whether an entity is alive. Works for non-living entities too.", - "examples" : "if {villager-buddy::%player's uuid%} is not dead:\\n\\non shoot:\\n while the projectile is alive:" -}, -{ - "id" : "CondIsBanned", - "name" : "Is Banned", - "patterns" : [ - "%offline players/texts% (is|are) banned", -"%players/texts% (is|are) IP[(-| )]banned", -"%offline players/texts% (isn't|is not|aren't|are not) banned", -"%players/texts% (isn't|is not|aren't|are not) IP[(-| )]banned", - - "pattern_end" - ], - "since" : "1.4", - "description" : "Checks whether a player or IP is banned.", - "examples" : "player is banned\\nvictim is not IP-banned\\n\"127.0.0.1\" is banned" -}, -{ - "id" : "CondRespawnLocation", - "name" : "Is Bed/Anchor Spawn", - "patterns" : [ - "[the] respawn location (was|is)[(n'| no)t] [a] (bed|respawn anchor)", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Checks what the respawn location of a player in the respawn event is.", - "examples" : "on respawn:\\n the respawn location is a bed\\n broadcast \"%player% is respawning in their bed! So cozy!\"" -}, -{ - "id" : "CondIsBlock", - "name" : "Is Block", - "patterns" : [ - "%item types% (is|are) ([a] block|blocks)", -"%item types% (isn't|is not|aren't|are not) ([a] block|blocks)", - - "pattern_end" - ], - "since" : "2.4", - "description" : "Checks whether an item is a block.", - "examples" : "player's held item is a block\\n{list::*} are blocks" -}, -{ - "id" : "CondIsBlockRedstonePowered", - "name" : "Is Block Redstone Powered", - "patterns" : [ - "%blocks% (is|are) redstone powered", -"%blocks% (is|are) indirectly redstone powered", -"%blocks% (is|are)(n't| not) redstone powered", -"%blocks% (is|are)(n't| not) indirectly redstone powered", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Checks if a block is indirectly or directly powered by redstone", - "examples" : "if clicked block is redstone powered:\\n send \"This block is well-powered by redstone!\"\\nif clicked block is indirectly redstone powered:\\n send \"This block is indirectly redstone powered.\"" -}, -{ - "id" : "CondIsBlocking", - "name" : "Is Blocking", - "patterns" : [ - "%players% (is|are) (blocking|defending) [with [a] shield]", -"%players% (isn't|is not|aren't|are not) (blocking|defending) [with [a] shield]", - - "pattern_end" - ], - "since" : "unknown (before 2.1)", - "description" : "Checks whether a player is blocking with their shield.", - "examples" : "on damage of player:\\n victim is blocking\\n damage attacker by 0.5 hearts" -}, -{ - "id" : "CondIsBurning", - "name" : "Is Burning", - "patterns" : [ - "%entities% (is|are) (burning|ignited|on fire)", -"%entities% (isn't|is not|aren't|are not) (burning|ignited|on fire)", - - "pattern_end" - ], - "since" : "1.4.4", - "description" : "Checks whether an entity is on fire, e.g. a zombie due to being in sunlight, or any entity after falling into lava.", - "examples" : "# increased attack against burning targets\\nvictim is burning:\\n increase damage by 2" -}, -{ - "id" : "CondIsCharged", - "name" : "Is Charged", - "patterns" : [ - "%living entities% (is|are) (charged|powered)", -"%living entities% (isn't|is not|aren't|are not) (charged|powered)", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Checks if a creeper is charged (powered).", - "examples" : "if the last spawned creeper is charged:\\n broadcast \"A charged creeper is at %location of last spawned creeper%\"" -}, -{ - "id" : "CondIsClimbing", - "name" : "Is Climbing", - "patterns" : [ - "%living entities% (is|are) climbing", -"%living entities% (isn't|is not|aren't|are not) climbing", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Whether a living entity is climbing, such as a spider up a wall or a player on a ladder.", - "examples" : "spawn a spider at location of spawn\\nwait a second\\nif the last spawned spider is climbing:\\n message\"The spider is now climbing!\"" -}, -{ - "id" : "CondIsEdible", - "name" : "Is Edible", - "patterns" : [ - "%item types% (is|are) edible", -"%item types% (isn't|is not|aren't|are not) edible", - - "pattern_end" - ], - "since" : "2.2-dev36", - "description" : "Checks whether an item is edible.", - "examples" : "steak is edible\\nplayer's tool is edible" -}, -{ - "id" : "CondIsEmpty", - "name" : "Is Empty", - "patterns" : [ - "%inventories/slots/texts% (is|are) empty", -"%inventories/slots/texts% (isn't|is not|aren't|are not) empty", - - "pattern_end" - ], - "since" : "unknown (before 2.1)", - "description" : "Checks whether an inventory, an inventory slot, or a text is empty.", - "examples" : "player's inventory is empty" -}, -{ - "id" : "CondIsEnchanted", - "name" : "Is Enchanted", - "patterns" : [ - "%item types% (is|are) enchanted [with %enchantment type%]", -"%item types% (isn't|is not|aren't|are not) enchanted [with %enchantment type%]", - - "pattern_end" - ], - "since" : "1.4.6", - "description" : "Checks whether an item is enchanted.", - "examples" : "tool of the player is enchanted with efficiency 2\\nhelm, chestplate, leggings or boots are enchanted" -}, -{ - "id" : "CondIsFlammable", - "name" : "Is Flammable", - "patterns" : [ - "%item types% (is|are) flammable", -"%item types% (isn't|is not|aren't|are not) flammable", - - "pattern_end" - ], - "since" : "2.2-dev36", - "description" : "Checks whether an item is flammable.", - "examples" : "wood is flammable\\nplayer's tool is flammable" -}, -{ - "id" : "CondIsFlying", - "name" : "Is Flying", - "patterns" : [ - "%players% (is|are) flying", -"%players% (isn't|is not|aren't|are not) flying", - - "pattern_end" - ], - "since" : "1.4.4", - "description" : "Checks whether a player is flying.", - "examples" : "player is not flying" -}, -{ - "id" : "CondIsFrozen", - "name" : "Is Frozen", - "patterns" : [ - "%entities% (is|are) frozen", -"%entities% (isn't|is not|aren't|are not) frozen", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Checks whether an entity is frozen.", - "examples" : "if player is frozen:\\n kill player" -}, -{ - "id" : "CondIsFuel", - "name" : "Is Fuel", - "patterns" : [ - "%item types% (is|are) [furnace] fuel", -"%item types% (isn't|is not|aren't|are not) [furnace] fuel", - - "pattern_end" - ], - "since" : "2.5.1", - "description" : "Checks whether an item can be used as fuel in a furnace.", - "examples" : "on right click on furnace:\\n if player's tool is not fuel:\\n send \"Please hold a valid fuel item in your hand\"\\n cancel event" -}, -{ - "id" : "CondIsGliding", - "name" : "Is Gliding", - "patterns" : [ - "%living entities% (is|are) gliding", -"%living entities% (isn't|is not|aren't|are not) gliding", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Checks whether a living entity is gliding.", - "examples" : "if player is gliding" -}, -{ - "id" : "CondItemInHand", - "name" : "Is Holding", - "patterns" : [ - "[%living entities%] ha(s|ve) %item types% in [main] hand", -"[%living entities%] (is|are) holding %item types% [in main hand]", -"[%living entities%] ha(s|ve) %item types% in off[(-| )]hand", -"[%living entities%] (is|are) holding %item types% in off[(-| )]hand", -"[%living entities%] (ha(s|ve) not|do[es]n't have) %item types% in [main] hand", -"[%living entities%] (is not|isn't) holding %item types% [in main hand]", -"[%living entities%] (ha(s|ve) not|do[es]n't have) %item types% in off[(-| )]hand", -"[%living entities%] (is not|isn't) holding %item types% in off[(-| )]hand", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Checks whether a player is holding a specific item. Cannot be used with endermen, use 'entity is [not] an enderman holding <item type>' instead.", - "examples" : "player is holding a stick\\nvictim isn't holding a sword of sharpness" -}, -{ - "id" : "CondIncendiary", - "name" : "Is Incendiary", - "patterns" : [ - "%entities% ((is|are) incendiary|cause[s] a[n] (incendiary|fiery) explosion)", -"%entities% ((is not|are not|isn't|aren't) incendiary|(does not|do not|doesn't|don't) cause[s] a[n] (incendiary|fiery) explosion)", -"the [event(-| )]explosion (is|(is not|isn't)) (incendiary|fiery)", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Checks if an entity will create fire when it explodes. This condition is also usable in an explosion prime event.", - "examples" : "on explosion prime:\\n if the explosion is fiery:\\n broadcast \"A fiery explosive has been ignited!\"" -}, -{ - "id" : "CondIsInfinite", - "name" : "Is Infinite", - "patterns" : [ - "%potion effects% (is|are) infinite", -"%potion effects% (isn't|is not|aren't|are not) infinite", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Checks whether potion effects are infinite.", - "examples" : "all of the active potion effects of the player are infinite" -}, -{ - "id" : "CondIsInteractable", - "name" : "Is Interactable", - "patterns" : [ - "%item types% (is|are) interactable", -"%item types% (isn't|is not|aren't|are not) interactable", - - "pattern_end" - ], - "since" : "2.5.2", - "description" : "Checks wether or not a block is interactable.", - "examples" : "on block break:\\n if event-block is interactable:\\n cancel event\\n send \"You cannot break interactable blocks!\"" -}, -{ - "id" : "CondIsInvisible", - "name" : "Is Invisible", - "patterns" : [ - "%living entities% (is|are) (invisible|visible)", -"%living entities% (isn't|is not|aren't|are not) (invisible|visible)", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Checks whether a living entity is invisible.", - "examples" : "target entity is invisible" -}, -{ - "id" : "CondIsInvulnerable", - "name" : "Is Invulnerable", - "patterns" : [ - "%entities% (is|are) invulnerable", -"%entities% (isn't|is not|aren't|are not) invulnerable", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Checks whether an entity is invulnerable.", - "examples" : "target entity is invulnerable" -}, -{ - "id" : "CondIsJumping", - "name" : "Is Jumping", - "patterns" : [ - "%living entities% (is|are) jumping", -"%living entities% (isn't|is not|aren't|are not) jumping", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Checks whether a living entity is jumping. This condition does not work on players.", - "examples" : "on spawn of zombie:\\n while event-entity is not jumping:\\n wait 5 ticks\\n push event-entity upwards" -}, -{ - "id" : "CondLeashed", - "name" : "Is Leashed", - "patterns" : [ - "%living entities% (is|are) leashed", -"%living entities% (isn't|is not|aren't|are not) leashed", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Checks to see if an entity is currently leashed.", - "examples" : "target entity is leashed" -}, -{ - "id" : "CondIsLoaded", - "name" : "Is Loaded", - "patterns" : [ - "chunk[s] %directions% [%locations%] (is|are)[((n't| not))] loaded", -"chunk [at] %number%, %number% (in|of) [world] %world% is[((n't| not))] loaded", -"[world[s]] %worlds% (is|are)[((n't| not))] loaded", - - "pattern_end" - ], - "since" : "2.3, 2.5 (revamp with chunk at location/coords)", - "description" : "Checks whether or not a chunk/world is loaded. 'chunk at 1, 1' uses chunk coords, which are location coords divided by 16.", - "examples" : "if chunk at {home::%player's uuid%} is loaded:\\nif chunk 1, 10 in world \"world\" is loaded:\\nif world(\"lobby\") is loaded:" -}, -{ - "id" : "CondIsMember", - "name" : "Is Member/Owner of Region", - "patterns" : [ - "%offline players% (is|are) ([a] member|[(the|an)] owner) of [[the] region] %regions%", -"%offline players% (is|are)(n't| not) ([a] member|[(the|an)] owner) of [[the] region] %regions%", - - "pattern_end" - ], - "since" : "2.1", - "description" : "Checks whether a player is a member or owner of a particular region. -This condition requires a supported regions plugin to be installed.", - "examples" : "on region enter:\\n player is the owner of the region\\n message \"Welcome back to %region%!\"\\n send \"%player% just entered %region%!\" to all members of the region" -}, -{ - "id" : "CondIsVectorNormalized", - "name" : "Is Normalized", - "patterns" : [ - "%vectors% (is|are) normalized", -"%vectors% (isn't|is not|aren't|are not) normalized", - - "pattern_end" - ], - "since" : "2.5.1", - "description" : "Checks whether a vector is normalized i.e. length of 1", - "examples" : "vector of player's location is normalized" -}, -{ - "id" : "CondIsOccluding", - "name" : "Is Occluding", - "patterns" : [ - "%item types% (is|are) occluding", -"%item types% (isn't|is not|aren't|are not) occluding", - - "pattern_end" - ], - "since" : "2.5.1", - "description" : "Checks whether an item is a block and completely blocks vision.", - "examples" : "player's tool is occluding" -}, -{ - "id" : "CondIsOnline", - "name" : "Is Online", - "patterns" : [ - "%offline players% (is|are) (online|offline)", -"%offline players% (isn't|is not|aren't|are not) (online|offline)", - - "pattern_end" - ], - "since" : "1.4", - "description" : "Checks whether a player is online.", - "examples" : "player is online\\nplayer-argument is offline" -}, -{ - "id" : "CondIsOp", - "name" : "Is Operator", - "patterns" : [ - "%offline players% (is|are) [[a] server|an] op[erator][s]", -"%offline players% (isn't|is not|aren't|are not) [[a] server|an] op[erator][s]", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Checks whether a player is a server operator.", - "examples" : "player is an operator" -}, -{ - "id" : "CondIsPassable", - "name" : "Is Passable", - "patterns" : [ - "%blocks% (is|are) passable", -"%blocks% (isn't|is not|aren't|are not) passable", - - "pattern_end" - ], - "since" : "2.5.1", - "description" : "Checks whether a block is passable. -A block is passable if it has no colliding parts that would prevent players from moving through it. -Blocks like tall grass, flowers, signs, etc. are passable, but open doors, fence gates, trap doors, etc. are not because they still have parts that can be collided with.", - "examples" : "if player's targeted block is passable" -}, -{ - "id" : "CondIsPluginEnabled", - "name" : "Is Plugin Enabled", - "patterns" : [ - "plugin[s] %texts% (is|are) enabled", -"plugin[s] %texts% (is|are)(n't| not) enabled", -"plugin[s] %texts% (is|are) disabled", - - "pattern_end" - ], - "since" : "2.6", - "description" : "Check if a plugin is enabled/disabled on the server. -Plugin names can be found in the plugin's 'plugin.yml' file or by using the '/plugins' command, they are NOT the name of the plugin's jar file. -When checking if a plugin is not enabled, this will return true if the plugin is either disabled or not on the server. -When checking if a plugin is disabled, this will return true if the plugin is on the server and is disabled.", - "examples" : "if plugin \"Vault\" is enabled:\\nif plugin \"WorldGuard\" is not enabled:\\nif plugins \"Essentials\" and \"Vault\" are enabled:\\nif plugin \"MyBrokenPlugin\" is disabled:" -}, -{ - "id" : "CondIsPoisoned", - "name" : "Is Poisoned", - "patterns" : [ - "%living entities% (is|are) poisoned", -"%living entities% (isn't|is not|aren't|are not) poisoned", - - "pattern_end" - ], - "since" : "1.4.4", - "description" : "Checks whether an entity is poisoned.", - "examples" : "player is poisoned:\\n cure the player from poison\\n message \"You have been cured!\"" -}, -{ - "id" : "CondIsPreferredTool", - "name" : "Is Preferred Tool", - "patterns" : [ - "%item types% (is|are) %blocks/block datas%'s preferred tool[s]", -"%item types% (is|are) [the|a] preferred tool[s] (for|of) %blocks/block datas%", -"%item types% (is|are)(n't| not) %blocks/block datas%'s preferred tool[s]", -"%item types% (is|are)(n't| not) [the|a] preferred tool[s] (for|of) %blocks/block datas%", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Checks whether an item is the preferred tool for a block. A preferred tool is one that will drop the block's item when used. For example, a wooden pickaxe is a preferred tool for grass and stone blocks, but not for iron ore.", - "examples" : "on left click:\\n event-block is set\\n if player's tool is the preferred tool for event-block:\\n break event-block naturally using player's tool\\n else:\\n cancel event" -}, -{ - "id" : "CondIsRiding", - "name" : "Is Riding", - "patterns" : [ - "%entities% (is|are) riding [%entity types%]", -"%entities% (isn't|is not|aren't|are not) riding [%entity types%]", - - "pattern_end" - ], - "since" : "2.0", - "description" : "Tests whether an entity is riding another or is in a vehicle.", - "examples" : "player is riding a saddled pig" -}, -{ - "id" : "CondIsRiptiding", - "name" : "Is Riptiding", - "patterns" : [ - "%living entities% (is|are) riptiding", -"%living entities% (isn't|is not|aren't|are not) riptiding", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Checks to see if an entity is currently using the Riptide enchantment.", - "examples" : "target entity is riptiding" -}, -{ - "id" : "CondScriptLoaded", - "name" : "Is Script Loaded", - "patterns" : [ - "script[s] [%texts%] (is|are) loaded", -"script[s] [%texts%] (isn't|is not|aren't|are not) loaded", - - "pattern_end" - ], - "since" : "2.2-dev31", - "description" : "Check if the current script, or another script, is currently loaded.", - "examples" : "script is loaded\\nscript \"example.sk\" is loaded" -}, -{ - "id" : "CondIsSilent", - "name" : "Is Silent", - "patterns" : [ - "%entities% (is|are) silent", -"%entities% (isn't|is not|aren't|are not) silent", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Checks whether an entity is silent i.e. its sounds are disabled.", - "examples" : "target entity is silent" -}, -{ - "id" : "CondIsSleeping", - "name" : "Is Sleeping", - "patterns" : [ - "%players% (is|are) sleeping", -"%players% (isn't|is not|aren't|are not) sleeping", - - "pattern_end" - ], - "since" : "1.4.4", - "description" : "Checks whether a player is sleeping.", - "examples" : "# cut your enemies' throats in their sleep >=)\\non attack:\\n attacker is holding a sword\\n victim is sleeping\\n increase the damage by 1000" -}, -{ - "id" : "CondIsSlimeChunk", - "name" : "Is Slime Chunk", - "patterns" : [ - "%chunk% (is|are) ([a] slime chunk|slime chunks|slimey)", -"%chunk% (isn't|is not|aren't|are not) ([a] slime chunk|slime chunks|slimey)", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Tests whether a chunk is a so-called slime chunk. -Slimes can generally spawn in the swamp biome and in slime chunks. -For more info, see the Minecraft wiki.", - "examples" : "command /slimey:\\n trigger:\\n if chunk at player is a slime chunk:\\n send \"Yeah, it is!\"\\n else:\\n send \"Nope, it isn't\"" -}, -{ - "id" : "CondIsSneaking", - "name" : "Is Sneaking", - "patterns" : [ - "%players% (is|are) sneaking", -"%players% (isn't|is not|aren't|are not) sneaking", - - "pattern_end" - ], - "since" : "1.4.4", - "description" : "Checks whether a player is sneaking.", - "examples" : "# prevent mobs from seeing sneaking players if they are at least 4 meters apart\\non target:\\n target is sneaking\\n distance of target and the entity is bigger than 4\\n cancel the event" -}, -{ - "id" : "CondIsSolid", - "name" : "Is Solid", - "patterns" : [ - "%item types% (is|are) solid", -"%item types% (isn't|is not|aren't|are not) solid", - - "pattern_end" - ], - "since" : "2.2-dev36", - "description" : "Checks whether an item is solid.", - "examples" : "grass block is solid\\nplayer's tool isn't solid" -}, -{ - "id" : "CondIsSprinting", - "name" : "Is Sprinting", - "patterns" : [ - "%players% (is|are) sprinting", -"%players% (isn't|is not|aren't|are not) sprinting", - - "pattern_end" - ], - "since" : "1.4.4", - "description" : "Checks whether a player is sprinting.", - "examples" : "player is not sprinting" -}, -{ - "id" : "CondIsStackable", - "name" : "Is Stackable", - "patterns" : [ - "%item stacks% (is|are) stackable", -"%item stacks% (isn't|is not|aren't|are not) stackable", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Checks whether an item is stackable.", - "examples" : "diamond axe is stackable\\nbirch wood is stackable\\ntorch is stackable" -}, -{ - "id" : "CondIsSwimming", - "name" : "Is Swimming", - "patterns" : [ - "%living entities% (is|are) swimming", -"%living entities% (isn't|is not|aren't|are not) swimming", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Checks whether a living entity is swimming.", - "examples" : "player is swimming" -}, -{ - "id" : "CondIsTameable", - "name" : "Is Tameable", - "patterns" : [ - "%living entities% (is|are) tameable", -"%living entities% (isn't|is not|aren't|are not) tameable", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Check if an entity is tameable.", - "examples" : "on damage:\\n if victim is tameable:\\n cancel event" -}, -{ - "id" : "CondIsTransparent", - "name" : "Is Transparent", - "patterns" : [ - "%item types% (is|are) transparent", -"%item types% (isn't|is not|aren't|are not) transparent", - - "pattern_end" - ], - "since" : "2.2-dev36", - "description" : "Checks whether an item is transparent. Note that this condition may not work for all blocks, due to the transparency list used by Spigot not being completely accurate.", - "examples" : "player's tool is transparent." -}, -{ - "id" : "CondIsUnbreakable", - "name" : "Is Unbreakable", - "patterns" : [ - "%item types% (is|are) unbreakable", -"%item types% (isn't|is not|aren't|are not) unbreakable", - - "pattern_end" - ], - "since" : "2.5.1", - "description" : "Checks whether an item is unbreakable.", - "examples" : "if event-item is unbreakable" -}, -{ - "id" : "CondIsValid", - "name" : "Is Valid", - "patterns" : [ - "%entities% (is|are) valid", -"%entities% (isn't|is not|aren't|are not) valid", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Checks whether an entity has died or been despawned for some other reason.", - "examples" : "if event-entity is valid" -}, -{ - "id" : "CondIsWearing", - "name" : "Is Wearing", - "patterns" : [ - "%living entities% (is|are) wearing %item types%", -"%living entities% (isn't|is not|aren't|are not) wearing %item types%", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Checks whether a player is wearing some armour.", - "examples" : "player is wearing an iron chestplate and iron leggings\\nplayer is wearing all diamond armour" -}, -{ - "id" : "CondIsWhitelisted", - "name" : "Is Whitelisted", - "patterns" : [ - "[the] server (is|is(n't| not)) white[ ]listed", -"%players% (is|are)[(n't| not)] white[ ]listed", - - "pattern_end" - ], - "since" : "2.5.2", - "description" : "Whether or not the server or a player is whitelisted.", - "examples" : "if server is whitelisted:\\nif player is whitelisted" -}, -{ - "id" : "CondIsWithin", - "name" : "Is Within", - "patterns" : [ - "%locations% (is|are) within %location% and %location%", -"%locations% (isn't|is not|aren't|are not) within %location% and %location%", -"%locations% (is|are) (within|in[side [of]]) %entity/chunk/world/block%", -"%locations% (isn't|is not|aren't|are not) (within|in[side [of]]) %entity/chunk/world/block%", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Whether a location is within something else. The \"something\" can be a block, an entity, a chunk, a world, or a cuboid formed by two other locations. -Note that using the is between condition will refer to a straight line between locations, while this condition will refer to the cuboid between locations.", - "examples" : "if player's location is within {_loc1} and {_loc2}:\\n send \"You are in a PvP zone!\" to player\\n\\nif player is in world(\"world\"):\\n send \"You are in the overworld!\" to player\\n\\nif attacker's location is inside of victim:\\n cancel event\\n send \"Back up!\" to attacker and victim" -}, -{ - "id" : "CondWithinRadius", - "name" : "Is Within Radius", - "patterns" : [ - "%locations% (is|are) within %number% (block|metre|meter)[s] (around|of) %locations%", -"%locations% (isn't|is not|aren't|are not) within %number% (block|metre|meter)[s] (around|of) %locations%", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Checks whether a location is within a certain radius of another location.", - "examples" : "on damage:\\n if attacker's location is within 10 blocks around {_spawn}:\\n cancel event\\n send \"You can't PVP in spawn.\"" -}, -{ - "id" : "CondIsSkriptCommand", - "name" : "Is a Skript command", - "patterns" : [ - "%text% (is|are) [a] s(k|c)ript (command|cmd)", -"%text% (isn't|is not|aren't|are not) [a] s(k|c)ript (command|cmd)", - - "pattern_end" - ], - "since" : "2.6", - "description" : "Checks whether a command/string is a custom Skript command.", - "examples" : "# Example 1\\non command:\\n command is a skript command\\n\\n# Example 2\\n\"sometext\" is a skript command" -}, -{ - "id" : "CondIsOfType", - "name" : "Is of Type", - "patterns" : [ - "%item stacks/entities% (is|are) of type[s] %entity types/entity types%", -"%item stacks/entities% (isn't|is not|aren't|are not) of type[s] %entity types/entity types%", - - "pattern_end" - ], - "since" : "1.4", - "description" : "Checks whether an item of an entity is of the given type. This is mostly useful for variables, as you can use the general 'is' condition otherwise (e.g. 'victim is a creeper').", - "examples" : "tool is of type {selected type}\\nvictim is of type {villager type}" -}, -{ - "id" : "CondIsOnGround", - "name" : "Is on Ground", - "patterns" : [ - "%entities% (is|are) on [the] ground", -"%entities% (isn't|is not|aren't|are not) on [the] ground", - - "pattern_end" - ], - "since" : "2.2-dev26", - "description" : "Checks whether an entity is on ground.", - "examples" : "player is not on ground" -}, -{ - "id" : "CondIsLeftHanded", - "name" : "Left Handed", - "patterns" : [ - "%living entities% (is|are) (left|right)( |-)handed", -"%living entities% (isn't|is not|aren't|are not) (left|right)( |-)handed", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Checks if living entities or players are left or right-handed. Armor stands are neither right nor left-handed. -Paper 1.17.1+ is required for non-player entities.", - "examples" : "on damage of player:\\n if victim is left handed:\\n cancel event" -}, -{ - "id" : "CondMatches", - "name" : "Matches", - "patterns" : [ - "%texts% (match[es]|do[es](n't| not) match) %texts%", -"%texts% (partially match[es]|do[es](n't| not) partially match) %texts%", - - "pattern_end" - ], - "since" : "2.5.2", - "description" : "Checks whether the defined strings match the input regexes (Regular expressions).", - "examples" : "on chat:\\n if message partially matches \"\\d\":\\n send \"Message contains a digit!\"\\n if message doesn't match \"[A-Za-z]+\":\\n send \"Message doesn't only contain letters!\"" -}, -{ - "id" : "CondPvP", - "name" : "PvP", - "patterns" : [ - "(is PvP|PvP is) enabled [in %worlds%]", -"(is PvP|PvP is) disabled [in %worlds%]", - - "pattern_end" - ], - "since" : "1.3.4", - "description" : "Checks the PvP state of a world.", - "examples" : "PvP is enabled\\nPvP is disabled in \"world\"" -}, -{ - "id" : "CondRegionContains", - "name" : "Region Contains", - "patterns" : [ - "[[the] region] %regions% contain[s] %directions% %locations%", -"%locations% (is|are) ([contained] in|part of) [[the] region] %regions%", -"[[the] region] %regions% (do|does)(n't| not) contain %directions% %locations%", -"%locations% (is|are)(n't| not) (contained in|part of) [[the] region] %regions%", - - "pattern_end" - ], - "since" : "2.1", - "description" : "Checks whether a location is contained in a particular region. -This condition requires a supported regions plugin to be installed.", - "examples" : "player is in the region {regions::3}\\n\\non region enter:\\n region contains {flags.%world%.red}\\n message \"The red flag is near!\"" -}, -{ - "id" : "CondResourcePack", - "name" : "Resource Pack", - "patterns" : [ - "[the] resource pack (was|is|has) [been] %resource pack state%", -"[the] resource pack (was|is|has)(n't| not) [been] %resource pack state%", - - "pattern_end" - ], - "since" : "2.4", - "description" : "Checks state of the resource pack in a resource pack request response event.", - "examples" : "on resource pack response:\\n if the resource pack wasn't accepted:\\n kick the player due to \"You have to install the resource pack to play in this server!\"" -}, -{ - "id" : "CondMinecraftVersion", - "name" : "Running Minecraft", - "patterns" : [ - "running [below] minecraft %text%", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Checks if current Minecraft version is given version or newer.", - "examples" : "running minecraft \"1.14\"" -}, -{ - "id" : "CondStartsEndsWith", - "name" : "Starts/Ends With", - "patterns" : [ - "%texts% (start|end)[s] with %texts%", -"%texts% (doesn't|does not|do not|don't) (start|end) with %texts%", - - "pattern_end" - ], - "since" : "2.2-dev36, 2.5.1 (multiple strings support)", - "description" : "Checks if a text starts or ends with another.", - "examples" : "if the argument starts with \"test\" or \"debug\":\\n send \"Stop!\"" -}, -{ - "id" : "CondDate", - "name" : "Time", - "patterns" : [ - "%date% (was|were)( more|(n't| not) less) than %time span% [ago]", -"%date% (was|were)((n't| not) more| less) than %time span% [ago]", - - "pattern_end" - ], - "since" : "2.0", - "description" : "Tests whether a given real time was more or less than some time span ago.", - "examples" : "command /command-with-cooldown:\\n trigger:\\n {command::%player's uuid%::last-usage} was less than a minute ago:\\n message \"Please wait a minute between uses of this command.\"\\n stop\\n set {command::%player's uuid%::last-usage} to now\\n # ... actual command trigger here ..." -}, - - {"end" : true} - ], - - "effects" : [ - { - "id" : "EffActionBar", - "name" : "Action Bar", - "patterns" : [ - "send [the] action[ ]bar [with text] %text% [to %players%]", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Sends an action bar message to the given player(s).", - "examples" : "send action bar \"Hello player!\" to player" -}, -{ - "id" : "EffApplyBoneMeal", - "name" : "Apply Bone Meal", - "patterns" : [ - "apply [%number%] bone[ ]meal[s] [to %blocks%]", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Applies bone meal to a crop, sapling, or composter", - "examples" : "apply 3 bone meal to event-block" -}, -{ - "id" : "EffBan", - "name" : "Ban", - "patterns" : [ - "ban %texts/offline players% [(by reason of|because [of]|on account of|due to) %text%] [for %time span%]", -"unban %texts/offline players%", -"ban %players% by IP [(by reason of|because [of]|on account of|due to) %text%] [for %time span%]", -"unban %players% by IP", -"IP(-| )ban %players% [(by reason of|because [of]|on account of|due to) %text%] [for %time span%]", -"(IP(-| )unban|un[-]IP[-]ban) %players%", - - "pattern_end" - ], - "since" : "1.4, 2.1.1 (ban reason), 2.5 (timespan)", - "description" : "Bans or unbans a player or an IP address. -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. -Consider using the kick effect after applying a ban.", - "examples" : "unban player\\nban \"127.0.0.1\"\\nIP-ban the player because \"he is an idiot\"\\nban player due to \"inappropriate language\" for 2 days" -}, -{ - "id" : "EffBreakNaturally", - "name" : "Break Block", - "patterns" : [ - "break %blocks% [naturally] [using %item type%]", - - "pattern_end" - ], - "since" : "2.4", - "description" : "Breaks the block and spawns items as if a player had mined it - -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" : "on right click:\\n break clicked block naturally\\nloop blocks in radius 10 around player:\\n break loop-block using player's tool\\nloop blocks in radius 10 around player:\\n break loop-block naturally using diamond pickaxe" -}, -{ - "id" : "EffBroadcast", - "name" : "Broadcast", - "patterns" : [ - "broadcast %objects% [(to|in) %worlds%]", - - "pattern_end" - ], - "since" : "1.0, 2.6 (broadcasting objects), 2.6.1 (using advanced formatting)", - "description" : "Broadcasts a message to the server.", - "examples" : "broadcast \"Welcome %player% to the server!\"\\nbroadcast \"Woah! It's a message!\"" -}, -{ - "id" : "EffCancelCooldown", - "name" : "Cancel Command Cooldown", - "patterns" : [ - "(cancel|ignore) [the] [current] [command] cooldown", -"un(cancel|ignore) [the] [current] [command] cooldown", - - "pattern_end" - ], - "since" : "2.2-dev34", - "description" : "Only usable in commands. Makes it so the current command usage isn't counted towards the cooldown.", - "examples" : "command /nick &lt;text&gt;:\\n executable by: players\\n cooldown: 10 seconds\\n trigger:\\n if length of arg-1 is more than 16:\\n # Makes it so that invalid arguments don't make you wait for the cooldown again\\n cancel the cooldown\\n send \"Your nickname may be at most 16 characters.\"\\n stop\\n set the player's display name to arg-1" -}, -{ - "id" : "EffCancelDrops", - "name" : "Cancel Drops", - "patterns" : [ - "(cancel|clear|delete) [the] drops [of (items|[e]xp[erience][s])]", -"(cancel|clear|delete) [the] (item|[e]xp[erience]) drops", - - "pattern_end" - ], - "since" : "2.4", - "description" : "Cancels drops of items or experiences in a death or block break event. Please note that this doesn't keep items or experiences of a dead player. If you want to do that, use the Keep Inventory / Experience effect.", - "examples" : "on death of a zombie:\\n if name of the entity is \"&cSpecial\":\\n cancel drops of items\\n\\non break of a coal ore:\\n cancel the experience drops" -}, -{ - "id" : "EffCancelEvent", - "name" : "Cancel Event", - "patterns" : [ - "cancel [the] event", -"uncancel [the] event", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Cancels the event (e.g. prevent blocks from being placed, or damage being taken).", - "examples" : "on damage:\\n victim is a player\\n victim has the permission \"skript.god\"\\n cancel the event" -}, -{ - "id" : "EffChange", - "name" : "Change: Set/Add/Remove/Delete/Reset", - "patterns" : [ - "(add|give) %objects% to %~objects%", -"increase %~objects% by %objects%", -"give %~objects% %objects%", -"set %~objects% to %objects%", -"remove (all|every) %objects% from %~objects%", -"(remove|subtract) %objects% from %~objects%", -"(reduce|decrease) %~objects% by %objects%", -"(delete|clear) %~objects%", -"reset %~objects%", - - "pattern_end" - ], - "since" : "1.0 (set, add, remove, delete), 2.0 (remove all)", - "description" : "A very general effect that can change many expressions. Many expressions can only be set and/or deleted, while some can have things added to or removed from them.", - "examples" : "# set:\\nSet the player's display name to \"&lt;red&gt;%name of player%\"\\nset the block above the victim to lava\\n# add:\\nadd 2 to the player's health # preferably use '<a href='#EffHealth'>heal</a>' for this\\nadd argument to {blacklist::*}\\ngive a diamond pickaxe of efficiency 5 to the player\\nincrease the data value of the clicked block by 1\\n# remove:\\nremove 2 pickaxes from the victim\\nsubtract 2.5 from {points::%uuid of player%}\\n# remove all:\\nremove every iron tool from the player\\nremove all minecarts from {entitylist::*}\\n# delete:\\ndelete the block below the player\\nclear drops\\ndelete {variable}\\n# reset:\\nreset walk speed of player\\nreset chunk at the targeted block" -}, -{ - "id" : "EffChargeCreeper", - "name" : "Charge Creeper", - "patterns" : [ - "make %living entities% [a[n]] (charged|powered|((un|non[-])charged|(un|non[-])powered)) [creeper[s]]", -"(charge|power|(uncharge|unpower)) %living entities%", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Charges or uncharges a creeper. A creeper is charged when it has been struck by lightning.", - "examples" : "on spawn of creeper:\\n charge the event-entity" -}, -{ - "id" : "EffColorItems", - "name" : "Color Items", - "patterns" : [ - "(dye|colo[u]r|paint) %item types% %color%", -"(dye|colo[u]r|paint) %item types% \\(%number%, %number%, %number%\\)", - - "pattern_end" - ], - "since" : "2.0, 2.2-dev26 (maps and potions)", - "description" : "Colors items in a given color. You can also use RGB codes if you feel limited with the 16 default colors. RGB codes are three numbers from 0 to 255 in the order (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" : "dye player's helmet blue\\ncolor the player's tool red" -}, -{ - "id" : "EffCommand", - "name" : "Command", - "patterns" : [ - "[execute] [the] [bungee[cord]] command %texts% [by %command senders%]", -"[execute] [the] %command senders% [bungee[cord]] command %texts%", -"(let|make) %command senders% execute [[the] [bungee[cord]] command] %texts%", - - "pattern_end" - ], - "since" : "1.0, INSERT VERSION (bungeecord command)", - "description" : "Executes a command. This can be useful to use other plugins in triggers. -If the command is a bungeecord side command, you can use the [bungeecord] option to execute command on the proxy.", - "examples" : "make player execute command \"/home\"\\nexecute console command \"/say Hello everyone!\"\\nexecute player bungeecord command \"/alert &6Testing Announcement!\"" -}, -{ - "id" : "EffConnect", - "name" : "Connect", - "patterns" : [ - "connect %players% to [server] %text%", -"send %players% to server %text%", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Connects a player to another bungeecord server", - "examples" : "connect all players to \"hub\"" -}, -{ - "id" : "EffContinue", - "name" : "Continue", - "patterns" : [ - "continue [this loop|[the] [current] loop]", -"continue [the] %*integer%(st|nd|rd|th) loop", - - "pattern_end" - ], - "since" : "2.2-dev37, 2.7 (while loops), INSERT VERSION (outer loops)", - "description" : "Moves the loop to the next iteration. You may also continue an outer loop from an inner one. The loops are labelled from 1 until the current loop, starting with the outermost one.", - "examples" : "# Broadcast online moderators\\nloop all players:\\n if loop-value does not have permission \"moderator\":\\n continue # filter out non moderators\\n broadcast \"%loop-player% is a moderator!\" # Only moderators get broadcast\\n \\n# Game starting counter\\nset {_counter} to 11\\nwhile {_counter} > 0:\\n remove 1 from {_counter}\\n wait a second\\n if {_counter} != 1, 2, 3, 5 or 10:\\n continue # only print when counter is 1, 2, 3, 5 or 10\\n broadcast \"Game starting in %{_counter}% second(s)\"" -}, -{ - "id" : "EffHealth", - "name" : "Damage/Heal/Repair", - "patterns" : [ - "damage %living entities/item types% by %number% [heart[s]] [with fake cause %damage cause%]", -"heal %living entities% [by %number% [heart[s]]]", -"repair %item types% [by %number%]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Damage/Heal/Repair an entity, or item.", - "examples" : "damage player by 5 hearts\\nheal the player\\nrepair tool of player" -}, -{ - "id" : "Delay", - "name" : "Delay", - "patterns" : [ - "(wait|halt) [for] %time span%", - - "pattern_end" - ], - "since" : "1.4", - "description" : "Delays the script's execution by a given timespan. Please note that delays are not persistent, e.g. trying to create a tempban script with 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" : "wait 2 minutes\\nhalt for 5 minecraft hours\\nwait a tick" -}, -{ - "id" : "EffDoIf", - "name" : "Do If", - "patterns" : [ - "<.+> if <.+>", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Execute an effect if a condition is true.", - "examples" : "on join:\\n give a diamond to the player if the player has permission \"rank.vip\"" -}, -{ - "id" : "EffDrop", - "name" : "Drop", - "patterns" : [ - "drop %item types/experience points% [%directions% %locations%] [without velocity]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Drops one or more items.", - "examples" : "on death of creeper:\\n drop 1 TNT" -}, -{ - "id" : "EffScriptFile", - "name" : "Enable/Disable/Reload Script File", - "patterns" : [ - "((enable|load)|reload|(disable|unload)) s(c|k)ript [file] %text%", - - "pattern_end" - ], - "since" : "2.4", - "description" : "Enables, disables, or reloads a script file.", - "examples" : "reload script \"test\"\\nenable script file \"testing\"\\nunload script file \"script.sk\"" -}, -{ - "id" : "EffEnchant", - "name" : "Enchant/Disenchant", - "patterns" : [ - "enchant %~item types% with %enchantment types%", -"disenchant %~item types%", - - "pattern_end" - ], - "since" : "2.0", - "description" : "Enchant or disenchant an existing item.", - "examples" : "enchant the player's tool with sharpness 5\\ndisenchant the player's tool" -}, -{ - "id" : "EffEquip", - "name" : "Equip", - "patterns" : [ - "equip [%living entities%] with %item types%", -"make %living entities% wear %item types%", -"unequip %item types% [from %living entities%]", -"unequip %living entities%'[s] (armor|equipment)", - - "pattern_end" - ], - "since" : "1.0, 2.7 (multiple entities, unequip)", - "description" : "Equips or unequips an entity with some given armor. This will replace any armor that the entity is wearing.", - "examples" : "equip player with diamond helmet\\nequip player with all diamond armor\\nunequip diamond chestplate from player\\nunequip all armor from player\\nunequip player's armor" -}, -{ - "id" : "EffExit", - "name" : "Exit", - "patterns" : [ - "(exit|stop) [trigger]", -"(exit|stop) [(1|a|the|this)] (section|loop|conditional)", -"(exit|stop) <\\d+> (section|loop|conditional)s", -"(exit|stop) all (section|loop|conditional)s", - - "pattern_end" - ], - "since" : "unknown (before 2.1)", - "description" : "Exits a given amount of loops and conditionals, or the entire trigger.", - "examples" : "if player has any ore:\\n stop\\nmessage \"%player% has no ores!\"\\nloop blocks above the player:\\n loop-block is not air:\\n exit 2 sections\\n set loop-block to water" -}, -{ - "id" : "EffExplodeCreeper", - "name" : "Explode Creeper", - "patterns" : [ - "instantly explode [creeper[s]] %living entities%", -"explode [creeper[s]] %living entities% instantly", -"ignite creeper[s] %living entities%", -"start (ignition|explosion) [process] of [creeper[s]] %living entities%", -"stop (ignition|explosion) [process] of [creeper[s]] %living entities%", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Starts the explosion process of a creeper or instantly explodes it.", - "examples" : "start explosion of the last spawned creeper\\nstop ignition of the last spawned creeper" -}, -{ - "id" : "EffExplosion", - "name" : "Explosion", - "patterns" : [ - "[(create|make)] [an] explosion (of|with) (force|strength|power) %number% [%directions% %locations%] [with fire]", -"[(create|make)] [a] safe explosion (of|with) (force|strength|power) %number% [%directions% %locations%]", -"[(create|make)] [a] fake explosion [%directions% %locations%]", -"[(create|make)] [an] explosion[ ]effect [%directions% %locations%]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Creates an explosion of a given force. The Minecraft Wiki has an article on explosions which lists the explosion forces of TNT, creepers, etc. -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 10 at the player\\ncreate an explosion of force 0 at the victim" -}, -{ - "id" : "EffFeed", - "name" : "Feed", - "patterns" : [ - "feed [the] %players% [by %number% [beef[s]]]", - - "pattern_end" - ], - "since" : "2.2-dev34", - "description" : "Feeds the specified players.", - "examples" : "feed all players\\nfeed the player by 5 beefs" -}, -{ - "id" : "EffForceAttack", - "name" : "Force Attack", - "patterns" : [ - "make %living entities% attack %entity%", -"force %living entities% to attack %entity%", - - "pattern_end" - ], - "since" : "2.5.1", - "description" : "Makes a living entity attack an entity with a melee attack.", - "examples" : "spawn a wolf at player's location\\nmake last spawned wolf attack player" -}, -{ - "id" : "EffRespawn", - "name" : "Force Respawn", - "patterns" : [ - "force %players% to respawn", - - "pattern_end" - ], - "since" : "2.2-dev21", - "description" : "Forces player(s) to respawn if they are dead. If this is called without delay from death event, one tick is waited before respawn attempt.", - "examples" : "on death of player:\\n force event-player to respawn" -}, -{ - "id" : "EffHandedness", - "name" : "Handedness", - "patterns" : [ - "make %living entities% (left|right)( |-)handed", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Make mobs left or right-handed. This does not affect players.", - "examples" : "spawn skeleton at spawn of world \"world\":\\n make entity left handed\\n\\nmake all zombies in radius 10 of player right handed" -}, -{ - "id" : "EffHidePlayerFromServerList", - "name" : "Hide Player from Server List", - "patterns" : [ - "hide %players% (in|on|from) [the] server list", -"hide %players%'[s] info[rmation] (in|on|from) [the] server list", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Hides a player from the hover list and decreases the online players count (only if the player count wasn't changed before).", - "examples" : "on server list ping:\\n hide {vanished::*} from the server list" -}, -{ - "id" : "EffIgnite", - "name" : "Ignite/Extinguish", - "patterns" : [ - "(ignite|set fire to) %entities% [for %time span%]", -"(set|light) %entities% on fire [for %time span%]", -"extinguish %entities%", - - "pattern_end" - ], - "since" : "1.4", - "description" : "Lights entities on fire or extinguishes them.", - "examples" : "ignite the player\\nextinguish the player" -}, -{ - "id" : "EffKeepInventory", - "name" : "Keep Inventory / Experience", - "patterns" : [ - "keep [the] (inventory|items) [(and [e]xp[erience][s] [point[s]])]", -"keep [the] [e]xp[erience][s] [point[s]] [(and (inventory|items))]", - - "pattern_end" - ], - "since" : "2.4", - "description" : "Keeps the inventory or/and experiences of the dead player in a death event.", - "examples" : "on death of a player:\\n if the victim is an op:\\n keep the inventory and experiences" -}, -{ - "id" : "EffKick", - "name" : "Kick", - "patterns" : [ - "kick %players% [(by reason of|because [of]|on account of|due to) %text%]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Kicks a player from the server.", - "examples" : "on place of TNT, lava, or obsidian:\\n kick the player due to \"You may not place %block%!\"\\n cancel the event" -}, -{ - "id" : "EffKill", - "name" : "Kill", - "patterns" : [ - "kill %entities%", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Kills an entity. -Note: This effect does not set the entity's health to 0 (which causes issues), but damages the entity by 100 times its maximum health.", - "examples" : "kill the player\\nkill all creepers in the player's world\\nkill all endermen, witches and bats" -}, -{ - "id" : "EffKnockback", - "name" : "Knockback", - "patterns" : [ - "(apply knockback to|knock[back]) %living entities% [%direction%] [with (strength|force) %number%]", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Apply the same velocity as a knockback to living entities in a direction. Mechanics such as knockback resistance will be factored in.", - "examples" : "knockback player north\\nknock victim (vector from attacker to victim) with strength 10" -}, -{ - "id" : "EffFireworkLaunch", - "name" : "Launch firework", - "patterns" : [ - "(launch|deploy) [[a] firework [with effect[s]]] %firework effects% at %locations% [([with] (duration|power)|timed) %number%]", - - "pattern_end" - ], - "since" : "2.4", - "description" : "Launch firework effects at the given location(s).", - "examples" : "launch ball large colored red, purple and white fading to light green and black at player's location with duration 1" -}, -{ - "id" : "EffLeash", - "name" : "Leash entities", - "patterns" : [ - "(leash|lead) %living entities% to %entity%", -"make %entity% (leash|lead) %living entities%", -"un(leash|lead) [holder of] %living entities%", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Leash living entities to other entities.", - "examples" : "leash the player to the target entity" -}, -{ - "id" : "EffLightning", - "name" : "Lightning", - "patterns" : [ - "(create|strike) lightning[([ ]effect)] %directions% %locations%", - - "pattern_end" - ], - "since" : "1.4", - "description" : "Strike lightning at a given location. Can use 'lightning effect' to create a lightning that does not harm entities or start fires.", - "examples" : "strike lightning at the player\\nstrike lightning effect at the victim" -}, -{ - "id" : "EffLoadServerIcon", - "name" : "Load Server Icon", - "patterns" : [ - "load [the] server icon (from|of) [the] [image] [file] %text%", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Loads server icons from the given files. You can get the loaded icon using the -last loaded server icon expression. -Please note that the image must be 64x64 and the file path starts from the server folder.", - "examples" : "on load:\\n clear {server-icons::*}\\n loop 5 times:\\n load server icon from file \"icons/%loop-number%.png\"\\n add the last loaded server icon to {server-icons::*}\\n\\non server list ping:\\n set the icon to a random server icon out of {server-icons::*}" -}, -{ - "id" : "EffSuppressWarnings", - "name" : "Locally Suppress Warning", - "patterns" : [ - "[local[ly]] suppress [the] (conflict|variable save|[missing] conjunction[s]|starting [with] expression[s]) warning[s]", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Suppresses target warnings from the current script.", - "examples" : "locally suppress missing conjunction warnings\\nsuppress the variable save warnings" -}, -{ - "id" : "EffLog", - "name" : "Log", - "patterns" : [ - "log %texts% [(to|in) [file[s]] %texts%]", - - "pattern_end" - ], - "since" : "2.0", - "description" : "Writes text into a .log file. Skript will write these files to /plugins/Skript/logs. -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" : "on place of TNT:\\n log \"%player% placed TNT in %world% at %location of block%\" to \"tnt/placement.log\"" -}, -{ - "id" : "EffLook", - "name" : "Look At", - "patterns" : [ - "(force|make) %living entities% [to] (face [towards]|look [(at|towards)]) (%entity%['s (feet|eyes)]|(feet|eyes) of %entity%) [at [head] [rotation] speed %number%] [[and] max[imum] [head] pitch %number%]", -"(force|make) %living entities% [to] (face [towards]|look [(at|towards)]) %vector/location% [at [head] [rotation] speed %number%] [[and] max[imum] [head] pitch %number%]", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Forces the mob(s) or player(s) to look at an entity, vector or location. Vanilla max head pitches range from 10 to 50.", - "examples" : "force the head of the player to look towards event-entity's feet\\n\\non entity explosion:\\n set {_player} to the nearest player\\n {_player} is set\\n distance between {_player} and the event-location is less than 15\\n make {_player} look towards vector from the {_player} to location of the event-entity\\n\\nforce {_enderman} to face the block 3 meters above {_location} at head rotation speed 100.5 and max head pitch -40" -}, -{ - "id" : "EffMakeEggHatch", - "name" : "Make Egg Hatch", - "patterns" : [ - "make [the] egg [not] hatch", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Makes the egg hatch in a Player Egg Throw event.", - "examples" : "on player egg throw:\\n # EGGS FOR DAYZ!\\n make the egg hatch" -}, -{ - "id" : "EffMakeFly", - "name" : "Make Fly", - "patterns" : [ - "force %players% to [(start|stop)] fly[ing]", -"make %players% (start|stop) flying", -"make %players% fly", - - "pattern_end" - ], - "since" : "2.2-dev34", - "description" : "Forces a player to start/stop flying.", - "examples" : "make player fly\\nforce all players to stop flying" -}, -{ - "id" : "EffIncendiary", - "name" : "Make Incendiary", - "patterns" : [ - "make %entities% [not] incendiary", -"make %entities%'[s] explosion [not] (incendiary|fiery)", -"make [the] [event(-| )]explosion [not] (incendiary|fiery)", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Sets if an entity's explosion will leave behind fire. This effect is also usable in an explosion prime event.", - "examples" : "on explosion prime:\\n make the explosion fiery" -}, -{ - "id" : "EffInvisible", - "name" : "Make Invisible", - "patterns" : [ - "make %living entities% (invisible|not visible)", -"make %living entities% (visible|not invisible)", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Makes a living entity visible/invisible. This is not a potion and therefore does not have features such as a time limit or particles. -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" : "make target entity invisible" -}, -{ - "id" : "EffInvulnerability", - "name" : "Make Invulnerable", - "patterns" : [ - "make %entities% invulnerable", -"make %entities% (not invulnerable|vulnerable)", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Makes an entity invulnerable/not invulnerable.", - "examples" : "make target entity invulnerable" -}, -{ - "id" : "EffMakeSay", - "name" : "Make Say", - "patterns" : [ - "make %players% (say|send [the] message[s]) %texts%", -"force %players% to (say|send [the] message[s]) %texts%", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Forces a player to send a message to the chat. If the message starts with a slash it will force the player to use command.", - "examples" : "make the player say \"Hello.\"\\nforce all players to send the message \"I love this server\"" -}, -{ - "id" : "EffMessage", - "name" : "Message", - "patterns" : [ - "(message|send [message[s]]) %objects% [to %command senders%] [from %player%]", - - "pattern_end" - ], - "since" : "1.0, 2.2-dev26 (advanced features), 2.5.2 (optional sender), 2.6 (sending objects)", - "description" : "Sends a message to the given player. Only styles written -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 \"A wild %player% appeared!\"\\nmessage \"This message is a distraction. Mwahaha!\"\\nsend \"Your kill streak is %{kill streak::%uuid of player%}%.\" to player\\nif the targeted entity exists:\\n message \"You're currently looking at a %type of the targeted entity%!\"\\non chat:\\n cancel event\\n send \"[%player%] >> %message%\" to all players from player" -}, -{ - "id" : "EffOpenBook", - "name" : "Open Book", - "patterns" : [ - "(open|show) book %item type% (to|for) %players%", - - "pattern_end" - ], - "since" : "2.5.1", - "description" : "Opens a written book to a player.", - "examples" : "open book player's tool to player" -}, -{ - "id" : "EffOpenInventory", - "name" : "Open/Close Inventory", - "patterns" : [ - "(open|show) (((crafting [table]|workbench)|chest|anvil|hopper|dropper|dispenser) [(view|window|inventory)]|%inventory/inventory type%) (to|for) %players%", -"close [the] inventory [view] (to|of|for) %players%", -"close %players%'[s] inventory [view]", - - "pattern_end" - ], - "since" : "2.0, 2.1.1 (closing), 2.2-Fixes-V10 (anvil), 2.4 (hopper, dropper, dispenser", - "description" : "Opens an inventory to a player. The player can then access and modify the inventory as if it was a chest that he just opened. -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" : "show the victim's inventory to the player\\nopen the player's inventory for the player" -}, -{ - "id" : "EffPathfind", - "name" : "Pathfind", - "patterns" : [ - "make %living entities% (pathfind|move) to[wards] %living entity/location% [at speed %number%]", -"make %living entities% stop (pathfinding|moving)", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Make an entity pathfind towards a location or another entity. Not all entities can pathfind. If the pathfinding target is another entity, the entities may or may not continuously follow the target.", - "examples" : "make all creepers pathfind towards player\\nmake all cows stop pathfinding\\nmake event-entity pathfind towards player at speed 1" -}, -{ - "id" : "EffVisualEffect", - "name" : "Play Effect", - "patterns" : [ - "(play|show) %visual effects% (on|%directions%) %entities/locations% [(to %players%|in (radius|range) of %number%)]", -"(play|show) %number% %visual effects% (on|%directions%) %locations% [(to %players%|in (radius|range) of %number%)]", - - "pattern_end" - ], - "since" : "2.1", - "description" : "Plays a visual effect at a given location or on a given entity. -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" : "play wolf hearts on the clicked wolf\\nshow mob spawner flames at the targeted block to the player" -}, -{ - "id" : "EffPlaySound", - "name" : "Play Sound", - "patterns" : [ - "play sound[s] %texts% [(in|from) %sound category%] [(at|with) volume %number%] [(and|at|with) pitch %number%] at %locations% [(to|for) %players%]", -"play sound[s] %texts% [(in|from) %sound category%] [(at|with) volume %number%] [(and|at|with) pitch %number%] [(to|for) %players%] [(at|from) %locations%]", - - "pattern_end" - ], - "since" : "2.2-dev28, 2.4 (sound categories)", - "description" : "Plays a sound at given location for everyone or just for given players, or plays a sound to specified players. Both Minecraft sound names and Spigot sound names are supported. Playing resource pack sounds are supported too. The sound category is 'master' by default. - -Please note that sound names can get changed in any Minecraft or Spigot version, or even removed from Minecraft itself.", - "examples" : "play sound \"block.note_block.pling\" # It is block.note.pling in 1.12.2\\nplay sound \"entity.experience_orb.pickup\" with volume 0.5 to the player\\nplay sound \"custom.music.1\" in jukebox category at {speakerBlock}" -}, -{ - "id" : "EffPlayerInfoVisibility", - "name" : "Player Info Visibility", - "patterns" : [ - "hide [all] player [related] info[rmation] [(in|on|from) [the] server list]", -"(show|reveal) [all] player [related] info[rmation] [(in|to|on|from) [the] server list]", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Sets whether all player related information is hidden in the server list. -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 info\\nhide player related information in the server list\\nreveal all player related info" -}, -{ - "id" : "EffPlayerVisibility", - "name" : "Player Visibility", - "patterns" : [ - "hide %players% [(from|for) %players%]", -"reveal %players% [(to|for|from) %players%]", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Change visibility of a player for the given 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: if a player was hidden and relogs, this player will be visible again.", - "examples" : "on join:\\n if {vanished::%player's uuid%} is true:\\n hide the player from all players\\n\\nreveal hidden players of {_player}" -}, -{ - "id" : "EffPoison", - "name" : "Poison/Cure", - "patterns" : [ - "poison %living entities% [for %time span%]", -"(cure|unpoison) %living entities% [(from|of) poison]", - - "pattern_end" - ], - "since" : "1.3.2", - "description" : "Poison or cure a creature.", - "examples" : "poison the player\\npoison the victim for 20 seconds\\ncure the player from poison" -}, -{ - "id" : "EffPotion", - "name" : "Potion Effects", - "patterns" : [ - "apply %potion effects% to %living entities%", -"apply infinite [ambient] [potion of] %potions% [potion] [[[of] tier] %number%] [without [any] particles] [(whilst hiding [the]|without (the|a)) [potion] icon] to %living entities% [replacing [the] existing effect]", -"apply [ambient] [potion of] %potions% [potion] [[[of] tier] %number%] [without [any] particles] [(whilst hiding [the]|without (the|a)) [potion] icon] to %living entities% [for %time span%] [replacing [the] existing effect]", - - "pattern_end" - ], - "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)", - "description" : "Apply or remove potion effects to/from entities.", - "examples" : "apply ambient swiftness 2 to the player\\nremove haste from the victim\\n\\non join:\\n apply infinite potion of strength of tier {strength::%uuid of player%} to the player\\n apply potion of strength of tier {strength::%uuid of player%} to the player for 999 days # Before 1.19.4\\n\\napply potion effects of player's tool to player\\napply haste potion of tier 3 without any particles whilst hiding the potion icon to the player # Hide potions" -}, -{ - "id" : "EffPush", - "name" : "Push", - "patterns" : [ - "(push|thrust) %entities% %direction% [(at|with) (speed|velocity|force) %number%]", - - "pattern_end" - ], - "since" : "1.4.6", - "description" : "Push entities around.", - "examples" : "push the player upwards\\npush the victim downwards at speed 0.5" -}, -{ - "id" : "EffPvP", - "name" : "PvP", - "patterns" : [ - "enable PvP [in %worlds%]", -"disable PVP [in %worlds%]", - - "pattern_end" - ], - "since" : "1.3.4", - "description" : "Set the PvP state for a given world.", - "examples" : "enable PvP #(current world only)\\ndisable PvP in all worlds" -}, -{ - "id" : "EffReplace", - "name" : "Replace", - "patterns" : [ - "replace [(all|every)] %texts% in %texts% with %text% [with case sensitivity]", -"replace [(all|every)] %texts% with %text% in %texts% [with case sensitivity]", -"replace first %texts% in %texts% with %text% [with case sensitivity]", -"replace first %texts% with %text% in %text% [with case sensitivity]", -"replace [(all|every)] %item types% in %inventories% with %item type%", -"replace [(all|every)] %item types% with %item type% in %inventories%", - - "pattern_end" - ], - "since" : "2.0, 2.2-dev24 (replace in multiple strings and replace items in inventory), 2.5 (replace first, case sensitivity)", - "description" : "Replaces all occurrences of a given text with another text. Please note that you can only change variables and a few expressions, e.g. a message or a line of a sign.", - "examples" : "replace \"<item>\" in {textvar} with \"%item%\"\\nreplace every \"&\" with \"§\" in line 1\\n# The following acts as a simple chat censor, but it will e.g. censor mass, hassle, assassin, etc. as well:\\non chat:\\n replace all \"kys\", \"idiot\" and \"noob\" with \"****\" in the message\\n \\nreplace all stone and dirt in player's inventory and player's top inventory with diamond" -}, -{ - "id" : "EffReturn", - "name" : "Return", - "patterns" : [ - "return %objects%", - - "pattern_end" - ], - "since" : "2.2, INSERT VERSION (returns aliases)", - "description" : "Makes a function return a value", - "examples" : "function double(i: number) :: number:\\n return 2 * {_i}\\n\\nfunction divide(i: number) returns number:\\n return {_i} / 2" -}, -{ - "id" : "EffSendBlockChange", - "name" : "Send Block Change", - "patterns" : [ - "make %players% see %blocks% as %item type/block data%", - - "pattern_end" - ], - "since" : "2.2-dev37c, 2.5.1 (block data support)", - "description" : "Makes a player see a block as something it really isn't. BlockData support is only for MC 1.13+", - "examples" : "make player see block at player as dirt\\nmake player see target block as campfire[facing=south]" -}, -{ - "id" : "EffSendResourcePack", - "name" : "Send Resource Pack", - "patterns" : [ - "send [the] resource pack [from [[the] URL]] %text% to %players%", -"send [the] resource pack [from [[the] URL]] %text% with hash %text% to %players%", - - "pattern_end" - ], - "since" : "2.4", - "description" : "Request that the player's client download and switch resource packs. The client will download -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" : "on join:\\n send the resource pack from \"URL\" with hash \"hash\" to the player" -}, -{ - "id" : "EffShear", - "name" : "Shear", - "patterns" : [ - "[force] shear %living entities%", -"un[-]shear %living entities%", - - "pattern_end" - ], - "since" : "2.0 (cows, sheep & snowmen), INSERT VERSION (all shearable entities)", - "description" : "Shears or un-shears a shearable entity with drops by shearing and a 'sheared' sound. Using with 'force' will force this effect despite the entity's 'shear state'. - -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" : "on rightclick on a sheep holding a sword:\\n shear the clicked sheep\\n chance of 10%\\n force shear the clicked sheep" -}, -{ - "id" : "EffShoot", - "name" : "Shoot", - "patterns" : [ - "shoot %entity types% [from %living entities/locations%] [(at|with) (speed|velocity) %number%] [%direction%]", -"(make|let) %living entities/locations% shoot %entity types% [(at|with) (speed|velocity) %number%] [%direction%]", - - "pattern_end" - ], - "since" : "1.4", - "description" : "Shoots a projectile (or any other entity) from a given entity.", - "examples" : "shoot an arrow\\nmake the player shoot a creeper at speed 10\\nshoot a pig from the creeper" -}, -{ - "id" : "EffSilence", - "name" : "Silence Entity", - "patterns" : [ - "silence %entities%", -"unsilence %entities%", -"make %entities% silent", -"make %entities% not silent", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Controls whether or not an entity is silent.", - "examples" : "make target entity silent" -}, -{ - "id" : "EffStopServer", - "name" : "Stop Server", - "patterns" : [ - "(stop|shut[ ]down) [the] server", -"restart [the] server", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Stops or restarts the server. If restart is used when the restart-script spigot.yml option isn't defined, the server will stop instead.", - "examples" : "stop the server\\nrestart server" -}, -{ - "id" : "EffStopSound", - "name" : "Stop Sound", - "patterns" : [ - "stop (all sound[s]|sound[s] %texts%) [(in [the]|from) %sound category%] [(from playing to|for) %players%]", -"stop playing sound[s] %texts% [(in [the]|from) %sound category%] [(to|for) %players%]", - - "pattern_end" - ], - "since" : "2.4, 2.7 (stop all sounds)", - "description" : "Stops specific or all sounds from playing to a group of players. Both Minecraft sound names and Spigot sound names are supported. Resource pack sounds are supported too. The sound category is 'master' by default. A sound can't be stopped from a different category. - -Please note that sound names can get changed in any Minecraft or Spigot version, or even removed from Minecraft itself.", - "examples" : "stop sound \"block.chest.open\" for the player\\nstop playing sounds \"ambient.underwater.loop\" and \"ambient.underwater.loop.additions\" to the player\\nstop all sounds for all players\\nstop sound in the record category" -}, -{ - "id" : "EffSwingHand", - "name" : "Swing Hand", - "patterns" : [ - "make %living entities% swing [their] [main] hand", -"make %living entities% swing [their] off[ ]hand", - - "pattern_end" - ], - "since" : "2.5.1", - "description" : "Makes an entity swing their hand. This does nothing if the entity does not have an animation for swinging their hand.", - "examples" : "make player swing their main hand" -}, -{ - "id" : "EffTeleport", - "name" : "Teleport", - "patterns" : [ - "[force] teleport %entities% (to|%direction%) %location%", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Teleport an entity to a specific location. -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.", - "examples" : "teleport the player to {homes.%player%}\\nteleport the attacker to the victim" -}, -{ - "id" : "EffResetTitle", - "name" : "Title - Reset", - "patterns" : [ - "reset [the] title[s] [of %players%]", -"reset [the] %players%'[s] title[s]", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Resets the title of the player to the default values.", - "examples" : "reset the titles of all players\\nreset the title" -}, -{ - "id" : "EffSendTitle", - "name" : "Title - Send", - "patterns" : [ - "send title %text% [with subtitle %text%] [to %players%] [for %time span%] [with fade[(-| )]in %time span%] [[and] [with] fade[(-| )]out %time span%]", -"send subtitle %text% [to %players%] [for %time span%] [with fade[(-| )]in %time span%] [[and] [with] fade[(-| )]out %time span%]", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Sends a title/subtitle to the given player(s) with optional fadein/stay/fadeout times for Minecraft versions 1.11 and above. - -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 \"Competition Started\" with subtitle \"Have fun, Stay safe!\" to player for 5 seconds\\nsend title \"Hi %player%\" to player\\nsend title \"Loot Drop\" with subtitle \"starts in 3 minutes\" to all players\\nsend title \"Hello %player%!\" with subtitle \"Welcome to our server\" to player for 5 seconds with fadein 1 second and fade out 1 second\\nsend subtitle \"Party!\" to all players" -}, -{ - "id" : "EffToggle", - "name" : "Toggle", - "patterns" : [ - "(close|turn off|de[-]activate) %blocks%", -"(toggle|switch) [[the] state of] %blocks%", -"(open|turn on|activate) %blocks%", - - "pattern_end" - ], - "since" : "1.4", - "description" : "Toggle the state of a block.", - "examples" : "# use arrows to toggle switches, doors, etc.\\non projectile hit:\\n projectile is arrow\\n toggle the block at the arrow" -}, -{ - "id" : "EffToggleFlight", - "name" : "Toggle Flight", - "patterns" : [ - "(allow|enable) (fly|flight) (for|to) %players%", -"(disallow|disable) (fly|flight) (for|to) %players%", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Toggle the flight mode of a player.", - "examples" : "allow flight to event-player" -}, -{ - "id" : "EffToggleCanPickUpItems", - "name" : "Toggle Picking Up Items", - "patterns" : [ - "allow %living entities% to pick([ ]up items| items up)", -"(forbid|disallow) %living entities% (from|to) pick([ing | ]up items|[ing] items up)", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Determines whether living entities are able to pick up items or not", - "examples" : "forbid player from picking up items\\nsend \"You can no longer pick up items!\" to player\\n\\non drop:\\n if player can't pick up items:\\n allow player to pick up items" -}, -{ - "id" : "EffTree", - "name" : "Tree", - "patterns" : [ - "(grow|create|generate) tree [of type %tree type%] %directions% %locations%", -"(grow|create|generate) %tree type% %directions% %locations%", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Creates a tree. -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" : "grow a tall redwood tree above the clicked block" -}, -{ - "id" : "EffVectorRotateAroundAnother", - "name" : "Vectors - Rotate Around Vector", - "patterns" : [ - "rotate %vectors% around %vector% by %number% [degrees]", - - "pattern_end" - ], - "since" : "2.2-dev28", - "description" : "Rotates one or more vectors around another vector", - "examples" : "rotate {_v} around vector 1, 0, 0 by 90" -}, -{ - "id" : "EffVectorRotateXYZ", - "name" : "Vectors - Rotate around XYZ", - "patterns" : [ - "rotate %vectors% around (x|y|z)(-| )axis by %number% [degrees]", - - "pattern_end" - ], - "since" : "2.2-dev28", - "description" : "Rotates one or more vectors around the x, y, or z axis by some amount of degrees", - "examples" : "rotate {_v} around x-axis by 90\\nrotate {_v} around y-axis by 90\\nrotate {_v} around z-axis by 90 degrees" -}, -{ - "id" : "EffVehicle", - "name" : "Vehicle", - "patterns" : [ - "(make|let|force) %entities% [to] (ride|mount) [(in|on)] %entities/entity types%", -"(make|let|force) %entities% [to] (dismount|(dismount|leave) [(from|of)] [(any|the[ir]|his|her)] vehicle[s])", -"(eject|dismount) [(any|the)] passenger[s] (of|from) %entities%", - - "pattern_end" - ], - "since" : "2.0", - "description" : "Makes an entity ride another entity, e.g. a minecart, a saddled pig, an arrow, etc.", - "examples" : "make the player ride a saddled pig\\nmake the attacker ride the victim" -}, -{ - "id" : "EffOp", - "name" : "op/deop", - "patterns" : [ - "[de[-]]op %offline players%", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Grant/revoke a user operator state.", - "examples" : "op the player\\ndeop all players" -}, -{ - "id" : "EffSecSpawn", - "name" : "Spawn", - "patterns" : [ - "(spawn|summon) %entity types% [%directions% %locations%]", -"(spawn|summon) %number% of %entity types% [%directions% %locations%]", - - "pattern_end" - ], - "since" : "1.0, 2.6.1 (with section)", - "description" : "Spawn a creature. This can be used as an effect and as a section. -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.", - "examples" : "spawn 3 creepers at the targeted block\\nspawn a ghast 5 meters above the player\\nspawn a zombie at the player:\\n set name of the zombie to \"\"" -}, - - {"end" : true} - ], - - "events" : [ - { - "id" : "at_time", - "name" : "At Time", - "patterns" : [ - "[on] at %time% [in %worlds%]", - - "pattern_end" - ], - "since" : "1.3.4", - "description" : "An event that occurs at a given minecraft time in every world or only in specific worlds.", - "examples" : "at 18:00\\nat 7am in \"world\"" -}, -{ - "id" : "anvil_damage", - "name" : "On Anvil Damage", - "patterns" : [ - "[on] anvil damag(e|ing)", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Called when an anvil is damaged/broken from being used to repair/rename items.\\nNote: this does not include anvil damage from falling.", - "examples" : "on anvil damage:\\n cancel the event" -}, -{ - "id" : "anvil_prepare", - "name" : "On Anvil Prepare", - "patterns" : [ - "[on] anvil prepar(e|ing)", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Called when an item is put in a slot for repair by an anvil. Please note that this event is called multiple times in a single item slot move.", - "examples" : "on anvil prepare:\\n event-item is set # result item\\n chance of 5%:\\n set repair cost to repair cost * 50%\\n send \"You're LUCKY! You got 50% discount.\" to player" -}, -{ - "id" : "aoe_cloud_effect", - "name" : "On AoE Cloud Effect", - "patterns" : [ - "[on] (area|AoE) [cloud] effect", - - "pattern_end" - ], - "since" : "2.2-dev21", - "description" : "Called when area effect cloud applies its potion effect. This happens every 5 ticks by default.", - "examples" : "on area cloud effect:" -}, -{ - "id" : "arm_swing", - "name" : "On Arm Swing", - "patterns" : [ - "[on] [player] arm swing", - - "pattern_end" - ], - "since" : "2.5.1", - "description" : "Called when a player swings their arm.", - "examples" : "on arm swing:\\n send \"You swung your arm!\"" -}, -{ - "id" : "armor_change", - "name" : "On Armor Change", - "patterns" : [ - "[on] [player] armor change[d]", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Called when armor pieces of a player are changed.", - "examples" : "on armor change:\\n send \"You equipped %event-item%!\"" -}, -{ - "id" : "bed_enter", - "name" : "On Bed Enter", - "patterns" : [ - "[on] bed enter[ing]", -"[on] [player] enter[ing] [a] bed", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a player starts sleeping.", - "examples" : "on bed enter:" -}, -{ - "id" : "bed_leave", - "name" : "On Bed Leave", - "patterns" : [ - "[on] bed leav(e|ing)", -"[on] [player] leav(e|ing) [a] bed", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a player leaves a bed.", - "examples" : "on player leaving a bed:" -}, -{ - "id" : "block_damage", - "name" : "On Block Damage", - "patterns" : [ - "[on] block damag(ing|e)", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a player starts to break a block. You can usually just use the leftclick event for this.", - "examples" : "on block damaging:\\n if block is log:\\n send \"You can't break the holy log!\"" -}, -{ - "id" : "block_fertilize", - "name" : "On Block Fertilize", - "patterns" : [ - "[on] [block] fertilize", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Called when a player fertilizes blocks.", - "examples" : "on block fertilize:\\n send \"Fertilized %size of fertilized blocks% blocks got fertilized.\"" -}, -{ - "id" : "block_growth", - "name" : "On Block Growth", - "patterns" : [ - "[on] (plant|crop|block) grow[(th|ing)] [[of] %item types%]", - - "pattern_end" - ], - "since" : "2.2-Fixes-V10", - "description" : "Called when a crop grows. Alternative to new form of generic grow event.", - "examples" : "on crop growth:" -}, -{ - "id" : "book_edit", - "name" : "On Book Edit", - "patterns" : [ - "[on] book (edit|change|write)", - - "pattern_end" - ], - "since" : "2.2-dev31", - "description" : "Called when a player edits a book.", - "examples" : "on book edit:" -}, -{ - "id" : "book_sign", - "name" : "On Book Sign", - "patterns" : [ - "[on] book sign[ing]", - - "pattern_end" - ], - "since" : "2.2-dev31", - "description" : "Called when a player signs a book.", - "examples" : "on book sign:" -}, -{ - "id" : "break_mine", - "name" : "On Break / Mine", - "patterns" : [ - "[on] [block] (break[ing]|min(e|ing)) [[of] %item types/block datas%]", - - "pattern_end" - ], - "since" : "1.0 (break), unknown (mine), 2.6 (BlockData support)", - "description" : "Called when a block is broken by a player. If you use 'on mine', only events where the broken block dropped something will call the trigger.", - "examples" : "on mine:\\non break of stone:\\non mine of any ore:\\non break of chest[facing=north]:\\non break of potatoes[age=7]:" -}, -{ - "id" : "bucket_empty", - "name" : "On Bucket Empty", - "patterns" : [ - "[on] bucket empty[ing]", -"[on] [player] empty[ing] [a] bucket", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a player empties a bucket. You can also use the place event with a check for water or lava.", - "examples" : "on bucket empty:" -}, -{ - "id" : "bucket_fill", - "name" : "On Bucket fill", - "patterns" : [ - "[on] bucket fill[ing]", -"[on] [player] fill[ing] [a] bucket", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a player fills a bucket.", - "examples" : "on player filling a bucket:" -}, -{ - "id" : "burn", - "name" : "On Burn", - "patterns" : [ - "[on] [block] burn[ing] [[of] %item types/block datas%]", - - "pattern_end" - ], - "since" : "1.0, 2.6 (BlockData support)", - "description" : "Called when a block is destroyed by fire.", - "examples" : "on burn:\\non burn of wood, fences, or chests:\\non burn of oak_log[axis=y]:" -}, -{ - "id" : "can_build_check", - "name" : "On Can Build Check", - "patterns" : [ - "[on] [block] can build check", - - "pattern_end" - ], - "since" : "1.0 (basic), 2.0 ([un]cancellable)", - "description" : "Called when a player rightclicks on a block while holding a block or a placeable item. You can either cancel the event to prevent the block from being built, or uncancel it to allow it.\\nPlease note that the data value of the block to be placed is not available in this event, only its ID.", - "examples" : "on block can build check:\\n cancel event" -}, -{ - "id" : "chat", - "name" : "On Chat", - "patterns" : [ - "[on] chat", - - "pattern_end" - ], - "since" : "1.4.1", - "description" : "Called whenever a player chats.\\nUse chat format to change message format.\\nUse chat recipients to edit chat recipients.", - "examples" : "on chat:\\n if player has permission \"owner\":\\n set chat format to \"&amp;amp;amp;amp;lt;red&amp;amp;amp;amp;gt;[player]&amp;amp;amp;amp;lt;light gray&amp;amp;amp;amp;gt;: &amp;amp;amp;amp;lt;light red&amp;amp;amp;amp;gt;[message]\"\\n else if player has permission \"admin\":\\n set chat format to \"&amp;amp;amp;amp;lt;light red&amp;amp;amp;amp;gt;[player]&amp;amp;amp;amp;lt;light gray&amp;amp;amp;amp;gt;: &amp;amp;amp;amp;lt;orange&amp;amp;amp;amp;gt;[message]\"\\n else: #default message format\\n set chat format to \"&amp;amp;amp;amp;lt;orange&amp;amp;amp;amp;gt;[player]&amp;amp;amp;amp;lt;light gray&amp;amp;amp;amp;gt;: &amp;amp;amp;amp;lt;white&amp;amp;amp;amp;gt;[message]\"" -}, -{ - "id" : "chunk_generate", - "name" : "On Chunk Generate", - "patterns" : [ - "[on] chunk (generat|populat)(e|ing)", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called after a new chunk was generated.", - "examples" : "on chunk generate:" -}, -{ - "id" : "chunk_load", - "name" : "On Chunk Load", - "patterns" : [ - "[on] chunk load[ing]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a chunk loads. The chunk might or might not contain mobs when it's loaded.", - "examples" : "on chunk load:" -}, -{ - "id" : "chunk_unload", - "name" : "On Chunk Unload", - "patterns" : [ - "[on] chunk unload[ing]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a chunk is unloaded due to not being near any player.", - "examples" : "on chunk unload:" -}, -{ - "id" : "click", - "name" : "On Click", - "patterns" : [ - "[on] [(right|left)[( |-)]][mouse[( |-)]]click[ing] [on %entity type/item type%] [(with|using|holding) %item type%]", -"[on] [(right|left)[( |-)]][mouse[( |-)]]click[ing] (with|using|holding) %item type% on %entity type/item type%", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a user clicks on a block, an entity or air with or without an item in their hand.\\nPlease note that rightclick events with an empty hand while not looking at a block are not sent to the server, so there's no way to detect them.\\nAlso note that a leftclick on an entity is an attack and thus not covered by the 'click' event, but the 'damage' event.", - "examples" : "on click:\\non rightclick holding a fishing rod:\\non leftclick on a stone or obsidian:\\non rightclick on a creeper:\\non click with a sword:" -}, -{ - "id" : "combust", - "name" : "On Combust", - "patterns" : [ - "[on] combust[ing]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when an entity is set on fire, e.g. by fire or lava, a fireball, or by standing in direct sunlight (zombies, skeletons).", - "examples" : "on combust:" -}, -{ - "id" : "command", - "name" : "On Command", - "patterns" : [ - "[on] command [%text%]", - - "pattern_end" - ], - "since" : "2.0", - "description" : "Called when a player enters a command (not necessarily a Skript command) but you can check if command is a skript command, see Is a Skript command condition.", - "examples" : "on command:\\non command \"/stop\":\\non command \"pm Njol \":" -}, -{ - "id" : "connect", - "name" : "On Connect", - "patterns" : [ - "[on] [player] connect[ing]", - - "pattern_end" - ], - "since" : "2.0", - "description" : "Called when the player connects to the server. This event is called before the player actually joins the server, so if you want to prevent players from joining you should prefer this event over on join.", - "examples" : "on connect:\\n player doesn't have permission \"VIP\"\\n number of players is greater than 15\\n kick the player due to \"The last 5 slots are reserved for VIP players.\"" -}, -{ - "id" : "consume", - "name" : "On Consume", - "patterns" : [ - "[on] [player] ((eat|drink)[ing]|consum(e|ing)) [[of] %item types%]", - - "pattern_end" - ], - "since" : "2.0", - "description" : "Called when a player is done eating/drinking something, e.g. an apple, bread, meat, milk or a potion.", - "examples" : "on consume:" -}, -{ - "id" : "craft", - "name" : "On Craft", - "patterns" : [ - "[on] [player] craft[ing] [[of] %item types%]", - - "pattern_end" - ], - "since" : "unknown (before 2.1)", - "description" : "Called when a player crafts an item.", - "examples" : "on craft:" -}, -{ - "id" : "creeper_power", - "name" : "On Creeper Power", - "patterns" : [ - "[on] creeper power", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a creeper is struck by lighting and gets powered. Cancel the event to prevent the creeper from being powered.", - "examples" : "on creeper power:" -}, -{ - "id" : "damage", - "name" : "On Damage", - "patterns" : [ - "[on] damag(e|ing) [of %entity type%] [by %entity type%]", - - "pattern_end" - ], - "since" : "1.0, 2.7 (by entity)", - "description" : "Called when an entity receives damage, e.g. by an attack from another entity, lava, fire, drowning, fall, suffocation, etc.", - "examples" : "on damage:\\non damage of a player:\\non damage of player by zombie:" -}, -{ - "id" : "death", - "name" : "On Death", - "patterns" : [ - "[on] death [of %entity types%]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a living entity (including players) dies.", - "examples" : "on death:\\non death of player:\\non death of a wither or ender dragon:\\n broadcast \"A %entity% has been slain in %world%!\"" -}, -{ - "id" : "dispense", - "name" : "On Dispense", - "patterns" : [ - "[on] dispens(e|ing) [[of] %item types%]", - - "pattern_end" - ], - "since" : "unknown (before 2.1)", - "description" : "Called when a dispenser dispenses an item.", - "examples" : "on dispense of iron block:\\n send \"that'd be 19.99 please!\"" -}, -{ - "id" : "drop", - "name" : "On Drop", - "patterns" : [ - "[on] [player|entity] drop[ping] [[of] %item types%]", - - "pattern_end" - ], - "since" : "unknown (before 2.1), 2.7 (entity)", - "description" : "Called when a player drops an item from their inventory, or an entity drops an item, such as a chicken laying an egg.", - "examples" : "on drop:\\n if event-item is compass:\\n cancel event\\n\\non entity drop of an egg:\\n if event-entity is a chicken:\\n set item of event-dropped item to a diamond" -}, -{ - "id" : "egg_throw", - "name" : "On Egg Throw", - "patterns" : [ - "[on] throw[ing] [of] [an] egg", -"[on] [player] egg throw", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a player throws an egg and it lands. You can just use the shoot event in most cases. However, this event allows modification of properties like the hatched entity type and the number of entities to hatch.", - "examples" : "on throw of an egg:" -}, -{ - "id" : "enchant", - "name" : "On Enchant", - "patterns" : [ - "[on] [item] enchant", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Called when a player successfully enchants an item.\\n To get the enchanted item, see the enchant item expression", - "examples" : "on enchant:\\n if the clicked button is 1: # offer 1\\n set the applied enchantments to sharpness 10 and unbreaking 10" -}, -{ - "id" : "enchant_prepare", - "name" : "On Enchant Prepare", - "patterns" : [ - "[on] [item] enchant prepare", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Called when a player puts an item into enchantment table. This event may be called multiple times.\\n To get the enchant item, see the enchant item expression", - "examples" : "on enchant prepare:\\n set enchant offer 1 to sharpness 1\\n set the cost of enchant offer 1 to 10 levels" -}, -{ - "id" : "endermansheepsilverfishfalling_block", - "name" : "On Enderman/Sheep/Silverfish/Falling Block", - "patterns" : [ - "[on] enderman place", -"[on] enderman pickup", -"[on] sheep eat", -"[on] silverfish enter", -"[on] silverfish exit", -"[on] falling block fall[ing]", -"[on] falling block land[ing]", -"[on] (entity|%*-entitydatas%) chang(e|ing) block[s]", - - "pattern_end" - ], - "since" : "unknown, 2.5.2 (falling block), INSERT VERSION (any entity support)", - "description" : "Called when an enderman places or picks up a block, a sheep eats grass, a silverfish boops into/out of a block or a falling block lands and turns into a block respectively.\\nevent-block represents the old block and event-blockdata represents the new replacement that'll be applied to the block.", - "examples" : "on sheep eat:\\n kill event-entity\\n broadcast \"A sheep stole some grass!\"\\n\\non falling block land:\\n event-entity is a falling dirt\\n cancel event" -}, -{ - "id" : "entity_dismount", - "name" : "On Entity Dismount", - "patterns" : [ - "[on] dismount[ing]", - - "pattern_end" - ], - "since" : "2.2-dev13b", - "description" : "Called when an entity dismounts.", - "examples" : "on dismount:\\n kill event-entity" -}, -{ - "id" : "entity_jump", - "name" : "On Entity Jump", - "patterns" : [ - "[on] entity jump[ing]", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Called when an entity jumps.", - "examples" : "on entity jump:\\n if entity is a wither skeleton:\\n cancel event" -}, -{ - "id" : "entity_mount", - "name" : "On Entity Mount", - "patterns" : [ - "[on] mount[ing]", - - "pattern_end" - ], - "since" : "2.2-dev13b", - "description" : "Called when entity starts riding another.", - "examples" : "on mount:\\n cancel event" -}, -{ - "id" : "entity_portal", - "name" : "On Entity Portal", - "patterns" : [ - "[on] entity portal", - - "pattern_end" - ], - "since" : "2.5.3", - "description" : "Called when an entity uses a nether or end portal. Cancel the event to prevent the entity from teleporting.", - "examples" : "on entity portal:\\n broadcast \"A %type of event-entity% has entered a portal!" -}, -{ - "id" : "experience_change", - "name" : "On Experience Change", - "patterns" : [ - "[on] [player] (level progress|[e]xp|experience) (change|update|increase|decrease)", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Called when a player's experience changes.", - "examples" : "on level progress change:\\n set {_xp} to event-experience\\n broadcast \"%{_xp}%\"" -}, -{ - "id" : "experience_spawn", - "name" : "On Experience Spawn", - "patterns" : [ - "[on] [e]xp[erience] [orb] spawn", -"[on] spawn of [a[n]] [e]xp[erience] [orb]", - - "pattern_end" - ], - "since" : "2.0", - "description" : "Called whenever experience is about to spawn.\\nPlease note that this event will not fire for xp orbs spawned by plugins (including Skript) with Bukkit.", - "examples" : "on xp spawn:\\n world is \"minigame_world\"\\n cancel event" -}, -{ - "id" : "explode", - "name" : "On Explode", - "patterns" : [ - "[on] explo(d(e|ing)|sion)", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when an entity (a primed TNT or a creeper) explodes.", - "examples" : "on explosion:" -}, -{ - "id" : "explosion_prime", - "name" : "On Explosion Prime", - "patterns" : [ - "[on] explosion prime", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when an explosive is primed, i.e. an entity will explode shortly. Creepers can abort the explosion if the player gets too far away, while TNT will explode for sure after a short time.", - "examples" : "on explosion prime:" -}, -{ - "id" : "fade", - "name" : "On Fade", - "patterns" : [ - "[on] [block] fad(e|ing) [[of] %item types/block datas%]", - - "pattern_end" - ], - "since" : "1.0, 2.6 (BlockData support)", - "description" : "Called when a block 'fades away', e.g. ice or snow melts.", - "examples" : "on fade of snow or ice:\\non fade of snow[layers=2]" -}, -{ - "id" : "firework_explode", - "name" : "On Firework Explode", - "patterns" : [ - "[on] [a] firework explo(d(e|ing)|sion) [colo[u]red %colors%]", - - "pattern_end" - ], - "since" : "2.4", - "description" : "Called when a firework explodes.", - "examples" : "on firework explode\\non firework exploding colored red, light green and black\\non firework explosion colored light green:\\n broadcast \"A firework colored %colors% was exploded at %location%!\"" -}, -{ - "id" : "first_join", - "name" : "On First Join", - "patterns" : [ - "[on] first (join|login)", - - "pattern_end" - ], - "since" : "1.3.7", - "description" : "Called when a player joins the server for the first time.", - "examples" : "on first join:\\n broadcast \"Welcome %player% to the server!\"" -}, -{ - "id" : "fishing", - "name" : "On Fishing", - "patterns" : [ - "[on] [player] fish[ing]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a player fishes something. This is not of much use yet.", - "examples" : "on fish:" -}, -{ - "id" : "flight_toggle", - "name" : "On Flight Toggle", - "patterns" : [ - "[on] [player] flight toggl(e|ing)", -"[on] [player] toggl(e|ing) flight", - - "pattern_end" - ], - "since" : "2.2-dev36", - "description" : "Called when a players stops/starts flying.", - "examples" : "on flight toggle:\\n if {game::%player%::playing} exists:\\n cancel event" -}, -{ - "id" : "flow", - "name" : "On Flow", - "patterns" : [ - "[on] [block] flow[ing]", -"[on] block mov(e|ing)", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a blocks flows or teleports to another block. This not only applies to water and lava, but teleporting dragon eggs as well.", - "examples" : "on block flow:\\n if event-block is water:\\n broadcast \"Build more dams! It's starting to get wet in here\"" -}, -{ - "id" : "form", - "name" : "On Form", - "patterns" : [ - "[on] [block] form[ing] [[of] %item types/block datas%]", - - "pattern_end" - ], - "since" : "1.0, 2.6 (BlockData support)", - "description" : "Called when a block is created, but not by a player, e.g. snow forms due to snowfall, water freezes in cold biomes. This isn't called when block spreads (mushroom growth, water physics etc.), as it has its own event (see spread event).", - "examples" : "on form of snow:\\non form of a mushroom:" -}, -{ - "id" : "fuel_burn", - "name" : "On Fuel Burn", - "patterns" : [ - "[on] fuel burn[ing]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a furnace burns an item from its fuel slot.", - "examples" : "on fuel burning:" -}, -{ - "id" : "gamemode_change", - "name" : "On Gamemode Change", - "patterns" : [ - "[on] game[ ]mode change [to %gamemode%]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a player's gamemode changes.", - "examples" : "on gamemode change:\\non gamemode change to adventure:" -}, -{ - "id" : "gliding_state_change", - "name" : "On Gliding State Change", - "patterns" : [ - "[on] (gliding state change|toggl(e|ing) gliding)", - - "pattern_end" - ], - "since" : "2.2-dev21", - "description" : "Called when an entity toggles glider on or off, or when server toggles gliding state of an entity forcibly.", - "examples" : "on toggling gliding:\\n cancel the event # bad idea, but you CAN do it!" -}, -{ - "id" : "grow", - "name" : "On Grow", - "patterns" : [ - "[on] grow[th] [of (%tree types%|%item types/block datas%)]", -"[on] grow[th] from %item types/block datas%", -"[on] grow[th] [in]to (%tree types%|%item types/block datas%)", -"[on] grow[th] from %item types/block datas% [in]to (%tree types%|%item types/block datas%)", - - "pattern_end" - ], - "since" : "1.0, 2.2-dev20 (plants), INSERT VERSION (from, into, blockdata)", - "description" : "Called when a tree, giant mushroom or plant grows to next stage.\\n\"of\" matches any grow event, \"from\" matches only the old state, \"into\" matches only the new state,and \"from into\" requires matching both the old and new states.\\nUsing \"and\" lists in this event is equivalent to using \"or\" lists. The event will trigger if any one of the elements is what grew.", - "examples" : "on grow:\\non grow of tree:\\non grow of wheat[age=7]:\\non grow from a sapling:\\non grow into tree:\\non grow from a sapling into tree:\\non grow of wheat, carrots, or potatoes:\\non grow into tree, giant mushroom, cactus:\\non grow from wheat[age=0] to wheat[age=1] or wheat[age=2]:" -}, -{ - "id" : "hand_item_swap", - "name" : "On Hand Item Swap", - "patterns" : [ - "[on] swap[ping of] [(hand|held)] item[s]", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Called whenever a player swaps the items in their main- and offhand slots.\\nWorks also when one or both of the slots are empty.\\nThe event is called before the items are actually swapped,\\nso when you use the player's tool or player's offtool expressions,\\nthey will return the values before the swap -\\nthis enables you to cancel the event before anything happens.", - "examples" : "on swap hand items:\\n event-player's tool is a diamond sword\\n cancel event" -}, -{ - "id" : "heal", - "name" : "On Heal", - "patterns" : [ - "[on] heal[ing]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when an entity is healed, e.g. by eating (players), being fed (pets), or by the effect of a potion of healing (overworld mobs) or harm (nether mobs).", - "examples" : "on heal:" -}, -{ - "id" : "horse_jump", - "name" : "On Horse Jump", - "patterns" : [ - "[on] horse jump", - - "pattern_end" - ], - "since" : "2.5.1", - "description" : "Called when a horse jumps.", - "examples" : "on horse jump:\\n push event-entity upwards at speed 2" -}, -{ - "id" : "hunger_meter_change", - "name" : "On Hunger Meter Change", - "patterns" : [ - "[on] (food|hunger) (level|met(er|re)|bar) chang(e|ing)", - - "pattern_end" - ], - "since" : "1.4.4", - "description" : "Called when the hunger bar of a player changes, i.e. either increases by eating or decreases over time.", - "examples" : "on food bar change:" -}, -{ - "id" : "ignition", - "name" : "On Ignition", - "patterns" : [ - "[on] [block] ignit(e|ion)", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a block starts burning, i.e. a fire block is placed next to it and this block is flammable.\\nThe burn event will be called when the block is about do be destroyed by the fire.", - "examples" : "on block ignite:\\n if event-block is a ladder:\\n cancel event" -}, -{ - "id" : "inventory_click", - "name" : "On Inventory Click", - "patterns" : [ - "[on] [player] inventory(-| )click[ing] [[at] %item types%]", - - "pattern_end" - ], - "since" : "2.2-Fixes-V10", - "description" : "Called when clicking on inventory slot.", - "examples" : "on inventory click:\\n if event-item is stone:\\n give player 1 stone\\n remove 20$ from player's balance" -}, -{ - "id" : "inventory_close", - "name" : "On Inventory Close", - "patterns" : [ - "[on] inventory clos(ing|e[d])", - - "pattern_end" - ], - "since" : "2.2-dev21", - "description" : "Called when player's currently viewed inventory is closed.", - "examples" : "on inventory close:\\n if player's location is {location}:\\n send \"You exited the shop!\"" -}, -{ - "id" : "inventory_drag", - "name" : "On Inventory Drag", - "patterns" : [ - "[on] inventory drag[ging]", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Called when a player drags an item in their cursor across the inventory.", - "examples" : "on inventory drag:\\n if player's current inventory is {_gui}:\\n send \"You can't drag your items here!\" to player\\n cancel event" -}, -{ - "id" : "inventory_item_move", - "name" : "On Inventory Item Move", - "patterns" : [ - "[on] inventory item (move|transport)", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Called when an entity or block (e.g. hopper) tries to move items directly from one inventory to another.\\nWhen this event is called, the initiator may have already removed the item from the source inventory and is ready to move it into the destination inventory.\\nIf this event is cancelled, the items will be returned to the source inventory.", - "examples" : "on inventory item move:\\n broadcast \"%holder of past event-inventory% is transporting %event-item% to %holder of event-inventory%!\"" -}, -{ - "id" : "inventory_open", - "name" : "On Inventory Open", - "patterns" : [ - "[on] inventory open[ed]", - - "pattern_end" - ], - "since" : "2.2-dev21", - "description" : "Called when an inventory is opened for player.", - "examples" : "on inventory open:\\n close player's inventory" -}, -{ - "id" : "inventory_pickup", - "name" : "On Inventory Pickup", - "patterns" : [ - "[on] inventory pick[ ]up", - - "pattern_end" - ], - "since" : "2.5.1", - "description" : "Called when an inventory (a hopper, a hopper minecart, etc.) picks up an item", - "examples" : "on inventory pickup:" -}, -{ - "id" : "inventory_slot_change", - "name" : "On Inventory Slot Change", - "patterns" : [ - "[on] [player] inventory slot chang(e|ing)", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Called when a slot in a player's inventory is changed.\\nWarning: setting the event-slot to a new item can result in an infinite loop.", - "examples" : "on inventory slot change:\\n if event-item is a diamond:\\n send \"You obtained a diamond!\" to player" -}, -{ - "id" : "item_break", - "name" : "On Item Break", - "patterns" : [ - "[on] [player] tool break[ing]", -"[on] [player] break[ing] [(a|the)] tool", - - "pattern_end" - ], - "since" : "2.1.1", - "description" : "Called when a player breaks their tool because its damage reached the maximum value.\\nThis event cannot be cancelled.", - "examples" : "on tool break:" -}, -{ - "id" : "item_damage", - "name" : "On Item Damage", - "patterns" : [ - "[on] item damag(e|ing)", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Called when an item is damaged. Most tools are damaged by using them; armor is damaged when the wearer takes damage.", - "examples" : "on item damage:\\n cancel event" -}, -{ - "id" : "item_despawn", - "name" : "On Item Despawn", - "patterns" : [ - "[on] (item[ ][stack]|[item] %item types%) despawn[ing]", -"[on] [item[ ][stack]] despawn[ing] [[of] %item types%]", - - "pattern_end" - ], - "since" : "2.2-dev35", - "description" : "Called when an item is about to be despawned from the world, usually 5 minutes after it was dropped.", - "examples" : "on item despawn of diamond:\\n send \"Not my precious!\"\\n cancel event" -}, -{ - "id" : "item_mend", - "name" : "On Item Mend", - "patterns" : [ - "[on] item mend[ing]", - - "pattern_end" - ], - "since" : "2.5.1", - "description" : "Called when a player has an item repaired via the Mending enchantment.", - "examples" : "on item mend:\\n chance of 50%:\\n cancel the event\\n send \"Oops! Mending failed!\" to player" -}, -{ - "id" : "item_merge", - "name" : "On Item Merge", - "patterns" : [ - "[on] (item[ ][stack]|[item] %item types%) merg(e|ing)", -"[on] item[ ][stack] merg(e|ing) [[of] %item types%]", - - "pattern_end" - ], - "since" : "2.2-dev35", - "description" : "Called when dropped items merge into a single stack. event-entity will be the entity which is trying to merge, and future event-entity will be the entity which is being merged into.", - "examples" : "on item merge of gold blocks:\\n cancel event" -}, -{ - "id" : "item_spawn", - "name" : "On Item Spawn", - "patterns" : [ - "[on] item spawn[ing] [[of] %item types%]", - - "pattern_end" - ], - "since" : "unknown (before 2.1)", - "description" : "Called whenever an item stack is spawned in a world, e.g. as drop of a block or mob, a player throwing items out of their inventory, or a dispenser dispensing an item (not shooting it).", - "examples" : "on item spawn of iron sword:\\n broadcast \"Someone dropped an iron sword!\"" -}, -{ - "id" : "join", - "name" : "On Join", - "patterns" : [ - "[on] [player] (login|logging in|join[ing])", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when the player joins the server. The player is already in a world when this event is called, so if you want to prevent players from joining you should prefer on connect over this event.", - "examples" : "on join:\\n message \"Welcome on our awesome server!\"\\n broadcast \"%player% just joined the server!\"" -}, -{ - "id" : "jump", - "name" : "On Jump", - "patterns" : [ - "[on] [player] jump[ing]", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Called whenever a player jumps.\\nThis event requires PaperSpigot.", - "examples" : "on jump:\\n event-player does not have permission \"jump\"\\n cancel event" -}, -{ - "id" : "kick", - "name" : "On Kick", - "patterns" : [ - "[on] [player] (kick|being kicked)", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a player is kicked from the server. You can change the kick message or cancel the event entirely.", - "examples" : "on kick:" -}, -{ - "id" : "language_change", - "name" : "On Language Change", - "patterns" : [ - "[on] [player] (language|locale) chang(e|ing)", -"[on] [player] chang(e|ing) (language|locale)", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Called after a player changed their language in the game settings. You can use the language expression to get the current language of the player.\\nThis event requires Minecraft 1.12+.", - "examples" : "on language change:\\n if player's language starts with \"en\":\\n send \"Hello!\"" -}, -{ - "id" : "leaves_decay", - "name" : "On Leaves Decay", - "patterns" : [ - "[on] leaves decay[ing]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a leaf block decays due to not being connected to a tree.", - "examples" : "on leaves decay:" -}, -{ - "id" : "level_change", - "name" : "On Level Change", - "patterns" : [ - "[on] [player] level (change|up|down)", - - "pattern_end" - ], - "since" : "1.0, 2.4 (level up/down)", - "description" : "Called when a player's level changes, e.g. by gathering experience or by enchanting something.", - "examples" : "on level change:" -}, -{ - "id" : "lightning_strike", - "name" : "On Lightning Strike", - "patterns" : [ - "[on] lightning [strike]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when lightning strikes.", - "examples" : "on lightning:\\n spawn a zombie at location of event-entity" -}, -{ - "id" : "loot_generate", - "name" : "On Loot Generate", - "patterns" : [ - "[on] loot generat(e|ing)", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Called when a loot table of an inventory is generated in the world.\\nFor example, when opening a shipwreck chest.", - "examples" : "on loot generate:\\n chance of 10%\\n add 64 diamonds to the loot\\n send \"You hit the jackpot at %event-location%!\"" -}, -{ - "id" : "move_rotate", - "name" : "On Move / Rotate", - "patterns" : [ - "[on] %entity type% (move|walk|step|(turn[ing] around|rotate))", -"[on] %entity type% (move|walk|step) or (turn[ing] around|rotate)", -"[on] %entity type% (turn[ing] around|rotate) or (move|walk|step)", - - "pattern_end" - ], - "since" : "2.6, INSERT VERSION (turn around)", - "description" : "Called when a player or entity moves or rotates their head.\\nNOTE: Move event will only be called when the entity/player moves position, keyword 'turn around' is for orientation (ie: looking around), and the combined syntax listens for both.\\nNOTE: These events can be performance heavy as they are called quite often.", - "examples" : "on player move:\\n if player does not have permission \"player.can.move\":\\n cancel event\\non skeleton move:\\n if event-entity is not in world \"world\":\\n kill event-entity\\non player turning around:\\nsend action bar \"You are currently turning your head around!\" to player" -}, -{ - "id" : "move_on", - "name" : "On Move On", - "patterns" : [ - "[on] (step|walk)[ing] (on|over) %*item types%", - - "pattern_end" - ], - "since" : "2.0", - "description" : "Called when a player moves onto a certain type of block.\\nPlease note that using this event can cause lag if there are many players online.", - "examples" : "on walking on dirt or grass:\\non stepping on stone:" -}, -{ - "id" : "physics", - "name" : "On Physics", - "patterns" : [ - "[on] [block] physics", - - "pattern_end" - ], - "since" : "1.4.6", - "description" : "Called when a physics check is done on a block. By cancelling this event you can prevent some things from happening, e.g. sand falling, dirt turning into grass, torches dropping if their supporting block is destroyed, etc.Please note that using this event might cause quite some lag since it gets called extremely often.", - "examples" : "# prevents sand from falling\\non block physics:\\n block is sand\\n cancel event" -}, -{ - "id" : "pick_up", - "name" : "On Pick Up", - "patterns" : [ - "[on] [(player|entity)] (pick[ ]up|picking up) [[of] %item types%]", - - "pattern_end" - ], - "since" : "unknown (before 2.1), 2.5 (entity)", - "description" : "Called when a player/entity picks up an item. Please note that the item is still on the ground when this event is called.", - "examples" : "on pick up:\\non entity pickup of wheat:" -}, -{ - "id" : "pig_zap", - "name" : "On Pig Zap", - "patterns" : [ - "[on] pig[ ]zap", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a pig is stroke by lightning and transformed into a zombie pigman. Cancel the event to prevent the transformation.", - "examples" : "on pig zap:" -}, -{ - "id" : "piston_extend", - "name" : "On Piston Extend", - "patterns" : [ - "[on] piston extend[ing]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a piston is about to extend.", - "examples" : "on piston extend:\\n broadcast \"A piston is extending!\"" -}, -{ - "id" : "piston_retract", - "name" : "On Piston Retract", - "patterns" : [ - "[on] piston retract[ing]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a piston is about to retract.", - "examples" : "on piston retract:\\n broadcast \"A piston is retracting!\"" -}, -{ - "id" : "place", - "name" : "On Place", - "patterns" : [ - "[on] [block] (plac(e|ing)|build[ing]) [[of] %item types/block datas%]", - - "pattern_end" - ], - "since" : "1.0, 2.6 (BlockData support)", - "description" : "Called when a player places a block.", - "examples" : "on place:\\non place of a furnace, workbench or chest:\\non break of chest[type=right] or chest[type=left]" -}, -{ - "id" : "player_chunk_enter", - "name" : "On Player Chunk Enter", - "patterns" : [ - "[on] [player] (enter[s] [a] chunk|chunk enter[ing])", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Called when a player enters a chunk. Note that this event is based on 'player move' event, and may be called frequent internally.", - "examples" : "on player enters a chunk:\\n send \"You entered a chunk: %past event-chunk% -&amp;amp;amp;gt; %event-chunk%!\" to player" -}, -{ - "id" : "player_deep_sleep", - "name" : "On Player Deep Sleep", - "patterns" : [ - "[on] [player] deep sleep[ing]", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Called when a player has slept long enough to count as passing the night/storm.\\nCancelling this event will prevent the player from being counted as deeply sleeping unless they exit and re-enter the bed.", - "examples" : "on player deep sleeping:\\n send \"Zzzz..\" to player" -}, -{ - "id" : "player_pickup_arrow", - "name" : "On Player Pickup Arrow", - "patterns" : [ - "[on] [player] (pick[ing| ]up [an] arrow|arrow pick[ing| ]up)", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Called when a player picks up an arrow from the ground.", - "examples" : "on arrow pickup:\\n cancel the event\\n teleport event-projectile to block 5 above event-projectile" -}, -{ - "id" : "player_trade", - "name" : "On Player Trade", - "patterns" : [ - "[on] player trad(e|ing)", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Called when a player has traded with a villager.", - "examples" : "on player trade:\\n chance of 50%:\\n cancel event\\n send \"The trade was somehow denied!\" to player" -}, -{ - "id" : "player_world_change", - "name" : "On Player World Change", - "patterns" : [ - "[on] [player] world chang(ing|e[d])", - - "pattern_end" - ], - "since" : "2.2-dev28", - "description" : "Called when a player enters a world. Does not work with other entities!", - "examples" : "on player world change:\\n world is \"city\"\\n send \"Welcome to the City!\"" -}, -{ - "id" : "portal", - "name" : "On Portal", - "patterns" : [ - "[on] [player] portal", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a player uses a nether or end portal. Cancel the event to prevent the player from teleporting.", - "examples" : "on player portal:" -}, -{ - "id" : "portal_create", - "name" : "On Portal Create", - "patterns" : [ - "[on] portal creat(e|ion)", - - "pattern_end" - ], - "since" : "1.0, 2.5.3 (event-entity support)", - "description" : "Called when a portal is created, either by a player or mob lighting an obsidian frame on fire, or by a nether portal creating its teleportation target in the nether/overworld.\\nIn Minecraft 1.14+, you can use the player in this event.\\nPlease note that there may not always be a player (or other entity) in this event.", - "examples" : "on portal create:" -}, -{ - "id" : "portal_enter", - "name" : "On Portal Enter", - "patterns" : [ - "[on] portal enter[ing]", -"[on] entering [a] portal", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when an entity enters a nether portal or an end portal. Please note that this event will be fired many times for a nether portal.", - "examples" : "on portal enter:" -}, -{ - "id" : "prepare_craft", - "name" : "On Prepare Craft", - "patterns" : [ - "[on] [player] (preparing|beginning) craft[ing] [[of] %item types%]", - - "pattern_end" - ], - "since" : "2.2-Fixes-V10", - "description" : "Called just before displaying crafting result to player. Note that setting the result item might or might not work due to Bukkit bugs.", - "examples" : "on preparing craft of torch:" -}, -{ - "id" : "pressure_plate_trip", - "name" : "On Pressure Plate / Trip", - "patterns" : [ - "[on] [step[ping] on] [a] [pressure] plate", -"[on] (trip|[step[ping] on] [a] tripwire)", - - "pattern_end" - ], - "since" : "1.0 (pressure plate), 1.4.4 (tripwire)", - "description" : "Called when a player steps on a pressure plate or tripwire respectively.", - "examples" : "on step on pressure plate:" -}, -{ - "id" : "projectile_collide", - "name" : "On Projectile Collide", - "patterns" : [ - "[on] projectile collide", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Called when a projectile collides with an entity.", - "examples" : "on projectile collide:\\n teleport shooter of event-projectile to event-entity" -}, -{ - "id" : "projectile_hit", - "name" : "On Projectile Hit", - "patterns" : [ - "[on] projectile hit", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a projectile hits an entity or a block.\\nUse the damage event with a check for a projectile to be able to use the entity that got hit in the case when the projectile hit a living entity.\\nA damage event will even be fired if the damage is 0, e.g. when throwing snowballs at non-nether mobs.", - "examples" : "on projectile hit:\\n event-projectile is arrow\\n delete event-projectile" -}, -{ - "id" : "quit", - "name" : "On Quit", - "patterns" : [ - "[on] (quit[ting]|disconnect[ing]|log[ ]out|logging out|leav(e|ing))", - - "pattern_end" - ], - "since" : "1.0 (simple disconnection)", - "description" : "Called when a player leaves the server.", - "examples" : "on quit:\\non disconnect:" -}, -{ - "id" : "redstone", - "name" : "On Redstone", - "patterns" : [ - "[on] redstone [current] [chang(e|ing)]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when the redstone current of a block changes. This event is of not much use yet.", - "examples" : "on redstone change:\\n send \"someone is using redstone\" to console" -}, -{ - "id" : "region_enterleave", - "name" : "On Region Enter/Leave", - "patterns" : [ - "[on] (enter[ing]|leav(e|ing)|exit[ing]) [of] ([a] region|[[the] region] %regions%)", -"[on] region (enter[ing]|leav(e|ing)|exit[ing])", - - "pattern_end" - ], - "since" : "2.1", - "description" : "Called when a player enters or leaves a region.\\nThis event requires a supported regions plugin to be installed.", - "examples" : "on region exit:\\n message \"Leaving %region%.\"" -}, -{ - "id" : "resource_pack_request_response", - "name" : "On Resource Pack Request Response", - "patterns" : [ - "[on] resource pack [request] response", -"[on] resource pack [request] %resource pack states%", - - "pattern_end" - ], - "since" : "2.4", - "description" : "Called when a player takes action on a resource pack request sent via the \\nsend resource pack effect. \\nThe resource pack condition can be used \\nto check the resource pack state.\\n\\nThis event will be triggered once when the player accepts or declines the resource pack request, \\nand once when the resource pack is successfully installed or failed to download.", - "examples" : "on resource pack request response:\\n if the resource pack was declined or failed to download:\\n\\non resource pack deny:\\n kick the player due to \"You have to install the resource pack to play in this server!\"" -}, -{ - "id" : "respawn", - "name" : "On Respawn", - "patterns" : [ - "[on] [player] respawn[ing]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a player respawns. You should prefer this event over the death event as the player is technically alive when this event is called.", - "examples" : "on respawn:" -}, -{ - "id" : "resurrect_attempt", - "name" : "On Resurrect Attempt", - "patterns" : [ - "[on] [entity] resurrect[ion] [attempt]", - - "pattern_end" - ], - "since" : "2.2-dev28", - "description" : "Called when an entity dies, always. If they are not holding a totem, this is cancelled - you can, however, uncancel it.", - "examples" : "on resurrect attempt:\\n entity is player\\n entity has permission \"admin.undying\"\\n uncancel the event" -}, -{ - "id" : "riptide", - "name" : "On Riptide", - "patterns" : [ - "[on] [use of] riptide [enchant[ment]]", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Called when the player activates the riptide enchantment, using their trident to propel them through the air.\\nNote: the riptide action is performed client side, so manipulating the player in this event may have undesired effects.", - "examples" : "on riptide:\\n send \"You are riptiding!\"" -}, -{ - "id" : "script_loadunload", - "name" : "On Script Load/Unload", - "patterns" : [ - "[on] [async] [script] (load|init|enable)", -"[on] [async] [script] (unload|stop|disable)", - - "pattern_end" - ], - "since" : "2.0", - "description" : "Called directly after the trigger is loaded, or directly before the whole script is unloaded.\\nThe keyword 'async' indicates the trigger can be ran asynchronously, ", - "examples" : "on load:\\n set {running::%script%} to true\\non unload:\\n set {running::%script%} to false" -}, -{ - "id" : "server_list_ping", - "name" : "On Server List Ping", - "patterns" : [ - "[on] server [list] ping", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Called when a server list ping is coming in, generally when a Minecraft client pings the server to show its information in the server list.\\nThe IP expression can be used to get the IP adress of the pinger.\\nThis event can be cancelled on PaperSpigot 1.12.2+ only and this means the player will see the server as offline (but still can join).\\n\\nAlso you can use MOTD, Max Players, Online Players Count, Protocol Version, Version String, Hover List and Server Icon expressions, and Player Info Visibility and Hide Player from Server List effects to modify the server list.", - "examples" : "on server list ping:\\n set the motd to \"Welcome %{player-by-IP::%ip%}%! Join now!\" if {player-by-IP::%ip%} is set, else \"Join now!\"\\n set the fake max players count to (online players count + 1)\\n set the shown icon to a random server icon out of {server-icons::*}" -}, -{ - "id" : "server_startstop", - "name" : "On Server Start/Stop", - "patterns" : [ - "[on] (server|skript) (start|load|enable)", -"[on] (server|skript) (stop|unload|disable)", - - "pattern_end" - ], - "since" : "2.0", - "description" : "Called when the server starts or stops (actually, when Skript starts or stops, so a /reload will trigger these events as well).", - "examples" : "on skript start:\\non server stop:" -}, -{ - "id" : "sheep_regrow_wool", - "name" : "On Sheep Regrow Wool", - "patterns" : [ - "[on] sheep [re]grow[ing] wool", - - "pattern_end" - ], - "since" : "2.2-dev21", - "description" : "Called when sheep regrows its sheared wool back.", - "examples" : "on sheep grow wool:\\n cancel event" -}, -{ - "id" : "shoot", - "name" : "On Shoot", - "patterns" : [ - "[on] [projectile] shoot", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called whenever a projectile is shot. Use the shooter expression to get who shot the projectile.", - "examples" : "on shoot:\\n if projectile is an arrow:\\n send \"you shot an arrow!\" to shooter" -}, -{ - "id" : "sign_change", - "name" : "On Sign Change", - "patterns" : [ - "[on] sign (chang[e]|edit)[ing]", -"[on] [player] (chang[e]|edit)[ing] [a] sign", - - "pattern_end" - ], - "since" : "1.0", - "description" : "As signs are placed empty, this event is called when a player is done editing a sign.", - "examples" : "on sign change:\\n line 2 is empty\\n set line 1 to \"&amp;amp;amp;amp;lt;red&amp;amp;amp;amp;gt;%line 1%\"" -}, -{ - "id" : "slime_split", - "name" : "On Slime Split", - "patterns" : [ - "[on] slime split[ting]", - - "pattern_end" - ], - "since" : "2.2-dev26", - "description" : "Called when a slime splits. Usually this happens when a big slime dies.", - "examples" : "on slime split:" -}, -{ - "id" : "smelt", - "name" : "On Smelt", - "patterns" : [ - "[on] [ore] smelt[ing]", -"[on] smelt[ing] of ore", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a furnace smelts an item in its ore slot.", - "examples" : "on smelt:" -}, -{ - "id" : "sneak_toggle", - "name" : "On Sneak Toggle", - "patterns" : [ - "[on] [player] toggl(e|ing) sneak", -"[on] [player] sneak toggl(e|ing)", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a player starts or stops sneaking. Use is sneaking to get whether the player was sneaking before the event was called.", - "examples" : "# make players that stop sneaking jump\\non sneak toggle:\\n player is sneaking\\n push the player upwards at speed 0.5" -}, -{ - "id" : "spawn", - "name" : "On Spawn", - "patterns" : [ - "[on] spawn[ing] [of %entity types%]", - - "pattern_end" - ], - "since" : "1.0, 2.5.1 (non-living entities)", - "description" : "Called when an entity spawns (excluding players).", - "examples" : "on spawn of a zombie:\\non spawn of an ender dragon:\\n broadcast \"A dragon has been sighted in %world%!\"" -}, -{ - "id" : "spawn_change", - "name" : "On Spawn Change", - "patterns" : [ - "[on] [world] spawn change", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when the spawn point of a world changes.", - "examples" : "on spawn change:\\n broadcast \"someone changed the spawn!\"" -}, -{ - "id" : "spectate", - "name" : "On Spectate", - "patterns" : [ - "[on] [player] stop spectating [(of|from) %*entity types%]", -"[on] [player] (swap|switch) spectating [(of|from) %*entity types%]", -"[on] [player] start spectating [of %*entity types%]", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Called with a player starts, stops or swaps spectating an entity.", - "examples" : "on player start spectating of a zombie:" -}, -{ - "id" : "sponge_absorb", - "name" : "On Sponge Absorb", - "patterns" : [ - "[on] sponge absorb", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Called when a sponge absorbs blocks.", - "examples" : "on sponge absorb:\\n loop absorbed blocks:\\n broadcast \"%loop-block% was absorbed by a sponge\"!" -}, -{ - "id" : "spread", - "name" : "On Spread", - "patterns" : [ - "[on] spread[ing]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a new block forms as a result of a block that can spread, e.g. water or mushrooms.", - "examples" : "on spread:" -}, -{ - "id" : "sprint_toggle", - "name" : "On Sprint Toggle", - "patterns" : [ - "[on] [player] toggl(e|ing) sprint", -"[on] [player] sprint toggl(e|ing)", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a player starts or stops sprinting. Use is sprinting to get whether the player was sprinting before the event was called.", - "examples" : "on sprint toggle:\\n player is not sprinting\\n send \"Run!\"" -}, -{ - "id" : "stonecutter_recipe_select", - "name" : "On Stonecutter Recipe Select", - "patterns" : [ - "[on] stonecutting [[of] %item types%]", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Called when a player selects a recipe in a stonecutter.", - "examples" : "on stonecutting stone slabs\\n cancel the event\\n\\non stonecutting:\\n broadcast \"%player% is using stonecutter to craft %event-item%!\"" -}, -{ - "id" : "swim_toggle", - "name" : "On Swim Toggle", - "patterns" : [ - "[on] [entity] toggl(e|ing) swim", -"[on] [entity] swim toggl(e|ing)", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Called when an entity swims or stops swimming.", - "examples" : "on swim toggle:\\n event-entity does not have permission \"swim\"\\n cancel event" -}, -{ - "id" : "tame", - "name" : "On Tame", - "patterns" : [ - "[on] [entity] tam(e|ing)", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a player tames a wolf or ocelot. Can be cancelled to prevent the entity from being tamed.", - "examples" : "on tame:" -}, -{ - "id" : "target", - "name" : "On Target", - "patterns" : [ - "[on] [entity] target", -"[on] [entity] un[-]target", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a mob starts/stops following/attacking another entity, usually a player.", - "examples" : "on entity target:\\n target is a player" -}, -{ - "id" : "teleport", - "name" : "On Teleport", - "patterns" : [ - "[on] [player] teleport[ing]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called whenever a player is teleported, either by a nether/end portal or other means (e.g. by plugins).", - "examples" : "on teleport:" -}, -{ - "id" : "tool_change", - "name" : "On Tool Change", - "patterns" : [ - "[on] [player['s]] (tool|item held|held item) chang(e|ing)", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called whenever a player changes their held item by selecting a different slot (e.g. the keys 1-9 or the mouse wheel), not by dropping or replacing the item in the current slot.", - "examples" : "on player's held item change:" -}, -{ - "id" : "vehicle_create", - "name" : "On Vehicle Create", - "patterns" : [ - "[on] vehicle create", -"[on] creat(e|ing|ion of) [a] vehicle", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a new vehicle is created, e.g. when a player places a boat or minecart.", - "examples" : "on vehicle create:" -}, -{ - "id" : "vehicle_damage", - "name" : "On Vehicle Damage", - "patterns" : [ - "[on] vehicle damage", -"[on] damag(e|ing) [a] vehicle", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a vehicle gets damage. Too much damage will destroy the vehicle.", - "examples" : "on vehicle damage:" -}, -{ - "id" : "vehicle_destroy", - "name" : "On Vehicle Destroy", - "patterns" : [ - "[on] vehicle destroy", -"[on] destr(oy[ing]|uction of) [a] vehicle", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a vehicle is destroyed. Any passenger will be ejected and the vehicle might drop some item(s).", - "examples" : "on vehicle destroy:\\n cancel event" -}, -{ - "id" : "vehicle_enter", - "name" : "On Vehicle Enter", - "patterns" : [ - "[on] vehicle enter", -"[on] enter[ing] [a] vehicle", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when an entity enters a vehicle, either deliberately (players) or by falling into them (mobs).", - "examples" : "on vehicle enter:\\n entity is a player\\n cancel event" -}, -{ - "id" : "vehicle_exit", - "name" : "On Vehicle Exit", - "patterns" : [ - "[on] vehicle exit", -"[on] exit[ing] [a] vehicle", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when an entity exits a vehicle.", - "examples" : "on vehicle exit:\\n if event-entity is a spider:\\n kill event-entity" -}, -{ - "id" : "weather_change", - "name" : "On Weather Change", - "patterns" : [ - "[on] weather change [to %weather types%]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a world's weather changes.", - "examples" : "on weather change:\\non weather change to sunny:" -}, -{ - "id" : "world_init", - "name" : "On World Init", - "patterns" : [ - "[on] world init[ialization]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a world is initialised. As all default worlds are initialised before any scripts are loaded, this event is only called for newly created worlds.\\nWorld management plugins might change the behaviour of this event though.", - "examples" : "on world init:" -}, -{ - "id" : "world_load", - "name" : "On World Load", - "patterns" : [ - "[on] world load[ing]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a world is loaded. As with the world init event, this event will not be called for the server's default world(s).", - "examples" : "on world load:\\n send \"World is loading...\" to console" -}, -{ - "id" : "world_save", - "name" : "On World Save", - "patterns" : [ - "[on] world sav(e|ing)", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a world is saved to disk. Usually all worlds are saved simultaneously, but world management plugins could change this.", - "examples" : "on world saving:\\n broadcast \"World has been saved!\"" -}, -{ - "id" : "world_unload", - "name" : "On World Unload", - "patterns" : [ - "[on] world unload[ing]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a world is unloaded. This event might never be called if you don't have a world management plugin.", - "examples" : "on world unload:\\n cancel event" -}, -{ - "id" : "zombie_break_door", - "name" : "On Zombie Break Door", - "patterns" : [ - "[on] zombie break[ing] [a] [wood[en]] door", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Called when a zombie is done breaking a wooden door. Can be cancelled to prevent the zombie from breaking the door.", - "examples" : "on zombie breaking a wood door:" -}, -{ - "id" : "periodical", - "name" : "Periodical", - "patterns" : [ - "[on] every %time span%", - - "pattern_end" - ], - "since" : "1.0", - "description" : "An event that is called periodically.", - "examples" : "every 2 seconds:\\nevery minecraft hour:\\nevery tick: # can cause lag depending on the code inside the event\\nevery minecraft days:" -}, -{ - "id" : "eventperiodical", - "name" : "Periodical", - "patterns" : [ - "[on] every %time span% in [world[s]] %worlds%", - - "pattern_end" - ], - "since" : "1.0", - "description" : "An event that is called periodically.", - "examples" : "every 2 seconds in \"world\":\\nevery minecraft hour in \"flatworld\":\\nevery tick in \"world\": # can cause lag depending on the code inside the event\\nevery minecraft days in \"plots\":" -}, - - {"end" : true} - ], - - "expressions" : [ - { - "id" : "ExprAbsorbedBlocks", - "name" : "Absorbed blocks", - "patterns" : [ - "[the] absorbed blocks", - - "pattern_end" - ], - "since" : "2.5", - "description" : "The blocks absorbed by a sponge block.", - "examples" : "the absorbed blocks" -}, -{ - "id" : "ExprAffectedEntities", - "name" : "Affected Entities", - "patterns" : [ - "[the] affected entities", - - "pattern_end" - ], - "since" : "2.4", - "description" : "The affected entities in the area cloud effect event.", - "examples" : "on area cloud effect:\\n loop affected entities:\\n if loop-value is a player:\\n send \"WARNING: you've step on an area effect cloud!\" to loop-value" -}, -{ - "id" : "ExprAge", - "name" : "Age of Block/Entity", - "patterns" : [ - "[the] [max[imum]] age of %blocks/entities%", -"%blocks/entities%'[s] [max[imum]] age", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Returns the age or maximum age of blocks and age for entities (there in no maximum age for entities). -For blocks, 'Age' represents the different growth stages that a crop-like block can go through. A value of 0 indicates that the crop was freshly planted, whilst a value equal to 'maximum age' indicates that the crop is ripe and ready to be harvested. -For entities, 'Age' represents the time left for them to become adults and it's in minus increasing to be 0 which means they're adults, e.g. A baby cow needs 20 minutes to become an adult which equals to 24,000 ticks so their age will be -24000 once spawned.", - "examples" : "# Set targeted crop to fully grown crop\\nset age of targeted block to maximum age of targeted block\\n \\n# Spawn a baby cow that will only need 1 minute to become an adult\\nspawn a baby cow at player\\nset age of last spawned entity to -1200 # in ticks = 60 seconds" -}, -{ - "id" : "ExprAllBannedEntries", - "name" : "All Banned Players/IPs", - "patterns" : [ - "[all [[of] the]|the] banned (players|(ips|ip addresses))", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Obtains the list of all banned players or IP addresses.", - "examples" : "command /banlist:\\n trigger:\\n send all the banned players" -}, -{ - "id" : "ExprAllGroups", - "name" : "All Groups", - "patterns" : [ - "all groups", - - "pattern_end" - ], - "since" : "2.2-dev35", - "description" : "All the groups a player can have. This expression requires Vault and a compatible permissions plugin to be installed.", - "examples" : "command /group &lt;text&gt;:\\n trigger:\\n if argument is \"list\":\\n send \"%all groups%\"" -}, -{ - "id" : "ExprOps", - "name" : "All Operators", - "patterns" : [ - "[all [[of] the]|the] [server] [non(-| )]op[erator]s", - - "pattern_end" - ], - "since" : "2.7", - "description" : "The list of operators on the server.", - "examples" : "set {_ops::*} to all operators" -}, -{ - "id" : "ExprPermissions", - "name" : "All Permissions", - "patterns" : [ - "[(all [[of] the]|the)] permissions (from|of) %players%", -"[(all [[of] the]|the)] %players%'[s] permissions", - - "pattern_end" - ], - "since" : "2.2-dev33", - "description" : "Returns all permissions of the defined player(s). Note that the modifications to resulting list do not actually change permissions.", - "examples" : "set {_permissions::*} to all permissions of the player" -}, -{ - "id" : "ExprScripts", - "name" : "All Scripts", - "patterns" : [ - "[all [of the]] scripts [(without ([subdirectory] paths|parents))]", -"[all [of the]] (enabled|loaded) scripts [(without ([subdirectory] paths|parents))]", -"[all [of the]] (disabled|unloaded) scripts [(without ([subdirectory] paths|parents))]", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Returns all of the scripts, or just the enabled or disabled ones.", - "examples" : "command /scripts:\\n trigger:\\n send \"All Scripts: %scripts%\" to player\\n send \"Loaded Scripts: %enabled scripts%\" to player\\n send \"Unloaded Scripts: %disabled scripts%\" to player" -}, -{ - "id" : "ExprAllCommands", - "name" : "All commands", - "patterns" : [ - "[(all|the|all [of] the)] [registered] [script] commands", - - "pattern_end" - ], - "since" : "2.6", - "description" : "Returns all registered commands or all script commands.", - "examples" : "send \"Number of all commands: %size of all commands%\"\\nsend \"Number of all script commands: %size of all script commands%\"" -}, -{ - "id" : "ExprAlphabetList", - "name" : "Alphabetical Sort", - "patterns" : [ - "alphabetically sorted %texts%", - - "pattern_end" - ], - "since" : "2.2-dev18b", - "description" : "Sorts given strings in alphabetical order.", - "examples" : "set {_list::*} to alphabetically sorted {_strings::*}" -}, -{ - "id" : "ExprAltitude", - "name" : "Altitude", - "patterns" : [ - "[the] altitude[s] of %locations%", -"%locations%'[s] altitude[s]", - - "pattern_end" - ], - "since" : "1.4.3", - "description" : "Effectively an alias of 'y-coordinate of …', it represents the height of some object above bedrock.", - "examples" : "on damage:\\n altitude of the attacker is higher than the altitude of the victim\\n set damage to damage * 1.2" -}, -{ - "id" : "ExprAmount", - "name" : "Amount", - "patterns" : [ - "[the] (amount|number|size) of %objects%", -"[the] recursive (amount|number|size) of %objects%", - - "pattern_end" - ], - "since" : "1.0", - "description" : "The amount of something. -Please note that 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" : "message \"There are %number of all players% players online!\"" -}, -{ - "id" : "ExprAmountOfItems", - "name" : "Amount of Items", - "patterns" : [ - "[the] (amount|number) of %item types% (in|of) %inventories%", - - "pattern_end" - ], - "since" : "2.0", - "description" : "Counts how many of a particular item type are in a given inventory.", - "examples" : "message \"You have %number of ores in the player's inventory% ores in your inventory.\"" -}, -{ - "id" : "ExprAnvilRepairCost", - "name" : "Anvil Repair Cost", - "patterns" : [ - "[the] [anvil] [item] [max[imum]] repair cost [of %inventories%]", -"%inventories%'[s] [anvil] [item] [max[imum]] repair cost", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Returns the experience cost (in levels) to complete the current repair or the maximum experience cost (in levels) to be allowed by the current repair. -The default value of max cost set by vanilla Minecraft is 40.", - "examples" : "on inventory click:\\n if {AnvilRepairSaleActive} = true:\\n wait a tick # recommended, to avoid client bugs\\n set anvil repair cost to anvil repair cost * 50%\\n send \"Anvil repair sale is ON!\" to player\\n\\non inventory click:\\n player have permission \"anvil.repair.max.bypass\"\\n set max repair cost of event-inventory to 99999" -}, -{ - "id" : "ExprAnvilText", - "name" : "Anvil Text Input", - "patterns" : [ - "[the] anvil [inventory] (rename|text) input of %inventories%", -"%inventories%'[s] anvil [inventory] (rename|text) input", - - "pattern_end" - ], - "since" : "2.7", - "description" : "An expression to get the name to be applied to an item in an anvil inventory.", - "examples" : "on inventory click:\\n type of event-inventory is anvil inventory\\n if the anvil input text of the event-inventory is \"FREE OP\":\\n ban player" -}, -{ - "id" : "ExprAppliedEnchantments", - "name" : "Applied Enchantments", - "patterns" : [ - "[the] applied enchant[ment]s", - - "pattern_end" - ], - "since" : "2.5", - "description" : "The applied enchantments in an enchant event. - Deleting or removing the applied enchantments will prevent the item's enchantment.", - "examples" : "on enchant:\\n set the applied enchantments to sharpness 10 and fire aspect 5" -}, -{ - "id" : "ExprArgument", - "name" : "Argument", - "patterns" : [ - "[the] last arg[ument]", -"[the] arg[ument](-| )<(\\d+)>", -"[the] <(\\d*1)st|(\\d*2)nd|(\\d*3)rd|(\\d*[4-90])th> arg[ument][s]", -"[(all [[of] the]|the)] arg[ument][s]", -"[the] %*type%( |-)arg[ument][( |-)<\\d+>]", -"[the] arg[ument]( |-)%*type%[( |-)<\\d+>]", - - "pattern_end" - ], - "since" : "1.0, 2.7 (support for command events)", - "description" : "Usable in script commands and command events. Holds the value of an argument given to the command, e.g. if the command \"/tell <player> <text>\" is used like \"/tell Njol Hello Njol!\" argument 1 is the player named \"Njol\" and argument 2 is \"Hello Njol!\". -One can also use the type of the argument instead of its index to address the argument, e.g. in the above example 'player-argument' is the same as 'argument 1'. -Please note that specifying the argument type is only supported in script commands.", - "examples" : "give the item-argument to the player-argument\\ndamage the player-argument by the number-argument\\ngive a diamond pickaxe to the argument\\nadd argument 1 to argument 2\\nheal the last argument" -}, -{ - "id" : "ExprArithmetic", - "name" : "Arithmetic", - "patterns" : [ - "\\(%number%\\)[ ]+[ ]\\(%number%\\)", -"\\(%number%\\)[ ]+[ ]%number%", -"%number%[ ]+[ ]\\(%number%\\)", -"%number%[ ]+[ ]%number%", -"\\(%number%\\)[ ]-[ ]\\(%number%\\)", -"\\(%number%\\)[ ]-[ ]%number%", -"%number%[ ]-[ ]\\(%number%\\)", -"%number%[ ]-[ ]%number%", -"\\(%number%\\)[ ]*[ ]\\(%number%\\)", -"\\(%number%\\)[ ]*[ ]%number%", -"%number%[ ]*[ ]\\(%number%\\)", -"%number%[ ]*[ ]%number%", -"\\(%number%\\)[ ]/[ ]\\(%number%\\)", -"\\(%number%\\)[ ]/[ ]%number%", -"%number%[ ]/[ ]\\(%number%\\)", -"%number%[ ]/[ ]%number%", -"\\(%number%\\)[ ]^[ ]\\(%number%\\)", -"\\(%number%\\)[ ]^[ ]%number%", -"%number%[ ]^[ ]\\(%number%\\)", -"%number%[ ]^[ ]%number%", - - "pattern_end" - ], - "since" : "1.4.2", - "description" : "Arithmetic expressions, e.g. 1 + 2, (health of player - 2) / 3, etc.", - "examples" : "set the player's health to 10 - the player's health\\nloop (argument + 2) / 5 times:\\n message \"Two useless numbers: %loop-num * 2 - 5%, %2^loop-num - 1%\"\\nmessage \"You have %health of player * 2% half hearts of HP!\"" -}, -{ - "id" : "ExprArmorSlot", - "name" : "Armour Slot", - "patterns" : [ - "[the] ((boots|shoes|leg[ging]s|chestplate[s]|helmet[s]) [(item|slot)]|armo[u]r[s]) of %living entities%", -"%living entities%'[s] ((boots|shoes|leg[ging]s|chestplate[s]|helmet[s]) [(item|slot)]|armo[u]r[s])", - - "pattern_end" - ], - "since" : "1.0, INSERT VERSION (Armour)", - "description" : "Equipment of living entities, i.e. the boots, leggings, chestplate or helmet.", - "examples" : "set chestplate of the player to a diamond chestplate\\nhelmet of player is neither a helmet nor air # player is wearing a block, e.g. from another plugin" -}, -{ - "id" : "ExprAttachedBlock", - "name" : "Arrow Attached Block", - "patterns" : [ - "[the] (attached|hit) block of %projectiles%", -"%projectiles%'[s] (attached|hit) block", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Returns the attached block of an arrow.", - "examples" : "set hit block of last shot arrow to diamond block" -}, -{ - "id" : "ExprArrowKnockbackStrength", - "name" : "Arrow Knockback Strength", - "patterns" : [ - "[the] arrow knockback strength of %projectiles%", -"%projectiles%'[s] arrow knockback strength", - - "pattern_end" - ], - "since" : "2.5.1", - "description" : "An arrow's knockback strength.", - "examples" : "on shoot:\\n event-projectile is an arrow\\n set arrow knockback strength of event-projectile to 10" -}, -{ - "id" : "ExprArrowsStuck", - "name" : "Arrows Stuck", - "patterns" : [ - "[number of] arrow[s] stuck in %living entities%", - - "pattern_end" - ], - "since" : "2.5", - "description" : "The number of arrows stuck in a living entity.", - "examples" : "set arrows stuck in player to 5" -}, -{ - "id" : "ExprAttackCooldown", - "name" : "Attack Cooldown", - "patterns" : [ - "[the] attack cooldown of %players%", -"%players%'[s] attack cooldown", - - "pattern_end" - ], - "since" : "2.6.1", - "description" : "Returns the current cooldown for a player's attack. This is used to calculate damage, with 1.0 representing a fully charged attack and 0.0 representing a non-charged attack. -NOTE: Currently this can not be set to anything.", - "examples" : "on damage:\\n if attack cooldown of attacker < 1:\\n set damage to 0\\n send \"Your hit was too weak! wait until your weapon is fully charged next time.\" to attacker" -}, -{ - "id" : "ExprAttacked", - "name" : "Attacked", - "patterns" : [ - "[the] (attacked|damaged|victim) [<(.+)>]", - - "pattern_end" - ], - "since" : "1.3, 2.6.1 (projectile hit event)", - "description" : "The victim of a damage event, e.g. when a player attacks a zombie this expression represents the zombie. When using Minecraft 1.11+, this also covers the hit entity in a projectile hit event.", - "examples" : "on damage:\\n victim is a creeper\\n damage the attacked by 1 heart" -}, -{ - "id" : "ExprAttacker", - "name" : "Attacker", - "patterns" : [ - "[the] (attacker|damager)", - - "pattern_end" - ], - "since" : "1.3", - "description" : "The attacker of a damage event, e.g. when a player attacks a zombie this expression represents the player. -Please note that the attacker can also be a block, e.g. a cactus or lava, but this expression will not be set in these cases.", - "examples" : "on damage:\\n attacker is a player\\n health of attacker is less than or equal to 2\\n damage victim by 1 heart" -}, -{ - "id" : "ExprBed", - "name" : "Bed", - "patterns" : [ - "[the] [((safe|valid)|(unsafe|invalid))] bed[s] [location[s]] of %offline players%", -"%offline players%'[s] [((safe|valid)|(unsafe|invalid))] bed[s] [location[s]]", - - "pattern_end" - ], - "since" : "2.0, 2.7 (offlineplayers, safe bed)", - "description" : "Returns the bed location of a player, i.e. the spawn point of a player if they ever slept in a bed and the bed still exists and is unobstructed however, you can set the unsafe bed location of players and they will respawn there even if it has been obstructed or doesn't exist anymore and that's the default behavior of this expression otherwise you will need to be specific i.e. safe bed location. - -NOTE: Offline players can not have their bed location changed, only online players.", - "examples" : "if bed of player exists:\\n teleport player the the player's bed\\nelse:\\n teleport the player to the world's spawn point\\n\\nset the bed location of player to spawn location of world(\"world\") # unsafe/invalid bed location\\nset the safe bed location of player to spawn location of world(\"world\") # safe/valid bed location" -}, -{ - "id" : "ExprBiome", - "name" : "Biome", - "patterns" : [ - "[the] biome [(of|%direction%) %locations%]", -"%locations%'[s] biome", - - "pattern_end" - ], - "since" : "1.4.4, 2.6.1 (3D biomes)", - "description" : "The biome at a certain location. Please note that biomes are only defined for x/z-columns -(i.e. the altitude (y-coordinate) doesn't matter), up until Minecraft 1.15.x. -As of Minecraft 1.16, biomes are now 3D (per block vs column).", - "examples" : "# damage player in deserts constantly\\nevery real minute:\\n loop all players:\\n biome at loop-player is desert\\n damage the loop-player by 1" -}, -{ - "id" : "ExprBlock", - "name" : "Block", - "patterns" : [ - "[the] [event-]block", - - "pattern_end" - ], - "since" : "1.0", - "description" : "The block involved in the event, e.g. the clicked block or the placed block. -Can optionally include a direction as well, e.g. 'block above' or 'block in front of the player'.", - "examples" : "block is ore\\nset block below to air\\nspawn a creeper above the block\\nloop blocks in radius 4:\\n loop-block is obsidian\\n set loop-block to water\\nblock is a chest:\\n clear the inventory of the block" -}, -{ - "id" : "ExprBlock", - "name" : "Block", - "patterns" : [ - "[the] block %direction% [%location%]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "The block involved in the event, e.g. the clicked block or the placed block. -Can optionally include a direction as well, e.g. 'block above' or 'block in front of the player'.", - "examples" : "block is ore\\nset block below to air\\nspawn a creeper above the block\\nloop blocks in radius 4:\\n loop-block is obsidian\\n set loop-block to water\\nblock is a chest:\\n clear the inventory of the block" -}, -{ - "id" : "ExprBreakSpeed", - "name" : "Block Break Speed", - "patterns" : [ - "[the] break speed[s] [of %blocks%] [for %players%]", -"%block%'[s] break speed[s] [for %players%]", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Gets the speed at which the given player would break this block, taking into account tools, potion effects, whether or not the player is in water, enchantments, etc. The returned value is the amount of progress made in breaking the block each tick. When the total breaking progress reaches 1.0, the block is broken. Note that the break speed can change in the course of breaking a block, e.g. if a potion effect is applied or expires, or the player jumps/enters water.", - "examples" : "on left click using diamond pickaxe:\\n event-block is set\\n send \"Break Speed: %break speed for player%\" to player" -}, -{ - "id" : "ExprBlockData", - "name" : "Block Data", - "patterns" : [ - "[the] block[ ]data of %blocks%", -"%blocks%'[s] block[ ]data", - - "pattern_end" - ], - "since" : "2.5, 2.5.2 (set)", - "description" : "Get the block data associated with a block. This data can also be used to set blocks.", - "examples" : "set {data} to block data of target block\\nset block at player to {data}\\nset block data of target block to oak_stairs[facing=south;waterlogged=true]" -}, -{ - "id" : "ExprBlockHardness", - "name" : "Block Hardness", - "patterns" : [ - "[the] [block] hardness of %item types%", -"%item types%'[s] [block] hardness", - - "pattern_end" - ], - "since" : "2.6", - "description" : "Obtains the block's hardness level (also known as \"strength\"). This number is used to calculate the time required to break each block.", - "examples" : "set {_hard} to block hardness of target block\\nif block hardness of target block > 5:" -}, -{ - "id" : "ExprBlockSphere", - "name" : "Block Sphere", - "patterns" : [ - "[(all [[of] the]|the)] blocks in radius %number% [(of|around) %location%]", -"[(all [[of] the]|the)] blocks around %location% in radius %number%", - - "pattern_end" - ], - "since" : "1.0", - "description" : "All blocks in a sphere around a center, mostly useful for looping.", - "examples" : "loop blocks in radius 5 around the player:\\n set loop-block to air" -}, -{ - "id" : "ExprBlocks", - "name" : "Blocks", - "patterns" : [ - "[(all [[of] the]|the)] blocks %direction% [%locations%]", -"[(all [[of] the]|the)] blocks from %location% [on] %direction%", -"[(all [[of] the]|the)] blocks from %location% to %location%", -"[(all [[of] the]|the)] blocks between %location% and %location%", -"[(all [[of] the]|the)] blocks within %location% and %location%", -"[(all [[of] the]|the)] blocks (in|within) %chunk%", - - "pattern_end" - ], - "since" : "1.0, 2.5.1 (within/cuboid/chunk)", - "description" : "Blocks relative to other blocks or between other blocks. Can be used to get blocks relative to other blocks or for looping. -Blocks from/to and between will return a straight line whereas blocks within will return a cuboid.", - "examples" : "loop blocks above the player:\\nloop blocks between the block below the player and the targeted block:\\nset the blocks below the player, the victim and the targeted block to air\\nset all blocks within {loc1} and {loc2} to stone\\nset all blocks within chunk at player to air" -}, -{ - "id" : "ExprBlocksInRegion", - "name" : "Blocks in Region", - "patterns" : [ - "[(all|the)] blocks (in|of) [[the] region[s]] %regions%", - - "pattern_end" - ], - "since" : "2.1", - "description" : "All blocks in a region. -This expression requires a supported regions plugin to be installed.", - "examples" : "loop all blocks in the region {arena.%{faction.%player%}%}:\\n clear the loop-block" -}, -{ - "id" : "ExprBookAuthor", - "name" : "Book Author", - "patterns" : [ - "[the] [book] (author|writer|publisher) of %item types%", -"%item types%'[s] [book] (author|writer|publisher)", - - "pattern_end" - ], - "since" : "2.2-dev31", - "description" : "The author of a book.", - "examples" : "on book sign:\\n message \"Book Title: %author of event-item%\"" -}, -{ - "id" : "ExprBookPages", - "name" : "Book Pages", - "patterns" : [ - "[all [[of] the]|the] [book] (pages|content) of %item types/item stacks%", -"%item types/item stacks%'[s] [book] (pages|content)", -"[book] page %number% of %item types/item stacks%", -"%item types/item stacks%'[s] [book] page %number%", - - "pattern_end" - ], - "since" : "2.2-dev31, 2.7 (changers)", - "description" : "The pages of a book (Supports Skript's chat format) -Note: In order to modify the pages of a new written book, you must have the title and author -of the book set. Skript will do this for you, but if you want your own, please set those values.", - "examples" : "on book sign:\\n message \"Book Pages: %pages of event-item%\"\\n message \"Book Page 1: %page 1 of event-item%\"\\n\\nset page 1 of player's held item to \"Book writing\"" -}, -{ - "id" : "ExprBookTitle", - "name" : "Book Title", - "patterns" : [ - "[the] book (name|title) of %item types%", -"%item types%'[s] book (name|title)", - - "pattern_end" - ], - "since" : "2.2-dev31", - "description" : "The title of a book.", - "examples" : "on book sign:\\n message \"Book Title: %title of event-item%\"" -}, -{ - "id" : "ExprBurnCookTime", - "name" : "Burn/Cook Time", - "patterns" : [ - "[the] burn[ing] time", -"[the] (burn|cook)[ing] time of %blocks%", -"%blocks%'[s] (burn|cook)[ing] time", - - "pattern_end" - ], - "since" : "2.3", - "description" : "The time a furnace takes to burn an item in a fuel burn event. -Can also be used to change the burn/cook time of a placed furnace.", - "examples" : "on fuel burn:\\n if fuel slot is coal:\\n set burning time to 1 tick" -}, -{ - "id" : "ExprStringCase", - "name" : "Case Text", - "patterns" : [ - "%texts% in (upper|lower)[ ]case", -"(upper|lower)[ ]case %texts%", -"capitali(s|z)ed %texts%", -"%texts% in [(lenient|strict) ](proper|title)[ ]case", -"[(lenient|strict) ](proper|title)[ ]case %texts%", -"%texts% in [(lenient|strict) ]camel[ ]case", -"[(lenient|strict) ]camel[ ]case %texts%", -"%texts% in [(lenient|strict) ]pascal[ ]case", -"[(lenient|strict) ]pascal[ ]case %texts%", -"%texts% in [(lower|upper|capital|screaming)[ ]]snake[ ]case", -"[(lower|upper|capital|screaming)[ ]]snake[ ]case %texts%", -"%texts% in [(lower|upper|capital)[ ]]kebab[ ]case", -"[(lower|upper|capital)[ ]]kebab[ ]case %texts%", - - "pattern_end" - ], - "since" : "2.2-dev16 (lowercase and uppercase), 2.5 (advanced cases)", - "description" : "Copy of given text in Lowercase, Uppercase, Proper Case, camelCase, PascalCase, Snake_Case, and Kebab-Case", - "examples" : "\"Oops!\" in lowercase # oops!\\n\"oops!\" in uppercase # OOPS!\\n\"hellO i'm steve!\" in proper case # HellO I'm Steve!\\n\"hellO i'm steve!\" in strict proper case # Hello I'm Steve!\\n\"spAwn neW boSs ()\" in camel case # spAwnNeWBoSs()\\n\"spAwn neW boSs ()\" in strict camel case # spawnNewBoss()\\n\"geneRate ranDom numBer ()\" in pascal case # GeneRateRanDomNumBer()\\n\"geneRate ranDom numBer ()\" in strict pascal case # GenerateRandomNumber()\\n\"Hello Player!\" in snake case # Hello_Player!\\n\"Hello Player!\" in lower snake case # hello_player!\\n\"Hello Player!\" in upper snake case # HELLO_PLAYER!\\n\"What is your name?\" in kebab case # What-is-your-name?\\n\"What is your name?\" in lower kebab case # what-is-your-name?\\n\"What is your name?\" in upper kebab case # WHAT-IS-YOUR-NAME?" -}, -{ - "id" : "ExprCharacters", - "name" : "Characters Between", - "patterns" : [ - "[(all [[of] the]|the)] [alphanumeric] characters (between|from) %text% (and|to) %text%", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "All characters between two given characters, useful for generating random strings. This expression uses the Unicode numerical code of a character to determine which characters are between the two given characters. The ASCII table linked here shows this ordering for the first 256 characters. -If you would like only alphanumeric characters you can use the 'alphanumeric' option in the expression. -If strings of more than one character are given, only the first character of each is used.", - "examples" : "loop characters from \"a\" to \"f\":\\n broadcast \"%loop-value%\"\\n\\n# 0123456789:;<=>?@ABC... ...uvwxyz\\nsend characters between \"0\" and \"z\"\\n\\n# 0123456789ABC... ...uvwxyz\\nsend alphanumeric characters between \"0\" and \"z\"" -}, -{ - "id" : "ExprChatFormat", - "name" : "Chat Format", - "patterns" : [ - "[the] (message|chat) format[ting]", - - "pattern_end" - ], - "since" : "2.2-dev31", - "description" : "Can be used to get/retrieve the chat format. The sender of a message is represented by [player] or [sender], and the message by [message] or [msg].", - "examples" : "set the chat format to \"&lt;yellow&gt;[player]&lt;light gray&gt;: &lt;green&gt;[message]\"" -}, -{ - "id" : "ExprChatRecipients", - "name" : "Chat Recipients", - "patterns" : [ - "[chat][( |-)]recipients", - - "pattern_end" - ], - "since" : "2.2-Fixes-v7, 2.2-dev35 (clearing recipients)", - "description" : "Recipients of chat events where this is called.", - "examples" : "chat recipients" -}, -{ - "id" : "ExprChunk", - "name" : "Chunk", - "patterns" : [ - "[(all [[of] the]|the)] chunk[s] (of|%directions%) %locations%", -"%locations%'[s] chunk[s]", -"[(all [[of] the]|the)] loaded chunks (of|in) %worlds%", - - "pattern_end" - ], - "since" : "2.0, INSERT VERSION (loaded chunks)", - "description" : "Returns the chunk of a block, location or entity is in, or a list of the loaded chunks of a world.", - "examples" : "add the chunk at the player to {protected chunks::*}\\nset {_chunks::*} to the loaded chunks of the player's world" -}, -{ - "id" : "ExprClicked", - "name" : "Clicked Block/Entity/Inventory/Slot", - "patterns" : [ - "[the] (clicked [enchant[ment]] (button|option)|clicked (block|%*item type/entity type%)|clicked slot|clicked inventory|click (type|action)|inventory action)", - - "pattern_end" - ], - "since" : "1.0, 2.2-dev35 (more clickable things)", - "description" : "The clicked block, entity, inventory, inventory slot, inventory click type or inventory action.", - "examples" : "message \"You clicked on a %type of clicked entity%!\"\\nif the clicked block is a chest:\\n show the inventory of the clicked block to the player" -}, -{ - "id" : "ExprColorOf", - "name" : "Color of", - "patterns" : [ - "[the] colo[u]r[s] of %blocks/item types/entities/firework effects%", -"%blocks/item types/entities/firework effects%'[s] colo[u]r[s]", - - "pattern_end" - ], - "since" : "1.2", - "description" : "The color of an item, can also be used to color chat messages with \"<%color of ...%>this text is colored!\".", - "examples" : "on click on wool:\\n message \"This wool block is <%color of block%>%color of block%<reset>!\"\\n set the color of the block to black" -}, -{ - "id" : "ExprColoured", - "name" : "Colored / Uncolored", - "patterns" : [ - "(colo[u]r-|colo[u]red )%texts%", -"(format-|formatted )%texts%", -"(un|non)[-](colo[u]r-|colo[u]red |format-|formatted )%texts%", - - "pattern_end" - ], - "since" : "2.0", - "description" : "Parses <color>s and, optionally, chat styles in a message or removes -any colors and chat styles from the message. Parsing all -chat styles requires this expression to be used in same line with -the send effect.", - "examples" : "on chat:\\n set message to colored message # Safe; only colors get parsed\\ncommand /fade &lt;player&gt;:\\n trigger:\\n set display name of the player-argument to uncolored display name of the player-argument\\ncommand /format &lt;text&gt;:\\n trigger:\\n message formatted text-argument # Safe, because we're sending to whoever used this command" -}, -{ - "id" : "ExprCommand", - "name" : "Command", - "patterns" : [ - "[the] (full|complete|whole) command", -"[the] command [(label|alias)]", - - "pattern_end" - ], - "since" : "2.0, 2.7 (support for script commands)", - "description" : "The command that caused an 'on command' event (excluding the leading slash and all arguments)", - "examples" : "# prevent any commands except for the /exit command during some game\\non command:\\n if {game::%player%::playing} is true:\\n if the command is not \"exit\":\\n message \"You're not allowed to use commands during the game\"\\n cancel the event" -}, -{ - "id" : "ExprCommandInfo", - "name" : "Command Info", - "patterns" : [ - "[the] main command [label|name] [of [[the] command[s] %texts%]]", -"command[s] %texts%'[s] main command [label|name]", -"[the] description [of [[the] command[s] %texts%]]", -"command[s] %texts%'[s] description", -"[the] label [of [[the] command[s] %texts%]]", -"command[s] %texts%'[s] label", -"[the] usage [of [[the] command[s] %texts%]]", -"command[s] %texts%'[s] usage", -"[(all|the|all [of] the)] aliases [of [[the] command[s] %texts%]]", -"command[s] %texts%'[s] aliases", -"[the] permission [of [[the] command[s] %texts%]]", -"command[s] %texts%'[s] permission", -"[the] permission message [of [[the] command[s] %texts%]]", -"command[s] %texts%'[s] permission message", -"[the] plugin [owner] [of [[the] command[s] %texts%]]", -"command[s] %texts%'[s] plugin [owner]", - - "pattern_end" - ], - "since" : "2.6", - "description" : "Get information about a command.", - "examples" : "main command label of command \"skript\"\\ndescription of command \"help\"\\nlabel of command \"pl\"\\nusage of command \"help\"\\naliases of command \"bukkit:help\"\\npermission of command \"/op\"\\ncommand \"op\"'s permission message\\ncommand \"sk\"'s plugin owner\\n\\ncommand /greet <player>:\\n usage: /greet <target>\\n trigger:\\n if arg-1 is sender:\\n send \"&cYou can't greet yourself! Usage: %the usage%\"\\n stop\\n send \"%sender% greets you!\" to arg-1\\n send \"You greeted %arg-1%!\"" -}, -{ - "id" : "ExprCommandSender", - "name" : "Command Sender", - "patterns" : [ - "[the] [command['s]] (sender|executor)", - - "pattern_end" - ], - "since" : "2.0", - "description" : "The player or the console who sent a command. Mostly useful in commands and command events. -If the command sender is a command block, its location can be retrieved by using %block's location%", - "examples" : "make the command sender execute \"/say hi!\"\\n\\non command:\\n log \"%executor% used command /%command% %arguments%\" to \"commands.log\"" -}, -{ - "id" : "ExprCompassTarget", - "name" : "Compass Target", - "patterns" : [ - "[the] compass target of %players%", -"%players%'[s] compass target", - - "pattern_end" - ], - "since" : "2.0", - "description" : "The location a player's compass is pointing at.", - "examples" : "# make all player's compasses target a player stored in {compass::target::%player%}\\nevery 5 seconds:\\n loop all players:\\n set the loop-player's compass target to location of {compass::target::%%loop-player%}" -}, -{ - "id" : "LitConsole", - "name" : "Console", - "patterns" : [ - "[the] (console|server)", - - "pattern_end" - ], - "since" : "1.3.1", - "description" : "Represents the server's console which can receive messages and execute commands", - "examples" : "execute console command \"/stop\"\\nsend \"message to console\" to the console" -}, -{ - "id" : "ExprCmdCooldownInfo", - "name" : "Cooldown Time/Remaining Time/Elapsed Time/Last Usage/Bypass Permission", - "patterns" : [ - "[the] remaining [time] [of [the] (cooldown|wait) [(of|for) [the] [current] command]]", -"[the] elapsed [time] [of [the] (cooldown|wait) [(of|for) [the] [current] command]]", -"[the] ((cooldown|wait) time|[wait] time of [the] (cooldown|wait) [(of|for) [the] [current] command])", -"[the] last usage [date] [of [the] (cooldown|wait) [(of|for) [the] [current] command]]", -"[the] [cooldown] bypass perm[ission] [of [the] (cooldown|wait) [(of|for) [the] [current] command]]", - - "pattern_end" - ], - "since" : "2.2-dev33", - "description" : "Only usable in command events. Represents the cooldown time, the remaining time, the elapsed time, -the last usage date, or the cooldown bypass permission.", - "examples" : "command /home:\\n cooldown: 10 seconds\\n cooldown message: You last teleported home %elapsed time% ago, you may teleport home again in %remaining time%.\\n trigger:\\n teleport player to {home::%player%}" -}, -{ - "id" : "ExprCoordinate", - "name" : "Coordinate", - "patterns" : [ - "[the] (x|y|z)(-| )(coord[inate]|pos[ition]|loc[ation])[s] of %locations%", -"%locations%'[s] (x|y|z)(-| )(coord[inate]|pos[ition]|loc[ation])[s]", - - "pattern_end" - ], - "since" : "1.4.3", - "description" : "Represents a given coordinate of a location. ", - "examples" : "player's y-coordinate is smaller than 40:\\n message \"Watch out for lava!\"" -}, -{ - "id" : "ExprEntity", - "name" : "Creature/Entity/Player/Projectile/Villager/Powered Creeper/etc.", - "patterns" : [ - "[the] [event-]<.+>", - - "pattern_end" - ], - "since" : "1.0", - "description" : "The entity involved in an event (an entity is a player, a creature or an inanimate object like ignited TNT, a dropped item or an arrow). -You can use the specific type of the entity that's involved in the event, e.g. in a 'death of a creeper' event you can use 'the creeper' instead of 'the entity'.", - "examples" : "give a diamond sword of sharpness 3 to the player\\nkill the creeper\\nkill all powered creepers in the wolf's world\\nprojectile is an arrow" -}, -{ - "id" : "ExprCursorSlot", - "name" : "Cursor Slot", - "patterns" : [ - "[the] cursor slot of %players%", -"%players%'[s] cursor slot", - - "pattern_end" - ], - "since" : "2.2-dev17", - "description" : "The item which the player has on their inventory cursor. This slot is always empty if player has no inventory open.", - "examples" : "cursor slot of player is dirt\\nset cursor slot of player to 64 diamonds" -}, -{ - "id" : "ExprChestInventory", - "name" : "Custom Chest Inventory", - "patterns" : [ - "[a] [new] chest inventory (named|with name) %text% [with %number% row[s]]", -"[a] [new] chest inventory with %number% row[s] [(named|with name) %text%]", - - "pattern_end" - ], - "since" : "2.2-dev34, INSERT VERSION (chat format)", - "description" : "Returns a chest inventory with the given amount of rows and the name. Use the open inventory effect to open it.", - "examples" : "open chest inventory with 1 row named \"test\" to player\\n\\nset {_inventory} to a chest inventory with 1 row\\nset slot 4 of {_inventory} to a diamond named \"example\"\\nopen {_inventory} to player\\n\\nopen chest inventory named \"<##00ff00>hex coloured title!\" with 6 rows to player" -}, -{ - "id" : "ExprCustomModelData", - "name" : "Custom Model Data", - "patterns" : [ - "[the] [custom] model data of %item types%", -"%item types%'[s] [custom] model data", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Get/set the CustomModelData tag for an item. (Value is an integer between 0 and 99999999)", - "examples" : "set custom model data of player's tool to 3\\nset {_model} to custom model data of player's tool" -}, -{ - "id" : "ExprDamage", - "name" : "Damage", - "patterns" : [ - "[the] damage", - - "pattern_end" - ], - "since" : "1.3.5, INSERT VERSION (item damage event)", - "description" : "How much damage is done in a entity/vehicle/item damage events. -For entity damage events, possibly ignoring armour, criticals and/or enchantments (remember that in Skript '1' is one full heart, not half a heart). -For items, it's the amount of durability damage the item will be taking.", - "examples" : "on item damage:\\n event-item is any tool\\n clear damage # unbreakable tools as the damage will be 0\\non damage:\\n increase the damage by 2" -}, -{ - "id" : "ExprDamageCause", - "name" : "Damage Cause", - "patterns" : [ - "[the] damage (cause|type)", - - "pattern_end" - ], - "since" : "2.0", - "description" : "The damage cause of a damage event. Please click on the link for more information.", - "examples" : "damage cause is lava, fire or burning" -}, -{ - "id" : "ExprDurability", - "name" : "Damage Value/Durability", - "patterns" : [ - "[the] (damage[s] [value[s]]|durabilit(y|ies)) of %item types/slots%", -"%item types/slots%'[s] (damage[s] [value[s]]|durabilit(y|ies))", - - "pattern_end" - ], - "since" : "1.2, 2.7 (durability reversed)", - "description" : "The damage value/durability of an item.", - "examples" : "set damage value of player's tool to 10\\nreset the durability of {_item}\\nset durability of player's held item to 0" -}, -{ - "id" : "ExprDamagedItem", - "name" : "Damaged Item", - "patterns" : [ - "%item type% with (damage|data) [value] %number%", -"%item type% damaged by %number%", - - "pattern_end" - ], - "since" : "2.4", - "description" : "Directly damages an item. In MC versions 1.12.2 and lower, this can be used to apply data values to items/blocks", - "examples" : "give player diamond sword with damage value 100\\nset player's tool to diamond hoe damaged by 250\\ngive player diamond sword with damage 700 named \"BROKEN SWORD\"\\nset {_item} to diamond hoe with damage value 50 named \"SAD HOE\"\\nset target block of player to wool with data value 1\\nset target block of player to potato plant with data value 7" -}, -{ - "id" : "ExprDateAgoLater", - "name" : "Date Ago/Later", - "patterns" : [ - "%time span% (ago|in the past|before [the] [date] %date%)", -"%time span% (later|(from|after) [the] [date] %date%)", - - "pattern_end" - ], - "since" : "2.2-dev33", - "description" : "A date the specified timespan before/after another date.", - "examples" : "set {_yesterday} to 1 day ago\\nset {_hourAfter} to 1 hour after {someOtherDate}\\nset {_hoursBefore} to 5 hours before {someOtherDate}" -}, -{ - "id" : "ExprDefaultValue", - "name" : "Default Value", - "patterns" : [ - "%objects% (otherwise|?) %objects%", - - "pattern_end" - ], - "since" : "2.2-dev36", - "description" : "A shorthand expression for giving things a default value. If the first thing isn't set, the second thing will be returned.", - "examples" : "broadcast {score::%player's uuid%} otherwise \"%player% has no score!\"" -}, -{ - "id" : "ExprDifference", - "name" : "Difference", - "patterns" : [ - "difference (between|of) %object% and %object%", - - "pattern_end" - ], - "since" : "1.4", - "description" : "The difference between two values, e.g. numbers, dates or times.", - "examples" : "if difference between {command::%player%::lastuse} and now is smaller than a minute:\\n message \"You have to wait a minute before using this command again!\"" -}, -{ - "id" : "ExprDifficulty", - "name" : "Difficulty", - "patterns" : [ - "[the] difficult(y|ies) of %worlds%", -"%worlds%'[s] difficult(y|ies)", - - "pattern_end" - ], - "since" : "2.3", - "description" : "The difficulty of a world.", - "examples" : "set the difficulty of \"world\" to hard" -}, -{ - "id" : "ExprDirection", - "name" : "Direction", - "patterns" : [ - "[%number% [(block|met(er|re))[s]] [to the]] (north[[(-| )](east|west)][(ward[(s|ly)]|er[(n|ly)])] [of]|south[[(-| )](east|west)][(ward[(s|ly)]|er[(n|ly)])] [of]|(east|west)[(ward[(s|ly)]|er[(n|ly)])] [of]|above|over|(up|down)[ward[(s|ly)]]|below|under[neath]|beneath) [%direction%]", -"[%number% [(block|met(er|re))[s]]] in [the] (direction|horizontal direction|facing|horizontal facing) of %entity/block% [(of|from)]", -"[%number% [(block|met(er|re))[s]]] in %entity/block%'[s] (direction|horizontal direction|facing|horizontal facing) [(of|from)]", -"[%number% [(block|met(er|re))[s]]] (in[ ]front [of]|forward[s]|behind|backwards|[to the] (right|left) [of])", -"[%number% [(block|met(er|re))[s]]] horizontal[ly] (in[ ]front [of]|forward[s]|behind|backwards|to the (right|left) [of])", - - "pattern_end" - ], - "since" : "1.0 (basic), 2.0 (extended)", - "description" : "A helper expression for the direction type.", - "examples" : "thrust the player upwards\\nset the block behind the player to water\\nloop blocks above the player:\\n set {_rand} to a random integer between 1 and 10\\n set the block {_rand} meters south east of the loop-block to stone\\nblock in horizontal facing of the clicked entity from the player is air\\nspawn a creeper 1.5 meters horizontally behind the player\\nspawn a TNT 5 meters above and 2 meters horizontally behind the player\\nthrust the last spawned TNT in the horizontal direction of the player with speed 0.2\\npush the player upwards and horizontally forward at speed 0.5\\npush the clicked entity in in the direction of the player at speed -0.5\\nopen the inventory of the block 2 blocks below the player to the player\\nteleport the clicked entity behind the player\\ngrow a regular tree 2 meters horizontally behind the player" -}, -{ - "id" : "ExprDistance", - "name" : "Distance", - "patterns" : [ - "[the] distance between %location% and %location%", - - "pattern_end" - ], - "since" : "1.0", - "description" : "The distance between two points.", - "examples" : "if the distance between the player and {home::%uuid of player%} is smaller than 20:\\n message \"You're very close to your home!\"" -}, -{ - "id" : "ExprDrops", - "name" : "Drops", - "patterns" : [ - "[the] drops", - - "pattern_end" - ], - "since" : "1.0", - "description" : "Only works in death events. Holds the drops of the dying creature. Drops can be prevented by removing them with \"remove ... from drops\", e.g. \"remove all pickaxes from the drops\", or \"clear drops\" if you don't want any drops at all.", - "examples" : "clear drops\\nremove 4 planks from the drops" -}, -{ - "id" : "ExprDropsOfBlock", - "name" : "Drops Of Block", - "patterns" : [ - "[(all|the|all [of] the)] drops of %blocks% [(using|with) %item type% [(as %entity%)]]", -"%blocks%'s drops [(using|with) %item type% [(as %entity%)]]", - - "pattern_end" - ], - "since" : "2.5.1", - "description" : "A list of the items that will drop when a block is broken.", - "examples" : "on break of block:\\n give drops of block using player's tool to player" -}, -{ - "id" : "ExprElement", - "name" : "Element of", - "patterns" : [ - "([the] first|[the] last|[a] random|[the] %number%(st|nd|rd|th)|[the] %number%(st|nd|rd|th) [to] last) element [out] of %objects%", - - "pattern_end" - ], - "since" : "2.0, 2.7 (relative to last element)", - "description" : "The first, last or a random element of a set, e.g. a list variable. -See also: random", - "examples" : "give a random element out of {free items::*} to the player" -}, -{ - "id" : "ExprEnchantItem", - "name" : "Enchant Item", - "patterns" : [ - "[the] enchant[ed] item", - - "pattern_end" - ], - "since" : "2.5", - "description" : "The enchant item in an enchant prepare event or enchant event. -It can be modified, but enchantments will still be applied in the enchant event.", - "examples" : "on enchant:\\n set the enchanted item to a diamond chestplate\\non enchant prepare:\\n set the enchant item to a wooden sword" -}, -{ - "id" : "ExprEnchantingExpCost", - "name" : "Enchanting Experience Cost", - "patterns" : [ - "[the] [displayed] ([e]xp[erience]|enchanting) cost", - - "pattern_end" - ], - "since" : "2.5", - "description" : "The cost of enchanting in an enchant event. -This is number that was displayed in the enchantment table, not the actual number of levels removed.", - "examples" : "on enchant:\\n send \"Cost: %the displayed enchanting cost%\" to player" -}, -{ - "id" : "ExprEnchantmentBonus", - "name" : "Enchantment Bonus", - "patterns" : [ - "[the] enchantment bonus", - - "pattern_end" - ], - "since" : "2.5", - "description" : "The enchantment bonus in an enchant prepare event. This represents the number of bookshelves affecting/surrounding the enchantment table.", - "examples" : "on enchant:\\n send \"There are %enchantment bonus% bookshelves surrounding this enchantment table!\" to player" -}, -{ - "id" : "ExprEnchantmentLevel", - "name" : "Enchantment Level", - "patterns" : [ - "[the] [enchant[ment]] level[s] of %enchantments% (on|of) %item types%", -"[the] %enchantments% [enchant[ment]] level[s] (on|of) %item types%", -"%item types%'[s] %enchantments% [enchant[ment]] level[s]", -"%item types%'[s] [enchant[ment]] level[s] of %enchantments%", - - "pattern_end" - ], - "since" : "2.0", - "description" : "The level of a particular enchantment on an item.", - "examples" : "player's tool is a sword of sharpness:\\n message \"You have a sword of sharpness %level of sharpness of the player's tool% equipped\"" -}, -{ - "id" : "ExprEnchantmentOffer", - "name" : "Enchantment Offer", - "patterns" : [ - "[all [of]] [the] enchant[ment] offers", -"enchant[ment] offer[s] %numbers%", -"[the] %number%(st|nd|rd|th) enchant[ment] offer", - - "pattern_end" - ], - "since" : "2.5", - "description" : "The enchantment offer in enchant prepare events.", - "examples" : "on enchant prepare:\\n send \"Your enchantment offers are: %the enchantment offers%\" to player" -}, -{ - "id" : "ExprEnchantmentOfferCost", - "name" : "Enchantment Offer Cost", - "patterns" : [ - "[the] [enchant[ment]] cost of %enchantment offers%", -"%enchantment offers%'[s] [enchant[ment]] cost", - - "pattern_end" - ], - "since" : "2.5", - "description" : "The cost of an enchantment offer. This is displayed to the right of an enchantment offer. -If the cost is changed, it will always be at least 1. -This changes how many levels are required to enchant, but does not change the number of levels removed. -To change the number of levels removed, use the enchant event.", - "examples" : "set cost of enchantment offer 1 to 50" -}, -{ - "id" : "ExprEnderChest", - "name" : "Ender Chest", - "patterns" : [ - "[the] ender[ ]chest[s] of %players%", -"%players%'[s] ender[ ]chest[s]", - - "pattern_end" - ], - "since" : "2.0", - "description" : "The ender chest of a player.", - "examples" : "open the player's ender chest to the player" -}, -{ - "id" : "ExprEntities", - "name" : "Entities", - "patterns" : [ - "[(all [[of] the]|the)] %*entity types% [(in|of) ([world[s]] %worlds%|%chunks%)]", -"[(all [[of] the]|the)] entities of type[s] %entity types% [(in|of) ([world[s]] %worlds%|%chunks%)]", -"[(all [[of] the]|the)] %*entity types% (within|[with]in radius) %number% [(block[s]|met(er|re)[s])] (of|around) %location%", -"[(all [[of] the]|the)] entities of type[s] %entity types% in radius %number% (of|around) %location%", - - "pattern_end" - ], - "since" : "1.2.1, 2.5 (chunks)", - "description" : "All entities in all worlds, in a specific world, in a chunk or in a radius around a certain location, e.g. all players, all creepers in the player's world, or players in radius 100 of the player.", - "examples" : "kill all creepers in the player's world\\nsend \"Psst!\" to all players within 100 meters of the player\\ngive a diamond to all ops\\nheal all tamed wolves in radius 2000 around {town center}\\ndelete all monsters in chunk at player" -}, -{ - "id" : "ExprAI", - "name" : "Entity AI", - "patterns" : [ - "[the] (ai|artificial intelligence) of %living entities%", -"%living entities%'[s] (ai|artificial intelligence)", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Returns whether an entity has AI.", - "examples" : "set artificial intelligence of target entity to false" -}, -{ - "id" : "ExprEntityAttribute", - "name" : "Entity Attribute", - "patterns" : [ - "[the] %attribute type% [((total|final|modified))] attribute [value] of %entities%", -"%entities%'[s] %attribute type% [((total|final|modified))] attribute [value]", - - "pattern_end" - ], - "since" : "2.5, 2.6.1 (final attribute value)", - "description" : "The numerical value of an entity's particular attribute. -Note that the movement speed attribute cannot be reliably used for players. For that purpose, use the speed expression instead. -Resetting an entity's attribute is only available in Minecraft 1.11 and above.", - "examples" : "on damage of player:\\n send \"You are wounded!\" to victim\\n set victim's attack speed attribute to 2" -}, -{ - "id" : "ExprFireTicks", - "name" : "Entity Fire Burn Duration", - "patterns" : [ - "[the] (burn[ing]|fire) (time|duration) of %entities%", -"%entities%'[s] (burn[ing]|fire) (time|duration)", - - "pattern_end" - ], - "since" : "2.7", - "description" : "How much time an entity will be burning for.", - "examples" : "send \"You will stop burning in %fire time of player%\"" -}, -{ - "id" : "ExprEntityTamer", - "name" : "Entity Owner", - "patterns" : [ - "[the] (owner|tamer) of %living entities%", -"%living entities%'[s] (owner|tamer)", - - "pattern_end" - ], - "since" : "2.5", - "description" : "The owner of a tameable entity, such as a horse or wolf.", - "examples" : "set owner of target entity to player\\ndelete owner of target entity\\nset {_t} to uuid of tamer of target entity" -}, -{ - "id" : "ExprExhaustion", - "name" : "Exhaustion", - "patterns" : [ - "[the] exhaustion of %players%", -"%players%'[s] exhaustion", - - "pattern_end" - ], - "since" : "2.2-dev35", - "description" : "The exhaustion of a player. This is mainly used to determine the rate of hunger depletion.", - "examples" : "set exhaustion of all players to 1" -}, -{ - "id" : "ExprExperience", - "name" : "Experience", - "patterns" : [ - "[the] [(spawned|dropped)] [e]xp[erience] [orb[s]]", - - "pattern_end" - ], - "since" : "2.1, 2.5.3 (block break event), 2.7 (experience change event)", - "description" : "How much experience was spawned in an experience spawn or block break event. Can be changed.", - "examples" : "on experience spawn:\\n add 5 to the spawned experience\\non break of coal ore:\\n clear dropped experience\\non break of diamond ore:\\n if tool of player = diamond pickaxe:\\n add 100 to dropped experience" -}, -{ - "id" : "ExprExplodedBlocks", - "name" : "Exploded Blocks", - "patterns" : [ - "[the] exploded blocks", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Get all the blocks that were destroyed in an explode event", - "examples" : "on explode:\\n loop exploded blocks:\\n add loop-block to {exploded::blocks::*}" -}, -{ - "id" : "ExprExplosionBlockYield", - "name" : "Explosion Block Yield", - "patterns" : [ - "[the] [explosion['s]] block (yield|amount)", -"[the] percentage of blocks dropped", - - "pattern_end" - ], - "since" : "2.5", - "description" : "The percentage of exploded blocks dropped in an explosion event. -When changing the yield, a value greater than 1 will function the same as using 1. -Attempting to change the yield to a value less than 0 will have no effect.", - "examples" : "on explode:\\nset the explosion's block yield to 10%" -}, -{ - "id" : "ExprExplosionYield", - "name" : "Explosion Yield", - "patterns" : [ - "[the] explosion (yield|radius|size)", -"[the] (yield|radius|size) of [the] explosion", - - "pattern_end" - ], - "since" : "2.5", - "description" : "The yield of the explosion in an explosion prime event. This is how big the explosion is. - When changing the yield, values less than 0 will be ignored. - Read this wiki page for more information", - "examples" : "on explosion prime:\\n set the yield of the explosion to 10" -}, -{ - "id" : "ExprExplosiveYield", - "name" : "Explosive Yield", - "patterns" : [ - "[the] explosive (yield|radius|size) of %entities%", -"%entities%'[s] explosive (yield|radius|size)", - - "pattern_end" - ], - "since" : "2.5", - "description" : "The yield of an explosive (creeper, primed tnt, fireball, etc.). This is how big of an explosion is caused by the entity. -Read this wiki page for more information", - "examples" : "on spawn of a creeper:\\n set the explosive yield of the event-entity to 10" -}, -{ - "id" : "ExprFacing", - "name" : "Facing", - "patterns" : [ - "[the] [(horizontal)] facing of %living entities/blocks%", -"%living entities/blocks%'[s] [(horizontal)] facing", - - "pattern_end" - ], - "since" : "1.4", - "description" : "The facing of an entity or block, i.e. exactly north, south, east, west, up or down (unlike direction which is the exact direction, e.g. '0.5 south and 0.7 east')", - "examples" : "# makes a bridge\\nloop blocks from the block below the player in the horizontal facing of the player:\\n set loop-block to cobblestone" -}, -{ - "id" : "ExprFallDistance", - "name" : "Fall Distance", - "patterns" : [ - "[the] fall[en] (distance|height) of %entities%", -"%entities%'[s] fall[en] (distance|height)", - - "pattern_end" - ], - "since" : "2.5", - "description" : "The distance an entity has fallen for.", - "examples" : "set all entities' fall distance to 10\\non damage:\\n send \"%victim's fall distance%\" to victim" -}, -{ - "id" : "ExprFertilizedBlocks", - "name" : "Fertilized Blocks", - "patterns" : [ - "[all] [the] fertilized blocks", - - "pattern_end" - ], - "since" : "2.5", - "description" : "The blocks fertilized in block fertilize events.", - "examples" : "the fertilized blocks" -}, -{ - "id" : "ExprFilter", - "name" : "Filter", - "patterns" : [ - "%objects% (where|that match) \\[<.+>\\]", - - "pattern_end" - ], - "since" : "2.2-dev36", - "description" : "Filters a list based on a condition. For example, if you ran 'broadcast \"something\" and \"something else\" where [string input is \"something\"]', only \"something\" would be broadcast as it is the only string that matched the condition.", - "examples" : "send \"congrats on being staff!\" to all players where [player input has permission \"staff\"]" -}, -{ - "id" : "ExprInput", - "name" : "Filter Input", - "patterns" : [ - "input", -"%*type% input", - - "pattern_end" - ], - "since" : "2.2-dev36", - "description" : "Represents the input in a filter expression. For example, if you ran 'broadcast \"something\" and \"something else\" where [input is \"something\"]the condition would be checked twice, using \"something\" and \"something else\" as the inputs.", - "examples" : "send \"congrats on being staff!\" to all players where [input has permission \"staff\"]" -}, -{ - "id" : "ExprFinalDamage", - "name" : "Final Damage", - "patterns" : [ - "[the] final damage", - - "pattern_end" - ], - "since" : "2.2-dev19", - "description" : "How much damage is done in a damage event, considering all types of damage reduction. Can NOT be changed.", - "examples" : "send \"%final damage%\" to victim" -}, -{ - "id" : "ExprFireworkEffect", - "name" : "Firework Effect", - "patterns" : [ - "[(flickering|trailing|flickering trailing|trailing flickering)] %firework type% [firework [effect]] colo[u]red %colors%", -"[(flickering|trailing|flickering trailing|trailing flickering)] %firework type% [firework [effect]] colo[u]red %colors% fad(e|ing) [to] %colors%", - - "pattern_end" - ], - "since" : "2.4", - "description" : "Represents a 'firework effect' which can be used in the launch firework effect.", - "examples" : "launch flickering trailing burst firework colored blue and green at player\\nlaunch trailing flickering star colored purple, yellow, blue, green and red fading to pink at target entity\\nlaunch ball large colored red, purple and white fading to light green and black at player's location with duration 1" -}, -{ - "id" : "ExprFlightMode", - "name" : "Flight Mode", - "patterns" : [ - "[the] fl(y[ing]|ight) (mode|state) of %players%", -"%players%'[s] fl(y[ing]|ight) (mode|state)", - - "pattern_end" - ], - "since" : "2.2-dev34", - "description" : "Whether the player(s) are allowed to fly. Use Make Fly effect to force player(s) to fly.", - "examples" : "set flight mode of player to true\\nsend \"%flying state of all players%\"" -}, -{ - "id" : "ExprFoodLevel", - "name" : "Food Level", - "patterns" : [ - "[the] (food|hunger)[[ ](level|met(er|re)|bar)] [of %players%]", -"%players%'[s] (food|hunger)[[ ](level|met(er|re)|bar)]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "The food level of a player from 0 to 10. Has several aliases: food/hunger level/meter/bar. ", - "examples" : "set the player's food level to 10" -}, -{ - "id" : "ExprFormatDate", - "name" : "Formatted Date", - "patterns" : [ - "%dates% formatted [human-readable] [(with|as) %text%]", -"[human-readable] formatted %dates% [(with|as) %text%]", - - "pattern_end" - ], - "since" : "2.2-dev31, 2.7 (support variables in format)", - "description" : "Converts date to human-readable text format. By default, 'yyyy-MM-dd HH:mm:ss z' (e.g. '2018-03-30 16:03:12 +01') will be used. For reference, see this Wikipedia article.", - "examples" : "command /date:\\n trigger:\\n send \"Full date: %now formatted human-readable%\" to sender\\n send \"Short date: %now formatted as \"yyyy-MM-dd\"%\" to sender" -}, -{ - "id" : "ExprTimeState", - "name" : "Former/Future State", - "patterns" : [ - "[the] (former|past|old) [state] [of] %~object%", -"%~object% before [the event]", -"[the] (future|to-be|new) [state] [of] %~object%", -"%~object%(-to-be| after[(wards| the event)])", - - "pattern_end" - ], - "since" : "1.1", - "description" : "Represents the value of an expression before an event happened or the value it will have directly after the event, e.g. the old or new level respectively in a level change event. -Note: The past, future and present states of an expression are sometimes called 'time states' of an expression. -Note 2: If you don't specify whether to use the past or future state of an expression that has different values, its default value will be used which is usually the value after the event.", - "examples" : "on teleport:\\n former world was \"world_nether\" # or 'world was'\\n world will be \"world\" # or 'world after the event is'\\non tool change:\\n past tool is an axe\\n the tool after the event will be air\\non weather change:\\n set {weather::%world%::old} to past weather\\n set {weather::%world%::current} to the new weather" -}, -{ - "id" : "ExprMemory", - "name" : "Free / Max / Total Memory", - "patterns" : [ - "[the] [server] (free|max[imum]|total) (memory|ram)", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "The free, max or total memory of the server in Megabytes.", - "examples" : "while player is online:\\n send action bar \"Memory left: %free memory%/%max memory%MB\" to player\\n wait 5 ticks" -}, -{ - "id" : "ExprFreezeTicks", - "name" : "Freeze Time", - "patterns" : [ - "[the] freeze time of %entities%", -"%entities%'[s] freeze time", - - "pattern_end" - ], - "since" : "2.7", - "description" : "How much time an entity has been in powdered snow for.", - "examples" : "player's freeze time is less than 3 seconds:\\n send \"you're about to freeze!\" to the player" -}, -{ - "id" : "ExprFurnaceSlot", - "name" : "Furnace Slot", - "patterns" : [ - "(fuel|result) [slot]", -"(ore|fuel|result)[s] [slot[s]] of %blocks%", -"%blocks%'[s] (ore|fuel|result)[s] [slot[s]]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "A slot of a furnace, i.e. either the ore, fuel or result slot. -Remember to use 'block' and not 'furnace', as 'furnace' is not an existing expression.", - "examples" : "set the fuel slot of the clicked block to a lava bucket\\nset the block's ore slot to 64 iron ore\\ngive the result of the block to the player\\nclear the result slot of the block" -}, -{ - "id" : "ExprGameMode", - "name" : "Game Mode", - "patterns" : [ - "[the] game[ ]mode of %players%", -"%players%'[s] game[ ]mode", - - "pattern_end" - ], - "since" : "1.0", - "description" : "The gamemode of a player. (Gamemodes)", - "examples" : "player's gamemode is survival\\nset the player's gamemode to creative" -}, -{ - "id" : "ExprGameRule", - "name" : "Gamerule Value", - "patterns" : [ - "[the] gamerule %gamerule% of %worlds%", - - "pattern_end" - ], - "since" : "2.5", - "description" : "The gamerule value of a world.", - "examples" : "set the gamerule commandBlockOutput of world \"world\" to false" -}, -{ - "id" : "ExprGlidingState", - "name" : "Gliding State", - "patterns" : [ - "[the] (gliding|glider) [state] of %living entities%", -"%living entities%'[s] (gliding|glider) [state]", - - "pattern_end" - ], - "since" : "2.2-dev21", - "description" : "Sets of gets gliding state of player. It allows you to set gliding state of entity even if they do not have an Elytra equipped.", - "examples" : "set gliding of player to off" -}, -{ - "id" : "ExprGlowing", - "name" : "Glowing", - "patterns" : [ - "[the] glowing of %entities%", -"%entities%'[s] glowing", - - "pattern_end" - ], - "since" : "2.2-dev18", - "description" : "Indicates if targeted entity is glowing (new 1.9 effect) or not. Glowing entities can be seen through walls.", - "examples" : "set glowing of player to true" -}, -{ - "id" : "ExprGravity", - "name" : "Gravity", - "patterns" : [ - "[the] gravity of %entities%", -"%entities%'[s] gravity", - - "pattern_end" - ], - "since" : "2.2-dev21", - "description" : "If entity is affected by gravity or not, i.e. if it has Minecraft 1.10+ NoGravity flag.", - "examples" : "set gravity of player off" -}, -{ - "id" : "ExprGroup", - "name" : "Group", - "patterns" : [ - "[the] group[s] of %offline players%", -"%offline players%'[s] group[s]", - - "pattern_end" - ], - "since" : "2.2-dev35", - "description" : "The primary group or all groups of a player. This expression requires Vault and a compatible permissions plugin to be installed. -If you have LuckPerms, ensure you have vault integration enabled in the luck perms configurations.", - "examples" : "on join:\\n broadcast \"%group of player%\" # this is the player's primary group\\n broadcast \"%groups of player%\" # this is all of the player's groups" -}, -{ - "id" : "ExprHanging", - "name" : "Hanging Entity/Remover", - "patterns" : [ - "[the] hanging (entity|remover)", - - "pattern_end" - ], - "since" : "2.6.2", - "description" : "Returns the hanging entity or remover in hanging break and place events.", - "examples" : "on break of item frame:\\n if item of hanging entity is diamond pickaxe:\\n cancel event\\n if hanging remover is a player:\\n send \"You can't break that item frame!\" to hanging remover" -}, -{ - "id" : "ExprHash", - "name" : "Hash", - "patterns" : [ - "%texts% hash[ed] with (MD5|SHA-256)", - - "pattern_end" - ], - "since" : "2.0, 2.2-dev32 (SHA-256 algorithm)", - "description" : "Hashes the given text using the MD5 or SHA-256 algorithms. Each algorithm is suitable for different use cases.

-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" : "command /setpass &lt;text&gt;:\\n trigger:\\n set {password::%uuid of player%} to text-argument hashed with SHA-256\\ncommand /login &lt;text&gt;:\\n trigger:\\n if text-argument hashed with SHA-256 is {password::%uuid of player%}:\\n message \"Login successful.\"\\n else:\\n message \"Wrong password!\"" -}, -{ - "id" : "ExprHatchingType", - "name" : "Hatching Entity Type", - "patterns" : [ - "[the] hatching entity [type]", - - "pattern_end" - ], - "since" : "2.7", - "description" : "The type of the entity that will be hatched in a Player Egg Throw event.", - "examples" : "on player egg throw:\\n set the hatching entity type to a primed tnt" -}, -{ - "id" : "ExprHatchingNumber", - "name" : "Hatching Number", - "patterns" : [ - "[the] hatching number", - - "pattern_end" - ], - "since" : "2.7", - "description" : "The number of entities that will be hatched in a Player Egg Throw event. -Please note that no more than 127 entities can be hatched at once.", - "examples" : "on player egg throw:\\n set the hatching number to 10" -}, -{ - "id" : "ExprEyeLocation", - "name" : "Head location", - "patterns" : [ - "[the] (head|eye[s]) [location[s]] of %living entities%", -"%living entities%'[s] (head|eye[s]) [location[s]]", - - "pattern_end" - ], - "since" : "2.0", - "description" : "The location of an entity's head, mostly useful for players and e.g. looping blocks in the player's line of sight. -Please note that this location is only accurate for entities whose head is exactly above their center, i.e. players, endermen, zombies, skeletons, etc., but not sheep, pigs or cows.", - "examples" : "set the block at the player's head to air\\nset the block in front of the player's eyes to glass\\nloop blocks in front of the player's head:" -}, -{ - "id" : "ExprHealAmount", - "name" : "Heal Amount", - "patterns" : [ - "[the] heal amount", - - "pattern_end" - ], - "since" : "2.5.1", - "description" : "The amount of health healed in a healing event.", - "examples" : "increase heal amount by 2\\nremove 0.5 from heal amount" -}, -{ - "id" : "ExprHealReason", - "name" : "Heal Reason", - "patterns" : [ - "(regen|health regain|heal) (reason|cause)", - - "pattern_end" - ], - "since" : "2.5", - "description" : "The heal reason of a heal event. Please click on the link for more information.", - "examples" : "on heal:\\n if heal reason = satiated:\\n send \"You ate enough food and gained health back!\" to player" -}, -{ - "id" : "ExprHealth", - "name" : "Health", - "patterns" : [ - "[the] health of %living entities%", -"%living entities%'[s] health", - - "pattern_end" - ], - "since" : "1.0", - "description" : "The health of a creature, e.g. a player, mob, villager, etc. The minimum value is 0, and the maximum is the creature's max health (e.g. 10 for players).", - "examples" : "message \"You have %health% HP left.\"" -}, -{ - "id" : "ExprHiddenPlayers", - "name" : "Hidden Players", - "patterns" : [ - "[(all [[of] the]|the)] hidden players (of|for) %players%", -"[(all [[of] the]|the)] players hidden (from|for|by) %players%", - - "pattern_end" - ], - "since" : "2.3", - "description" : "The players hidden from a player that were hidden using the player visibility effect.", - "examples" : "message \"&lt;light red&gt;You are currently hiding: &lt;light gray&gt;%hidden players of the player%\"" -}, -{ - "id" : "ExprHighestSolidBlock", - "name" : "Highest Solid Block", - "patterns" : [ - "highest [(solid|non-air)] block at %locations%", - - "pattern_end" - ], - "since" : "2.2-dev34", - "description" : "Returns the highest solid block at the x and z coordinates of the world of a given location.", - "examples" : "highest block at location of arg-player" -}, -{ - "id" : "ExprHostname", - "name" : "Hostname", - "patterns" : [ - "[the] (host|domain)[ ][name]", - - "pattern_end" - ], - "since" : "2.6.1", - "description" : "The hostname used by the connecting player to connect to the server in a connect event.", - "examples" : "on connect:\\n hostname is \"testers.example.com\"\\n send \"Welcome back tester!\"" -}, -{ - "id" : "ExprHotbarButton", - "name" : "Hotbar Button", - "patterns" : [ - "[the] hotbar button", - - "pattern_end" - ], - "since" : "2.5", - "description" : "The hotbar button clicked in an inventory click event.", - "examples" : "on inventory click:\\n send \"You clicked the hotbar button %hotbar button%!\"" -}, -{ - "id" : "ExprHotbarSlot", - "name" : "Hotbar Slot", - "patterns" : [ - "[the] [the] [([currently] selected|current)] hotbar slot[s] [of %players%]", -"%players%'[s] [the] [([currently] selected|current)] hotbar slot[s]", - - "pattern_end" - ], - "since" : "2.2-dev36", - "description" : "The currently selected hotbar slot. -To retrieve its number use Slot Index expression. -Use future and past tense to grab the previous slot in an item change event, see example.", - "examples" : "message \"%player's current hotbar slot%\"\\nset player's selected hotbar slot to slot 4 of player\\n\\nsend \"index of player's current hotbar slot = 1\" # second slot from the left\\n\\non item held change:\\n if the selected hotbar slot was a diamond:\\n set the currently selected hotbar slot to slot 5 of player" -}, -{ - "id" : "ExprHoverList", - "name" : "Hover List", - "patterns" : [ - "[the] [custom] [(player|server)] (hover|sample) ([message] list|message)", -"[the] [custom] player [(hover|sample)] list", - - "pattern_end" - ], - "since" : "2.3", - "description" : "The list when you hover on the player counts of the server in the server list. -This can be changed using texts or players in a server list ping event only. Adding players to the list means adding the name of the players. -And note that, for example if there are 5 online players (includes fake online count) in the server and the hover list is set to 3 values, Minecraft will show \"... and 2 more ...\" at end of the list.", - "examples" : "on server list ping:\\n clear the hover list\\n add \"&aWelcome to the &6Minecraft &aserver!\" to the hover list\\n add \"\" to the hover list # A blank line\\n add \"&cThere are &6%online players count% &conline players!\" to the hover list" -}, -{ - "id" : "ExprHumidity", - "name" : "Humidity", - "patterns" : [ - "[the] humidit(y|ies) of %blocks%", -"%blocks%'[s] humidit(y|ies)", - - "pattern_end" - ], - "since" : "2.2-dev35", - "description" : "Humidity of given blocks.", - "examples" : "set {_humidity} to event-block's humidity" -}, -{ - "id" : "ExprIP", - "name" : "IP", - "patterns" : [ - "IP[s][( |-)address[es]] of %players%", -"%players%'[s] IP[s][( |-)address[es]]", -"IP[( |-)address]", - - "pattern_end" - ], - "since" : "1.4, 2.2-dev26 (when used in connect event), 2.3 (when used in server list ping event)", - "description" : "The IP address of a player, or the connected player in a connect event, or the pinger in a server list ping event.", - "examples" : "ban the IP address of the player\\nbroadcast \"Banned the IP %IP of player%\"\\n\\non connect:\\n log \"[%now%] %player% (%ip%) is connected to the server.\"\\n\\non server list ping:\\n send \"%IP-address%\" to the console" -}, -{ - "id" : "ExprIndexOf", - "name" : "Index Of", - "patterns" : [ - "[the] [(first|last)] index of %text% in %text%", - - "pattern_end" - ], - "since" : "2.1", - "description" : "The first or last index of a character (or text) in a text, or -1 if it doesn't occur in the text. Indices range from 1 to the length of the text.", - "examples" : "set {_first} to the first index of \"@\" in the text argument\\nif {_s} contains \"abc\":\\n set {_s} to the first (index of \"abc\" in {_s} + 3) characters of {_s} # removes everything after the first \"abc\" from {_s}" -}, -{ - "id" : "ExprIndices", - "name" : "Indices of List", - "patterns" : [ - "[(the|all [[of] the])] (indexes|indices) of %~objects%", -"%~objects%'[s] (indexes|indices)", -"[sorted] (indices|indexes) of %~objects% in (ascending|descending) order", -"[sorted] %~objects%'[s] (indices|indexes) in (ascending|descending) order", - - "pattern_end" - ], - "since" : "2.4 (indices), 2.6.1 (sorting)", - "description" : "Returns all the indices of a list variable, optionally sorted by their values. -To sort the indices, all objects in the list must be comparable; -Otherwise, this expression will just return the unsorted indices.", - "examples" : "set {l::*} to \"some\", \"cool\" and \"values\"\\nbroadcast \"%indices of {l::*}%\" # result is 1, 2 and 3\\n\\nset {_leader-board::first} to 17\\nset {_leader-board::third} to 30\\nset {_leader-board::second} to 25\\nset {_leader-board::fourth} to 42\\nset {_ascending-indices::*} to sorted indices of {_leader-board::*} in ascending order\\nbroadcast \"%{_ascending-indices::*}%\" #result is first, second, third, fourth\\nset {_descending-indices::*} to sorted indices of {_leader-board::*} in descending order\\nbroadcast \"%{_descending-indices::*}%\" #result is fourth, third, second, first" -}, -{ - "id" : "ExprEvtInitiator", - "name" : "Initiator Inventory", - "patterns" : [ - "[the] [event-]initiator[( |-)inventory]", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Returns the initiator inventory in an on inventory item move event.", - "examples" : "on inventory item move:\\n holder of event-initiator-inventory is a chest\\n broadcast \"Item transport requested at %location at holder of event-initiator-inventory%...\"" -}, -{ - "id" : "ExprInventory", - "name" : "Inventory", - "patterns" : [ - "[the] inventor(y|ies) of %inventoryholders%", -"%inventoryholders%'[s] inventor(y|ies)", - - "pattern_end" - ], - "since" : "1.0", - "description" : "The inventory of a block or player. You can usually omit this expression and can directly add or remove items to/from blocks or players.", - "examples" : "add a plank to the player's inventory\\nclear the player's inventory\\nremove 5 wool from the inventory of the clicked block" -}, -{ - "id" : "ExprInventoryAction", - "name" : "Inventory Action", - "patterns" : [ - "[the] inventory action", - - "pattern_end" - ], - "since" : "2.2-dev16", - "description" : "The inventory action of an inventory event. Please click on the link for more information.", - "examples" : "inventory action is pickup all" -}, -{ - "id" : "ExprInventoryCloseReason", - "name" : "Inventory Close Reason", - "patterns" : [ - "[the] inventory clos(e|ing) (reason|cause)", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "The inventory close reason of an inventory close event.", - "examples" : "on inventory close:\\n inventory close reason is teleport\\n send \"Your inventory closed due to teleporting!\" to player" -}, -{ - "id" : "ExprInventoryInfo", - "name" : "Inventory Holder/Viewers/Rows/Slots", - "patterns" : [ - "(holder[s]|viewers|[amount of] rows|[amount of] slots) of %inventories%", -"%inventories%'[s] (holder[s]|viewers|[amount of] rows|[amount of] slots)", - - "pattern_end" - ], - "since" : "2.2-dev34, 2.5 (slots)", - "description" : "Gets the amount of rows/slots, viewers and holder of an inventory. - -NOTE: 'Viewers' expression returns a list of players viewing the inventory. Note that a player is considered to be viewing their own inventory and internal crafting screen even when said inventory is not open.", - "examples" : "event-inventory's amount of rows\\nholder of player's top inventory\\n{_inventory}'s viewers" -}, -{ - "id" : "ExprInventorySlot", - "name" : "Inventory Slot", - "patterns" : [ - "[the] slot[s] %numbers% of %inventory%", -"%inventory%'[s] slot[s] %numbers%", - - "pattern_end" - ], - "since" : "2.2-dev24", - "description" : "Represents a slot in an inventory. It can be used to change the item in an inventory too.", - "examples" : "if slot 0 of player is air:\\n set slot 0 of player to 2 stones\\n remove 1 stone from slot 0 of player\\n add 2 stones to slot 0 of player\\n clear slot 1 of player" -}, -{ - "id" : "ExprItem", - "name" : "Item", - "patterns" : [ - "[the] item", - - "pattern_end" - ], - "since" : "unknown (before 2.1)", - "description" : "The item involved in an event, e.g. in a drop, dispense, pickup or craft event.", - "examples" : "on dispense:\\n item is a clock\\n set the time to 6:00" -}, -{ - "id" : "ExprItemAmount", - "name" : "Item Amount", - "patterns" : [ - "[the] item[[ ]stack] (amount|size|number) of %slots/item types/item stacks%", -"%slots/item types/item stacks%'[s] item[[ ]stack] (amount|size|number)", - - "pattern_end" - ], - "since" : "2.2-dev24", - "description" : "The amount of an item stack.", - "examples" : "send \"You have got %item amount of player's tool% %player's tool% in your hand!\" to player" -}, -{ - "id" : "ExprItemCooldown", - "name" : "Item Cooldown", - "patterns" : [ - "[the] [item] cooldown of %item types% for %players%", -"%players%'[s] [item] cooldown for %item types%", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Change the cooldown of a specific material to a certain amount of Timespan.", - "examples" : "on right click using stick:\\n set item cooldown of player's tool for player to 1 minute\\n set item cooldown of stone and grass for all players to 20 seconds\\n reset item cooldown of cobblestone and dirt for all players" -}, -{ - "id" : "ExprEnchantments", - "name" : "Item Enchantments", - "patterns" : [ - "[the] enchantments of %item types%", -"%item types%'[s] enchantments", - - "pattern_end" - ], - "since" : "2.2-dev36", - "description" : "All the enchantments an item type has.", - "examples" : "clear enchantments of event-item" -}, -{ - "id" : "ExprItemFrameSlot", - "name" : "Item of an Entity", - "patterns" : [ - "[the] item of %entities%", -"%entities%'[s] item", - - "pattern_end" - ], - "since" : "2.2-dev35, 2.2-dev36 (improved), 2.5.2 (throwable projectiles)", - "description" : "An item associated with an entity. For dropped item entities, it gets, obviously, the item that was dropped. For item frames, the item inside the frame is returned. For throwable projectiles (snowballs, enderpearls etc.),it gets the displayed item. Other entities do not have items associated with them.", - "examples" : "Missing examples." -}, -{ - "id" : "ExprItemWithCustomModelData", - "name" : "Item with CustomModelData", - "patterns" : [ - "%item type% with [custom] model data %number%", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Get an item with a CustomModelData tag. (Value is an integer between 0 and 99999999)", - "examples" : "give player a diamond sword with custom model data 2\\nset slot 1 of inventory of player to wooden hoe with custom model data 357" -}, -{ - "id" : "ExprItemWithLore", - "name" : "Item with Lore", - "patterns" : [ - "%item type% with [(a|the)] lore %texts%", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Returns the given item type with the specified lore added to it. -If multiple strings are passed, each of them will be a separate line in the lore.", - "examples" : "set {_test} to stone with lore \"line 1\" and \"line 2\"\\ngive {_test} to player" -}, -{ - "id" : "ExprItems", - "name" : "Items", - "patterns" : [ - "[all [[of] the]|the] block[[ ]type]s", -"every block[[ ]type]", -"[all [[of] the]|the|every] block[s] of type[s] %item types%", -"[all [[of] the]|the|every] item[s] of type[s] %item types%", - - "pattern_end" - ], - "since" : "1.0 pre-5", - "description" : "Items or blocks of a specific type, useful for looping.", - "examples" : "loop items of type ore and log:\\n block contains loop-item\\n message \"Theres at least one %loop-item% in this block\"\\ndrop all blocks at the player # drops one of every block at the player" -}, -{ - "id" : "ExprItemsIn", - "name" : "Items In", - "patterns" : [ - "[(all [[of] the]|the)] items ([with]in|of|contained in|out of) [inventor(y|ies)] %inventories%", - - "pattern_end" - ], - "since" : "2.0", - "description" : "All items in an inventory. Useful for looping or storing in a list variable. -Please note that the positions of the items in the inventory are not saved, only their order is preserved.", - "examples" : "loop all items in the player's inventory:\\n loop-item is enchanted\\n remove loop-item from the player\\nset {inventory::%uuid of player%::*} to items in the player's inventory" -}, -{ - "id" : "ExprJoinSplit", - "name" : "Join & Split", - "patterns" : [ - "(concat[enate]|join) %texts% [(with|using|by) [[the] delimiter] %text%]", -"split %text% (at|using|by) [[the] delimiter] %text% [with case sensitivity]", -"%text% split (at|using|by) [[the] delimiter] %text% [with case sensitivity]", -"regex split %text% (at|using|by) [[the] delimiter] %text%", -"regex %text% split (at|using|by) [[the] delimiter] %text%", - - "pattern_end" - ], - "since" : "2.1, 2.5.2 (regex support), 2.7 (case sensitivity)", - "description" : "Joins several texts with a common delimiter (e.g. \", \"), or splits a text into multiple texts at a given delimiter.", - "examples" : "message \"Online players: %join all players with \"\" | \"\"%\" # %all players% would use the default \"x, y, and z\"\\nset {_s::*} to the string argument split at \",\"" -}, -{ - "id" : "ExprLanguage", - "name" : "Language", - "patterns" : [ - "[the] [([currently] selected|current)] [game] (language|locale) [setting] of %players%", -"%players%'[s] [([currently] selected|current)] [game] (language|locale) [setting]", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Currently selected game language of a player. The value of the language is not defined properly. -The vanilla Minecraft client will use lowercase language / country pairs separated by an underscore, but custom resource packs may use any format they wish.", - "examples" : "message player's current language" -}, -{ - "id" : "ExprLastAttacker", - "name" : "Last Attacker", - "patterns" : [ - "[the] last attacker of %entity%", -"%entity%'[s] last attacker", - - "pattern_end" - ], - "since" : "2.5.1", - "description" : "The last block or entity that attacked an entity.", - "examples" : "send \"%last attacker of event-entity%\"" -}, -{ - "id" : "ExprLastColor", - "name" : "Last Color", - "patterns" : [ - "[the] last color[s] of %texts%", -"%texts%'[s] last color[s]", - - "pattern_end" - ], - "since" : "2.6", - "description" : "The colors used at the end of a string. The colors of the returned string will be formatted with their symbols.", - "examples" : "set {_color} to the last colors of \"<red>hey<blue>yo\"" -}, -{ - "id" : "ExprLastDamage", - "name" : "Last Damage", - "patterns" : [ - "[the] last damage of %living entities%", -"%living entities%'[s] last damage", - - "pattern_end" - ], - "since" : "2.5.1", - "description" : "The last damage that was done to an entity. Note that changing it doesn't deal more/less damage.", - "examples" : "set last damage of event-entity to 2" -}, -{ - "id" : "ExprLastDamageCause", - "name" : "Last Damage Cause", - "patterns" : [ - "[the] last damage (cause|reason|type) of %living entities%", -"%living entities%'[s] last damage (cause|reason|type)", - - "pattern_end" - ], - "since" : "2.2-Fixes-V10", - "description" : "Cause of last damage done to an entity", - "examples" : "set last damage cause of event-entity to fire tick" -}, -{ - "id" : "ExprLastLoadedServerIcon", - "name" : "Last Loaded Server Icon", - "patterns" : [ - "[the] [last[ly]] loaded server icon", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Returns the last loaded server icon with the load server icon effect.", - "examples" : "set {server-icon} to the last loaded server icon" -}, -{ - "id" : "ExprLastResourcePackResponse", - "name" : "Last Resource Pack Response", - "patterns" : [ - "[the] [last] resource pack response[s] of %players%", -"%players%'[s] [last] resource pack response[s]", - - "pattern_end" - ], - "since" : "2.4", - "description" : "Returns the last resource pack response received from a player.", - "examples" : "if player's last resource pack response is deny or download fail:" -}, -{ - "id" : "ExprLastSpawnedEntity", - "name" : "Last Spawned Entity", - "patterns" : [ - "[the] [last[ly]] (spawned|shot) %*entity type%", -"[the] [last[ly]] dropped (item)", -"[the] [last[ly]] (created|struck) (lightning)", -"[the] [last[ly]] (launched|deployed) (firework)", - - "pattern_end" - ], - "since" : "1.3 (spawned entity), 2.0 (shot entity), 2.2-dev26 (dropped item), 2.7 (struck lightning, firework)", - "description" : "Holds the entity that was spawned most recently with the spawn effect (section), dropped with the drop effect, shot with the shoot effect or created with the lightning effect. Please note that even though you can spawn multiple mobs simultaneously (e.g. with 'spawn 5 creepers'), only the last spawned mob is saved and can be used. If you spawn an entity, shoot a projectile and drop an item you can however access all them together.", - "examples" : "spawn a priest\\nset {healer::%spawned priest%} to true\\nshoot an arrow from the last spawned entity\\nignite the shot projectile\\ndrop a diamond sword\\npush last dropped item upwards\\nteleport player to last struck lightning\\ndelete last launched firework" -}, -{ - "id" : "ExprLastLoginTime", - "name" : "Last/First Login Time", - "patterns" : [ - "[the] (last|first) login of %offline players%", -"%offline players%'[s] (last|first) login", - - "pattern_end" - ], - "since" : "2.5", - "description" : "When a player last/first logged in the server. 'last login' requires paper to get the last login, otherwise it will get the last time they were seen on the server.", - "examples" : "command /onlinefor:\\n trigger:\\n send \"You have been online for %difference between player's last login and now%.\"\\n send \"You first joined the server %difference between player's first login and now% ago.\"" -}, -{ - "id" : "ExprLeashHolder", - "name" : "Leash Holder", - "patterns" : [ - "[the] leash holder[s] of %living entities%", -"%living entities%'[s] leash holder[s]", - - "pattern_end" - ], - "since" : "2.3", - "description" : "The leash holder of a living entity.", - "examples" : "set {_example} to the leash holder of the target mob" -}, -{ - "id" : "ExprLength", - "name" : "Length", - "patterns" : [ - "[the] length of %texts%", -"%texts%'[s] length", - - "pattern_end" - ], - "since" : "2.1", - "description" : "The length of a text, in number of characters.", - "examples" : "set {_l} to length of the string argument" -}, -{ - "id" : "ExprLevel", - "name" : "Level", - "patterns" : [ - "[the] level of %players%", -"%players%'[s] level", - - "pattern_end" - ], - "since" : "unknown (before 2.1)", - "description" : "The level of a player.", - "examples" : "reduce the victim's level by 1\\nset the player's level to 0" -}, -{ - "id" : "ExprLevelProgress", - "name" : "Level Progress", - "patterns" : [ - "[the] level progress of %players%", -"%players%'[s] level progress", - - "pattern_end" - ], - "since" : "2.0", - "description" : "The player's progress in reaching the next level, this represents the experience bar in the game. Please note that this value is between 0 and 1 (e.g. 0.5 = half experience bar). -Changing this value can cause the player's level to change if the resulting level progess is negative or larger than 1, e.g. increase the player's level progress by 0.5 will make the player gain a level if their progress was more than 50%.", - "examples" : "# use the exp bar as mana\\non rightclick with a blaze rod:\\n player's level progress is larger than 0.2\\n shoot a fireball from the player\\n reduce the player's level progress by 0.2\\nevery 2 seconds:\\n loop all players:\\n level progress of loop-player is smaller than 0.9:\\n increase level progress of the loop-player by 0.1\\n else:\\n set level progress of the loop-player to 0.99\\non xp spawn:\\n cancel event" -}, -{ - "id" : "ExprLightLevel", - "name" : "Light Level", - "patterns" : [ - "[(sky|sun|block)[ ]]light[ ]level [(of|%direction%) %location%]", - - "pattern_end" - ], - "since" : "1.3.4", - "description" : "Gets the light level at a certain location which ranges from 0 to 15. -It can be separated into sunlight (15 = direct sunlight, 1-14 = indirect) and block light (torches, glowstone, etc.). The total light level of a block is the maximum of the two different light types.", - "examples" : "# set vampire players standing in bright sunlight on fire\\nevery 5 seconds:\\n loop all players:\\n {vampire::%uuid of loop-player%} is true\\n sunlight level at the loop-player is greater than 10\\n ignite the loop-player for 5 seconds" -}, -{ - "id" : "ExprPlugins", - "name" : "Loaded Plugins", - "patterns" : [ - "[(all [[of] the]|the)] [loaded] plugins", - - "pattern_end" - ], - "since" : "2.7", - "description" : "An expression to obtain a list of the names of the server's loaded plugins.", - "examples" : "if the loaded plugins contains \"Vault\":\\n broadcast \"This server uses Vault plugin!\"\\n\\nsend \"Plugins (%size of loaded plugins%): %plugins%\" to player" -}, -{ - "id" : "ExprLocation", - "name" : "Location", - "patterns" : [ - "[the] [event-](location|position)", - - "pattern_end" - ], - "since" : "2.0", - "description" : "The location where an event happened (e.g. at an entity or block), or a location relative to another (e.g. 1 meter above another location).", - "examples" : "drop 5 apples at the event-location # exactly the same as writing 'drop 5 apples'\\nset {_loc} to the location 1 meter above the player" -}, -{ - "id" : "ExprLocation", - "name" : "Location", - "patterns" : [ - "[the] (location|position) %directions% [%location%]", - - "pattern_end" - ], - "since" : "2.0", - "description" : "The location where an event happened (e.g. at an entity or block), or a location relative to another (e.g. 1 meter above another location).", - "examples" : "drop 5 apples at the event-location # exactly the same as writing 'drop 5 apples'\\nset {_loc} to the location 1 meter above the player" -}, -{ - "id" : "ExprLocationOf", - "name" : "Location", - "patterns" : [ - "(location|position) of %location%", -"%location%'[s] (location|position)", - - "pattern_end" - ], - "since" : "Unknown", - "description" : "The location of a block or entity. This not only represents the x, y and z coordinates of the location but also includes the world and the direction an entity is looking (e.g. teleporting to a saved location will make the teleported entity face the same saved direction every time). -Please note that the location of an entity is at it's feet, use head location to get the location of the head.", - "examples" : "set {home::%uuid of player%} to the location of the player\\nmessage \"You home was set to %player's location% in %player's world%.\"" -}, -{ - "id" : "ExprLocationAt", - "name" : "Location At", - "patterns" : [ - "[the] (location|position) [at] [\\(][x[ ][=[ ]]]%number%, [y[ ][=[ ]]]%number%, [and] [z[ ][=[ ]]]%number%[\\)] [[(in|of) [[the] world]] %world%]", - - "pattern_end" - ], - "since" : "2.0", - "description" : "Allows to create a location from three coordinates and a world.", - "examples" : "set {_loc} to the location at arg-1, arg-2, arg-3 of the world arg-4\\ndistance between the player and the location (0, 0, 0) is less than 200" -}, -{ - "id" : "ExprLoopIteration", - "name" : "Loop Iteration", - "patterns" : [ - "[the] loop(-| )(counter|iteration)[-%*number%]", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Returns the loop's current iteration count (for both normal and while loops).", - "examples" : "while player is online:\\n give player 1 stone\\n wait 5 ticks\\n if loop-counter > 30:\\n stop loop\\n\\nloop {top-balances::*}:\\n if loop-iteration <= 10:\\n broadcast \"##%loop-iteration% %loop-index% has $%loop-value%\"" -}, -{ - "id" : "ExprLoopValue", - "name" : "Loop value", - "patterns" : [ - "[the] loop-<.+>", - - "pattern_end" - ], - "since" : "1.0, INSERT VERSION (loop-counter)", - "description" : "Returns the currently looped value.", - "examples" : "# Countdown\\nloop 10 times:\\n message \"%11 - loop-number%\"\\n wait a second\\n\\n# Generate a 10x10 floor made of randomly colored wool below the player\\nloop blocks from the block below the player to the block 10 east of the block below the player:\\n loop blocks from the loop-block to the block 10 north of the loop-block:\\n set loop-block-2 to any wool\\n\\nloop {top-balances::*}:\\n loop-iteration <= 10\\n send \"##%loop-iteration% %loop-index% has $%loop-value%\"" -}, -{ - "id" : "ExprLoot", - "name" : "Loot", - "patterns" : [ - "[the] loot", - - "pattern_end" - ], - "since" : "2.7", - "description" : "The loot that will be generated in a 'loot generate' event.", - "examples" : "on loot generate:\\n chance of %10\\n add 64 diamonds\\n send \"You hit the jackpot!!\"" -}, -{ - "id" : "ExprLore", - "name" : "Lore", - "patterns" : [ - "[the] lore of %item stack/item type%", -"%item stack/item type%'[s] lore", -"[the] line %number% of [the] lore of %item stack/item type%", -"[the] line %number% of %item stack/item type%'[s] lore", -"[the] %number%(st|nd|rd|th) line of [the] lore of %item stack/item type%", -"[the] %number%(st|nd|rd|th) line of %item stack/item type%'[s] lore", - - "pattern_end" - ], - "since" : "2.1", - "description" : "An item's lore.", - "examples" : "set the 1st line of the item's lore to \"&lt;orange&gt;Excalibur 2.0\"" -}, -{ - "id" : "ExprMOTD", - "name" : "MOTD", - "patterns" : [ - "[the] [(default)|(shown|displayed)] (MOTD|message of [the] day)", - - "pattern_end" - ], - "since" : "2.3", - "description" : "The message of the day in the server list. This can be changed in a server list ping event only. -'default MOTD' returns the default MOTD always and can't be changed.", - "examples" : "on server list ping:\\n set the motd to \"Join now!\"" -}, -{ - "id" : "ExprMaxDurability", - "name" : "Max Durability", - "patterns" : [ - "[the] max[imum] durabilit(y|ies) of %item stacks/slots%", -"%item stacks/slots%'[s] max[imum] durabilit(y|ies)", - - "pattern_end" - ], - "since" : "2.5", - "description" : "The maximum durability of an item.", - "examples" : "maximum durability of diamond sword\\nif max durability of player's tool is not 0: # Item is damageable" -}, -{ - "id" : "ExprMaxHealth", - "name" : "Max Health", - "patterns" : [ - "[the] max[imum] health of %living entities%", -"%living entities%'[s] max[imum] health", - - "pattern_end" - ], - "since" : "2.0", - "description" : "The maximum health of an entity, e.g. 10 for a player.", - "examples" : "on join:\\n set the maximum health of the player to 100\\nspawn a giant\\nset the last spawned entity's max health to 1000" -}, -{ - "id" : "ExprMaxMinecartSpeed", - "name" : "Max Minecart Speed", - "patterns" : [ - "[the] max[imum] minecart (speed|velocity) of %entities%", -"%entities%'[s] max[imum] minecart (speed|velocity)", - - "pattern_end" - ], - "since" : "2.5.1", - "description" : "The maximum speed of a minecart.", - "examples" : "on right click on minecart:\\n set max minecart speed of event-entity to 1" -}, -{ - "id" : "ExprMaxPlayers", - "name" : "Max Players", - "patterns" : [ - "[the] [(real|default)|(fake|shown|displayed)] max[imum] player[s] [count|amount|number|size]", -"[the] [(real|default)|(fake|shown|displayed)] max[imum] (count|amount|number|size) of players", - - "pattern_end" - ], - "since" : "2.3, 2.7 (modify max real players)", - "description" : "The count of max players. This can be changed in a server list ping event only. -'real max players' returns the real count of max players of the server and can be modified on Paper 1.16 or later.", - "examples" : "on server list ping:\\n set the max players count to (online players count + 1)" -}, -{ - "id" : "ExprMaxFreezeTicks", - "name" : "Maximum Freeze Time", - "patterns" : [ - "[the] max[imum] freeze time of %entities%", -"%entities%'[s] max[imum] freeze time", - - "pattern_end" - ], - "since" : "2.7", - "description" : "The maximum amount of time an entity can spend in powdered snow before taking damage.", - "examples" : "difference between player's freeze time and player's max freeze time is less than 1 second:\\n send \"you're about to freeze!\" to the player" -}, -{ - "id" : "ExprMaxStack", - "name" : "Maximum Stack Size", - "patterns" : [ - "[the] max[imum] stack[[ ]size] of %item type%", -"%item type%'[s] max[imum] stack[[ ]size]", - - "pattern_end" - ], - "since" : "2.1", - "description" : "The maximum stack size of the specified material, e.g. 64 for torches, 16 for buckets, and 1 for swords.", - "examples" : "send \"You can only pick up %max stack size of player's tool% of %type of (player's tool)%\" to player" -}, -{ - "id" : "ExprMe", - "name" : "Me", - "patterns" : [ - "me", -"my[self]", - - "pattern_end" - ], - "since" : "2.1.1", - "description" : "A 'me' expression that can be used in players' effect commands only.", - "examples" : "!heal me\\n!kick myself\\n!give a diamond axe to me" -}, -{ - "id" : "ExprMendingRepairAmount", - "name" : "Mending Repair Amount", - "patterns" : [ - "[the] [mending] repair amount", - - "pattern_end" - ], - "since" : "2.5.1", - "description" : "The number of durability points an item is to be repaired in a mending event. - Modifying the repair amount will affect how much experience is given to the player after mending.", - "examples" : "on item mend:\\n set the mending repair amount to 100" -}, -{ - "id" : "ExprMessage", - "name" : "Message", - "patterns" : [ - "[the] [chat( |-)]message", -"[the] (join|log[ ]in)( |-)message", -"[the] (quit|leave|log[ ]out|kick)( |-)message", -"[the] death( |-)message", - - "pattern_end" - ], - "since" : "1.4.6 (chat message), 1.4.9 (join & quit messages), 2.0 (death message)", - "description" : "The (chat) message of a chat event, the join message of a join event, the quit message of a quit event, or the death message on a death event. This expression is mostly useful for being changed.", - "examples" : "on chat:\\n player has permission \"admin\"\\n set message to \"&c%message%\"\\n\\non first join:\\n set join message to \"Welcome %player% to our awesome server!\"\\n\\non join:\\n player has played before\\n set join message to \"Welcome back, %player%!\"\\n\\non quit:\\n set quit message to \"%player% left this awesome server!\"\\n\\non death:\\n set the death message to \"%player% died!\"" -}, -{ - "id" : "ExprMetadata", - "name" : "Metadata", - "patterns" : [ - "metadata [(value|tag)[s]] %texts% of %metadata holders%", -"%metadata holders%'[s] metadata [(value|tag)[s]] %text%", - - "pattern_end" - ], - "since" : "2.2-dev36", - "description" : "Metadata is a way to store temporary data on entities, blocks and more that disappears after a server restart.", - "examples" : "set metadata value \"healer\" of player to true\\nbroadcast \"%metadata value \"\"healer\"\" of player%\"\\nclear metadata value \"healer\" of player" -}, -{ - "id" : "ExprMiddleOfLocation", - "name" : "Middle of Location", - "patterns" : [ - "[the] (middle|center) [point] of %location%", -"%location%'[s] (middle|center) [point]", - - "pattern_end" - ], - "since" : "2.6.1", - "description" : "Returns the middle/center of a location. In other words, returns the middle of the X, Z coordinates and the floor value of the Y coordinate of a location.", - "examples" : "command /stuck:\\n executable by: players\\n trigger:\\n teleport player to the center of player's location\\n send \"You're no longer stuck.\"" -}, -{ - "id" : "ExprMinecartDerailedFlyingVelocity", - "name" : "Minecart Derailed / Flying Velocity", - "patterns" : [ - "[the] [minecart] (derailed|flying) velocity of %entities%", -"%entities%'[s] [minecart] (derailed|flying) velocity", - - "pattern_end" - ], - "since" : "2.5.1", - "description" : "The velocity of a minecart as soon as it has been derailed or as soon as it starts flying.", - "examples" : "on right click on minecart:\\n set derailed velocity of event-entity to vector 2, 10, 2" -}, -{ - "id" : "ExprBalance", - "name" : "Money", - "patterns" : [ - "[the] (money|balance|[bank] account) of %offline players%", -"%offline players%'[s] (money|balance|[bank] account)", - - "pattern_end" - ], - "since" : "2.0, 2.5 (offline players)", - "description" : "How much virtual money a player has (can be changed).", - "examples" : "message \"You have %player's money%\" # the currency name will be added automatically\\nremove 20$ from the player's balance # replace '$' by whatever currency you use\\nadd 200 to the player's account # or omit the currency altogether" -}, -{ - "id" : "ExprMoonPhase", - "name" : "Moon Phase", - "patterns" : [ - "[the] (lunar|moon) phase[s] of %worlds%", -"%worlds%'[s] (lunar|moon) phase[s]", - - "pattern_end" - ], - "since" : "2.7", - "description" : "The current moon phase of a world.", - "examples" : "if moon phase of player's world is full moon:\\n send \"Watch for the wolves!\"" -}, -{ - "id" : "ExprPushedBlocks", - "name" : "Moved blocks", - "patterns" : [ - "[the] moved blocks", - - "pattern_end" - ], - "since" : "2.2-dev27", - "description" : "Blocks which are moved in a piston event. Cannot be used outside of piston events.", - "examples" : "the moved blocks" -}, -{ - "id" : "ExprName", - "name" : "Name / Display Name / Tab List Name", - "patterns" : [ - "[the] (name[s]|(display|nick|chat|custom)[ ]name[s]) of %offline players/entities/blocks/item types/inventories/slots/worlds/gamerules%", -"%offline players/entities/blocks/item types/inventories/slots/worlds/gamerules%'[s] (name[s]|(display|nick|chat|custom)[ ]name[s])", - - "pattern_end" - ], - "since" : "before 2.1, 2.2-dev20 (inventory name), 2.4 (non-living entity support, changeable inventory name), 2.7 (worlds)", - "description" : "Represents the Minecraft account, display or tab list name of a player, or the custom name of an item, entity, block, inventory, gamerule or world. - -

", - "examples" : "on join:\\n player has permission \"name.red\"\\n set the player's display name to \"&lt;red&gt;[admin] &lt;gold&gt;%name of player%\"\\n set the player's tab list name to \"&lt;green&gt;%player's name%\"\\nset the name of the player's tool to \"Legendary Sword of Awesomeness\"" -}, -{ - "id" : "ExprName", - "name" : "Name / Display Name / Tab List Name", - "patterns" : [ - "[the] ((player|tab)[ ]list name[s]) of %players%", -"%players%'[s] ((player|tab)[ ]list name[s])", - - "pattern_end" - ], - "since" : "before 2.1, 2.2-dev20 (inventory name), 2.4 (non-living entity support, changeable inventory name), 2.7 (worlds)", - "description" : "Represents the Minecraft account, display or tab list name of a player, or the custom name of an item, entity, block, inventory, gamerule or world. - -", - "examples" : "on join:\\n player has permission \"name.red\"\\n set the player's display name to \"&lt;red&gt;[admin] &lt;gold&gt;%name of player%\"\\n set the player's tab list name to \"&lt;green&gt;%player's name%\"\\nset the name of the player's tool to \"Legendary Sword of Awesomeness\"" -}, -{ - "id" : "ExprNamed", - "name" : "Named Item/Inventory", - "patterns" : [ - "%item type/inventory type% (named|with name[s]) %text%", - - "pattern_end" - ], - "since" : "2.0, 2.2-dev34 (inventories)", - "description" : "Directly names an item/inventory, useful for defining a named item/inventory in a script. If you want to (re)name existing items/inventories you can either use this expression or use set name of <item/inventory> to <text>.", - "examples" : "give a diamond sword of sharpness 100 named \"&lt;gold&gt;Excalibur\" to the player\\nset tool of player to the player's tool named \"&lt;gold&gt;Wand\"\\nset the name of the player's tool to \"&lt;gold&gt;Wand\"\\nopen hopper inventory named \"Magic Hopper\" to player" -}, -{ - "id" : "ExprNearestEntity", - "name" : "Nearest Entity", - "patterns" : [ - "[the] nearest %*entity types% [[relative] to %entity/location%]", -"[the] %*entity types% nearest [to %entity/location%]", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Gets the entity nearest to a location or another entity.", - "examples" : "kill the nearest pig and cow relative to player\\nteleport player to the nearest cow relative to player\\nteleport player to the nearest entity relative to player\\n\\non click:\\n kill nearest pig" -}, -{ - "id" : "LitNewLine", - "name" : "New Line", - "patterns" : [ - "n[ew]l[ine]", -"line[ ]break", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Returns a line break separator.", - "examples" : "send \"Hello%nl%Goodbye!\" to player" -}, -{ - "id" : "ExprNoDamageTicks", - "name" : "No Damage Ticks", - "patterns" : [ - "[the] (invulnerability|no damage) tick[s] of %living entities%", -"%living entities%'[s] (invulnerability|no damage) tick[s]", - - "pattern_end" - ], - "since" : "2.5", - "description" : "The number of ticks that an entity is invulnerable to damage for.", - "examples" : "on damage:\\n set victim's invulnerability ticks to 20 #Victim will not take damage for the next second" -}, -{ - "id" : "ExprNow", - "name" : "Now", - "patterns" : [ - "now", - - "pattern_end" - ], - "since" : "1.4", - "description" : "The current system time of the server. Use time to get the Minecraft time of a world.", - "examples" : "broadcast \"Current server time: %now%\"" -}, -{ - "id" : "ExprNumberOfCharacters", - "name" : "Number of Characters", - "patterns" : [ - "number of upper[ ]case char(acters|s) in %text%", -"number of lower[ ]case char(acters|s) in %text%", -"number of digit char(acters|s) in %text%", - - "pattern_end" - ], - "since" : "2.5", - "description" : "The number of uppercase, lowercase, or digit characters in a string.", - "examples" : "#Simple Chat Filter\\non chat:\\n if number of uppercase chars in message / length of message > 0.5\\n cancel event\\n send \"&lt;red&gt;Your message has to many caps!\" to player" -}, -{ - "id" : "ExprNumbers", - "name" : "Numbers", - "patterns" : [ - "[(all [[of] the]|the)] (numbers|integers|decimals) (between|from) %number% (and|to) %number%", - - "pattern_end" - ], - "since" : "1.4.6 (integers & numbers), 2.5.1 (decimals)", - "description" : "All numbers between two given numbers, useful for looping. -Use 'numbers' if your start is not an integer and you want to keep the fractional part of the start number constant, or use 'integers' if you only want to loop integers. -You may also use 'decimals' if you want to use the decimal precision of the start number. -You may want to use the 'times' expression instead, for instance 'loop 5 times:'", - "examples" : "loop numbers from 2.5 to 5.5: # loops 2.5, 3.5, 4.5, 5.5\\nloop integers from 2.9 to 5.1: # same as '3 to 5', i.e. loops 3, 4, 5\\nloop decimals from 3.94 to 4: # loops 3.94, 3.95, 3.96, 3.97, 3.98, 3.99, 4" -}, -{ - "id" : "ExprOfflinePlayers", - "name" : "Offline players", - "patterns" : [ - "[(all [[of] the]|the)] offline[ ]players", - - "pattern_end" - ], - "since" : "2.2-dev35", - "description" : "All players that have ever joined the server. This includes the players currently online.", - "examples" : "send \"Size of all players who have joined the server: %size of all offline players%\"" -}, -{ - "id" : "ExprOnlinePlayersCount", - "name" : "Online Player Count", - "patterns" : [ - "[the] [((real|default)|(fake|shown|displayed))] [online] player (count|amount|number)", -"[the] [((real|default)|(fake|shown|displayed))] (count|amount|number|size) of online players", - - "pattern_end" - ], - "since" : "2.3", - "description" : "The amount of online players. This can be changed in a server list ping event only to show fake online player amount. -real online player count always return the real count of online players and can't be changed.", - "examples" : "on server list ping:\\n # This will make the max players count 5 if there are 4 players online.\\n set the fake max players count to (online player count + 1)" -}, -{ - "id" : "ExprOpenedInventory", - "name" : "Opened Inventory", - "patterns" : [ - "[the] (current|open|top) inventory [of %players%]", -"%players%'[s] (current|open|top) inventory", - - "pattern_end" - ], - "since" : "2.2-dev24, 2.2-dev35 (Just 'current inventory' works in player events)", - "description" : "Return the currently opened inventory of a player. -If no inventory is open, it returns the own player's crafting inventory.", - "examples" : "set slot 1 of player's current inventory to diamond sword" -}, -{ - "id" : "ExprParse", - "name" : "Parse", - "patterns" : [ - "%text% parsed as (%*type%|"<.*>")", - - "pattern_end" - ], - "since" : "2.0", - "description" : "Parses text as a given type, or as a given pattern. -This expression can be used in two different ways: One which parses the entire text as a single instance of a type, e.g. as a number, and one that parses the text according to a pattern. -If the given text could not be parsed, this expression will return nothing and the parse error will be set if some information is available. -Some notes about parsing with a pattern: -- The pattern must be a Skript pattern, e.g. percent signs are used to define where to parse which types, e.g. put a %number% or %items% in the pattern if you expect a number or some items there. -- You have to save the expression's value in a list variable, e.g. 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" : "set {var} to line 1 parsed as number\\non chat:\\n set {var::*} to message parsed as \"buying %items% for %money%\"\\n if parse error is set:\\n message \"%parse error%\"\\n else if {var::*} is set:\\n cancel event\\n remove {var::2} from the player's balance\\n give {var::1::*} to the player" -}, -{ - "id" : "ExprParseError", - "name" : "Parse Error", - "patterns" : [ - "[the] [last] [parse] error", - - "pattern_end" - ], - "since" : "2.0", - "description" : "The error which caused the last parse operation to fail, which might not be set if a pattern was used and the pattern didn't match the provided text at all.", - "examples" : "set {var} to line 1 parsed as integer\\nif {var} is not set:\\n parse error is set:\\n message \"&lt;red&gt;Line 1 is invalid: %last parse error%\"\\n else:\\n message \"&lt;red&gt;Please put an integer on line 1!\"" -}, -{ - "id" : "ExprPassenger", - "name" : "Passenger", - "patterns" : [ - "[the] passenger[s] of %entities%", -"%entities%'[s] passenger[s]", - - "pattern_end" - ], - "since" : "2.0, 2.2-dev26 (Multiple passengers for 1.11.2+)", - "description" : "The passenger of a vehicle, or the rider of a mob. -For 1.11.2 and above, it returns a list of passengers and you can use all changers in it. -See also: vehicle", - "examples" : "#for 1.11 and lower\\npassenger of the minecart is a creeper or a cow\\nthe saddled pig's passenger is a player\\n#for 1.11.2+\\npassengers of the minecart contains a creeper or a cow\\nthe boat's passenger contains a pig\\nadd a cow and a zombie to passengers of last spawned boat\\nset passengers of player's vehicle to a pig and a horse\\nremove all pigs from player's vehicle\\nclear passengers of boat" -}, -{ - "id" : "ExprPercent", - "name" : "Percent of", - "patterns" : [ - "%number%(\\%| percent) of %numbers%", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Returns a percentage of one or more numbers.", - "examples" : "set damage to 10% of victim's health\\nset damage to 125 percent of damage\\nset {_result} to {_percent} percent of 999\\nset {_result::*} to 10% of {_numbers::*}\\nset experience to 50% of player's total experience" -}, -{ - "id" : "LitPi", - "name" : "Pi", - "patterns" : [ - "(pi|π)", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Returns the mathematical constant pi. (approx. 3.1415926535)", - "examples" : "set {_tau} to pi * 2" -}, -{ - "id" : "ExprPickupDelay", - "name" : "Pickup Delay", - "patterns" : [ - "[the] pick[ ]up delay of %entities%", -"%entities%'[s] pick[ ]up delay", - - "pattern_end" - ], - "since" : "2.7", - "description" : "The amount of time before a dropped item can be picked up by an entity.", - "examples" : "drop diamond sword at {_location} without velocity\\nset pickup delay of last dropped item to 5 seconds" -}, -{ - "id" : "ExprPing", - "name" : "Ping", - "patterns" : [ - "[the] ping of %players%", -"%players%'[s] ping", - - "pattern_end" - ], - "since" : "2.2-dev36", - "description" : "Pings of players, as Minecraft server knows them. Note that they will almost certainly be different from the ones you'd get from using ICMP echo requests. This expression is only supported on some server software (PaperSpigot).", - "examples" : "command /ping <player=%player%>:\\n trigger:\\n send \"%arg-1%'s ping is %arg-1's ping%\"" -}, -{ - "id" : "ExprPlain", - "name" : "Plain Item", - "patterns" : [ - "[a[n]] (plain|unmodified) %item type%", - - "pattern_end" - ], - "since" : "2.6", - "description" : "A plain item is an item with no modifications. It can be used to convert items to their default state or to match with other default items.", - "examples" : "if the player's tool is a plain diamond: # check if player's tool has no modifications\\n send \"You are holding a plain diamond!\"" -}, -{ - "id" : "ExprPlayerlistHeaderFooter", - "name" : "Player List Header and Footer", - "patterns" : [ - "[the] (player|tab)[ ]list (header|footer) [(text|message)] of %players%", -"%players%'[s] (player|tab)[ ]list (header|footer) [(text|message)]", - - "pattern_end" - ], - "since" : "2.4", - "description" : "The message above and below the player list in the tab menu.", - "examples" : "set all players' tab list header to \"Welcome to the Server!\"\\nsend \"%the player's tab list header%\" to player\\nreset all players' tab list header" -}, -{ - "id" : "ExprPlayerProtocolVersion", - "name" : "Player Protocol Version", - "patterns" : [ - "[the] protocol version of %players%", -"%players%'[s] protocol version", - - "pattern_end" - ], - "since" : "2.6.2", - "description" : "Player's protocol version. For more information and list of protocol versions visit wiki.vg.", - "examples" : "command /protocolversion &ltplayer&gt:\\n trigger:\\n send \"Protocol version of %arg-1%: %protocol version of arg-1%\"" -}, -{ - "id" : "ExprSkull", - "name" : "Player Skull", - "patterns" : [ - "[the] (head|skull) of %offline players%", -"%offline players%'[s] (head|skull)", - - "pattern_end" - ], - "since" : "2.0", - "description" : "Gets a skull item representing a player. Skulls for other entities are provided by the aliases.", - "examples" : "give the victim's skull to the attacker\\nset the block at the entity to the entity's skull" -}, -{ - "id" : "ExprPlayerWeather", - "name" : "Player Weather", - "patterns" : [ - "[the] [(client|custom)] weather of %players%", -"%players%'[s] [(client|custom)] weather", - - "pattern_end" - ], - "since" : "2.2-dev34", - "description" : "The weather for a player.", - "examples" : "set weather of arg-player to rainy\\nreset player's weather\\nif arg-player's weather is rainy" -}, -{ - "id" : "ExprPortal", - "name" : "Portal", - "patterns" : [ - "[the] portal['s] blocks", -"[the] blocks of [the] portal", - - "pattern_end" - ], - "since" : "2.4", - "description" : "The blocks associated with a portal in the portal creation event.", - "examples" : "on portal creation:\\n loop portal blocks:\\n broadcast \"%loop-block% is part of a portal!\"" -}, -{ - "id" : "ExprPortalCooldown", - "name" : "Portal Cooldown", - "patterns" : [ - "[the] portal cooldown of %entities%", -"%entities%'[s] portal cooldown", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "The amount of time before an entity can use a portal. By default, it is 15 seconds after exiting a nether portal or end gateway. -Players in survival/adventure get a cooldown of 0.5 seconds, while those in creative get no cooldown. -Resetting will set the cooldown back to the default 15 seconds for non-player entities and 0.5 seconds for players.", - "examples" : "on portal:\\n wait 1 tick\\n set portal cooldown of event-entity to 5 seconds" -}, -{ - "id" : "ExprPotionEffect", - "name" : "Potion Effect", - "patterns" : [ - "[new] potion effect of %potion% [potion] [[[of] tier] %number%] [without particles] [for %time span%]", -"[new] ambient potion effect of %potion% [potion] [[[of] tier] %number%] [without particles] [for %time span%]", - - "pattern_end" - ], - "since" : "2.5.2", - "description" : "Create a new potion effect to apply to an entity or item type. Do note that when applying potion effects -to tipped arrows/lingering potions, Minecraft reduces the timespan.", - "examples" : "set {_p} to potion effect of speed of tier 1 without particles for 10 minutes\\nadd {_p} to potion effects of player's tool\\nadd {_p} to potion effects of target entity\\nadd potion effect of speed 1 to potion effects of player" -}, -{ - "id" : "ExprPotionEffectTier", - "name" : "Potion Effect Tier", - "patterns" : [ - "[the] [potion] (tier|amplifier|level) of %potions% (of|for|on) %living entities%", - - "pattern_end" - ], - "since" : "2.7", - "description" : "An expression to obtain the amplifier of a potion effect applied to an entity.", - "examples" : "if the amplifier of haste of player >= 3:" -}, -{ - "id" : "ExprPotionEffects", - "name" : "Potion Effects", - "patterns" : [ - "[the] [(all [[of] the]|the)] [active] potion effects of %living entities/item types%", -"%living entities/item types%'[s] [(all [[of] the]|the)] [active] potion effects", - - "pattern_end" - ], - "since" : "2.5.2", - "description" : "Represents the active potion effects of entities and itemtypes. -You can clear all potion effects of an entity/itemtype and add/remove a potion effect/type to/from an entity/itemtype. -Do note you will not be able to clear the base potion effects of a potion item. In that case, just set the item to a water bottle. -When adding a potion effect type (rather than a potion effect), it will default to 15 seconds with tier 1.", - "examples" : "set {_p::*} to active potion effects of player\\nclear all the potion effects of player\\nclear all the potion effects of player's tool\\nadd potion effects of player to potion effects of player's tool\\nadd speed to potion effects of target entity\\nremove speed and night vision from potion effects of player" -}, -{ - "id" : "ExprPrefixSuffix", - "name" : "Prefix/Suffix", - "patterns" : [ - "[the] [chat] (prefix|suffix) of %players%", -"%players%'[s] [chat] (prefix|suffix)", - - "pattern_end" - ], - "since" : "2.0", - "description" : "The prefix or suffix as defined in the server's chat plugin.", - "examples" : "on chat:\\n cancel event\\n broadcast \"%player's prefix%%player's display name%%player's suffix%: %message%\" to the player's world\\n\\nset the player's prefix to \"[&lt;red&gt;Admin<reset>] \"" -}, -{ - "id" : "ExprProjectileCriticalState", - "name" : "Projectile Critical State", - "patterns" : [ - "[the] (projectile|arrow) critical (state|ability|mode) of %projectiles%", -"%projectiles%'[s] (projectile|arrow) critical (state|ability|mode)", - - "pattern_end" - ], - "since" : "2.5.1", - "description" : "A projectile's critical state. The only currently accepted projectiles are arrows and tridents.", - "examples" : "on shoot:\\n event-projectile is an arrow\\n set projectile critical mode of event-projectile to true" -}, -{ - "id" : "ExprProtocolVersion", - "name" : "Protocol Version", - "patterns" : [ - "[the] [server] [(sent|required|fake)] protocol version [number]", - - "pattern_end" - ], - "since" : "2.3", - "description" : "The protocol version that will be sent as the protocol version of the server in a server list ping event. For more information and list of protocol versions visit wiki.vg. -If this protocol version doesn't match with the protocol version of the client, the client will see the version string. -But please note that, this expression has no visual effect over the version string. For example if the server uses PaperSpigot 1.12.2, and you make the protocol version 107 (1.9), -the version string will not be \"Paper 1.9\", it will still be \"Paper 1.12.2\". -But then you can customize the version string as you wish. -Also if the protocol version of the player is higher than protocol version of the server, it will say -\"Server out of date!\", and if vice-versa \"Client out of date!\" when you hover on the ping bars. - -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" : "on server list ping:\\n set the version string to \"&lt;light green&gt;Version: &lt;orange&gt;%minecraft version%\"\\n set the protocol version to 0 # 13w41a (1.7) - so the player will see the custom version string almost always" -}, -{ - "id" : "ExprQuitReason", - "name" : "Quit Reason", - "patterns" : [ - "[the] (quit|disconnect) (cause|reason)", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "The quit reason as to why a player disconnected in a quit event.", - "examples" : "on quit:\\n quit reason was kicked\\n player is banned\\n clear {server::player::%uuid of player%::*}" -}, -{ - "id" : "ExprRandom", - "name" : "Random", - "patterns" : [ - "[a] random %*type% [out] of %objects%", - - "pattern_end" - ], - "since" : "1.4.9", - "description" : "Gets a random item out of a set, e.g. a random player out of all players online.", - "examples" : "give a diamond to a random player out of all players\\ngive a random item out of all items to the player" -}, -{ - "id" : "ExprRandomCharacter", - "name" : "Random Character", - "patterns" : [ - "[a|%number%] random [alphanumeric] character[s] (from|between) %text% (to|and) %text%", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "One or more random characters between two given characters. Use 'alphanumeric' if you want only alphanumeric characters. -This expression uses the Unicode numerical code of a character to determine which characters are between the two given characters. -If strings of more than one character are given, only the first character of each is used.", - "examples" : "set {_captcha} to join (5 random characters between \"a\" and \"z\") with \"\"\\nsend 3 random alphanumeric characters between \"0\" and \"z\"" -}, -{ - "id" : "ExprRandomNumber", - "name" : "Random Number", - "patterns" : [ - "[a] random (integer|number) (from|between) %number% (to|and) %number%", - - "pattern_end" - ], - "since" : "1.4", - "description" : "A random number or integer between two given numbers. Use 'number' if you want any number with decimal parts, or use use 'integer' if you only want whole numbers. -Please note that the order of the numbers doesn't matter, i.e. random number between 2 and 1 will work as well as random number between 1 and 2.", - "examples" : "set the player's health to a random number between 5 and 10\\nsend \"You rolled a %random integer from 1 to 6%!\" to the player" -}, -{ - "id" : "ExprRandomUUID", - "name" : "Random UUID", - "patterns" : [ - "[a] random uuid", - - "pattern_end" - ], - "since" : "2.5.1", - "description" : "Returns a random UUID.", - "examples" : "set {_uuid} to random uuid" -}, -{ - "id" : "ExprRawName", - "name" : "Raw Name", - "patterns" : [ - "(raw|minecraft|vanilla) name[s] of %item types%", - - "pattern_end" - ], - "since" : "unknown (2.2)", - "description" : "The raw Minecraft material name of the given item. Note that this is not guaranteed to give same results on all servers.", - "examples" : "raw name of tool of player" -}, -{ - "id" : "ExprRawString", - "name" : "Raw String", - "patterns" : [ - "raw %texts%", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Returns the string without formatting (colors etc.) and without stripping them from it, e.g. raw \"&aHello There!\" would output &aHello There!", - "examples" : "send raw \"&aThis text is unformatted!\" to all players" -}, -{ - "id" : "ExprRedstoneBlockPower", - "name" : "Redstone Block Power", - "patterns" : [ - "[the] redstone power of %blocks%", -"%blocks%'[s] redstone power", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Power of a redstone block", - "examples" : "if redstone power of targeted block is 15:\\n send \"This block is very powerful!\"" -}, -{ - "id" : "ExprRegion", - "name" : "Region", - "patterns" : [ - "[the] [event-]region", - - "pattern_end" - ], - "since" : "2.1", - "description" : "The region involved in an event. -This expression requires a supported regions plugin to be installed.", - "examples" : "on region enter:\\n region is {forbidden region}\\n cancel the event" -}, -{ - "id" : "ExprMembersOfRegion", - "name" : "Region Members & Owners", - "patterns" : [ - "[(all|the)] (members|owner[s]) of [[the] region[s]] %regions%", -"[[the] region[s]] %regions%'[s] (members|owner[s])", - - "pattern_end" - ], - "since" : "2.1", - "description" : "A list of members or owners of a region. -This expression requires a supported regions plugin to be installed.", - "examples" : "on entering of a region:\\n message \"You're entering %region% whose owners are %owners of region%\"" -}, -{ - "id" : "ExprRegionsAt", - "name" : "Regions At", - "patterns" : [ - "[the] region[(s)] %direction% %locations%", - - "pattern_end" - ], - "since" : "2.1", - "description" : "All regions at a particular location. -This expression requires a supported regions plugin to be installed.", - "examples" : "On click on a sign:\\n line 1 of the clicked block is \"[region info]\"\\n set {_regions::*} to regions at the clicked block\\n if {_regions::*} is empty:\\n message \"No regions exist at this sign.\"\\n else:\\n message \"Regions containing this sign: &lt;gold&gt;%{_regions::*}%<r>.\"" -}, -{ - "id" : "ExprRemainingAir", - "name" : "Remaining Air", - "patterns" : [ - "[the] remaining air of %living entities%", -"%living entities%'[s] remaining air", - - "pattern_end" - ], - "since" : "unknown (before 2.1)", - "description" : "How much time a player has left underwater before starting to drown.", - "examples" : "player's remaining air is less than 3 seconds:\\n send \"hurry, get to the surface!\" to the player" -}, -{ - "id" : "ExprCharges", - "name" : "Respawn Anchor Charges", - "patterns" : [ - "[the] [max[imum]] charge[s] of %blocks%", -"%blocks%'[s] [max[imum]] charge[s]", - - "pattern_end" - ], - "since" : "2.7", - "description" : "The charges of a respawn anchor.", - "examples" : "set the charges of event-block to 3" -}, -{ - "id" : "ExprRespawnLocation", - "name" : "Respawn location", - "patterns" : [ - "[the] respawn location", - - "pattern_end" - ], - "since" : "2.2-dev35", - "description" : "The location that a player should respawn at. This is used within the respawn event.", - "examples" : "on respawn:\\n set respawn location to {example::spawn}" -}, -{ - "id" : "ExprReversedList", - "name" : "Reversed List", - "patterns" : [ - "reversed %objects%", - - "pattern_end" - ], - "since" : "2.4", - "description" : "Reverses given list.", - "examples" : "set {_list::*} to reversed {_list::*}" -}, -{ - "id" : "ExprRound", - "name" : "Rounding", - "patterns" : [ - "[(a|the)] round[ed] down %number%", -"[(a|the)] round[ed] %number%", -"[(a|the)] round[ed] up %number%", - - "pattern_end" - ], - "since" : "2.0", - "description" : "Rounds numbers normally, up (ceiling) or down (floor) respectively.", - "examples" : "set {var} to rounded health of player\\nset line 1 of the block to rounded \"%(1.5 * player's level)%\"\\nadd rounded down argument to the player's health" -}, -{ - "id" : "ExprSaturation", - "name" : "Saturation", - "patterns" : [ - "[the] saturation of %players%", -"%players%'[s] saturation", - - "pattern_end" - ], - "since" : "2.2-Fixes-v10, 2.2-dev35 (fully modifiable), 2.6.2 (syntax pattern changed)", - "description" : "The saturation of a player. If used in a player event, it can be omitted and will default to event-player.", - "examples" : "set saturation of player to 20" -}, -{ - "id" : "ExprScoreboardTags", - "name" : "Scoreboard Tags", - "patterns" : [ - "[(all [[of] the]|the)] scoreboard tags of %entities%", -"%entities%'[s] scoreboard tags", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Scoreboard tags are simple list of texts stored directly in the data of an entity. -So this is a Minecraft related thing, not Bukkit, so the tags will not get removed when the server stops. You can visit visit Minecraft Wiki for more info. -This is changeable and valid for any type of entity. Also you can use use the Has Scoreboard Tag condition to check whether an entity has the given tags. - -Requires Minecraft 1.11+ (actually added in 1.9 to the game, but added in 1.11 to Spigot).", - "examples" : "on spawn of a monster:\\n if the spawn reason is mob spawner:\\n add \"spawned by a spawner\" to the scoreboard tags of event-entity\\n\\non death of a monster:\\n if the attacker is a player:\\n if the victim doesn't have the scoreboard tag \"spawned by a spawner\":\\n add 1$ to attacker's balance" -}, -{ - "id" : "ExprScript", - "name" : "Script Name", - "patterns" : [ - "[the] script[['s] name]", -"name of [the] script", - - "pattern_end" - ], - "since" : "2.0", - "description" : "Holds the current script's name (the file name without '.sk').", - "examples" : "on script load:\\n set {running::%script%} to true\\non script unload:\\n set {running::%script%} to false" -}, -{ - "id" : "ExprSeaLevel", - "name" : "Sea Level", - "patterns" : [ - "[the] sea level of %worlds%", -"%worlds%'[s] sea level", - - "pattern_end" - ], - "since" : "2.5.1", - "description" : "Gets the sea level of a world.", - "examples" : "send \"The sea level in your world is %sea level in player's world%\"" -}, -{ - "id" : "ExprSeaPickles", - "name" : "Sea Pickles", - "patterns" : [ - "[the] [(min|max)[imum]] [sea] pickle(s| (count|amount)) of %blocks%", -"%blocks%'[s] [(min|max)[imum]] [sea] pickle(s| (count|amount))", - - "pattern_end" - ], - "since" : "2.7", - "description" : "An expression to obtain or modify data relating to the pickles of a sea pickle block.", - "examples" : "on block break:\\n type of block is sea pickle\\n send \"Wow! This stack of sea pickles contained %event-block's sea pickle count% pickles!\"\\n send \"It could've contained a maximum of %event-block's maximum sea pickle count% pickles!\"\\n send \"It had to have contained at least %event-block's minimum sea pickle count% pickles!\"\\n cancel event\\n set event-block's sea pickle count to event-block's maximum sea pickle count\\n send \"This bad boy is going to hold so many pickles now!!\"" -}, -{ - "id" : "ExprServerIcon", - "name" : "Server Icon", - "patterns" : [ - "[the] [((default)|(shown|sent))] [server] icon", - - "pattern_end" - ], - "since" : "2.3", - "description" : "Icon of the server in the server list. Can be set to an icon that loaded using the -load server icon effect, -or can be reset to the default icon in a server list ping. -'default server icon' returns the default server icon (server-icon.png) always and cannot be changed.", - "examples" : "on script load:\\n set {server-icons::default} to the default server icon" -}, -{ - "id" : "ExprSets", - "name" : "Sets", - "patterns" : [ - "[all [[of] the]|the|every] %*type%", - - "pattern_end" - ], - "since" : "1.0 pre-5, 2.7 (classinfo)", - "description" : "Returns a list of all the values of a type. Useful for looping.", - "examples" : "loop all attribute types:\\n set loop-value attribute of player to 10\\n message \"Set attribute %loop-value% to 10!\"" -}, -{ - "id" : "ExprShooter", - "name" : "Shooter", - "patterns" : [ - "[the] shooter [of %projectile%]", - - "pattern_end" - ], - "since" : "1.3.7", - "description" : "The shooter of a projectile.", - "examples" : "shooter is a skeleton" -}, -{ - "id" : "ExprShuffledList", - "name" : "Shuffled List", - "patterns" : [ - "shuffled %objects%", - - "pattern_end" - ], - "since" : "2.2-dev32", - "description" : "Shuffles given list randomly. This is done by replacing indices by random numbers in resulting list.", - "examples" : "set {_list::*} to shuffled {_list::*}" -}, -{ - "id" : "ExprSignText", - "name" : "Sign Text", - "patterns" : [ - "[the] line %number% [of %block%]", -"[the] (1st|first|2nd|second|3rd|third|4th|fourth) line [of %block%]", - - "pattern_end" - ], - "since" : "1.3", - "description" : "A line of text on a sign. Can be changed, but remember that there is a 16 character limit per line (including color codes that use 2 characters each).", - "examples" : "on rightclick on sign:\\n line 2 of the clicked block is \"[Heal]\":\\n heal the player\\n set line 3 to \"%player%\"" -}, -{ - "id" : "ExprSlotIndex", - "name" : "Slot Index", - "patterns" : [ - "[the] [(raw|unique)] index of %slots%", -"%slots%'[s] [(raw|unique)] index", - - "pattern_end" - ], - "since" : "2.2-dev35, INSERT VERSION (raw index)", - "description" : "Index of an an inventory slot. Other types of slots may or may not have indices. Note that comparing slots with numbers is also possible; if index of slot is same as the number, comparisonsucceeds. This expression is mainly for the cases where you must for some reason save the slot numbers. - -Raw index of slot is unique for the view, see Minecraft Wiki", - "examples" : "if index of event-slot is 10:\\n send \"You bought a pie!\"\\n\\nif display name of player's top inventory is \"Custom Menu\": # 3 rows inventory\\n if raw index of event-slot > 27: # outside custom inventory\\n cancel event" -}, -{ - "id" : "ExprSortedList", - "name" : "Sorted List", - "patterns" : [ - "sorted %objects%", - - "pattern_end" - ], - "since" : "2.2-dev19", - "description" : "Sorts given list in natural order. All objects in list must be comparable; if they're not, this expression will return nothing.", - "examples" : "set {_sorted::*} to sorted {_players::*}" -}, -{ - "id" : "ExprSourceBlock", - "name" : "Source Block", - "patterns" : [ - "[the] source block", - - "pattern_end" - ], - "since" : "2.7", - "description" : "The source block in a spread event.", - "examples" : "on spread:\\n if the source block is a grass block:\\n set the source block to a dirt block" -}, -{ - "id" : "ExprSpawn", - "name" : "Spawn", - "patterns" : [ - "[the] spawn[s] [(point|location)[s]] [of %worlds%]", -"%worlds%'[s] spawn[s] [(point|location)[s]]", - - "pattern_end" - ], - "since" : "1.4.2", - "description" : "The spawn point of a world.", - "examples" : "teleport all players to spawn\\nset the spawn point of \"world\" to the player's location" -}, -{ - "id" : "ExprSpawnReason", - "name" : "Spawn Reason", - "patterns" : [ - "[the] spawn[ing] reason", - - "pattern_end" - ], - "since" : "2.3", - "description" : "The spawn reason in a spawn event.", - "examples" : "on spawn:\\n spawn reason is reinforcements or breeding\\n cancel event" -}, -{ - "id" : "ExprSpawnerType", - "name" : "Spawner Type", - "patterns" : [ - "[the] (spawner|entity|creature) type[s] of %blocks%", -"%blocks%'[s] (spawner|entity|creature) type[s]", - - "pattern_end" - ], - "since" : "2.4", - "description" : "Retrieves, sets, or resets the spawner's entity type", - "examples" : "on right click:\\n if event-block is spawner:\\n send \"Spawner's type is %target block's entity type%\"" -}, -{ - "id" : "ExprSpecialNumber", - "name" : "Special Number", - "patterns" : [ - "(NaN|[(-|minus)](infinity|∞)) value", -"value of (NaN|[(-|minus)](infinity|∞))", - - "pattern_end" - ], - "since" : "2.2-dev32d", - "description" : "Special number values, namely NaN, Infinity and -Infinity", - "examples" : "if {_number} is infinity value:" -}, -{ - "id" : "ExprSpectatorTarget", - "name" : "Spectator Target", - "patterns" : [ - "spectator target [of %players%]", -"%players%'[s] spectator target", - - "pattern_end" - ], - "since" : "2.4-alpha4, 2.7 (Paper Spectator Event)", - "description" : "Grabs the spectator target entity of the players.", - "examples" : "on player start spectating of player:\\n message \"&c%spectator target% currently has %{game::kills::%spectator target%}% kills!\" to the player\\n\\non player stop spectating:\\n past spectator target was a zombie\\n set spectator target to the nearest skeleton" -}, -{ - "id" : "ExprSpeed", - "name" : "Speed", - "patterns" : [ - "[the] (walk[ing]|fl(y[ing]|ight))[( |-)]speed of %players%", -"%players%'[s] (walk[ing]|fl(y[ing]|ight))[( |-)]speed", - - "pattern_end" - ], - "since" : "unknown (before 2.1)", - "description" : "A player's walking or flying speed. Both can be changed, but values must be between -1 and 1 (excessive values will be changed to -1 or 1 respectively). Negative values reverse directions. -Please note that changing a player's speed will change their FOV just like potions do.", - "examples" : "set the player's walk speed to 1\\nincrease the argument's fly speed by 0.1" -}, -{ - "id" : "ExprSubstring", - "name" : "Substring", - "patterns" : [ - "[the] (part|sub[ ](text|string)) of %texts% (between|from) [ind(ex|ices)|character[s]] %number% (and|to) [(index|character)] %number%", -"[the] (first|last) [%number%] character[s] of %texts%", -"[the] %number% (first|last) characters of %texts%", -"[the] character[s] at [(index|position|indexes|indices|positions)] %numbers% (in|of) %texts%", - - "pattern_end" - ], - "since" : "2.1, 2.5.2 (character at, multiple strings support)", - "description" : "Extracts part of a text. You can either get the first <x> characters, the last <x> characters, the character at index <x>, or the characters between indices <x> and <y>. The indices <x> and <y> should be between 1 and the length of the text (other values will be fit into this range).", - "examples" : "set {_s} to the first 5 characters of the text argument\\nmessage \"%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\\nset {_characters::*} to characters at 1, 2 and 7 in player's display name\\nsend the last character of all players' names" -}, -{ - "id" : "ExprTPS", - "name" : "TPS (ticks per second)", - "patterns" : [ - "tps from [the] last ([1] minute|1[ ]m[inute])", -"tps from [the] last 5[ ]m[inutes]", -"tps from [the] last 15[ ]m[inutes]", -"[the] tps", - - "pattern_end" - ], - "since" : "2.2-dev36", - "description" : "Returns the 3 most recent TPS readings, like the /tps command. This expression is only supported on some server software (PaperSpigot).", - "examples" : "broadcast \"%tps%\"" -}, -{ - "id" : "ExprTamer", - "name" : "Tamer", - "patterns" : [ - "[the] tamer", - - "pattern_end" - ], - "since" : "2.2-dev25", - "description" : "The tamer of an entity. Can only be used in entity tame events. You can use 'event-entity' to refer tamed entity itself.", - "examples" : "on tame:\\n if the tamer is a player:\\n send \"someone tamed something!\" to console" -}, -{ - "id" : "ExprTarget", - "name" : "Target", - "patterns" : [ - "[the] target[[ed] %*entity type%] [of %living entities%]", -"%living entities%'[s] target[[ed] %*entity type%]", - - "pattern_end" - ], - "since" : "1.4.2, 2.7 (Reset)", - "description" : "For players this is the entity at the crosshair. -For mobs and experience orbs this is the entity they are attacking/following (if any).", - "examples" : "on entity target:\\n if entity's target is a player:\\n send \"You're being followed by an %entity%!\" to target of entity\\n\\nreset target of entity # Makes the entity target-less\\ndelete targeted entity of player # for players it will delete the target\\ndelete target of last spawned zombie # for entities it will make them target-less" -}, -{ - "id" : "ExprTargetedBlock", - "name" : "Targeted Block", - "patterns" : [ - "[the] target[ed] block[s] [of %players%]", -"%players%'[s] target[ed] block[s]", -"[the] actual[ly] target[ed] block[s] [of %players%]", -"%players%'[s] actual[ly] target[ed] block[s]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "The block at the crosshair. This regards all blocks that are not air as fully solid, e.g. torches will be like a solid stone block for this expression.", - "examples" : "# A command to set the block a player looks at to a specific type:\\ncommand /setblock &lt;material&gt;:\\n trigger:\\n set targeted block to argument" -}, -{ - "id" : "ExprTeleportCause", - "name" : "Teleport Cause", - "patterns" : [ - "[the] teleport (cause|reason|type)", - - "pattern_end" - ], - "since" : "2.2-dev35", - "description" : "The teleport cause within a player teleport event.", - "examples" : "on teleport:\\n teleport cause is nether portal, end portal or end gateway\\n cancel event" -}, -{ - "id" : "ExprTemperature", - "name" : "Temperature", - "patterns" : [ - "[the] temperature[s] of %blocks%", -"%blocks%'[s] temperature[s]", - - "pattern_end" - ], - "since" : "2.2-dev35", - "description" : "Temperature at given block.", - "examples" : "message \"%temperature of the targeted block%\"" -}, -{ - "id" : "ExprTernary", - "name" : "Ternary", - "patterns" : [ - "%objects% if <.+>[,] (otherwise|else) %objects%", - - "pattern_end" - ], - "since" : "2.2-dev36", - "description" : "A shorthand expression for returning something based on a condition.", - "examples" : "set {points} to 500 if {admin::%player's uuid%} is set else 100" -}, -{ - "id" : "ExprEgg", - "name" : "The Egg", - "patterns" : [ - "[the] [thrown] egg", - - "pattern_end" - ], - "since" : "2.7", - "description" : "The egg thrown in a Player Egg Throw event.", - "examples" : "spawn an egg at the egg" -}, -{ - "id" : "ExprTime", - "name" : "Time", - "patterns" : [ - "[the] time[s] [([with]in|of) %worlds%]", -"%worlds%'[s] time[s]", - - "pattern_end" - ], - "since" : "1.0", - "description" : "The time of a world.", - "examples" : "time in world is between 18:00 and 6:00:\\n broadcast \"It's night-time, watch out for monsters!\"" -}, -{ - "id" : "ExprTimePlayed", - "name" : "Time Played", - "patterns" : [ - "[the] time played of %offline players%", -"%offline players%'[s] time played", - - "pattern_end" - ], - "since" : "2.5, 2.7 (offline players)", - "description" : "The amount of time a player has played for on the server. This info is stored in the player's statistics in the main world's data folder. Changing this will also change the player's stats which can be views in the client's statistics menu. -Using this expression on offline players on Minecraft 1.14 and below will return nothing <none>.", - "examples" : "set {_t} to time played of player\\nif player's time played is greater than 10 minutes:\\n give player a diamond sword\\n\\nset player's time played to 0 seconds" -}, -{ - "id" : "ExprTimeSince", - "name" : "Time Since", - "patterns" : [ - "[the] time since %dates%", - - "pattern_end" - ], - "since" : "2.5", - "description" : "The time that has passed since a date. If the given date is in the future, a value will not be returned.", - "examples" : "send \"%time since 5 minecraft days ago% has passed since 5 minecraft days ago!\" to player" -}, -{ - "id" : "ExprTool", - "name" : "Tool", - "patterns" : [ - "[the] ((tool|held item|weapon)|(off[ ]hand (tool|item))) [of %living entities%]", -"%living entities%'[s] ((tool|held item|weapon)|(off[ ]hand (tool|item)))", - - "pattern_end" - ], - "since" : "1.0", - "description" : "The item an entity is holding in their main or off hand.", - "examples" : "player's tool is a pickaxe\\nplayer's off hand tool is a shield\\nset tool of all players to a diamond sword\\nset offhand tool of target entity to a bow" -}, -{ - "id" : "ExprTotalExperience", - "name" : "Total Experience", - "patterns" : [ - "[the] [total] experience of %entities%", -"%entities%'[s] [total] experience", - - "pattern_end" - ], - "since" : "2.7", - "description" : "The total experience, in points, of players or experience orbs. -Adding to a player's experience will trigger Mending, but setting their experience will not.", - "examples" : "set total experience of player to 100\\n\\nadd 100 to player's experience\\n\\nif player's total experience is greater than 100:\\n set player's total experience to 0\\n give player 1 diamond" -}, -{ - "id" : "ExprTypeOf", - "name" : "Type of", - "patterns" : [ - "[the] type of %entity types/item types/inventories/potion effects/block datas%", -"%entity types/item types/inventories/potion effects/block datas%'[s] type", - - "pattern_end" - ], - "since" : "1.4, 2.5.2 (potion effect), 2.7 (block datas)", - "description" : "Type of a block, item, entity, inventory or potion effect. -Types of items, blocks and block datas are item types similar to them but have amounts -of one, no display names and, on Minecraft 1.13 and newer versions, are undamaged. -Types of entities and inventories are entity types and inventory types known to Skript. -Types of potion effects are potion effect types.", - "examples" : "on rightclick on an entity:\\n message \"This is a %type of clicked entity%!\"" -}, -{ - "id" : "ExprUUID", - "name" : "UUID", - "patterns" : [ - "[the] UUID of %offline players/worlds/entities%", -"%offline players/worlds/entities%'[s] UUID", - - "pattern_end" - ], - "since" : "2.1.2, 2.2 (offline players' UUIDs), 2.2-dev24 (other entities' UUIDs)", - "description" : "The UUID of a player, entity or world. -In the future there will be an option to use a player's UUID instead of the name in variable names (i.e. when %player% is used), but for now this can be used. -Please note that this expression does not work for offline players if you are under 1.8!", - "examples" : "# prevents people from joining the server if they use the name of a player\\n# who has played on this server at least once since this script has been added\\non login:\\n if {uuid::%name of player%} exists:\\n {uuid::%name of player%} is not uuid of player\\n kick player due to \"Someone with your name has played on this server before\"\\n else:\\n set {uuid::%name of player%} to uuid of player" -}, -{ - "id" : "ExprUnbreakable", - "name" : "Unbreakable Items", - "patterns" : [ - "unbreakable %item types%", - - "pattern_end" - ], - "since" : "2.2-dev13b", - "description" : "Creates unbreakable copies of given items.", - "examples" : "unbreakable iron sword #Creates unbreakable iron sword" -}, -{ - "id" : "ExprUnixDate", - "name" : "Unix Date", - "patterns" : [ - "[the] unix date of %numbers%", -"%numbers%'[s] unix date", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Converts given Unix timestamp to a date. The Unix timespan represents the number of seconds elapsed since 1 January 1970.", - "examples" : "unix date of 946684800 #1 January 2000 12:00 AM (UTC Time)" -}, -{ - "id" : "ExprUnixTicks", - "name" : "Unix Timestamp", - "patterns" : [ - "[the] unix timestamp of %dates%", -"%dates%'[s] unix timestamp", - - "pattern_end" - ], - "since" : "2.2-dev31", - "description" : "Converts given date to Unix timestamp. This is roughly how many seconds have elapsed since 1 January 1970.", - "examples" : "unix timestamp of now" -}, -{ - "id" : "ExprValueWithin", - "name" : "Value Within", - "patterns" : [ - "[the] (%*type%|value[s]) (within|in) %~objects%", - - "pattern_end" - ], - "since" : "2.7", - "description" : "Gets the value within objects. Usually used with variables to get the value they store rather than the variable itself, or with lists to get the values of a type.", - "examples" : "set {_entity} to a random entity out of all entities\\ndelete entity within {_entity} # This deletes the entity itself and not the value stored in the variable\\n\\nset {_list::*} to \"something\", 10, \"test\" and a zombie\\nbroadcast the strings within {_list::*} # \"something\", \"test\"" -}, -{ - "id" : "ExprVectorAngleBetween", - "name" : "Vectors - Angle Between", - "patterns" : [ - "[the] angle between [[the] vectors] %vector% and %vector%", - - "pattern_end" - ], - "since" : "2.2-dev28", - "description" : "Gets the angle between two vectors.", - "examples" : "send \"%the angle between vector 1, 0, 0 and vector 0, 1, 1%\"" -}, -{ - "id" : "ExprVectorArithmetic", - "name" : "Vectors - Arithmetic", - "patterns" : [ - "%vector%[ ]++[ ]%vector%", -"%vector%[ ]--[ ]%vector%", -"%vector%[ ]**[ ]%vector%", -"%vector%[ ]//[ ]%vector%", - - "pattern_end" - ], - "since" : "2.2-dev28", - "description" : "Arithmetic expressions for vectors.", - "examples" : "set {_v} to vector 1, 2, 3 // vector 5, 5, 5\\nset {_v} to {_v} ++ {_v}\\nset {_v} to {_v} -- {_v}\\nset {_v} to {_v} ** {_v}\\nset {_v} to {_v} // {_v}" -}, -{ - "id" : "ExprVectorFromDirection", - "name" : "Vectors - Create from Direction", - "patterns" : [ - "vector[s] [from] %directions%", -"%directions% vector[s]", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Creates vectors from given directions. -Relative directions are relative to the origin, (0, 0, 0). Therefore, the vector from the direction 'forwards' is (0, 0, 1).", - "examples" : "set {_v} to vector from direction upwards\\nset {_v} to vector in direction of player\\nset {_v} to vector in horizontal direction of player\\nset {_v} to vector from facing of player\\nset {_v::*} to vectors from north, south, east, and west" -}, -{ - "id" : "ExprVectorFromXYZ", - "name" : "Vectors - Create from XYZ", - "patterns" : [ - "[a] [new] vector [(from|at|to)] %number%,[ ]%number%(,[ ]| and )%number%", - - "pattern_end" - ], - "since" : "2.2-dev28", - "description" : "Creates a vector from x, y and z values.", - "examples" : "set {_v} to vector 0, 1, 0" -}, -{ - "id" : "ExprVectorCrossProduct", - "name" : "Vectors - Cross Product", - "patterns" : [ - "%vector% cross %vector%", - - "pattern_end" - ], - "since" : "2.2-dev28", - "description" : "Gets the cross product between two vectors.", - "examples" : "send \"%vector 1, 0, 0 cross vector 0, 1, 0%\"" -}, -{ - "id" : "ExprVectorCylindrical", - "name" : "Vectors - Cylindrical Shape", - "patterns" : [ - "[a] [new] cylindrical vector [(from|with)] [radius] %number%, [yaw] %number%(,| and) [height] %number%", - - "pattern_end" - ], - "since" : "2.2-dev28", - "description" : "Forms a 'cylindrical shaped' vector using yaw to manipulate the current point.", - "examples" : "loop 360 times:\\n set {_v} to cylindrical vector radius 1, yaw loop-value, height 2\\nset {_v} to cylindrical vector radius 1, yaw 90, height 2" -}, -{ - "id" : "ExprVectorDotProduct", - "name" : "Vectors - Dot Product", - "patterns" : [ - "%vector% dot %vector%", - - "pattern_end" - ], - "since" : "2.2-dev28", - "description" : "Gets the dot product between two vectors.", - "examples" : "set {_dot} to {_v1} dot {_v2}" -}, -{ - "id" : "ExprVectorLength", - "name" : "Vectors - Length", - "patterns" : [ - "[the] (vector|standard|normal) length[s] of %vectors%", -"%vectors%'[s] (vector|standard|normal) length[s]", - - "pattern_end" - ], - "since" : "2.2-dev28", - "description" : "Gets or sets the length of a vector.", - "examples" : "send \"%standard length of vector 1, 2, 3%\"\\nset {_v} to vector 1, 2, 3\\nset standard length of {_v} to 2\\nsend \"%standard length of {_v}%\"" -}, -{ - "id" : "ExprLocationVectorOffset", - "name" : "Vectors - Location Vector Offset", - "patterns" : [ - "%location% offset by [[the] vectors] %vectors%", -"%location%[ ]~[~][ ]%vectors%", - - "pattern_end" - ], - "since" : "2.2-dev28", - "description" : "Returns the location offset by vectors.", - "examples" : "set {_loc} to {_loc} ~ {_v}" -}, -{ - "id" : "ExprVectorNormalize", - "name" : "Vectors - Normalized", - "patterns" : [ - "normalize[d] %vector%", -"%vector% normalized", - - "pattern_end" - ], - "since" : "2.2-dev28", - "description" : "Returns the same vector but with length 1.", - "examples" : "set {_v} to normalized {_v}" -}, -{ - "id" : "ExprVectorRandom", - "name" : "Vectors - Random Vector", - "patterns" : [ - "[a] random vector", - - "pattern_end" - ], - "since" : "2.2-dev28, 2.7 (signed components)", - "description" : "Creates a random unit vector.", - "examples" : "set {_v} to a random vector" -}, -{ - "id" : "ExprVectorSpherical", - "name" : "Vectors - Spherical Shape", - "patterns" : [ - "[new] spherical vector [(from|with)] [radius] %number%, [yaw] %number%(,| and) [pitch] %number%", - - "pattern_end" - ], - "since" : "2.2-dev28", - "description" : "Forms a 'spherical shaped' vector using yaw and pitch to manipulate the current point.", - "examples" : "loop 360 times:\\n set {_v} to spherical vector radius 1, yaw loop-value, pitch loop-value\\nset {_v} to spherical vector radius 1, yaw 45, pitch 90" -}, -{ - "id" : "ExprVectorSquaredLength", - "name" : "Vectors - Squared Length", - "patterns" : [ - "[the] squared length[s] of %vectors%", -"%vectors%'[s] squared length[s]", - - "pattern_end" - ], - "since" : "2.2-dev28", - "description" : "Gets the squared length of a vector.", - "examples" : "send \"%squared length of vector 1, 2, 3%\"" -}, -{ - "id" : "ExprVectorBetweenLocations", - "name" : "Vectors - Vector Between Locations", - "patterns" : [ - "[the] vector (from|between) %location% (to|and) %location%", - - "pattern_end" - ], - "since" : "2.2-dev28", - "description" : "Creates a vector between two locations.", - "examples" : "set {_v} to vector between {_loc1} and {_loc2}" -}, -{ - "id" : "ExprVectorProjection", - "name" : "Vectors - Vector Projection", - "patterns" : [ - "[vector] projection [of] %vector% on[to] %vector%", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "An expression to get the vector projection of two vectors.", - "examples" : "set {_projection} to vector projection of vector(1, 2, 3) onto vector(4, 4, 4)" -}, -{ - "id" : "ExprVectorOfLocation", - "name" : "Vectors - Vector from Location", - "patterns" : [ - "[the] vector (of|from|to) %location%", -"%location%'s vector", - - "pattern_end" - ], - "since" : "2.2-dev28", - "description" : "Creates a vector from a location.", - "examples" : "set {_v} to vector of {_loc}" -}, -{ - "id" : "ExprVectorFromYawAndPitch", - "name" : "Vectors - Vector from Pitch and Yaw", - "patterns" : [ - "[a] [new] vector (from|with) yaw %number% and pitch %number%", - - "pattern_end" - ], - "since" : "2.2-dev28", - "description" : "Creates a vector from a yaw and pitch value.", - "examples" : "set {_v} to vector from yaw 45 and pitch 45" -}, -{ - "id" : "ExprVelocity", - "name" : "Vectors - Velocity", - "patterns" : [ - "[the] velocit(y|ies) of %entities%", -"%entities%'[s] velocit(y|ies)", - - "pattern_end" - ], - "since" : "2.2-dev31", - "description" : "Gets or changes velocity of an entity.", - "examples" : "set player's velocity to {_v}" -}, -{ - "id" : "ExprVectorXYZ", - "name" : "Vectors - XYZ Component", - "patterns" : [ - "[the] [vector] (x|y|z) [component[s]] of %vectors%", -"%vectors%'[s] [vector] (x|y|z) [component[s]]", - - "pattern_end" - ], - "since" : "2.2-dev28", - "description" : "Gets or changes the x, y or z component of a vector.", - "examples" : "set {_v} to vector 1, 2, 3\\nsend \"%x of {_v}%, %y of {_v}%, %z of {_v}%\"\\nadd 1 to x of {_v}\\nadd 2 to y of {_v}\\nadd 3 to z of {_v}\\nsend \"%x of {_v}%, %y of {_v}%, %z of {_v}%\"\\nset x component of {_v::*} to 1\\nset y component of {_v::*} to 2\\nset z component of {_v::*} to 3\\nsend \"%x component of {_v::*}%, %y component of {_v::*}%, %z component of {_v::*}%\"" -}, -{ - "id" : "ExprVehicle", - "name" : "Vehicle", - "patterns" : [ - "[the] vehicle[s] of %entities%", -"%entities%'[s] vehicle[s]", - - "pattern_end" - ], - "since" : "2.0", - "description" : "The vehicle an entity is in, if any. This can actually be any entity, e.g. spider jockeys are skeletons that ride on a spider, so the spider is the 'vehicle' of the skeleton. -See also: passenger", - "examples" : "vehicle of the player is a minecart" -}, -{ - "id" : "ExprVersion", - "name" : "Version", - "patterns" : [ - "([craft]bukkit|minecraft|skript)( |-)version", - - "pattern_end" - ], - "since" : "2.0", - "description" : "The version of Bukkit, Minecraft or Skript respectively.", - "examples" : "message \"This server is running Minecraft %minecraft version% on Bukkit %bukkit version%\"\\nmessage \"This server is powered by Skript %skript version%\"" -}, -{ - "id" : "ExprVersionString", - "name" : "Version String", - "patterns" : [ - "[the] [shown|custom] version [string|text]", - - "pattern_end" - ], - "since" : "2.3", - "description" : "The text to show if the protocol version of the server doesn't match with protocol version of the client. You can check the protocol version expression for more information about this. -This can only be set in a server list ping event.", - "examples" : "on server list ping:\\n set the protocol version to 0 # 13w41a (1.7), so it will show the version string always\\n set the version string to \"&lt;light green&gt;Version: &lt;orange&gt;%minecraft version%\"" -}, -{ - "id" : "ExprPlayerViewDistance", - "name" : "View Distance", - "patterns" : [ - "[the] view distance[s] of %players%", -"%players%'[s] view distance[s]", - - "pattern_end" - ], - "since" : "2.4", - "description" : "The view distance of a player as set by the server. Can be changed. -NOTE: This is the view distance sent by the server to the player. -This has nothing to do with client side view distance settings -NOTE: This may not work on some versions (such as MC 1.14.x). -The return value in this case will be the view distance set in system.properties.", - "examples" : "set view distance of player to 10\\nset {_view} to view distance of player\\nreset view distance of all players\\nadd 2 to view distance of player" -}, -{ - "id" : "ExprClientViewDistance", - "name" : "View Distance of Client", - "patterns" : [ - "[the] client view distance[s] of %players%", -"%players%'[s] client view distance[s]", - - "pattern_end" - ], - "since" : "2.5", - "description" : "The view distance of the client. Can not be changed. This differs from the server side view distance of player as this will retrieve the view distance the player has set on their client.", - "examples" : "set {_clientView} to the client view distance of player\\nset view distance of player to client view distance of player" -}, -{ - "id" : "ExprWeather", - "name" : "Weather", - "patterns" : [ - "[the] weather [(in|of) %worlds%]", -"%worlds%'[s] weather", - - "pattern_end" - ], - "since" : "1.0", - "description" : "The weather in the given or the current world.", - "examples" : "set weather to clear\\nweather in \"world\" is rainy" -}, -{ - "id" : "ExprWhitelist", - "name" : "Whitelist", - "patterns" : [ - "[the] white[ ]list", - - "pattern_end" - ], - "since" : "2.5.2", - "description" : "A server's whitelist.This expression can be used to add/remove players to/from the whitelist, to enable it and disable it (set whitelist to true / set whitelist to false), and to empty it (reset whitelist)", - "examples" : "set whitelist to false\\nadd all players to whitelist\\nreset the whitelist" -}, -{ - "id" : "ExprWorld", - "name" : "World", - "patterns" : [ - "[the] world [of %locations/entities/chunk%]", -"%locations/entities/chunk%'[s] world", - - "pattern_end" - ], - "since" : "1.0", - "description" : "The world the event occurred in.", - "examples" : "world is \"world_nether\"\\nteleport the player to the world's spawn\\nset the weather in the player's world to rain\\nset {_world} to world of event-chunk" -}, -{ - "id" : "ExprWorldEnvironment", - "name" : "World Environment", - "patterns" : [ - "[the] [world] environment of %worlds%", -"%worlds%'[s] [world] environment", - - "pattern_end" - ], - "since" : "2.7", - "description" : "The environment of a world", - "examples" : "if environment of player's world is nether:\\n apply fire resistance to player for 10 minutes" -}, -{ - "id" : "ExprSeed", - "name" : "World Seed", - "patterns" : [ - "[the] seed[s] (from|of) %worlds%", -"%worlds%'[s] seed[s]", - - "pattern_end" - ], - "since" : "2.2-dev35", - "description" : "The seed of given world. Note that it will be returned as Minecraft internally treats seeds, not as you specified it in world configuration.", - "examples" : "broadcast \"Seed: %seed of player's world%\"" -}, -{ - "id" : "ExprWorldFromName", - "name" : "World from Name", - "patterns" : [ - "[the] world [(named|with name)] %text%", - - "pattern_end" - ], - "since" : "2.6.1", - "description" : "Returns the world from a string.", - "examples" : "world named {game::world-name}\\nthe world \"world\"" -}, -{ - "id" : "ExprWorlds", - "name" : "Worlds", - "patterns" : [ - "[(all [[of] the]|the)] worlds", - - "pattern_end" - ], - "since" : "1.0", - "description" : "All worlds of the server, useful for looping.", - "examples" : "loop all worlds:\\n broadcast \"You're in %loop-world%\" to loop-world" -}, -{ - "id" : "ExprTimes", - "name" : "X Times", - "patterns" : [ - "%number% time[s]", -"once", -"twice", - - "pattern_end" - ], - "since" : "1.4.6", - "description" : "Integers between 1 and X, used in loops to loop X times.", - "examples" : "loop 20 times:\\n broadcast \"%21 - loop-number% seconds left..\"\\n wait 1 second" -}, -{ - "id" : "ExprXOf", - "name" : "X of Item", - "patterns" : [ - "%number% of %item stacks/item types/entity type%", - - "pattern_end" - ], - "since" : "1.2", - "description" : "An expression to be able to use a certain amount of items where the amount can be any expression. Please note that this expression is not stable and might be replaced in the future.", - "examples" : "give level of player of pickaxes to the player" -}, -{ - "id" : "ExprYawPitch", - "name" : "Yaw / Pitch", - "patterns" : [ - "[the] (yaw|pitch) of %locations/vectors%", -"%locations/vectors%'[s] (yaw|pitch)", - - "pattern_end" - ], - "since" : "2.0, 2.2-dev28 (vector yaw/pitch)", - "description" : "The yaw or pitch of a location or vector.", - "examples" : "log \"%player%: %location of player%, %player's yaw%, %player's pitch%\" to \"playerlocs.log\"\\nset {_yaw} to yaw of player\\nset {_p} to pitch of target entity" -}, - - {"end" : true} - ], - - "functions" : [ - { - "id" : "abs", - "name" : "abs", - "patterns" : [ - "abs(n: number)", - - "pattern_end" - ], - "since" : "2.2", - "description" : "Returns the absolute value of the argument, i.e. makes the argument positive.", - "examples" : "abs(3) = 3\\nabs(-2) = 2" -}, -{ - "id" : "acos", - "name" : "acos", - "patterns" : [ - "acos(n: number)", - - "pattern_end" - ], - "since" : "2.2", - "description" : "The inverse of the cosine, also called arccos. Returns result in degrees, not radians. Only returns values from 0 to 180.", - "examples" : "acos(0) = 90\\nacos(1) = 0\\nacos(0.5) = 30" -}, -{ - "id" : "asin", - "name" : "asin", - "patterns" : [ - "asin(n: number)", - - "pattern_end" - ], - "since" : "2.2", - "description" : "The inverse of the sine, also called arcsin. Returns result in degrees, not radians. Only returns values from -90 to 90.", - "examples" : "asin(0) = 0\\nasin(1) = 90\\nasin(0.5) = 30" -}, -{ - "id" : "atan", - "name" : "atan", - "patterns" : [ - "atan(n: number)", - - "pattern_end" - ], - "since" : "2.2", - "description" : "The inverse of the tangent, also called arctan. Returns result in degrees, not radians. Only returns values from -90 to 90.", - "examples" : "atan(0) = 0\\natan(1) = 45\\natan(10000) = 89.9943" -}, -{ - "id" : "atan2", - "name" : "atan2", - "patterns" : [ - "atan2(x: number, y: number)", - - "pattern_end" - ], - "since" : "2.2", - "description" : "Similar to atan, but requires two coordinates and returns values from -180 to 180.\\nThe returned angle is measured counterclockwise in a standard mathematical coordinate system (x to the right, y to the top).", - "examples" : "atan2(0, 1) = 0\\natan2(10, 0) = 90\\natan2(-10, 5) = -63.4349" -}, -{ - "id" : "calcExperience", - "name" : "calcExperience", - "patterns" : [ - "calcExperience(level: long)", - - "pattern_end" - ], - "since" : "2.2-dev32", - "description" : "Calculates the total amount of experience needed to achieve given level from scratch in Minecraft.", - "examples" : "Missing examples." -}, -{ - "id" : "caseEquals", - "name" : "caseEquals", - "patterns" : [ - "caseEquals(strs: strings)", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Checks if the contents of a list of strings are strictly equal with case sensitivity.", - "examples" : "caseEquals(\"hi\", \"Hi\") = false\\ncaseEquals(\"text\", \"text\", \"text\") = true\\ncaseEquals({some list variable::*})" -}, -{ - "id" : "ceil", - "name" : "ceil", - "patterns" : [ - "ceil(n: number)", - - "pattern_end" - ], - "since" : "2.2", - "description" : "Rounds a number up, i.e. returns the closest integer larger than or equal to the argument.", - "examples" : "ceil(2.34) = 3\\nceil(2) = 2\\nceil(2.99) = 3" -}, -{ - "id" : "ceiling", - "name" : "ceiling", - "patterns" : [ - "ceiling(n: number)", - - "pattern_end" - ], - "since" : "2.2", - "description" : "Alias of ceil.", - "examples" : "ceiling(2.34) = 3\\nceiling(2) = 2\\nceiling(2.99) = 3" -}, -{ - "id" : "clamp", - "name" : "clamp", - "patterns" : [ - "clamp(values: numbers, min: number, max: number)", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Clamps one or more values between two numbers.", - "examples" : "clamp(5, 0, 10) = 5\\nclamp(5.5, 0, 5) = 5\\nclamp(0.25, 0, 0.5) = 0.25\\nclamp(5, 7, 10) = 7\\nclamp((5, 0, 10, 9, 13), 7, 10) = (7, 7, 10, 9, 10)\\nset {_clamped::*} to clamp({_values::*}, 0, 10)" -}, -{ - "id" : "cos", - "name" : "cos", - "patterns" : [ - "cos(n: number)", - - "pattern_end" - ], - "since" : "2.2", - "description" : "The cosine function. This is basically the sine shifted by 90°, i.e. cos(a) = sin(a + 90°), for any number a. Uses degrees, not radians.", - "examples" : "cos(0) = 1\\ncos(90) = 0" -}, -{ - "id" : "date", - "name" : "date", - "patterns" : [ - "date(year: number, month: number, day: number, hour: number = [[integer:0]], minute: number = [[integer:0]], second: number = [[integer:0]], millisecond: number = [[integer:0]], zone_offset: number = [[double:NaN]], dst_offset: number = [[double:NaN]])", - - "pattern_end" - ], - "since" : "2.2", - "description" : "Creates a date from a year, month, and day, and optionally also from hour, minute, second and millisecond.\\nA time zone and DST offset can be specified as well (in minutes), if they are left out the server's time zone and DST offset are used (the created date will not retain this information).", - "examples" : "date(2014, 10, 1) # 0:00, 1st October 2014\\ndate(1990, 3, 5, 14, 30) # 14:30, 5th May 1990\\ndate(1999, 12, 31, 23, 59, 59, 999, -3*60, 0) # almost year 2000 in parts of Brazil (-3 hours offset, no DST)" -}, -{ - "id" : "exp", - "name" : "exp", - "patterns" : [ - "exp(n: number)", - - "pattern_end" - ], - "since" : "2.2", - "description" : "The exponential function. You probably don't need this if you don't know what this is.", - "examples" : "exp(0) = 1\\nexp(1) = 2.7183" -}, -{ - "id" : "floor", - "name" : "floor", - "patterns" : [ - "floor(n: number)", - - "pattern_end" - ], - "since" : "2.2", - "description" : "Rounds a number down, i.e. returns the closest integer smaller than or equal to the argument.", - "examples" : "floor(2.34) = 2\\nfloor(2) = 2\\nfloor(2.99) = 2" -}, -{ - "id" : "isNaN", - "name" : "isNaN", - "patterns" : [ - "isNaN(n: number)", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Returns true if the input is NaN (not a number).", - "examples" : "isNaN(0) # false\\nisNaN(0/0) # true\\nisNaN(sqrt(-1)) # true" -}, -{ - "id" : "ln", - "name" : "ln", - "patterns" : [ - "ln(n: number)", - - "pattern_end" - ], - "since" : "2.2", - "description" : "The natural logarithm. You probably don't need this if you don't know what this is.\\nReturns NaN (not a number) if the argument is negative.", - "examples" : "ln(1) = 0\\nln(exp(5)) = 5\\nln(2) = 0.6931" -}, -{ - "id" : "location", - "name" : "location", - "patterns" : [ - "location(x: number, y: number, z: number, world: world = event-world, yaw: number = [[integer:0]], pitch: number = [[integer:0]])", - - "pattern_end" - ], - "since" : "2.2", - "description" : "Creates a location from a world and 3 coordinates, with an optional yaw and pitch.\\nIf for whatever reason the world is not found, it will fallback to the server's main world.", - "examples" : "location(0, 128, 0)\\nlocation(player's x-coordinate, player's y-coordinate + 5, player's z-coordinate, player's world, 0, 90)\\nlocation(0, 64, 0, world \"world_nether\")\\nlocation(100, 110, -145, world(\"my_custom_world\"))" -}, -{ - "id" : "log", - "name" : "log", - "patterns" : [ - "log(n: number, base: number = [[integer:10]])", - - "pattern_end" - ], - "since" : "2.2", - "description" : "A logarithm, with base 10 if none is specified. This is the inverse operation to exponentiation (for positive bases only), i.e. log(base ^ exponent, base) = exponent for any positive number 'base' and any number 'exponent'.\\nAnother useful equation is base ^ log(a, base) = a for any numbers 'base' and 'a'.\\nPlease note that due to how numbers are represented in computers, these equations do not hold for all numbers, as the computed values may slightly differ from the correct value.\\nReturns NaN (not a number) if any of the arguments are negative.", - "examples" : "log(100) = 2 # 10^2 = 100\\nlog(16, 2) = 4 # 2^4 = 16" -}, -{ - "id" : "max", - "name" : "max", - "patterns" : [ - "max(ns: numbers)", - - "pattern_end" - ], - "since" : "2.2", - "description" : "Returns the maximum number from a list of numbers.", - "examples" : "max(1) = 1\\nmax(1, 2, 3, 4) = 4\\nmax({some list variable::*})" -}, -{ - "id" : "min", - "name" : "min", - "patterns" : [ - "min(ns: numbers)", - - "pattern_end" - ], - "since" : "2.2", - "description" : "Returns the minimum number from a list of numbers.", - "examples" : "min(1) = 1\\nmin(1, 2, 3, 4) = 1\\nmin({some list variable::*})" -}, -{ - "id" : "mod", - "name" : "mod", - "patterns" : [ - "mod(d: number, m: number)", - - "pattern_end" - ], - "since" : "2.2", - "description" : "Returns the modulo of the given arguments, i.e. the remainder of the division d/m, where d and m are the arguments of this function.\\nThe returned value is always positive. Returns NaN (not a number) if the second argument is zero.", - "examples" : "mod(3, 2) = 1\\nmod(256436, 100) = 36\\nmod(-1, 10) = 9" -}, -{ - "id" : "offlineplayer", - "name" : "offlineplayer", - "patterns" : [ - "offlineplayer(nameoruuid: string)", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Returns a offline player from their name or UUID. This function will still return the player if they're online.", - "examples" : "set {_p} to offlineplayer(\"Notch\")\\nset {_p} to offlineplayer(\"069a79f4-44e9-4726-a5be-fca90e38aaf5\")" -}, -{ - "id" : "player", - "name" : "player", - "patterns" : [ - "player(nameoruuid: string, getexactplayer: boolean = [[boolean:false]])", - - "pattern_end" - ], - "since" : "INSERT VERSION", - "description" : "Returns an online player from their name or UUID, if player is offline function will return nothing.\\nSetting 'getExactPlayer' parameter to true will return the player whose name is exactly equal to the provided name instead of returning a player that their name starts with the provided name.", - "examples" : "set {_p} to player(\"Notch\") # will return an online player whose name is or starts with 'Notch'\\nset {_p} to player(\"Notch\", true) # will return the only online player whose name is 'Notch'\\nset {_p} to player(\"069a79f4-44e9-4726-a5be-fca90e38aaf5\") # &amp;amp;amp;lt;none&amp;amp;amp;gt; if player is offline" -}, -{ - "id" : "product", - "name" : "product", - "patterns" : [ - "product(ns: numbers)", - - "pattern_end" - ], - "since" : "2.2", - "description" : "Calculates the product of a list of numbers.", - "examples" : "product(1) = 1\\nproduct(2, 3, 4) = 24\\nproduct({some list variable::*})\\nproduct(2, {_v::*}, and the player's y-coordinate)" -}, -{ - "id" : "rgb", - "name" : "rgb", - "patterns" : [ - "rgb(red: long, green: long, blue: long)", - - "pattern_end" - ], - "since" : "2.5", - "description" : "Returns a RGB color from the given red, green and blue parameters.", - "examples" : "dye player's leggings rgb(120, 30, 45)" -}, -{ - "id" : "round", - "name" : "round", - "patterns" : [ - "round(n: number, d: number = [[integer:0]])", - - "pattern_end" - ], - "since" : "2.2, 2.7 (decimal placement)", - "description" : "Rounds a number, i.e. returns the closest integer to the argument. Place a second argument to define the decimal placement.", - "examples" : "round(2.34) = 2\\nround(2) = 2\\nround(2.99) = 3\\nround(2.5) = 3" -}, -{ - "id" : "sin", - "name" : "sin", - "patterns" : [ - "sin(n: number)", - - "pattern_end" - ], - "since" : "2.2", - "description" : "The sine function. It starts at 0° with a value of 0, goes to 1 at 90°, back to 0 at 180°, to -1 at 270° and then repeats every 360°. Uses degrees, not radians.", - "examples" : "sin(90) = 1\\nsin(60) = 0.866" -}, -{ - "id" : "sqrt", - "name" : "sqrt", - "patterns" : [ - "sqrt(n: number)", - - "pattern_end" - ], - "since" : "2.2", - "description" : "The square root, which is the inverse operation to squaring a number (for positive numbers only). This is the same as (argument) ^ (1/2) – other roots can be calculated via number ^ (1/root), e.g. set {_l} to {_volume}^(1/3).\\nReturns NaN (not a number) if the argument is negative.", - "examples" : "sqrt(4) = 2\\nsqrt(2) = 1.4142\\nsqrt(-1) = NaN" -}, -{ - "id" : "sum", - "name" : "sum", - "patterns" : [ - "sum(ns: numbers)", - - "pattern_end" - ], - "since" : "2.2", - "description" : "Sums a list of numbers.", - "examples" : "sum(1) = 1\\nsum(2, 3, 4) = 9\\nsum({some list variable::*})\\nsum(2, {_v::*}, and the player's y-coordinate)" -}, -{ - "id" : "tan", - "name" : "tan", - "patterns" : [ - "tan(n: number)", - - "pattern_end" - ], - "since" : "2.2", - "description" : "The tangent function. This is basically sin(arg)/cos(arg). Uses degrees, not radians.", - "examples" : "tan(0) = 0\\ntan(45) = 1\\ntan(89.99) = 5729.5779" -}, -{ - "id" : "vector", - "name" : "vector", - "patterns" : [ - "vector(x: number, y: number, z: number)", - - "pattern_end" - ], - "since" : "2.2-dev23", - "description" : "Creates a new vector, which can be used with various expressions, effects and functions.", - "examples" : "vector(0, 0, 0)" -}, -{ - "id" : "world", - "name" : "world", - "patterns" : [ - "world(name: string)", - - "pattern_end" - ], - "since" : "2.2", - "description" : "Gets a world from its name.", - "examples" : "set {_nether} to world(\"%{_world}%_nether\")" -}, - - {"end" : true} - ] -} diff --git a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/effects.html b/docs/nightly/enhancement/merge-master-into-feature-attempt-2/effects.html deleted file mode 100644 index 25c619a72aa..00000000000 --- a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/effects.html +++ /dev/null @@ -1 +0,0 @@ - Skript Documentation - 2.8.0-dev-nightly-49c4fae

Effects

Action Bar

🔗

Effect

Patterns:
  • send [the] action[ ]bar [with text] %text% [to %players%]
Since: 2.3
Sends an action bar message to the given player(s).

Examples:

send action bar "Hello player!" to player

Apply Bone Meal

🔗

Effect

Patterns:
Since: INSERT VERSION
Requirements: MC 1.16.2+
Applies bone meal to a crop, sapling, or composter

Examples:

apply 3 bone meal to event-block

Ban

🔗

Effect

Patterns:
Since: 1.4, 2.1.1 (ban reason), 2.5 (timespan)
Bans or unbans a player or an IP address. 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. Consider using the kick effect after applying a ban.

Examples:

unban player
ban "127.0.0.1"
IP-ban the player because "he is an idiot"
ban player due to "inappropriate language" for 2 days

Break Block

🔗

Effect

Patterns:
Since: 2.4
Breaks the block and spawns items as if a player had mined it

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:

on right click:
    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

Broadcast

🔗

Effect

Patterns:
Since: 1.0, 2.6 (broadcasting objects), 2.6.1 (using advanced formatting)
Broadcasts a message to the server.

Examples:

broadcast "Welcome %player% to the server!"
broadcast "Woah! It's a message!"

Cancel Command Cooldown

🔗

Effect

Patterns:
  • (cancel|ignore) [the] [current] [command] cooldown
  • un(cancel|ignore) [the] [current] [command] cooldown
Since: 2.2-dev34
Only usable in commands. Makes it so the current command usage isn't counted towards the cooldown.

Examples:

command /nick &lt;text&gt;:
    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

Cancel Drops

🔗

Effect

Patterns:
  • (cancel|clear|delete) [the] drops [of (items|[e]xp[erience][s])]
  • (cancel|clear|delete) [the] (item|[e]xp[erience]) drops
Since: 2.4
Usable in events: death, break / mine
Requirements: 1.12.2 or newer (cancelling item drops of blocks)
Cancels drops of items or experiences in a death or block break event. Please note that this doesn't keep items or experiences of a dead player. If you want to do that, use the Keep Inventory / Experience effect.

Examples:

on death of a zombie:
    if name of the entity is "&cSpecial":
        cancel drops of items

on break of a coal ore:
    cancel the experience drops

Cancel Event

🔗

Effect

Patterns:
  • cancel [the] event
  • uncancel [the] event
Since: 1.0
Cancels the event (e.g. prevent blocks from being placed, or damage being taken).

Examples:

on damage:
    victim is a player
    victim has the permission "skript.god"
    cancel the event

Change: Set/Add/Remove/Delete/Reset

🔗

Effect

Patterns:
Since: 1.0 (set, add, remove, delete), 2.0 (remove all)
A very general effect that can change many expressions. Many expressions can only be set and/or deleted, while some can have things added to or removed from them.

Examples:

# set:
Set the player's display name to "&lt;red&gt;%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

Charge Creeper

🔗

Effect

Patterns:
  • make %living entities% [a[n]] (charged|powered|((un|non[-])charged|(un|non[-])powered)) [creeper[s]]
  • (charge|power|(uncharge|unpower)) %living entities%
Since: 2.5
Charges or uncharges a creeper. A creeper is charged when it has been struck by lightning.

Examples:

on spawn of creeper:
    charge the event-entity

Color Items

🔗

Effect

Patterns:
Since: 2.0, 2.2-dev26 (maps and potions)
Colors items in a given color. You can also use RGB codes if you feel limited with the 16 default colors. RGB codes are three numbers from 0 to 255 in the order (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:

dye player's helmet blue
color the player's tool red

Command

🔗

Effect

Patterns:
Since: 1.0, INSERT VERSION (bungeecord command)
Executes a command. This can be useful to use other plugins in triggers. If the command is a bungeecord side command, you can use the [bungeecord] option to execute command on the proxy.

Examples:

make player execute command "/home"
execute console command "/say Hello everyone!"
execute player bungeecord command "/alert &6Testing Announcement!"

Connect

🔗

Effect

Patterns:
Since: 2.3
Connects a player to another bungeecord server

Examples:

connect all players to "hub"

Continue

🔗

Effect

Patterns:
  • continue [this loop|[the] [current] loop]
  • continue [the] %*integer%(st|nd|rd|th) loop
Since: 2.2-dev37, 2.7 (while loops), INSERT VERSION (outer loops)
Moves the loop to the next iteration. You may also continue an outer loop from an inner one. The loops are labelled from 1 until the current loop, starting with the outermost one.

Examples:

# Broadcast online moderators
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)"

Damage/Heal/Repair

🔗

Effect

Patterns:
Since: 1.0
Damage/Heal/Repair an entity, or item.

Examples:

damage player by 5 hearts
heal the player
repair tool of player

Delay

🔗

Effect

Patterns:
Since: 1.4
Delays the script's execution by a given timespan. Please note that delays are not persistent, e.g. trying to create a tempban script with 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:

wait 2 minutes
halt for 5 minecraft hours
wait a tick

Do If

🔗

Effect

Patterns:
  • <.+> if <.+>
Since: 2.3
Execute an effect if a condition is true.

Examples:

on join:
    give a diamond to the player if the player has permission "rank.vip"

Drop

🔗

Effect

Patterns:
Since: 1.0
Drops one or more items.

Examples:

on death of creeper:
    drop 1 TNT

Enable/Disable/Reload Script File

🔗

Effect

Patterns:
  • ((enable|load)|reload|(disable|unload)) s(c|k)ript [file] %text%
Since: 2.4
Enables, disables, or reloads a script file.

Examples:

reload script "test"
enable script file "testing"
unload script file "script.sk"

Enchant/Disenchant

🔗

Effect

Patterns:
Since: 2.0
Enchant or disenchant an existing item.

Examples:

enchant the player's tool with sharpness 5
disenchant the player's tool

Equip

🔗

Effect

Patterns:
Since: 1.0, 2.7 (multiple entities, unequip)
Equips or unequips an entity with some given armor. This will replace any armor that the entity is wearing.

Examples:

equip player with diamond helmet
equip player with all diamond armor
unequip diamond chestplate from player
unequip all armor from player
unequip player's armor

Exit

🔗

Effect

Patterns:
  • (exit|stop) [trigger]
  • (exit|stop) [(1|a|the|this)] (section|loop|conditional)
  • (exit|stop) <\d+> (section|loop|conditional)s
  • (exit|stop) all (section|loop|conditional)s
Since: unknown (before 2.1)
Exits a given amount of loops and conditionals, or the entire trigger.

Examples:

if player has any ore:
    stop
message "%player% has no ores!"
loop blocks above the player:
    loop-block is not air:
        exit 2 sections
    set loop-block to water

Explode Creeper

🔗

Effect

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.
Starts the explosion process of a creeper or instantly explodes it.

Examples:

start explosion of the last spawned creeper
stop ignition of the last spawned creeper

Explosion

🔗

Effect

Patterns:
Since: 1.0
Creates an explosion of a given force. The Minecraft Wiki has an article on explosions which lists the explosion forces of TNT, creepers, etc. 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 10 at the player
create an explosion of force 0 at the victim

Feed

🔗

Effect

Patterns:
Since: 2.2-dev34
Feeds the specified players.

Examples:

feed all players
feed the player by 5 beefs

Force Attack

🔗

Effect

Patterns:
Since: 2.5.1
Requirements: Minecraft 1.15.2+
Makes a living entity attack an entity with a melee attack.

Examples:

spawn a wolf at player's location
make last spawned wolf attack player

Force Respawn

🔗

Effect

Patterns:
Since: 2.2-dev21
Forces player(s) to respawn if they are dead. If this is called without delay from death event, one tick is waited before respawn attempt.

Examples:

on death of player:
    force event-player to respawn

Handedness

🔗

Effect

Patterns:
Since: INSERT VERSION
Requirements: Paper 1.17.1+
Make mobs left or right-handed. This does not affect players.

Examples:

spawn skeleton at spawn of world "world":
    make entity left handed

make all zombies in radius 10 of player right handed

Hide Player from Server List

🔗

Effect

Patterns:
  • hide %players% (in|on|from) [the] server list
  • hide %players%'[s] info[rmation] (in|on|from) [the] server list
Since: 2.3
Hides a player from the hover list and decreases the online players count (only if the player count wasn't changed before).

Examples:

on server list ping:
    hide {vanished::*} from the server list

Ignite/Extinguish

🔗

Effect

Patterns:
Since: 1.4
Lights entities on fire or extinguishes them.

Examples:

ignite the player
extinguish the player

Keep Inventory / Experience

🔗

Effect

Patterns:
  • keep [the] (inventory|items) [(and [e]xp[erience][s] [point[s]])]
  • keep [the] [e]xp[erience][s] [point[s]] [(and (inventory|items))]
Since: 2.4
Usable in events: death
Keeps the inventory or/and experiences of the dead player in a death event.

Examples:

on death of a player:
    if the victim is an op:
        keep the inventory and experiences

Kick

🔗

Effect

Patterns:
  • kick %players% [(by reason of|because [of]|on account of|due to) %text%]
Since: 1.0
Kicks a player from the server.

Examples:

on place of TNT, lava, or obsidian:
    kick the player due to "You may not place %block%!"
    cancel the event

Kill

🔗

Effect

Patterns:
Since: 1.0
Kills an entity. Note: This effect does not set the entity's health to 0 (which causes issues), but damages the entity by 100 times its maximum health.

Examples:

kill the player
kill all creepers in the player's world
kill all endermen, witches and bats

Knockback

🔗

Effect

Patterns:
Since: 2.7
Requirements: Paper 1.19.2+
Apply the same velocity as a knockback to living entities in a direction. Mechanics such as knockback resistance will be factored in.

Examples:

knockback player north
knock victim (vector from attacker to victim) with strength 10

Launch firework

🔗

Effect

Patterns:
Since: 2.4
Launch firework effects at the given location(s).

Examples:

launch ball large colored red, purple and white fading to light green and black at player's location with duration 1

Leash entities

🔗

Effect

Patterns:
Since: 2.3
Leash living entities to other entities.

Examples:

leash the player to the target entity

Lightning

🔗

Effect

Patterns:
Since: 1.4
Strike lightning at a given location. Can use 'lightning effect' to create a lightning that does not harm entities or start fires.

Examples:

strike lightning at the player
strike lightning effect at the victim

Load Server Icon

🔗

Effect

Patterns:
  • load [the] server icon (from|of) [the] [image] [file] %text%
Since: 2.3
Requirements: Paper 1.12.2 or newer
Loads server icons from the given files. You can get the loaded icon using the last loaded server icon expression. Please note that the image must be 64x64 and the file path starts from the server folder.

Examples:

on load:
    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::*}

Locally Suppress Warning

🔗

Effect

Patterns:
  • [local[ly]] suppress [the] (conflict|variable save|[missing] conjunction[s]|starting [with] expression[s]) warning[s]
Since: 2.3
Suppresses target warnings from the current script.

Examples:

locally suppress missing conjunction warnings
suppress the variable save warnings

Log

🔗

Effect

Patterns:
Since: 2.0
Writes text into a .log file. Skript will write these files to /plugins/Skript/logs. 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:

on place of TNT:
    log "%player% placed TNT in %world% at %location of block%" to "tnt/placement.log"

Look At

🔗

Effect

Patterns:
Since: 2.7
Requirements: Paper 1.17+, Paper 1.19.1+ (Players & Look Anchors)
Forces the mob(s) or player(s) to look at an entity, vector or location. Vanilla max head pitches range from 10 to 50.

Examples:

force the head of the player to look towards event-entity's feet

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

Make Egg Hatch

🔗

Effect

Patterns:
  • make [the] egg [not] hatch
Since: 2.7
Usable in events: Egg Throw
Makes the egg hatch in a Player Egg Throw event.

Examples:

on player egg throw:
    # EGGS FOR DAYZ!
    make the egg hatch

Make Fly

🔗

Effect

Patterns:
Since: 2.2-dev34
Forces a player to start/stop flying.

Examples:

make player fly
force all players to stop flying

Make Incendiary

🔗

Effect

Patterns:
  • make %entities% [not] incendiary
  • make %entities%'[s] explosion [not] (incendiary|fiery)
  • make [the] [event(-| )]explosion [not] (incendiary|fiery)
Since: 2.5
Sets if an entity's explosion will leave behind fire. This effect is also usable in an explosion prime event.

Examples:

on explosion prime:
    make the explosion fiery

Make Invisible

🔗

Effect

Patterns:
Since: 2.7
Makes a living entity visible/invisible. This is not a potion and therefore does not have features such as a time limit or particles. 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:

make target entity invisible

Make Invulnerable

🔗

Effect

Patterns:
Since: 2.5
Makes an entity invulnerable/not invulnerable.

Examples:

make target entity invulnerable

Make Say

🔗

Effect

Patterns:
Since: 2.3
Forces a player to send a message to the chat. If the message starts with a slash it will force the player to use command.

Examples:

make the player say "Hello."
force all players to send the message "I love this server"

Message

🔗

Effect

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
Sends a message to the given player. Only styles written 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 "A wild %player% appeared!"
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

Open Book

🔗

Effect

Patterns:
Since: 2.5.1
Requirements: Minecraft 1.14.2+
Opens a written book to a player.

Examples:

open book player's tool to player

Open/Close Inventory

🔗

Effect

Patterns:
  • (open|show) (((crafting [table]|workbench)|chest|anvil|hopper|dropper|dispenser) [(view|window|inventory)]|%inventory/inventory type%) (to|for) %players%
  • close [the] inventory [view] (to|of|for) %players%
  • close %players%'[s] inventory [view]
Since: 2.0, 2.1.1 (closing), 2.2-Fixes-V10 (anvil), 2.4 (hopper, dropper, dispenser
Opens an inventory to a player. The player can then access and modify the inventory as if it was a chest that he just opened. 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:

show the victim's inventory to the player
open the player's inventory for the player

Pathfind

🔗

Effect

Patterns:
Since: 2.7
Requirements: Paper
Make an entity pathfind towards a location or another entity. Not all entities can pathfind. If the pathfinding target is another entity, the entities may or may not continuously follow the target.

Examples:

make all creepers pathfind towards player
make all cows stop pathfinding
make event-entity pathfind towards player at speed 1

Play Effect

🔗

Effect

Patterns:
Since: 2.1
Plays a visual effect at a given location or on a given entity. 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:

play wolf hearts on the clicked wolf
show mob spawner flames at the targeted block to the player

Play Sound

🔗

Effect

Patterns:
Since: 2.2-dev28, 2.4 (sound categories)
Plays a sound at given location for everyone or just for given players, or plays a sound to specified players. Both Minecraft sound names and Spigot sound names are supported. Playing resource pack sounds are supported too. The sound category is 'master' by default.

Please note that sound names can get changed in any Minecraft or Spigot version, or even removed from Minecraft itself.

Examples:

play sound "block.note_block.pling" # It is block.note.pling in 1.12.2
play sound "entity.experience_orb.pickup" with volume 0.5 to the player
play sound "custom.music.1" in jukebox category at {speakerBlock}

Player Info Visibility

🔗

Effect

Patterns:
  • hide [all] player [related] info[rmation] [(in|on|from) [the] server list]
  • (show|reveal) [all] player [related] info[rmation] [(in|to|on|from) [the] server list]
Since: 2.3
Usable in events: server list ping
Requirements: Paper 1.12.2 or newer
Sets whether all player related information is hidden in the server list. 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 info
hide player related information in the server list
reveal all player related info

Player Visibility

🔗

Effect

Patterns:
Since: 2.3
Change visibility of a player for the given 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: if a player was hidden and relogs, this player will be visible again.

Examples:

on join:
    if {vanished::%player's uuid%} is true:
        hide the player from all players

reveal hidden players of {_player}

Poison/Cure

🔗

Effect

Patterns:
Since: 1.3.2
Poison or cure a creature.

Examples:

poison the player
poison the victim for 20 seconds
cure the player from poison

Potion Effects

🔗

Effect

Patterns:
  • apply %potion effects% to %living entities%
  • apply infinite [ambient] [potion of] %potions% [potion] [[[of] tier] %number%] [without [any] particles] [(whilst hiding [the]|without (the|a)) [potion] icon] to %living entities% [replacing [the] existing effect]
  • apply [ambient] [potion of] %potions% [potion] [[[of] tier] %number%] [without [any] particles] [(whilst hiding [the]|without (the|a)) [potion] icon] to %living entities% [for %time span%] [replacing [the] existing effect]
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)
Apply or remove potion effects to/from entities.

Examples:

apply ambient swiftness 2 to the player
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

Push

🔗

Effect

Patterns:
Since: 1.4.6
Push entities around.

Examples:

push the player upwards
push the victim downwards at speed 0.5

PvP

🔗

Effect

Patterns:
Since: 1.3.4
Set the PvP state for a given world.

Examples:

enable PvP #(current world only)
disable PvP in all worlds

Replace

🔗

Effect

Patterns:
Since: 2.0, 2.2-dev24 (replace in multiple strings and replace items in inventory), 2.5 (replace first, case sensitivity)
Replaces all occurrences of a given text with another text. Please note that you can only change variables and a few expressions, e.g. a message or a line of a sign.

Examples:

replace "<item>" in {textvar} with "%item%"
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

Return

🔗

Effect

Patterns:
Since: 2.2, INSERT VERSION (returns aliases)
Makes a function return a value

Examples:

function double(i: number) :: number:
    return 2 * {_i}

function divide(i: number) returns number:
    return {_i} / 2

Send Block Change

🔗

Effect

Patterns:
Since: 2.2-dev37c, 2.5.1 (block data support)
Makes a player see a block as something it really isn't. BlockData support is only for MC 1.13+

Examples:

make player see block at player as dirt
make player see target block as campfire[facing=south]

Send Resource Pack

🔗

Effect

Patterns:
  • send [the] resource pack [from [[the] URL]] %text% to %players%
  • send [the] resource pack [from [[the] URL]] %text% with hash %text% to %players%
Since: 2.4
Request that the player's client download and switch resource packs. The client will download 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:

on join:
    send the resource pack from "URL" with hash "hash" to the player

Shear

🔗

Effect

Patterns:
Since: 2.0 (cows, sheep & snowmen), INSERT VERSION (all shearable entities)
Requirements: Paper 1.19.4+ (all shearable entities)
Shears or un-shears a shearable entity with drops by shearing and a 'sheared' sound. Using with 'force' will force this effect despite the entity's 'shear state'.

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:

on rightclick on a sheep holding a sword:
    shear the clicked sheep
    chance of 10%
    force shear the clicked sheep

Shoot

🔗

Effect

Patterns:
Since: 1.4
Shoots a projectile (or any other entity) from a given entity.

Examples:

shoot an arrow
make the player shoot a creeper at speed 10
shoot a pig from the creeper

Silence Entity

🔗

Effect

Patterns:
Since: 2.5
Controls whether or not an entity is silent.

Examples:

make target entity silent

Stop Server

🔗

Effect

Patterns:
  • (stop|shut[ ]down) [the] server
  • restart [the] server
Since: 2.5
Stops or restarts the server. If restart is used when the restart-script spigot.yml option isn't defined, the server will stop instead.

Examples:

stop the server
restart server

Stop Sound

🔗

Effect

Patterns:
Since: 2.4, 2.7 (stop all sounds)
Requirements: MC 1.17.1 (stop all sounds)
Stops specific or all sounds from playing to a group of players. Both Minecraft sound names and Spigot sound names are supported. Resource pack sounds are supported too. The sound category is 'master' by default. A sound can't be stopped from a different category.

Please note that sound names can get changed in any Minecraft or Spigot version, or even removed from Minecraft itself.

Examples:

stop sound "block.chest.open" for the player
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

Swing Hand

🔗

Effect

Patterns:
Since: 2.5.1
Requirements: Minecraft 1.15.2+
Makes an entity swing their hand. This does nothing if the entity does not have an animation for swinging their hand.

Examples:

make player swing their main hand

Teleport

🔗

Effect

Patterns:
Since: 1.0
Teleport an entity to a specific location. 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.

Examples:

teleport the player to {homes.%player%}
teleport the attacker to the victim

Title - Reset

🔗

Effect

Patterns:
  • reset [the] title[s] [of %players%]
  • reset [the] %players%'[s] title[s]
Since: 2.3
Resets the title of the player to the default values.

Examples:

reset the titles of all players
reset the title

Title - Send

🔗

Effect

Patterns:
Since: 2.3
Sends a title/subtitle to the given player(s) with optional fadein/stay/fadeout times for Minecraft versions 1.11 and above.

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 "Competition Started" with subtitle "Have fun, Stay safe!" to player for 5 seconds
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

Toggle

🔗

Effect

Patterns:
  • (close|turn off|de[-]activate) %blocks%
  • (toggle|switch) [[the] state of] %blocks%
  • (open|turn on|activate) %blocks%
Since: 1.4
Toggle the state of a block.

Examples:

# use arrows to toggle switches, doors, etc.
on projectile hit:
    projectile is arrow
    toggle the block at the arrow

Toggle Flight

🔗

Effect

Patterns:
  • (allow|enable) (fly|flight) (for|to) %players%
  • (disallow|disable) (fly|flight) (for|to) %players%
Since: 2.3
Toggle the flight mode of a player.

Examples:

allow flight to event-player

Toggle Picking Up Items

🔗

Effect

Patterns:
Since: INSERT VERSION
Determines whether living entities are able to pick up items or not

Examples:

forbid player from picking up items
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

Tree

🔗

Effect

Patterns:
Since: 1.0
Creates a tree. 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:

grow a tall redwood tree above the clicked block

Vectors - Rotate Around Vector

🔗

Effect

Patterns:
Since: 2.2-dev28
Rotates one or more vectors around another vector

Examples:

rotate {_v} around vector 1, 0, 0 by 90

Vectors - Rotate around XYZ

🔗

Effect

Patterns:
Since: 2.2-dev28
Rotates one or more vectors around the x, y, or z axis by some amount of degrees

Examples:

rotate {_v} around x-axis by 90
rotate {_v} around y-axis by 90
rotate {_v} around z-axis by 90 degrees

Vehicle

🔗

Effect

Patterns:
  • (make|let|force) %entities% [to] (ride|mount) [(in|on)] %entities/entity types%
  • (make|let|force) %entities% [to] (dismount|(dismount|leave) [(from|of)] [(any|the[ir]|his|her)] vehicle[s])
  • (eject|dismount) [(any|the)] passenger[s] (of|from) %entities%
Since: 2.0
Makes an entity ride another entity, e.g. a minecart, a saddled pig, an arrow, etc.

Examples:

make the player ride a saddled pig
make the attacker ride the victim

op/deop

🔗

Effect

Patterns:
Since: 1.0
Grant/revoke a user operator state.

Examples:

op the player
deop all players

Spawn

🔗

EffectSection

Patterns:
Since: 1.0, 2.6.1 (with section)
Spawn a creature. This can be used as an effect and as a section. 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.

Examples:

spawn 3 creepers at the targeted block
spawn a ghast 5 meters above the player
spawn a zombie at the player:
    set name of the zombie to ""
\ No newline at end of file diff --git a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/events.html b/docs/nightly/enhancement/merge-master-into-feature-attempt-2/events.html deleted file mode 100644 index 3fbad5eaec6..00000000000 --- a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/events.html +++ /dev/null @@ -1 +0,0 @@ - Skript Documentation - 2.8.0-dev-nightly-49c4fae

Events

Note:

You can specify the event priority after each event syntax using the following syntax [with priority (lowest|low|normal|high|highest|monitor)] e.g. on spawn with priority lowest.
Note that not all of the events support event priority feature and they will throw an error.

At Time

🔗

Event

Patterns:
Since: 1.3.4
An event that occurs at a given minecraft time in every world or only in specific worlds.

Examples:

at 18:00
at 7am in "world"

On Anvil Damage

🔗

Event

Patterns:
  • [on] anvil damag(e|ing)
Since: 2.7
Requirements: Paper
Called when an anvil is damaged/broken from being used to repair/rename items. Note: this does not include anvil damage from falling.

Examples:

on anvil damage:
    cancel the event

On Anvil Prepare

🔗

Event

Patterns:
  • [on] anvil prepar(e|ing)
Since: 2.7
Called when an item is put in a slot for repair by an anvil. Please note that this event is called multiple times in a single item slot move.

Examples:

on anvil prepare:
    event-item is set # result item
    chance of 5%:
        set repair cost to repair cost * 50%
        send "You're LUCKY! You got 50% discount." to player

On AoE Cloud Effect

🔗

Event

Patterns:
  • [on] (area|AoE) [cloud] effect
Since: 2.2-dev21
Called when area effect cloud applies its potion effect. This happens every 5 ticks by default.

Examples:

on area cloud effect:

On Arm Swing

🔗

Event

Patterns:
  • [on] [player] arm swing
Since: 2.5.1
Called when a player swings their arm.

Examples:

on arm swing:
    send "You swung your arm!"

On Armor Change

🔗

Event

Patterns:
  • [on] [player] armor change[d]
Since: 2.5
Requirements: Paper
Called when armor pieces of a player are changed.

Examples:

on armor change:
    send "You equipped %event-item%!"

On Bed Enter

🔗

Event

Patterns:
  • [on] bed enter[ing]
  • [on] [player] enter[ing] [a] bed
Since: 1.0
Called when a player starts sleeping.

Examples:

on bed enter:

On Bed Leave

🔗

Event

Patterns:
  • [on] bed leav(e|ing)
  • [on] [player] leav(e|ing) [a] bed
Since: 1.0
Called when a player leaves a bed.

Examples:

on player leaving a bed:

On Block Damage

🔗

Event

Patterns:
  • [on] block damag(ing|e)
Since: 1.0
Called when a player starts to break a block. You can usually just use the leftclick event for this.

Examples:

on block damaging:
    if block is log:
        send "You can't break the holy log!"

On Block Fertilize

🔗

Event

Patterns:
  • [on] [block] fertilize
Since: 2.5
Requirements: Minecraft 1.13 or newer
Called when a player fertilizes blocks.

Examples:

on block fertilize:
    send "Fertilized %size of fertilized blocks% blocks got fertilized."

On Block Growth

🔗

Event

Patterns:
  • [on] (plant|crop|block) grow[(th|ing)] [[of] %item types%]
Since: 2.2-Fixes-V10
Called when a crop grows. Alternative to new form of generic grow event.

Examples:

on crop growth:

On Book Edit

🔗

Event

Patterns:
  • [on] book (edit|change|write)
Since: 2.2-dev31
Called when a player edits a book.

Examples:

on book edit:

On Book Sign

🔗

Event

Patterns:
  • [on] book sign[ing]
Since: 2.2-dev31
Called when a player signs a book.

Examples:

on book sign:

On Break / Mine

🔗

Event

Patterns:
Since: 1.0 (break), unknown (mine), 2.6 (BlockData support)
Called when a block is broken by a player. If you use 'on mine', only events where the broken block dropped something will call the trigger.

Examples:

on mine:
on break of stone:
on mine of any ore:
on break of chest[facing=north]:
on break of potatoes[age=7]:

On Bucket Empty

🔗

Event

Patterns:
  • [on] bucket empty[ing]
  • [on] [player] empty[ing] [a] bucket
Since: 1.0
Called when a player empties a bucket. You can also use the place event with a check for water or lava.

Examples:

on bucket empty:

On Bucket fill

🔗

Event

Patterns:
  • [on] bucket fill[ing]
  • [on] [player] fill[ing] [a] bucket
Since: 1.0
Called when a player fills a bucket.

Examples:

on player filling a bucket:

On Burn

🔗

Event

Patterns:
Since: 1.0, 2.6 (BlockData support)
Called when a block is destroyed by fire.

Examples:

on burn:
on burn of wood, fences, or chests:
on burn of oak_log[axis=y]:

On Can Build Check

🔗

Event

Patterns:
  • [on] [block] can build check
Since: 1.0 (basic), 2.0 ([un]cancellable)
Called when a player rightclicks on a block while holding a block or a placeable item. You can either cancel the event to prevent the block from being built, or uncancel it to allow it. Please note that the data value of the block to be placed is not available in this event, only its ID.

Examples:

on block can build check:
    cancel event

On Chat

🔗

Event

Patterns:
  • [on] chat
Since: 1.4.1
Called whenever a player chats. Use chat format to change message format. Use chat recipients to edit chat recipients.

Examples:

on chat:
    if player has permission "owner":
        set chat format to "&amp;amp;amp;lt;red&amp;amp;amp;gt;[player]&amp;amp;amp;lt;light gray&amp;amp;amp;gt;: &amp;amp;amp;lt;light red&amp;amp;amp;gt;[message]"
    else if player has permission "admin":
        set chat format to "&amp;amp;amp;lt;light red&amp;amp;amp;gt;[player]&amp;amp;amp;lt;light gray&amp;amp;amp;gt;: &amp;amp;amp;lt;orange&amp;amp;amp;gt;[message]"
    else: #default message format
        set chat format to "&amp;amp;amp;lt;orange&amp;amp;amp;gt;[player]&amp;amp;amp;lt;light gray&amp;amp;amp;gt;: &amp;amp;amp;lt;white&amp;amp;amp;gt;[message]"

On Chunk Generate

🔗

Event

Patterns:
  • [on] chunk (generat|populat)(e|ing)
Since: 1.0
Called after a new chunk was generated.

Examples:

on chunk generate:

On Chunk Load

🔗

Event

Patterns:
  • [on] chunk load[ing]
Since: 1.0
Called when a chunk loads. The chunk might or might not contain mobs when it's loaded.

Examples:

on chunk load:

On Chunk Unload

🔗

Event

Patterns:
  • [on] chunk unload[ing]
Since: 1.0
Called when a chunk is unloaded due to not being near any player.

Examples:

on chunk unload:

On Click

🔗

Event

Patterns:
Since: 1.0
Called when a user clicks on a block, an entity or air with or without an item in their hand. Please note that rightclick events with an empty hand while not looking at a block are not sent to the server, so there's no way to detect them. Also note that a leftclick on an entity is an attack and thus not covered by the 'click' event, but the 'damage' event.

Examples:

on click:
on rightclick holding a fishing rod:
on leftclick on a stone or obsidian:
on rightclick on a creeper:
on click with a sword:

On Combust

🔗

Event

Patterns:
  • [on] combust[ing]
Since: 1.0
Called when an entity is set on fire, e.g. by fire or lava, a fireball, or by standing in direct sunlight (zombies, skeletons).

Examples:

on combust:

On Command

🔗

Event

Patterns:
  • [on] command [%text%]
Since: 2.0
Called when a player enters a command (not necessarily a Skript command) but you can check if command is a skript command, see Is a Skript command condition.

Examples:

on command:
on command "/stop":
on command "pm Njol ":

On Connect

🔗

Event

Patterns:
  • [on] [player] connect[ing]
Since: 2.0
Called when the player connects to the server. This event is called before the player actually joins the server, so if you want to prevent players from joining you should prefer this event over on join.

Examples:

on connect:
    player doesn't have permission "VIP"
    number of players is greater than 15
    kick the player due to "The last 5 slots are reserved for VIP players."

On Consume

🔗

Event

Patterns:
  • [on] [player] ((eat|drink)[ing]|consum(e|ing)) [[of] %item types%]
Since: 2.0
Called when a player is done eating/drinking something, e.g. an apple, bread, meat, milk or a potion.

Examples:

on consume:

On Craft

🔗

Event

Patterns:
Since: unknown (before 2.1)
Called when a player crafts an item.

Examples:

on craft:

On Creeper Power

🔗

Event

Patterns:
  • [on] creeper power
Since: 1.0
Called when a creeper is struck by lighting and gets powered. Cancel the event to prevent the creeper from being powered.

Examples:

on creeper power:

On Damage

🔗

Event

Patterns:
Since: 1.0, 2.7 (by entity)
Called when an entity receives damage, e.g. by an attack from another entity, lava, fire, drowning, fall, suffocation, etc.

Examples:

on damage:
on damage of a player:
on damage of player by zombie:

On Death

🔗

Event

Patterns:
Since: 1.0
Called when a living entity (including players) dies.

Examples:

on death:
on death of player:
on death of a wither or ender dragon:
    broadcast "A %entity% has been slain in %world%!"

On Dispense

🔗

Event

Patterns:
Since: unknown (before 2.1)
Called when a dispenser dispenses an item.

Examples:

on dispense of iron block:
    send "that'd be 19.99 please!"

On Drop

🔗

Event

Patterns:
  • [on] [player|entity] drop[ping] [[of] %item types%]
Since: unknown (before 2.1), 2.7 (entity)
Called when a player drops an item from their inventory, or an entity drops an item, such as a chicken laying an egg.

Examples:

on drop:
    if event-item is compass:
        cancel event

on entity drop of an egg:
    if event-entity is a chicken:
        set item of event-dropped item to a diamond

On Egg Throw

🔗

Event

Patterns:
  • [on] throw[ing] [of] [an] egg
  • [on] [player] egg throw
Since: 1.0
Called when a player throws an egg and it lands. You can just use the shoot event in most cases. However, this event allows modification of properties like the hatched entity type and the number of entities to hatch.

Examples:

on throw of an egg:

On Enchant

🔗

Event

Patterns:
  • [on] [item] enchant
Since: 2.5
Called when a player successfully enchants an item. To get the enchanted item, see the enchant item expression

Examples:

on enchant:
    if the clicked button is 1: # offer 1
        set the applied enchantments to sharpness 10 and unbreaking 10

On Enchant Prepare

🔗

Event

Patterns:
  • [on] [item] enchant prepare
Since: 2.5
Called when a player puts an item into enchantment table. This event may be called multiple times. To get the enchant item, see the enchant item expression

Examples:

on enchant prepare:
    set enchant offer 1 to sharpness 1
    set the cost of enchant offer 1 to 10 levels

On Enderman/Sheep/Silverfish/Falling Block

🔗

Event

Patterns:
  • [on] enderman place
  • [on] enderman pickup
  • [on] sheep eat
  • [on] silverfish enter
  • [on] silverfish exit
  • [on] falling block fall[ing]
  • [on] falling block land[ing]
  • [on] (entity|%*-entitydatas%) chang(e|ing) block[s]
Since: unknown, 2.5.2 (falling block), INSERT VERSION (any entity support)
Called when an enderman places or picks up a block, a sheep eats grass, a silverfish boops into/out of a block or a falling block lands and turns into a block respectively. event-block represents the old block and event-blockdata represents the new replacement that'll be applied to the block.

Examples:

on sheep eat:
    kill event-entity
    broadcast "A sheep stole some grass!"

on falling block land:
    event-entity is a falling dirt
    cancel event

On Entity Dismount

🔗

Event

Patterns:
  • [on] dismount[ing]
Since: 2.2-dev13b
Called when an entity dismounts.

Examples:

on dismount:
    kill event-entity

On Entity Jump

🔗

Event

Patterns:
  • [on] entity jump[ing]
Since: 2.7
Requirements: Paper 1.15.2+
Called when an entity jumps.

Examples:

on entity jump:
    if entity is a wither skeleton:
        cancel event

On Entity Mount

🔗

Event

Patterns:
  • [on] mount[ing]
Since: 2.2-dev13b
Called when entity starts riding another.

Examples:

on mount:
    cancel event

On Entity Portal

🔗

Event

Patterns:
  • [on] entity portal
Since: 2.5.3
Called when an entity uses a nether or end portal. Cancel the event to prevent the entity from teleporting.

Examples:

on entity portal:
    broadcast "A %type of event-entity% has entered a portal!

On Experience Change

🔗

Event

Patterns:
  • [on] [player] (level progress|[e]xp|experience) (change|update|increase|decrease)
Since: 2.7
Called when a player's experience changes.

Examples:

on level progress change:
    set {_xp} to event-experience
    broadcast "%{_xp}%"

On Experience Spawn

🔗

Event

Patterns:
  • [on] [e]xp[erience] [orb] spawn
  • [on] spawn of [a[n]] [e]xp[erience] [orb]
Since: 2.0
Called whenever experience is about to spawn. Please note that this event will not fire for xp orbs spawned by plugins (including Skript) with Bukkit.

Examples:

on xp spawn:
    world is "minigame_world"
    cancel event

On Explode

🔗

Event

Patterns:
  • [on] explo(d(e|ing)|sion)
Since: 1.0
Called when an entity (a primed TNT or a creeper) explodes.

Examples:

on explosion:

On Explosion Prime

🔗

Event

Patterns:
  • [on] explosion prime
Since: 1.0
Called when an explosive is primed, i.e. an entity will explode shortly. Creepers can abort the explosion if the player gets too far away, while TNT will explode for sure after a short time.

Examples:

on explosion prime:

On Fade

🔗

Event

Patterns:
Since: 1.0, 2.6 (BlockData support)
Called when a block 'fades away', e.g. ice or snow melts.

Examples:

on fade of snow or ice:
on fade of snow[layers=2]

On Firework Explode

🔗

Event

Patterns:
  • [on] [a] firework explo(d(e|ing)|sion) [colo[u]red %colors%]
Since: 2.4
Called when a firework explodes.

Examples:

on firework explode
on firework exploding colored red, light green and black
on firework explosion colored light green:
    broadcast "A firework colored %colors% was exploded at %location%!"

On First Join

🔗

Event

Patterns:
  • [on] first (join|login)
Since: 1.3.7
Called when a player joins the server for the first time.

Examples:

on first join:
    broadcast "Welcome %player% to the server!"

On Fishing

🔗

Event

Patterns:
  • [on] [player] fish[ing]
Since: 1.0
Called when a player fishes something. This is not of much use yet.

Examples:

on fish:

On Flight Toggle

🔗

Event

Patterns:
  • [on] [player] flight toggl(e|ing)
  • [on] [player] toggl(e|ing) flight
Since: 2.2-dev36
Called when a players stops/starts flying.

Examples:

on flight toggle:
    if {game::%player%::playing} exists:
        cancel event

On Flow

🔗

Event

Patterns:
  • [on] [block] flow[ing]
  • [on] block mov(e|ing)
Since: 1.0
Called when a blocks flows or teleports to another block. This not only applies to water and lava, but teleporting dragon eggs as well.

Examples:

on block flow:
    if event-block is water:
        broadcast "Build more dams! It's starting to get wet in here"

On Form

🔗

Event

Patterns:
Since: 1.0, 2.6 (BlockData support)
Called when a block is created, but not by a player, e.g. snow forms due to snowfall, water freezes in cold biomes. This isn't called when block spreads (mushroom growth, water physics etc.), as it has its own event (see spread event).

Examples:

on form of snow:
on form of a mushroom:

On Fuel Burn

🔗

Event

Patterns:
  • [on] fuel burn[ing]
Since: 1.0
Called when a furnace burns an item from its fuel slot.

Examples:

on fuel burning:

On Gamemode Change

🔗

Event

Patterns:
  • [on] game[ ]mode change [to %gamemode%]
Since: 1.0
Called when a player's gamemode changes.

Examples:

on gamemode change:
on gamemode change to adventure:

On Gliding State Change

🔗

Event

Patterns:
  • [on] (gliding state change|toggl(e|ing) gliding)
Since: 2.2-dev21
Called when an entity toggles glider on or off, or when server toggles gliding state of an entity forcibly.

Examples:

on toggling gliding:
    cancel the event # bad idea, but you CAN do it!

On Grow

🔗

Event

Patterns:
Since: 1.0, 2.2-dev20 (plants), INSERT VERSION (from, into, blockdata)
Called when a tree, giant mushroom or plant grows to next stage. "of" matches any grow event, "from" matches only the old state, "into" matches only the new state,and "from into" requires matching both the old and new states. Using "and" lists in this event is equivalent to using "or" lists. The event will trigger if any one of the elements is what grew.

Examples:

on grow:
on grow of tree:
on grow of wheat[age=7]:
on grow from a sapling:
on grow into tree:
on grow from a sapling into tree:
on grow of wheat, carrots, or potatoes:
on grow into tree, giant mushroom, cactus:
on grow from wheat[age=0] to wheat[age=1] or wheat[age=2]:

On Hand Item Swap

🔗

Event

Patterns:
  • [on] swap[ping of] [(hand|held)] item[s]
Since: 2.3
Called whenever a player swaps the items in their main- and offhand slots. Works also when one or both of the slots are empty. The event is called before the items are actually swapped, so when you use the player's tool or player's offtool expressions, they will return the values before the swap - this enables you to cancel the event before anything happens.

Examples:

on swap hand items:
    event-player's tool is a diamond sword
    cancel event

On Heal

🔗

Event

Patterns:
  • [on] heal[ing]
Since: 1.0
Called when an entity is healed, e.g. by eating (players), being fed (pets), or by the effect of a potion of healing (overworld mobs) or harm (nether mobs).

Examples:

on heal:

On Horse Jump

🔗

Event

Patterns:
  • [on] horse jump
Since: 2.5.1
Called when a horse jumps.

Examples:

on horse jump:
    push event-entity upwards at speed 2

On Hunger Meter Change

🔗

Event

Patterns:
  • [on] (food|hunger) (level|met(er|re)|bar) chang(e|ing)
Since: 1.4.4
Called when the hunger bar of a player changes, i.e. either increases by eating or decreases over time.

Examples:

on food bar change:

On Ignition

🔗

Event

Patterns:
  • [on] [block] ignit(e|ion)
Since: 1.0
Called when a block starts burning, i.e. a fire block is placed next to it and this block is flammable. The burn event will be called when the block is about do be destroyed by the fire.

Examples:

on block ignite:
    if event-block is a ladder:
        cancel event

On Inventory Click

🔗

Event

Patterns:
  • [on] [player] inventory(-| )click[ing] [[at] %item types%]
Since: 2.2-Fixes-V10
Called when clicking on inventory slot.

Examples:

on inventory click:
    if event-item is stone:
        give player 1 stone
        remove 20$ from player's balance

On Inventory Close

🔗

Event

Patterns:
  • [on] inventory clos(ing|e[d])
Since: 2.2-dev21
Called when player's currently viewed inventory is closed.

Examples:

on inventory close:
    if player's location is {location}:
        send "You exited the shop!"

On Inventory Drag

🔗

Event

Patterns:
  • [on] inventory drag[ging]
Since: 2.7
Called when a player drags an item in their cursor across the inventory.

Examples:

on inventory drag:
    if player's current inventory is {_gui}:
        send "You can't drag your items here!" to player
        cancel event

On Inventory Item Move

🔗

Event

Patterns:
  • [on] inventory item (move|transport)
Since: INSERT VERSION
Called when an entity or block (e.g. hopper) tries to move items directly from one inventory to another. When this event is called, the initiator may have already removed the item from the source inventory and is ready to move it into the destination inventory. If this event is cancelled, the items will be returned to the source inventory.

Examples:

on inventory item move:
    broadcast "%holder of past event-inventory% is transporting %event-item% to %holder of event-inventory%!"

On Inventory Open

🔗

Event

Patterns:
  • [on] inventory open[ed]
Since: 2.2-dev21
Called when an inventory is opened for player.

Examples:

on inventory open:
    close player's inventory

On Inventory Pickup

🔗

Event

Patterns:
  • [on] inventory pick[ ]up
Since: 2.5.1
Called when an inventory (a hopper, a hopper minecart, etc.) picks up an item

Examples:

on inventory pickup:

On Inventory Slot Change

🔗

Event

Patterns:
  • [on] [player] inventory slot chang(e|ing)
Since: 2.7
Requirements: Paper 1.19.2+
Called when a slot in a player's inventory is changed. Warning: setting the event-slot to a new item can result in an infinite loop.

Examples:

on inventory slot change:
    if event-item is a diamond:
        send "You obtained a diamond!" to player

On Item Break

🔗

Event

Patterns:
  • [on] [player] tool break[ing]
  • [on] [player] break[ing] [(a|the)] tool
Since: 2.1.1
Called when a player breaks their tool because its damage reached the maximum value. This event cannot be cancelled.

Examples:

on tool break:

On Item Damage

🔗

Event

Patterns:
  • [on] item damag(e|ing)
Since: 2.5
Called when an item is damaged. Most tools are damaged by using them; armor is damaged when the wearer takes damage.

Examples:

on item damage:
    cancel event

On Item Despawn

🔗

Event

Patterns:
  • [on] (item[ ][stack]|[item] %item types%) despawn[ing]
  • [on] [item[ ][stack]] despawn[ing] [[of] %item types%]
Since: 2.2-dev35
Called when an item is about to be despawned from the world, usually 5 minutes after it was dropped.

Examples:

on item despawn of diamond:
    send "Not my precious!"
    cancel event

On Item Mend

🔗

Event

Patterns:
  • [on] item mend[ing]
Since: 2.5.1
Requirements: Minecraft 1.13 or newer
Called when a player has an item repaired via the Mending enchantment.

Examples:

on item mend:
    chance of 50%:
        cancel the event
        send "Oops! Mending failed!" to player

On Item Merge

🔗

Event

Patterns:
  • [on] (item[ ][stack]|[item] %item types%) merg(e|ing)
  • [on] item[ ][stack] merg(e|ing) [[of] %item types%]
Since: 2.2-dev35
Called when dropped items merge into a single stack. event-entity will be the entity which is trying to merge, and future event-entity will be the entity which is being merged into.

Examples:

on item merge of gold blocks:
    cancel event

On Item Spawn

🔗

Event

Patterns:
Since: unknown (before 2.1)
Called whenever an item stack is spawned in a world, e.g. as drop of a block or mob, a player throwing items out of their inventory, or a dispenser dispensing an item (not shooting it).

Examples:

on item spawn of iron sword:
    broadcast "Someone dropped an iron sword!"

On Join

🔗

Event

Patterns:
  • [on] [player] (login|logging in|join[ing])
Since: 1.0
Called when the player joins the server. The player is already in a world when this event is called, so if you want to prevent players from joining you should prefer on connect over this event.

Examples:

on join:
    message "Welcome on our awesome server!"
    broadcast "%player% just joined the server!"

On Jump

🔗

Event

Patterns:
  • [on] [player] jump[ing]
Since: 2.3
Called whenever a player jumps. This event requires PaperSpigot.

Examples:

on jump:
    event-player does not have permission "jump"
    cancel event

On Kick

🔗

Event

Patterns:
  • [on] [player] (kick|being kicked)
Since: 1.0
Called when a player is kicked from the server. You can change the kick message or cancel the event entirely.

Examples:

on kick:

On Language Change

🔗

Event

Patterns:
  • [on] [player] (language|locale) chang(e|ing)
  • [on] [player] chang(e|ing) (language|locale)
Since: 2.3
Called after a player changed their language in the game settings. You can use the language expression to get the current language of the player. This event requires Minecraft 1.12+.

Examples:

on language change:
    if player's language starts with "en":
        send "Hello!"

On Leaves Decay

🔗

Event

Patterns:
  • [on] leaves decay[ing]
Since: 1.0
Called when a leaf block decays due to not being connected to a tree.

Examples:

on leaves decay:

On Level Change

🔗

Event

Patterns:
  • [on] [player] level (change|up|down)
Since: 1.0, 2.4 (level up/down)
Called when a player's level changes, e.g. by gathering experience or by enchanting something.

Examples:

on level change:

On Lightning Strike

🔗

Event

Patterns:
  • [on] lightning [strike]
Since: 1.0
Called when lightning strikes.

Examples:

on lightning:
    spawn a zombie at location of event-entity

On Loot Generate

🔗

Event

Patterns:
  • [on] loot generat(e|ing)
Since: 2.7
Requirements: MC 1.16+
Called when a loot table of an inventory is generated in the world. For example, when opening a shipwreck chest.

Examples:

on loot generate:
    chance of 10%
    add 64 diamonds to the loot
    send "You hit the jackpot at %event-location%!"

On Move / Rotate

🔗

Event

Patterns:
  • [on] %entity type% (move|walk|step|(turn[ing] around|rotate))
  • [on] %entity type% (move|walk|step) or (turn[ing] around|rotate)
  • [on] %entity type% (turn[ing] around|rotate) or (move|walk|step)
Since: 2.6, INSERT VERSION (turn around)
Requirements: Paper 1.16.5+ (entity move)
Called when a player or entity moves or rotates their head. NOTE: Move event will only be called when the entity/player moves position, keyword 'turn around' is for orientation (ie: looking around), and the combined syntax listens for both. NOTE: These events can be performance heavy as they are called quite often.

Examples:

on player move:
    if player does not have permission "player.can.move":
        cancel event
on skeleton move:
    if event-entity is not in world "world":
        kill event-entity
on player turning around:
send action bar "You are currently turning your head around!" to player

On Move On

🔗

Event

Patterns:
Since: 2.0
Called when a player moves onto a certain type of block. Please note that using this event can cause lag if there are many players online.

Examples:

on walking on dirt or grass:
on stepping on stone:

On Physics

🔗

Event

Patterns:
  • [on] [block] physics
Since: 1.4.6
Called when a physics check is done on a block. By cancelling this event you can prevent some things from happening, e.g. sand falling, dirt turning into grass, torches dropping if their supporting block is destroyed, etc.Please note that using this event might cause quite some lag since it gets called extremely often.

Examples:

# prevents sand from falling
on block physics:
    block is sand
    cancel event

On Pick Up

🔗

Event

Patterns:
  • [on] [(player|entity)] (pick[ ]up|picking up) [[of] %item types%]
Since: unknown (before 2.1), 2.5 (entity)
Called when a player/entity picks up an item. Please note that the item is still on the ground when this event is called.

Examples:

on pick up:
on entity pickup of wheat:

On Pig Zap

🔗

Event

Patterns:
  • [on] pig[ ]zap
Since: 1.0
Called when a pig is stroke by lightning and transformed into a zombie pigman. Cancel the event to prevent the transformation.

Examples:

on pig zap:

On Piston Extend

🔗

Event

Patterns:
  • [on] piston extend[ing]
Since: 1.0
Called when a piston is about to extend.

Examples:

on piston extend:
    broadcast "A piston is extending!"

On Piston Retract

🔗

Event

Patterns:
  • [on] piston retract[ing]
Since: 1.0
Called when a piston is about to retract.

Examples:

on piston retract:
    broadcast "A piston is retracting!"

On Place

🔗

Event

Patterns:
Since: 1.0, 2.6 (BlockData support)
Called when a player places a block.

Examples:

on place:
on place of a furnace, workbench or chest:
on break of chest[type=right] or chest[type=left]

On Player Chunk Enter

🔗

Event

Patterns:
  • [on] [player] (enter[s] [a] chunk|chunk enter[ing])
Since: 2.7
Called when a player enters a chunk. Note that this event is based on 'player move' event, and may be called frequent internally.

Examples:

on player enters a chunk:
    send "You entered a chunk: %past event-chunk% -&amp;amp;gt; %event-chunk%!" to player

On Player Deep Sleep

🔗

Event

Patterns:
  • [on] [player] deep sleep[ing]
Since: 2.7
Requirements: Paper 1.16+
Called when a player has slept long enough to count as passing the night/storm. Cancelling this event will prevent the player from being counted as deeply sleeping unless they exit and re-enter the bed.

Examples:

on player deep sleeping:
    send "Zzzz.." to player

On Player Pickup Arrow

🔗

Event

Patterns:
  • [on] [player] (pick[ing| ]up [an] arrow|arrow pick[ing| ]up)
Since: INSERT VERSION
Requirements: Minecraft 1.14+ (event-projectile)
Called when a player picks up an arrow from the ground.

Examples:

on arrow pickup:
    cancel the event
    teleport event-projectile to block 5 above event-projectile

On Player Trade

🔗

Event

Patterns:
  • [on] player trad(e|ing)
Since: 2.7
Requirements: Paper 1.16.5+
Called when a player has traded with a villager.

Examples:

on player trade:
    chance of 50%:
        cancel event
        send "The trade was somehow denied!" to player

On Player World Change

🔗

Event

Patterns:
  • [on] [player] world chang(ing|e[d])
Since: 2.2-dev28
Called when a player enters a world. Does not work with other entities!

Examples:

on player world change:
    world is "city"
    send "Welcome to the City!"

On Portal

🔗

Event

Patterns:
  • [on] [player] portal
Since: 1.0
Called when a player uses a nether or end portal. Cancel the event to prevent the player from teleporting.

Examples:

on player portal:

On Portal Create

🔗

Event

Patterns:
  • [on] portal creat(e|ion)
Since: 1.0, 2.5.3 (event-entity support)
Requirements: Minecraft 1.14+ (event-entity support)
Called when a portal is created, either by a player or mob lighting an obsidian frame on fire, or by a nether portal creating its teleportation target in the nether/overworld. In Minecraft 1.14+, you can use the player in this event. Please note that there may not always be a player (or other entity) in this event.

Examples:

on portal create:

On Portal Enter

🔗

Event

Patterns:
  • [on] portal enter[ing]
  • [on] entering [a] portal
Since: 1.0
Called when an entity enters a nether portal or an end portal. Please note that this event will be fired many times for a nether portal.

Examples:

on portal enter:

On Prepare Craft

🔗

Event

Patterns:
  • [on] [player] (preparing|beginning) craft[ing] [[of] %item types%]
Since: 2.2-Fixes-V10
Called just before displaying crafting result to player. Note that setting the result item might or might not work due to Bukkit bugs.

Examples:

on preparing craft of torch:

On Pressure Plate / Trip

🔗

Event

Patterns:
  • [on] [step[ping] on] [a] [pressure] plate
  • [on] (trip|[step[ping] on] [a] tripwire)
Since: 1.0 (pressure plate), 1.4.4 (tripwire)
Called when a player steps on a pressure plate or tripwire respectively.

Examples:

on step on pressure plate:

On Projectile Collide

🔗

Event

Patterns:
  • [on] projectile collide
Since: 2.5
Requirements: Paper
Called when a projectile collides with an entity.

Examples:

on projectile collide:
    teleport shooter of event-projectile to event-entity

On Projectile Hit

🔗

Event

Patterns:
  • [on] projectile hit
Since: 1.0
Called when a projectile hits an entity or a block. Use the damage event with a check for a projectile to be able to use the entity that got hit in the case when the projectile hit a living entity. A damage event will even be fired if the damage is 0, e.g. when throwing snowballs at non-nether mobs.

Examples:

on projectile hit:
    event-projectile is arrow
    delete event-projectile

On Quit

🔗

Event

Patterns:
  • [on] (quit[ting]|disconnect[ing]|log[ ]out|logging out|leav(e|ing))
Since: 1.0 (simple disconnection)
Called when a player leaves the server.

Examples:

on quit:
on disconnect:

On Redstone

🔗

Event

Patterns:
  • [on] redstone [current] [chang(e|ing)]
Since: 1.0
Called when the redstone current of a block changes. This event is of not much use yet.

Examples:

on redstone change:
    send "someone is using redstone" to console

On Region Enter/Leave

🔗

Event

Patterns:
  • [on] (enter[ing]|leav(e|ing)|exit[ing]) [of] ([a] region|[[the] region] %regions%)
  • [on] region (enter[ing]|leav(e|ing)|exit[ing])
Since: 2.1
Requirements: Supported regions plugin
Called when a player enters or leaves a region. This event requires a supported regions plugin to be installed.

Examples:

on region exit:
    message "Leaving %region%."

On Resource Pack Request Response

🔗

Event

Patterns:
Since: 2.4
Called when a player takes action on a resource pack request sent via the send resource pack effect. The resource pack condition can be used to check the resource pack state.

This event will be triggered once when the player accepts or declines the resource pack request, and once when the resource pack is successfully installed or failed to download.

Examples:

on resource pack request response:
    if the resource pack was declined or failed to download:

on resource pack deny:
    kick the player due to "You have to install the resource pack to play in this server!"

On Respawn

🔗

Event

Patterns:
  • [on] [player] respawn[ing]
Since: 1.0
Called when a player respawns. You should prefer this event over the death event as the player is technically alive when this event is called.

Examples:

on respawn:

On Resurrect Attempt

🔗

Event

Patterns:
  • [on] [entity] resurrect[ion] [attempt]
Since: 2.2-dev28
Called when an entity dies, always. If they are not holding a totem, this is cancelled - you can, however, uncancel it.

Examples:

on resurrect attempt:
    entity is player
    entity has permission "admin.undying"
    uncancel the event

On Riptide

🔗

Event

Patterns:
  • [on] [use of] riptide [enchant[ment]]
Since: 2.5
Called when the player activates the riptide enchantment, using their trident to propel them through the air. Note: the riptide action is performed client side, so manipulating the player in this event may have undesired effects.

Examples:

on riptide:
    send "You are riptiding!"

On Script Load/Unload

🔗

Event

Patterns:
  • [on] [async] [script] (load|init|enable)
  • [on] [async] [script] (unload|stop|disable)
Since: 2.0
Called directly after the trigger is loaded, or directly before the whole script is unloaded. The keyword 'async' indicates the trigger can be ran asynchronously,

Examples:

on load:
    set {running::%script%} to true
on unload:
    set {running::%script%} to false

On Server List Ping

🔗

Event

Patterns:
  • [on] server [list] ping
Since: 2.3
Called when a server list ping is coming in, generally when a Minecraft client pings the server to show its information in the server list. The IP expression can be used to get the IP adress of the pinger. This event can be cancelled on PaperSpigot 1.12.2+ only and this means the player will see the server as offline (but still can join).

Also you can use MOTD, Max Players, Online Players Count, Protocol Version, Version String, Hover List and Server Icon expressions, and Player Info Visibility and Hide Player from Server List effects to modify the server list.

Examples:

on server list ping:
    set the motd to "Welcome %{player-by-IP::%ip%}%! Join now!" if {player-by-IP::%ip%} is set, else "Join now!"
    set the fake max players count to (online players count + 1)
    set the shown icon to a random server icon out of {server-icons::*}

On Server Start/Stop

🔗

Event

Patterns:
  • [on] (server|skript) (start|load|enable)
  • [on] (server|skript) (stop|unload|disable)
Since: 2.0
Called when the server starts or stops (actually, when Skript starts or stops, so a /reload will trigger these events as well).

Examples:

on skript start:
on server stop:

On Sheep Regrow Wool

🔗

Event

Patterns:
  • [on] sheep [re]grow[ing] wool
Since: 2.2-dev21
Called when sheep regrows its sheared wool back.

Examples:

on sheep grow wool:
    cancel event

On Shoot

🔗

Event

Patterns:
  • [on] [projectile] shoot
Since: 1.0
Called whenever a projectile is shot. Use the shooter expression to get who shot the projectile.

Examples:

on shoot:
    if projectile is an arrow:
        send "you shot an arrow!" to shooter

On Sign Change

🔗

Event

Patterns:
  • [on] sign (chang[e]|edit)[ing]
  • [on] [player] (chang[e]|edit)[ing] [a] sign
Since: 1.0
As signs are placed empty, this event is called when a player is done editing a sign.

Examples:

on sign change:
    line 2 is empty
    set line 1 to "&amp;amp;amp;lt;red&amp;amp;amp;gt;%line 1%"

On Slime Split

🔗

Event

Patterns:
  • [on] slime split[ting]
Since: 2.2-dev26
Called when a slime splits. Usually this happens when a big slime dies.

Examples:

on slime split:

On Smelt

🔗

Event

Patterns:
  • [on] [ore] smelt[ing]
  • [on] smelt[ing] of ore
Since: 1.0
Called when a furnace smelts an item in its ore slot.

Examples:

on smelt:

On Sneak Toggle

🔗

Event

Patterns:
  • [on] [player] toggl(e|ing) sneak
  • [on] [player] sneak toggl(e|ing)
Since: 1.0
Called when a player starts or stops sneaking. Use is sneaking to get whether the player was sneaking before the event was called.

Examples:

# make players that stop sneaking jump
on sneak toggle:
    player is sneaking
    push the player upwards at speed 0.5

On Spawn

🔗

Event

Patterns:
Since: 1.0, 2.5.1 (non-living entities)
Called when an entity spawns (excluding players).

Examples:

on spawn of a zombie:
on spawn of an ender dragon:
    broadcast "A dragon has been sighted in %world%!"

On Spawn Change

🔗

Event

Patterns:
  • [on] [world] spawn change
Since: 1.0
Called when the spawn point of a world changes.

Examples:

on spawn change:
    broadcast "someone changed the spawn!"

On Spectate

🔗

Event

Patterns:
Since: 2.7
Requirements: Paper
Called with a player starts, stops or swaps spectating an entity.

Examples:

on player start spectating of a zombie:

On Sponge Absorb

🔗

Event

Patterns:
  • [on] sponge absorb
Since: 2.5
Requirements: Minecraft 1.13 or newer
Called when a sponge absorbs blocks.

Examples:

on sponge absorb:
    loop absorbed blocks:
        broadcast "%loop-block% was absorbed by a sponge"!

On Spread

🔗

Event

Patterns:
  • [on] spread[ing]
Since: 1.0
Called when a new block forms as a result of a block that can spread, e.g. water or mushrooms.

Examples:

on spread:

On Sprint Toggle

🔗

Event

Patterns:
  • [on] [player] toggl(e|ing) sprint
  • [on] [player] sprint toggl(e|ing)
Since: 1.0
Called when a player starts or stops sprinting. Use is sprinting to get whether the player was sprinting before the event was called.

Examples:

on sprint toggle:
    player is not sprinting
    send "Run!"

On Stonecutter Recipe Select

🔗

Event

Patterns:
Since: INSERT VERSION
Requirements: Paper 1.16+
Called when a player selects a recipe in a stonecutter.

Examples:

on stonecutting stone slabs
    cancel the event

on stonecutting:
    broadcast "%player% is using stonecutter to craft %event-item%!"

On Swim Toggle

🔗

Event

Patterns:
  • [on] [entity] toggl(e|ing) swim
  • [on] [entity] swim toggl(e|ing)
Since: 2.3
Requirements: 1.13 or newer
Called when an entity swims or stops swimming.

Examples:

on swim toggle:
    event-entity does not have permission "swim"
    cancel event

On Tame

🔗

Event

Patterns:
  • [on] [entity] tam(e|ing)
Since: 1.0
Called when a player tames a wolf or ocelot. Can be cancelled to prevent the entity from being tamed.

Examples:

on tame:

On Target

🔗

Event

Patterns:
  • [on] [entity] target
  • [on] [entity] un[-]target
Since: 1.0
Called when a mob starts/stops following/attacking another entity, usually a player.

Examples:

on entity target:
    target is a player

On Teleport

🔗

Event

Patterns:
  • [on] [player] teleport[ing]
Since: 1.0
Called whenever a player is teleported, either by a nether/end portal or other means (e.g. by plugins).

Examples:

on teleport:

On Tool Change

🔗

Event

Patterns:
  • [on] [player['s]] (tool|item held|held item) chang(e|ing)
Since: 1.0
Called whenever a player changes their held item by selecting a different slot (e.g. the keys 1-9 or the mouse wheel), not by dropping or replacing the item in the current slot.

Examples:

on player's held item change:

On Vehicle Create

🔗

Event

Patterns:
  • [on] vehicle create
  • [on] creat(e|ing|ion of) [a] vehicle
Since: 1.0
Called when a new vehicle is created, e.g. when a player places a boat or minecart.

Examples:

on vehicle create:

On Vehicle Damage

🔗

Event

Patterns:
  • [on] vehicle damage
  • [on] damag(e|ing) [a] vehicle
Since: 1.0
Called when a vehicle gets damage. Too much damage will destroy the vehicle.

Examples:

on vehicle damage:

On Vehicle Destroy

🔗

Event

Patterns:
  • [on] vehicle destroy
  • [on] destr(oy[ing]|uction of) [a] vehicle
Since: 1.0
Called when a vehicle is destroyed. Any passenger will be ejected and the vehicle might drop some item(s).

Examples:

on vehicle destroy:
    cancel event

On Vehicle Enter

🔗

Event

Patterns:
  • [on] vehicle enter
  • [on] enter[ing] [a] vehicle
Since: 1.0
Called when an entity enters a vehicle, either deliberately (players) or by falling into them (mobs).

Examples:

on vehicle enter:
    entity is a player
    cancel event

On Vehicle Exit

🔗

Event

Patterns:
  • [on] vehicle exit
  • [on] exit[ing] [a] vehicle
Since: 1.0
Called when an entity exits a vehicle.

Examples:

on vehicle exit:
    if event-entity is a spider:
        kill event-entity

On Weather Change

🔗

Event

Patterns:
Since: 1.0
Called when a world's weather changes.

Examples:

on weather change:
on weather change to sunny:

On World Init

🔗

Event

Patterns:
  • [on] world init[ialization]
Since: 1.0
Called when a world is initialised. As all default worlds are initialised before any scripts are loaded, this event is only called for newly created worlds. World management plugins might change the behaviour of this event though.

Examples:

on world init:

On World Load

🔗

Event

Patterns:
  • [on] world load[ing]
Since: 1.0
Called when a world is loaded. As with the world init event, this event will not be called for the server's default world(s).

Examples:

on world load:
    send "World is loading..." to console

On World Save

🔗

Event

Patterns:
  • [on] world sav(e|ing)
Since: 1.0
Called when a world is saved to disk. Usually all worlds are saved simultaneously, but world management plugins could change this.

Examples:

on world saving:
    broadcast "World has been saved!"

On World Unload

🔗

Event

Patterns:
  • [on] world unload[ing]
Since: 1.0
Called when a world is unloaded. This event might never be called if you don't have a world management plugin.

Examples:

on world unload:
    cancel event

On Zombie Break Door

🔗

Event

Patterns:
  • [on] zombie break[ing] [a] [wood[en]] door
Since: 1.0
Called when a zombie is done breaking a wooden door. Can be cancelled to prevent the zombie from breaking the door.

Examples:

on zombie breaking a wood door:

Periodical

🔗

Event

Patterns:
Since: 1.0
An event that is called periodically.

Examples:

every 2 seconds:
every minecraft hour:
every tick: # can cause lag depending on the code inside the event
every minecraft days:

Periodical

🔗

Event

Patterns:
Since: 1.0
An event that is called periodically.

Examples:

every 2 seconds in "world":
every minecraft hour in "flatworld":
every tick in "world": # can cause lag depending on the code inside the event
every minecraft days in "plots":
\ No newline at end of file diff --git a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/expressions.html b/docs/nightly/enhancement/merge-master-into-feature-attempt-2/expressions.html deleted file mode 100644 index cc88ec3d0ef..00000000000 --- a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/expressions.html +++ /dev/null @@ -1 +0,0 @@ - Skript Documentation - 2.8.0-dev-nightly-49c4fae

Expressions

Absorbed blocks

🔗

Expression

Patterns:
  • [the] absorbed blocks
Since: 2.5
Usable in events: sponge absorb
Return Type: Block
The blocks absorbed by a sponge block.

Examples:

the absorbed blocks

Affected Entities

🔗

Expression

Patterns:
  • [the] affected entities
Since: 2.4
Return Type: Living Entity
The affected entities in the area cloud effect event.

Examples:

on area cloud effect:
    loop affected entities:
        if loop-value is a player:
            send "WARNING: you've step on an area effect cloud!" to loop-value

Age of Block/Entity

🔗

Expression

Patterns:
Since: 2.7
Return Type: integer
Returns the age or maximum age of blocks and age for entities (there in no maximum age for entities). For blocks, 'Age' represents the different growth stages that a crop-like block can go through. A value of 0 indicates that the crop was freshly planted, whilst a value equal to 'maximum age' indicates that the crop is ripe and ready to be harvested. For entities, 'Age' represents the time left for them to become adults and it's in minus increasing to be 0 which means they're adults, e.g. A baby cow needs 20 minutes to become an adult which equals to 24,000 ticks so their age will be -24000 once spawned.

Examples:

# Set targeted crop to fully grown crop
set age of targeted block to maximum age of targeted block

# Spawn a baby cow that will only need 1 minute to become an adult
spawn a baby cow at player
set age of last spawned entity to -1200 # in ticks = 60 seconds

All Banned Players/IPs

🔗

Expression

Patterns:
  • [all [[of] the]|the] banned (players|(ips|ip addresses))
Since: 2.7
Return Type: Object
Obtains the list of all banned players or IP addresses.

Examples:

command /banlist:
    trigger:
        send all the banned players

All Groups

🔗

Expression

Patterns:
  • all groups
Since: 2.2-dev35
Requirements: Vault, a permission plugin that supports Vault
Return Type: Text
All the groups a player can have. This expression requires Vault and a compatible permissions plugin to be installed.

Examples:

command /group &lt;text&gt;:
    trigger:
        if argument is "list":
            send "%all groups%"

All Operators

🔗

Expression

Patterns:
  • [all [[of] the]|the] [server] [non(-| )]op[erator]s
Since: 2.7
Return Type: Offline Player
The list of operators on the server.

Examples:

set {_ops::*} to all operators

All Permissions

🔗

Expression

Patterns:
  • [(all [[of] the]|the)] permissions (from|of) %players%
  • [(all [[of] the]|the)] %players%'[s] permissions
Since: 2.2-dev33
Return Type: Text
Returns all permissions of the defined player(s). Note that the modifications to resulting list do not actually change permissions.

Examples:

set {_permissions::*} to all permissions of the player

All Scripts

🔗

Expression

Patterns:
  • [all [of the]] scripts [(without ([subdirectory] paths|parents))]
  • [all [of the]] (enabled|loaded) scripts [(without ([subdirectory] paths|parents))]
  • [all [of the]] (disabled|unloaded) scripts [(without ([subdirectory] paths|parents))]
Since: 2.5
Return Type: Text
Returns all of the scripts, or just the enabled or disabled ones.

Examples:

command /scripts:
    trigger:
        send "All Scripts: %scripts%" to player
        send "Loaded Scripts: %enabled scripts%" to player
        send "Unloaded Scripts: %disabled scripts%" to player

All commands

🔗

Expression

Patterns:
  • [(all|the|all [of] the)] [registered] [script] commands
Since: 2.6
Return Type: Text
Returns all registered commands or all script commands.

Examples:

send "Number of all commands: %size of all commands%"
send "Number of all script commands: %size of all script commands%"

Alphabetical Sort

🔗

Expression

Patterns:
  • alphabetically sorted %texts%
Since: 2.2-dev18b
Return Type: Text
Sorts given strings in alphabetical order.

Examples:

set {_list::*} to alphabetically sorted {_strings::*}

Altitude

🔗

Expression

Patterns:
Since: 1.4.3
Return Type: Number
Effectively an alias of 'y-coordinate of …', it represents the height of some object above bedrock.

Examples:

on damage:
    altitude of the attacker is higher than the altitude of the victim
    set damage to damage * 1.2

Amount

🔗

Expression

Patterns:
  • [the] (amount|number|size) of %objects%
  • [the] recursive (amount|number|size) of %objects%
Since: 1.0
Return Type: long
The amount of something. Please note that 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:

message "There are %number of all players% players online!"

Amount of Items

🔗

Expression

Patterns:
Since: 2.0
Return Type: long
Counts how many of a particular item type are in a given inventory.

Examples:

message "You have %number of ores in the player's inventory% ores in your inventory."

Anvil Repair Cost

🔗

Expression

Patterns:
  • [the] [anvil] [item] [max[imum]] repair cost [of %inventories%]
  • %inventories%'[s] [anvil] [item] [max[imum]] repair cost
Since: INSERT VERSION
Return Type: integer
Returns the experience cost (in levels) to complete the current repair or the maximum experience cost (in levels) to be allowed by the current repair. The default value of max cost set by vanilla Minecraft is 40.

Examples:

on inventory click:
    if {AnvilRepairSaleActive} = true:
        wait a tick # recommended, to avoid client bugs
        set anvil repair cost to anvil repair cost * 50%
        send "Anvil repair sale is ON!" to player

on inventory click:
    player have permission "anvil.repair.max.bypass"
    set max repair cost of event-inventory to 99999

Anvil Text Input

🔗

Expression

Patterns:
  • [the] anvil [inventory] (rename|text) input of %inventories%
  • %inventories%'[s] anvil [inventory] (rename|text) input
Since: 2.7
Return Type: Text
An expression to get the name to be applied to an item in an anvil inventory.

Examples:

on inventory click:
    type of event-inventory is anvil inventory
    if the anvil input text of the event-inventory is "FREE OP":
        ban player

Applied Enchantments

🔗

Expression

Patterns:
  • [the] applied enchant[ment]s
Since: 2.5
Usable in events: enchant
Return Type: Enchantment Type
The applied enchantments in an enchant event. Deleting or removing the applied enchantments will prevent the item's enchantment.

Examples:

on enchant:
    set the applied enchantments to sharpness 10 and fire aspect 5

Argument

🔗

Expression

Patterns:
  • [the] last arg[ument]
  • [the] arg[ument](-| )<(\d+)>
  • [the] <(\d*1)st|(\d*2)nd|(\d*3)rd|(\d*[4-90])th> arg[ument][s]
  • [(all [[of] the]|the)] arg[ument][s]
  • [the] %*type%( |-)arg[ument][( |-)<\d+>]
  • [the] arg[ument]( |-)%*type%[( |-)<\d+>]
Since: 1.0, 2.7 (support for command events)
Return Type: Object
Usable in script commands and command events. Holds the value of an argument given to the command, e.g. if the command "/tell <player> <text>" is used like "/tell Njol Hello Njol!" argument 1 is the player named "Njol" and argument 2 is "Hello Njol!". One can also use the type of the argument instead of its index to address the argument, e.g. in the above example 'player-argument' is the same as 'argument 1'. Please note that specifying the argument type is only supported in script commands.

Examples:

give the item-argument to the player-argument
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

🔗

Expression

Patterns:
Since: 1.4.2
Return Type: Number
Arithmetic expressions, e.g. 1 + 2, (health of player - 2) / 3, etc.

Examples:

set the player's health to 10 - the player's health
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

🔗

Expression

Patterns:
  • [the] ((boots|shoes|leg[ging]s|chestplate[s]|helmet[s]) [(item|slot)]|armo[u]r[s]) of %living entities%
  • %living entities%'[s] ((boots|shoes|leg[ging]s|chestplate[s]|helmet[s]) [(item|slot)]|armo[u]r[s])
Since: 1.0, INSERT VERSION (Armour)
Return Type: Slot
Equipment of living entities, i.e. the boots, leggings, chestplate or helmet.

Examples:

set chestplate of the player to a diamond chestplate
helmet of player is neither a helmet nor air # player is wearing a block, e.g. from another plugin

Arrow Attached Block

🔗

Expression

Patterns:
Since: INSERT VERSION
Return Type: Block
Returns the attached block of an arrow.

Examples:

set hit block of last shot arrow to diamond block

Arrow Knockback Strength

🔗

Expression

Patterns:
Since: 2.5.1
Return Type: long
An arrow's knockback strength.

Examples:

on shoot:
    event-projectile is an arrow
    set arrow knockback strength of event-projectile to 10

Arrows Stuck

🔗

Expression

Patterns:
Since: 2.5
Return Type: long
The number of arrows stuck in a living entity.

Examples:

set arrows stuck in player to 5

Attack Cooldown

🔗

Expression

Patterns:
Since: 2.6.1
Requirements: Minecraft 1.15+
Return Type: float
Returns the current cooldown for a player's attack. This is used to calculate damage, with 1.0 representing a fully charged attack and 0.0 representing a non-charged attack. NOTE: Currently this can not be set to anything.

Examples:

on damage:
    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

🔗

Expression

Patterns:
  • [the] (attacked|damaged|victim) [<(.+)>]
Since: 1.3, 2.6.1 (projectile hit event)
Usable in events: damage, death, projectile hit
Return Type: Entity
The victim of a damage event, e.g. when a player attacks a zombie this expression represents the zombie. When using Minecraft 1.11+, this also covers the hit entity in a projectile hit event.

Examples:

on damage:
    victim is a creeper
    damage the attacked by 1 heart

Attacker

🔗

Expression

Patterns:
  • [the] (attacker|damager)
Since: 1.3
Usable in events: damage, death, destroy
Return Type: Entity
The attacker of a damage event, e.g. when a player attacks a zombie this expression represents the player. Please note that the attacker can also be a block, e.g. a cactus or lava, but this expression will not be set in these cases.

Examples:

on damage:
    attacker is a player
    health of attacker is less than or equal to 2
    damage victim by 1 heart

Bed

🔗

Expression

Patterns:
  • [the] [((safe|valid)|(unsafe|invalid))] bed[s] [location[s]] of %offline players%
  • %offline players%'[s] [((safe|valid)|(unsafe|invalid))] bed[s] [location[s]]
Since: 2.0, 2.7 (offlineplayers, safe bed)
Return Type: Location
Returns the bed location of a player, i.e. the spawn point of a player if they ever slept in a bed and the bed still exists and is unobstructed however, you can set the unsafe bed location of players and they will respawn there even if it has been obstructed or doesn't exist anymore and that's the default behavior of this expression otherwise you will need to be specific i.e. safe bed location.

NOTE: Offline players can not have their bed location changed, only online players.

Examples:

if bed of player exists:
    teleport player the the player's bed
else:
    teleport the player to the world's spawn point

set the bed location of player to spawn location of world("world") # unsafe/invalid bed location
set the safe bed location of player to spawn location of world("world") # safe/valid bed location

Biome

🔗

Expression

Patterns:
Since: 1.4.4, 2.6.1 (3D biomes)
Return Type: Biome
The biome at a certain location. Please note that biomes are only defined for x/z-columns (i.e. the altitude (y-coordinate) doesn't matter), up until Minecraft 1.15.x. As of Minecraft 1.16, biomes are now 3D (per block vs column).

Examples:

# damage player in deserts constantly
every real minute:
    loop all players:
        biome at loop-player is desert
        damage the loop-player by 1

Block

🔗

Expression

Patterns:
  • [the] [event-]block
Since: 1.0
Return Type: Block
The block involved in the event, e.g. the clicked block or the placed block. Can optionally include a direction as well, e.g. 'block above' or 'block in front of the player'.

Examples:

block is ore
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

🔗

Expression

Patterns:
Since: 1.0
Return Type: Block
The block involved in the event, e.g. the clicked block or the placed block. Can optionally include a direction as well, e.g. 'block above' or 'block in front of the player'.

Examples:

block is ore
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 Break Speed

🔗

Expression

Patterns:
Since: 2.7
Requirements: 1.17+
Return Type: float
Gets the speed at which the given player would break this block, taking into account tools, potion effects, whether or not the player is in water, enchantments, etc. The returned value is the amount of progress made in breaking the block each tick. When the total breaking progress reaches 1.0, the block is broken. Note that the break speed can change in the course of breaking a block, e.g. if a potion effect is applied or expires, or the player jumps/enters water.

Examples:

on left click using diamond pickaxe:
    event-block is set
    send "Break Speed: %break speed for player%" to player

Block Data

🔗

Expression

Patterns:
Since: 2.5, 2.5.2 (set)
Requirements: Minecraft 1.13+
Return Type: Block Data
Get the block data associated with a block. This data can also be used to set blocks.

Examples:

set {data} to block data of target block
set block at player to {data}
set block data of target block to oak_stairs[facing=south;waterlogged=true]

Block Hardness

🔗

Expression

Patterns:
Since: 2.6
Requirements: Minecraft 1.13+
Return Type: Number
Obtains the block's hardness level (also known as "strength"). This number is used to calculate the time required to break each block.

Examples:

set {_hard} to block hardness of target block
if block hardness of target block > 5:

Block Sphere

🔗

Expression

Patterns:
  • [(all [[of] the]|the)] blocks in radius %number% [(of|around) %location%]
  • [(all [[of] the]|the)] blocks around %location% in radius %number%
Since: 1.0
Return Type: Block
All blocks in a sphere around a center, mostly useful for looping.

Examples:

loop blocks in radius 5 around the player:
    set loop-block to air

Blocks

🔗

Expression

Patterns:
Since: 1.0, 2.5.1 (within/cuboid/chunk)
Return Type: Block
Blocks relative to other blocks or between other blocks. Can be used to get blocks relative to other blocks or for looping. Blocks from/to and between will return a straight line whereas blocks within will return a cuboid.

Examples:

loop blocks above the player:
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

🔗

Expression

Patterns:
  • [(all|the)] blocks (in|of) [[the] region[s]] %regions%
Since: 2.1
Requirements: Supported regions plugin
Return Type: Block
All blocks in a region. This expression requires a supported regions plugin to be installed.

Examples:

loop all blocks in the region {arena.%{faction.%player%}%}:
    clear the loop-block

Book Author

🔗

Expression

Patterns:
  • [the] [book] (author|writer|publisher) of %item types%
  • %item types%'[s] [book] (author|writer|publisher)
Since: 2.2-dev31
Return Type: Text
The author of a book.

Examples:

on book sign:
    message "Book Title: %author of event-item%"

Book Pages

🔗

Expression

Patterns:
Since: 2.2-dev31, 2.7 (changers)
Return Type: Text
The pages of a book (Supports Skript's chat format) Note: In order to modify the pages of a new written book, you must have the title and author of the book set. Skript will do this for you, but if you want your own, please set those values.

Examples:

on book sign:
    message "Book Pages: %pages of event-item%"
    message "Book Page 1: %page 1 of event-item%"

set page 1 of player's held item to "Book writing"

Book Title

🔗

Expression

Patterns:
Since: 2.2-dev31
Return Type: Text
The title of a book.

Examples:

on book sign:
    message "Book Title: %title of event-item%"

Burn/Cook Time

🔗

Expression

Patterns:
  • [the] burn[ing] time
  • [the] (burn|cook)[ing] time of %blocks%
  • %blocks%'[s] (burn|cook)[ing] time
Since: 2.3
Return Type: Timespan
The time a furnace takes to burn an item in a fuel burn event. Can also be used to change the burn/cook time of a placed furnace.

Examples:

on fuel burn:
    if fuel slot is coal:
        set burning time to 1 tick

Case Text

🔗

Expression

Patterns:
  • %texts% in (upper|lower)[ ]case
  • (upper|lower)[ ]case %texts%
  • capitali(s|z)ed %texts%
  • %texts% in [(lenient|strict) ](proper|title)[ ]case
  • [(lenient|strict) ](proper|title)[ ]case %texts%
  • %texts% in [(lenient|strict) ]camel[ ]case
  • [(lenient|strict) ]camel[ ]case %texts%
  • %texts% in [(lenient|strict) ]pascal[ ]case
  • [(lenient|strict) ]pascal[ ]case %texts%
  • %texts% in [(lower|upper|capital|screaming)[ ]]snake[ ]case
  • [(lower|upper|capital|screaming)[ ]]snake[ ]case %texts%
  • %texts% in [(lower|upper|capital)[ ]]kebab[ ]case
  • [(lower|upper|capital)[ ]]kebab[ ]case %texts%
Since: 2.2-dev16 (lowercase and uppercase), 2.5 (advanced cases)
Return Type: Text
Copy of given text in Lowercase, Uppercase, Proper Case, camelCase, PascalCase, Snake_Case, and Kebab-Case

Examples:

"Oops!" in lowercase # oops!
"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?

Characters Between

🔗

Expression

Patterns:
  • [(all [[of] the]|the)] [alphanumeric] characters (between|from) %text% (and|to) %text%
Since: INSERT VERSION
Return Type: Text
All characters between two given characters, useful for generating random strings. This expression uses the Unicode numerical code of a character to determine which characters are between the two given characters. The ASCII table linked here shows this ordering for the first 256 characters. If you would like only alphanumeric characters you can use the 'alphanumeric' option in the expression. If strings of more than one character are given, only the first character of each is used.

Examples:

loop characters from "a" to "f":
    broadcast "%loop-value%"

# 0123456789:;<=>?@ABC... ...uvwxyz
send characters between "0" and "z"

# 0123456789ABC... ...uvwxyz
send alphanumeric characters between "0" and "z"

Chat Format

🔗

Expression

Patterns:
  • [the] (message|chat) format[ting]
Since: 2.2-dev31
Return Type: Text
Can be used to get/retrieve the chat format. The sender of a message is represented by [player] or [sender], and the message by [message] or [msg].

Examples:

set the chat format to "&lt;yellow&gt;[player]&lt;light gray&gt;: &lt;green&gt;[message]"

Chat Recipients

🔗

Expression

Patterns:
  • [chat][( |-)]recipients
Since: 2.2-Fixes-v7, 2.2-dev35 (clearing recipients)
Return Type: Player
Recipients of chat events where this is called.

Examples:

chat recipients

Chunk

🔗

Expression

Patterns:
Since: 2.0, INSERT VERSION (loaded chunks)
Return Type: Chunk
Returns the chunk of a block, location or entity is in, or a list of the loaded chunks of a world.

Examples:

add the chunk at the player to {protected chunks::*}
set {_chunks::*} to the loaded chunks of the player's world

Clicked Block/Entity/Inventory/Slot

🔗

Expression

Patterns:
  • [the] (clicked [enchant[ment]] (button|option)|clicked (block|%*item type/entity type%)|clicked slot|clicked inventory|click (type|action)|inventory action)
Since: 1.0, 2.2-dev35 (more clickable things)
Usable in events: click, inventory click
Return Type: Object
The clicked block, entity, inventory, inventory slot, inventory click type or inventory action.

Examples:

message "You clicked on a %type of clicked entity%!"
if the clicked block is a chest:
    show the inventory of the clicked block to the player

Color of

🔗

Expression

Patterns:
Since: 1.2
Return Type: Color
The color of an item, can also be used to color chat messages with "<%color of ...%>this text is colored!".

Examples:

on click on wool:
    message "This wool block is <%color of block%>%color of block%<reset>!"
    set the color of the block to black

Colored / Uncolored

🔗

Expression

Patterns:
  • (colo[u]r-|colo[u]red )%texts%
  • (format-|formatted )%texts%
  • (un|non)[-](colo[u]r-|colo[u]red |format-|formatted )%texts%
Since: 2.0
Return Type: Text
Parses <color>s and, optionally, chat styles in a message or removes any colors and chat styles from the message. Parsing all chat styles requires this expression to be used in same line with the send effect.

Examples:

on chat:
    set message to colored message # Safe; only colors get parsed
command /fade &lt;player&gt;:
    trigger:
        set display name of the player-argument to uncolored display name of the player-argument
command /format &lt;text&gt;:
    trigger:
        message formatted text-argument # Safe, because we're sending to whoever used this command

Command

🔗

Expression

Patterns:
  • [the] (full|complete|whole) command
  • [the] command [(label|alias)]
Since: 2.0, 2.7 (support for script commands)
Usable in events: command
Return Type: Text
The command that caused an 'on command' event (excluding the leading slash and all arguments)

Examples:

# prevent any commands except for the /exit command during some game
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

🔗

Expression

Patterns:
  • [the] main command [label|name] [of [[the] command[s] %texts%]]
  • command[s] %texts%'[s] main command [label|name]
  • [the] description [of [[the] command[s] %texts%]]
  • command[s] %texts%'[s] description
  • [the] label [of [[the] command[s] %texts%]]
  • command[s] %texts%'[s] label
  • [the] usage [of [[the] command[s] %texts%]]
  • command[s] %texts%'[s] usage
  • [(all|the|all [of] the)] aliases [of [[the] command[s] %texts%]]
  • command[s] %texts%'[s] aliases
  • [the] permission [of [[the] command[s] %texts%]]
  • command[s] %texts%'[s] permission
  • [the] permission message [of [[the] command[s] %texts%]]
  • command[s] %texts%'[s] permission message
  • [the] plugin [owner] [of [[the] command[s] %texts%]]
  • command[s] %texts%'[s] plugin [owner]
Since: 2.6
Return Type: Text
Get information about a command.

Examples:

main command label of command "skript"
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 /greet <player>:
    usage: /greet <target>
    trigger:
        if arg-1 is sender:
            send "&cYou can't greet yourself! Usage: %the usage%"
            stop
        send "%sender% greets you!" to arg-1
        send "You greeted %arg-1%!"

Command Sender

🔗

Expression

Patterns:
  • [the] [command['s]] (sender|executor)
Since: 2.0
Usable in events: command
Return Type: Command Sender
The player or the console who sent a command. Mostly useful in commands and command events. If the command sender is a command block, its location can be retrieved by using %block's location%

Examples:

make the command sender execute "/say hi!"

on command:
    log "%executor% used command /%command% %arguments%" to "commands.log"

Compass Target

🔗

Expression

Patterns:
Since: 2.0
Return Type: Location
The location a player's compass is pointing at.

Examples:

# make all player's compasses target a player stored in {compass::target::%player%}
every 5 seconds:
    loop all players:
        set the loop-player's compass target to location of {compass::target::%%loop-player%}

Console

🔗

Expression

Patterns:
  • [the] (console|server)
Since: 1.3.1
Return Type: Command Sender
Represents the server's console which can receive messages and execute commands

Examples:

execute console command "/stop"
send "message to console" to the console

Cooldown Time/Remaining Time/Elapsed Time/Last Usage/Bypass Permission

🔗

Expression

Patterns:
  • [the] remaining [time] [of [the] (cooldown|wait) [(of|for) [the] [current] command]]
  • [the] elapsed [time] [of [the] (cooldown|wait) [(of|for) [the] [current] command]]
  • [the] ((cooldown|wait) time|[wait] time of [the] (cooldown|wait) [(of|for) [the] [current] command])
  • [the] last usage [date] [of [the] (cooldown|wait) [(of|for) [the] [current] command]]
  • [the] [cooldown] bypass perm[ission] [of [the] (cooldown|wait) [(of|for) [the] [current] command]]
Since: 2.2-dev33
Return Type: Object
Only usable in command events. Represents the cooldown time, the remaining time, the elapsed time, the last usage date, or the cooldown bypass permission.

Examples:

command /home:
    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

🔗

Expression

Patterns:
  • [the] (x|y|z)(-| )(coord[inate]|pos[ition]|loc[ation])[s] of %locations%
  • %locations%'[s] (x|y|z)(-| )(coord[inate]|pos[ition]|loc[ation])[s]
Since: 1.4.3
Return Type: Number
Represents a given coordinate of a location.

Examples:

player's y-coordinate is smaller than 40:
    message "Watch out for lava!"

Creature/Entity/Player/Projectile/Villager/Powered Creeper/etc.

🔗

Expression

Patterns:
  • [the] [event-]<.+>
Since: 1.0
Return Type: Entity
The entity involved in an event (an entity is a player, a creature or an inanimate object like ignited TNT, a dropped item or an arrow). You can use the specific type of the entity that's involved in the event, e.g. in a 'death of a creeper' event you can use 'the creeper' instead of 'the entity'.

Examples:

give a diamond sword of sharpness 3 to the player
kill the creeper
kill all powered creepers in the wolf's world
projectile is an arrow

Cursor Slot

🔗

Expression

Patterns:
Since: 2.2-dev17
Return Type: Slot
The item which the player has on their inventory cursor. This slot is always empty if player has no inventory open.

Examples:

cursor slot of player is dirt
set cursor slot of player to 64 diamonds

Custom Chest Inventory

🔗

Expression

Patterns:
  • [a] [new] chest inventory (named|with name) %text% [with %number% row[s]]
  • [a] [new] chest inventory with %number% row[s] [(named|with name) %text%]
Since: 2.2-dev34, INSERT VERSION (chat format)
Requirements: Paper 1.16+ (chat format)
Return Type: Inventory
Returns a chest inventory with the given amount of rows and the name. Use the open inventory effect to open it.

Examples:

open chest inventory with 1 row named "test" to player

set {_inventory} to a chest inventory with 1 row
set slot 4 of {_inventory} to a diamond named "example"
open {_inventory} to player

open chest inventory named "<##00ff00>hex coloured title!" with 6 rows to player

Custom Model Data

🔗

Expression

Patterns:
Since: 2.5
Requirements: 1.14+
Return Type: long
Get/set the CustomModelData tag for an item. (Value is an integer between 0 and 99999999)

Examples:

set custom model data of player's tool to 3
set {_model} to custom model data of player's tool

Damage

🔗

Expression

Patterns:
  • [the] damage
Since: 1.3.5, INSERT VERSION (item damage event)
Usable in events: Damage, Vehicle Damage, Item Damage
Return Type: Number
How much damage is done in a entity/vehicle/item damage events. For entity damage events, possibly ignoring armour, criticals and/or enchantments (remember that in Skript '1' is one full heart, not half a heart). For items, it's the amount of durability damage the item will be taking.

Examples:

on item damage:
    event-item is any tool
    clear damage # unbreakable tools as the damage will be 0
on damage:
    increase the damage by 2

Damage Cause

🔗

Expression

Patterns:
  • [the] damage (cause|type)
Since: 2.0
Return Type: Damage Cause
The damage cause of a damage event. Please click on the link for more information.

Examples:

damage cause is lava, fire or burning

Damage Value/Durability

🔗

Expression

Patterns:
Since: 1.2, 2.7 (durability reversed)
Return Type: integer
The damage value/durability of an item.

Examples:

set damage value of player's tool to 10
reset the durability of {_item}
set durability of player's held item to 0

Damaged Item

🔗

Expression

Patterns:
Since: 2.4
Return Type: Item Type
Directly damages an item. In MC versions 1.12.2 and lower, this can be used to apply data values to items/blocks

Examples:

give player diamond sword with damage value 100
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

Date Ago/Later

🔗

Expression

Patterns:
Since: 2.2-dev33
Return Type: Date
A date the specified timespan before/after another date.

Examples:

set {_yesterday} to 1 day ago
set {_hourAfter} to 1 hour after {someOtherDate}
set {_hoursBefore} to 5 hours before {someOtherDate}

Default Value

🔗

Expression

Patterns:
Since: 2.2-dev36
Return Type: Object
A shorthand expression for giving things a default value. If the first thing isn't set, the second thing will be returned.

Examples:

broadcast {score::%player's uuid%} otherwise "%player% has no score!"

Difference

🔗

Expression

Patterns:
Since: 1.4
Return Type: Object
The difference between two values, e.g. numbers, dates or times.

Examples:

if difference between {command::%player%::lastuse} and now is smaller than a minute:
    message "You have to wait a minute before using this command again!"

Difficulty

🔗

Expression

Patterns:
  • [the] difficult(y|ies) of %worlds%
  • %worlds%'[s] difficult(y|ies)
Since: 2.3
Return Type: Difficulty
The difficulty of a world.

Examples:

set the difficulty of "world" to hard

Direction

🔗

Expression

Patterns:
  • [%number% [(block|met(er|re))[s]] [to the]] (north[[(-| )](east|west)][(ward[(s|ly)]|er[(n|ly)])] [of]|south[[(-| )](east|west)][(ward[(s|ly)]|er[(n|ly)])] [of]|(east|west)[(ward[(s|ly)]|er[(n|ly)])] [of]|above|over|(up|down)[ward[(s|ly)]]|below|under[neath]|beneath) [%direction%]
  • [%number% [(block|met(er|re))[s]]] in [the] (direction|horizontal direction|facing|horizontal facing) of %entity/block% [(of|from)]
  • [%number% [(block|met(er|re))[s]]] in %entity/block%'[s] (direction|horizontal direction|facing|horizontal facing) [(of|from)]
  • [%number% [(block|met(er|re))[s]]] (in[ ]front [of]|forward[s]|behind|backwards|[to the] (right|left) [of])
  • [%number% [(block|met(er|re))[s]]] horizontal[ly] (in[ ]front [of]|forward[s]|behind|backwards|to the (right|left) [of])
Since: 1.0 (basic), 2.0 (extended)
Return Type: Direction
A helper expression for the direction type.

Examples:

thrust the player upwards
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

🔗

Expression

Patterns:
Since: 1.0
Return Type: Number
The distance between two points.

Examples:

if the distance between the player and {home::%uuid of player%} is smaller than 20:
    message "You're very close to your home!"

Drops

🔗

Expression

Patterns:
  • [the] drops
Since: 1.0
Usable in events: death
Return Type: Item Type
Only works in death events. Holds the drops of the dying creature. Drops can be prevented by removing them with "remove ... from drops", e.g. "remove all pickaxes from the drops", or "clear drops" if you don't want any drops at all.

Examples:

clear drops
remove 4 planks from the drops

Drops Of Block

🔗

Expression

Patterns:
Since: 2.5.1
Requirements: Minecraft 1.15+ ('as %entity%')
Return Type: Item Type
A list of the items that will drop when a block is broken.

Examples:

on break of block:
    give drops of block using player's tool to player

Element of

🔗

Expression

Patterns:
  • ([the] first|[the] last|[a] random|[the] %number%(st|nd|rd|th)|[the] %number%(st|nd|rd|th) [to] last) element [out] of %objects%
Since: 2.0, 2.7 (relative to last element)
Return Type: Object
The first, last or a random element of a set, e.g. a list variable. See also: random

Examples:

give a random element out of {free items::*} to the player

Enchant Item

🔗

Expression

Patterns:
  • [the] enchant[ed] item
Since: 2.5
Usable in events: enchant prepare, enchant
Return Type: Item Type
The enchant item in an enchant prepare event or enchant event. It can be modified, but enchantments will still be applied in the enchant event.

Examples:

on enchant:
    set the enchanted item to a diamond chestplate
on enchant prepare:
    set the enchant item to a wooden sword

Enchanting Experience Cost

🔗

Expression

Patterns:
  • [the] [displayed] ([e]xp[erience]|enchanting) cost
Since: 2.5
Usable in events: enchant
Return Type: long
The cost of enchanting in an enchant event. This is number that was displayed in the enchantment table, not the actual number of levels removed.

Examples:

on enchant:
    send "Cost: %the displayed enchanting cost%" to player

Enchantment Bonus

🔗

Expression

Patterns:
  • [the] enchantment bonus
Since: 2.5
Usable in events: enchant prepare
Return Type: long
The enchantment bonus in an enchant prepare event. This represents the number of bookshelves affecting/surrounding the enchantment table.

Examples:

on enchant:
    send "There are %enchantment bonus% bookshelves surrounding this enchantment table!" to player

Enchantment Level

🔗

Expression

Patterns:
Since: 2.0
Return Type: long
The level of a particular enchantment on an item.

Examples:

player's tool is a sword of sharpness:
    message "You have a sword of sharpness %level of sharpness of the player's tool% equipped"

Enchantment Offer

🔗

Expression

Patterns:
  • [all [of]] [the] enchant[ment] offers
  • enchant[ment] offer[s] %numbers%
  • [the] %number%(st|nd|rd|th) enchant[ment] offer
Since: 2.5
Usable in events: enchant prepare
Requirements: 1.11 or newer
Return Type: Enchantment Offer
The enchantment offer in enchant prepare events.

Examples:

on enchant prepare:
    send "Your enchantment offers are: %the enchantment offers%" to player

Enchantment Offer Cost

🔗

Expression

Patterns:
Since: 2.5
Requirements: 1.11 or newer
Return Type: long
The cost of an enchantment offer. This is displayed to the right of an enchantment offer. If the cost is changed, it will always be at least 1. This changes how many levels are required to enchant, but does not change the number of levels removed. To change the number of levels removed, use the enchant event.

Examples:

set cost of enchantment offer 1 to 50

Ender Chest

🔗

Expression

Patterns:
Since: 2.0
Return Type: Inventory
The ender chest of a player.

Examples:

open the player's ender chest to the player

Entities

🔗

Expression

Patterns:
Since: 1.2.1, 2.5 (chunks)
Return Type: Entity
All entities in all worlds, in a specific world, in a chunk or in a radius around a certain location, e.g. all players, all creepers in the player's world, or players in radius 100 of the player.

Examples:

kill all creepers in the player's world
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

🔗

Expression

Patterns:
Since: 2.5
Return Type: Boolean
Returns whether an entity has AI.

Examples:

set artificial intelligence of target entity to false

Entity Attribute

🔗

Expression

Patterns:
Since: 2.5, 2.6.1 (final attribute value)
Return Type: Number
The numerical value of an entity's particular attribute. Note that the movement speed attribute cannot be reliably used for players. For that purpose, use the speed expression instead. Resetting an entity's attribute is only available in Minecraft 1.11 and above.

Examples:

on damage of player:
    send "You are wounded!" to victim
    set victim's attack speed attribute to 2

Entity Fire Burn Duration

🔗

Expression

Patterns:
  • [the] (burn[ing]|fire) (time|duration) of %entities%
  • %entities%'[s] (burn[ing]|fire) (time|duration)
Since: 2.7
Return Type: Timespan
How much time an entity will be burning for.

Examples:

send "You will stop burning in %fire time of player%"

Entity Owner

🔗

Expression

Patterns:
Since: 2.5
Return Type: Offline Player
The owner of a tameable entity, such as a horse or wolf.

Examples:

set owner of target entity to player
delete owner of target entity
set {_t} to uuid of tamer of target entity

Exhaustion

🔗

Expression

Patterns:
Since: 2.2-dev35
Return Type: Number
The exhaustion of a player. This is mainly used to determine the rate of hunger depletion.

Examples:

set exhaustion of all players to 1

Experience

🔗

Expression

Patterns:
  • [the] [(spawned|dropped)] [e]xp[erience] [orb[s]]
Since: 2.1, 2.5.3 (block break event), 2.7 (experience change event)
Usable in events: experience spawn, break / mine, experience change
Return Type: Experience
How much experience was spawned in an experience spawn or block break event. Can be changed.

Examples:

on experience spawn:
    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

🔗

Expression

Patterns:
  • [the] exploded blocks
Since: 2.5
Usable in events: explode
Return Type: Block
Get all the blocks that were destroyed in an explode event

Examples:

on explode:
    loop exploded blocks:
        add loop-block to {exploded::blocks::*}

Explosion Block Yield

🔗

Expression

Patterns:
  • [the] [explosion['s]] block (yield|amount)
  • [the] percentage of blocks dropped
Since: 2.5
Usable in events: explosion
Return Type: Number
The percentage of exploded blocks dropped in an explosion event. When changing the yield, a value greater than 1 will function the same as using 1. Attempting to change the yield to a value less than 0 will have no effect.

Examples:

on explode:
set the explosion's block yield to 10%

Explosion Yield

🔗

Expression

Patterns:
  • [the] explosion (yield|radius|size)
  • [the] (yield|radius|size) of [the] explosion
Since: 2.5
Usable in events: explosion prime
Return Type: Number
The yield of the explosion in an explosion prime event. This is how big the explosion is. When changing the yield, values less than 0 will be ignored. Read this wiki page for more information

Examples:

on explosion prime:
    set the yield of the explosion to 10

Explosive Yield

🔗

Expression

Patterns:
  • [the] explosive (yield|radius|size) of %entities%
  • %entities%'[s] explosive (yield|radius|size)
Since: 2.5
Requirements: Minecraft 1.12 or newer for creepers
Return Type: Number
The yield of an explosive (creeper, primed tnt, fireball, etc.). This is how big of an explosion is caused by the entity. Read this wiki page for more information

Examples:

on spawn of a creeper:
    set the explosive yield of the event-entity to 10

Facing

🔗

Expression

Patterns:
Since: 1.4
Return Type: Direction
The facing of an entity or block, i.e. exactly north, south, east, west, up or down (unlike direction which is the exact direction, e.g. '0.5 south and 0.7 east')

Examples:

# makes a bridge
loop blocks from the block below the player in the horizontal facing of the player:
    set loop-block to cobblestone

Fall Distance

🔗

Expression

Patterns:
  • [the] fall[en] (distance|height) of %entities%
  • %entities%'[s] fall[en] (distance|height)
Since: 2.5
Return Type: Number
The distance an entity has fallen for.

Examples:

set all entities' fall distance to 10
on damage:
    send "%victim's fall distance%" to victim

Fertilized Blocks

🔗

Expression

Patterns:
  • [all] [the] fertilized blocks
Since: 2.5
Usable in events: block fertilize
Requirements: Minecraft 1.13 or newer
Return Type: Block
The blocks fertilized in block fertilize events.

Examples:

the fertilized blocks

Filter

🔗

Expression

Patterns:
  • %objects% (where|that match) \[<.+>\]
Since: 2.2-dev36
Return Type: Object
Filters a list based on a condition. For example, if you ran 'broadcast "something" and "something else" where [string input is "something"]', only "something" would be broadcast as it is the only string that matched the condition.

Examples:

send "congrats on being staff!" to all players where [player input has permission "staff"]

Filter Input

🔗

Expression

Patterns:
  • input
  • %*type% input
Since: 2.2-dev36
Return Type: Object
Represents the input in a filter expression. For example, if you ran 'broadcast "something" and "something else" where [input is "something"]the condition would be checked twice, using "something" and "something else" as the inputs.

Examples:

send "congrats on being staff!" to all players where [input has permission "staff"]

Final Damage

🔗

Expression

Patterns:
  • [the] final damage
Since: 2.2-dev19
Usable in events: damage
Return Type: Number
How much damage is done in a damage event, considering all types of damage reduction. Can NOT be changed.

Examples:

send "%final damage%" to victim

Firework Effect

🔗

Expression

Patterns:
  • [(flickering|trailing|flickering trailing|trailing flickering)] %firework type% [firework [effect]] colo[u]red %colors%
  • [(flickering|trailing|flickering trailing|trailing flickering)] %firework type% [firework [effect]] colo[u]red %colors% fad(e|ing) [to] %colors%
Since: 2.4
Return Type: Firework Effect
Represents a 'firework effect' which can be used in the launch firework effect.

Examples:

launch flickering trailing burst firework colored blue and green at player
launch trailing flickering star colored purple, yellow, blue, green and red fading to pink at target entity
launch ball large colored red, purple and white fading to light green and black at player's location with duration 1

Flight Mode

🔗

Expression

Patterns:
  • [the] fl(y[ing]|ight) (mode|state) of %players%
  • %players%'[s] fl(y[ing]|ight) (mode|state)
Since: 2.2-dev34
Return Type: Boolean
Whether the player(s) are allowed to fly. Use Make Fly effect to force player(s) to fly.

Examples:

set flight mode of player to true
send "%flying state of all players%"

Food Level

🔗

Expression

Patterns:
  • [the] (food|hunger)[[ ](level|met(er|re)|bar)] [of %players%]
  • %players%'[s] (food|hunger)[[ ](level|met(er|re)|bar)]
Since: 1.0
Return Type: Number
The food level of a player from 0 to 10. Has several aliases: food/hunger level/meter/bar.

Examples:

set the player's food level to 10

Formatted Date

🔗

Expression

Patterns:
  • %dates% formatted [human-readable] [(with|as) %text%]
  • [human-readable] formatted %dates% [(with|as) %text%]
Since: 2.2-dev31, 2.7 (support variables in format)
Return Type: Text
Converts date to human-readable text format. By default, 'yyyy-MM-dd HH:mm:ss z' (e.g. '2018-03-30 16:03:12 +01') will be used. For reference, see this Wikipedia article.

Examples:

command /date:
    trigger:
        send "Full date: %now formatted human-readable%" to sender
        send "Short date: %now formatted as "yyyy-MM-dd"%" to sender

Former/Future State

🔗

Expression

Patterns:
  • [the] (former|past|old) [state] [of] %~object%
  • %~object% before [the event]
  • [the] (future|to-be|new) [state] [of] %~object%
  • %~object%(-to-be| after[(wards| the event)])
Since: 1.1
Return Type: Object
Represents the value of an expression before an event happened or the value it will have directly after the event, e.g. the old or new level respectively in a level change event. Note: The past, future and present states of an expression are sometimes called 'time states' of an expression. Note 2: If you don't specify whether to use the past or future state of an expression that has different values, its default value will be used which is usually the value after the event.

Examples:

on teleport:
    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

Free / Max / Total Memory

🔗

Expression

Patterns:
  • [the] [server] (free|max[imum]|total) (memory|ram)
Since: INSERT VERSION
Return Type: double
The free, max or total memory of the server in Megabytes.

Examples:

while player is online:
    send action bar "Memory left: %free memory%/%max memory%MB" to player
    wait 5 ticks

Freeze Time

🔗

Expression

Patterns:
Since: 2.7
Return Type: Timespan
How much time an entity has been in powdered snow for.

Examples:

player's freeze time is less than 3 seconds:
    send "you're about to freeze!" to the player

Furnace Slot

🔗

Expression

Patterns:
  • (fuel|result) [slot]
  • (ore|fuel|result)[s] [slot[s]] of %blocks%
  • %blocks%'[s] (ore|fuel|result)[s] [slot[s]]
Since: 1.0
Usable in events: smelt, fuel burn
Return Type: Slot
A slot of a furnace, i.e. either the ore, fuel or result slot. Remember to use 'block' and not 'furnace', as 'furnace' is not an existing expression.

Examples:

set the fuel slot of the clicked block to a lava bucket
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

🔗

Expression

Patterns:
Since: 1.0
Return Type: Game Mode
The gamemode of a player. (Gamemodes)

Examples:

player's gamemode is survival
set the player's gamemode to creative

Gamerule Value

🔗

Expression

Patterns:
Since: 2.5
Requirements: Minecraft 1.13+
Return Type: Gamerule Value
The gamerule value of a world.

Examples:

set the gamerule commandBlockOutput of world "world" to false

Gliding State

🔗

Expression

Patterns:
Since: 2.2-dev21
Return Type: Boolean
Sets of gets gliding state of player. It allows you to set gliding state of entity even if they do not have an Elytra equipped.

Examples:

set gliding of player to off

Glowing

🔗

Expression

Patterns:
Since: 2.2-dev18
Return Type: Boolean
Indicates if targeted entity is glowing (new 1.9 effect) or not. Glowing entities can be seen through walls.

Examples:

set glowing of player to true

Gravity

🔗

Expression

Patterns:
Since: 2.2-dev21
Return Type: Boolean
If entity is affected by gravity or not, i.e. if it has Minecraft 1.10+ NoGravity flag.

Examples:

set gravity of player off

Group

🔗

Expression

Patterns:
Since: 2.2-dev35
Requirements: Vault, a permission plugin that supports Vault
Return Type: Text
The primary group or all groups of a player. This expression requires Vault and a compatible permissions plugin to be installed. If you have LuckPerms, ensure you have vault integration enabled in the luck perms configurations.

Examples:

on join:
    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

🔗

Expression

Patterns:
  • [the] hanging (entity|remover)
Since: 2.6.2
Return Type: Entity
Returns the hanging entity or remover in hanging break and place events.

Examples:

on break of item frame:
    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

🔗

Expression

Patterns:
  • %texts% hash[ed] with (MD5|SHA-256)
Since: 2.0, 2.2-dev32 (SHA-256 algorithm)
Return Type: Text
Hashes the given text using the MD5 or SHA-256 algorithms. Each algorithm is suitable for different use cases.

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:

command /setpass &lt;text&gt;:
    trigger:
        set {password::%uuid of player%} to text-argument hashed with SHA-256
command /login &lt;text&gt;:
    trigger:
        if text-argument hashed with SHA-256 is {password::%uuid of player%}:
            message "Login successful."
        else:
            message "Wrong password!"

Hatching Entity Type

🔗

Expression

Patterns:
  • [the] hatching entity [type]
Since: 2.7
Usable in events: Egg Throw
Return Type: Entity Type
The type of the entity that will be hatched in a Player Egg Throw event.

Examples:

on player egg throw:
    set the hatching entity type to a primed tnt

Hatching Number

🔗

Expression

Patterns:
  • [the] hatching number
Since: 2.7
Usable in events: Egg Throw
Return Type: byte
The number of entities that will be hatched in a Player Egg Throw event. Please note that no more than 127 entities can be hatched at once.

Examples:

on player egg throw:
    set the hatching number to 10

Head location

🔗

Expression

Patterns:
Since: 2.0
Return Type: Location
The location of an entity's head, mostly useful for players and e.g. looping blocks in the player's line of sight. Please note that this location is only accurate for entities whose head is exactly above their center, i.e. players, endermen, zombies, skeletons, etc., but not sheep, pigs or cows.

Examples:

set the block at the player's head to air
set the block in front of the player's eyes to glass
loop blocks in front of the player's head:

Heal Amount

🔗

Expression

Patterns:
  • [the] heal amount
Since: 2.5.1
Usable in events: heal
Return Type: Number
The amount of health healed in a healing event.

Examples:

increase heal amount by 2
remove 0.5 from heal amount

Heal Reason

🔗

Expression

Patterns:
  • (regen|health regain|heal) (reason|cause)
Since: 2.5
Return Type: Heal Reason
The heal reason of a heal event. Please click on the link for more information.

Examples:

on heal:
    if heal reason = satiated:
        send "You ate enough food and gained health back!" to player

Health

🔗

Expression

Patterns:
Since: 1.0
Usable in events: damage
Return Type: Number
The health of a creature, e.g. a player, mob, villager, etc. The minimum value is 0, and the maximum is the creature's max health (e.g. 10 for players).

Examples:

message "You have %health% HP left."

Hidden Players

🔗

Expression

Patterns:
  • [(all [[of] the]|the)] hidden players (of|for) %players%
  • [(all [[of] the]|the)] players hidden (from|for|by) %players%
Since: 2.3
Return Type: Player
The players hidden from a player that were hidden using the player visibility effect.

Examples:

message "&lt;light red&gt;You are currently hiding: &lt;light gray&gt;%hidden players of the player%"

Highest Solid Block

🔗

Expression

Patterns:
  • highest [(solid|non-air)] block at %locations%
Since: 2.2-dev34
Return Type: Block
Returns the highest solid block at the x and z coordinates of the world of a given location.

Examples:

highest block at location of arg-player

Hostname

🔗

Expression

Patterns:
  • [the] (host|domain)[ ][name]
Since: 2.6.1
Return Type: Text
The hostname used by the connecting player to connect to the server in a connect event.

Examples:

on connect:
    hostname is "testers.example.com"
    send "Welcome back tester!"

Hotbar Button

🔗

Expression

Patterns:
  • [the] hotbar button
Since: 2.5
Return Type: long
The hotbar button clicked in an inventory click event.

Examples:

on inventory click:
    send "You clicked the hotbar button %hotbar button%!"

Hotbar Slot

🔗

Expression

Patterns:
  • [the] [the] [([currently] selected|current)] hotbar slot[s] [of %players%]
  • %players%'[s] [the] [([currently] selected|current)] hotbar slot[s]
Since: 2.2-dev36
Return Type: Slot
The currently selected hotbar slot. To retrieve its number use Slot Index expression. Use future and past tense to grab the previous slot in an item change event, see example.

Examples:

message "%player's current hotbar slot%"
set player's selected hotbar slot to slot 4 of player

send "index of player's current hotbar slot = 1" # second slot from the left

on item held change:
    if the selected hotbar slot was a diamond:
        set the currently selected hotbar slot to slot 5 of player

Hover List

🔗

Expression

Patterns:
  • [the] [custom] [(player|server)] (hover|sample) ([message] list|message)
  • [the] [custom] player [(hover|sample)] list
Since: 2.3
Usable in events: server list ping
Requirements: Paper 1.12.2 or newer
Return Type: Text
The list when you hover on the player counts of the server in the server list. This can be changed using texts or players in a server list ping event only. Adding players to the list means adding the name of the players. And note that, for example if there are 5 online players (includes fake online count) in the server and the hover list is set to 3 values, Minecraft will show "... and 2 more ..." at end of the list.

Examples:

on server list ping:
    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

🔗

Expression

Patterns:
  • [the] humidit(y|ies) of %blocks%
  • %blocks%'[s] humidit(y|ies)
Since: 2.2-dev35
Return Type: Number
Humidity of given blocks.

Examples:

set {_humidity} to event-block's humidity

IP

🔗

Expression

Patterns:
  • IP[s][( |-)address[es]] of %players%
  • %players%'[s] IP[s][( |-)address[es]]
  • IP[( |-)address]
Since: 1.4, 2.2-dev26 (when used in connect event), 2.3 (when used in server list ping event)
Return Type: Text
The IP address of a player, or the connected player in a connect event, or the pinger in a server list ping event.

Examples:

ban the IP address of the player
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

Index Of

🔗

Expression

Patterns:
  • [the] [(first|last)] index of %text% in %text%
Since: 2.1
Return Type: long
The first or last index of a character (or text) in a text, or -1 if it doesn't occur in the text. Indices range from 1 to the length of the text.

Examples:

set {_first} to the first index of "@" in the text argument
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

🔗

Expression

Patterns:
  • [(the|all [[of] the])] (indexes|indices) of %~objects%
  • %~objects%'[s] (indexes|indices)
  • [sorted] (indices|indexes) of %~objects% in (ascending|descending) order
  • [sorted] %~objects%'[s] (indices|indexes) in (ascending|descending) order
Since: 2.4 (indices), 2.6.1 (sorting)
Return Type: Text
Returns all the indices of a list variable, optionally sorted by their values. To sort the indices, all objects in the list must be comparable; Otherwise, this expression will just return the unsorted indices.

Examples:

set {l::*} to "some", "cool" and "values"
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

Initiator Inventory

🔗

Expression

Patterns:
  • [the] [event-]initiator[( |-)inventory]
Since: INSERT VERSION
Usable in events: Inventory Item Move
Return Type: Inventory
Returns the initiator inventory in an on inventory item move event.

Examples:

on inventory item move:
    holder of event-initiator-inventory is a chest
    broadcast "Item transport requested at %location at holder of event-initiator-inventory%..."

Inventory

🔗

Expression

Patterns:
  • [the] inventor(y|ies) of %inventoryholders%
  • %inventoryholders%'[s] inventor(y|ies)
Since: 1.0
Return Type: Object
The inventory of a block or player. You can usually omit this expression and can directly add or remove items to/from blocks or players.

Examples:

add a plank to the player's inventory
clear the player's inventory
remove 5 wool from the inventory of the clicked block

Inventory Action

🔗

Expression

Patterns:
  • [the] inventory action
Since: 2.2-dev16
Return Type: Inventory Action
The inventory action of an inventory event. Please click on the link for more information.

Examples:

inventory action is pickup all

Inventory Close Reason

🔗

Expression

Patterns:
  • [the] inventory clos(e|ing) (reason|cause)
Since: INSERT VERSION
Usable in events: Inventory Close
Requirements: Paper
Return Type: Inventory Close Reasons

Examples:

on inventory close:
    inventory close reason is teleport
    send "Your inventory closed due to teleporting!" to player

Inventory Holder/Viewers/Rows/Slots

🔗

Expression

Patterns:
  • (holder[s]|viewers|[amount of] rows|[amount of] slots) of %inventories%
  • %inventories%'[s] (holder[s]|viewers|[amount of] rows|[amount of] slots)
Since: 2.2-dev34, 2.5 (slots)
Return Type: Object
Gets the amount of rows/slots, viewers and holder of an inventory.

NOTE: 'Viewers' expression returns a list of players viewing the inventory. Note that a player is considered to be viewing their own inventory and internal crafting screen even when said inventory is not open.

Examples:

event-inventory's amount of rows
holder of player's top inventory
{_inventory}'s viewers

Inventory Slot

🔗

Expression

Patterns:
Since: 2.2-dev24
Return Type: Slot
Represents a slot in an inventory. It can be used to change the item in an inventory too.

Examples:

if slot 0 of player is air:
    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

🔗

Expression

Patterns:
  • [the] item
Since: unknown (before 2.1)
Return Type: Item
The item involved in an event, e.g. in a drop, dispense, pickup or craft event.

Examples:

on dispense:
    item is a clock
    set the time to 6:00

Item Amount

🔗

Expression

Patterns:
Since: 2.2-dev24
Return Type: long
The amount of an item stack.

Examples:

send "You have got %item amount of player's tool% %player's tool% in your hand!" to player

Item Cooldown

🔗

Expression

Patterns:
Since: INSERT VERSION
Return Type: Timespan
Change the cooldown of a specific material to a certain amount of Timespan.

Examples:

on right click using stick:
    set item cooldown of player's tool for player to 1 minute
    set item cooldown of stone and grass for all players to 20 seconds
    reset item cooldown of cobblestone and dirt for all players

Item Enchantments

🔗

Expression

Patterns:
Since: 2.2-dev36
Return Type: Enchantment Type
All the enchantments an item type has.

Examples:

clear enchantments of event-item

Item of an Entity

🔗

Expression

Patterns:
Since: 2.2-dev35, 2.2-dev36 (improved), 2.5.2 (throwable projectiles)
Requirements: Minecraft 1.15.2+ (throwable projectiles)
Return Type: Slot
An item associated with an entity. For dropped item entities, it gets, obviously, the item that was dropped. For item frames, the item inside the frame is returned. For throwable projectiles (snowballs, enderpearls etc.),it gets the displayed item. Other entities do not have items associated with them.

Examples:

Missing examples.

Item with CustomModelData

🔗

Expression

Patterns:
Since: 2.5
Requirements: 1.14+
Return Type: Item Type
Get an item with a CustomModelData tag. (Value is an integer between 0 and 99999999)

Examples:

give player a diamond sword with custom model data 2
set slot 1 of inventory of player to wooden hoe with custom model data 357

Item with Lore

🔗

Expression

Patterns:
Since: 2.3
Return Type: Item Type
Returns the given item type with the specified lore added to it. If multiple strings are passed, each of them will be a separate line in the lore.

Examples:

set {_test} to stone with lore "line 1" and "line 2"
give {_test} to player

Items

🔗

Expression

Patterns:
  • [all [[of] the]|the] block[[ ]type]s
  • every block[[ ]type]
  • [all [[of] the]|the|every] block[s] of type[s] %item types%
  • [all [[of] the]|the|every] item[s] of type[s] %item types%
Since: 1.0 pre-5
Return Type: Item Type
Items or blocks of a specific type, useful for looping.

Examples:

loop items of type ore and log:
    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

🔗

Expression

Patterns:
  • [(all [[of] the]|the)] items ([with]in|of|contained in|out of) [inventor(y|ies)] %inventories%
Since: 2.0
Return Type: Slot
All items in an inventory. Useful for looping or storing in a list variable. Please note that the positions of the items in the inventory are not saved, only their order is preserved.

Examples:

loop all items in the player's inventory:
    loop-item is enchanted
    remove loop-item from the player
set {inventory::%uuid of player%::*} to items in the player's inventory

Join & Split

🔗

Expression

Patterns:
  • (concat[enate]|join) %texts% [(with|using|by) [[the] delimiter] %text%]
  • split %text% (at|using|by) [[the] delimiter] %text% [with case sensitivity]
  • %text% split (at|using|by) [[the] delimiter] %text% [with case sensitivity]
  • regex split %text% (at|using|by) [[the] delimiter] %text%
  • regex %text% split (at|using|by) [[the] delimiter] %text%
Since: 2.1, 2.5.2 (regex support), 2.7 (case sensitivity)
Return Type: Text
Joins several texts with a common delimiter (e.g. ", "), or splits a text into multiple texts at a given delimiter.

Examples:

message "Online players: %join all players with "" | ""%" # %all players% would use the default "x, y, and z"
set {_s::*} to the string argument split at ","

Language

🔗

Expression

Patterns:
  • [the] [([currently] selected|current)] [game] (language|locale) [setting] of %players%
  • %players%'[s] [([currently] selected|current)] [game] (language|locale) [setting]
Since: 2.3
Return Type: Text
Currently selected game language of a player. The value of the language is not defined properly. The vanilla Minecraft client will use lowercase language / country pairs separated by an underscore, but custom resource packs may use any format they wish.

Examples:

message player's current language

Last Attacker

🔗

Expression

Patterns:
  • [the] last attacker of %entity%
  • %entity%'[s] last attacker
Since: 2.5.1
Return Type: Object
The last block or entity that attacked an entity.

Examples:

send "%last attacker of event-entity%"

Last Color

🔗

Expression

Patterns:
  • [the] last color[s] of %texts%
  • %texts%'[s] last color[s]
Since: 2.6
Return Type: Text
The colors used at the end of a string. The colors of the returned string will be formatted with their symbols.

Examples:

set {_color} to the last colors of "<red>hey<blue>yo"

Last Damage

🔗

Expression

Patterns:
Since: 2.5.1
Return Type: Number
The last damage that was done to an entity. Note that changing it doesn't deal more/less damage.

Examples:

set last damage of event-entity to 2

Last Damage Cause

🔗

Expression

Patterns:
Since: 2.2-Fixes-V10
Return Type: Damage Cause
Cause of last damage done to an entity

Examples:

set last damage cause of event-entity to fire tick

Last Loaded Server Icon

🔗

Expression

Patterns:
  • [the] [last[ly]] loaded server icon
Since: 2.3
Requirements: Paper 1.12.2 or newer
Return Type: Server Icon
Returns the last loaded server icon with the load server icon effect.

Examples:

set {server-icon} to the last loaded server icon

Last Resource Pack Response

🔗

Expression

Patterns:
  • [the] [last] resource pack response[s] of %players%
  • %players%'[s] [last] resource pack response[s]
Since: 2.4
Requirements: Paper 1.9 or newer
Return Type: Resource Pack State
Returns the last resource pack response received from a player.

Examples:

if player's last resource pack response is deny or download fail:

Last Spawned Entity

🔗

Expression

Patterns:
  • [the] [last[ly]] (spawned|shot) %*entity type%
  • [the] [last[ly]] dropped (item)
  • [the] [last[ly]] (created|struck) (lightning)
  • [the] [last[ly]] (launched|deployed) (firework)
Since: 1.3 (spawned entity), 2.0 (shot entity), 2.2-dev26 (dropped item), 2.7 (struck lightning, firework)
Return Type: Entity
Holds the entity that was spawned most recently with the spawn effect (section), dropped with the drop effect, shot with the shoot effect or created with the lightning effect. Please note that even though you can spawn multiple mobs simultaneously (e.g. with 'spawn 5 creepers'), only the last spawned mob is saved and can be used. If you spawn an entity, shoot a projectile and drop an item you can however access all them together.

Examples:

spawn a priest
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
teleport player to last struck lightning
delete last launched firework

Last/First Login Time

🔗

Expression

Patterns:
Since: 2.5
Return Type: Date
When a player last/first logged in the server. 'last login' requires paper to get the last login, otherwise it will get the last time they were seen on the server.

Examples:

command /onlinefor:
    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

🔗

Expression

Patterns:
Since: 2.3
Return Type: Entity
The leash holder of a living entity.

Examples:

set {_example} to the leash holder of the target mob

Length

🔗

Expression

Patterns:
Since: 2.1
Return Type: long
The length of a text, in number of characters.

Examples:

set {_l} to length of the string argument

Level

🔗

Expression

Patterns:
Since: unknown (before 2.1)
Usable in events: level change
Return Type: long
The level of a player.

Examples:

reduce the victim's level by 1
set the player's level to 0

Level Progress

🔗

Expression

Patterns:
Since: 2.0
Usable in events: level change
Return Type: Number
The player's progress in reaching the next level, this represents the experience bar in the game. Please note that this value is between 0 and 1 (e.g. 0.5 = half experience bar). Changing this value can cause the player's level to change if the resulting level progess is negative or larger than 1, e.g. increase the player's level progress by 0.5 will make the player gain a level if their progress was more than 50%.

Examples:

# use the exp bar as mana
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

🔗

Expression

Patterns:
Since: 1.3.4
Return Type: byte
Gets the light level at a certain location which ranges from 0 to 15. It can be separated into sunlight (15 = direct sunlight, 1-14 = indirect) and block light (torches, glowstone, etc.). The total light level of a block is the maximum of the two different light types.

Examples:

# set vampire players standing in bright sunlight on fire
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

Loaded Plugins

🔗

Expression

Patterns:
  • [(all [[of] the]|the)] [loaded] plugins
Since: 2.7
Return Type: Text
An expression to obtain a list of the names of the server's loaded plugins.

Examples:

if the loaded plugins contains "Vault":
    broadcast "This server uses Vault plugin!"

send "Plugins (%size of loaded plugins%): %plugins%" to player

Location

🔗

Expression

Patterns:
  • [the] [event-](location|position)
Since: 2.0
Return Type: Location
The location where an event happened (e.g. at an entity or block), or a location relative to another (e.g. 1 meter above another location).

Examples:

drop 5 apples at the event-location # exactly the same as writing 'drop 5 apples'
set {_loc} to the location 1 meter above the player

Location

🔗

Expression

Patterns:
Since: 2.0
Return Type: Location
The location where an event happened (e.g. at an entity or block), or a location relative to another (e.g. 1 meter above another location).

Examples:

drop 5 apples at the event-location # exactly the same as writing 'drop 5 apples'
set {_loc} to the location 1 meter above the player

Location

🔗

Expression

Patterns:
Since: Unknown
Return Type: Location
The location of a block or entity. This not only represents the x, y and z coordinates of the location but also includes the world and the direction an entity is looking (e.g. teleporting to a saved location will make the teleported entity face the same saved direction every time). Please note that the location of an entity is at it's feet, use head location to get the location of the head.

Examples:

set {home::%uuid of player%} to the location of the player
message "You home was set to %player's location% in %player's world%."

Location At

🔗

Expression

Patterns:
  • [the] (location|position) [at] [\(][x[ ][=[ ]]]%number%, [y[ ][=[ ]]]%number%, [and] [z[ ][=[ ]]]%number%[\)] [[(in|of) [[the] world]] %world%]
Since: 2.0
Return Type: Location
Allows to create a location from three coordinates and a world.

Examples:

set {_loc} to the location at arg-1, arg-2, arg-3 of the world arg-4
distance between the player and the location (0, 0, 0) is less than 200

Loop Iteration

🔗

Expression

Patterns:
  • [the] loop(-| )(counter|iteration)[-%*number%]
Since: INSERT VERSION
Return Type: long
Returns the loop's current iteration count (for both normal and while loops).

Examples:

while player is online:
    give player 1 stone
    wait 5 ticks
    if loop-counter > 30:
        stop loop

loop {top-balances::*}:
    if loop-iteration <= 10:
        broadcast "##%loop-iteration% %loop-index% has $%loop-value%"

Loop value

🔗

Expression

Patterns:
  • [the] loop-<.+>
Since: 1.0, INSERT VERSION (loop-counter)
Return Type: Object
Returns the currently looped value.

Examples:

# Countdown
loop 10 times:
    message "%11 - loop-number%"
    wait a second

# Generate a 10x10 floor made of randomly colored 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

loop {top-balances::*}:
    loop-iteration <= 10
    send "##%loop-iteration% %loop-index% has $%loop-value%"

Loot

🔗

Expression

Patterns:
  • [the] loot
Since: 2.7
Requirements: MC 1.16+
Return Type: Item
The loot that will be generated in a 'loot generate' event.

Examples:

on loot generate:
    chance of %10
    add 64 diamonds
    send "You hit the jackpot!!"

Lore

🔗

Expression

Patterns:
Since: 2.1
Return Type: Text
An item's lore.

Examples:

set the 1st line of the item's lore to "&lt;orange&gt;Excalibur 2.0"

MOTD

🔗

Expression

Patterns:
  • [the] [(default)|(shown|displayed)] (MOTD|message of [the] day)
Since: 2.3
Return Type: Text
The message of the day in the server list. This can be changed in a server list ping event only. 'default MOTD' returns the default MOTD always and can't be changed.

Examples:

on server list ping:
    set the motd to "Join now!"

Max Durability

🔗

Expression

Patterns:
Since: 2.5
Return Type: long
The maximum durability of an item.

Examples:

maximum durability of diamond sword
if max durability of player's tool is not 0: # Item is damageable

Max Health

🔗

Expression

Patterns:
Since: 2.0
Usable in events: damage, death
Return Type: Number
The maximum health of an entity, e.g. 10 for a player.

Examples:

on join:
    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

🔗

Expression

Patterns:
  • [the] max[imum] minecart (speed|velocity) of %entities%
  • %entities%'[s] max[imum] minecart (speed|velocity)
Since: 2.5.1
Return Type: Number
The maximum speed of a minecart.

Examples:

on right click on minecart:
    set max minecart speed of event-entity to 1

Max Players

🔗

Expression

Patterns:
  • [the] [(real|default)|(fake|shown|displayed)] max[imum] player[s] [count|amount|number|size]
  • [the] [(real|default)|(fake|shown|displayed)] max[imum] (count|amount|number|size) of players
Since: 2.3, 2.7 (modify max real players)
Requirements: Paper 1.16+ (modify max real players)
Return Type: integer
The count of max players. This can be changed in a server list ping event only. 'real max players' returns the real count of max players of the server and can be modified on Paper 1.16 or later.

Examples:

on server list ping:
    set the max players count to (online players count + 1)

Maximum Freeze Time

🔗

Expression

Patterns:
  • [the] max[imum] freeze time of %entities%
  • %entities%'[s] max[imum] freeze time
Since: 2.7
Return Type: Timespan
The maximum amount of time an entity can spend in powdered snow before taking damage.

Examples:

difference between player's freeze time and player's max freeze time is less than 1 second:
    send "you're about to freeze!" to the player

Maximum Stack Size

🔗

Expression

Patterns:
Since: 2.1
Return Type: long
The maximum stack size of the specified material, e.g. 64 for torches, 16 for buckets, and 1 for swords.

Examples:

send "You can only pick up %max stack size of player's tool% of %type of (player's tool)%" to player

Me

🔗

Expression

Patterns:
  • me
  • my[self]
Since: 2.1.1
Return Type: Player
A 'me' expression that can be used in players' effect commands only.

Examples:

!heal me
!kick myself
!give a diamond axe to me

Mending Repair Amount

🔗

Expression

Patterns:
  • [the] [mending] repair amount
Since: 2.5.1
Return Type: long
The number of durability points an item is to be repaired in a mending event. Modifying the repair amount will affect how much experience is given to the player after mending.

Examples:

on item mend:
    set the mending repair amount to 100

Message

🔗

Expression

Patterns:
  • [the] [chat( |-)]message
  • [the] (join|log[ ]in)( |-)message
  • [the] (quit|leave|log[ ]out|kick)( |-)message
  • [the] death( |-)message
Since: 1.4.6 (chat message), 1.4.9 (join & quit messages), 2.0 (death message)
Usable in events: chat, join, quit, death
Return Type: Text
The (chat) message of a chat event, the join message of a join event, the quit message of a quit event, or the death message on a death event. This expression is mostly useful for being changed.

Examples:

on chat:
    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

🔗

Expression

Patterns:
Since: 2.2-dev36
Return Type: Object
Metadata is a way to store temporary data on entities, blocks and more that disappears after a server restart.

Examples:

set metadata value "healer" of player to true
broadcast "%metadata value ""healer"" of player%"
clear metadata value "healer" of player

Middle of Location

🔗

Expression

Patterns:
  • [the] (middle|center) [point] of %location%
  • %location%'[s] (middle|center) [point]
Since: 2.6.1
Return Type: Location
Returns the middle/center of a location. In other words, returns the middle of the X, Z coordinates and the floor value of the Y coordinate of a location.

Examples:

command /stuck:
    executable by: players
    trigger:
        teleport player to the center of player's location
        send "You're no longer stuck."

Minecart Derailed / Flying Velocity

🔗

Expression

Patterns:
  • [the] [minecart] (derailed|flying) velocity of %entities%
  • %entities%'[s] [minecart] (derailed|flying) velocity
Since: 2.5.1
Return Type: Vector
The velocity of a minecart as soon as it has been derailed or as soon as it starts flying.

Examples:

on right click on minecart:
    set derailed velocity of event-entity to vector 2, 10, 2

Money

🔗

Expression

Patterns:
Since: 2.0, 2.5 (offline players)
Requirements: Vault, an economy plugin that supports Vault
Return Type: Money
How much virtual money a player has (can be changed).

Examples:

message "You have %player's money%" # the currency name will be added automatically
remove 20$ from the player's balance # replace '$' by whatever currency you use
add 200 to the player's account # or omit the currency altogether

Moon Phase

🔗

Expression

Patterns:
  • [the] (lunar|moon) phase[s] of %worlds%
  • %worlds%'[s] (lunar|moon) phase[s]
Since: 2.7
Requirements: Paper 1.16+
Return Type: Moon Phase
The current moon phase of a world.

Examples:

if moon phase of player's world is full moon:
    send "Watch for the wolves!"

Moved blocks

🔗

Expression

Patterns:
  • [the] moved blocks
Since: 2.2-dev27
Return Type: Block
Blocks which are moved in a piston event. Cannot be used outside of piston events.

Examples:

the moved blocks

Name / Display Name / Tab List Name

🔗

Expression

Patterns:
Since: before 2.1, 2.2-dev20 (inventory name), 2.4 (non-living entity support, changeable inventory name), 2.7 (worlds)
Return Type: Text
Represents the Minecraft account, display or tab list name of a player, or the custom name of an item, entity, block, inventory, gamerule or world.

        
  • 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 color 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.
    •         
        
  •     
  • Worlds         
                  
    • Name: The name of the world. Cannot be changed.
    •         
        

Examples:

on join:
    player has permission "name.red"
    set the player's display name to "&lt;red&gt;[admin] &lt;gold&gt;%name of player%"
    set the player's tab list name to "&lt;green&gt;%player's name%"
set the name of the player's tool to "Legendary Sword of Awesomeness"

Name / Display Name / Tab List Name

🔗

Expression

Patterns:
  • [the] ((player|tab)[ ]list name[s]) of %players%
  • %players%'[s] ((player|tab)[ ]list name[s])
Since: before 2.1, 2.2-dev20 (inventory name), 2.4 (non-living entity support, changeable inventory name), 2.7 (worlds)
Return Type: Text
Represents the Minecraft account, display or tab list name of a player, or the custom name of an item, entity, block, inventory, gamerule or world.

        
  • 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 color 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.
    •         
        
  •     
  • Worlds         
                  
    • Name: The name of the world. Cannot be changed.
    •         
        

Examples:

on join:
    player has permission "name.red"
    set the player's display name to "&lt;red&gt;[admin] &lt;gold&gt;%name of player%"
    set the player's tab list name to "&lt;green&gt;%player's name%"
set the name of the player's tool to "Legendary Sword of Awesomeness"

Named Item/Inventory

🔗

Expression

Patterns:
Since: 2.0, 2.2-dev34 (inventories)
Return Type: Object
Directly names an item/inventory, useful for defining a named item/inventory in a script. If you want to (re)name existing items/inventories you can either use this expression or use set name of <item/inventory> to <text>.

Examples:

give a diamond sword of sharpness 100 named "&lt;gold&gt;Excalibur" to the player
set tool of player to the player's tool named "&lt;gold&gt;Wand"
set the name of the player's tool to "&lt;gold&gt;Wand"
open hopper inventory named "Magic Hopper" to player

Nearest Entity

🔗

Expression

Patterns:
Since: 2.7
Return Type: Entity
Gets the entity nearest to a location or another entity.

Examples:

kill the nearest pig and cow relative to player
teleport player to the nearest cow relative to player
teleport player to the nearest entity relative to player

on click:
    kill nearest pig

New Line

🔗

Expression

Patterns:
  • n[ew]l[ine]
  • line[ ]break
Since: 2.5
Return Type: Text
Returns a line break separator.

Examples:

send "Hello%nl%Goodbye!" to player

No Damage Ticks

🔗

Expression

Patterns:
Since: 2.5
Return Type: long
The number of ticks that an entity is invulnerable to damage for.

Examples:

on damage:
    set victim's invulnerability ticks to 20 #Victim will not take damage for the next second

Now

🔗

Expression

Patterns:
  • now
Since: 1.4
Return Type: Date
The current system time of the server. Use time to get the Minecraft time of a world.

Examples:

broadcast "Current server time: %now%"

Number of Characters

🔗

Expression

Patterns:
  • number of upper[ ]case char(acters|s) in %text%
  • number of lower[ ]case char(acters|s) in %text%
  • number of digit char(acters|s) in %text%
Since: 2.5
Return Type: long
The number of uppercase, lowercase, or digit characters in a string.

Examples:

#Simple Chat Filter
on chat:
    if number of uppercase chars in message / length of message > 0.5
        cancel event
        send "&lt;red&gt;Your message has to many caps!" to player

Numbers

🔗

Expression

Patterns:
  • [(all [[of] the]|the)] (numbers|integers|decimals) (between|from) %number% (and|to) %number%
Since: 1.4.6 (integers & numbers), 2.5.1 (decimals)
Return Type: Number
All numbers between two given numbers, useful for looping. Use 'numbers' if your start is not an integer and you want to keep the fractional part of the start number constant, or use 'integers' if you only want to loop integers. You may also use 'decimals' if you want to use the decimal precision of the start number. You may want to use the 'times' expression instead, for instance 'loop 5 times:'

Examples:

loop numbers from 2.5 to 5.5: # loops 2.5, 3.5, 4.5, 5.5
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

🔗

Expression

Patterns:
  • [(all [[of] the]|the)] offline[ ]players
Since: 2.2-dev35
Return Type: Offline Player
All players that have ever joined the server. This includes the players currently online.

Examples:

send "Size of all players who have joined the server: %size of all offline players%"

Online Player Count

🔗

Expression

Patterns:
  • [the] [((real|default)|(fake|shown|displayed))] [online] player (count|amount|number)
  • [the] [((real|default)|(fake|shown|displayed))] (count|amount|number|size) of online players
Since: 2.3
Requirements: Paper (fake count)
Return Type: long
The amount of online players. This can be changed in a server list ping event only to show fake online player amount. real online player count always return the real count of online players and can't be changed.

Examples:

on server list ping:
    # This will make the max players count 5 if there are 4 players online.
    set the fake max players count to (online player count + 1)

Opened Inventory

🔗

Expression

Patterns:
  • [the] (current|open|top) inventory [of %players%]
  • %players%'[s] (current|open|top) inventory
Since: 2.2-dev24, 2.2-dev35 (Just 'current inventory' works in player events)
Return Type: Inventory
Return the currently opened inventory of a player. If no inventory is open, it returns the own player's crafting inventory.

Examples:

set slot 1 of player's current inventory to diamond sword

Parse

🔗

Expression

Patterns:
Since: 2.0
Return Type: Object
Parses text as a given type, or as a given pattern. This expression can be used in two different ways: One which parses the entire text as a single instance of a type, e.g. as a number, and one that parses the text according to a pattern. If the given text could not be parsed, this expression will return nothing and the parse error will be set if some information is available. Some notes about parsing with a pattern: - The pattern must be a Skript pattern, e.g. percent signs are used to define where to parse which types, e.g. put a %number% or %items% in the pattern if you expect a number or some items there. - You have to save the expression's value in a list variable, e.g. 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:

set {var} to line 1 parsed as number
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

🔗

Expression

Patterns:
  • [the] [last] [parse] error
Since: 2.0
Return Type: Text
The error which caused the last parse operation to fail, which might not be set if a pattern was used and the pattern didn't match the provided text at all.

Examples:

set {var} to line 1 parsed as integer
if {var} is not set:
    parse error is set:
        message "&lt;red&gt;Line 1 is invalid: %last parse error%"
    else:
        message "&lt;red&gt;Please put an integer on line 1!"

Passenger

🔗

Expression

Patterns:
Since: 2.0, 2.2-dev26 (Multiple passengers for 1.11.2+)
Return Type: Entity
The passenger of a vehicle, or the rider of a mob. For 1.11.2 and above, it returns a list of passengers and you can use all changers in it. See also: vehicle

Examples:

#for 1.11 and lower
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

Percent of

🔗

Expression

Patterns:
Since: INSERT VERSION
Return Type: Number
Returns a percentage of one or more numbers.

Examples:

set damage to 10% of victim's health
set damage to 125 percent of damage
set {_result} to {_percent} percent of 999
set {_result::*} to 10% of {_numbers::*}
set experience to 50% of player's total experience

Pi

🔗

Expression

Patterns:
  • (pi|π)
Since: 2.7
Return Type: double
Returns the mathematical constant pi. (approx. 3.1415926535)

Examples:

set {_tau} to pi * 2

Pickup Delay

🔗

Expression

Patterns:
Since: 2.7
Return Type: Timespan
The amount of time before a dropped item can be picked up by an entity.

Examples:

drop diamond sword at {_location} without velocity
set pickup delay of last dropped item to 5 seconds

Ping

🔗

Expression

Patterns:
Since: 2.2-dev36
Return Type: long
Pings of players, as Minecraft server knows them. Note that they will almost certainly be different from the ones you'd get from using ICMP echo requests. This expression is only supported on some server software (PaperSpigot).

Examples:

command /ping <player=%player%>:
    trigger:
        send "%arg-1%'s ping is %arg-1's ping%"

Plain Item

🔗

Expression

Patterns:
Since: 2.6
Return Type: Item Type
A plain item is an item with no modifications. It can be used to convert items to their default state or to match with other default items.

Examples:

if the player's tool is a plain diamond: # check if player's tool has no modifications
    send "You are holding a plain diamond!"

Player List Header and Footer

🔗

Expression

Patterns:
  • [the] (player|tab)[ ]list (header|footer) [(text|message)] of %players%
  • %players%'[s] (player|tab)[ ]list (header|footer) [(text|message)]
Since: 2.4
Requirements: Minecraft 1.13 or newer
Return Type: Text
The message above and below the player list in the tab menu.

Examples:

set all players' tab list header to "Welcome to the Server!"
send "%the player's tab list header%" to player
reset all players' tab list header

Player Protocol Version

🔗

Expression

Patterns:
Since: 2.6.2
Requirements: Paper 1.12.2 or newer
Return Type: integer
Player's protocol version. For more information and list of protocol versions visit wiki.vg.

Examples:

command /protocolversion &ltplayer&gt:
    trigger:
        send "Protocol version of %arg-1%: %protocol version of arg-1%"

Player Skull

🔗

Expression

Patterns:
Since: 2.0
Return Type: Item Type
Gets a skull item representing a player. Skulls for other entities are provided by the aliases.

Examples:

give the victim's skull to the attacker
set the block at the entity to the entity's skull

Player Weather

🔗

Expression

Patterns:
  • [the] [(client|custom)] weather of %players%
  • %players%'[s] [(client|custom)] weather
Since: 2.2-dev34
Return Type: Weather Type
The weather for a player.

Examples:

set weather of arg-player to rainy
reset player's weather
if arg-player's weather is rainy

Portal

🔗

Expression

Patterns:
  • [the] portal['s] blocks
  • [the] blocks of [the] portal
Since: 2.4
Usable in events: portal_create
Return Type: Block
The blocks associated with a portal in the portal creation event.

Examples:

on portal creation:
    loop portal blocks:
        broadcast "%loop-block% is part of a portal!"

Portal Cooldown

🔗

Expression

Patterns:
Since: INSERT VERSION
Return Type: Timespan
The amount of time before an entity can use a portal. By default, it is 15 seconds after exiting a nether portal or end gateway. Players in survival/adventure get a cooldown of 0.5 seconds, while those in creative get no cooldown. Resetting will set the cooldown back to the default 15 seconds for non-player entities and 0.5 seconds for players.

Examples:

on portal:
    wait 1 tick
    set portal cooldown of event-entity to 5 seconds

Potion Effect

🔗

Expression

Patterns:
  • [new] potion effect of %potion% [potion] [[[of] tier] %number%] [without particles] [for %time span%]
  • [new] ambient potion effect of %potion% [potion] [[[of] tier] %number%] [without particles] [for %time span%]
Since: 2.5.2
Return Type: Potion Effect
Create a new potion effect to apply to an entity or item type. Do note that when applying potion effects to tipped arrows/lingering potions, Minecraft reduces the timespan.

Examples:

set {_p} to potion effect of speed of tier 1 without particles for 10 minutes
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 Effect Tier

🔗

Expression

Patterns:
Since: 2.7
Return Type: integer
An expression to obtain the amplifier of a potion effect applied to an entity.

Examples:

if the amplifier of haste of player >= 3:

Potion Effects

🔗

Expression

Patterns:
Since: 2.5.2
Return Type: Potion Effect
Represents the active potion effects of entities and itemtypes. You can clear all potion effects of an entity/itemtype and add/remove a potion effect/type to/from an entity/itemtype. Do note you will not be able to clear the base potion effects of a potion item. In that case, just set the item to a water bottle. When adding a potion effect type (rather than a potion effect), it will default to 15 seconds with tier 1.

Examples:

set {_p::*} to active potion effects of player
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

🔗

Expression

Patterns:
  • [the] [chat] (prefix|suffix) of %players%
  • %players%'[s] [chat] (prefix|suffix)
Since: 2.0
Requirements: Vault, a chat plugin that supports Vault
Return Type: Text
The prefix or suffix as defined in the server's chat plugin.

Examples:

on chat:
    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 "[&lt;red&gt;Admin<reset>] "

Projectile Critical State

🔗

Expression

Patterns:
  • [the] (projectile|arrow) critical (state|ability|mode) of %projectiles%
  • %projectiles%'[s] (projectile|arrow) critical (state|ability|mode)
Since: 2.5.1
Return Type: Boolean
A projectile's critical state. The only currently accepted projectiles are arrows and tridents.

Examples:

on shoot:
    event-projectile is an arrow
    set projectile critical mode of event-projectile to true

Protocol Version

🔗

Expression

Patterns:
  • [the] [server] [(sent|required|fake)] protocol version [number]
Since: 2.3
Usable in events: server list ping
Requirements: Paper 1.12.2 or newer
Return Type: long
The protocol version that will be sent as the protocol version of the server in a server list ping event. For more information and list of protocol versions visit wiki.vg. If this protocol version doesn't match with the protocol version of the client, the client will see the version string. But please note that, this expression has no visual effect over the version string. For example if the server uses PaperSpigot 1.12.2, and you make the protocol version 107 (1.9), the version string will not be "Paper 1.9", it will still be "Paper 1.12.2". But then you can customize the version string as you wish. Also if the protocol version of the player is higher than protocol version of the server, it will say "Server out of date!", and if vice-versa "Client out of date!" when you hover on the ping bars.

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:

on server list ping:
    set the version string to "&lt;light green&gt;Version: &lt;orange&gt;%minecraft version%"
    set the protocol version to 0 # 13w41a (1.7) - so the player will see the custom version string almost always

Quit Reason

🔗

Expression

Patterns:
  • [the] (quit|disconnect) (cause|reason)
Since: INSERT VERSION
Requirements: Paper 1.16.5+
Return Type: Quit Reason
The quit reason as to why a player disconnected in a quit event.

Examples:

on quit:
    quit reason was kicked
    player is banned
    clear {server::player::%uuid of player%::*}

Random

🔗

Expression

Patterns:
Since: 1.4.9
Return Type: Object
Gets a random item out of a set, e.g. a random player out of all players online.

Examples:

give a diamond to a random player out of all players
give a random item out of all items to the player

Random Character

🔗

Expression

Patterns:
  • [a|%number%] random [alphanumeric] character[s] (from|between) %text% (to|and) %text%
Since: INSERT VERSION
Return Type: Text
One or more random characters between two given characters. Use 'alphanumeric' if you want only alphanumeric characters. This expression uses the Unicode numerical code of a character to determine which characters are between the two given characters. If strings of more than one character are given, only the first character of each is used.

Examples:

set {_captcha} to join (5 random characters between "a" and "z") with ""
send 3 random alphanumeric characters between "0" and "z"

Random Number

🔗

Expression

Patterns:
  • [a] random (integer|number) (from|between) %number% (to|and) %number%
Since: 1.4
Return Type: Number
A random number or integer between two given numbers. Use 'number' if you want any number with decimal parts, or use use 'integer' if you only want whole numbers. Please note that the order of the numbers doesn't matter, i.e. random number between 2 and 1 will work as well as random number between 1 and 2.

Examples:

set the player's health to a random number between 5 and 10
send "You rolled a %random integer from 1 to 6%!" to the player

Random UUID

🔗

Expression

Patterns:
  • [a] random uuid
Since: 2.5.1
Return Type: Text
Returns a random UUID.

Examples:

set {_uuid} to random uuid

Raw Name

🔗

Expression

Patterns:
Since: unknown (2.2)
Return Type: Text
The raw Minecraft material name of the given item. Note that this is not guaranteed to give same results on all servers.

Examples:

raw name of tool of player

Raw String

🔗

Expression

Patterns:
Since: 2.7
Return Type: Text
Returns the string without formatting (colors etc.) and without stripping them from it, e.g. raw "&aHello There!" would output &aHello There!

Examples:

send raw "&aThis text is unformatted!" to all players

Redstone Block Power

🔗

Expression

Patterns:
  • [the] redstone power of %blocks%
  • %blocks%'[s] redstone power
Since: 2.5
Return Type: long
Power of a redstone block

Examples:

if redstone power of targeted block is 15:
    send "This block is very powerful!"

Region

🔗

Expression

Patterns:
  • [the] [event-]region
Since: 2.1
Requirements: Supported regions plugin
Return Type: Region
The region involved in an event. This expression requires a supported regions plugin to be installed.

Examples:

on region enter:
    region is {forbidden region}
    cancel the event

Region Members & Owners

🔗

Expression

Patterns:
  • [(all|the)] (members|owner[s]) of [[the] region[s]] %regions%
  • [[the] region[s]] %regions%'[s] (members|owner[s])
Since: 2.1
Requirements: Supported regions plugin
Return Type: Offline Player
A list of members or owners of a region. This expression requires a supported regions plugin to be installed.

Examples:

on entering of a region:
    message "You're entering %region% whose owners are %owners of region%"

Regions At

🔗

Expression

Patterns:
Since: 2.1
Requirements: Supported regions plugin
Return Type: Region
All regions at a particular location. This expression requires a supported regions plugin to be installed.

Examples:

On click on a sign:
    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: &lt;gold&gt;%{_regions::*}%<r>."

Remaining Air

🔗

Expression

Patterns:
Since: unknown (before 2.1)
Return Type: Timespan
How much time a player has left underwater before starting to drown.

Examples:

player's remaining air is less than 3 seconds:
    send "hurry, get to the surface!" to the player

Respawn Anchor Charges

🔗

Expression

Patterns:
  • [the] [max[imum]] charge[s] of %blocks%
  • %blocks%'[s] [max[imum]] charge[s]
Since: 2.7
Requirements: Minecraft 1.16+
Return Type: integer
The charges of a respawn anchor.

Examples:

set the charges of event-block to 3

Respawn location

🔗

Expression

Patterns:
  • [the] respawn location
Since: 2.2-dev35
Return Type: Location
The location that a player should respawn at. This is used within the respawn event.

Examples:

on respawn:
    set respawn location to {example::spawn}

Reversed List

🔗

Expression

Patterns:
Since: 2.4
Return Type: Object
Reverses given list.

Examples:

set {_list::*} to reversed {_list::*}

Rounding

🔗

Expression

Patterns:
  • [(a|the)] round[ed] down %number%
  • [(a|the)] round[ed] %number%
  • [(a|the)] round[ed] up %number%
Since: 2.0
Return Type: long
Rounds numbers normally, up (ceiling) or down (floor) respectively.

Examples:

set {var} to rounded health of player
set line 1 of the block to rounded "%(1.5 * player's level)%"
add rounded down argument to the player's health

Saturation

🔗

Expression

Patterns:
Since: 2.2-Fixes-v10, 2.2-dev35 (fully modifiable), 2.6.2 (syntax pattern changed)
Return Type: Number
The saturation of a player. If used in a player event, it can be omitted and will default to event-player.

Examples:

set saturation of player to 20

Scoreboard Tags

🔗

Expression

Patterns:
  • [(all [[of] the]|the)] scoreboard tags of %entities%
  • %entities%'[s] scoreboard tags
Since: 2.3
Return Type: Text
Scoreboard tags are simple list of texts stored directly in the data of an entity. So this is a Minecraft related thing, not Bukkit, so the tags will not get removed when the server stops. You can visit visit Minecraft Wiki for more info. This is changeable and valid for any type of entity. Also you can use use the Has Scoreboard Tag condition to check whether an entity has the given tags.

Requires Minecraft 1.11+ (actually added in 1.9 to the game, but added in 1.11 to Spigot).

Examples:

on spawn of a monster:
    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

🔗

Expression

Patterns:
  • [the] script[['s] name]
  • name of [the] script
Since: 2.0
Usable in events: Script Load/Unload
Return Type: Text
Holds the current script's name (the file name without '.sk').

Examples:

on script load:
    set {running::%script%} to true
on script unload:
    set {running::%script%} to false

Sea Level

🔗

Expression

Patterns:
Since: 2.5.1
Return Type: long
Gets the sea level of a world.

Examples:

send "The sea level in your world is %sea level in player's world%"

Sea Pickles

🔗

Expression

Patterns:
  • [the] [(min|max)[imum]] [sea] pickle(s| (count|amount)) of %blocks%
  • %blocks%'[s] [(min|max)[imum]] [sea] pickle(s| (count|amount))
Since: 2.7
Return Type: integer
An expression to obtain or modify data relating to the pickles of a sea pickle block.

Examples:

on block break:
    type of block is sea pickle
    send "Wow! This stack of sea pickles contained %event-block's sea pickle count% pickles!"
    send "It could've contained a maximum of %event-block's maximum sea pickle count% pickles!"
    send "It had to have contained at least %event-block's minimum sea pickle count% pickles!"
    cancel event
    set event-block's sea pickle count to event-block's maximum sea pickle count
    send "This bad boy is going to hold so many pickles now!!"

Server Icon

🔗

Expression

Patterns:
  • [the] [((default)|(shown|sent))] [server] icon
Since: 2.3
Requirements: Paper 1.12.2 or newer
Return Type: Server Icon
Icon of the server in the server list. Can be set to an icon that loaded using the load server icon effect, or can be reset to the default icon in a server list ping. 'default server icon' returns the default server icon (server-icon.png) always and cannot be changed.

Examples:

on script load:
    set {server-icons::default} to the default server icon

Sets

🔗

Expression

Patterns:
  • [all [[of] the]|the|every] %*type%
Since: 1.0 pre-5, 2.7 (classinfo)
Return Type: Object
Returns a list of all the values of a type. Useful for looping.

Examples:

loop all attribute types:
    set loop-value attribute of player to 10
    message "Set attribute %loop-value% to 10!"

Shooter

🔗

Expression

Patterns:
Since: 1.3.7
Return Type: Living Entity
The shooter of a projectile.

Examples:

shooter is a skeleton

Shuffled List

🔗

Expression

Patterns:
Since: 2.2-dev32
Return Type: Object
Shuffles given list randomly. This is done by replacing indices by random numbers in resulting list.

Examples:

set {_list::*} to shuffled {_list::*}

Sign Text

🔗

Expression

Patterns:
  • [the] line %number% [of %block%]
  • [the] (1st|first|2nd|second|3rd|third|4th|fourth) line [of %block%]
Since: 1.3
Return Type: Text
A line of text on a sign. Can be changed, but remember that there is a 16 character limit per line (including color codes that use 2 characters each).

Examples:

on rightclick on sign:
    line 2 of the clicked block is "[Heal]":
        heal the player
    set line 3 to "%player%"

Slot Index

🔗

Expression

Patterns:
  • [the] [(raw|unique)] index of %slots%
  • %slots%'[s] [(raw|unique)] index
Since: 2.2-dev35, INSERT VERSION (raw index)
Return Type: long
Index of an an inventory slot. Other types of slots may or may not have indices. Note that comparing slots with numbers is also possible; if index of slot is same as the number, comparisonsucceeds. This expression is mainly for the cases where you must for some reason save the slot numbers.

Raw index of slot is unique for the view, see Minecraft Wiki

Examples:

if index of event-slot is 10:
    send "You bought a pie!"

if display name of player's top inventory is "Custom Menu": # 3 rows inventory
    if raw index of event-slot > 27: # outside custom inventory
        cancel event

Sorted List

🔗

Expression

Patterns:
Since: 2.2-dev19
Return Type: Object
Sorts given list in natural order. All objects in list must be comparable; if they're not, this expression will return nothing.

Examples:

set {_sorted::*} to sorted {_players::*}

Source Block

🔗

Expression

Patterns:
  • [the] source block
Since: 2.7
Usable in events: Spread
Return Type: Block
The source block in a spread event.

Examples:

on spread:
    if the source block is a grass block:
        set the source block to a dirt block

Spawn

🔗

Expression

Patterns:
  • [the] spawn[s] [(point|location)[s]] [of %worlds%]
  • %worlds%'[s] spawn[s] [(point|location)[s]]
Since: 1.4.2
Return Type: Location
The spawn point of a world.

Examples:

teleport all players to spawn
set the spawn point of "world" to the player's location

Spawn Reason

🔗

Expression

Patterns:
  • [the] spawn[ing] reason
Since: 2.3
Return Type: Spawn Reason
The spawn reason in a spawn event.

Examples:

on spawn:
    spawn reason is reinforcements or breeding
    cancel event

Spawner Type

🔗

Expression

Patterns:
  • [the] (spawner|entity|creature) type[s] of %blocks%
  • %blocks%'[s] (spawner|entity|creature) type[s]
Since: 2.4
Return Type: Entity Type
Retrieves, sets, or resets the spawner's entity type

Examples:

on right click:
    if event-block is spawner:
        send "Spawner's type is %target block's entity type%"

Special Number

🔗

Expression

Patterns:
  • (NaN|[(-|minus)](infinity|∞)) value
  • value of (NaN|[(-|minus)](infinity|∞))
Since: 2.2-dev32d
Return Type: Number
Special number values, namely NaN, Infinity and -Infinity

Examples:

if {_number} is infinity value:

Spectator Target

🔗

Expression

Patterns:
Since: 2.4-alpha4, 2.7 (Paper Spectator Event)
Requirements: Paper
Return Type: Entity
Grabs the spectator target entity of the players.

Examples:

on player start spectating of player:
    message "&c%spectator target% currently has %{game::kills::%spectator target%}% kills!" to the player

on player stop spectating:
    past spectator target was a zombie
    set spectator target to the nearest skeleton

Speed

🔗

Expression

Patterns:
  • [the] (walk[ing]|fl(y[ing]|ight))[( |-)]speed of %players%
  • %players%'[s] (walk[ing]|fl(y[ing]|ight))[( |-)]speed
Since: unknown (before 2.1)
Return Type: Number
A player's walking or flying speed. Both can be changed, but values must be between -1 and 1 (excessive values will be changed to -1 or 1 respectively). Negative values reverse directions. Please note that changing a player's speed will change their FOV just like potions do.

Examples:

set the player's walk speed to 1
increase the argument's fly speed by 0.1

Substring

🔗

Expression

Patterns:
  • [the] (part|sub[ ](text|string)) of %texts% (between|from) [ind(ex|ices)|character[s]] %number% (and|to) [(index|character)] %number%
  • [the] (first|last) [%number%] character[s] of %texts%
  • [the] %number% (first|last) characters of %texts%
  • [the] character[s] at [(index|position|indexes|indices|positions)] %numbers% (in|of) %texts%
Since: 2.1, 2.5.2 (character at, multiple strings support)
Return Type: Text
Extracts part of a text. You can either get the first <x> characters, the last <x> characters, the character at index <x>, or the characters between indices <x> and <y>. The indices <x> and <y> should be between 1 and the length of the text (other values will be fit into this range).

Examples:

set {_s} to the first 5 characters of the text argument
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)

🔗

Expression

Patterns:
  • tps from [the] last ([1] minute|1[ ]m[inute])
  • tps from [the] last 5[ ]m[inutes]
  • tps from [the] last 15[ ]m[inutes]
  • [the] tps
Since: 2.2-dev36
Return Type: Number
Returns the 3 most recent TPS readings, like the /tps command. This expression is only supported on some server software (PaperSpigot).

Examples:

broadcast "%tps%"

Tamer

🔗

Expression

Patterns:
  • [the] tamer
Since: 2.2-dev25
Return Type: Player
The tamer of an entity. Can only be used in entity tame events. You can use 'event-entity' to refer tamed entity itself.

Examples:

on tame:
    if the tamer is a player:
        send "someone tamed something!" to console

Target

🔗

Expression

Patterns:
Since: 1.4.2, 2.7 (Reset)
Return Type: Entity
For players this is the entity at the crosshair. For mobs and experience orbs this is the entity they are attacking/following (if any).

Examples:

on entity target:
    if entity's target is a player:
        send "You're being followed by an %entity%!" to target of entity

reset target of entity # Makes the entity target-less
delete targeted entity of player # for players it will delete the target
delete target of last spawned zombie # for entities it will make them target-less

Targeted Block

🔗

Expression

Patterns:
  • [the] target[ed] block[s] [of %players%]
  • %players%'[s] target[ed] block[s]
  • [the] actual[ly] target[ed] block[s] [of %players%]
  • %players%'[s] actual[ly] target[ed] block[s]
Since: 1.0
Return Type: Block
The block at the crosshair. This regards all blocks that are not air as fully solid, e.g. torches will be like a solid stone block for this expression.

Examples:

# A command to set the block a player looks at to a specific type:
command /setblock &lt;material&gt;:
    trigger:
        set targeted block to argument

Teleport Cause

🔗

Expression

Patterns:
  • [the] teleport (cause|reason|type)
Since: 2.2-dev35
Return Type: Teleport Cause
The teleport cause within a player teleport event.

Examples:

on teleport:
    teleport cause is nether portal, end portal or end gateway
    cancel event

Temperature

🔗

Expression

Patterns:
  • [the] temperature[s] of %blocks%
  • %blocks%'[s] temperature[s]
Since: 2.2-dev35
Return Type: Number
Temperature at given block.

Examples:

message "%temperature of the targeted block%"

Ternary

🔗

Expression

Patterns:
Since: 2.2-dev36
Return Type: Object
A shorthand expression for returning something based on a condition.

Examples:

set {points} to 500 if {admin::%player's uuid%} is set else 100

The Egg

🔗

Expression

Patterns:
  • [the] [thrown] egg
Since: 2.7
Usable in events: Egg Throw
Return Type: Projectile
The egg thrown in a Player Egg Throw event.

Examples:

spawn an egg at the egg

Time

🔗

Expression

Patterns:
  • [the] time[s] [([with]in|of) %worlds%]
  • %worlds%'[s] time[s]
Since: 1.0
Return Type: Time
The time of a world.

Examples:

time in world is between 18:00 and 6:00:
    broadcast "It's night-time, watch out for monsters!"

Time Played

🔗

Expression

Patterns:
Since: 2.5, 2.7 (offline players)
Requirements: MC 1.15+ (offline players)
Return Type: Timespan
The amount of time a player has played for on the server. This info is stored in the player's statistics in the main world's data folder. Changing this will also change the player's stats which can be views in the client's statistics menu. Using this expression on offline players on Minecraft 1.14 and below will return nothing <none>.

Examples:

set {_t} to time played of player
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

🔗

Expression

Patterns:
  • [the] time since %dates%
Since: 2.5
Return Type: Timespan
The time that has passed since a date. If the given date is in the future, a value will not be returned.

Examples:

send "%time since 5 minecraft days ago% has passed since 5 minecraft days ago!" to player

Tool

🔗

Expression

Patterns:
  • [the] ((tool|held item|weapon)|(off[ ]hand (tool|item))) [of %living entities%]
  • %living entities%'[s] ((tool|held item|weapon)|(off[ ]hand (tool|item)))
Since: 1.0
Return Type: Slot
The item an entity is holding in their main or off hand.

Examples:

player's tool is a pickaxe
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

Total Experience

🔗

Expression

Patterns:
Since: 2.7
Return Type: integer
The total experience, in points, of players or experience orbs. Adding to a player's experience will trigger Mending, but setting their experience will not.

Examples:

set total experience of player to 100

add 100 to player's experience

if player's total experience is greater than 100:
    set player's total experience to 0
    give player 1 diamond

Type of

🔗

Expression

Patterns:
Since: 1.4, 2.5.2 (potion effect), 2.7 (block datas)
Return Type: Object
Type of a block, item, entity, inventory or potion effect. Types of items, blocks and block datas are item types similar to them but have amounts of one, no display names and, on Minecraft 1.13 and newer versions, are undamaged. Types of entities and inventories are entity types and inventory types known to Skript. Types of potion effects are potion effect types.

Examples:

on rightclick on an entity:
    message "This is a %type of clicked entity%!"

UUID

🔗

Expression

Patterns:
Since: 2.1.2, 2.2 (offline players' UUIDs), 2.2-dev24 (other entities' UUIDs)
Return Type: Text
The UUID of a player, entity or world. In the future there will be an option to use a player's UUID instead of the name in variable names (i.e. when %player% is used), but for now this can be used. Please note that this expression does not work for offline players if you are under 1.8!

Examples:

# prevents people from joining the server if they use the name of a player
# 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

🔗

Expression

Patterns:
Since: 2.2-dev13b
Return Type: Item Type
Creates unbreakable copies of given items.

Examples:

unbreakable iron sword #Creates unbreakable iron sword

Unix Date

🔗

Expression

Patterns:
Since: 2.5
Return Type: Date
Converts given Unix timestamp to a date. The Unix timespan represents the number of seconds elapsed since 1 January 1970.

Examples:

unix date of 946684800 #1 January 2000 12:00 AM (UTC Time)

Unix Timestamp

🔗

Expression

Patterns:
  • [the] unix timestamp of %dates%
  • %dates%'[s] unix timestamp
Since: 2.2-dev31
Return Type: Number
Converts given date to Unix timestamp. This is roughly how many seconds have elapsed since 1 January 1970.

Examples:

unix timestamp of now

Value Within

🔗

Expression

Patterns:
Since: 2.7
Return Type: Object
Gets the value within objects. Usually used with variables to get the value they store rather than the variable itself, or with lists to get the values of a type.

Examples:

set {_entity} to a random entity out of all entities
delete entity within {_entity} # This deletes the entity itself and not the value stored in the variable

set {_list::*} to "something", 10, "test" and a zombie
broadcast the strings within {_list::*} # "something", "test"

Vectors - Angle Between

🔗

Expression

Patterns:
Since: 2.2-dev28
Return Type: Number
Gets the angle between two vectors.

Examples:

send "%the angle between vector 1, 0, 0 and vector 0, 1, 1%"

Vectors - Arithmetic

🔗

Expression

Patterns:
Since: 2.2-dev28
Return Type: Vector
Arithmetic expressions for vectors.

Examples:

set {_v} to vector 1, 2, 3 // vector 5, 5, 5
set {_v} to {_v} ++ {_v}
set {_v} to {_v} -- {_v}
set {_v} to {_v} ** {_v}
set {_v} to {_v} // {_v}

Vectors - Create from Direction

🔗

Expression

Patterns:
Since: INSERT VERSION
Return Type: Vector
Creates vectors from given directions. Relative directions are relative to the origin, (0, 0, 0). Therefore, the vector from the direction 'forwards' is (0, 0, 1).

Examples:

set {_v} to vector from direction upwards
set {_v} to vector in direction of player
set {_v} to vector in horizontal direction of player
set {_v} to vector from facing of player
set {_v::*} to vectors from north, south, east, and west

Vectors - Create from XYZ

🔗

Expression

Patterns:
Since: 2.2-dev28
Return Type: Vector
Creates a vector from x, y and z values.

Examples:

set {_v} to vector 0, 1, 0

Vectors - Cross Product

🔗

Expression

Patterns:
Since: 2.2-dev28
Return Type: Vector
Gets the cross product between two vectors.

Examples:

send "%vector 1, 0, 0 cross vector 0, 1, 0%"

Vectors - Cylindrical Shape

🔗

Expression

Patterns:
  • [a] [new] cylindrical vector [(from|with)] [radius] %number%, [yaw] %number%(,| and) [height] %number%
Since: 2.2-dev28
Return Type: Vector
Forms a 'cylindrical shaped' vector using yaw to manipulate the current point.

Examples:

loop 360 times:
    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

🔗

Expression

Patterns:
Since: 2.2-dev28
Return Type: Number
Gets the dot product between two vectors.

Examples:

set {_dot} to {_v1} dot {_v2}

Vectors - Length

🔗

Expression

Patterns:
  • [the] (vector|standard|normal) length[s] of %vectors%
  • %vectors%'[s] (vector|standard|normal) length[s]
Since: 2.2-dev28
Return Type: Number
Gets or sets the length of a vector.

Examples:

send "%standard length of vector 1, 2, 3%"
set {_v} to vector 1, 2, 3
set standard length of {_v} to 2
send "%standard length of {_v}%"

Vectors - Location Vector Offset

🔗

Expression

Patterns:
Since: 2.2-dev28
Return Type: Location
Returns the location offset by vectors.

Examples:

set {_loc} to {_loc} ~ {_v}

Vectors - Normalized

🔗

Expression

Patterns:
Since: 2.2-dev28
Return Type: Vector
Returns the same vector but with length 1.

Examples:

set {_v} to normalized {_v}

Vectors - Random Vector

🔗

Expression

Patterns:
  • [a] random vector
Since: 2.2-dev28, 2.7 (signed components)
Return Type: Vector
Creates a random unit vector.

Examples:

set {_v} to a random vector

Vectors - Spherical Shape

🔗

Expression

Patterns:
  • [new] spherical vector [(from|with)] [radius] %number%, [yaw] %number%(,| and) [pitch] %number%
Since: 2.2-dev28
Return Type: Vector
Forms a 'spherical shaped' vector using yaw and pitch to manipulate the current point.

Examples:

loop 360 times:
    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

🔗

Expression

Patterns:
  • [the] squared length[s] of %vectors%
  • %vectors%'[s] squared length[s]
Since: 2.2-dev28
Return Type: Number
Gets the squared length of a vector.

Examples:

send "%squared length of vector 1, 2, 3%"

Vectors - Vector Between Locations

🔗

Expression

Patterns:
Since: 2.2-dev28
Return Type: Vector
Creates a vector between two locations.

Examples:

set {_v} to vector between {_loc1} and {_loc2}

Vectors - Vector Projection

🔗

Expression

Patterns:
Since: INSERT VERSION
Return Type: Vector
An expression to get the vector projection of two vectors.

Examples:

set {_projection} to vector projection of vector(1, 2, 3) onto vector(4, 4, 4)

Vectors - Vector from Location

🔗

Expression

Patterns:
Since: 2.2-dev28
Return Type: Vector
Creates a vector from a location.

Examples:

set {_v} to vector of {_loc}

Vectors - Vector from Pitch and Yaw

🔗

Expression

Patterns:
  • [a] [new] vector (from|with) yaw %number% and pitch %number%
Since: 2.2-dev28
Return Type: Vector
Creates a vector from a yaw and pitch value.

Examples:

set {_v} to vector from yaw 45 and pitch 45

Vectors - Velocity

🔗

Expression

Patterns:
Since: 2.2-dev31
Return Type: Vector
Gets or changes velocity of an entity.

Examples:

set player's velocity to {_v}

Vectors - XYZ Component

🔗

Expression

Patterns:
  • [the] [vector] (x|y|z) [component[s]] of %vectors%
  • %vectors%'[s] [vector] (x|y|z) [component[s]]
Since: 2.2-dev28
Return Type: Number
Gets or changes the x, y or z component of a vector.

Examples:

set {_v} to vector 1, 2, 3
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

🔗

Expression

Patterns:
Since: 2.0
Return Type: Entity
The vehicle an entity is in, if any. This can actually be any entity, e.g. spider jockeys are skeletons that ride on a spider, so the spider is the 'vehicle' of the skeleton. See also: passenger

Examples:

vehicle of the player is a minecart

Version

🔗

Expression

Patterns:
  • ([craft]bukkit|minecraft|skript)( |-)version
Since: 2.0
Return Type: Text
The version of Bukkit, Minecraft or Skript respectively.

Examples:

message "This server is running Minecraft %minecraft version% on Bukkit %bukkit version%"
message "This server is powered by Skript %skript version%"

Version String

🔗

Expression

Patterns:
  • [the] [shown|custom] version [string|text]
Since: 2.3
Usable in events: Server List Ping
Requirements: Paper 1.12.2+
Return Type: Text
The text to show if the protocol version of the server doesn't match with protocol version of the client. You can check the protocol version expression for more information about this. This can only be set in a server list ping event.

Examples:

on server list ping:
    set the protocol version to 0 # 13w41a (1.7), so it will show the version string always
    set the version string to "&lt;light green&gt;Version: &lt;orange&gt;%minecraft version%"

View Distance

🔗

Expression

Patterns:
Since: 2.4
Requirements: Paper
Return Type: integer
The view distance of a player as set by the server. Can be changed. NOTE: This is the view distance sent by the server to the player. This has nothing to do with client side view distance settings NOTE: This may not work on some versions (such as MC 1.14.x). The return value in this case will be the view distance set in system.properties.

Examples:

set view distance of player to 10
set {_view} to view distance of player
reset view distance of all players
add 2 to view distance of player

View Distance of Client

🔗

Expression

Patterns:
  • [the] client view distance[s] of %players%
  • %players%'[s] client view distance[s]
Since: 2.5
Requirements: 1.13.2+
Return Type: long
The view distance of the client. Can not be changed. This differs from the server side view distance of player as this will retrieve the view distance the player has set on their client.

Examples:

set {_clientView} to the client view distance of player
set view distance of player to client view distance of player

Weather

🔗

Expression

Patterns:
Since: 1.0
Usable in events: weather change
Return Type: Weather Type
The weather in the given or the current world.

Examples:

set weather to clear
weather in "world" is rainy

Whitelist

🔗

Expression

Patterns:
  • [the] white[ ]list
Since: 2.5.2
Return Type: Offline Player
A server's whitelist.This expression can be used to add/remove players to/from the whitelist, to enable it and disable it (set whitelist to true / set whitelist to false), and to empty it (reset whitelist)

Examples:

set whitelist to false
add all players to whitelist
reset the whitelist

World

🔗

Expression

Patterns:
Since: 1.0
Return Type: World
The world the event occurred in.

Examples:

world is "world_nether"
teleport the player to the world's spawn
set the weather in the player's world to rain
set {_world} to world of event-chunk

World Environment

🔗

Expression

Patterns:
  • [the] [world] environment of %worlds%
  • %worlds%'[s] [world] environment
Since: 2.7
Return Type: World Environment
The environment of a world

Examples:

if environment of player's world is nether:
    apply fire resistance to player for 10 minutes

World Seed

🔗

Expression

Patterns:
Since: 2.2-dev35
Return Type: long
The seed of given world. Note that it will be returned as Minecraft internally treats seeds, not as you specified it in world configuration.

Examples:

broadcast "Seed: %seed of player's world%"

World from Name

🔗

Expression

Patterns:
  • [the] world [(named|with name)] %text%
Since: 2.6.1
Return Type: World
Returns the world from a string.

Examples:

world named {game::world-name}
the world "world"

Worlds

🔗

Expression

Patterns:
  • [(all [[of] the]|the)] worlds
Since: 1.0
Return Type: World
All worlds of the server, useful for looping.

Examples:

loop all worlds:
    broadcast "You're in %loop-world%" to loop-world

X Times

🔗

Expression

Patterns:
Since: 1.4.6
Return Type: long
Integers between 1 and X, used in loops to loop X times.

Examples:

loop 20 times:
    broadcast "%21 - loop-number% seconds left.."
    wait 1 second

X of Item

🔗

Expression

Patterns:
Since: 1.2
Return Type: Object
An expression to be able to use a certain amount of items where the amount can be any expression. Please note that this expression is not stable and might be replaced in the future.

Examples:

give level of player of pickaxes to the player

Yaw / Pitch

🔗

Expression

Patterns:
Since: 2.0, 2.2-dev28 (vector yaw/pitch)
Return Type: Number
The yaw or pitch of a location or vector.

Examples:

log "%player%: %location of player%, %player's yaw%, %player's pitch%" to "playerlocs.log"
set {_yaw} to yaw of player
set {_p} to pitch of target entity
\ No newline at end of file diff --git a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/functions.html b/docs/nightly/enhancement/merge-master-into-feature-attempt-2/functions.html deleted file mode 100644 index 2029810a14e..00000000000 --- a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/functions.html +++ /dev/null @@ -1 +0,0 @@ - Skript Documentation - 2.8.0-dev-nightly-49c4fae

Functions

Note:

These functions are defined by Skript. You may also create your own functions! Tutorial for doing so is planned, but right now you need to seek it elsewhere.

abs

🔗

Function

Patterns:
  • abs(n: number)
Since: 2.2
Return Type: Number
Returns the absolute value of the argument, i.e. makes the argument positive.

Examples:

abs(3) = 3
abs(-2) = 2

acos

🔗

Function

Patterns:
  • acos(n: number)
Since: 2.2
Return Type: Number
The inverse of the cosine, also called arccos. Returns result in degrees, not radians. Only returns values from 0 to 180.

Examples:

acos(0) = 90
acos(1) = 0
acos(0.5) = 30

asin

🔗

Function

Patterns:
  • asin(n: number)
Since: 2.2
Return Type: Number
The inverse of the sine, also called arcsin. Returns result in degrees, not radians. Only returns values from -90 to 90.

Examples:

asin(0) = 0
asin(1) = 90
asin(0.5) = 30

atan

🔗

Function

Patterns:
  • atan(n: number)
Since: 2.2
Return Type: Number
The inverse of the tangent, also called arctan. Returns result in degrees, not radians. Only returns values from -90 to 90.

Examples:

atan(0) = 0
atan(1) = 45
atan(10000) = 89.9943

atan2

🔗

Function

Patterns:
  • atan2(x: number, y: number)
Since: 2.2
Return Type: Number
Similar to atan, but requires two coordinates and returns values from -180 to 180. The returned angle is measured counterclockwise in a standard mathematical coordinate system (x to the right, y to the top).

Examples:

atan2(0, 1) = 0
atan2(10, 0) = 90
atan2(-10, 5) = -63.4349

calcExperience

🔗

Function

Patterns:
  • calcExperience(level: long)
Since: 2.2-dev32
Return Type: long
Calculates the total amount of experience needed to achieve given level from scratch in Minecraft.

Examples:

Missing examples.

caseEquals

🔗

Function

Patterns:
  • caseEquals(strs: strings)
Since: 2.5
Return Type: Boolean
Checks if the contents of a list of strings are strictly equal with case sensitivity.

Examples:

caseEquals("hi", "Hi") = false
caseEquals("text", "text", "text") = true
caseEquals({some list variable::*})

ceil

🔗

Function

Patterns:
  • ceil(n: number)
Since: 2.2
Return Type: long
Rounds a number up, i.e. returns the closest integer larger than or equal to the argument.

Examples:

ceil(2.34) = 3
ceil(2) = 2
ceil(2.99) = 3

ceiling

🔗

Function

Patterns:
  • ceiling(n: number)
Since: 2.2
Return Type: long
Alias of ceil.

Examples:

ceiling(2.34) = 3
ceiling(2) = 2
ceiling(2.99) = 3

clamp

🔗

Function

Patterns:
  • clamp(values: numbers, min: number, max: number)
Since: INSERT VERSION
Return Type: Number
Clamps one or more values between two numbers.

Examples:

clamp(5, 0, 10) = 5
clamp(5.5, 0, 5) = 5
clamp(0.25, 0, 0.5) = 0.25
clamp(5, 7, 10) = 7
clamp((5, 0, 10, 9, 13), 7, 10) = (7, 7, 10, 9, 10)
set {_clamped::*} to clamp({_values::*}, 0, 10)

cos

🔗

Function

Patterns:
  • cos(n: number)
Since: 2.2
Return Type: Number
The cosine function. This is basically the sine shifted by 90°, i.e. cos(a) = sin(a + 90°), for any number a. Uses degrees, not radians.

Examples:

cos(0) = 1
cos(90) = 0

date

🔗

Function

Patterns:
  • date(year: number, month: number, day: number, hour: number = [[integer:0]], minute: number = [[integer:0]], second: number = [[integer:0]], millisecond: number = [[integer:0]], zone_offset: number = [[double:NaN]], dst_offset: number = [[double:NaN]])
Since: 2.2
Return Type: Date
Creates a date from a year, month, and day, and optionally also from hour, minute, second and millisecond. A time zone and DST offset can be specified as well (in minutes), if they are left out the server's time zone and DST offset are used (the created date will not retain this information).

Examples:

date(2014, 10, 1) # 0:00, 1st October 2014
date(1990, 3, 5, 14, 30) # 14:30, 5th May 1990
date(1999, 12, 31, 23, 59, 59, 999, -3*60, 0) # almost year 2000 in parts of Brazil (-3 hours offset, no DST)

exp

🔗

Function

Patterns:
  • exp(n: number)
Since: 2.2
Return Type: Number
The exponential function. You probably don't need this if you don't know what this is.

Examples:

exp(0) = 1
exp(1) = 2.7183

floor

🔗

Function

Patterns:
  • floor(n: number)
Since: 2.2
Return Type: long
Rounds a number down, i.e. returns the closest integer smaller than or equal to the argument.

Examples:

floor(2.34) = 2
floor(2) = 2
floor(2.99) = 2

isNaN

🔗

Function

Patterns:
  • isNaN(n: number)
Since: INSERT VERSION
Return Type: Boolean
Returns true if the input is NaN (not a number).

Examples:

isNaN(0) # false
isNaN(0/0) # true
isNaN(sqrt(-1)) # true

ln

🔗

Function

Patterns:
  • ln(n: number)
Since: 2.2
Return Type: Number
The natural logarithm. You probably don't need this if you don't know what this is. Returns NaN (not a number) if the argument is negative.

Examples:

ln(1) = 0
ln(exp(5)) = 5
ln(2) = 0.6931

location

🔗

Function

Patterns:
  • location(x: number, y: number, z: number, world: world = event-world, yaw: number = [[integer:0]], pitch: number = [[integer:0]])
Since: 2.2
Return Type: Location
Creates a location from a world and 3 coordinates, with an optional yaw and pitch. If for whatever reason the world is not found, it will fallback to the server's main world.

Examples:

location(0, 128, 0)
location(player's x-coordinate, player's y-coordinate + 5, player's z-coordinate, player's world, 0, 90)
location(0, 64, 0, world "world_nether")
location(100, 110, -145, world("my_custom_world"))

log

🔗

Function

Patterns:
  • log(n: number, base: number = [[integer:10]])
Since: 2.2
Return Type: Number
A logarithm, with base 10 if none is specified. This is the inverse operation to exponentiation (for positive bases only), i.e. log(base ^ exponent, base) = exponent for any positive number 'base' and any number 'exponent'. Another useful equation is base ^ log(a, base) = a for any numbers 'base' and 'a'. Please note that due to how numbers are represented in computers, these equations do not hold for all numbers, as the computed values may slightly differ from the correct value. Returns NaN (not a number) if any of the arguments are negative.

Examples:

log(100) = 2 # 10^2 = 100
log(16, 2) = 4 # 2^4 = 16

max

🔗

Function

Patterns:
  • max(ns: numbers)
Since: 2.2
Return Type: Number
Returns the maximum number from a list of numbers.

Examples:

max(1) = 1
max(1, 2, 3, 4) = 4
max({some list variable::*})

min

🔗

Function

Patterns:
  • min(ns: numbers)
Since: 2.2
Return Type: Number
Returns the minimum number from a list of numbers.

Examples:

min(1) = 1
min(1, 2, 3, 4) = 1
min({some list variable::*})

mod

🔗

Function

Patterns:
  • mod(d: number, m: number)
Since: 2.2
Return Type: Number
Returns the modulo of the given arguments, i.e. the remainder of the division d/m, where d and m are the arguments of this function. The returned value is always positive. Returns NaN (not a number) if the second argument is zero.

Examples:

mod(3, 2) = 1
mod(256436, 100) = 36
mod(-1, 10) = 9

offlineplayer

🔗

Function

Patterns:
  • offlineplayer(nameoruuid: string)
Since: INSERT VERSION
Return Type: Offline Player
Returns a offline player from their name or UUID. This function will still return the player if they're online.

Examples:

set {_p} to offlineplayer("Notch")
set {_p} to offlineplayer("069a79f4-44e9-4726-a5be-fca90e38aaf5")

player

🔗

Function

Patterns:
  • player(nameoruuid: string, getexactplayer: boolean = [[boolean:false]])
Since: INSERT VERSION
Return Type: Player
Returns an online player from their name or UUID, if player is offline function will return nothing. Setting 'getExactPlayer' parameter to true will return the player whose name is exactly equal to the provided name instead of returning a player that their name starts with the provided name.

Examples:

set {_p} to player("Notch") # will return an online player whose name is or starts with 'Notch'
set {_p} to player("Notch", true) # will return the only online player whose name is 'Notch'
set {_p} to player("069a79f4-44e9-4726-a5be-fca90e38aaf5") # &amp;amp;lt;none&amp;amp;gt; if player is offline

product

🔗

Function

Patterns:
  • product(ns: numbers)
Since: 2.2
Return Type: Number
Calculates the product of a list of numbers.

Examples:

product(1) = 1
product(2, 3, 4) = 24
product({some list variable::*})
product(2, {_v::*}, and the player's y-coordinate)

rgb

🔗

Function

Patterns:
  • rgb(red: long, green: long, blue: long)
Since: 2.5
Return Type: Color
Returns a RGB color from the given red, green and blue parameters.

Examples:

dye player's leggings rgb(120, 30, 45)

round

🔗

Function

Patterns:
  • round(n: number, d: number = [[integer:0]])
Since: 2.2, 2.7 (decimal placement)
Return Type: Number
Rounds a number, i.e. returns the closest integer to the argument. Place a second argument to define the decimal placement.

Examples:

round(2.34) = 2
round(2) = 2
round(2.99) = 3
round(2.5) = 3

sin

🔗

Function

Patterns:
  • sin(n: number)
Since: 2.2
Return Type: Number
The sine function. It starts at 0° with a value of 0, goes to 1 at 90°, back to 0 at 180°, to -1 at 270° and then repeats every 360°. Uses degrees, not radians.

Examples:

sin(90) = 1
sin(60) = 0.866

sqrt

🔗

Function

Patterns:
  • sqrt(n: number)
Since: 2.2
Return Type: Number
The square root, which is the inverse operation to squaring a number (for positive numbers only). This is the same as (argument) ^ (1/2) – other roots can be calculated via number ^ (1/root), e.g. set {_l} to {_volume}^(1/3). Returns NaN (not a number) if the argument is negative.

Examples:

sqrt(4) = 2
sqrt(2) = 1.4142
sqrt(-1) = NaN

sum

🔗

Function

Patterns:
  • sum(ns: numbers)
Since: 2.2
Return Type: Number
Sums a list of numbers.

Examples:

sum(1) = 1
sum(2, 3, 4) = 9
sum({some list variable::*})
sum(2, {_v::*}, and the player's y-coordinate)

tan

🔗

Function

Patterns:
  • tan(n: number)
Since: 2.2
Return Type: Number
The tangent function. This is basically sin(arg)/cos(arg). Uses degrees, not radians.

Examples:

tan(0) = 0
tan(45) = 1
tan(89.99) = 5729.5779

vector

🔗

Function

Patterns:
  • vector(x: number, y: number, z: number)
Since: 2.2-dev23
Return Type: Vector
Creates a new vector, which can be used with various expressions, effects and functions.

Examples:

vector(0, 0, 0)

world

🔗

Function

Patterns:
  • world(name: string)
Since: 2.2
Return Type: World
Gets a world from its name.

Examples:

set {_nether} to world("%{_world}%_nether")
\ No newline at end of file diff --git a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/index.html b/docs/nightly/enhancement/merge-master-into-feature-attempt-2/index.html deleted file mode 100644 index 9d51c329db0..00000000000 --- a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/index.html +++ /dev/null @@ -1,22 +0,0 @@ - Skript Documentation - 2.8.0-dev-nightly-49c4fae

Documentation

Skript is (surprise, surprise) a scripting plugin for the Bukkit platform. It is easy to use for simple tasks, but you can also create really complex things with it. The syntax of Skript is close to English, but it is still not magic. While you might succeed with experimentation for simple tasks, for anything more complex you will need some guidance.

This is Skript's documentation. You will find all supported features of the plugin here, along with some useful examples. We don't have tutorials yet, but you can find good ones using whatever search engine you prefer.

Quick Look

 command /sethome:
-     permission: skript.home # Permission required for this command
-     description: Set your home # Description of this command
-     executable by: players # Console won't be able to run this command
-     trigger: # The actual trigger/code that will run when someone do /sethome
-         # Set a unique variable to sender's location
-         set {home::%uuid of player%} to location of player
-         # Send a message to the sender
-         message "Set your home to <grey>%location of player%<reset>"
- 
- command /home:
-     permission: skript.home
-     description: Teleport yourself to your home
-     trigger:
-         # Check if that variable we used in /sethome has been set (in other words, if player ever ran /sethome)
-         if {home::%uuid of player%} is not set:
-             message "You have not set your home yet!"
-             stop trigger # stop the code here, lines below won't run
-         # Teleport the player to their home
-         teleport player to {home::%uuid of player%}
-         send "&aYou have been teleported."
- 

Latest Stable Version

Skript ${stable-version}

Latest Version

Skript ${latest-version}

Found something incorrect in this documentation? Please report it to the issue tracker.

We are looking for docs authors! Currently, the only documentation is generated automatically. It would be nice to have some hand-written content such as tutorials on the docs as well. For example, currently we don't have a tutorial on how to use loops here; This makes it harder for newcomers to learn. Check this issue for more details and if you're interested in helping out.

Documentation Repo • Site developed by Ayham Al-Ali • Site Version ${site-version} • Generated on 18/12/2023

\ No newline at end of file diff --git a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/js/functions.js b/docs/nightly/enhancement/merge-master-into-feature-attempt-2/js/functions.js deleted file mode 100644 index d6f785ee7d9..00000000000 --- a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/js/functions.js +++ /dev/null @@ -1,353 +0,0 @@ -let isCookiesAccepted = getCookie("cookies-accepted") === "true"; - -// <> Cookies -function setCookie(cname, cvalue, exdays, force = false) { - if (!isCookiesAccepted && !force) - return; - - const d = new Date(); - d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); - let expires = "expires=" + d.toUTCString(); - document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/; SameSite=None; Secure"; -} - -function getCookie(cname) { - let name = cname + "="; - let ca = document.cookie.split(';'); - for (let i = 0; i < ca.length; i++) { - let c = ca[i]; - while (c.charAt(0) == ' ') { - c = c.substring(1); - } - if (c.indexOf(name) == 0) { - return c.substring(name.length, c.length); - } - } - return ""; -} - -// Cookies - -// <> localStorage - -/** - * Set the value of local storage item - * @param {string} item id - * @param {object} value - * @param {double} exdays time in days - */ -function setStorageItem(item, value, exdays, force = false) { - if (!isCookiesAccepted && !force) - return; - - const d = new Date(); - d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); - localStorage.setItem(item, value + "; " + d.getTime()); -} - -/** - * Remove a local storage item - * @param {string} item the id of the item - */ -function removeStorageItem(item) { - localStorage.removeItem(item) -} - -/** - * Get local storage item (value & time if has one) - * @param {string} item the item id - * @param {boolean} noExpireationCheck whether to check for expiration time and remove the item - * @returns the item object - */ -function getStorageItem(item, noExpireationCheck = false) { - let result = localStorage.getItem(item); - if (!result) - return null; - - if (!noExpireationCheck) { - if (isStorageItemExpired(result)) { - removeStorageItem(item); - return null; - } - } - result = result.split("; ")[0]; - return result; -} - -/** - * Get local storage item value after split at ';' - * @param {string} item the id of th item - * @returns the item value - */ -function getStorageItemValue(item) { - let result = localStorage.getItem(item); - if (!result) - return null; - return result.split("; ")[0]; -} - -/** - * @param {string} string the value of the item not the item id (the value without splitting) - * @returns the expiration date - */ -function getStorageItemExpiration(value) { - let expires = localStorage.getItem(value).split("; ")[1]; - if (!expires) { // item with no expiration date - return null; - } - return new Date(expires); -} - -/** - * - * @param string the value of the item not the item id (the value without splitting) - * @returns whether expired or not - */ -function isStorageItemExpired(value) { - let expires = parseInt(value.split("; ")[1]); - if (!expires) { // item with no expiration date - return null; - } - return new Date(expires) < new Date(); -} - -// localStorage - - - -function getApiValue(element, placeholder, apiPathName, callback, noReplace = false) { - let placeholderName = placeholder.replace("ghapi-", ""); - let cv = getStorageItem(placeholder); // cached value - if (noReplace) { - if (cv) { - callback(cv, true); - } else { - $.getJSON(ghAPI + `/${apiPathName}`, (data) => { - let value = callback(data, false); - setStorageItem(placeholder, value, 0.2); - }) - } - return; - } - - let innerHTML = element.innerHTML; - if (innerHTML.includes(`\${${placeholderName}}`)) { - if (cv) { - element.innerHTML = element.innerHTML.replaceAll(`\${${placeholderName}}`, cv); - } else { - $.getJSON(ghAPI + `/${apiPathName}`, (data) => { - let value = callback(data, false); - element.innerHTML = element.innerHTML.replaceAll(`\${${placeholderName}}`, value); - setStorageItem(placeholder, value, 0.2); - }) - } - } -} - -// Copy texts/links to clipboard -function copyToClipboard(value) { - setTimeout(() => { - let cb = document.body.appendChild(document.createElement("input")); - cb.value = value; - cb.focus(); - cb.select(); - document.execCommand('copy'); - cb.parentNode.removeChild(cb); - }, 50) -} - -// Show notification -function showNotification(text, bgColor, color) { - var noti = document.body.appendChild(document.createElement("span")); - noti.id = "notification-box"; - - setTimeout(() => { - noti.textContent = text; - if (bgColor) - noti.styles.backgroundColor = bgColor; - if (color) - noti.styles.backgroundColor = color; - noti.classList.add("activate-notification"); - setTimeout(() => { - noti.classList.remove("activate-notification"); - setTimeout(() => { - noti.parentNode.removeChild(noti); - }, 200); - }, 1500); - }, 50); -} - -// <> Magic Text (&k) -function getRandomChar() { - chars = "ÂÃÉÊÐÑÙÚÛÜéêëãòóôēĔąĆćŇň1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ~!@#$%^&*()-=_+{}["; - return chars.charAt(Math.floor(Math.random() * chars.length) + 1) -} - -function magicTextGen(element) { - var msg = element.textContent; - var length = msg.length; - - setInterval(() => { - var newMsg = ""; - for (i = 0; i <= length; i++) { - newMsg += getRandomChar(msg.charAt(i)); - } - element.textContent = newMsg; - - }, 30) -} - -function renderMagicText() { - document.querySelectorAll('.magic-text').forEach((e) => { - magicTextGen(e); - }) -} -// Magic Text (&k) - -// Replace Github placeholders -function replacePlaceholders(element) { - let innerHTML = element.innerHTML; - if (innerHTML.includes("${latest-version}")) { - getApiValue(element, "ghapi-latest-version", "releases", (data) => { - return data[0]["tag_name"]; - }); - } - - if (innerHTML.includes("${latest-version-changelog}")) { - getApiValue(element, "ghapi-latest-version-changelog", "releases", (data) => { - return data["body"].replaceAll("\\r\\n", "
"); - }); - } - - if (innerHTML.includes("${stable-version}")) { - getApiValue(element, "ghapi-stable-version", "releases/latest", (data) => { - return data["tag_name"]; - }); - } - - if (innerHTML.includes("${stable-version-changelog}")) { - getApiValue(element, "ghapi-stable-version-changelog", "releases/latest", (data) => { - return data["body"].replaceAll("\\r\\n", "
"); - }); - } - - if (innerHTML.includes("${latest-issue-")) { - getApiValue(element, "ghapi-latest-issue-user", "issues?per_page=1", (data) => { - return data[0]["user"]["login"]; - }); - getApiValue(element, "ghapi-latest-issue-title", "issues?per_page=1", (data) => { - return data[0]["title"]; - }); - getApiValue(element, "ghapi-latest-issue-date", "issues?per_page=1", (data) => { - return data[0]["created_at"]; - }); - } - - if (innerHTML.includes("${latest-pull-")) { - getApiValue(element, "ghapi-latest-pull-user", "pulls?per_page=1", (data) => { - return data[0]["user"]["login"]; - }); - getApiValue(element, "ghapi-latest-pull-title", "pulls?per_page=1", (data) => { - return data[0]["title"]; - }); - getApiValue(element, "ghapi-latest-pull-date", "pulls?per_page=1", (data) => { - return data[0]["created_at"]; - }); - } - - if (innerHTML.includes("${site-version}")) { - element.innerHTML = element.innerHTML.replaceAll("${site-version}", siteVersion); - } - - if (innerHTML.includes("${contributors-size}")) { - getApiValue(element, "ghapi-contributors-size", "contributors?per_page=500", (data) => { - return data.length; - }); - } -} - -// <> Syntax Highlighting - -// ORDER MATTERS!! -// All regexes must be sorrouneded with () to be able to use group 1 as the whole match since Js doesn't have group 0 -// Example: .+ = X -// Example: (.+) = ✓ -var patterns = []; // [REGEX, CLASS] - -function registerSyntax(regexString, flags, clazz) { - try { - regex = new RegExp(regexString, flags); - patterns.push([regex, clazz]); - } catch (error) { - console.warn(`Either your browser doesn't support this regex or the regex is incorrect (${regexString}):` + error); - } -} - -registerSyntax("((?") - - for (let j = 0; j < lines.length; j++) { - Loop2: for (let i = 0; i < patterns.length; i++) { - let match; - let regex = patterns[i][0]; - let oldLine = lines[j]; - - while ((match = regex.exec(oldLine)) != null) { - lines[j] = lines[j].replaceAll(regex, `$1`) - if (regex.lastIndex == 0) // Break after it reaches the end of exec count to avoid inf loop - continue Loop2; - } - } - } - element.innerHTML = lines.join("
") -} -// Syntax Highlighting - -// Offset page's scroll - Used for anchor scroll correction -function offsetAnchor(event, id) { // event can be null - let content = document.querySelector("#content"); - let element = document.getElementById(id); - - if (content && element) { - if (event != null) - event.preventDefault(); - content.scroll(0, element.offsetTop - 25); // Should be less than the margin in .item-wrapper so it doesn't show the part of the previous .item-wrapper - } -} - -// <> Toggle a specific doc element block - -// Active syntax -var lastActiveSyntaxID; -function toggleSyntax(elementID) { - let element = document.getElementById(elementID) - if (!element) - return - - if (lastActiveSyntaxID != null) - document.getElementById(lastActiveSyntaxID).classList.remove("active-syntax"); - - element.classList.add("active-syntax"); - lastActiveSyntaxID = elementID; -} - -// Toggle a specific doc element block \ No newline at end of file diff --git a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/js/main.js b/docs/nightly/enhancement/merge-master-into-feature-attempt-2/js/main.js deleted file mode 100644 index 9925d224fc3..00000000000 --- a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/js/main.js +++ /dev/null @@ -1,408 +0,0 @@ -const siteVersion = "2.2.0"; // site version is different from skript version -const ghAPI = "https://api.github.com/repos/SkriptLang/Skript"; - -// ID Scroll -const links = document.querySelectorAll("div.item-wrapper"); -const contents = document.querySelector("#content"); - -lastActiveSideElement = null; -navContents = document.getElementById("nav-contents"); - -if (contents) { - setTimeout(() => { - contents.addEventListener('scroll', (e) => { - links.forEach((ha) => { - const rect = ha.getBoundingClientRect(); - if (rect.top > 0 && rect.top < 350) { - // const location = window.location.toString().split("#")[0]; - // history.replaceState(null, null, location + "#" + ha.id); // Not needed since lastActiveSideElement + causes history spam - - if (lastActiveSideElement != null) { - lastActiveSideElement.classList.remove("active-item"); - } - - lastActiveSideElement = document.querySelectorAll(`#nav-contents a[href="#${ha.id}"]`)[0]; - if (lastActiveSideElement != null) { - lastActiveSideElement.classList.add("active-item"); - navContents.scroll(0, lastActiveSideElement.offsetTop - 100); - } - } - }); - })}, 50); // respect auto hash scroll -} - - -// Active Tab -const pageLink = window.location.toString().replaceAll(/(.*)\/(.+?).html(.*)/gi, '$2'); -if (pageLink === "" || pageLink == window.location.toString()) // home page - when there is no `.+?.html` pageLink will = windown.location due to current regex - document.querySelectorAll('#global-navigation a[href="index.html"]')[0].classList.add("active-tab"); -else - document.querySelectorAll(`#global-navigation a[href="${pageLink}.html"]`)[0].classList.add("active-tab"); - - -// No Left Panel -for (e in {"content-no-docs": 0, "content": 1}) { - let noLeftPanel = document.querySelectorAll(`#${e}.no-left-panel`)[0]; - if (noLeftPanel != null) - document.querySelectorAll('#side-nav')[0].classList.add('no-left-panel'); -} - -// Magic Text -renderMagicText(); - -// Anchor scroll correction -document.querySelectorAll(".link-icon").forEach((e) => { - e.addEventListener("click", (event) => { - let id = e.getAttribute("href").replace("#", ""); - if (id != "" && id != null) { - // offsetAnchor(event, id); - event.preventDefault(); - toggleSyntax(id); - } - }); -}) - -// Open description/pattern links in same tab rather than scrolling because hash links uses search bar -document.querySelectorAll(".item-wrapper a:not(.link-icon)").forEach((e) => { - e.addEventListener("click", (event) => { - event.preventDefault(); - window.open(e.href); - }); -}) - - -// Anchor click copy link -const currentPageLink = window.location.toString().replaceAll(/(.+?.html)(.*)/gi, '$1'); -document.querySelectorAll(".item-title > a").forEach((e) => { - e.addEventListener("click", (event) => { - copyToClipboard(window.location.toString().split(/[?#]/g)[0] + "?search=#" + e.parentElement.parentElement.id); - showNotification("✅ Link copied successfully.") - }); -}) - -// New element label click -document.querySelectorAll(".new-element").forEach((e) => { - e.addEventListener("click", (event) => { - searchNow("is:new"); - }); -}) - -// <> Search Bar -const versionComparePattern = /.*?(\d\.\d(?:\.\d|))(\+|-|).*/gi; -const versionPattern = / ?v(?:ersion|):(\d\.\d(?:\.\d|-(?:beta|alpha|dev)\d*|))(\+|-|)/gi; -const typePattern = / ?t(?:ype|):(\w+)/gi; -const newPattern = / ?is:(new)/gi; -const resultsFoundText = "result(s) found"; - -function versionCompare(base, target) { // Return -1, 0, 1 - base = base.replaceAll(versionComparePattern, "$1").replaceAll(/[^0-9]/gi, ""); - target = target.replaceAll(versionComparePattern, "$1").replaceAll(/[^0-9]/gi, ""); - - base = parseInt(base) < 100 ? parseInt(base) * 10 : parseInt(base); // convert ten's to hundred's to fix (2.5.1+ not triggering 2.6 by converting 26 -> 260) - target = parseInt(target) < 100 ? parseInt(target) * 10 : parseInt(target); - - if (target > base) - return 1 - if (target == base) - return 0 - if (target < base) - return -1 -} - -var searchBar; -var searchIcon; - -// Load search link -var linkParams = new URLSearchParams(window.location.href.replace("+", "%2B").split("?")[1]) // URLSearchParams decode '+' as space while encodeURI keeps + as is -if (linkParams && linkParams.get("search")) { - setTimeout(() => { - searchNow(linkParams.get("search")) // anchor link sometimes appear after the search param so filter it - }, 20) // Until searchBar is loaded -} else { - // Search the hash value if available - requestedElementID = window.location.hash; - if (requestedElementID != undefined && requestedElementID != "") { - setTimeout(() => { - searchNow(requestedElementID); - }, 20) // Until searchBar is loaded - } -} - -var content = document.getElementById("content"); -if (content) { - let isNewPage = linkParams.get("isNew") != null; - content.insertAdjacentHTML('afterbegin', ``); - content.insertAdjacentHTML('afterbegin', ``); - searchBar = document.getElementById("search-bar"); - searchIcon = document.getElementById("search-icon"); - - if (isNewPage) { - let tags = [] - let options = "" - content.insertAdjacentHTML('afterbegin', `${options}`); - options = document.getElementById("search-version"); - - getApiValue(null, "skript-versions", "tags?per_page=83&page=2", (data, isCached) => { // 83 and page 2 matters to filter dev branches (temporary solution) - if (isCached) - data = data.split(","); - - for (let i = 0; i < data.length; i++) { - let tag; - if (isCached) { - tag = data[i]; - } else { - tag = data[i]["name"]; - } - tags.push(tag.replaceAll(/(.*)-(dev|beta|alpha).*/gi, "$1")); - } - - tags = [...new Set(tags)] // remove duplicates - - for (let i = 0; i < tags.length; i++) { - let option = document.createElement('option') - option.value = tags[i] - option.textContent = "Since v" + tags[i] - options.appendChild(option) - } - - if (!linkParams.get("search") && !window.location.href.match(/.*?#.+/)) - searchNow(`v:${tags[0]}+`) - - return tags; - }, true) - - } -} else { - content = document.getElementById("content-no-docs") -} - -// Copy search link -if (searchIcon) { - searchIcon.addEventListener('click', (event) => { - let link = window.location.href.split(/[?#]/g)[0] // link without search param - link += `?search=${encodeURI(searchBar.value)}` - copyToClipboard(link) - showNotification("✅ Search link copied.") - }) -} - -// Used when selecting a version from the dropdown -function checkVersionFilter() { - let el = document.getElementById("search-version") - if (el) { - searchNow(`v:${el.value}+`) - } -} - -function searchNow(value = "") { - if (value != "") // Update searchBar value - searchBar.value = value; - - let allElements = document.querySelectorAll(".item-wrapper"); - let searchValue = searchBar.value; - let count = 0; // Check if any matches found - let pass; - - // version - let version = ""; - let versionAndUp = false; - let versionAndDown = false; - if (searchValue.match(versionPattern)) { - let verExec = versionPattern.exec(searchValue); - version = verExec[1]; - if (verExec.length > 2) { - versionAndUp = verExec[2] == "+" == true; - versionAndDown = verExec[2] == "-" == true; - } - searchValue = searchValue.replaceAll(versionPattern, "") // Don't include filters in the search - } - - // Type - let filterType; - if (searchValue.match(typePattern)) { - filterType = typePattern.exec(searchValue)[1]; - searchValue = searchValue.replaceAll(typePattern, "") - } - - // News - let filterNew; - if (searchValue.match(newPattern)) { - filterNew = newPattern.exec(searchValue)[1] == "new"; - searchValue = searchValue.replaceAll(newPattern, "") - } - - searchValue = searchValue.replaceAll(/( ){2,}/gi, " ") // Filter duplicate spaces - searchValue = searchValue.replaceAll(/[^a-zA-Z0-9 #_-]/gi, ""); // Filter none alphabet and digits to avoid regex errors (#_-) used for hash/id searching - - allElements.forEach((e) => { - let patterns = document.querySelectorAll(`#${e.id} .item-details .skript-code-block`); - for (let i = 0; i < patterns.length; i++) { // Search in the patterns for better results - let pattern = patterns[i]; - let regex = new RegExp(searchValue, "gi") - let name = document.querySelectorAll(`#${e.id} .item-title h1`)[0].textContent // Syntax Name - let desc = document.querySelectorAll(`#${e.id} .item-description`)[0].textContent // Syntax Desc - let keywords = e.getAttribute("data-keywords") - let id = e.id // Syntax ID - let filtersFound = false; - - // Version check - let versionFound; - if (version != "") { - versionFound = versionCompare(version, document.querySelectorAll(`#${e.id} .item-details:nth-child(2) td:nth-child(2)`)[0].textContent) == 0; - - if (versionAndUp || versionAndDown) { - let versions = document.querySelectorAll(`#${e.id} .item-details:nth-child(2) td:nth-child(2)`)[0].textContent.split(","); - for (const v in versions) { // split on ',' without space in case some version didn't have space and versionCompare will handle it - if (versionAndUp) { - if (versionCompare(version, versions[v]) == 1) { - versionFound = true; - break; // Performance - } - } else if (versionAndDown) { - if (versionCompare(version, versions[v]) == -1) { - versionFound = true; - break; // Performance - } - } - } - } - } else { - versionFound = true; - } - - let filterNewFound = true; - if (filterNew) { - filterNewFound = document.querySelector(`#${e.id} .item-title .new-element`) != null - } - - let filterTypeFound = true; - let filterTypeEl = document.querySelector(`#${e.id} .item-title .item-type`); - if (filterType) { - filterTypeFound = filterType.toLowerCase() === filterTypeEl.textContent.toLowerCase() - } - - if (filterNewFound && versionFound && filterTypeFound) - filtersFound = true - - if ((regex.test(pattern.textContent.replaceAll("[ ]", " ")) || regex.test(name) || - regex.test(desc) || regex.test(keywords) || "#" + id.toLowerCase() == searchValue.toLowerCase() || searchValue == "") && filtersFound) { // Replacing '[ ]' will improve some searching cases such as 'off[ ]hand' - pass = true - break; // Performance - } - } - - // Filter - let sideNavItem = document.querySelectorAll(`#nav-contents a[href="#${e.id}"]`); // Since we have new addition filter we need to loop this - if (pass) { - e.style.display = null; - if (sideNavItem) - sideNavItem.forEach(e => { - e.style.display = null; - }) - count++; - } else { - e.style.display = "none"; - if (sideNavItem) - sideNavItem.forEach(e => { - e.style.display = "none"; - }) - } - - pass = false; // Reset - }) - - searchResultBox = document.getElementById("search-bar-after"); - if (count > 0 && (version != "" || searchValue != "" || filterType || filterNew)) { - searchResultBox.textContent = `${count} ${resultsFoundText}` - searchResultBox.style.display = null; - } else { - searchResultBox.style.display = "none"; - } - - if (count == 0) { - if (document.getElementById("no-matches") == null) - document.getElementById("content").insertAdjacentHTML('beforeend', '

No matches found.

'); - } else { - if (document.getElementById("no-matches") != null) - document.getElementById("no-matches").remove(); - } - - count = 0; // reset -} - -if (searchBar) { - searchBar.focus() // To easily search after page loading without the need to click - searchBar.addEventListener('keydown', (event) => { - setTimeout(() => { // Important to actually get the value after typing or deleting + better performance - searchNow(); - }, 100); - }); -} -// Search Bar - -// <> Placeholders -// To save performance we use the class "placeholder" on the wrapper element of elements that contains the placeholder -// To only select those elements and replace their innerHTML -document.querySelectorAll(".placeholder").forEach(e => { - replacePlaceholders(e); -}); -// Placeholders - -// <> Syntax Highlighting -document.addEventListener("DOMContentLoaded", function (event) { - setTimeout(() => { - document.querySelectorAll('.item-examples .skript-code-block').forEach(el => { - highlightElement(el); - }); - document.querySelectorAll('pre code').forEach(el => { - highlightElement(el); - }); - document.querySelectorAll('.box.skript-code-block').forEach(el => { - highlightElement(el); - }); - }, 100); -}); -// Syntax Highlighting - - -// <> Example Collapse -var examples = document.querySelectorAll(".item-examples p"); -if (examples) { - setTimeout(() => { - examples.forEach(e => { - let pElement = e; - let divElement = e.parentElement.children[1]; - pElement.addEventListener("click", ev => { - if (pElement.classList.contains("example-details-opened")) { - pElement.classList.remove("example-details-opened"); - pElement.classList.add("example-details-closed"); - divElement.style.display = "none"; - } else { - pElement.classList.remove("example-details-closed"); - pElement.classList.add("example-details-opened"); - divElement.style.display = "block"; - } - }) - }) - }, 50) -} -// Example Collapse - -// <> Cookies Accecpt -if (!isCookiesAccepted) { - document.body.insertAdjacentHTML('beforeend', `

We use cookies and local storage to enhance your browsing experience and store github related statistics. By clicking "Accept", you consent to our use of cookies and local storage.

`); -} - -let cookiesBar = document.querySelector("#cookies-bar");; -let cookiesAccept = document.querySelector("#cookies-accept"); -let cookiesDeny = document.querySelector("#cookies-deny"); -if (cookiesAccept && cookiesDeny) { - cookiesAccept.addEventListener('click', () => { - setCookie('cookies-accepted', true, 99, true); - cookiesBar.remove(); - }); - cookiesDeny.addEventListener('click', () => { - cookiesBar.remove(); - }); -} -// Cookies Accecpt \ No newline at end of file diff --git a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/js/theme-switcher.js b/docs/nightly/enhancement/merge-master-into-feature-attempt-2/js/theme-switcher.js deleted file mode 100644 index 9e6314187fb..00000000000 --- a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/js/theme-switcher.js +++ /dev/null @@ -1,34 +0,0 @@ -// -// This file is made to fix theme flicker at load due to 'defer' in main.js loading -// - -// Auto load DarkMode from cookies -if (getCookie("darkMode") == "false") { - document.body.setAttribute('data-theme', 'white') - document.body.insertAdjacentHTML('beforeend', ``); -} else { - document.body.insertAdjacentHTML('beforeend', ``); - - // Auto load from system theme - // const darkThemeMq = window.matchMedia("(prefers-color-scheme: dark)"); - // if (darkThemeMq.matches) { - // document.body.removeAttribute('data-theme'); - // } else { - // document.body.setAttribute('data-theme', 'white') - // } - } - -setTimeout(() => { - var themeSwitcher = document.getElementById('theme-switch'); - themeSwitcher.addEventListener('click', (event) => { - if (document.body.getAttribute("data-theme") == null) { - document.body.setAttribute('data-theme', 'white'); - event.target.src = "./assets/light-on.svg"; - setCookie("darkMode", "false", 99); - } else { - event.target.src = "./assets/light-off.svg"; - document.body.removeAttribute('data-theme'); - setCookie("darkMode", "true", 99); - } - }); -}, 500); // For some reason this wouldn't work in index.html (only) unless some delay is added o.O \ No newline at end of file diff --git a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/sections.html b/docs/nightly/enhancement/merge-master-into-feature-attempt-2/sections.html deleted file mode 100644 index 780f2f647b1..00000000000 --- a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/sections.html +++ /dev/null @@ -1 +0,0 @@ - Skript Documentation - 2.8.0-dev-nightly-49c4fae

Sections

Conditionals

🔗

Section

Patterns:
  • else
  • else [parse] if <.+>
  • else [parse] if (any|at least one [of])
  • else [parse] if [all]
  • [parse] if (any|at least one [of])
  • [parse] if [all]
  • [parse] if <.+>
  • then [run]
  • implicit:<.+>
Since: 1.0
Conditional sections if: executed when its condition is true else if: executed if all previous chained conditionals weren't executed, and its condition is true else: executed if all previous chained conditionals weren't executed

parse if: a special case of 'if' condition that its code will not be parsed if the condition is not true else parse if: another special case of 'else if' condition that its code will not be parsed if all previous chained conditionals weren't executed, and its condition is true

Examples:

if player's health is greater than or equal to 4:
    send "Your health is okay so far but be careful!"

else if player's health is greater than 2:
    send "You need to heal ASAP, your health is very low!"

else: # Less than 2 hearts
    send "You are about to DIE if you don't heal NOW. You have only %player's health% heart(s)!"

parse if plugin "SomePluginName" is enabled: # parse if %condition%
    # This code will only be executed if the condition used is met otherwise Skript will not parse this section therefore will not give any errors/info about this section

Loop

🔗

Section

Patterns:
Since: 1.0
Loop sections repeat their code with multiple values.

A loop will loop through all elements of the given expression, e.g. all players, worlds, items, etc. The conditions & effects inside the loop will be executed for every of those elements, which can be accessed with ‘loop-’, e.g. send "hello" to loop-player. When a condition inside a loop is not fulfilled the loop will start over with the next element of the loop. You can however use stop loop to exit the loop completely and resume code execution after the end of the loop.

Loopable Values All expressions that represent more than one value, e.g. ‘all players’, ‘worlds’, etc., as well as list variables, can be looped. You can also use a list of expressions, e.g. loop the victim and the attacker, to execute the same code for only a few values.

List Variables When looping list variables, you can also use loop-index in addition to loop-value inside the loop. loop-value is the value of the currently looped variable, and loop-index is the last part of the variable's name (the part where the list variable has its asterisk *).

Examples:

loop all players:
    send "Hello %loop-player%!" to loop-player

loop items in player's inventory:
    if loop-item is dirt:
        set loop-item to air

loop 10 times:
    send title "%11 - loop-value%" and subtitle "seconds left until the game begins" to player for 1 second # 10, 9, 8 etc.
    wait 1 second

loop {Coins::*}:
    set {Coins::%loop-index%} to loop-value + 5 # Same as "add 5 to {Coins::%loop-index%}" where loop-index is the uuid of the player and loop-value is the actually coins value such as 200

Spawn

🔗

EffectSection

Patterns:
Since: 1.0, 2.6.1 (with section)
Spawn a creature. This can be used as an effect and as a section. 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.

Examples:

spawn 3 creepers at the targeted block
spawn a ghast 5 meters above the player
spawn a zombie at the player:
    set name of the zombie to ""

While Loop

🔗

Section

Patterns:
  • [do] while <.+>
Since: 2.0, 2.6 (do while)
While Loop sections are loops that will just keep repeating as long as a condition is met.

Examples:

while size of all players < 5:
    send "More players are needed to begin the adventure" to all players
    wait 5 seconds

set {_counter} to 1
do while {_counter} > 1: # false but will increase {_counter} by 1 then get out
    add 1 to {_counter}

# Be careful when using while loops with conditions that are almost
# always true for a long time without using 'wait %timespan%' inside it,
# otherwise it will probably hang and crash your server.
while player is online:
    give player 1 dirt
    wait 1 second # without using a delay effect the server will crash
\ No newline at end of file diff --git a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/structures.html b/docs/nightly/enhancement/merge-master-into-feature-attempt-2/structures.html deleted file mode 100644 index 5be3742e85b..00000000000 --- a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/structures.html +++ /dev/null @@ -1 +0,0 @@ - Skript Documentation - 2.8.0-dev-nightly-49c4fae

Structures

Aliases

🔗

Structure

Patterns:
  • aliases
Since: 1.0
Used for registering custom aliases for a script.

Examples:

aliases:
    blacklisted items = TNT, bedrock, obsidian, mob spawner, lava, lava bucket
    shiny swords = gold sword, iron sword, diamond sword

Command

🔗

Structure

Patterns:
  • command <.+>
Required Entries: trigger
Optional Entries: usage, description, prefix, permission, permission message, aliases, executable by, cooldown, cooldown message, cooldown bypass, cooldown storage
Since: 1.0
Used for registering custom commands.

Examples:

command /broadcast <string>:
    usage: A command for broadcasting a message to all players.
    permission: skript.command.broadcast
    permission message: You don't have permission to broadcast messages
    aliases: /bc
    executable by: players and console
    cooldown: 15 seconds
    cooldown message: You last broadcast a message %elapsed time% ago. You can broadcast another message in %remaining time%.
    cooldown bypass: skript.command.broadcast.admin
    cooldown storage: {cooldown::%player%}
    trigger:
        broadcast the argument

Function

🔗

Structure

Patterns:
  • [local] function <.+>
Since: 2.2, 2.7 (local functions)
Functions are structures that can be executed with arguments/parameters to run code. They can also return a value to the trigger that is executing the function. Note that local functions come before global functions execution

Examples:

function sayMessage(message: text):
    broadcast {_message} # our message argument is available in '{_message}'

local function giveApple(amount: number) :: item:
    return {_amount} of apple

function getPoints(p: player) returns number:
    return {points::%{_p}%}

Options

🔗

Structure

Patterns:
  • options
Since: 1.0
Options are used for replacing parts of a script with something else. For example, an option may represent a message that appears in multiple locations. Take a look at the example below that showcases this.

Examples:

options:
    no_permission: You're missing the required permission to execute this command!

command /ping:
    permission: command.ping
    permission message: {@no_permission}
    trigger:
        message "Pong!"

command /pong:
    permission: command.pong
    permission message: {@no_permission}
    trigger:
        message "Ping!"

Variables

🔗

Structure

Patterns:
  • variables
Since: 1.0
Used for defining variables present within a script. This section is not required, but it ensures that a variable has a value if it doesn't exist when the script is loaded.

Examples:

variables:
    {joins} = 0
    {balance::%player%} = 0

on join:
    add 1 to {joins}
    message "Your balance is %{balance::%player%}%"
\ No newline at end of file diff --git a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/text.html b/docs/nightly/enhancement/merge-master-into-feature-attempt-2/text.html deleted file mode 100644 index 340cdd3d803..00000000000 --- a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/text.html +++ /dev/null @@ -1,2 +0,0 @@ - Skript Documentation - 2.8.0-dev-nightly-49c4fae

Text in Scripts

Text (String)

Skript allows you to write pieces of text (programmers usually call them strings) in the scripts. This is done by putting the text inside double quotes, as follows:

"this is text"

Simple, isn't it? If an effect, expression, condition, trigger or function accepts something of type text or string, you can use this format to write it right there!

Formatting Text

But isn't just text a bit boring? Worry not, as Minecraft has support for colors, styles and other formatting options in chat. Most of the options also work with item and entity names.

Colors

Minecraft has 16 pre-set color codes to be used in text. Skript supports them in two different ways:

Color name tags, for example <red> - Minecraft color codes, like §c; using & works, too

Here's a table of all colors, including both Skript names and color codes:

Color Code Name Alternative Names
§0 black
§1 blue dark blue
§2 green dark green
§3 cyan aqua, dark cyan, dark aqua, dark turquoise, dark turquois
§4 red dark red
§5 purple dark purple
§6 orange orange, gold, dark yellow
§7 grey light grey, gray, light gray, silver
§8 dark gray dark grey
§9 light blue light blue, indigo
§a light green lime, lime green
§b light cyan light aqua, turquoise, turquois, light blue
§c light red pink
§d magenta light purple
§e yellow light yellow
§f white

In Minecraft 1.16, support was added for 6-digit hexadecimal colors to specify custom colors other than the 16 default color codes. A new tag can be used to format with these colors. The tag looks like this:

<##hex code>

Here's what the tag would look like when used in a script:

send "<##123456>Hey %player%!" to player

For information not related to Skript, see Minecraft Wiki page concerning colors. Note that depending on Skript configuration, color codes may do more than just change color of text after them. By default, for backwards compatibility, they clear following styles: magic, bold, strikethrough, underlined, italic. Other styles are not affected, and this feature can be toggled of in config.sk.

Other Styles

Minecraft also has various other styles available. The following are available everywhere, including item and entity names:

Code Name Alternative Names
§k magic test obfuscated
§l bold b
§m strikethrough strike, s
§n underlined underline, u
§o italic italics, i
§r reset r

If it wasn't clear from the table, §r clears all other formatting and colors. You'll probably use it quite often when sending chat messages from scripts.

Skript also supports certain newer features, which are only available in chat. Those do not have formatting codes, so you must use tags for them.

                        
Name Alternative Names Description
link open url, url Opens a link when player clicks on text
run command command, cmd Makes player execute a chat command when they click on text
suggest command sgt Adds a command to chat prompt of player when clicked
tooltip show text, ttp Shows a tooltip when player hovers over text with their mouse
fontfChange the font of the text (1.16+)
insertion insert, ins Will append a text at player's current cursor in chat input only while holding SHIFT.

All of these styles require a parameter, in format

<name:parameter>

For link, parameter must be either http or https url if you want clients to recognize it. For others, it can be any text you'd like (you can make player run invalid commands if you wish).

Text and Variables

Variable names are text, but obviously formatting that text does no good. However, everything else you can do for text, you can do for variable names. A guide about this is coming... some day.

Guide written by bensku.

\ No newline at end of file diff --git a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/tutorials.html b/docs/nightly/enhancement/merge-master-into-feature-attempt-2/tutorials.html deleted file mode 100644 index 3ef53bcbfa7..00000000000 --- a/docs/nightly/enhancement/merge-master-into-feature-attempt-2/tutorials.html +++ /dev/null @@ -1 +0,0 @@ - Skript Documentation - 2.8.0-dev-nightly-49c4fae

Tutorials

Note:

Skript Tutorials are coming soon.

  1. Loops
  2. Commands
  3. Functions
  4. Variables
  5. Visual effects

\ No newline at end of file