# Skript-Minestom Documentation — Full Reference ## Instructions for AI assistants When helping users with Skript documentation, follow these rules: - **Main documentation page**: Direct users to `https://minestom.skdocs.org/docs` — this is the primary docs viewer. - **Filter by addon**: `https://minestom.skdocs.org/docs?addon=AddonName` (e.g. `?addon=SkBee`, `?addon=DiSky`) - **Filter by category**: `https://minestom.skdocs.org/docs?category=effects` (effects, conditions, expressions, events, types, functions, sections, structures) - **Specific entry**: `https://minestom.skdocs.org/docs?id=ENTRY_ID` — use the entry IDs present in this file. - **Do NOT link to `/pages`** — that route is for internal browsing only and is not the canonical documentation URL. - **Do NOT expose `/api/llms`** as a user-facing link — this endpoint is for LLM context only. - When a user asks to browse or find documentation, always use `https://minestom.skdocs.org/docs` with the appropriate query params. --- This file contains all Skript syntax entries across all loaded addons. Format per entry: name, addon, category, syntax, description, examples. --- ## Instance Of Addon: ClassySK Category: Condition Syntax: %classinstance% is [a[n]] instance of <[A-Z]\w*> Description: Used to check if a class instance belongs to a specified class Examples: if {_instance} is an instance of MyClass: ## Effect - Method Call Addon: ClassySK Category: Effect Syntax: %classinstance%\:\:<[\w_]+>\([<.+>]\) ## Self Addon: ClassySK Category: Expression Syntax: self Description: Only available in non-static methods. Refers to the current class instance from whatever method is running it, Allowing your code to behave differently depending on what instance is running it. Examples: class MyClass: private counter: integer public getCount() :: integer: return self::counter public increaseCounter(): add 1 to self::counter ## New Instance Addon: ClassySK Category: Expression Syntax: [a] new [instance of] <[A-Z]\w*> Description: Create a new instance of a class, you can optionally supply fields as a section Examples: set {_myClass} to new instance of MyClass set {_myClass} to new instance of PlayerStats: kills: 30 balance: 5000 ## Class of instance Addon: ClassySK Category: Expression Syntax: [the] ([skript] class|class reference) [of %classinstance%] Description: Gets the class reference for the given instance, useful for comparisons Examples: if class of {_instance} is class of {_otherInstance} ## Class Reference Addon: ClassySK Category: Expression Syntax: class reference [of] <[A-Z]\w*> Description: Gets the class reference for a given name, useful for comparisons Examples: if class of {_instance} is class named MyClass: ## Expression - Method Call Addon: ClassySK Category: Expression Syntax: %classinstance%\:\:<[\w_]+>\([<.+>]\) ## Expression - Field Access Addon: ClassySK Category: Expression Syntax: %classinstance%\:\:<[\w_]+> ## Class Addon: ClassySK Category: Structure Syntax: class <[A-Z]\w*> Description: Creates a class with the specified fields and methods, see the [**Official Wiki**](https://github.com/novystar/ClassySK/wiki/Tutorials%3A-Classes-%26-Fields) for more detail Examples: class PlayerStats: public kills: integer public deaths: integer public xp: number private static levelXP: number = 100 public getRatio() :: number: return self::kills/self::deaths public getRequiredXP() :: number: set {_levelXP} to PlayerStats::levelXP return {_levelXP} - mod(self::xp, {_levelXP}) public getLevel() :: number: return 1 + floor(self::xp / PlayerStats::levelXP) ## Class Reference Addon: ClassySK Category: Type Syntax: classreference Description: Non-instance reference of a class, represents the class as a whole ## Class Instance Addon: ClassySK Category: Type Syntax: classinstance Description: Instance version of a class, holds non-static methods and fields, representing a created instance of a class. Examples: function getPlayerManager() :: PlayerManager instance: function getAnyClassInstance() :: instance: ## floor Addon: Skript Category: Function Syntax: floor(n: number) :: long Description: 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 ## concat Addon: Skript Category: Function Syntax: concat(texts: object) :: string Description: Joins the provided texts (and other things) into a single text. Examples: concat("hello ", "there") # hello there concat("foo ", 100, " bar") # foo 100 bar ## asin Addon: Skript Category: Function Syntax: asin(n: number) :: number 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 asin(1) = 90 asin(0.5) = 30 ## entityVibrationData Addon: Skript Category: Function Syntax: entityVibrationData(entity: entity, travel-time: timespan) :: vibrationdata Description: Creates vibration data targeting an entity. Examples: set {_data} to entityVibrationData(player, 5 seconds) ## trailData Addon: Skript Category: Function Syntax: trailData(target: point, color: rgblike, duration: timespan) :: traildata Description: Creates trail data for a trial particle. Examples: set {_data} to trailData(point(0, 64, 0), red, 5 seconds) ## tan Addon: Skript Category: Function Syntax: tan(n: number) :: number Description: 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 ## isNaN Addon: Skript Category: Function Syntax: isNaN(n: number) :: boolean Description: Returns true if the input is NaN (not a number). Examples: isNaN(0) # false isNaN(0/0) # true isNaN(sqrt(-1)) # true ## additions Addon: Skript Category: Function Syntax: additions(sound-id: string, tick-chance: number) :: addition Description: Creates ambient addition sound data for biome effects. Examples: set {_additions} to additions("ambient.cave", 0.01) ## mod Addon: Skript Category: Function Syntax: mod(d: number, m: number) :: number 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. 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 ## log Addon: Skript Category: Function Syntax: log(n: number, [base: number]) :: number 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'. 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 ## blockVector Addon: Skript Category: Function Syntax: blockVector(x: integer, y: integer, z: integer) :: blockvector Description: Creates a block vector with integer x, y, and z coordinates. Examples: set {_bv} to blockVector(0, 64, 0) ## blockVibrationData Addon: Skript Category: Function Syntax: blockVibrationData(block: point, travel-time: timespan) :: vibrationdata Description: Creates vibration data targeting a block. Examples: set {_data} to blockVibrationData(blockVector(0, 64, 0), 5 seconds) ## ambientParticle Addon: Skript Category: Function Syntax: ambientParticle(particle: particle, probability: number) :: ambientparticle Description: Creates ambient particle data with a spawn probability for biome effects. Examples: set {_particle} to ambientParticle(white ash, 0.118093334) ## ceiling Addon: Skript Category: Function Syntax: ceiling(n: number) :: long Description: Alias of ceil. Examples: ceiling(2.34) = 3 ceiling(2) = 2 ceiling(2.99) = 3 ## product Addon: Skript Category: Function Syntax: product(ns: number) :: number Description: 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) ## sin Addon: Skript Category: Function Syntax: sin(n: number) :: number 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 sin(60) = 0.866 ## min Addon: Skript Category: Function Syntax: min(ns: number) :: number Description: Returns the minimum number from a list of numbers. Examples: min(1) = 1 min(1, 2, 3, 4) = 1 min({some list variable::*}) ## mood Addon: Skript Category: Function Syntax: mood(sound-id: string, delay: timespan, block-search-extent: integer, offset: number) :: mood Description: Creates ambient mood sound data for biome effects. Examples: set {_mood} to mood("ambient.cave", 1 second, 8, 2) ## music Addon: Skript Category: Function Syntax: music(sound-id: string, min-delay: timespan, max-delay: timespan, replaces-current-music: boolean) :: music Description: Creates background music data with min/max delay and whether it replaces current music. Examples: set {_music} to music("music.overworld", 1 minute, 2 minutes, true) ## mm Addon: Skript Category: Function Syntax: mm(input: string, [resolvers: tagresolver]) :: component Description: Deserializes a MiniMessage string into a Component, with optional tag resolvers. You can also use to input a custom head. Examples: send mm("Hello !", resolver("name", player's name)) ## abs Addon: Skript Category: Function Syntax: abs(n: number) :: number Description: Returns the absolute value of the argument, i.e. makes the argument positive. Examples: abs(3) = 3 abs(-2) = 2 ## sum Addon: Skript Category: Function Syntax: sum(ns: number) :: number Description: 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) ## rgb Addon: Skript Category: Function Syntax: rgb(red: long, green: long, blue: long, [alpha: long]) :: color Description: Returns a RGB color from the given red, green and blue parameters. Alpha values can be added optionally, but these only take affect in certain situations, like text display backgrounds. Examples: set background color of {_text-display} to rgb(10, 50, 100, 50) ## round Addon: Skript Category: Function Syntax: round(n: number, [d: number]) :: number 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 round(2) = 2 round(2.99) = 3 round(2.5) = 3 ## sqrt Addon: Skript Category: Function Syntax: sqrt(n: number) :: number 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). Returns NaN (not a number) if the argument is negative. Examples: sqrt(4) = 2 sqrt(2) = 1.4142 sqrt(-1) = NaN ## formatNumber Addon: Skript Category: Function Syntax: formatNumber(number: number, [format: string]) :: string Description: Converts numbers to human-readable format. By default, '###,###' (e.g. '123,456,789') will be used for whole numbers and '###,###.##' (e.g. '123,456,789.00) will be used for decimal numbers. A hashtag '#' represents a digit, a comma ',' is used to separate numbers, and a period '.' is used for decimals. Will return none if the format is invalid. For further reference, see this article. Examples: command /balance: aliases: bal executable by: players trigger: set {_money} to formatNumber({money::%sender's uuid%}) send "Your balance: %{_money}%" to sender ## clamp Addon: Skript Category: Function Syntax: clamp(values: number, min: number, max: number) :: numbers Description: 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) ## player Addon: Skript Category: Function Syntax: player(from: string, [strict: boolean]) :: player Description: Find an online player from their username or UUID. Examples: send "test" to player("bob") ## exp Addon: Skript Category: Function Syntax: exp(n: number) :: number Description: 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 ## atan Addon: Skript Category: Function Syntax: atan(n: number) :: number 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 atan(1) = 45 atan(10000) = 89.9943 ## max Addon: Skript Category: Function Syntax: max(ns: number) :: number Description: Returns the maximum number from a list of numbers. Examples: max(1) = 1 max(1, 2, 3, 4) = 4 max({some list variable::*}) ## dustTransition Addon: Skript Category: Function Syntax: dustTransition(color: rgblike, transition-color: rgblike, [size: number]) :: dusttransition Description: Creates a dust transition with the given color, transition color and size. Examples: set {_data} to dustTransition(red, blue, 1) ## suggestionEntry Addon: Skript Category: Function Syntax: suggestionEntry(entry: string, tooltip: component) :: suggestionentry Description: Creates a command suggestion entry with an optional tooltip component. Examples: command /home: argument : suggestions: loop indices of {homes::%player's uuid%::*}: add suggestionEntry(loop-value, mm("%{homes::%player's uuid%::%loop-value%}%")) to suggestions trigger: if {homes::%player's uuid%::%{_home}%} isn't set: send "Home '%{_home}%' doesn't exist." stop send "Teleporting you to home '%{_home}%'..." teleport player to {homes::%player's uuid%::%{_home}%} trigger: send "Usage: /home " ## dustOption Addon: Skript Category: Function Syntax: dustOption(color: rgblike, [size: number]) :: dustoption Description: Creates dust options with the given color and size. Examples: set {_data} to dustOption(red, 1) ## resolver Addon: Skript Category: Function Syntax: resolver(name: string, value: object, [parsed: boolean]) :: tagresolver Description: Creates a MiniMessage tag resolver. Examples: set {_resolver} to resolver("name", player's name) ## cos Addon: Skript Category: Function Syntax: cos(n: number) :: number 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 cos(90) = 0 ## position Addon: Skript Category: Function Syntax: position(x: number, y: number, z: number, [yaw: number], [pitch: number]) :: position Description: Creates a position with the given x, y, z, yaw and pitch. Examples: set {_pos} to position(0, 64, 0, 90, 0) ## atan2 Addon: Skript Category: Function Syntax: atan2(x: number, y: number) :: number Description: 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 ## ceil Addon: Skript Category: Function Syntax: ceil(n: number) :: long Description: 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 ## effectData Addon: Skript Category: Function Syntax: effectData(color: rgblike, power: number) :: effectdata Description: Creates effect data for an effect particle. Examples: set {_data} to effectData(red, 1) ## date Addon: Skript Category: Function Syntax: date(year: number, month: number, day: number, [hour: number], [minute: number], [second: number], [millisecond: number], [zone_offset: number], [dst_offset: number]) :: date Description: 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) ## ln Addon: Skript Category: Function Syntax: ln(n: number) :: number Description: 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 ## acos Addon: Skript Category: Function Syntax: acos(n: number) :: number 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 acos(1) = 0 acos(0.5) = 30 ## vector Addon: Skript Category: Function Syntax: vector(x: number, y: number, z: number) :: vector Description: Creates a vector with the given x, y and z. Examples: set {_vec} to vector(1, 0, 0) ## Cancel Event Addon: Skript Category: Effect Syntax: cancel [the] event Description: Cancels the event (e.g. prevent blocks from being placed, or damage being taken). Examples: on chat: cancel event ## Locally Suppress Warning Addon: Skript Category: Effect Syntax: [local[ly]] suppress [the] (1:conflict|2:variable save|[missing] conjunction[s]|4:starting [with] expression[s]|5:deprecated syntax) warning[s] Description: Suppresses target warnings from the current script. Examples: locally suppress missing conjunction warnings suppress the variable save warnings ## Unregister Instance Addon: Skript Category: Effect Syntax: unregister [instance[s]] %instances% Description: Unregisters one or more instances from the server. Examples: unregister {-worlds::lobby} ## Continue Addon: Skript Category: Effect Syntax: continue [this loop|[the] [current] loop] 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 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)" ## Clear Resource Pack Addon: Skript Category: Effect Syntax: clear %players%'[s] [resource] pack[s] Description: Clears all resource packs from the given players. Examples: clear player's resource pack ## Delay Addon: Skript Category: Effect Syntax: (wait|halt) [for] %timespan% 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! NOTE: Using sleep/pause will completely pause the thread this effect is run on. It's intended for pausing on another thread. Examples: wait 2 minutes halt for 5 minecraft hours wait a tick sleep for 2 ticks # completely pauses the thread this effect is on for 2 ticks ## Refresh Commands Addon: Skript Category: Effect Syntax: refresh %players%'[s] commands Description: Refreshes the command list sent to the given players. Examples: refresh player's commands ## Delete Team Addon: Skript Category: Effect Syntax: (delete|unregister) team[s] %teams% Description: Unregisters a team and removes it from every client that can see it. Examples: delete team named "red" ## Regenerate Chunk Addon: Skript Category: Effect Syntax: regen[erate] %chunks% Description: Regenerates the given chunks using the instance's chunk generator. Examples: regenerate chunk at player ## Kill/Remove Addon: Skript Category: Effect Syntax: (:remove|kill) %entities% Description: If the provided entity is a livingentity and 'kill' was typed, its death animation will play. Otherwise, the entity will be removed permanently. Examples: kill all entities ## Save Instance Addon: Skript Category: Effect Syntax: save %instances% [without:without [saving] tags] Description: Saves the given instances. Examples: save current instance ## Spectator Collision Addon: Skript Category: Effect Syntax: enable spectator collision [mode] (on|for) %players% Description: Enables spectator collision mode for the given players, allowing them to collide with blocks even in spectator mode. Examples: enable spectator collision for all players ## Swing Hand Addon: Skript Category: Effect Syntax: make %livingentities% swing [their] [main] hand 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 ## Reconfigure Addon: Skript Category: Effect Syntax: reconfigure %players% Description: Puts the given players back into the configuration phase. Examples: reconfigure player ## Make Fly Addon: Skript Category: Effect Syntax: force %players% to [(start|stop)] fly[ing] Description: Forces a player to start/stop flying. Examples: make player fly force all players to stop flying ## Heal Addon: Skript Category: Effect Syntax: heal %livingentities% Description: Heals the given living entities to their maximum health. Examples: heal all players ## Respawn Addon: Skript Category: Effect Syntax: respawn %players% Description: Respawns the given players. Examples: respawn player ## Enable/Disable/Reload Script File Addon: Skript Category: Effect Syntax: ((enable|load)|2:reload|(disable|unload)) s(c|k)ript [file] %string% Description: Enables, disables, or reloads a script file. Examples: reload script "test" enable script file "testing" unload script file "script.sk" ## Destroy BossBar Addon: Skript Category: Effect Syntax: destroy boss[ ]bar[s] %bossbars% Description: Effectively deletes the provided bossbar Examples: destroy bossbar {-b} ## Feed Addon: Skript Category: Effect Syntax: feed %players% Description: Fills the player's hunger bar. Examples: feed all players ## Return Addon: Skript Category: Effect Syntax: return %objects% Description: Makes a trigger (e.g. a function) return a value Examples: function double(i: number) :: number: return 2 * {_i} function divide(i: number) returns number: return {_i} / 2 ## Use Item Addon: Skript Category: Effect Syntax: make %livingentities% (begin|start) using item [in %equipmentslot%] Description: Makes living entities begin, stop, or complete using an item in their hand. Dispatches the corresponding Minestom item use events for players. Examples: make player begin using item make player stop using active item make player complete using active item ## Kick Addon: Skript Category: Effect Syntax: kick %players% [due to %component%] Description: Kicks the given players from the server with an optional message. During a connect event, kicks the connecting player through that event instead. Examples: kick player due to "You have been banned" ## Log Addon: Skript Category: Effect Syntax: log %strings% [(to|in) [file[s]] %strings%] [with [the|a] severity [of] (1:warning|2:severe)] 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 join: log "%player% has just joined the server!" ## Look At Addon: Skript Category: Effect Syntax: (force|make) %livingentities% [to] (face [towards]|look [(at|towards)]) %entity%'s (feet:feet|eyes) Description: Forces the mob(s) or player(s) to look at an entity, vector or position. Vanilla max head pitches range from 10 to 50. Examples: force the player to look towards event-entity's feet ## Save NBT Addon: Skript Category: Effect Syntax: save %nbtcompound% (in|to) file[s] %strings% Description: Saves an NBT compound to a gzip-compressed file in the server directory. Examples: save {_nbt} to file "data/player.dat" ## Set/Assign Chunk Block Addon: Skript Category: Effect Syntax: (set|assign) [:absolute|relative] chunk [generat(or|ion)] (biome|block) at %points% to %block/biome% Description: Sets a block at a specific point within a chunk generator. Examples: set chunk block at vector(0, 64, 0) to stone ## Switch Entity Type Addon: Skript Category: Effect Syntax: (switch|change) %entities%'[s] entity[ ]type to %entitytype% Description: Changes the entity type of the given entities without despawning them. Slightly broken at times and may be removed. Examples: switch player's entity type to pig ## Make Say Addon: Skript Category: Effect Syntax: make %players% (say|send [the] message[s]) %strings% Description: Forces a player to send a message to the chat. If the message starts with a slash the player is made to run it as a command instead. A chat message goes through the normal chat pipeline, so the chat event fires and any format or recipient changes made there apply, exactly as if the player had typed it. Examples: make the player say "Hello." force all players to send the message "I love this server" make player say "/spawn" ## Bundle Material Addon: Skript Category: Effect Syntax: make %items% [act like] a bundle material for %players% Description: Make the provided players' clients view the provided items' material as bundle-acting (so you can detect scrolling). If you, for some reason, need more than one item, you must send all of the extra items you want in one effect, otherwise the old ones will not work. ## Action Bar Addon: Skript Category: Effect Syntax: send action[ ]bar %component% [to %players%] Description: Sends an action bar to the given players. Examples: send action bar "Hello World!" to all players ## Open/Close Inventory Addon: Skript Category: Effect Syntax: close %players%'[s] inventory [view] Description: Opens an inventory to a player. The player can then access and modify the inventory as if it was a chest that they 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: open the player's inventory for the player ## Show / Close Dialog Addon: Skript Category: Effect Syntax: show [dialog] %dialog/string% to %players% Description: Shows a dialog to players, or closes whatever dialog they currently have open. A dialog can be given as a value or as the namespaced key of a registered dialog, including dialogs that came from a datapack. Examples: show {_d} to player show "myserver:shop" to all players close dialog of player ## Message Addon: Skript Category: Effect Syntax: (message|send [message[s]]) %objects% [to %senders%] 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!" message "This message is a distraction. Mwahaha!" send "Your kill streak is %{kill streak::%uuid of player%}%." to player if the {_entity} exists: message "You're currently looking at a %type of the {_entity}%!" on chat: cancel event send "[%player%] >> %message%" to all players from player ## Copy Into Variable Addon: Skript Category: Effect Syntax: copy %objects% [in]to %objects% Description: Copies objects into a variable. When copying a list over to another list, the source list and its sublists are also copied over. Note: Copying a value into a variable/list will overwrite the existing data. Examples: set {_foo::bar} to 1 set {_foo::sublist::foobar} to "hey" copy {_foo::*} to {_copy::*} broadcast indices of {_copy::*} # bar, sublist broadcast {_copy::bar} # 1 broadcast {_copy::sublist::foobar} # "hey!" ## Push Addon: Skript Category: Effect Syntax: (push|thrust|pull) %entities% [along] %direction% [(at|with) [a] (speed|velocity|force) [of] %number%] Description: Push entities in a given direction or towards a specific point. Velocity values on Minestom are 1/20th (20 ticks per second is why) the value of Paper's. Examples: push the player upwards push the victim downwards at speed 0.5 push player towards player's target at speed 2 pull player along vector(1,1,1) at speed 1.5 ## Transition Weather Addon: Skript Category: Effect Syntax: transition [the] weather (of|in) %instances% to %weather% over %timespan% Description: Changes the weather of an instance over the given duration. Setting the weather without a duration lets minestom pick one based on how far the levels have to move. The duration is at least one tick. Examples: transition weather of {_instance} to thundering weather over 10 seconds transition weather of {_instance} to clear weather over 1 minute ## Replace Addon: Skript Category: Effect Syntax: replace [all|every|[the] first] %strings% in %strings% with %string% [case:with 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 "" 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 ## Play Animation Addon: Skript Category: Effect Syntax: play %animations% animation[s] on %entities% [(to|for) %players%] Description: Plays an animation for the given entities. Examples: play swing main arm animation on player ## Transition World Border Addon: Skript Category: Effect Syntax: transition [the] world border (of|in) %instances% to %worldborder% over %timespan% Description: Moves the world border of an instance to a new state over the given duration. Only the diameter transitions, so a new center or warning setting applies right away. Setting a world border without a duration changes it instantly. Examples: transition world border of {_instance} to {_border} over 30 seconds shrink world border of {_instance} to 50 over 30 seconds grow world border of {_instance} to 500 over 1 minute ## Stop Sound Addon: Skript Category: Effect Syntax: stop (all:all sound[s]|sound[s] %strings%) [(in|from) %soundcategory%] (to|for|from playing to) %players% Description: Stops specific sounds, or all sounds, from playing to players or to everybody in an instance. If no sound category is provided, the sound is stopped in every category Examples: stop sound "block.chest.open" for player stop sounds "ambient.cave" and "ambient.underwater.loop" for all players stop all sounds in music for player stop all sounds in player's instance ## Component Replace Addon: Skript Category: Effect Syntax: component replace [:first] [:regex] %strings% in %components% with %component% Description: Replaces text in adventure components in place. Optionally replaces only the first occurrence or uses regex matching. Examples: component replace "foo" in {_component} with "bar" ## Fill Chunk Addon: Skript Category: Effect Syntax: fill [generat(or|ion)] chunk [(biome|blocks)] [1:between (y|height[s]) [level[s]] %integer% and %integer%] with %block/biome% Description: Fills a chunk or a portion of it with a specific block within a chunk generator. Examples: fill chunk with stone fill chunk between y levels 0 and 64 with water ## Block Change Addon: Skript Category: Effect Syntax: make %players% see %points% as %block% [in %instance%] Description: Make the provided players see the provided points as the provided block (client sided blocks). Examples: make player see all blocks in radius 3 of player as stone in player's instance ## Send Notification Addon: Skript Category: Effect Syntax: send %frametype% notification (with title|titled) %component% (and|using|with) %item% as [the] icon to %players% Description: Sends an advancement-style notification to the given players with a frame type, title, and icon item. Examples: send task notification with title "Quest Complete!" and diamond as the icon to player ## Title - Send Addon: Skript Category: Effect Syntax: send title %component% [with subtitle %component%] [to %senders%] [for %timespan%] [with fade[(-| )]in %timespan%] [[and] [with] fade[(-| )]out %timespan%] Description: Sends a title and/or subtitle to an audience with an optional fade in, stay, and/or fade out time. If sending only the subtitle, it will only be shown if the audience currently has a title displayed. Otherwise, it will be shown when the audience is next shown a title. Additionally, if no input is given for the times, the previous times of the last sent title will be used (or default values). Use the reset title effect to restore the default values for the times. 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 ## Exit Addon: Skript Category: Effect Syntax: (exit|stop) [trigger] Description: Exits a given amount of loops and conditionals, or the entire trigger. Examples: loop {_entities::*}: exit loop if type of loop-value = player ## Do If Addon: Skript Category: Effect Syntax: <.+> if <.+> Description: Execute an effect if a condition is true. Examples: on join: give a diamond to the player if the player has permission "rank.vip" ## Sort Addon: Skript Category: Effect Syntax: sort %objects% [in (:descending|ascending) order] [(by|based on) <.+>] Description: Sorts a list variable using either the natural ordering of the contents or the results of the given expression. Be warned, this will overwrite the indices of the list variable. Examples: set {_words::*} to "pineapple", "banana", "yoghurt", and "apple" sort {_words::*} # alphabetical sort sort {_words::*} by length of input # shortest to longest sort {_words::*} in descending order by length of input # longest to shortest sort {_words::*} based on {tastiness::%input%} # sort based on custom value ## Change: Set/Add/Remove/Remove All/Delete/Reset Addon: Skript Category: Effect Syntax: (add|give) %objects% to %objects% Description: A general effect that can be used for changing many expressions. Some expressions can only be set and/or deleted, while others can also have things added to or removed from them. Examples: set the player's display name to "%name of player%" set the block above the victim to lava add 2 to the player's health # preferably use 'heal' for this add argument to {blacklist::*} give a diamond pickaxe of efficiency 5 to the player increase the data value of the clicked block by 1 remove 2 pickaxes from the victim subtract 2.5 from {points::%uuid of player%} ## Load/Unload Chunk Addon: Skript Category: Effect Syntax: [:un]load chunk[s] (of|%directions%) %points% [in [(world|instance)[s]] %instances%] [:sync] Description: Unload or load a chunk in the given instance Examples: load chunk at vector(100, 0, 100) in {_instance} ## Play Sound Addon: Skript Category: Effect Syntax: play %sounds% [%directions% %points%] (to|for) %players% Description: Plays a sound at a certain location, for certain players, or from an entity. Examples: play sound "entity.player.levelup" at player to all players play sound "ambient.cave" at vector(10, 64, 10) in player's instance play sound "entity.villager.ambient" from {_entity} to player # makes the sound follow the provided entity ## Draw Particle Addon: Skript Category: Effect Syntax: [:force] draw %integer% [of] %particle% [(with offset|offset by) %vector%] [%directions% %points%] [in [(world|instance)] %instances%] [(to|for) %players%] [with (speed|extra) %number%] [without (:distance) limit[s]] Description: Draws particles at the given locations for specific players or everyone in specified instances. Either players or an instance must be provided. See ExprParticle for more particle customization Examples: draw 10 of flame at player for player draw 5 of smoke at player's position in player's instance with speed 0.5 ## Boolean Addon: Skript Category: Type Syntax: boolean 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 player's flight mode to false ## Text Addon: Skript Category: Type Syntax: string 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). 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 Addon: Skript Category: Type Syntax: time 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. See date and timespan for the other time types of Skript. Examples: at 20:00: time is 8 pm broadcast "It's %time%" ## Timeperiod Addon: Skript Category: Type Syntax: timeperiod 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. 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 ## Date Addon: Skript Category: Type Syntax: date 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. 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 ## Console Sender Addon: Skript Category: Type Syntax: consolesender Description: The console. Examples: send "Server started" to console ## Player Addon: Skript Category: Type Syntax: player Description: A entity of type Player with a connection to the server. Examples: send "hi" to player("Steve") ## Entity Creature Addon: Skript Category: Type Syntax: entitycreature Description: An entity that has health, armor, main/offhand, and is able to pathfind. Examples: set navigation target of {_entity} to player ## Position Addon: Skript Category: Type Syntax: position Description: A location with an x, y, z, yaw, and pitch. An instance is not attached to this type. Examples: set {_pos} to position(0, 64, 0) ## Vector Addon: Skript Category: Type Syntax: vector Description: An object with 3 values: x, y, z. Can be used as a location, but position is used more often for that use-case. Examples: set {_vec} to vector(1, 0, 0) ## Block Vector Addon: Skript Category: Type Syntax: blockvector Description: A vector with the x, y, and z without decimals. Examples: set {_bv} to blockVector(0, 64, 0) ## Instance Container Addon: Skript Category: Type Syntax: instancecontainer Description: A world consisting of blocks and entities. Examples: set {_world} to instance of player ## Shared Instance Addon: Skript Category: Type Syntax: sharedinstance Description: A world sharing the blocks from its underlying Instance Container. Entities are not shared. Examples: create shared instance from {_container} and store it in {_shared} ## Chunk Addon: Skript Category: Type Syntax: chunk Description: A 16×16 section of blocks in an instance. Examples: loop all blocks in chunk at player: ## Dimension Type Addon: Skript Category: Type Syntax: dimensiontype Description: A dimension type with several values. Examples: set {_dim} to dimension type from namespace key "minecraft:overworld" ## Biome Addon: Skript Category: Type Syntax: biome Description: A biome with several values. Examples: create biome under "minecraft:lobby" stored in {_b}: sky color: rgb(111, 223, 249) fog color: rgb(253, 252, 198) foliage color: rgb(71, 255, 0) water color: rgb(111, 223, 249) ## Block Addon: Skript Category: Type Syntax: block Description: A block with a type, properties (blockdata), nbt, and handler. Examples: stone button[powered=true] ## Game Mode Addon: Skript Category: Type Syntax: gamemode Description: Represents a Minecraft game mode. Possible values: survival, creative, adventure, spectator. Examples: set player's game mode to creative ## Player Hand Addon: Skript Category: Type Syntax: playerhand Description: Represents a player's hand. Possible values: main, off. Examples: on item use: broadcast "%event-hand%" ## Item Animation Addon: Skript Category: Type Syntax: itemanimation Description: Represents the animation an item is playing while consuming. Examples: on item use: broadcast "%event-animation%" ## Inventory Type Addon: Skript Category: Type Syntax: inventorytype Description: The type of an inventory window (chest, anvil, etc.). Examples: open chest 3 row to player ## Click Type Addon: Skript Category: Type Syntax: clicktype Description: The type of click in an inventory click event. Examples: on inventory click: if event-clicktype is left click: ## Frame Type Addon: Skript Category: Type Syntax: frametype Description: The type of the frame for an advancement/notification. Examples: send task notification with title "Quest Complete!" and diamond as the icon to player ## Component Addon: Skript Category: Type Syntax: component Description: A piece of text with formatting (adventure component). Examples: set player's tab list header to mm("Hello!") ## Tag Resolver Addon: Skript Category: Type Syntax: tagresolver Description: Replace tags within a MiniMessage string. Examples: set {_r} to resolver("name", player's name) ## Component Like Addon: Skript Category: Type Syntax: componentlike Description: Represents something that can be viewed as a component, like a regular component or a hover event. Examples: set {_c} to mm("Hello") ## Suggestion Entry Addon: Skript Category: Type Syntax: suggestionentry Description: An entry for the suggestions section of a command containing the suggestion and a component tooltip. Examples: add suggestionEntry("hello", mm("tooltip!")) to suggestions ## Resource Pack Status Addon: Skript Category: Type Syntax: resourcepackstatus Description: The status of a resource pack that was sent. Examples: if resource pack status is successfully loaded: ## Player Inventory Addon: Skript Category: Type Syntax: playerinventory Description: Represents a player's inventory. Examples: clear player's inventory ## Nonsense Addon: Skript Category: Type Syntax: nonsense Description: Internal inventory class alias used by Skript. ## Inventory Addon: Skript Category: Type Syntax: inventory Description: Represents an inventory, such as a player's inventory or an anvil inventory. Examples: open {_inventory} to player ## Slot Addon: Skript Category: Type Syntax: slot Description: Represents an item in a slot in an inventory. Examples: set slot 0 of player's inventory to diamond ## Entity Type Addon: Skript Category: Type Syntax: entitytype Description: The type of an entity (zombie, player, skeleton, etc.) Examples: spawn zombie at player ## Equipment Slot Addon: Skript Category: Type Syntax: equipmentslot Description: An equipment slot for an entity. Possible values: main_hand, off_hand, boots, leggings, chestplate, helmet. Examples: set helmet of player to diamond helmet ## Scoreboard Addon: Skript Category: Type Syntax: scoreboard Description: The scoreboard on the side of a player's screen Examples: set {_s} to new sidebar named "Stats" ## Team Addon: Skript Category: Type Syntax: team Description: A scoreboard team. Teams control the color of member name tags and their glow outline, whether members push each other, name tag visibility, friendly fire and prefixes/suffixes. Teams live in memory only and are not saved across restarts, so scripts should recreate them on load. Examples: set {_team} to a new team named "red" set team color of {_team} to dark red add player to members of {_team} ## Collision Rule Addon: Skript Category: Type Syntax: collisionrule Description: Whether members of a team push each other. Possible values: always, never, push other teams, push own team. Examples: set collision rule of {_team} to never ## Name Tag Visibility Addon: Skript Category: Type Syntax: nametagvisibility Description: Who can see the name tags of a team. Possible values: always, never, hide for other teams, hide for own team. Examples: set name tag visibility of {_team} to hide for other teams ## Boss Bar Addon: Skript Category: Type Syntax: bossbar Description: The bar shown at the top of a player's screen. Examples: set {_bar} to new boss bar titled "Dragon" with progress 50 add {_bar} to boss bars of all players ## Boss Bar Color Addon: Skript Category: Type Syntax: bossbarcolor Description: The color of a boss bar. Possible values: pink bar, blue bar, red bar, green bar, yellow bar, purple bar, white bar. Examples: set color of {_bar} to red bar ## Boss Bar Overlay Addon: Skript Category: Type Syntax: bossbaroverlay Description: The notching of a boss bar. Possible values: progress, notched 6, notched 10, notched 12, notched 20. Examples: set overlay of {_bar} to notched 12 ## Dialog Addon: Skript Category: Type Syntax: dialog Description: A dialog screen shown to a player. Examples: set {_d} to new notice dialog: title: "Welcome" show {_d} to player ## Dialog Body Addon: Skript Category: Type Syntax: dialogbody Description: A piece of content shown in a dialog's body. Examples: set {_body} to new plain message body "Choose an item" ## Dialog Input Addon: Skript Category: Type Syntax: dialoginput Description: An input control shown in a dialog. Examples: set {_input} to new text input named "nick" labeled "Nickname" ## Dialog Button Addon: Skript Category: Type Syntax: dialogbutton Description: A button shown in a dialog. Examples: set {_button} to new dialog button labeled "Buy" running command "buy" ## Dialog Action Addon: Skript Category: Type Syntax: dialogaction Description: An action performed when a dialog button is clicked. ## Dialog Option Addon: Skript Category: Type Syntax: dialogoption Description: An option in a dialog's single option input. Examples: set {_easy} to new dialog option "easy" labeled "Easy" selected ## Dialog After Action Addon: Skript Category: Type Syntax: dialogafteraction Description: What happens after a dialog button is clicked. Possible values: close, none, wait for response. ## Enchantment Addon: Skript Category: Type Syntax: enchantment Description: An enchantment for an item, including its level. Examples: add sharpness 5 to enchants of player's tool ## Item Flag Addon: Skript Category: Type Syntax: itemflag Description: A part of an item's tooltip that can be hidden. Examples: give player diamond sword with the hide attributes item flag add hide enchants to item flags of player's tool ## Direction Addon: Skript Category: Type Syntax: direction Description: Represents a direction (north, south, east, west, up, down). Examples: set {_dir} to north ## Sound Addon: Skript Category: Type Syntax: sound Description: A sound with an id, seed, category, volume, and pitch. Examples: play sound "entity.player.levelup" at player to all players ## Ambient Sounds Addon: Skript Category: Type Syntax: ambientsound Description: An ambient sound with an id, mood, and additions. Examples: set {_sounds} to new ambient sounds with loop "minecraft:ambient.cave" ## Mood Addon: Skript Category: Type Syntax: mood Description: The mood for ambient sounds. Examples: set {_mood} to mood("ambient.cave", 1 second, 8, 2) ## Additions Addon: Skript Category: Type Syntax: addition Description: The additions for ambient sounds. Examples: set {_additions} to additions("ambient.cave", 0.01) ## Background Music Addon: Skript Category: Type Syntax: backgroundmusic Description: The background music. Examples: set {_music} to new background music with music {_track} ## Music Addon: Skript Category: Type Syntax: music Description: The regular/creative/underwater background music. Examples: set {_music} to music("music.overworld", 1 minute, 2 minutes, true) ## Entity Activity Addon: Skript Category: Type Syntax: entityactivity Description: The activity state of an entity (in water, on ground, in air, etc.). ## Moon Phase Addon: Skript Category: Type Syntax: moonphase Description: The phase of the moon in a dimension. Examples: set {_phase} to full moon ## Bed Rule Addon: Skript Category: Type Syntax: bedrule Description: The bed rule environment attribute. Examples: set {_rule} to new bed rule with sleep rule monsters and with spawn rule spawn ## Bed Rule Rule Addon: Skript Category: Type Syntax: bedrulerule Description: A sleep or spawn rule used when creating a bed rule. Examples: set {_rule} to new bed rule with sleep rule monsters and with spawn rule spawn ## World Border Addon: Skript Category: Type Syntax: worldborder Description: The world border of an instance, made up of a diameter, a center, and warning settings. Examples: set world border of {_instance} to new world border with diameter 500 ## Weather Addon: Skript Category: Type Syntax: weather Description: The weather of an instance, made up of a rain level and a thunder level, both between 0 and 1. Examples: set weather of {_instance} to thundering weather ## Sound Category Addon: Skript Category: Type Syntax: soundcategory Description: A sound category e.g. master Examples: play sound "entity.player.levelup" at player to all players ## Billboard Constraints Addon: Skript Category: Type Syntax: billboardconstraint Description: Billboard constraint e.g. FIXED Examples: set billboard render constraints of {_entity} to fixed ## Attribute Type Addon: Skript Category: Type Syntax: attributetype Description: Represents the type of an attribute. Examples: set attack speed attribute of player to 2 ## Named Text Color Addon: Skript Category: Type Syntax: namedtextcolor Description: Team colors (dark red, dark aqua, etc.) Examples: set {_color} to dark red ## Alpha Color Addon: Skript Category: Type Syntax: alphacolor Description: Alpha Color (color with an alpha (transparency) value) Examples: set background color of {-a} to rgb(255, 255, 255, 128) ## Item Display Context Addon: Skript Category: Type Syntax: displaycontext Description: The context in which an item display is rendered (e.g. GUI) Examples: set display context of {_entity} to head ## Text Alignment Addon: Skript Category: Type Syntax: textalignment Description: The text alignment of a text display (center, left, or right) Examples: set text alignment of {_entity} to center ## Entity Animation Addon: Skript Category: Type Syntax: animation Description: An animation that an entity can play (main hand swing, leave bed, etc.) Examples: play swing main arm animation on player ## NBT Tag Type Addon: Skript Category: Type Syntax: tagtype Description: The tag type of an nbt tag (e.g. int array) Examples: set {_tag} to string nbt tag "CustomName" of {_nbt} ## Server List Ping Type Addon: Skript Category: Type Syntax: pingtype Description: The ping type of a ServerListPing event Examples: on server list ping: if ping type is modern full: ## Input Key Addon: Skript Category: Type Syntax: inputkey Description: Represents a movement input key that is pressed by a player. Examples: broadcast "%current input keys of player%" ## Particle Setting Addon: Skript Category: Type Syntax: particlesetting Description: The setting the player has set for their particles. Examples: set particle setting of player to all ## Parrot Type Addon: Skript Category: Type Syntax: parrottype Description: The type of a parrot that can sit on a player's shoulder. Examples: set left shoulder parrot type of player to red parrot ## Dimension Skybox Addon: Skript Category: Type Syntax: skybox Description: The visual skybox of a dimension type. Examples: create dimension under "test:lobby" stored in {_d}: skybox: end ## Dimension Cardinal Light Addon: Skript Category: Type Syntax: cardinallight Description: The cardinal light of a dimension type. Examples: create dimension under "test:lobby" stored in {_d}: cardinal light: nether ## Biome Temperature Modifier Addon: Skript Category: Type Syntax: temperaturemodifier Description: The temperature modifier of a biome. Examples: create biome under "test:lobby" stored in {_b}: temperature modifier: frozen ## Biome Grass Color Modifier Addon: Skript Category: Type Syntax: grasscolormodifier Description: The grass color modifier of a biome. Examples: create biome under "test:lobby" stored in {_b}: grass color modifier: dark forest ## Buffered Image Addon: Skript Category: Type Syntax: bufferedimage Description: A raster image loaded from a file. Examples: on server list ping: set motd favicon to image from file "favicon.png" ## Particle Addon: Skript Category: Type Syntax: particle Description: Particle (e.g. dust) Examples: draw 10 of flame at player for player ## Ambient Particle Addon: Skript Category: Type Syntax: ambientparticle Description: Particle (e.g. dust) with a probability of spawning Examples: set {_particle} to ambientParticle(white ash, 0.118093334) ## Dust Option Addon: Skript Category: Type Syntax: dustoption Description: Dust options for the dust particle Examples: set {_data} to dustOption(red, 1) ## Dust Transition Addon: Skript Category: Type Syntax: dusttransition Description: Dust options for the dust color transition particle Examples: set {_data} to dustTransition(red, blue, 1) ## Effect Data Addon: Skript Category: Type Syntax: effectdata Description: Effect data options for the effect and instance effect particles. Examples: set {_data} to effectData(red, 1) ## Trail Data Addon: Skript Category: Type Syntax: traildata Description: Trail data options for the trail particle Examples: set {_data} to trailData(point(0, 64, 0), red, 5 seconds) ## Vibration Data Addon: Skript Category: Type Syntax: vibrationdata Description: Vibration data options for the vibration particle Examples: set {_data} to entityVibrationData(player, 5 seconds) ## Skin Addon: Skript Category: Type Syntax: skin Description: A skin with textures and a signature Examples: set skin of player to skin from "jeb_" ## NBT Compound Addon: Skript Category: Type Syntax: nbtcompound Description: A compound (e.g. {test:1b,hello:"hi"} Examples: set {_nbt} to nbt compound of player's tool ## Minecraft Tag Addon: Skript Category: Type Syntax: minecrafttag Description: A tag used to group items, blocks or entity types, such as 'minecraft:logs'. Tags have a namespace and a value, written as "namespace:value". Obtain them with the 'tag' expression. Examples: minecraft tag "logs" ## Type Addon: Skript Category: Type Syntax: classinfo Description: Represents a type, e.g. number, object, item type, location, block, world, entity type, etc. This is mostly used for expressions like 'event-', '-argument', 'loop-', 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 ## Timespan Addon: Skript Category: Type Syntax: timespan 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'. 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 ## Command Sender Addon: Skript Category: Type Syntax: sender Description: Something that can execute a command and receive messages (players/console). Examples: command /test: condition: return whether sender is a player # command can only be executed by players trigger: give player 5 diamond ## Living Entity Addon: Skript Category: Type Syntax: livingentity Description: An entity that has health, armor, and a main/offhand. Examples: set health of {_entity} to 20 ## Equipment Handler Addon: Skript Category: Type Syntax: equipmenthandler Description: An entity that is capable of bearing armor and off/main hand tools. Examples: set chestplate of player to iron chestplate ## Point Addon: Skript Category: Type Syntax: point Description: An object with 3 values: x, y, z. Is internally either a block vector, vector, or position. Examples: set {_p} to player's position ## Instance Addon: Skript Category: Type Syntax: instance Description: A world consisting of blocks and entities. Examples: teleport player to {_instance} ## Item Addon: Skript Category: Type Syntax: item Description: An item with its amount, enchantments and other data. Examples: give player 2 stone sword ## Color Addon: Skript Category: Type Syntax: color Description: Color (outside of the team color range) Examples: set {_color} to rgb(255, 0, 0) ## RGB Like (Color) Addon: Skript Category: Type Syntax: rgblike Description: Essentially a color Examples: set {_data} to dustOption(red, 1) ## Number Addon: Skript Category: Type Syntax: number Description: 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 ## Entity Addon: Skript Category: Type Syntax: entity Description: A mob/player/physical non-block object in an instance. Examples: kill {_entity} ## Taggable Addon: Skript Category: Type Syntax: taggable Description: An object that can hold tags (entities, instances, etc.) Examples: set metadata "key" of player to "value" ## Options Addon: Skript Category: Structure Syntax: options Description: 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 Addon: Skript Category: Structure Syntax: variables Description: 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%}%" ## Event Addon: Skript Category: Structure Syntax: [on] [:uncancelled|:cancelled|(any|all)] <.+> [priority:with priority (:(lowest|low|normal|high|highest|monitor))] Description: The structure used for listening to events. Optionally allows specifying whether to listen to events that have been cancelled, and allows specifying with which priority to listen to events. Events are called in the following order of priorities. ``` lowest -> low -> normal -> high -> highest -> monitor ``` Modifying event-values or cancelling events is not supported when using the 'monitor' priority. It should only be used for monitoring the outcome of an event. Examples: on load: broadcast "loading!" on join: if {first-join::%player's uuid%} is not set: set {first-join::%player's uuid%} to now cancelled block break: send "You can't break that here" to player ## Register Dialog Addon: Skript Category: Structure Syntax: register (notice:notice|confirmation:confirmation|multi:multi[ ]action|links:server links) dialog <.+> Description: Builds a dialog and registers it in the server dialog registry under a namespaced key, so it can be shown by key and referenced by other dialogs. Entries are the same as the matching 'new dialog' section. Registry changes do not reach players who are already connected, because they would have to return to the configuration phase first. Use this for dialogs defined at startup, and show runtime-built dialogs as values instead. Examples: register multi action dialog "myserver:shop": title: mm("Shop") buttons: (new dialog button labeled "Buy" running command "buy") ## Using Experimental Feature Addon: Skript Category: Structure Syntax: using <.+> Description: Place at the top of a script file to enable an optional experimental feature. For example, this might include Examples: using 1.21 using my-cool-addon-feature ## Command Addon: Skript Category: Structure Syntax: command <.+> Description: Allows creation of true custom commands. See the 'Command Argument' section documentation for a list of supported argument types and how to use them. Examples: # Rough Syntax command [/] []: aliases: # [OPTIONAL] list of other names the command can go by (no / in front) permission: # [OPTIONAL] allows you to set the required permission permission message: # [OPTIONAL] allows you to define what message will be sent should they not have permission executable by: # [OPTIONAL] allows you to define who can run the command (player/players/consnole) condition: # [OPTIONAL] section/expression allows you to return a boolean of whether the sender should have access to the command subcommand [/] []: # [OPTIONAL] works exactly like a command, can have argument/subcommand sections within arg[ument] : # [OPTIONAL] allows you to more finely tune or scope an argument. See the Command Argument section documentation for more details trigger: # [OPTIONAL] all arguments defined on the initial command line will be run inside this section # Simple Example command /spawn: aliases: hub condition: if any: sender isn't a player sender doesn't have permission "spawn" then: return false return true trigger: teleport player to {spawn} # More Involved Example command /foo : aliases: f condition: return whether sender has permission "foo" argument : trigger: if sender isn't a player: send "You can't get a foo'd item because you're not a player!" to sender stop give player {_num} of {_i} trigger: if {_num} isn't set: send "Usage: /foo " to sender stop loop {_num} times: send "foo" to sender send "You have been foo'd %{_num}% times" to sender # Expected Execution: # /foo 5 -> prints 'foo' 5 times in the sender's chat and tells them how many times they have been foo'd. # /foo -> Prints the usage message # /foo 5 acacia_boat -> Gives the player 5 acacia boats # /foo 5 acacia_boa (misspell) -> prints 'foo' 5 times in the sender's chat and tells them how many times they have been foo'd. ## Function Addon: Skript Category: Structure Syntax: [:local] function <.+> Description: 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}%} ## Event Cancelled Addon: Skript Category: Condition Syntax: [the] event is cancel[l]ed Description: Checks whether or not the event is cancelled. Examples: on click: if event is cancelled: broadcast "no clicks allowed!" ## Is Stopping Addon: Skript Category: Condition Syntax: server is stopping Description: Checks if the server is shutting down. Examples: server is stopping ## In The Past/Future Addon: Skript Category: Condition Syntax: %dates% (is|are)[(n't| not)] in the (past|:future) Description: Checks whether a date is in the past or future. Note that using the 'now' expression will not be in the past or future when used directly in the condition. Examples: set {_date} to now wait 5 seconds if {_date} is in the past: # this will be true if now is in the future: # this will be false set {_dates::*} to 1 day from now, 12 days from now, and 1 year from now if {_dates::*} are in the future: # this will be true if {_dates::*} have passed: # this will be false ## Is Using Experimental Feature Addon: Skript Category: Condition Syntax: [the] [current] script is using %strings% Description: Checks whether a script is using an experimental feature by name. Examples: the script is using "example feature" on load: if the script is using "example feature": broadcast "You're using an experimental feature!" ## Exists/Is Set Addon: Skript Category: Condition Syntax: %objects% (exist[s]|(is|are) set) Description: Checks whether a given expression or variable is set. Examples: send whether {_var} exists to player ## Is Script Loaded Addon: Skript Category: Condition Syntax: script[s] [%strings%] (is|are) loaded Description: Check if the current script, or another script, is currently loaded. Examples: script is loaded script "example.sk" is loaded ## Alphanumeric Addon: Skript Category: Condition Syntax: %strings% (is|are) alphanumeric Description: Checks if the given string is alphanumeric. Examples: if "Notch" is not alphanumeric: send "Invalid name!" ## Item Tooltip Hidden Addon: Skript Category: Condition Syntax: %items% (has|have) [its|their] (entire|:additional) tool[ ]tip[s] hidden Description: Whether the tooltip of an item is hidden. The additional tooltip covers the same parts as the hide additional tooltip item flag, and an item only counts as having it hidden if every one of those parts is hidden, so an item that merely has its entire tooltip hidden doesn't match. Examples: if player's tool has its entire tooltip hidden: send "you can't see what that is!" if {_item} doesn't have its additional tooltip hidden: set {_item} to {_item} without additional tooltip ## Chance Addon: Skript Category: Condition Syntax: chance of %number%(\%|) 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%: drop a diamond chance of {chance}% # {chance} between 0 and 100 chance of {chance} # {chance} between 0 and 1 ## Is Tagged Addon: Skript Category: Condition Syntax: %items/blocks/entitytypes/entities% (is|are) tagged (as|with) %minecrafttags% Description: Checks whether an item, block, entity or entity type is tagged with the given minecraft tag. Matching is done by namespaced key, so an oak log is tagged with both the item and the block version of "logs". Examples: if player's tool is tagged with item tag "planks": send "that's a plank!" to player on block break: if event-block is tagged with tag "mineable/pickaxe": cancel event ## Matches Addon: Skript Category: Condition Syntax: %strings% (match[es]|do[es](n't| not) match) %strings% Description: 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!" ## Starts/Ends With Addon: Skript Category: Condition Syntax: %strings% (start|end)[s] with %strings% Description: Checks if a text starts or ends with another. Examples: if the argument starts with "test" or "debug": send "Stop!" ## Has NBT Tag Addon: Skript Category: Condition Syntax: %nbtcompounds% (has|have) [the] [nbt] tag[s] %strings% Description: Checks whether NBT compounds contain the given tag paths. Supports nested tags using dot notation. Examples: {_nbt} has the nbt tag "Health" ## Can Hold Addon: Skript Category: Condition Syntax: %inventories% (can hold|ha(s|ve) [enough] space (for|to hold)) %items% Description: Tests whether a player or a chest can hold the given item. Examples: block can hold 200 cobblestone player has enough space for 64 feather ## Time Addon: Skript Category: Condition Syntax: %date% (was|were)( more|(n't| not) less) than %timespan% [ago] Description: 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 ... ## Contains Addon: Skript Category: Condition Syntax: %inventories% (has|have) %items% [in [(the[ir]|his|her|its)] inventory] 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: whether player has 4 flint and 2 iron ingot ## Has Permission Addon: Skript Category: Condition Syntax: %senders% (has|have) [the] permission[s] %strings% Description: Test whether a player has a certain permission. Examples: if player has the permission "admin": send "You're attacking an admin!" to player ## Has Metadata Addon: Skript Category: Condition Syntax: %taggables% (has|have) [the] metadata[s] [tag[s]] %strings% Description: Checks whether taggable objects have the given metadata tags. Examples: player has the metadata tag "frozen" ## Is Within Addon: Skript Category: Condition Syntax: %points% (is|are) within %point% and %point% Description: Whether a point is within something else. The "something" can be a chunk, a world border, the world border of an instance, or a cuboid formed by two other points. Note that using the is between condition will refer to a straight line between points, while this condition will refer to the cuboid between points. Examples: if player's position is within {_loc1} and {_loc2}: send "You are in a PvP zone!" to player ## Is Online Addon: Skript Category: Condition Syntax: %players% (is|are) online Description: Checks if players are online. During a connect event, also accounts for whether the player was kicked. Examples: player is online ## Is Empty Addon: Skript Category: Condition Syntax: %inventories/slots/strings% (is|are) empty Description: Checks whether an inventory, an inventory slot, or a text is empty. Examples: player's inventory is empty ## Is Normalized Addon: Skript Category: Condition Syntax: %vectors% (is|are) normalized Description: Checks whether a vector is normalized i.e. length of 1 Examples: vector(1, 0, 0) is normalized ## Is Alive/Dead Addon: Skript Category: Condition Syntax: %entities% (is|are) (alive|dead) Description: Checks if an entity is alive or dead. Examples: if player is alive: ## Is Flying Addon: Skript Category: Condition Syntax: %players% (is|are) flying Description: Checks whether a player is flying. Examples: player is not flying ## Is Raining Addon: Skript Category: Condition Syntax: %instances/weathers% (is|are) (raining|:thundering) Description: Checks whether an instance or a weather is raining or thundering, meaning its level is above 0. Examples: if {_instance} is raining: if weather of {_instance} is thundering: ## Is Mergeable Addon: Skript Category: Condition Syntax: %entities% (is|are) mergeable Description: Whether a dropped item merges with other dropped items of the same kind near it. Enabled by default. Examples: if event-entity is mergeable: ## On Ground Addon: Skript Category: Condition Syntax: %entities% (is|are) on [the] ground Description: Checks if an entity is on the ground. For the player this is reported by them, so it is unreliable. Examples: if entity is on ground: ## Can Pick Up Items Addon: Skript Category: Condition Syntax: %entities% can pick[ ]up items Description: Whether a living entity is allowed to pick dropped items up. Disabled for every entity by default. Examples: if player can pick up items: ## Can Fly Addon: Skript Category: Condition Syntax: %players% can fly Description: Whether a player is allowed to fly. Examples: player can fly ## Is Pickable Addon: Skript Category: Condition Syntax: %entities% (is|are) pickable Description: Whether a dropped item can be picked up right now, meaning its own flag is enabled, its pickup delay has passed and it has not been removed. Examples: if event-entity is pickable: ## Is Removed Addon: Skript Category: Condition Syntax: %entities% (is|are) removed Description: Checks if an entity is removed from its instance. Examples: if {_entity} is removed: ## Comparison Addon: Skript Category: Condition Syntax: (neither|) %objects% ((is|are)(|(n't| not| neither)) ((greater|more|higher|bigger|larger) than|above)|\>) %objects% 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: sender is a player ## Script Name Addon: Skript Category: Expression Syntax: [the] script[['s] name] Description: 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 ## MSPT Addon: Skript Category: Expression Syntax: [(mean|average)] mspt [(from|over|in) [the] last (1:10 seconds|2:minute|3:5 minutes)] Description: The duration of the server's ticks in milliseconds, as measured by spark. Defaults to the mean tick duration of the window, but the minimum, maximum, median and 95th percentile can be asked for instead. Without a window, this returns all three of spark's averages, in order: the last 10 seconds, minute and 5 minutes. Examples: broadcast "%mspt from the last minute%" every 30 seconds: if 95th percentile mspt from the last 10 seconds > 45: broadcast mm("The server is lagging!") ## All Tags of a Type Addon: Skript Category: Expression Syntax: [all [of] [the]] [minecraft] (1:item|2:block|3:entity [type]) tags Description: Every minecraft tag the server knows about, optionally limited to one kind. Without a kind, the item, block and entity type registries are all included. Examples: broadcast size of all block tags set {_entityTags::*} to all entity type tags ## All Equipment Slots Addon: Skript Category: Expression Syntax: all [of] [the] (:equipment|armor) slots Description: Returns all possible equipment slots. Examples: set {_slots::*} to all equipment slots ## New Dialog Addon: Skript Category: Expression Syntax: [a] new (notice:notice|confirmation:confirmation|multi:multi[ ]action|links:server links) dialog Description: Builds a dialog. A dialog is a plain value, so it can be stored in a variable, returned from a function or shown directly; use 'register dialog' instead to put one in the server dialog registry under a key. Shared entries: title -> component (required) external title -> component can close with escape -> boolean (default true) pause -> boolean (default false) after action -> dialog after action (close, none, wait for response; default close) body -> dialog bodies inputs -> dialog inputs Notice: button -> dialog button Confirmation: yes button, no button -> dialog button Multi action: buttons -> dialog buttons, exit button -> dialog button, columns -> number Dialog list: dialogs -> dialogs, exit button -> dialog button, columns -> number, button width -> number Server links: exit button -> dialog button, columns -> number, button width -> number Examples: set {_shop} to new multi action dialog: title: mm("Shop") body: {_greeting} inputs: {_qty} buttons: {_buy}, {_cancel} columns: 2 show {_shop} to player show (new notice dialog: title: mm("Welcome")) to player ## New Line Addon: Skript Category: Expression Syntax: nl Description: Returns a line break separator. Examples: send "Hello%nl%Goodbye!" to player ## Server Brand Addon: Skript Category: Expression Syntax: server brand [name] Description: The server brand name sent to clients (shown in F3 menu). Examples: set server brand to "My custom server brand" ## Free / Max / Total Memory Addon: Skript Category: Expression Syntax: [the] [server] (:free|max:max[imum]|total) (memory|ram) Description: 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 ## Loop value Addon: Skript Category: Expression Syntax: [the] [current] loop-<.+> Description: Returns the previous, current, or next 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%" ## Pi Addon: Skript Category: Expression Syntax: (pi|π) Description: Returns the mathematical constant pi. (approx. 3.1415926535) Examples: set {_tau} to pi * 2 ## Vectors - Random Vec Addon: Skript Category: Expression Syntax: [a] random vector Description: Creates a random unit vector. Examples: set {_v} to a random vector ## Console Addon: Skript Category: Expression Syntax: [server] console Examples: send "hi console" to console ## Online Player Count Addon: Skript Category: Expression Syntax: [online] player count Description: The number of online players. Examples: broadcast "Online: %number of online players%" ## Resource Pack UUID Addon: Skript Category: Expression Syntax: [resource] pack (uuid|id) Description: The UUID of a resource pack in a resource pack callback event. Examples: broadcast "Pack %resource pack uuid% updated!" ## Special Number Addon: Skript Category: Expression Syntax: (NaN|[(-|minus)](infinity|∞)) value Description: Special number values, namely NaN, Infinity and -Infinity Examples: if {_number} is infinity value: ## Chat Recipients Addon: Skript Category: Expression Syntax: chat recipients Description: The recipients of a chat message in a chat event. Examples: remove player from chat recipients ## Random UUID Addon: Skript Category: Expression Syntax: [a] random uuid Description: Returns a random UUID. Examples: set {_uuid} to random uuid ## Argument Suggestions Addon: Skript Category: Expression Syntax: [arg[ument]] suggestions Description: The suggestion entries in an argument section callback. Examples: command /home: argument : suggestions: loop indices of {homes::%player's uuid%::*}: add suggestionEntry(loop-value, mm("%{homes::%player's uuid%::%loop-value%}%")) to suggestions trigger: if {homes::%player's uuid%::%{_home}%} isn't set: send "Home '%{_home}%' doesn't exist." stop send "Teleporting you to home '%{_home}%'..." teleport player to {homes::%player's uuid%::%{_home}%} trigger: send "Usage: /home " ## Generation Chunk Bounds Addon: Skript Category: Expression Syntax: [absolute] (:start|end)[ing point] of [generat(or|ion)] chunk Description: The start or end point of a generation chunk in a create instance section. Examples: set {_start} to start of generation chunk ## An Eternity Addon: Skript Category: Expression Syntax: [an] eternity Description: Represents a timespan with an infinite duration. An eternity is also created when arithmetic results in a timespan larger than about 292 million years. Infinite timespans generally follow the rules of infinity, where most math operations do nothing. However, operations that would return NaN with numbers will instead return a timespan of 0 seconds. Note that an eternity will often be treated as the longest duration something supports, rather than a true eternity. Examples: send whether {_timespan} = forever ## Me Addon: Skript Category: Expression Syntax: me Description: A 'me' expression that can be used in players' effect commands only. Examples: !heal me !kick myself !give a diamond axe to me ## Now Addon: Skript Category: Expression Syntax: now Description: The current system time of the server. Use time to get the Minecraft time of a world. Examples: broadcast "Current server time: %now%" ## Parse Error Addon: Skript Category: Expression Syntax: [the] [last] [parse] error 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 if {var} is not set: parse error is set: message "<red>Line 1 is invalid: %last parse error%" else: message "<red>Please put an integer on line 1!" ## TPS Addon: Skript Category: Expression Syntax: tps [(from|over|in) [the] last (1:5 seconds|2:10 seconds|3:minute|4:5 minutes|5:15 minutes)] Description: The server's ticks per second, as measured by spark. Without a window, this returns all five of spark's averages, in order: the last 5 seconds, 10 seconds, minute, 5 minutes and 15 minutes. Examples: broadcast "%tps from the last minute%" every 30 seconds: if tps from the last 5 seconds < 15: broadcast "The server is lagging!" ## Chat Format Addon: Skript Category: Expression Syntax: chat format Description: The format of a chat message in a chat event. Examples: on chat with priority lowest: set {_message} to resolver("message", message) # resolver so they can't inject minimessage tags set chat format to mm("%player% » ", {_message}) send chat format to console play sound "block.comparator.click" at volume 0.5 with pitch 2 to all players ## Chat Message Addon: Skript Category: Expression Syntax: [:raw] [chat] message Description: The raw message in a chat event. Examples: on chat with priority lowest: set {_message} to resolver("message", message) # resolver so they can't inject minimessage tags set chat format to mm("%player% » ", {_message}) send chat format to console play sound "block.comparator.click" at volume 0.5 with pitch 2 to all players ## Chunk Vector Addon: Skript Category: Expression Syntax: chunk (1:start|2:end) [block] vec[tor] Description: The start or end block vector of a chunk being generated. Only available within a generator section. Examples: set {_start} to chunk start vector ## Resource Pack Status Addon: Skript Category: Expression Syntax: [resource] pack status Description: The status of a resource pack in a resource pack callback event. Examples: if resource pack status is successfully loaded: ## All Scripts Addon: Skript Category: Expression Syntax: [all [of the]|the] scripts [1:without ([subdirectory] paths|parents)] Description: 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 ## Number of Characters Addon: Skript Category: Expression Syntax: number of upper[ ]case char(acters|s) in %string% Description: 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 "<red>Your message has to many caps!" to player ## Hash Addon: Skript Category: Expression Syntax: %strings% hash[ed] with (MD5|SHA-256) 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 <text>: trigger: set {password::%uuid of player%} to text-argument hashed with SHA-256 command /login <text>: trigger: if text-argument hashed with SHA-256 is {password::%uuid of player%}: message "Login successful." else: message "Wrong password!" ## Loop Iteration Addon: Skript Category: Expression Syntax: [the] loop(-| )(counter|iteration)[-%*number%] Description: 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%" ## Dialog Input Addon: Skript Category: Expression Syntax: [the] [dialog] input %string% Description: The value a player entered into a named dialog input, available inside a dialog button's code section and inside the dialog click event. Text inputs return text, checkboxes return their true or false value as text, sliders return a number, and dropdowns return the id of the chosen option. Returns nothing if the dialog had no input under that name. Examples: set {_buy} to new dialog button labeled "Buy" running code: send "You asked for %dialog input ""qty""%" to player ## Normalized Vector Addon: Skript Category: Expression Syntax: normalized %vectors% Description: Returns normalized (unit length) vectors. Examples: set {_v} to normalized vector(3, 4, 0) ## Case Text Addon: Skript Category: Expression Syntax: %strings% in (upper|lower)[ ]case Description: 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? ## X Times Addon: Skript Category: Expression Syntax: %number% time[s] Description: 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 ## Angle Addon: Skript Category: Expression Syntax: %number% [in] deg[ree][s] Description: Represents the passed number value in degrees. If radians is specified, converts the passed value to degrees. This conversion may not be entirely accurate, due to floating point precision. Examples: set {_angle} to 90 degrees {_angle} is 90 # true 180 degrees is pi # false pi radians is 180 degrees # true ## Vectors - Cylindrical Shape Addon: Skript Category: Expression Syntax: [a] [new] cylindrical vector [from|with] [radius] %number%, [yaw] %number%(,[ and]| and) [height] %number% Description: 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 - Spherical Shape Addon: Skript Category: Expression Syntax: [a] [new] spherical vector [(from|with)] [radius] %number%, [yaw] %number%(,[ and]| and) [pitch] %number% Description: 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 ## Biome Addon: Skript Category: Expression Syntax: biome[s] %directions% %points% [in [(world|instance)] %instances%] Description: The biome at a location in an instance. Examples: set {_b} to biome at player's position in player's instance ## Block Addon: Skript Category: Expression Syntax: block[s] [type[s]] %directions% %points% [in [(world|instance)] %instances%] [1:with updates] Description: The block at a certain point in an instance. Examples: set block at player's position to stone ## MOTD Description Addon: Skript Category: Expression Syntax: motd description Description: The description shown in the server list ping event. Examples: set motd description to "Welcome!" ## MOTD Hover Sample Addon: Skript Category: Expression Syntax: motd (hover|player) sample Description: The hover/player sample text in the server list ping event. Examples: set motd hover sample to mm("Notch") and mm("jeb_") ## Spawn Instance Addon: Skript Category: Expression Syntax: spawn[ing] (instance|world) Description: The instance a player will spawn into during the player configuration event. Examples: set spawn instance to {_world} ## MOTD Player Count Addon: Skript Category: Expression Syntax: motd ((max:max[imum])|online) player(s|[ ]count) Description: The online or maximum player count in the server list ping event. Examples: set motd max player count to 100 ## MOTD Icon Addon: Skript Category: Expression Syntax: motd (image|[fav]icon) Description: The favicon image in the server list ping event. Examples: set motd favicon to image from file "server-icon.png" ## MOTD Chat Security Addon: Skript Category: Expression Syntax: motd chat security Description: Whether the server enforces secure chat in the server list ping event. Examples: set motd chat security to true ## Input Addon: Skript Category: Expression Syntax: input Description: Represents the input in a filter expression or sort effect. 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. The 'input index' pattern can be used when acting on a variable to access the index of the input. Examples: send "congrats on being staff!" to all players where [input has permission "staff"] sort {_list::*} based on length of input index ## NBT Item Addon: Skript Category: Expression Syntax: item from %nbtcompound% Description: Creates an item from NBT or returns the full item NBT of items. Examples: set {_item} to item from {_nbt} ## Instance Copy Addon: Skript Category: Expression Syntax: instance[[ ]container] cop(y|ies) of %instancecontainers% Description: Creates and registers a true copy of an instance container. Examples: set {_copy} to instance copy of {_instance} ## Biome/Dimension From Key Addon: Skript Category: Expression Syntax: (:biome|dimension [type]) (from|under) [name[ ]space[d]] [key] %string% Description: A biome or dimension type from a namespace key. Examples: set {_biome} to biome from namespace key "minecraft:plains" ## Filter Addon: Skript Category: Expression Syntax: %objects% (where|that match) \[<.+>\] 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"] loop (all blocks in radius 5 of player) where [block input is not air]: ## Inverse Boolean Addon: Skript Category: Expression Syntax: [the] (inverse|opposite)[s] of %booleans% Description: An expression to obtain the inverse value of a boolean Examples: set {_gravity} to inverse of player's flight mode ## Indices of List Addon: Skript Category: Expression Syntax: [(the|all [[of] the])] (indexes|indices) of %objects% 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" 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 ## Shuffled List Addon: Skript Category: Expression Syntax: shuffled %objects% Description: Shuffles given list randomly. Examples: set {_list::*} to shuffled {_list::*} ## Tag Addon: Skript Category: Expression Syntax: [the] [minecraft] [(1:item|2:block|3:entity [type])] tag[s] %strings% Description: A minecraft tag, used to group items, blocks or entity types together. Tags are written as "namespace:value"; if the namespace is left out, "minecraft" is used. Without a type, every registry is searched, so a name shared by an item and a block tag returns both. Examples: set {_tag} to minecraft tag "logs" set {_tag} to block tag "mineable/pickaxe" set {_tags::*} to item tags "planks" and "slabs" broadcast tag contents of entity type tag "skeletons" ## New Sidebar/Scoreboard Addon: Skript Category: Expression Syntax: [new] (score[ ]board|side[ ]bar) [(with [the] title|titled) %component%] Description: Creates a new sidebar/scoreboard. Examples: set {_s} to new sidebar named "Stats" ## Image From File Addon: Skript Category: Expression Syntax: [buffered] image[s] from file[s] %strings% Description: Loads a buffered image from a file path. Examples: set {_img} to image from file "server-icon.png" ## New Team Addon: Skript Category: Expression Syntax: [a] new team [named] %string% Description: Creates and registers a team with the given name. If a team with that name already exists it is returned unchanged, so reloading a script does not fail. Examples: set {_team} to a new team named "red" set team color of {_team} to dark red add player to members of {_team} ## Alphabetical Sort Addon: Skript Category: Expression Syntax: alphabetically sorted %strings% Description: Sorts given strings in alphabetical order. Examples: set {_list::*} to alphabetically sorted {_strings::*} ## Raw String Addon: Skript Category: Expression Syntax: raw %strings% 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 ## Team Addon: Skript Category: Expression Syntax: [the] team[s] named %strings% Description: An existing team, by name. Returns nothing if no team with that name exists. Deleting this unregisters the team and removes it from every client that can see it. Teams live in memory and are not saved across restarts, so scripts should recreate them on load. The word 'named' is required: without it the pattern would swallow expressions such as 'team prefix of {_t}'. Examples: set {_team} to team named "red" if team named "red" is not set: set {_team} to a new team named "red" ## Item Without Tooltip Addon: Skript Category: Expression Syntax: %items% with[:out] [the|its|their] (entire|:additional) tool[ ]tip[s] Description: An item with its tooltip hidden, or shown again. The entire tooltip hides everything, including the name and lore of the item. The additional tooltip hides the same parts as the hide additional tooltip item flag, such as potion effects, banner patterns and the contents of a container. Examples: give player stone without entire tooltip give player potion of healing without its additional tooltip set {_item} to {_hidden item} with entire tooltip ## Reversed List Addon: Skript Category: Expression Syntax: reversed %objects% Description: Reverses given list. Examples: set {_list::*} to reversed {_list::*} ## NBT Compound Addon: Skript Category: Expression Syntax: [:custom] nbt [compound[s]] (of|from) %taggables/strings/items% Description: The NBT compound of a taggable, string, item, or file. Examples: set {_nbt} to nbt compound of player's tool ## Centered Point Addon: Skript Category: Expression Syntax: centered %points% Description: Returns the center of a block position (adds 0.5 to x and z). Examples: set {_p} to centered player's position ## Keyed Addon: Skript Category: Expression Syntax: (keyed|indexed) %objects% Description: This expression is used to explicitly pass the keys of an expression alongside its values. For example, when setting a list variable or passing an expression to a function. Examples: set {_first::foo} to "value1" set {_first::bar} to "value2" set {_second::*} to keyed {_first::*} # {_second::foo} is "value1" and {_second::bar} is "value2" function indices(objects: objects) returns strings: return indices of {_objects::*} on load: set {_list::foo} to "value1" set {_list::bar} to "value2" set {_list::baz} to "value3" broadcast indices({_list::*}) # "1", "2", "3" broadcast indices(keyed {_list::*}) # "foo", "bar", "baz" function plusOne(numbers: numbers) returns numbers: loop {_numbers::*}: set {_numbers::%loop-index%} to loop-value + 1 return {_numbers::*} on load: set {_numbers::foo} to 1 set {_numbers::bar} to 2 set {_numbers::baz} to 3 set {_result::*} to keyed plusOne(keyed {_numbers::*}) # {_result::foo} is 2, {_result::bar} is 3, {_result::baz} is 4 ## New Weather Addon: Skript Category: Expression Syntax: [a] [new] weather with rain level %number% [[(,|and)] [with] thunder level %number%] Description: Creates a weather with the given rain and thunder levels. Both are numbers between 0 and 1 and are clamped to that range. A level that isn't given defaults to 0. Examples: set weather of {_instance} to new weather with rain level 0.4 and thunder level 0.2 set {_drizzle} to new weather with rain level 0.15 ## Particle With Data Addon: Skript Category: Expression Syntax: %*particle% (using|with) %item/dustoption/dusttransition/block/rgblike/number/integer/vibrationdata/traildata/effectdata% Description: A particle with extra data such as block, item, or dust options. Examples: set {_p} to block particle using stone ## Entity Attribute Addon: Skript Category: Expression Syntax: [the] %attributetypes% [((total|final|modified))] attribute[s] [value[s]] of %livingentities% Description: The numerical value of an entity's particular attribute(s). 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 join: set player's scale attribute to 0.5 set player's (max health and scale) attributes to 10 ## Distance Addon: Skript Category: Expression Syntax: [the] distance between %point% and %point% Description: 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!" ## Vectors - Vec Projection Addon: Skript Category: Expression Syntax: [vector] projection [of] %vector% on[to] %vector% 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) ## Index Of Addon: Skript Category: Expression Syntax: [the] (|first|last) index of %string% in %string% 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 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} ## Join & Split Addon: Skript Category: Expression Syntax: (concat[enate]|join) %strings% [(with|using|by) [[the] delimiter] %string%] 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 name of all players with "" | ""%" # %all players% would use the default "x, y, and z" set {_s::*} to the string argument split at "," ## Item With Flags Addon: Skript Category: Expression Syntax: %items% with [the] item flag[s] %itemflags% Description: An item with the given item flags applied, hiding those parts of its tooltip. Examples: give player diamond sword with the hide attributes item flag set {_potion} to potion of healing with all item flags set {_i} to stone with the item flags hide dye and hide enchants ## Parse Addon: Skript Category: Expression Syntax: %string% parsed as (%*classinfo%|"<.*>") 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 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 ## Point with Property Addon: Skript Category: Expression Syntax: %point% with (:x|:y|:z|:yaw|:pitch) [value] [of] %number% Description: A point with a specific property (x, y, z, yaw, pitch) modified. Examples: set {_p} to player's position with yaw 90 ## Random Number Addon: Skript Category: Expression Syntax: [a] random (:integer|number) (from|between) %number% (to|and) %number% 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 send "You rolled a %random integer from 1 to 6%!" to the player ## Item with Lore Addon: Skript Category: Expression Syntax: %item% with lore %components% Description: An item with a specific lore. Examples: give player stone with lore "First line" and "Second line" ## Direction Addon: Skript Category: Expression Syntax: [%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%] Description: 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 ## Difference Addon: Skript Category: Expression Syntax: difference (between|of) %object% and %object% Description: The difference between two values Supported types include numbers, dates and 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!" ## Point Offset Addon: Skript Category: Expression Syntax: %points%[ ](offset by|~)[ ]%point% Description: A point offset by a certain amount. Examples: set {_p} to player's position offset by vector(1, 2, 3) ## Vector Rotated Around XYZ Axis Addon: Skript Category: Expression Syntax: %vectors% rotated around (x|y|z)(-| )axis by %number% [degrees] Description: Rotates a vector around the x, y, or z axis by a number of degrees. Examples: set {_v} to vector(1, 0, 0) rotated around y-axis by 90 degrees ## Item Named Addon: Skript Category: Expression Syntax: %item% (with [the] name|named) %component% Description: An item with a specific custom name. Examples: give player stone named "Lucky Stone" ## New Dialog Option Addon: Skript Category: Expression Syntax: [new] [dialog] option %string% [labeled %component%] [selected:selected] Description: Creates one entry for a single option input. The id is what comes back in the click payload; the label is what the player sees and defaults to the id. Marking an option as selected makes it the initial choice. Examples: set {_easy} to new dialog option "easy" labeled mm("Easy") selected set {_hard} to new dialog option "hard" labeled mm("Hard") ## Numbers Addon: Skript Category: Expression Syntax: [(all [[of] the]|the)] (numbers|integers|decimals) (between|from) %number% (and|to) %number% 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 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 ## Vectors - Vec Between Locations Addon: Skript Category: Expression Syntax: [the] vector (from|between) %point% (to|and) %point% Description: Creates a vector between two locations. Examples: set {_v} to vector between {_loc1} and {_loc2} ## Vectors - Angle Between Addon: Skript Category: Expression Syntax: [the] angle between [[the] vectors] %vector% and %vector% Description: Gets the angle between two vectors. Examples: send "%the angle between vector 1, 0, 0 and vector 0, 1, 1%" ## Random Addon: Skript Category: Expression Syntax: [a] random %*classinfo% [out] of %objects% 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 give a random item out of all items to the player ## Vectors - Cross Product Addon: Skript Category: Expression Syntax: %vector% cross %vector% Description: Gets the cross product between two vectors. Examples: send "%vector 1, 0, 0 cross vector 0, 1, 0%" ## Formatted Addon: Skript Category: Expression Syntax: formatted %string% [(using|with) [[tag] resolver[s]] %tagresolvers%] Description: Format a string into a component. You can also use to input a custom head. Examples: send formatted "hello" to player ## Item with NBT Addon: Skript Category: Expression Syntax: %item% with [nbt] %nbtcompounds% Description: An item with a specific NBT. Examples: give player stone with nbt from "{enchantment_glint_override:1b}" ## Color With Alpha Addon: Skript Category: Expression Syntax: %rgblikes% with (opacity|alpha) [value] %integer% Description: A color with a specific opacity/alpha value. Examples: set {_c} to red with alpha value 128 ## New Inventory Addon: Skript Category: Expression Syntax: new %inventorytype% [inventory] [(named|with (name|title)) %component%] Description: An expression to create a new inventory. Examples: set {_inv} to new chest 3 row inventory named mm("bob") ## All NBT Tag Names Addon: Skript Category: Expression Syntax: all [%tagtype%] tag (name|key)s of %nbtcompounds% Description: All tag names or keys of a given type in an NBT compound. Examples: set {_tags::*} to all tag names of {_nbt} ## Value Within Addon: Skript Category: Expression Syntax: [the] (%*classinfo%|value[:s]) (within|in) %objects% 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 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 - Dot Product Addon: Skript Category: Expression Syntax: %vector% dot %vector% Description: Gets the dot product between two vectors. Examples: set {_dot} to {_v1} dot {_v2} ## Amount of Items Addon: Skript Category: Expression Syntax: %integer% of %items% Description: Returns a certain amount of an item. Examples: give 5 of player's tool to player ## Date Ago/Later Addon: Skript Category: Expression Syntax: %timespan% (ago|in the past|before [the] [date] %date%) Description: 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} ## Repeat String Addon: Skript Category: Expression Syntax: %strings% repeated %integer% time[s] Description: Repeats inputted strings a given amount of times. Examples: broadcast nl and nl repeated 200 times broadcast "Hello World " repeated 5 times if "aa" repeated 2 times is "aaaa": broadcast "Ahhhh" repeated 100 times ## Vectors - Vec from Pitch and Yaw Addon: Skript Category: Expression Syntax: [a] [new] vector (from|with) yaw %number% and pitch %number% Description: Creates a vector from a yaw and pitch value. Examples: set {_v} to vector from yaw 45 and pitch 45 ## Except Addon: Skript Category: Expression Syntax: %objects% (except|excluding|not including) %objects% Description: Filter a list by providing objects to be excluded. Examples: spawn zombie at position(0, 0, 0, 90, 25) in {_instance}: set auto viewability of entity to false add all players except {_player} to viewers of entity ## Characters Between Addon: Skript Category: Expression Syntax: [(all [[of] the]|the)] [:alphanumeric] characters (between|from) %string% (and|to) %string% 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": broadcast "%loop-value%" # 0123456789:;<=>?@ABC... ...uvwxyz send characters between "0" and "z" # 0123456789ABC... ...uvwxyz send alphanumeric characters between "0" and "z" ## Ternary Addon: Skript Category: Expression Syntax: %objects% if <.+>[,] (otherwise|else) %objects% 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 ## Default Value Addon: Skript Category: Expression Syntax: %objects% (otherwise|?) %objects% 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!" ## Skin From Addon: Skript Category: Expression Syntax: skin from [(uuid|[user]name)[s]] %strings% Description: Returns a skin from a player name, UUID, or signature. Examples: set skin of player to skin from "jeb_" ## Substring Addon: Skript Category: Expression Syntax: [the] (part|sub[ ](text|string)) of %strings% (between|from) (ind(ex|ices)|character[s]|) %number% (and|to) (index|character|) %number% 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 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 ## Random Character Addon: Skript Category: Expression Syntax: [a|%integer%] random [:alphanumeric] character[s] (from|between) %string% (to|and) %string% 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 "" send 3 random alphanumeric characters between "0" and "z" ## Passenger Height Offset Addon: Skript Category: Expression Syntax: passenger [height|position] offset (of|for) %entitytypes% [riding] (on|from) %entity% for [passenger] index %integer% Description: Allows you to get the passenger offset for an entity type that would be riding on the provided entity at the given index. Examples: spawn zombie at passenger position offset for zombie riding on {_entity} for index 0 in {_entity}'s instance ## Vector Rotated Around Axis Addon: Skript Category: Expression Syntax: %vectors% rotated around %vector% by %number% [degrees] Description: Rotates a vector around another vector by a number of degrees. Examples: set {_v} to vector(1, 0, 0) rotated around vector(0, 1, 0) by 90 degrees ## New Dialog Button Running Code Addon: Skript Category: Expression Syntax: [new] dialog button labeled %component% [with tooltip %component%] [with width %number%] running [code] Description: Creates a dialog button whose code runs when a player clicks it. The button sends the dialog's input values back with the click, so 'dialog input' works inside the section. The player who clicked is the event-player. The section runs on the server, so it can do anything a normal trigger can. Use 'new dialog button' without 'running code' for a button with a fixed client-side action. Warning: the button's callback key is live from parse time onward, and any player can send a click for it at any time with arbitrary input values, not just the player it was shown to. Always validate anything read from 'dialog input' before trusting it. Examples: set {_buy} to new dialog button labeled mm("Buy") running code: send "You bought %dialog input ""qty""% items!" to player ## Background Music Addon: Skript Category: Expression Syntax: [new] background music [with [music] %music%] [(,|[and] with) creative [music] %music%] [(,|[and] with) underwater [music] %music%] Description: Creates background music with optional default, creative, and underwater tracks. Examples: set {_music} to new background music with music {_track} ## Block Sphere Addon: Skript Category: Expression Syntax: [(all [[of] the]|the)] blocks in radius %number% [(of|around) %point%] [in [(world|instance)] %instance%] Description: All blocks in a sphere around a center, mostly useful for looping. Examples: set all blocks in radius 3 around player in player's instance to stone ## Bed Rule Addon: Skript Category: Expression Syntax: [new] bed rule with sleep [rule] %bedrulerule% (,|[and] with) [set] spawn [rule] %bedrulerule% [explode:with explosion[s]] [[and] with error [message] %component%] Description: Creates a bed rule with sleep, spawn, and optional explosion settings. Examples: set {_rule} to new bed rule with sleep rule monsters and with spawn rule spawn ## Ambient Sounds Addon: Skript Category: Expression Syntax: [new] ambient sound[s] [with loop %string%] [(,|[and] with) mood %mood%] [(,|[and] with) addition[s] %additions%] Description: Creates ambient sounds with optional loop, mood, and additions. Examples: set {_sounds} to new ambient sounds with loop "minecraft:ambient.cave" ## Block With Property Addon: Skript Category: Expression Syntax: %blocks% with [block] %string% property [of] %string% Description: A block with a specific block state property set. Examples: set {_b} to oak stairs with block "facing" property of "north" ## New World Border Addon: Skript Category: Expression Syntax: [a] [new] world border with [a] diameter [of] %number% [[and] [with] center[ed] [at] %point%] [[and] [with] [a] warning distance [of] %number%] [[and] [with] [a] warning time [of] %timespan%] Description: Creates a world border with the given diameter, and optionally a center, a warning distance and a warning time. Anything left out is taken from the default world border, which is centered at 0, 0 with a warning distance of 5 and a warning time of 15 seconds. Examples: set world border of {_instance} to new world border with diameter 500 set {_border} to new world border with diameter 500 centered at {_spawn} with warning distance 10 and warning time 5 seconds ## New Dialog Body Addon: Skript Category: Expression Syntax: [new] plain [message] body %component% [with width %number%] Description: Creates a body element for a dialog: either a block of text or an item with an optional description. Width defaults to 200 and item size defaults to 16 by 16. Examples: set {_text} to new plain message body mm("Choose an item") set {_icon} to new item body of diamond sword with description mm("Legendary") ## Point Addon: Skript Category: Expression Syntax: [the] position %directions% [%point%] Description: The position 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-position # exactly the same as writing 'drop 5 apples' set {_loc} to the position 1 meter above the player ## New Single Option Input Addon: Skript Category: Expression Syntax: [new] single option input [named] %string% with options %dialogoptions% [labeled %component%] [with width %number%] Description: Creates a dropdown for a dialog. Options come from the 'dialog option' expression. If no option is marked as selected, the client shows the first one. Examples: set {_mode} to new single option input named "mode" with options {_easy}, {_hard} labeled "Difficulty" ## New Boss Bar Addon: Skript Category: Expression Syntax: [new] boss[ ]bar [(with [the] title|titled) %component%] [[and] with progress %number%] [[and] with colo[u]r %bossbarcolor%] [[and] with overlay %bossbaroverlay%] Description: Creates a new boss bar. Progress is a number between 0 and 1 and is clamped to that range, defaulting to 1. The color defaults to white and the overlay to progress. A boss bar is not shown to anybody until it is shown to them. Examples: set {_bar} to new boss bar titled "Dragon" add {_bar} to boss bars of all players set {_bar} to new boss bar titled "Event starting" with progress 0 and with color green bar ## Percent of Addon: Skript Category: Expression Syntax: %number%(\%| percent) of %numbers% Description: 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 ## Sound Addon: Skript Category: Expression Syntax: sound[s] %strings% [with seed %number%] [(in|from) %soundcategory%] [(at|with) volume %number%] [(and|at|with) pitch %number%] Description: Creates a sound from an ID with optional seed, category, volume, and pitch. Examples: set {_sound} to sound "minecraft:entity.experience_orb.pickup" at volume 1 and pitch 1 ## Chunk Addon: Skript Category: Expression Syntax: [(all [[of] the]|the)] chunk[s] (of|%directions%) %points% [in [(world|instance)[s]] %instances%] 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::*} set {_chunks::*} to the loaded chunks of the player's world ## New Boolean Input Addon: Skript Category: Expression Syntax: [new] boolean input [named] %string% [labeled %component%] [initially %boolean%] [with true value %string%] [with false value %string%] Description: Creates a checkbox for a dialog. It starts unchecked unless 'initially true' is given, matching the vanilla default. The true and false values are the strings sent back in the click payload, defaulting to "true" and "false". Examples: set {_agree} to new boolean input named "agree" labeled "I agree" initially false ## Blocks Addon: Skript Category: Expression Syntax: [(all [[of] the]|the)] blocks %direction% [%points%] [in [(world|instance)] %instance%] 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: loop blocks between the block below the player and {_block}: set the blocks below the player, the victim and the {_block} to air set all blocks within {loc1} and {loc2} to stone set all blocks within chunk at player to air ## New Text Input Addon: Skript Category: Expression Syntax: [new] text input [named] %string% [labeled %component%] [with initial [value] %string%] [with max length %number%] [with width %number%] [(multiline|multi-line) [with max lines %number%]] Description: Creates a text field for a dialog. The name is the key the value comes back under in 'dialog input'. Width defaults to 200 and max length to 32. A multiline field with no max lines given grows freely. Examples: set {_name} to new text input named "nick" labeled "Nickname" with max length 16 set {_essay} to new text input named "reason" labeled "Reason" multiline with max lines 5 ## New Number Range Input Addon: Skript Category: Expression Syntax: [new] number range input [named] %string% from %number% to %number% [labeled %component%] [with initial [value] %number%] [with step %number%] [with label format %string%] [with width %number%] Description: Creates a slider for a dialog. The label format is the vanilla format string used to render the current value, defaulting to "options.generic_value" which shows 'label: value'. Step defaults to none, which lets the slider move continuously. Examples: set {_qty} to new number range input named "qty" from 1 to 64 labeled "Amount" with initial value 1 with step 1 ## New Dialog Button Addon: Skript Category: Expression Syntax: [new] dialog button labeled %component% [with tooltip %component%] [with width %number%] [(command:running command %string%|url:opening url %string%|suggest:suggesting %string%|copy:copying %string%|show:showing dialog %dialog%|page:changing page %number%|custom:with custom action %string% [with payload %nbtcompound%]|dynamic:with dynamic custom action %string% [with additions %nbtcompound%])] Description: Creates a button for a dialog with a fixed action. A button with no action just closes the dialog according to its after action setting. Add 'running code' with a section instead when the button should run script code. A custom action key must be in 'namespace:value' format and is what 'on dialog click' matches on. A dynamic custom action key is the same, but the client sends the dialog's input values back with the click, so 'dialog input' works in an 'on dialog click' handler for it; 'with additions' merges extra fixed NBT into that payload. Examples: set {_buy} to new dialog button labeled "Buy" with tooltip "Costs 10 coins" running command "buy" set {_wiki} to new dialog button labeled "Wiki" opening url "https://example.com" set {_next} to new dialog button labeled "More" showing dialog {_other} set {_confirm} to new dialog button labeled "Confirm" with dynamic custom action "myserver:confirm" ## XYZ Component Addon: Skript Category: Expression Syntax: [the] (0:x|1:y|2:z) [component[s]] of %points% Description: Gets or changes the x, y or z component of a point. Examples: set {_v} to vector(1, 2, 3) send "%x of {_v}%, %y of {_v}%, %z of {_v}%" ## Display Translation Addon: Skript Category: Expression Syntax: [the] [display] translation of %entities% Description: The translation offset of a display entity. Examples: set display translation of {_entity} to vector(0, 1, 0) ## Display Shadow Radius Addon: Skript Category: Expression Syntax: [the] [display] shadow radius of %entities% Description: The shadow radius of a display entity. Examples: set display shadow radius of {_entity} to 0.5 ## Team Name Tag Visibility Addon: Skript Category: Expression Syntax: [the] name[ ]tag visibility of %teams% Description: Who can see the name tags of a team. Changing it updates every client that can see the team. Examples: set name tag visibility of {_team} to hide for other teams ## Frozen Time Addon: Skript Category: Expression Syntax: [the] fr(eeze|ozen) time of %entities% Description: The amount of time an entity has been frozen for. A higher value will result in a higher frozen effect on-screen. Examples: set frozen time of player to 3 seconds ## Speed Addon: Skript Category: Expression Syntax: [the] (walk[ing]|fl(y[ing]|ight))[( |-)]speed of %players% 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 increase the argument's fly speed by 0.1 ## Air Time Addon: Skript Category: Expression Syntax: [the] air time of %entities% Description: The amount of time an entity has left for air. Examples: set air time of player to 3 seconds ## Respawn Point Addon: Skript Category: Expression Syntax: [the] respawn (point|position) of %players% Description: The respawn point of a player. Examples: set respawn point of player to player's position ## Unformatted Addon: Skript Category: Expression Syntax: (unformatted|plain) %components% Description: Strip coloring, hover events, etc. and make the provided component a plain string. Examples: send unformatted {_component} ## Line Width Addon: Skript Category: Expression Syntax: [the] line width of %entities% Description: The line width of a text display entity. Examples: set line width of {_entity} to 200 ## Alpha/Red/Green/Blue RGBLike Value Addon: Skript Category: Expression Syntax: [the] (:alpha|:red|:green|:blue) (value|component) of %rgblike% Description: The alpha, red, green, or blue value of colors. Ranges from 0 to 255. Alpha represents opacity. Examples: broadcast red value of rgb(100, 0, 50) # sends '100' set {_red} to red's red value + 10 ## Remote Address Addon: Skript Category: Expression Syntax: %players%'[s] (ip[s]|remote address[es]) Description: A player's IP address or remote address. Examples: broadcast "%ip of player%" ## Team Prefix/Suffix Addon: Skript Category: Expression Syntax: [the] team (prefix|suffix:suffix) of %teams% Description: The prefix or suffix shown around the name of every member of a team. Deliberately prefixed with team so it does not collide with the LuckPerms prefix of a player. Changing it updates every client that can see the team. Examples: set team prefix of {_team} to mm("[R] ") set team suffix of {_team} to mm(" (red)") ## From UUID Addon: Skript Category: Expression Syntax: player[s] from uuid[s] %strings% Description: A player, entity, or instance from a UUID string. Examples: set {_p} to player from uuid uuid of player ## UUID Addon: Skript Category: Expression Syntax: [the] uuid of %entities/instances% Description: The UUID of an entity. Examples: broadcast "UUID: %uuid of player%" ## Previous Position Addon: Skript Category: Expression Syntax: [the] previous position of %entities% Description: An entity's position from the previous tick. Examples: set {_prev} to previous position of player ## Transformation Interpolation Addon: Skript Category: Expression Syntax: [the] transform[ation] [interpolation] (:start|duration) of %entities% Description: The transformation interpolation start or duration of a display entity. Examples: set transformation interpolation duration of {_entity} to 1 second ## Item Amount Addon: Skript Category: Expression Syntax: [the] item[[ ]stack] (amount|size|number) of %items% 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 ## Boss Bar Color Addon: Skript Category: Expression Syntax: [the] [bar] colo[u]r of %bossbars% Description: The color of a boss bar. Changing it updates the bar for everybody already seeing it. Examples: set color of {_bar} to red bar if progress of {_bar} < 25: set color of {_bar} to red bar ## Tag Contents Addon: Skript Category: Expression Syntax: [the] tag (contents|values) of %minecrafttags% Description: Every value held by a minecraft tag. An item tag returns items, a block tag returns blocks, and an entity type tag returns entity types. Examples: broadcast tag contents of block tag "logs" set {_planks::*} to tag values of item tag "planks" ## Current Sleeping Position Addon: Skript Category: Expression Syntax: [the] [current] [bed] sleep[ing] (position|point) of %livingentities% Description: The position where a living entity is currently sleeping. Examples: set {_bed} to current sleeping position of player ## Ping Addon: Skript Category: Expression Syntax: [the] (ping|latency) of %players% Description: A player's network latency in milliseconds. Is able to be spoofed as well, but will be overridden when the server is pinged. Examples: broadcast "Ping: %ping of player%" ## Eye Height Addon: Skript Category: Expression Syntax: [the] eye height of %entities/entitytypes% Description: The eye height of an entity/entity type. Examples: set {_eye-height} to eye height of player ## Teleport Interpolation Duration Addon: Skript Category: Expression Syntax: [the] teleport [interpolation] duration of %entities% Description: The teleport interpolation duration of a display entity. Examples: set teleport interpolation duration of {_entity} to 1 second ## Billboard Render Constraints Addon: Skript Category: Expression Syntax: [the] bill[ ]board [render] constraint[s] of %entities% Description: The billboard render constraints of a display entity. Examples: set billboard render constraints of {_entity} to fixed ## Hex Code Addon: Skript Category: Expression Syntax: [the] hex[adecimal] code of %rgblikes% Description: Returns the hexadecimal value representing the given color(s). The hex value of a colour does not contain a leading #, just the RRGGBB value. For those looking for hex values of numbers, see the asBase and fromBase functions. NOTE: If the provided color is an alpha color, the hex format will be AARRGGBB. Examples: send formatted "<#%hex code of rgb(100, 10, 10)%>darker red" to all players ## Display Text Addon: Skript Category: Expression Syntax: [the] [display] text of %entities% Description: The text displayed by a text display entity. Examples: set display text of {_entity} to "Hello World!" ## Pickable State Addon: Skript Category: Expression Syntax: [the] pickab(le|ility) [state] of %entities% Description: Whether a dropped item can be picked up, which is enabled by default. Setting this only toggles the item's own flag, while reading it also takes the pickup delay and removal into account, so a dropped item whose pickup delay is still counting down reads false even though its flag is true. A dropped item that cannot be picked up is never merged into another one either. Examples: drop diamond at player's position: before spawn: set pickable state of entity to false ## Pickup Delay Addon: Skript Category: Expression Syntax: [the] [item] pick[ ]up delay of %entities% Description: How long a dropped item has to lie on the ground before it can be picked up, counted from the moment it was dropped. A non ticking dropped item never counts its delay down. Examples: drop diamond at player's position: before spawn: set pickup delay of entity to 3 seconds ## Time Since/Until Addon: Skript Category: Expression Syntax: [the] time since %dates% Description: The time since a date has passed or the time until a date will pass. This expression will return 0 seconds if the time since or time until would be negative, e.g. if one tries to get the time since a future date. Examples: send "%time since 5 minecraft days ago% has passed since 5 minecraft days ago!" to player send "%time until {countdown::end}% until the game begins!" to player ## Level Addon: Skript Category: Expression Syntax: [the] [xp|exp[erience]] level [of %players%] Description: The experience level of a player. Examples: reduce the event-victim's level by 1 set the player's level to 0 ## Vulnerability Addon: Skript Category: Expression Syntax: [the] vulnerability [state] of %livingentities% Description: The vulnerability state of a living entity. Examples: set vulnerability of player to true ## Dialog Bodies Addon: Skript Category: Expression Syntax: [the] [dialog] bod(y|ies) of %dialogs% Description: The body elements of a dialog. Supports set, add, remove, and clear. Examples: add (new plain message body mm("Sold out")) to bodies of {_d} clear bodies of {_d} ## Character from Codepoint Addon: Skript Category: Expression Syntax: character (from|at|with) code([ ]point| position) %integer% Description: Returns the character at the specified codepoint Examples: function chars_between(lower: string, upper: string) :: strings: set {_lower} to codepoint of {_lower} return {_none} if {_lower} is not set set {_upper} to codepoint of {_upper} return {_none} if {_upper} is not set loop integers between {_lower} and {_upper}: add character from codepoint loop-value to {_chars::*} return {_chars::*} ## Display Scale Addon: Skript Category: Expression Syntax: [the] [display] scale of %entities% Description: The scale of a display entity. Examples: set display scale of {_entity} to vector(2, 2, 2) ## Player Chat Completions Addon: Skript Category: Expression Syntax: [the] [custom] chat completion[s] of %players% Description: The custom chat completion suggestions. You can add, set, remove, and clear them. Removing the names of online players with this expression is ineffective. This expression will not return anything due to server limitations. Examples: add "Skript" and "Njol" to chat completions of all players remove "text" from {_p}'s chat completions clear player's chat completions ## Merge Range Addon: Skript Category: Expression Syntax: [the] merge range of %entities% Description: How far away a dropped item looks for other dropped items to merge with, in blocks. Only a dropped item that is mergeable uses this. Examples: drop 32 of stone at player's position: before spawn: set merge range of entity to 4 ## Boss Bar Overlay Addon: Skript Category: Expression Syntax: [the] [bar] overlay of %bossbars% Description: The notching of a boss bar, which is either progress for a solid bar or one of the notched styles. Changing it updates the bar for everybody already seeing it. Examples: set overlay of {_bar} to notched 12 ## Yaw/Pitch Addon: Skript Category: Expression Syntax: [the] (1:yaw|2:pitch) of %points% Description: The yaw or pitch of a point or entity. Examples: set {_yaw} to yaw of player ## Shoulder Parrot Type Addon: Skript Category: Expression Syntax: [the] (:left|right) shoulder parrot type of %players% Description: The type of parrot on a player's left or right shoulder. Examples: set left shoulder parrot type of player to red ## Dialog Inputs Addon: Skript Category: Expression Syntax: [the] [dialog] inputs of %dialogs% Description: The inputs of a dialog. Supports set, add, remove, and clear. Examples: add {_qty} to inputs of {_d} ## Boss Bar Title Addon: Skript Category: Expression Syntax: [the] [bar] title of %bossbars% Description: The title of a boss bar. Changing it updates the bar for everybody already seeing it. Examples: set title of {_bar} to "Dragon: %health of {_dragon}%" ## Team Name Addon: Skript Category: Expression Syntax: [the] team name of %teams% Description: The name a team was registered under. This is its identity and cannot be changed. Examples: broadcast "you are on %team name of team of player%" ## Team Display Name Addon: Skript Category: Expression Syntax: [the] team display name of %teams% Description: The display name of a team. Named separately from the plain name expression so it does not shadow it. Changing it updates every client that can see the team. Examples: set team display name of {_team} to mm("Red Team") ## Response Addon: Skript Category: Expression Syntax: [the] respons(e|iveness) [state] of %entities% Description: The response state of an interaction entity (whether the player's hand will swing or not when interacting with it). Examples: set response state of {_interaction} to true ## Former/Future State Addon: Skript Category: Expression Syntax: [the] (former|past|old) [state] [of] %object% 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: 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 ## Team Color Addon: Skript Category: Expression Syntax: [the] team colo[u]r of %teams% Description: The color of a team. This is what tints member name tags and their glow outline. Changing it updates every client that can see the team. Examples: set team color of {_team} to dark red set glowing of player to true add player to members of {_team} ## Hover Event Addon: Skript Category: Expression Syntax: [the] hover event of %components% Description: The hover event of a component. Examples: set hover event of {_component} to hover event showing "Hello" ## Fire Time Addon: Skript Category: Expression Syntax: [the] fire time of %livingentities% Description: The amount of time an entity is on fire. Examples: set fire time of player to 3 seconds ## Vectors - Create from Direction Addon: Skript Category: Expression Syntax: vector[s] [from] %directions% 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 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 ## See Through Addon: Skript Category: Expression Syntax: [the] see through [(property|state)] of %entities% Description: The see through state of a text display entity. Examples: set see through of {_entity} to true ## Tags Of Addon: Skript Category: Expression Syntax: [all [of] [the]] [(1:item|2:block|3:entity [type])] tags of %items/blocks/entitytypes/entities% Description: Every minecraft tag an item, block, entity or entity type belongs to. Without a kind, every registry is searched, so an oak log returns both its item and its block tags. Examples: broadcast tags of dirt set {_tags::*} to block tags of event-block if player's tool's item tags contains item tag "planks": send "holding a plank" to player ## Color from Hex Code Addon: Skript Category: Expression Syntax: [the] colo[u]r[s] (from|of) hex[adecimal] code[s] %strings% Description: Returns a proper argb color from a hex code string. The hex code must contain RRGGBB values, but can also contain a leading # or AARRGGBB format. Invalid codes will cause runtime errors. Examples: send color from hex code "#FFBBA7" send color from hex code "FFBBA7" send color from hex code "#AAFFBBA7" ## Facing Addon: Skript Category: Expression Syntax: [the] (horizontal|) facing of %entities/blocks% 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: set facing of player to vector from yaw 90 and pitch 0 # won't teleport the player, will just set their facing ## Panda Rolling State Addon: Skript Category: Expression Syntax: [the] rolling [state] of %entities% Description: The rolling state of a panda. Entities that are not pandas are ignored. NOTE: If you set its rolling state to true, then want to make it roll again, you must first set its rolling state to false. Examples: spawn a panda at player's position: after spawn: set rolling state of entity to true if rolling state of {_panda} is true: set rolling state of {_panda} to false ## Text Opacity Addon: Skript Category: Expression Syntax: [the] text opacity of %entities% Description: The text opacity of a text display entity. Examples: set text opacity of {_entity} to 255 ## Vectors - Squared Length Addon: Skript Category: Expression Syntax: [the] squared length[s] of %vectors% Description: Gets the squared length of a vector. Examples: send "%squared length of vector 1, 2, 3%" ## Respawn Screen Usage Addon: Skript Category: Expression Syntax: [the] respawn screen usage of %players% Description: Whether a player sees the respawn screen on death. Examples: set respawn screen usage of player to false ## Enchantments Addon: Skript Category: Expression Syntax: [the] enchant[(s|ment[s])] of %items% Description: The enchantments of an item. Examples: set enchantments of player's tool to protection 4 and unbreaking 3 ## Food Level Addon: Skript Category: Expression Syntax: [the] (food|hunger)[[ ](level|met(er|re)|bar)] of %players% Description: A player's food (hunger) level. Examples: set food level of player to 20 ## Health Addon: Skript Category: Expression Syntax: [the] health of %livingentities% Description: The health of a living entity. Examples: set health of player to 20 ## Fire State Addon: Skript Category: Expression Syntax: [the] (fire|flaming) [state] of %entities% Description: The fire state of an entity. Unlike the fire time that goes down, this will persist until you turn it off. If an entity gains fire time and it runs out, they will no longer be on fire regardless of what was set in this expression. Examples: set fire state of player to true ## Flight Mode Addon: Skript Category: Expression Syntax: [the] fl(y[ing]|ight) (mode|state) of %players% Description: Whether the player is capable of flying or not. Examples: set flight mode of player to true ## Item Flags Addon: Skript Category: Expression Syntax: [the] item flag[s] of %items% Description: The item flags of an item, which are the parts of its tooltip that are hidden. A flag is only listed if everything it hides is currently hidden. Examples: add hide enchants to item flags of player's tool remove hide dye from the item flags of {_item} set item flags of {_item} to hide attributes and hide unbreakable clear item flags of {_item} if item flags of player's tool contains hide attributes: send "your tool's attributes are hidden!" ## Protocol Version Addon: Skript Category: Expression Syntax: %players%'[s] [protocol] version Description: A player's protocol version, or the protocol version in a server list ping event. Examples: broadcast "Version: %protocol version of player%" ## Chunk Coordinate Addon: Skript Category: Expression Syntax: [the] chunk (:x|z) of %chunks% Description: The x or z coordinate of a chunk. Examples: broadcast "Chunk X: %chunk x of chunk at player%" ## Background Color Addon: Skript Category: Expression Syntax: [the] background color of %entities% Description: The background color of a text display entity. Examples: set background color of {-a} to rgb(255, 255, 255, 128) ## Display Rotation Addon: Skript Category: Expression Syntax: [the] [display] (:left|right) rotation of %entities% Description: The left or right rotation of a display entity. Examples: set display left rotation of {_entity} to vector(0, 0, 1) ## Type of Addon: Skript Category: Expression Syntax: [the] type of %entities/items/inventories/blocks/enchantments% Description: Type of a block, item, entity, inventory, potion effect or enchantment type. 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. Types of enchantment types are enchantments. Examples: on rightclick on an entity: message "This is a %type of clicked entity%!" ## Position Addon: Skript Category: Expression Syntax: [the] [:block] position of %points% Description: The position of a block or entity. This not only represents the x, y and z coordinates of the position but also includes the world and the direction an entity is looking (e.g. teleporting to a saved position will make the teleported entity face the same saved direction every time). Please note that the position of an entity is at it's feet, use head position to get the position of the head. Examples: set {home::%uuid of player%} to player's position message "Your home was set to %player's position% in %instance of player%." ## World Border Center Addon: Skript Category: Expression Syntax: [the] [world border] center of %worldborders/instances% Description: The center of a world border. A world border only stores an x and a z, so the y of this point is always 0 and the y of a point it is set to is ignored. Resetting it moves the center back to 0, 0. Examples: set center of world border of {_instance} to {_spawn} set {_center} to center of {_instance}'s world border ## Vehicle Addon: Skript Category: Expression Syntax: [the] vehicle of %entities% Description: The vehicle that an entity is riding. Examples: set {_v} to vehicle of player ## Silent Addon: Skript Category: Expression Syntax: [the] silen(t property|ce) of %entities% Description: Whether an entity is silent. Examples: set silent property of {_entity} to true ## Rain/Thunder Level Addon: Skript Category: Expression Syntax: [the] (rain|:thunder) level of %instances/weathers% Description: The rain or thunder level of an instance or a weather, a number between 0 and 1. Values outside of that range are clamped. Only the level of an instance can be changed, as a weather itself can't be modified. Examples: set rain level of {_instance} to 0.5 add 0.2 to thunder level of {_instance} set {_level} to rain level of (weather of {_instance}) ## Team Members Addon: Skript Category: Expression Syntax: [the] [team] members of %teams% Description: The members of a team, as the team stores them: a username for a player, a uuid for anything else. Adding a player stores their username and adding an entity stores its uuid, so either can be added directly. See also 'players of team' and 'entities of team', which resolve these back into real objects. Examples: add player to members of {_team} remove player from members of {_team} clear members of {_team} loop members of {_team}: broadcast loop-value ## Saturation Level Addon: Skript Category: Expression Syntax: [the] saturation [level] of %players% Description: A player's saturation level. Examples: set saturation level of player to 5 ## Held Item Slot Addon: Skript Category: Expression Syntax: [the] held [item] slot of %players% Description: The hotbar slot index a player is holding. Examples: set held item slot of player to 0 ## Instant Break Addon: Skript Category: Expression Syntax: [the] insta[nt] break [stat(e|us)] of %players% Description: Whether a player can instantly break blocks. Examples: set instant break status of player to true ## Hover Event Of Addon: Skript Category: Expression Syntax: hover event (show|display)ing %components/items/entities% Description: Creates a hover event that shows a component, item, or entity. Examples: set {_hover} to hover event showing player ## Coordinate Addon: Skript Category: Expression Syntax: [the] (1:x|2:y|3:z)[(-| )(coord[inate]|pos[ition])[s]] of %points% Description: The x, y, or z coordinate of a point. Examples: set {_x} to x-coordinate of player's position ## Amount Addon: Skript Category: Expression Syntax: [the] (amount|number|size) of %objects% 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!" ## Item Material Id Addon: Skript Category: Expression Syntax: [the] material id of %items% Description: Allows you to get the material id (namespace) of an item. Examples: send material id of wooden shovel to player # prints minecraft:wooden_shovel ## Team Of Addon: Skript Category: Expression Syntax: [the] team of %entities% Description: The team a player, entity or raw member name belongs to, if any. Examples: if team of player is set: broadcast team name of team of player ## Shadow Addon: Skript Category: Expression Syntax: [the] [text] shadow [property] of %entities% Description: The shadow state of a text display entity. Examples: set shadow of {_entity} to true ## Vectors - Length Addon: Skript Category: Expression Syntax: [the] (vector|standard|normal) length[s] of %vectors% Description: Gets or sets the length of a vector. Examples: send "%standard length of vector 1, 2, 3%" ## Absorption Hearts Addon: Skript Category: Expression Syntax: [the] absorption hearts of %players% Description: The absorption hearts of a player. Examples: set absorption hearts of player to 20 ## Physics Addon: Skript Category: Expression Syntax: [the] physics [property] of %entities% Description: Whether physics is enabled for an entity. Examples: set physics property of {_entity} to false ## Item Pickup State Addon: Skript Category: Expression Syntax: [the] item pick[ ]up[ability] [state] of %entities% Description: Whether a living entity is allowed to pick dropped items up, which is disabled for every entity by default. The item pickup event only runs for entities that have this enabled. Entities that are not living entities are ignored. Examples: set item pickup state of player to true on item pickup: if item pickup state of event-entity is true: give event-item to event-entity ## Timespan Details Addon: Skript Category: Expression Syntax: [the] (:(tick|second|minute|hour|day|week|month|year))s of %timespans% Description: Retrieve specific information of a timespan such as hours/minutes/etc. Examples: set {_t} to difference between now and {Payouts::players::%uuid of player%::last-date} send "It has been %days of {_t}% day(s) since last payout." ## Slot Index Addon: Skript Category: Expression Syntax: [the] ([slot] index|slot number[s]) of %slots% Description: The index/number of a slot. Examples: broadcast "%slot index of player's tool%" ## Time Since Spawn Addon: Skript Category: Expression Syntax: [the] time since spawn of %entities% Description: How long ago a dropped item entered its instance. This is real time rather than ticks, so it keeps counting for a non ticking dropped item. Examples: on item pickup: if time since spawn of event-entity is less than 5 seconds: cancel event ## Slime Size Addon: Skript Category: Expression Syntax: [the] slime size of %entities% Description: The size of a slime entity. Examples: set slime size of {_entity} to 3 ## Display Block Addon: Skript Category: Expression Syntax: [the] display block of %entities% Description: The block displayed by a block display entity. Examples: set display block of {_entity} to stone ## Dialog Buttons Addon: Skript Category: Expression Syntax: [the] [dialog] buttons of %dialogs% Description: The action buttons of a multi action dialog. Supports set, add, remove, and clear. Does nothing for other dialog kinds, which have named buttons instead. Examples: add {_buy} to buttons of {_d} ## World Border Addon: Skript Category: Expression Syntax: [the] world border of %instances% Description: The world border of an instance. While a border is transitioning to a new diameter, this is its state on the current tick rather than the diameter it is heading towards. Examples: set world border of {_instance} to new world border with diameter 500 set world border of {_instance} to default world border reset world border of {_instance} ## Boss Bar Progress Addon: Skript Category: Expression Syntax: [the] [bar] progress of %bossbars% Description: How full a boss bar is, as number between 0 and 1. Changing it updates the bar for everybody already seeing it. Examples: set progress of {_bar} to 0.5 every second: subtract 0.05 from progress of {_bar} ## Host Name Addon: Skript Category: Expression Syntax: [the] host[ ]name of %players% Description: The hostname a player connected with. Examples: broadcast "%host name of player%" ## Glow Color Override Addon: Skript Category: Expression Syntax: [the] glow color override of %entities% Description: The glow color override of a display entity. Examples: set glow color override of {_entity} to red ## Automatic Viewability Addon: Skript Category: Expression Syntax: [the] auto[matic] viewab(le|ility) [(state|property)] of %entities% Description: The automatic viewability state of an entity. If this is false, in order to see the entity, a viewer must be manually added to this entity. Examples: set auto viewable state of player to true ## World Border Diameter/Warning Distance/Teleport Boundary Addon: Skript Category: Expression Syntax: [the] ([world] border size|[world border] (diameter|warning:warning distance|boundary:dimension teleport boundary)) of %worldborders/instances% Description: A number making up a world border, either of a world border itself or of the one an instance is using. The diameter can't go below 0, and neither can the warning distance or the teleport boundary. Resetting one restores it to the value the default world border uses. Only the numbers of an instance's border can be changed, as a world border itself can't be modified. 'size' always needs the 'world border' prefix, as 'size of' on its own is the amount of a list. Examples: set diameter of world border of {_instance} to 100 add 50 to world border size of {_instance} set warning distance of world border of {_instance} to 8 ## Custom Name Visibility Addon: Skript Category: Expression Syntax: [the] custom name visibil(e|ity) [state] of %entities% Description: The custom name visibility state of an entity. Examples: set custom name visibility of {_zombie} to true ## Level Progress Addon: Skript Category: Expression Syntax: [the] level progress of %players% 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: on rightclick with diamnod sword: add 0.05 to player's level progress ## Sorted List Addon: Skript Category: Expression Syntax: sorted %objects% 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::*} command /leaderboard: trigger: loop reversed sorted {most-kills::*}: send "%loop-counter%. %loop-index% with %loop-value% kills" to sender ## Boss Bars of Player Addon: Skript Category: Expression Syntax: [the] boss[ ]bars of %players% Description: Every boss bar currently being shown to a player. Adding a boss bar shows it, removing one hides it, and clearing hides all of them. Setting this hides every boss bar the player can currently see, including any another script showed them, before showing the given ones. Examples: add {_bar} to boss bars of all players remove {_bar} from player's boss bars broadcast "%player% can see %size of boss bars of player% boss bars" on quit: clear player's boss bars ## Eye Position Addon: Skript Category: Expression Syntax: [the] (head|eye[s]) [position[s]] of %entities% Description: The eye position of an entity. Examples: set {_pos} to eye position of player ## Sprinting Addon: Skript Category: Expression Syntax: [the] sprint[ing] [state] of %entities% Description: Whether an entity is sprinting. Examples: set sprinting state of player to true ## Navigation Target Addon: Skript Category: Expression Syntax: [the] (path|navigat(or|ion)) target of %entitycreatures% Description: The navigation target of an entity. Minestom's pathfinding system isn't great right now. Examples: set navigation target of {_entity} to player ## Alive Ticks Addon: Skript Category: Expression Syntax: [the] (alive ticks|ticks lived) of %entities% Description: The number of ticks an entity has been alive. Examples: broadcast "%alive ticks of player%" ## Display Shadow Strength Addon: Skript Category: Expression Syntax: [the] [display] shadow strength of %entities% Description: The shadow strength of a display entity. Examples: set display shadow strength of {_entity} to 1 ## Skull Item Addon: Skript Category: Expression Syntax: [the] (skull|player[ ]head)[s] of %skins% Description: Creates a skull item from a skin. Examples: give player skull of skin from "jeb_" give player skull of player # doesn't fetch skin ## Player Skin Addon: Skript Category: Expression Syntax: [the] skin of %players% Description: The skin of a player. Examples: set skin of player to skin from "jeb_" ## Sneaking Addon: Skript Category: Expression Syntax: [the] (sneak|crouch)[ing] [state] of %entities% Description: Whether an entity is sneaking/crouching. Examples: set sneaking state of player to true ## Permission Level Addon: Skript Category: Expression Syntax: [the] permission level of %players% Description: A player's permission level. This is only used to tell the client what "permissions" it has. This is used for whether the player can use the gamemode switcher, operator creative tab, entity selector in commands (@s, @a, etc.), etc. Examples: set permission level of player to 4 ## Gravity Addon: Skript Category: Expression Syntax: [the] gravity [state] of %entities% Description: The gravity state of an entity. Examples: set gravity of player to false ## Tag Namespaced Key Addon: Skript Category: Expression Syntax: [the] [namespace[d]] key[s] of %minecrafttags% Description: The namespaced key of a minecraft tag, written as "namespace:value". Tags loaded from vanilla data always use the "minecraft" namespace. Examples: broadcast namespaced key of block tag "logs" set {_keys::*} to namespaced keys of tags of player's tool ## Passengers Addon: Skript Category: Expression Syntax: [the] passengers of %entities% Description: The passengers of an entity. Examples: set {_passengers::*} to passengers of player add {_entity} to passengers of player remove player from passengers of vehicle ## Weather Addon: Skript Category: Expression Syntax: [the] weather of %instances% Description: The weather of an instance. Setting it lets minestom pick how long the change takes; use the transition weather effect to control the duration yourself. Examples: set weather of {_instance} to thundering weather set weather of {_instance} to new weather with rain level 0.4 reset weather of {_instance} ## Display Item Addon: Skript Category: Expression Syntax: [the] display item [slot] of %entities% Description: The item displayed by an item display entity. Examples: set display item of {_entity} to diamond sword ## Rounding Addon: Skript Category: Expression Syntax: (a|the|) round[ed] down %number% Description: 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 ## Held Item Addon: Skript Category: Expression Syntax: [the] (tool|held item|weapon) [of %equipmenthandlers%] Description: The held item (tool) of an entity. Examples: set tool of player to diamond sword ## Item Display Context Addon: Skript Category: Expression Syntax: [the] [item] display context of %entities% Description: The display context of an item display entity. Examples: set display context of {_entity} to head ## Height Addon: Skript Category: Expression Syntax: [the] height of %entities% Description: The height of a display or interaction entity. Examples: set height of {_entity} to 1.5 ## Viewers Addon: Skript Category: Expression Syntax: [the] viewers of %entities% Description: The viewers of an entity. Examples: add {_owner} to viewers of {_invisible-admin} # reveal admin to owner remove {_owner} from viewers of {_invisible-admin} # owner can't see admin anymore ## Team Friendly Fire / See Invisible Teammates Addon: Skript Category: Expression Syntax: [the] (friendly fire|invisible:see invisible [teammates]) of %teams% Description: Whether members of a team can damage each other, and whether they can see invisible teammates. Changing either updates every client that can see the team. Examples: set friendly fire of {_team} to false set see invisible teammates of {_team} to true ## Debug Info Addon: Skript Category: Expression Syntax: [the] debug info[rmation] of %objects% Description: Returns a string version of the given objects, but with their type attached: debug info of 1, "a", 0.5 -> 1 (long), "a" (string), 0.5 (double) This is intended to make debugging easier, not as a reliable method of getting the type of a value. Examples: broadcast debug info of {list::*} ## Particle Setting Addon: Skript Category: Expression Syntax: [the] particle setting of %players% Description: A player's particle display setting. Examples: send particle setting of player to player ## Reduced Debug Information Addon: Skript Category: Expression Syntax: [the] reduced debug info[rmation] [property] of %players% Description: Whether a player has reduced debug information enabled. Limits their F3 menu's capabilities and disables hitboxes (F3+b). Examples: set reduced debug information property of player to true ## Arrow Count Addon: Skript Category: Expression Syntax: [the] arrow count of %livingentities% Description: The number of arrows in a living entity. Examples: set arrow count of player to 5 ## Length Addon: Skript Category: Expression Syntax: [the] length of %strings% Description: The length of a text, in number of characters. Examples: set {_l} to length of "bob" # 3 ## Group Addon: Skript Category: Expression Syntax: [the] group[plural:s] of %players% Description: The primary group or all groups of a player 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 ## Listed Addon: Skript Category: Expression Syntax: [the] listed [property] of %players% Description: Whether a player is listed in the tab list. Examples: set listed property of player to false ## Name Addon: Skript Category: Expression Syntax: [the] [custom[ ]]name of %entities/inventories/items% Description: The name of a player, entity, or item. Examples: set name of {_entity} to "Custom Name" ## Mergeable State Addon: Skript Category: Expression Syntax: [the] mergeab(le|ility) [state] of %entities% Description: Whether a dropped item merges with other dropped items of the same kind near it, which is enabled by default. A non ticking dropped item never merges either way. Examples: drop 32 of stone at player's position: before spawn: set mergeable state of entity to false ## Camera Target Addon: Skript Category: Expression Syntax: [the] camera [target] of %players% Description: The camera target of a player Examples: set camera target of player to {_entity} ## Prefix/Suffix Addon: Skript Category: Expression Syntax: [the] (:prefix|suffix) of %players% Description: A player's LuckPerms prefix or suffix. Examples: broadcast "%prefix of player%" ## Player Input Keys Addon: Skript Category: Expression Syntax: [the] [current] (inputs|input keys) of %players% Description: Get the current input keys of a player. Examples: broadcast "%player% is pressing %current input keys of player%" ## Text Alignment Addon: Skript Category: Expression Syntax: [the] text alignment of %entities% Description: The alignment of a text display entity. Examples: set alignment of {_entity} to center ## Instance/World Addon: Skript Category: Expression Syntax: [the] instance of %entities% Description: The instance an entity is in. Examples: broadcast "%instance of player%" ## Velocity Addon: Skript Category: Expression Syntax: [the] velocity of %entities% Description: The velocity of an entity. Velocity values on Minestom are 1/20th (20 ticks per second is why) the value of Paper's. Examples: set velocity of player to vector(0, 20, 0) ## Instance Time Addon: Skript Category: Expression Syntax: [the] time [:rate] of %instances% Description: The time or time rate of an instance. Examples: set time of {_instance} to 6000 # noon set time rate of {_instance} to 0 # sun won't move ## Group Weight Addon: Skript Category: Expression Syntax: weight of group[s] [named] %strings% Description: The weight of a LuckPerms group. Examples: set {_weight} to weight of group named "default" ## Display Brightness Override Addon: Skript Category: Expression Syntax: [the] [display] (:block|sky) brightness [override] of %entities% Description: The block or sky brightness override of a display entity. Examples: set display block brightness override of {_entity} to 15 ## Max Health Addon: Skript Category: Expression Syntax: [the] max health of %livingentities% Description: The maximum health of a living entity. Examples: set max health of player to 40 ## Unix Timestamp Addon: Skript Category: Expression Syntax: [the] unix timestamp of %dates% Description: Converts given date to Unix timestamp. This is roughly how many seconds have elapsed since 1 January 1970. Examples: unix timestamp of now ## Entity ID Addon: Skript Category: Expression Syntax: [the] entity id of %entities% Description: The network entity ID of an entity. Examples: broadcast "ID: %entity id of player%" ## Unix Date Addon: Skript Category: Expression Syntax: [the] unix date of %numbers% 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) ## Inventory Addon: Skript Category: Expression Syntax: [the] [(current|open)] [:slot] inventory of %players/slots% Description: The inventory of a player/slot. Examples: clear inventory of player ## Width Addon: Skript Category: Expression Syntax: [the] width of %entities% Description: The width of a display or interaction entity. Examples: set width of {_entity} to 1 ## Cursor Slot Addon: Skript Category: Expression Syntax: [the] cursor slot of %players% Description: The item which the player has on their inventory cursor Examples: cursor slot of player is dirt set cursor slot of player to 64 diamond ## Dropped Item Addon: Skript Category: Expression Syntax: [the] drop[ped] item [slot] of %entities% Description: The item a dropped item entity is showing. This also works on an item entity that was spawned through the spawn section rather than dropped, which is how such an entity is given an item to show. Examples: on item pickup: give dropped item of event-entity to player spawn item at player's position: before spawn: set dropped item of entity to diamond ## Translation Key Addon: Skript Category: Expression Syntax: [the] translation key of %entitytypes/items/attributetypes/blocks% Description: The translation key of an entity type, item, attribute, block, or sound. Examples: broadcast "%translation key of zombie%" ## Username/UUID From Mojang Addon: Skript Category: Expression Syntax: [mojang] (:uuid|username)[s] from %strings% Description: Looks up a Mojang username from a UUID or vice versa. Examples: set {_name} to username from "%uuid of player%" ## Sidebar/Scoreboard Addon: Skript Category: Expression Syntax: [the] (score[ ]board|side[ ]bar) of %players% Description: The sidebar/scoreboard of a player. Examples: set sidebar of player to new sidebar named "bob" ## Glowing Addon: Skript Category: Expression Syntax: [the] glow[ing] [state] of %entities% Description: The glowing state of an entity. Examples: set glowing of player to true ## Display View Range Addon: Skript Category: Expression Syntax: [the] [display] view[ ]range of %entities% Description: The view range of a display entity. Examples: set display view range of {_entity} to 2 ## Dialog Title Addon: Skript Category: Expression Syntax: [the] [dialog] title of %dialogs% Description: The title of a dialog. Changing it only affects dialogs shown after the change. Examples: set title of {_d} to mm("Shop") ## Field of View (FOV) Modifier Addon: Skript Category: Expression Syntax: [the] (fov|field of view) modifier of %players% Description: The modifier of the player's fov. A higher value will result in their screen appearing more zoomed in Examples: set fov modifier of player to 0.5 ## Character Codepoint Addon: Skript Category: Expression Syntax: [the] [unicode|character] code([ ]point| position) of %strings% Description: Returns the Unicode codepoint of a character Examples: function is_in_order(letters: strings) :: boolean: loop {_letters::*}: set {_codepoint} to codepoint of lowercase loop-value return false if {_codepoint} is not set # 'loop-value is not a single character' if: {_previous-codepoint} is set # if the codepoint of the current character is not # 1 more than the codepoint of the previous character # then the letters are not in order {_codepoint} - {_previous-codepoint} is not 1 then: return false set {_previous-codepoint} to {_codepoint} return true ## Use Default Background Addon: Skript Category: Expression Syntax: [the] [use] default background [color] [(property|state)] of %entities% Description: Whether a text display entity uses the default background color. Examples: set use default background property of {_entity} to true ## Swimming Addon: Skript Category: Expression Syntax: [the] swim[ing] [state] of %entities% Description: Whether an entity is swimming. Examples: set swimming state of player to false ## Tablist Header/Footer Addon: Skript Category: Expression Syntax: [the] tab[[ ]list] (:header|footer|(([display] name))|:priority) of %players% Description: The header or footer of a player's tablist, or their display name in the tablist. Examples: set tablist header of player to "Welcome to our server!" ## World Border Warning Time Addon: Skript Category: Expression Syntax: [the] [world border] warning time of %worldborders/instances% Description: How long the warning indicator is shown for when a world border is closing in. Minecraft stores this as whole seconds, so anything smaller is rounded down. Resetting it restores the value the default world border uses. Examples: set warning time of world border of {_instance} to 10 seconds add 5 seconds to warning time of {_instance}'s world border ## Game Mode Addon: Skript Category: Expression Syntax: [the] game[ ]mode of %players% Description: The game mode of a player. Examples: set gamemode of player to creative ## Team Collision Rule Addon: Skript Category: Expression Syntax: [the] collision rule of %teams% Description: Whether members of a team push each other, push other teams, or never push at all. Changing it updates every client that can see the team. Examples: set collision rule of {_team} to never ## Visibility Addon: Skript Category: Expression Syntax: [the] visibility [state] of %entities% Description: The visibility state of an entity. Does what the invisibility potion effect does. Examples: set visibility of player to false ## Item From Block Addon: Skript Category: Expression Syntax: [the] item[s] of %blocks% Description: The item representation of a block. Examples: set {_item} to item of block at player ## Formatted Date Addon: Skript Category: Expression Syntax: %dates% formatted [human-readable] [(with|as) %string%] 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: trigger: send "Full date: %now formatted human-readable%" to sender send "Short date: %now formatted as "yyyy-MM-dd"%" to sender ## Block Property Addon: Skript Category: Expression Syntax: block %string% property of %blocks% Description: A block state property value of a block. Examples: set {_facing} to block "facing" property of block at player ## Inventory Slot Addon: Skript Category: Expression Syntax: slot[s] %integers% of %inventories% Description: A specific slot of an inventory. Examples: set slot 0 of player's inventory to diamond ## Lore Addon: Skript Category: Expression Syntax: [the] lore of %item% Description: An item's lore. Examples: set the 1st line of player's tool's lore to "Excalibur 2.0" ## Enchantment Level Addon: Skript Category: Expression Syntax: [the] [enchant[ment]] level[s] of %enchantments% (on|of) %items% Description: The level of an enchantment on an item. Examples: set sharpness enchantment level of player's tool to 5 ## Equipment Slot Addon: Skript Category: Expression Syntax: [the] %equipmentslots% [slot[s]] of %equipmenthandlers% Description: The equipment slot of an entity or player. Examples: set helmet of player to diamond helmet ## Items In Addon: Skript Category: Expression Syntax: [all [[of] the]] items ([with]in|of|contained in|out of) [1:inventor(y|ies)] %inventories% Description: All items or specific type(s) of 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's name = "Bob" remove loop-item from the player set {inventory::%uuid of player%::*} to items in the player's inventory ## Scoreboard Line Addon: Skript Category: Expression Syntax: line[s] %integers% of %scoreboards% Description: A specific line of a sidebar/scoreboard. Examples: set line 1 of player's sidebar to "Welcome!" ## Target Block Addon: Skript Category: Expression Syntax: [the] target[ed] block [of %entities%] [with range %number%] Description: The target block position of what an entity is looking at. All blocks are treated as 1x1, collision shapes are not checked yet. Default range is 50. Examples: send player's target block ## Amount of Items Addon: Skript Category: Expression Syntax: [the] (amount|number) of %items% (in|of) %inventories% Description: Counts how many of a particular item are in a given inventory. Examples: message "You have %number of diamond in player's inventory% diamond(s) in your inventory." ## Metadata Addon: Skript Category: Expression Syntax: [the] meta[ ]data [tag] %string% of %taggables% Description: The metadata of an entity or an object. Examples: set metadata "key" of player to "value" ## Target Entity Addon: Skript Category: Expression Syntax: [the] target[[ed] %entitytype%] [of %entities%] [with range %number%] [blocks:ignoring blocks] Description: The target entity of an entity from their eye height. Default range is 50. Examples: spawn zombie at position 2 in front of player in player's instance send target zombie of player with range 1.5 to player # doesn't print anything send target zombie of player with range 2 to player # prints zombie ## Elements Addon: Skript Category: Expression Syntax: [the] (first|1:last) element [out] (of|in) %objects% Description: The first, last, range or a random element of a set, e.g. a list variable, or a queue. Asking for elements from a queue will also remove them from the queue, see the new queue expression for more information. See also: random expression Examples: broadcast the first 3 elements of {top players::*} set {_last} to last element of {top players::*} set {_random player} to random element out of all players send 2nd last element of {top players::*} to player set {page2::*} to elements from 11 to 20 of {top players::*} broadcast the 1st element in {queue} broadcast the first 3 elements in {queue} ## NBT Tag Addon: Skript Category: Expression Syntax: %tagtype% [nbt] tag[s] %strings% of %nbtcompounds% Description: A typed NBT tag from an NBT compound. Examples: set {_tag} to string nbt tag "CustomName" of {_nbt} ## Event Entity/Player/CommandSender Addon: Skript Category: Expression Syntax: [the] [event-]<.+> Description: The entity/player/commandsender involved in an event, allowing the exclusion of 'event-'. Examples: on join: send "Welcome to the server" to player # 'player' ## Whether Addon: Skript Category: Expression Syntax: whether <.+> Description: A shorthand for returning the result of a condition (true or false). This is functionally identical to using `true if else false`. Examples: set {fly} to whether player can fly broadcast "Flying: %whether player is flying%" ## Any Of Addon: Skript Category: Expression Syntax: (any [one]|one) of [the] %objects% Description: Returns an 'or list' composed of the given objects. For example, `any of (1, 2, and 3)` is equivalent to `1, 2, or 3` Useful when doing comparisons with variable lists. Examples: if any of {_numbers::*} are 1: if any of {teamA::*} are within blockVector(0, 0, 0) and blockVector(10, 10, 10): ## Transformed List Addon: Skript Category: Expression Syntax: %objects% (transformed|mapped) (using|with) \[<.+>\] Description: Transforms (or 'maps') a list's values using a given expression. This is akin to looping over the list and getting a modified version of each value. If the given expression returns a single value, the indices of the list will not change. If the expression returns multiple values, then then indices will be reset as a single index cannot contain multiple values. Examples: set {_a::*} to (1, 2, and 3) transformed using (input * 2 - 1, input * 2) # {_a::*} is now 1, 2, 3, 4, 5, and 6 # get a list of the sizes of all clans without manually looping set {_clan-sizes::*} to keyed {clans::*} transformed using [{clans::%input index%::size}] # using the 'keyed' expression retains the indices of the clans list ## Sets Addon: Skript Category: Expression Syntax: [all [[of] the]|the|every] %*classinfo% Description: 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!" ## Arithmetic Addon: Skript Category: Expression Syntax: \(%object%\)[ ]+[ ]\(%object%\) 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 loop ({_arg} + 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!" ## Item with Enchantments Addon: Skript Category: Expression Syntax: %item% of [enchant[ment][s]] %enchantments% Description: An item with one or more enchantments. Examples: give player stone of sharpness 5 ## Entities Addon: Skript Category: Expression Syntax: all entities [of type[s] %entitytypes%] [in radius %number% of %points%] [(in|of|from) [instance[s]] %instances%] Description: Returns all entities on the server, optionally filtered by type, radius, or instance. Examples: set {_entities::*} to all zombies in radius 10 of player ## On Inventory Close Addon: Skript Category: Event Syntax: [on] inventory close Description: Called when a player closes an inventory. Examples: on inventory close: ## On Spectate Addon: Skript Category: Event Syntax: [on] [player] [start] spectat(e|ing) Description: Called when a player attempts to start spectating an entity. Examples: on spectate: broadcast "%event-target%" ## On Swap Hand Item Addon: Skript Category: Event Syntax: [on] swap[ping of] [(hand|held)] item[s] Description: Called when a player swaps items in their hands. Examples: on swap hand item: ## On Suffix Remove Addon: Skript Category: Event Syntax: [on] suffix remove Description: Called when a player loses a luckperms suffix. Examples: on suffix remove: ## On Player Move Addon: Skript Category: Event Syntax: [on] [player] move Description: Called when a player attempts to move Examples: on player move: ## On Player Chat Addon: Skript Category: Event Syntax: [on] [player] chat Description: Called when a player chats. Examples: on chat: ## On Toggle Sprint Addon: Skript Category: Event Syntax: [on] [player] sprint toggle [1:on|2:off] Description: Called when a player toggles their sprint state. Examples: on sprint toggle: ## On Prefix Remove Addon: Skript Category: Event Syntax: [on] prefix remove Description: Called when a player loses a luckperms prefix. Examples: on prefix remove: ## On Effect Command Addon: Skript Category: Event Syntax: [on] effect command Description: Called when a player runs an effect command. Examples: on effect command: ## On Cancel Item Use Addon: Skript Category: Event Syntax: [on] [player] cancel item us(e|age) Description: Called when a player cancels their item usage before it finishes. Examples: on player cancel item use: ## On Toggle Flight Addon: Skript Category: Event Syntax: [on] [player] fl(ight|ying) toggle [1:on|2:off] Description: Called when a player toggles their flight state. Examples: on flight toggle: ## On Server List Ping Addon: Skript Category: Event Syntax: [on] server[ ]list ping Description: Called when the client pings this server from their server list. Examples: on server list ping: ## On Inventory Open Addon: Skript Category: Event Syntax: [on] inventory open Description: Called when a player opens an inventory. Examples: on inventory open: ## On Join / First Player Spawn Addon: Skript Category: Event Syntax: [on] first player spawn ## On Suffix Add Addon: Skript Category: Event Syntax: [on] suffix add Description: Called when a player receives a luckperms suffix. Examples: on suffix add: ## On Player Command Addon: Skript Category: Event Syntax: [on] [player] [execute|run] command Description: Called when a player attempts to run a command. Examples: on command: ## On Entity Velocity Addon: Skript Category: Event Syntax: [on] entity velocity [change] Description: Called when an entity's velocity is about to change. Cancelling this keeps the entity's current velocity. Examples: on entity velocity: if event-entity is a player: set event-vector to event-vector * 2 # double every push a player receives ## On Inventory Click Addon: Skript Category: Event Syntax: [on] inventory click Description: Called when a player clicks while in an inventory. Examples: on inventory click: ## On Player Connect Addon: Skript Category: Event Syntax: [on] [player] connect[ing] Description: Called when a player is connecting to the server. Examples: on player connect: ## On Script Load Addon: Skript Category: Event Syntax: [on] [script] (load|init|enable) ## On Player GameMode Request Addon: Skript Category: Event Syntax: [on] game[ ]mode [change] request Description: Called when a player requests to change their gamemode (F3 + F4 Menu). Examples: on gamemode request: player's permission level >= 2 set player's gamemode to event-gamemode ## On Armor Change Addon: Skript Category: Event Syntax: [on] [entity] armo[u]r chang(e|ing) Description: Called when an entity equips or unequips a piece of armor. This is fired before the armor is applied, so 'past event-item' is the piece being replaced and 'event-item' is the piece being put on. Setting 'event-item' changes what ends up equipped. This event cannot be cancelled. Examples: on armor change: broadcast "%event-entity% swapped %past event-item% for %event-item% in their %event-equipment slot%" on helmet change: if event-item is a diamond helmet: send "nice helmet" to event-entity ## On Player Pick Block Addon: Skript Category: Event Syntax: [on] [player] pick block Description: Called when a player middle clicks on a block. Examples: on player pick block: broadcast "%event-includes-data%" # whether data should be included from the picked block (ctrl + middle click) ## On Finish Item Use Addon: Skript Category: Event Syntax: [on] [player] finish item us(e|age) Description: Called when a player completes their item usage. Examples: on player finish item use: ## On Player Load Addon: Skript Category: Event Syntax: [on] player load[ed] Description: Called when the client says it has finished loading into the world. Examples: on player load ## On Player Pick Entity Addon: Skript Category: Event Syntax: [on] [player] pick entity Description: Called when a player middle clicks on an entity. Examples: on player pick entity: broadcast "%event-target%" broadcast "%event-includes-data%" # whether data should be included from the picked entity (ctrl + middle click) ## On Configuration / First Configuration Addon: Skript Category: Event Syntax: [on] [:first] [player] config[ur(e|ation)] Description: Called while a player is being configured asynchronously before they spawn into an instance. This is the point at which the spawning instance can be changed. Use 'first' to only listen for a player's initial configuration in a session. Examples: on player configuration: on first player configuration: on configuration: ## On Player Respawn Addon: Skript Category: Event Syntax: [on] [player] respawn Description: Called when a player is about to respawn. Examples: on respawn: set event-respawn-point to position(0, 42, 0) ## On Group Add Addon: Skript Category: Event Syntax: [on] group add Description: Called when a player receives a luckperms group. Examples: on group add: ## On Tool/Held Slot Change Addon: Skript Category: Event Syntax: [on] [player['s]] (tool|item held|held item) chang(e|ing) Description: Called when a player changes their held item slot. Examples: on held item change: broadcast "%event-slot%" # broadcasts the currently held slot broadcast "%future event-slot%" # broadcasts the held slot they're changing to ## On Permission Add Addon: Skript Category: Event Syntax: [on] permission add Description: Called when a player receives a luckperms permission. Examples: on permission add: ## On Toggle Elytra Flight Addon: Skript Category: Event Syntax: [on] [player] elytra fl(ight|ying) toggle [1:on|2:off] Description: Called when a player toggles their elytra flight state. Examples: on elytra flight toggle: ## On Script Unload Addon: Skript Category: Event Syntax: [on] [script] (un[ ]load|disable) ## On Permission Remove Addon: Skript Category: Event Syntax: [on] permission remove Description: Called when a player loses a luckperms permission. Examples: on permission remove: ## On Player Leave Addon: Skript Category: Event Syntax: [on] [player] (quit[ting]|disconnect[ing]|log[ ]out|logging out|leav(e|ing)) Description: Called when a player leaves the server. Examples: on player quit: ## On Stab Attack Addon: Skript Category: Event Syntax: [on] [player] stab[bing] [attack] Description: Called when a player attempts to use a piercing item. Examples: on stab attack: ## On Begin Item Use Addon: Skript Category: Event Syntax: [on] [player] begin item us(e|age) Description: Called when a player begins to use (consume) their item. Examples: on player begin item use: ## On Prefix Add Addon: Skript Category: Event Syntax: [on] prefix add Description: Called when a player receives a luckperms prefix. Examples: on prefix add: ## On Bundle Item Select Addon: Skript Category: Event Syntax: [on] bundle item select Description: Called when a player scrolls on an item to select a bundle item. Also called when the player stops hovering over the item. Examples: on bundle item select: ## On Group Remove Addon: Skript Category: Event Syntax: [on] group remove Description: Called when a player loses a luckperms group. Examples: on group remove: ## On Player GameMode Change Addon: Skript Category: Event Syntax: [on] game[ ]mode change Description: Called when a player's gamemode is about to be changed. Examples: on gamemode change: ## On Unknown Command Addon: Skript Category: Event Syntax: [on] unknown command [execution] Description: Called when a sender executes an unknown/unregistered command. Examples: on unknown command: ## On Player Finish Digging Addon: Skript Category: Event Syntax: [on] [:accurate] [player] finish digging [[of] %blocks%] Description: Called when a player finishes digging on a block. Optionally specify one or more block types to only listen for those blocks. By default, this event will fire even if the player finishes digging on a fake block. Examples: on player finish digging ## On Dialog Click Addon: Skript Category: Event Syntax: [on] dialog (click|action) [%string%] Description: Called when a player clicks a dialog button that carries a custom action, and for any other custom click packet the client sends. Buttons created with 'new dialog button ... running code' are handled by their own code instead and never reach this event. The input values of the dialog are available through the 'dialog input' expression when the button used a dynamic custom action. Examples: on dialog click "myserver:buy": send "You clicked buy!" to player on dialog click: send "raw action: %event-string%" to player ## On Player Input Addon: Skript Category: Event Syntax: [on] [player] (toggle|toggling|1:press[ing]|2:release|2:releasing) of (%inputkeys%|(an|any) input key) Description: Called when a player sends an updated input to the server. Note: The input keys event value is the set of keys the player is currently pressing, not the keys that were pressed or released. Examples: on input key press: send "You are pressing: %event-inputkeys%" to player ## On Player Block Place Addon: Skript Category: Event Syntax: [on] [block] plac(e|ing) [[of] %blocks%] Description: Called when a player places a block. Optionally specify one or more block types to only listen for those blocks. Examples: on block place: on block placing of oak planks: on placing of chest or trapped chest: ## On Entity Spawn Addon: Skript Category: Event Syntax: [on] [%entitytypes%] spawn[ing] Description: Called when an entity spawns in an instance. Optionally specify one or more entity types to only listen for those entities. Examples: on spawn: on zombie spawn: on creeper or skeleton spawning: ## Periodical Addon: Skript Category: Event Syntax: [on] every %timespan% Description: 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 ## On Player Block Break Addon: Skript Category: Event Syntax: [on] [block] (break[ing]|min(e|ing)) [[of] %blocks%] Description: Called when a player breaks a block. Optionally specify one or more block types to only listen for those blocks. Examples: on block break: on block break of stone: on mining of diamond ore or deepslate diamond ore: ## On Player Item Drop Addon: Skript Category: Event Syntax: [on] [player] [item] drop[ping] [[of] %item%] ## On Item Pickup Addon: Skript Category: Event Syntax: [on] [(player|1:entity)] [item] (pick[ ]up|picking up) [[of] %item%] Description: Called when a living entity walks over a dropped item. Note that entities cannot pick items up unless their item pickup state is enabled, so this event never runs on its own. Note also that Minestom does not put the item into the entity's inventory; it only removes the dropped item and plays the pickup animation, so the script decides what the entity actually receives. Cancelling the event leaves the dropped item on the ground. Examples: on item pickup: give event-item to event-entity on player pick up of diamond: broadcast "%event-entity% found a diamond!" on entity pickup: cancel event ## On Entity Attack Addon: Skript Category: Event Syntax: [on] (%entitytypes%|entity) attack [on %entitytypes%] Description: Called when one entity attacks another. The attacking entity can be referred to as 'attacker' and the entity being attacked as 'victim'. Optionally filter by the attacker's entity type and/or the victim's entity type. Examples: on entity attack: on player attack: on zombie attack on villager: on entity attack on player: ## On Click Addon: Skript Category: Event Syntax: [on] [(1:right|2:left)(| |-)][mouse(| |-)]click[ing] [on %entitytypes/blocks%] [(with|using|holding) %items%] Description: 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 fishing rod: on leftclick on stone or obsidian: on rightclick on creeper: on click with a sword: on click on chest[facing=north]: on click on campfire[lit=true]: ## Run at End of Tick Addon: Skript Category: Section Syntax: [schedule to] run at [the] end of [the] tick Description: Schedules the code inside this section to run at the end of the current server tick. Local variables from the current scope are preserved. Examples: schedule to run at the end of the tick: broadcast "End of tick!" run by end of tick: delete {temp::*} ## Loop Addon: Skript Category: Section Syntax: loop %objects% Description: 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 ## Edit Entity Meta Addon: Skript Category: Section Syntax: (modify|edit) [entity] meta[data] of %entities% Description: Edits the metadata of one or more entities. Unnecessary unless you want entity meta to apply in one packet. Examples: edit meta of {_zombie}: set name of entity to "New Name" set custom name visibility of entity to true ## Create Environment Addon: Skript Category: Section Syntax: create (:dimension|biome) [type] under [name[ ]space] %string% [(and store it|stored) in %objects%] Description: Registers a custom dimension type or biome under the provided namespace. Namespace must be in 'prefix:value' format. Both dimensions and biomes can have environment attributes. You can find a list of them at https://javadoc.minestom.net/net.minestom.server/net/minestom/server/world/attribute/EnvironmentAttribute.html. Entries should be in lower case with spaces instead of underscores. NOTE: Since both dimensions and biomes can have environment attributes, one may override the other, so if for example you find that your sky color isn't showing up, the default biome may be overriding that, so you may need a custom biome. - Dimension-specific Entries fixed time -> boolean sky light -> boolean ceiling -> boolean coordinate scale -> number minimum y -> integer maximum y -> integer logical y -> integer infiniburn -> integer ambient light -> number (typically between 0 and 1) skybox -> skybox cardinal light -> cardinal light - Biome-specific Entries precipitation -> boolean temperature -> number temperature modifier -> temperature modifier downfall -> number water color -> color foliage color -> color dry foliage color -> color grass color -> color grass color modifier -> grass color modifier Examples: create biome under "test:lobby" stored in {_b}: sky color: rgb(111, 223, 249) fog color: rgb(253, 252, 198) foliage color: rgb(71, 255, 0) water color: rgb(111, 223, 249) create instance container stored in {-worlds::lobby}: loader: polar file: "worlds/lobby/lobby.polar" preload biome: {_b} preload option: strict ## Create Instance/World Addon: Skript Category: Section Syntax: create instance [container] (and store it|stored) in %objects% Description: Creates a new instance container or a shared instance. Instances are Minestom's lightweight world equivalent. Shared instances are an ultra lightweight 'world' that share the chunk data (blocks) from its parent world. Entities are not shared. - Entries dynamic lighting -> boolean file -> string file dimension -> string (only used if world was made after 26.1, example: minecraft:overworld) loader -> anvil/polar (Anvil is the world format that Minecraft uses and Polar was custom in-memory format made for smaller worlds by hollowcube for Minestom) dimension -> dimensiontype preload biome -> biome (fills the entire world with the provided biome) [async] preload option -> normal/strict (strict will not allow default generation of new chunks, even blank ones, as the player travels the world) preload chunk amount -> number (the radius in chunks to preload when there is no world file to read chunks from, defaults to the server's chunk view distance) generator -> section allowing custom generation of each chunk as the world loads (complex generation not recommended as it can get laggy with Skript) Examples: create biome under "test:lobby" stored in {_b}: sky color: rgb(111, 223, 249) fog color: rgb(253, 252, 198) foliage color: rgb(71, 255, 0) water color: rgb(111, 223, 249) create instance container stored in {-worlds::lobby}: loader: polar file: "worlds/lobby/lobby.polar" preload biome: {_b} async preload option: strict ## For Each Loop Addon: Skript Category: Section Syntax: (for [each]|loop) [value] %object% in %objects% Description: A specialised loop section run for each element in a list. Unlike the basic loop, this is designed for extracting the key & value from pairs. The loop element's key/index and value can be stored in a variable for convenience. When looping a simple (non-indexed) set of values, e.g. all players, the index will be the loop counter number. Examples: for each {_player} in players: send "Hello %{_player}%!" to {_player} loop {_item} in {list of items::*}: broadcast {_item}'s name for each key {_index} in {list of items::*}: broadcast {_index} ## Teleport Addon: Skript Category: Section Syntax: teleport %entities% to %point% [instance:in [(world|instance)] %instance%] [:sync] Description: Teleports one or more entities to a location. Optionally specify an instance to move entities into a different world. Use 'sync' to wait for each teleport to finish before continuing. An optional subsection runs once the teleport completes. Examples: teleport player to vector(0, 64, 0): broadcast "Player arrived!" teleport {_entity} to {_loc} in instance {_instance} sync: set health of entity to 20 ## Send Resource Pack Addon: Skript Category: Section Syntax: send [resource] pack [from [url]] %string% with (uuid|id) %string% with hash %string% [with prompt %component%] to %players% [(forcefully|with force)] [replace:to replace [current packs]] Description: Sends a resource pack to one or more players. Examples: send resource pack from "https://example.com/pack.zip" with uuid "..." with hash "..." to player: if resource pack status is successfully loaded: broadcast "Pack loaded!" ## Subcommand Addon: Skript Category: Section Syntax: subcommand <.+> Description: Allows you to define a subcommand within a command. Works exactly like a command. ## Command Argument Addon: Skript Category: Section Syntax: arg[ument] <.+> Description: This section allows you to create and more finely control custom command arguments. List of argument types with the skript type that will be stored in the variable: - literal -> string - boolean -> boolean - integer -> integer - long -> integer - double -> number - float -> number - string -> string # can be unlimited length, just must be surrounded by quotation marks if there are spaces for this argument - word -> string # singular piece of text - stringarray -> strings # should eat the rest of the command (typically how bukkit commands work) - gamemode -> gamemode # format entry supported - soundcategory -> soundcategory # format entry supported - particle -> particle - entitytype -> entitytype - block -> block # essentially paper's blockdata - entity -> entity - entities -> entities - player -> player - players -> players - item -> item - component -> component - uuid -> string - nbtcompound -> nbtcompound - blockposition -> position # relative, can use ~ in arguments for example - vector -> position # relative, can use ~ in arguments for example - 2dvector -> vector # relative, can use ~ in arguments for example. Relative part is for sender's yaw/pitch. X and Z are the values, y is 0. - attributetype -> attributetype - biome -> biome - damagetype -> string - enchant -> enchantment - sound -> string # sound id NOTE: Entity/player selectors (@s, @a, etc.) are supported, but the sender must have the proper permission level in order for it to show up. See the 'Permission Level' expression Examples: # Rough Syntax arg[ument] : suggestions: # [OPTIONAL] section allowing you to add suggestion entries to the argument suggestions expression default value: # [OPTIONAL] allows you to set this argument to be optional, and have the default value set if this argument wasn't provided format: # [OPTIONAL] allows you to set the format for the argument (default, lower case, and upper case). Currently only supports gamemode trigger: # [OPTIONAL] section that runs the code in it when the command is executed. Only optional if there is another argument/subcommand further in this tree # Simple Example command /test: argument : default value: "hello" trigger: send {_text} to sender # Expected Execution: # /test -> sends 'hello' to the sender # /test bob -> sends 'bob' to the sender # More Involved Example command /tp: condition: return whether sender is a player argument : argument : default value: "Someone teleported to you." trigger: teleport player to {_target-player} in {_target-player}'s instance send {_msg} to {_target-player} trigger: send "Usage: /tp " to player # Expected Execution: # /tp -> sends the usage message # /tp Notch -> teleports the player to notch and sends 'Someone teleported to you.' to Notch # /tp Notch hi notch -> teleports the player to notch and sends 'hi notch' to Notch ## Conditionals Addon: Skript Category: Section Syntax: else Description: 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 ## While Loop Addon: Skript Category: Section Syntax: [:do] while <.+> Description: 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 ## Drop Addon: Skript Category: Section Syntax: drop [:non ticking] %items% [%directions% %points%] [in [(world|instance)[s]] %instances%] [:sync] Description: Drops items on the ground as dropped items, which any entity whose item pickup state is enabled can pick up right away. A non ticking dropped item never merges with other dropped items and never counts down its pickup delay. To spawn a dropped item that is only there to be looked at, spawn an item entity instead and give it an item through the dropped item expression. Examples: drop diamond at position(0, 41, 0) in instance {_instance} drop player's tool at player's position drop 5 of stone above player's position drop diamond at player's position: before spawn: set pickup delay of entity to 3 seconds after spawn: broadcast "dropped a diamond for %player%" ## Spawn Entity Addon: Skript Category: Section Syntax: (summon|spawn) [:non ticking] [:navigable|:living] %entitytypes% [%directions% %points%] [in [(world|instance)[s]] %instances%] [:sync] Description: Spawns one or more entities at a location. If an entity is non-ticking, some features like gravity may not work even if it's set to true. Examples: spawn living zombie at player's position: before spawn: set name of entity to "Custom Zombie" after spawn: broadcast "Zombie spawned!"