Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.
If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!
Now, what are you waiting for? Join the community now!
Skript 2.17.2
Supports: Paper 1.21.5 - 26.3
Today, we are releasing Skript 2.17.2 which brings dozens of bug fixes and performance improvements.
Per our RELEASE[/i]MODEL.md]release model, we plan to begin releasing pre-releases for 2.18.0 on January 1st. Until then, happy holidays!
As always, you can report any issues on our issue tracker.
Happy Skripting!
Changelog
Additions
- #8950 Introduces a new configuration option enable lenient text arguments (default false). When enabled, regular text arguments are not required to be quoted when non-alphanumeric characters are used (only when using spaces if it is not the last argument).
- Please note that this option negatively affects real-time validation and highlighting for subsequent arguments.
- We are planning further improvements in this space. The upcoming 26.4 release introduces technical changes that should enable us to support this behavor without any negative impacts.
Changes
- #8783 Improves variable loading speed by up to 80%.
- #8903 Improves event dispatch by up to 60%.
- #8917 Improves entity data lookup speeds for real entities by up to 60% in typical cases. For entities represented by simple data, matching performance is up to 700% faster. String conversion has also been sped up by up to 70%.
- #8918 Improves text-component related work by up to 150%.
- #8921 Improves function call performance by around 10-20%.
- #8925 Improves loop performance by around 20%.
Bug Fixes
- #8921 Fixes an issue where a function's return value used with the 'keyed' expression would return 0-indexed keys if the function returned a regular list.
- #8937 Fixes an issue where when removing health from multiple entities at once, some of those entities would instead have health added.
- #8938 Fixes an issue where the 'indices of value' expression was 0-indexed when obtaining the last position.
- #8939 Fixes an issue where the 'minecart derailed velocity' and 'minecart flying velocity' expressions did not handle arithmetic operations for changing correctly.
- #8940 Fixes multiple issues with changing the max durability of an item.
- #8941 Fixes an issue the 'time lived of entity' did not correctly calculate the ticks lived when used for changing.
- #8942 Fixes an issue where the 'sea pickles' expression would fully abort when encountering an invalid block type.
- #8943 Fixes an issue where the 'with fire resistance' expression would fail to copy the original item, causing it to be changed.
- #8944 Fixes an issue where the 'is evenly divisible by' condition treat all negative divisors as 0.
- #8945 (API) Fixes an issue where the WXYZ property was not registered.
- #8946 (API) Fixes an issue where the DefaultFunction.Builder#requires method checked the nullness of the wrong field.
- #8947 Fixes exceptions that could occur with the 'wake and sleep' effect when attempting to wake up an entity that was not sleeping or attempting to force an entity to sleep at a location in a different world.
- #8948 Fixes an exception that occurs when making an allay dance at a specific location that is not a jukebox.
- #8949 Fixes an exception that occurs when knocking back an entity with a negative or zero strength.
- #8950 Fixes multiple command issues related to argument parsing and validation.
- #8951 Fixes an exception that could occur when spawning an entity fails.
- #8955 Fixes an issue where it was not possible to directly use rgba values (i.e., there was no parser).
- #8959 Fixes an issue where the 'damaged item' expression would fail to copy the original item, causing it to be changed.
- #8960 Fixes an issue where the rabbit entity data pattern was missing the keyword rabbit for the baby pattern.
- #8961 Fixes issues causing incorrect display names for cold striders and zombified piglins.
- #8963 Fixes an error that would occur when checking whether an enderman (that is not holding a block) is holding a block.
- #8970 Fixes an issue where boss bar progress subtraction was calculated incorrectly.
- #8971 (API) Fixes an issue where addon attribution was flawed for legacy event registration.
- #8974 Fixes an issue where size of %entity% was not registered as expected. This should be preferred over the existing 'entity size' expression.
Click here to view the full list of commits made since 2.17.1
Notices
Experimental Features
Experimental features can be used to enable syntax and other behavior on a per-script basis. Some of these features are new proposals that we are testing while others may have unsafe or complex elements that regular users may not need.
While we have tested the available experiments to the best of our ability, they are they are still in development. As a result, they are subject to change and may contain bugs. Experiments should be used at your own discretion.
Additionally, example scripts demonstrating usage of the available experiments can be found here.
<details>
<summary>Click to reveal the experiments available in this release</summary>
Queue
Enable by adding using queues to your script.
A collection that removes elements whenever they are requested.
This is useful for processing tasks or keeping track of things that need to happen only once.
Code:set {queue} to a new queue of "hello" and "world" broadcast the first element of {queue} [SIZE=7]"hello" is now removed[/SIZE] broadcast the first element of {queue} [SIZE=7]"world" is now removed[/SIZE] [SIZE=7]queue is empty[/SIZE]
Code:set {queue} to a new queue of all players set {player 1} to a random element out of {queue} set {player 2} to a random element out of {queue} [SIZE=7]players 1 and 2 are guaranteed to be distinct[/SIZE]
Queues can be looped over like a regular list.
Script Reflection
Enable by adding using script reflection to your script.
This feature includes:
- The ability to reference a script in code.
- Finding and running functions by name.
- Reading configuration files and values.
Local Variable Type Hints
Enable by adding using type hints to your script.
Local variable type hints enable Skript to understand what kind of values your local variables will hold at parse time. Consider the following example:
Previously, the code above would parse without issue. However, Skript now understands that when it is used, {_a} could only be a number (and not a text). Thus, the code above would now error with a message about mismatched types.Code:set {_a} to 5 set {_b} to "some string" ... do stuff ... set {[i]c} to {[/i]a} in lowercase # oops i used the wrong variable
Please note that this feature is currently only supported by simple local variables. A simple local variable is one whose name does not contain any expressions:
Code:{_var} # can use type hints {_var::%player's name%} # can't use type hints
Runtime Error Catching
Enable by adding using error catching to your script.
A new catch [run[ ]time] error[s] section allows you to catch and suppress runtime errors within it and access them later with [the] last caught [run[ ]time] errors.
Code:catch runtime errors: ... set worldborder center of {[i]border} to {[/i]my unsafe location} ... if last caught runtime errors contains "Your location can't have a NaN value as one of its components": set worldborder center of {_border} to location(0, 0, 0)
Equippable Components
Enable by adding using equippable components to your script.
Equippable components allows retrieving and changing the data of an item in the usage as equipment/armor.
Below is an example of creating a blank equippable component, modifying it, and applying it to an item:
Code:set {_component} to a blank equippable component: set the camera overlay to "custom_overlay" set the allowed entities to a zombie and a skeleton set the equip sound to "block.note_block.pling" set the equipped model id to "custom_model" set the shear sound to "ui.toast.in" set the equipment slot to chest slot allow event-equippable component to be damage when hurt allow event-equippable component to be dispensed allow event-equippable component to be equipped onto entities allow event-equippable component to be sheared off allow event-equippable component to swap equipment set the equippable component of {[i]item} to {[/i]component}
Changes can be made directly on to the existing equippable component of an item whether using the item itself or the retrieved equippable component
Code:set the equipment slot of {_item} to helmet slot set {[i]component} to the equippable component of {[/i]item} allow {_component} to swap equipment
For more details about the syntax, visit equippable component on our documentation website.
</details>
New Documentation Site
Over the past few months, we have been working hard to build our new documentation site. Not only do we have a new-and-improved syntaxes page, we are also finally launching a proper platform for official tutorials on using Skript, from writing scripts to building addons.
We are preparing to launch the site next month, so please take a look and share any feedback: https://beta-docs.skriptlang.org.
Join us on Discord
We have an official Discord community where we share announcements and and perform testing for upcoming features.
Thank You
Special thanks to the contributors whose work was included in this version:
- @APickledWalrus
- @CrebsTheCoder
- @erenkarakal
- @eyesniper2
- @MaxHyperBeast :star: First Contribution :star:
- @sovdeeth
As always, if you encounter any issues or have some minor suggestions, please report them at https://github.com/SkriptLang/Skript/issues.
If you have any bigger ideas or input for the future of Skript, you can share those too at https://github.com/SkriptLang/Skript/discussions.
Skript 2.17.0-pre1
Supports: Paper 1.21.5 - 26.3
Today, we're excited to be releasing Skript 2.17.0-pre1! While this release may seem small, includes a handful of exciting changes that address some gaps in Skript's content coverage. From sign-side support to a full-blown command overhaul, there is still a lot to check out! This release also includes support for Minecraft 26.3.
In accordance with supporting the last 18 months of Minecraft updates, Skript 2.17.0 supports Minecraft 1.21.5 to 26.3. Newer versions may also work but were not tested at time of release. Paper is required.
Below, you can familiarize yourself with the changes. Additionally, by clicking here, you can view the list of new syntax on our documentation site. As always, but especially with this release, please report any issues or unexpected behavior to our issues page!
Per our RELEASE[/i]MODEL.md]release model, we plan to release 2.17.0 on October 15th. We may release additional pre-releases before then should the need arise.
Happy Skripting!
Release Highlights
Command Overhaul
Our biggest feature for this release is a complete overhaul of Skript's existing system for creating custom commands. Most importantly, we expect that nearly all existing commands will continue to work. Custom commands now make use of Brigadier, Minecraft's command processing system, enabling scripters to create vanilla-like commands. This comes with numerous new features which we will briefly cover below.
Expanded executable by Entry
The executable by entry now supports two new types: operators and blocks (e.g., command blocks). As with permissions, players not covered under the executable by entry of a command will no longer be aware of that command.
Improved Arguments
Many supported argument types are now able to make use of their vanilla equivalents, which enables real-time validation. For example, <player> and <entity> arguments now support selectors. <integer> and <number> arguments can now be ranged: <integer between 5 and 10>.
[!IMPORTANT]
By default, real-time command validation will not function.
This is a trade-off to preserve compatibility with the suggestion (tab completion) features offered by some addons.
You can disable this legacy compatibility feature, thus enabling real-time validation, by changing the enable legacy tab completion event compatibility configuration option to false.
Choice Arguments
Command arguments provided as choices can now be identified. For example, consider the following command:
It can be useful to restrict the possible options at the first argument position rather than accept a text argument (any input).Code:command /alert (restart|giveaway):
This behavior is still supported, and it is now also possible to determine what value was used using the new choice argument expression:
Code:command /alert (restart|giveaway): trigger: if the choice argument is "restart": broadcast "<red>The server is restarting in 5 minutes!" else: # must be giveaway broadcast "<aqua>A giveaway is starting soon at spawn!"
Just like the regular argument expression, if multiple choices are present in the command tree, they can be differentiated by using a number: choice argument 1, choice argument 2, etc.
Subcommands
It is now possible to build entire command trees using subcommand entries:
This allows executing /home set main base and /home main base - no need for two text arguments!Code:command /home: subcommand set <name: text>: trigger: set {homes::%player%::%{_name}%} to the player's location subcommand <name: text>: trigger: teleport the player to {homes::%player%::%{_name}%}
Subcommands allow many of the entries currently supported by commands, such as permission, executable by, and cooldown.
At each level, up to one subcommand may be optional, assuming a trigger entry is not present. This allows treating one option as the default option, reducing code duplication. For example:
In this case, /command behaves the exact same as executing /command help.Code:command /command: subcommand [help]: trigger: send "Help Information"
It is also possible to use a subcommands entry to bulk define permissions, cooldowns, and other restrictions for a group of subcommands. For example:
Code:command /command: subcommands: permission: command.admin subcommand "admin1": trigger: send "Admin 1" subcommand "admin2": trigger: send "Admin 2" subcommand [help]: trigger: send "Help Information"
Custom Suggestions
You can now also define custom suggestions (tab completions). For example, expanding the home command example from above:
By default, Skript will automatically filter down the suggestions based on the current input. The default mode is a starts with mode, meaning if a player has two homes, base and temple, and they are typing /home b, only base will be shown. This can be customized using the filtering mode effect:Code:command /home: subcommand set <name: text>: trigger: set {homes::%player%::%{_name}%} to the player's location subcommand <name: text>: suggestions: set the suggestions for the text argument to the indices of {homes::%player%::*} trigger: teleport the player to {homes::%player%::%{_name}%}
Code:use starts with filtering for the text argument # default behavior use contains filtering for the text argument # matches any suggestion that contains the current input disable filtering for the text argument # always shows all suggestions
Further, suggestions support hover messages (text that appears when you hover/mouse over the suggestion). This is supported through text components. Consider amending the home example from above to show the location of the home as a hover message:
Code:command /home2: subcommand set <name: text>: trigger: set {homes::%player%::%{_name}%} to the player's location subcommand <name: text>: suggestions: loop {homes::%player%::*}: add "<ttp:'Location: %loop-value%'>%loop-index%" to the suggestions for the text argument trigger: teleport the player to {homes::%player%::%{_name}%}
Another important thing to note is that it is possible to obtain the values of arguments that have already been finished. For example, consider a message command that uses custom suggestions to give real time feedback:
Code:command /message <player[quote][/quote]<text>: suggestions: player argument is set # they are writing the text argument if the current input contains "frick": set the text argument's suggestions to "Keep your messages nice please!" disable filtering for the text argument's suggestions trigger: send "<grey><italic>%player% -[quote][/quote]You: %text argument%" to player argument send "<grey><italic>You -[quote][/quote]%player argument%: %text argument%" to player
Failures and Return Values
Commands can now report explicit failures and return an integer value.
These are the success and result values of the command execution, respectively. This is mainly useful for commands like /execute that can function off of these values.
Here's an example of both in action:
Code:command /filter-number <number>: trigger: if the argument is 67: fail the command execution with the error "Forbidden Input: %argument%" return the argument
Changeable Conditions
Many of the existing conditions have associated effects for changing the value. This approach was chosen because expressions returning booleans often require odd syntax and checks (e.g., player's flight mode is true). However, there is still value in boolean expressions: changing their value dynamically in a single line. We are introducing a new approach to address this problem: changeable conditions. Most conditions now support being changed through the whether expression.
For example:
Code:set whether the last spawned piglin is dancing to true [SIZE=7]also supports the toggle effect[/SIZE] toggle whether the player can fly
Sign Sides
At long last, Skript now has proper support for sign sides! All existing sign syntax will continue to work. By default, the front side of a sign is used.
Additionally, all lines of a sign can now be obtained:Code:set the 1st line of the back side of {_sign} to "The back side can now be changed!"
Code:on sign change: any of the lines contain "bad word" cancel the event send "<red>You may not write profanity on signs!" to the player
Finally, it is also possible to check what side of a sign was changed in a 'sign change' event. For example, if you wanted to restrict back side editing:
Code:on sign change: the back side was changed cancel the event send "<red>It is not possible to change the back side of a sign!" to the player
Improved Warning Suppression
We have made some changes to improve the warning suppression experience.
First, it is now possible to unsuppress warnings. Consider the following example:
Now, the constant condition warning will only be suppressed for the true is true statement.Code:suppress starting with expression warnings set {%the script%::info} to ... unsuppress starting with expression warnings
Further, it is also now possible to suppress warnings generated by code within a section:
Please note that these sections make no changes to the flow of code. The code after the section will not execute until the code within the section runs.Code:suppress starting with expression warnings: set {%the script%::info} to ...
Text Formatting Tweaks
We have relaxed the requirements around the usage of formatted for processing more advanced tags. Now, formatted is no longer required for literal strings (i.e., those without any expressions), and all tags will be processed.
To provide an example:
Code:[SIZE=7]before 2.17[/SIZE] send formatted "<click:run_command:/seed>Click</click[quote][/quote]to show the world seed!" to the player [SIZE=7]after 2.17[/SIZE] [SIZE=7]since this string contains no expressions, 'formatted' is not needed![/SIZE] send "<click:run_command:/seed>Click</click[quote][/quote]to show the world seed!" to the player
⚠ Breaking Changes
The following breaking changes are related to commands:
- Given the differences between the two systems, it was not possible to fully retain all existing features of Skript's existing command system. However, we expect that nearly all commands should work without issue in this version. If an existing feature is not mentioned below, we are expecting it to function as it currently does. If you find that something not listed below is not working as expected, please let us know! We of course welcome any concern about the changes listed below.
- The permission message command entry has been deprecated and no longer has functionality. If a player does not have permission to execute a command, their client will no longer be aware of it, meaning they will instead receive an "unknown command" error - the same message that players who attempt to execute regular vanilla commands without permission receive. If you wish to retain a permission message, simply manually check the permission and send an error message at the start of command execution.
- There are new restrictions on how a command can be defined. It is no longer possible to place literal content next to an argument. For example, the following is no longer valid (a space would be needed between to and <number>):
- Some plural arguments will now need quoted. Consider the following command:Code:command /test hello to<number>:
- It is no longer possible to execute this command like /plural 5 and 10 APickledWalrus. It must be wrapped in quotes: /plural "5 and 10" APickledWalrus. Of course, it is still possible to pass a single argument as normal: /plural 5 APickledWalrus. The quotes are only needed as the argument contains whitespace.Code:command /plural <numbers[quote][/quote]<player>:
- The last usage date expression has been removed. It was not properly implemented, and the configuration option to have it work somewhat well was only enabled by one server. If this behavior is necessary, it can be easily implemented using native syntax and variables.
- The the executor expression, which previously was synonymous with the sender, now has a different functionality. It now returns the executor of a command, which is not necessarily the same as the sender. While the sender and executor are typically the same, it is possible to change them. For example, if using the /execute command, it is possible to change the executor: /execute as <player>. Consider this command for how this might work:
- The event-strings event value in a command execution now has different behavior. Rather than returning the result of splitting the raw input at every whitespace character, it now returns a string representation of every available argument.Code:command /balance: # This works if you do "/execute as <player[quote][/quote]run balance" # It will send the output to the command sender, but it will be as if "<player>" was the thing executing it. send "Your balance is %{balance::%uuid of the executor%}%" to the sender
- The configuration option keep command last usage dates has been removed.
- This value can be determined by using the available cooldown expressions. For example, the elapsed time of the cooldown before now.
- The configuration option case-insensitive commands has been removed. The client will treat improperly typed commands as unknown.
The following changes are related to Skript's API:
- Due to internal changes to EntityData, any field access (i.e., via reflection) will now fail due to class migrations.
Changelog
Additions
- #8050 Adds support for loading/reloading scripts from symlinked directories.
- #8050 Adds a new /skript recover subcommand that dumps all loaded scripts back into files.
- #8050 Adds a new /skript reload last reload option for reloading the last reloaded script.
- #8707 Adds support for changing most existing conditions through the whether expression.
- #8745 Completely overhauls Skript's existing command system. See above for more information.
- #8745 Adds support for the command[/i]event]unknown command event, including the ability to change the unknown command message.
- #8779 Adds an expression for obtaining and changing the [item model](unknown command event) of an item.
- #8809 Adds support for obtaining the x and z coordinates of a chunk.
- #8811 Adds support for sign sides. It is now possible to explicitly specify changing the front or back side in sign-related syntaxes. By default, the front side is used. It is also now possible to obtain all lines of a sign.
- #8832 Overhauls warning suppression. It is now possible to unsuppress warnings. It is also possible to suppress warnings within a section. See the section 'Improved Warning Suppression' from the release highlights.
- #8883 Adds an expression for obtaining and changing the rarity of an item.
- #8884 Adds support for Minecraft 26.3.
- #8884 Adds support for spawning colored shulkers (e.g., spawn a red shulker).
Changes
- #8410 Overhauled internal handling of entity data.
- #8882 Relaxes requirements around the usage of formatted for processing more advanced tags. Now, when advanced tags are used in literal strings (i.e., the string has no expressions), all formatting is processed.
Bug Fixes
- #8050 Fixes an issue where reported a missing language entry skript command.help.show.
- #8050 Improves the script suggestion behavior in the skript command.
- #8050 Fixes an error where the Skript prefix was missing in some errors.
- #8875 Fixes an issue where some scripts could be lost when loading through parallel loading.
- #8876 Fixes an issue where script loader threads were not removed after being shutdown when changing the thread count.
- #8878 Fixes an error where using a function without a return type as an expression could cause an error.
API Changes
- #8755 Adds an alternative Patterns constructor to simplify usage.
- #8759 Deprecates multiple RegistryClassInfo constructors in favor of one that accepts a RegistryKey. For setting the default expression, it is now permitted to simply call .defaultExpression after ClassInfo creation.
- #8830 Converts the ExperimentRegistry into a modern registry accessible through a modern addon instance. Experiment registration now also supports modern addon instances.
- #8831 Some registry constructors asked for a ch.njol.Skript instance as opposed to an org.skriptlang.skript.Skript instance. This has been corrected (with compatibility for existing constructors).
- #8833 Adds support for obtaining all registries accessible through an addon instance.
[Click here to view the full list of commits made since 2.16.2](<https://github.com/SkriptLang/Skript/compare/2.16.2...2.17.0-pre1>)
Notices
Experimental Features
Experimental features can be used to enable syntax and other behavior on a per-script basis. Some of these features are new proposals that we are testing while others may have unsafe or complex elements that regular users may not need.
While we have tested the available experiments to the best of our ability, they are they are still in development. As a result, they are subject to change and may contain bugs. Experiments should be used at your own discretion.
Additionally, example scripts demonstrating usage of the available experiments can be found here.
<details>
<summary>Click to reveal the experiments available in this release</summary>
Queue
Enable by adding using queues to your script.
A collection that removes elements whenever they are requested.
This is useful for processing tasks or keeping track of things that need to happen only once.
Code:set {queue} to a new queue of "hello" and "world" broadcast the first element of {queue} [SIZE=7]"hello" is now removed[/SIZE] broadcast the first element of {queue} [SIZE=7]"world" is now removed[/SIZE] [SIZE=7]queue is empty[/SIZE]
Code:set {queue} to a new queue of all players set {player 1} to a random element out of {queue} set {player 2} to a random element out of {queue} [SIZE=7]players 1 and 2 are guaranteed to be distinct[/SIZE]
Queues can be looped over like a regular list.
Script Reflection
Enable by adding using script reflection to your script.
This feature includes:
- The ability to reference a script in code.
- Finding and running functions by name.
- Reading configuration files and values.
Local Variable Type Hints
Enable by adding using type hints to your script.
Local variable type hints enable Skript to understand what kind of values your local variables will hold at parse time. Consider the following example:
Previously, the code above would parse without issue. However, Skript now understands that when it is used, {_a} could only be a number (and not a text). Thus, the code above would now error with a message about mismatched types.Code:set {_a} to 5 set {_b} to "some string" ... do stuff ... set {[i]c} to {[/i]a} in lowercase # oops i used the wrong variable
Please note that this feature is currently only supported by simple local variables. A simple local variable is one whose name does not contain any expressions:
Code:{_var} # can use type hints {_var::%player's name%} # can't use type hints
Runtime Error Catching
Enable by adding using error catching to your script.
A new catch [run[ ]time] error[s] section allows you to catch and suppress runtime errors within it and access them later with [the] last caught [run[ ]time] errors.
Code:catch runtime errors: ... set worldborder center of {[i]border} to {[/i]my unsafe location} ... if last caught runtime errors contains "Your location can't have a NaN value as one of its components": set worldborder center of {_border} to location(0, 0, 0)
Equippable Components
Enable by adding using equippable components to your script.
Equippable components allows retrieving and changing the data of an item in the usage as equipment/armor.
Below is an example of creating a blank equippable component, modifying it, and applying it to an item:
Code:set {_component} to a blank equippable component: set the camera overlay to "custom_overlay" set the allowed entities to a zombie and a skeleton set the equip sound to "block.note_block.pling" set the equipped model id to "custom_model" set the shear sound to "ui.toast.in" set the equipment slot to chest slot allow event-equippable component to be damage when hurt allow event-equippable component to be dispensed allow event-equippable component to be equipped onto entities allow event-equippable component to be sheared off allow event-equippable component to swap equipment set the equippable component of {[i]item} to {[/i]component}
Changes can be made directly on to the existing equippable component of an item whether using the item itself or the retrieved equippable component
Code:set the equipment slot of {_item} to helmet slot set {[i]component} to the equippable component of {[/i]item} allow {_component} to swap equipment
For more details about the syntax, visit equippable component on our documentation website.
</details>
Help Us Test
We have an official Discord community for beta testing Skript's new features and releases.
Thank You
Special thanks to the contributors whose work was included in this version:
- @Absolutionism
- @AnOwlBe
- @APickledWalrus
- @Efnilite
- @erenkarakal
- @itsnotethann
- @novystar
- @sovdeeth
As always, if you encounter any issues or have some minor suggestions, please report them at https://github.com/SkriptLang/Skript/issues.
If you have any bigger ideas or input for the future of Skript, you can share those too at https://github.com/SkriptLang/Skript/discussions.
Skript 2.16.2
Supports: Paper 1.21.4 - 26.2
Today, we are releasing Skript 2.16.2 with a handful of bug fixes to further improve stability.
As always, you can report any issues on our issue tracker.
Happy Skripting!
Changelog
Additions
- #8839 Adds support for specifying multiple gamemodes in the 'gamemode[/i]change]gamemode change' event's header.
Changes
- #8861 Enables the long parse time warning by default with a value of 2 seconds.
Bug Fixes
- #8795 Fixes an exception that could occur when attempting to modify the time of a world without a clock.
- #8805 Fixes an invalid example for the 'create boss bar' expression section.
- #8807 Fixes an exception that could occur when attempting to set the 'respawn location' to a location without a world.
- Going forward, the default world will be used for locations without a world.
- #8808 Fixes an issue where a warning would not be printed for empty sections that occurred as the last line in a script.
- #8813 Fixes an exception that could occur when attempting to automatically parse URLs in formatted strings.
- #8814 Fixes an issue where checking whether certain potion effects were in fact potion effects would fail.
- #8815 Fixes an issue where the 'equip' effect did not work with newer armors (such as copper).
- #8820 Fixes an issue where some potion effects were not copied when set into variables.
- #8839 Fixes an issue where the 'gamemode[/i]change]gamemode change' event would only trigger when switching to survival (unless explicitly specified in the event header).
- #8844 Fixes an exception that could rarely occur when loading aliases. Please note that, to address this issue, aliases now load synchronously. Typical servers should see no change in loading times as a result of this change.
- #8850 Corrects an invalid example for the 'hover list' expression.
- #8857 Fixes an exception that could occur when stringifying certain particle types.
- #8857 Fixes an issue where certain types of sheep could not be saved in variables.
- #8857 Fixes an exception that could occur when stringifying the bucket catch entity event.
- #8857 Fixes an issue where the damage source could be built and used (before full completion) in a damage source creation section, potentially causing an exception.
- #8863 Fixes an issue where event-location did not work in the 'pick up' event. It now resolves to the location of the event-item.
API Changes
- #8803 Improves the accuracy and qualiy of the documentation for the modern EntryValidator class.
Click here to view the full list of commits made since 2.16.1
Notices
Experimental Features
Experimental features can be used to enable syntax and other behavior on a per-script basis. Some of these features are new proposals that we are testing while others may have unsafe or complex elements that regular users may not need.
While we have tested the available experiments to the best of our ability, they are they are still in development. As a result, they are subject to change and may contain bugs. Experiments should be used at your own discretion.
Additionally, example scripts demonstrating usage of the available experiments can be found here.
<details>
<summary>Click to reveal the experiments available in this release</summary>
Queue
Enable by adding using queues to your script.
A collection that removes elements whenever they are requested.
This is useful for processing tasks or keeping track of things that need to happen only once.
Code:set {queue} to a new queue of "hello" and "world" broadcast the first element of {queue} [SIZE=7]"hello" is now removed[/SIZE] broadcast the first element of {queue} [SIZE=7]"world" is now removed[/SIZE] [SIZE=7]queue is empty[/SIZE]
Code:set {queue} to a new queue of all players set {player 1} to a random element out of {queue} set {player 2} to a random element out of {queue} [SIZE=7]players 1 and 2 are guaranteed to be distinct[/SIZE]
Queues can be looped over like a regular list.
Script Reflection
Enable by adding using script reflection to your script.
This feature includes:
- The ability to reference a script in code.
- Finding and running functions by name.
- Reading configuration files and values.
Local Variable Type Hints
Enable by adding using type hints to your script.
Local variable type hints enable Skript to understand what kind of values your local variables will hold at parse time. Consider the following example:
Previously, the code above would parse without issue. However, Skript now understands that when it is used, {_a} could only be a number (and not a text). Thus, the code above would now error with a message about mismatched types.Code:set {_a} to 5 set {_b} to "some string" ... do stuff ... set {[i]c} to {[/i]a} in lowercase # oops i used the wrong variable
Please note that this feature is currently only supported by simple local variables. A simple local variable is one whose name does not contain any expressions:
Code:{_var} # can use type hints {_var::%player's name%} # can't use type hints
Runtime Error Catching
Enable by adding using error catching to your script.
A new catch [run[ ]time] error[s] section allows you to catch and suppress runtime errors within it and access them later with [the] last caught [run[ ]time] errors.
Code:catch runtime errors: ... set worldborder center of {[i]border} to {[/i]my unsafe location} ... if last caught runtime errors contains "Your location can't have a NaN value as one of its components": set worldborder center of {_border} to location(0, 0, 0)
Equippable Components
Enable by adding using equippable components to your script.
Equippable components allows retrieving and changing the data of an item in the usage as equipment/armor.
Below is an example of creating a blank equippable component, modifying it, and applying it to an item:
Code:set {_component} to a blank equippable component: set the camera overlay to "custom_overlay" set the allowed entities to a zombie and a skeleton set the equip sound to "block.note_block.pling" set the equipped model id to "custom_model" set the shear sound to "ui.toast.in" set the equipment slot to chest slot allow event-equippable component to be damage when hurt allow event-equippable component to be dispensed allow event-equippable component to be equipped onto entities allow event-equippable component to be sheared off allow event-equippable component to swap equipment set the equippable component of {[i]item} to {[/i]component}
Changes can be made directly on to the existing equippable component of an item whether using the item itself or the retrieved equippable component
Code:set the equipment slot of {_item} to helmet slot set {[i]component} to the equippable component of {[/i]item} allow {_component} to swap equipment
For more details about the syntax, visit equippable component on our documentation website.
</details>
New Documentation Site
Over the past few months, we have been working hard to build our new documentation site. Not only do we have a new-and-improved syntaxes page, we are also finally launching a proper platform for official tutorials on using Skript, from writing scripts to building addons.
As we continue to prepare the site for launch later this year, the beta is available for viewing at https://beta-docs.skriptlang.org.
Join us on Discord
We have an official Discord community where we share announcements and and perform testing for upcoming features.
Thank You
Special thanks to the contributors whose work was included in this version:
- @AnOwlBe
- @APickledWalrus
- @bluelhf
- @Efnilite
- @erenkarakal
- @TFSMads_
As always, if you encounter any issues or have some minor suggestions, please report them at https://github.com/SkriptLang/Skript/issues.
If you have any bigger ideas or input for the future of Skript, you can share those too at https://github.com/SkriptLang/Skript/discussions.
Skript 2.16.1
Supports: Paper 1.21.4 - 26.2
Today, we are releasing Skript 2.16.1 with a few minor bug fixes and changes.
As always, you can report any issues on our issue tracker.
Happy Skripting!
Changelog
Changes
- #8778 Adds normalised as an alternative to normalized in the 'is normalized' condition and 'vectors - normalized' expression.
- #8792 Removes an extraneous optional the keyword in the 'gamemode' expression.
Bug Fixes
- #8786 Fixes an issue where the 'next loop value' expression could cause iterations to be skipped or fail to work with delays.
Click here to view the full list of commits made since 2.16.0
Notices
Experimental Features
Experimental features can be used to enable syntax and other behavior on a per-script basis. Some of these features are new proposals that we are testing while others may have unsafe or complex elements that regular users may not need.
While we have tested the available experiments to the best of our ability, they are they are still in development. As a result, they are subject to change and may contain bugs. Experiments should be used at your own discretion.
Additionally, example scripts demonstrating usage of the available experiments can be found here.
<details>
<summary>Click to reveal the experiments available in this release</summary>
Queue
Enable by adding using queues to your script.
A collection that removes elements whenever they are requested.
This is useful for processing tasks or keeping track of things that need to happen only once.
Code:set {queue} to a new queue of "hello" and "world" broadcast the first element of {queue} [SIZE=7]"hello" is now removed[/SIZE] broadcast the first element of {queue} [SIZE=7]"world" is now removed[/SIZE] [SIZE=7]queue is empty[/SIZE]
Code:set {queue} to a new queue of all players set {player 1} to a random element out of {queue} set {player 2} to a random element out of {queue} [SIZE=7]players 1 and 2 are guaranteed to be distinct[/SIZE]
Queues can be looped over like a regular list.
Script Reflection
Enable by adding using script reflection to your script.
This feature includes:
- The ability to reference a script in code.
- Finding and running functions by name.
- Reading configuration files and values.
Local Variable Type Hints
Enable by adding using type hints to your script.
Local variable type hints enable Skript to understand what kind of values your local variables will hold at parse time. Consider the following example:
Previously, the code above would parse without issue. However, Skript now understands that when it is used, {_a} could only be a number (and not a text). Thus, the code above would now error with a message about mismatched types.Code:set {_a} to 5 set {_b} to "some string" ... do stuff ... set {[i]c} to {[/i]a} in lowercase # oops i used the wrong variable
Please note that this feature is currently only supported by simple local variables. A simple local variable is one whose name does not contain any expressions:
Code:{_var} # can use type hints {_var::%player's name%} # can't use type hints
Runtime Error Catching
Enable by adding using error catching to your script.
A new catch [run[ ]time] error[s] section allows you to catch and suppress runtime errors within it and access them later with [the] last caught [run[ ]time] errors.
Code:catch runtime errors: ... set worldborder center of {[i]border} to {[/i]my unsafe location} ... if last caught runtime errors contains "Your location can't have a NaN value as one of its components": set worldborder center of {_border} to location(0, 0, 0)
Equippable Components
Enable by adding using equippable components to your script.
Equippable components allows retrieving and changing the data of an item in the usage as equipment/armor.
Below is an example of creating a blank equippable component, modifying it, and applying it to an item:
Code:set {_component} to a blank equippable component: set the camera overlay to "custom_overlay" set the allowed entities to a zombie and a skeleton set the equip sound to "block.note_block.pling" set the equipped model id to "custom_model" set the shear sound to "ui.toast.in" set the equipment slot to chest slot allow event-equippable component to be damage when hurt allow event-equippable component to be dispensed allow event-equippable component to be equipped onto entities allow event-equippable component to be sheared off allow event-equippable component to swap equipment set the equippable component of {[i]item} to {[/i]component}
Changes can be made directly on to the existing equippable component of an item whether using the item itself or the retrieved equippable component
Code:set the equipment slot of {_item} to helmet slot set {[i]component} to the equippable component of {[/i]item} allow {_component} to swap equipment
For more details about the syntax, visit equippable component on our documentation website.
</details>
New Documentation Site
Over the past few months, we have been working hard to build our new documentation site. Not only do we have a new-and-improved syntaxes page, we are also finally launching a proper platform for official tutorials on using Skript, from writing scripts to building addons.
As we continue to prepare the site for launch later this year, the beta is available for viewing at https://beta-docs.skriptlang.org.
Join us on Discord
We have an official Discord community where we share announcements and and perform testing for upcoming features.
Thank You
Special thanks to the contributors whose work was included in this version:
- @AnOwlBe
- @APickledWalrus
- @bluelhf
As always, if you encounter any issues or have some minor suggestions, please report them at https://github.com/SkriptLang/Skript/issues.
If you have any bigger ideas or input for the future of Skript, you can share those too at https://github.com/SkriptLang/Skript/discussions.
Skript 2.16.0
Supports: Paper 1.21.4 - 26.2
Today, we're excited to be releasing Skript 2.16! This release, while a bit smaller, includes a handful of new features to work with as we continue to lay the groundwork for even more exciting features later this year.
In accordance with supporting the last 18 months of Minecraft updates, Skript 2.16.0 supports Minecraft 1.21.4 to 26.2. Newer versions may also work but were not tested at time of release. Paper is required.
Below, you can familiarize yourself with the changes. Additionally, by clicking here, you can view the list of new syntax on our documentation site. As always, report any issues to our issues page!
Per our RELEASE[/i]MODEL.md]release model, we plan to release 2.16.1 on August 1st. We may release additional emergency patch releases before then should the need arise.
Happy Skripting!
Release Highlights
Boss Bars
At last, support has been added for creating and interacting with boss bars. There is full support for a bar's title, progress, color, and more:
Code:on join: set {_bar} to a white boss bar titled "<green>Welcome %player%!": set the progress of event-boss bar to 50% set the style of event-boss bar to 6 notches make event-boss bar darken the sky add the player to the viewers of {_bar} wait 5 seconds remove the player from the viewers of {_bar}
It is also possible to create keyed bars that persist through restarts and are available in the /bossbar command:
Code:command /create-ad <text[quote][/quote]<color[quote][/quote]<text>: trigger: set {_ad} to a keyed boss bar with id arg 1 set the color of {_ad} to arg 2 set the title of {_ad} to arg 3 every 30 seconds: # hide any other ads remove all players from the viewers of all keyed boss bars # show an ad set {_bar} to a random boss bar out of all keyed boss bars add all players to the viewers of {_bar}
The ability to interact with the boss bar of actual bosses is available too:
Code:on spawn of wither: set the title of the boss bar of the event-entity to "<red>Angry Wither"
Stored Enchantments
A 'stored enchantments' expression has been added for working with enchanted books. This enables the creation of enchanted books that can be applied onto items.
Here's an example for creating a book to apply to a sword:
Code:command /godbook: trigger: set {[i]item} to minecraft:enchanted[/i]book add mending to stored enchants of {_item} # adds mending 1 add knockback 12 to stored enchants of {_item} add fire aspect 3 to stored enchants of {_item} give {_item} to player
Text Component Resolution
A 'resolved component' expression has been added which provides support for using certain MiniMessage tags such as selector, score, and nbt.
Consider this example:
Code:send formatted "My name is <selector:@s>!"
The component must be resolved with a player so that the @s selector can be identified. Simply using the syntax:
You can get an actual input, such as My name is Njol!Code:send formatted "My name is <selector:@s>!" resolved for player
Wait Section
The 'wait' effect can used as a section to delay the code within it. The code after the section will continue to run as normal, without a delay.
Consider this example:
Running this would result in A and then C being broadcast, followed by B after 1 second.Code:broadcast "A" wait 1 second: broadcast "B" broadcast "C"
⚠ Breaking Changes
- Skript's support for tree types has been significantly overhauled internally. Functionality within scripts should generally rename the same, though some names have changed.
- Note for Addon Developers: the syntax usage name has changed from structuretype to treetype.
Changelog
Changes Since Pre-Release 1
- #8724 Fixes an issue where timespans could be far longer than expected with some syntaxes.
- #8738 Adds support for Minecraft/Paper 26.2.
- #8753 Fixes an issue where the 'book pages' expression changers could cause an exception in certain cases.
- #8762 Fixes several issues with the aliases parser.
- #8763 Fixes an error that could occur when an unset name was given to the 'named' expression when creating an inventory.
[Click here to view the full list of commits made since 2.16.0-pre1](<https://github.com/SkriptLang/Skript/compare/2.16.0-pre1...2.16.0>)
Additions
- #8413 Adds support for all entities (not just living entities) to the leash syntaxes.
- #8500 Adds a 'skull texture' expression for obtaining and modifying the texture of a player head.
- #8501 Adds a 'pathfind' event, 'pathfinding target entity' expression, and 'pathfinding target location' expression.
- #8540 Adds an 'entity' function for obtaining an entity from its UUID.
- #8547 Adds support for using the 'wait' effect as a section.
- #8587 Adds a 'replace' expression for performing string replacements in line.
- #8600 Adds a 'player list priority' expression for ordering players in the player (tab) list.
- #8620 Adds support for writing uuids (plural) in the 'UUID' expression.
- #8630 Adds support for managing potion effects of area effect clouds and arrows (in entity form/in flight).
- #8668 Adds support for obtaining the minimum/maximum enchantment level of an enchantment, the stored enchantments of an item (e.g., enchanted book), and the enchantment hint that was shown to the player.
- #8673 Adds support for boss bars (see the dedicated section above).
- #8688 Adds support for getting multiple random elements, with or without repetition, from lists using the 'elements' expression.
- #8698 Adds a 'resolved component' expression for resolving certain parts of text components, such as selectors.
- #8708 Adds support for obtaining the location of an offline player.
- #8714 Adds an optional 'player' keyword to the 'gamemode change' event.
Changes
- #8579 Adds additional aliases to the 'send block change' effect.
- #8640 Overhauls Skript's existing tree type support, including a rename from structuretype to treetype.
- #8659 Makes internal improvements to world border syntaxes.
- #8712 Deprecates the [player] and [message] placeholders in the 'chat format' expression in favor of the existing 'player' and 'chat message' expressions.
Bug Fixes
- #8630 Fixes an issue where using remove all with the 'potion effects of entity/item' expression did not correctly consider active/hidden effects.
API Changes
- #8557 Adds SectionUtils#loadDelayableLinkedCode, an alternative to SectionUtils#loadLinkedCode that permits the use of delays within the linked code.
- #8677 Deprecates the registerComparator options of EnumClassInfo and RegistryClassInfo. This functionality was required due to a previous bug which has since been resolved.
- #8677 Adds support to EnumClassInfo and RegistryClassInfo for providing a callback consumer to be invoked on a successful parse. This is available through new constructors.
- #8709 Adds methods (SyntaxInfo#simple) for creating syntax infos from a class and patterns, without having to use a builder.
- #8728 Cleans up internals of EffTeleport and removes dependency on PaperLib.
- #8729 Adds a constructor (SimpleEvent(String)) for creating SimpleEvents with a custom toString value.
[Click here to view the full list of commits made since 2.15.4](<https://github.com/SkriptLang/Skript/compare/2.15.4...2.16.0>)
Notices
Experimental Features
Experimental features can be used to enable syntax and other behavior on a per-script basis. Some of these features are new proposals that we are testing while others may have unsafe or complex elements that regular users may not need.
While we have tested the available experiments to the best of our ability, they are they are still in development. As a result, they are subject to change and may contain bugs. Experiments should be used at your own discretion.
Additionally, example scripts demonstrating usage of the available experiments can be found here.
<details>
<summary>Click to reveal the experiments available in this release</summary>
Queue
Enable by adding using queues to your script.
A collection that removes elements whenever they are requested.
This is useful for processing tasks or keeping track of things that need to happen only once.
Code:set {queue} to a new queue of "hello" and "world" broadcast the first element of {queue} [SIZE=7]"hello" is now removed[/SIZE] broadcast the first element of {queue} [SIZE=7]"world" is now removed[/SIZE] [SIZE=7]queue is empty[/SIZE]
Code:set {queue} to a new queue of all players set {player 1} to a random element out of {queue} set {player 2} to a random element out of {queue} [SIZE=7]players 1 and 2 are guaranteed to be distinct[/SIZE]
Queues can be looped over like a regular list.
Script Reflection
Enable by adding using script reflection to your script.
This feature includes:
- The ability to reference a script in code.
- Finding and running functions by name.
- Reading configuration files and values.
Local Variable Type Hints
Enable by adding using type hints to your script.
Local variable type hints enable Skript to understand what kind of values your local variables will hold at parse time. Consider the following example:
Previously, the code above would parse without issue. However, Skript now understands that when it is used, {_a} could only be a number (and not a text). Thus, the code above would now error with a message about mismatched types.Code:set {_a} to 5 set {_b} to "some string" ... do stuff ... set {[i]c} to {[/i]a} in lowercase # oops i used the wrong variable
Please note that this feature is currently only supported by simple local variables. A simple local variable is one whose name does not contain any expressions:
Code:{_var} # can use type hints {_var::%player's name%} # can't use type hints
Runtime Error Catching
Enable by adding using error catching to your script.
A new catch [run[ ]time] error[s] section allows you to catch and suppress runtime errors within it and access them later with [the] last caught [run[ ]time] errors.
Code:catch runtime errors: ... set worldborder center of {[i]border} to {[/i]my unsafe location} ... if last caught runtime errors contains "Your location can't have a NaN value as one of its components": set worldborder center of {_border} to location(0, 0, 0)
Equippable Components
Enable by adding using equippable components to your script.
Equippable components allows retrieving and changing the data of an item in the usage as equipment/armor.
Below is an example of creating a blank equippable component, modifying it, and applying it to an item:
Code:set {_component} to a blank equippable component: set the camera overlay to "custom_overlay" set the allowed entities to a zombie and a skeleton set the equip sound to "block.note_block.pling" set the equipped model id to "custom_model" set the shear sound to "ui.toast.in" set the equipment slot to chest slot allow event-equippable component to be damage when hurt allow event-equippable component to be dispensed allow event-equippable component to be equipped onto entities allow event-equippable component to be sheared off allow event-equippable component to swap equipment set the equippable component of {[i]item} to {[/i]component}
Changes can be made directly on to the existing equippable component of an item whether using the item itself or the retrieved equippable component
Code:set the equipment slot of {_item} to helmet slot set {[i]component} to the equippable component of {[/i]item} allow {_component} to swap equipment
For more details about the syntax, visit equippable component on our documentation website.
</details>
Help Us Test
We have an official Discord community for beta testing Skript's new features and releases.
Thank You
Special thanks to the contributors whose work was included in this version:
- @ahmadmsaleem
- @AnOwlBe
- @APickledWalrus
- @bluelhf
- @MrScopes
- @novystar
- @ShaneBeee
- @ShroobzFirst contribution!
- @sovdeeth
- @TheLimeGlass
- @tibisabau
- @UnderscoreTud
As always, if you encounter any issues or have some minor suggestions, please report them at https://github.com/SkriptLang/Skript/issues.
If you have any bigger ideas or input for the future of Skript, you can share those too at https://github.com/SkriptLang/Skript/discussions.
Skript 2.16.0-pre1
Supports: Paper 1.21.4 - 26.1.2
Today, we're excited to be releasing the first pre-release of Skript 2.16! This release, while a bit smaller, includes a handful of new features to work with as we continue to lay the groundwork for even more exciting features later this year.
In accordance with supporting the last 18 months of Minecraft updates, Skript 2.16.0 supports Minecraft 1.21.4 to 26.1.2. Newer versions may also work but were not tested at time of release. Paper is required.
Below, you can familiarize yourself with the changes. Additionally, by clicking here, you can view the list of new syntax on our documentation site. As always, report any issues to our issues page!
Per our RELEASE[/i]MODEL.md]release model, we plan to release 2.16.0 on July 15th. We may release additional pre-releases before then should the need arise.
Happy Skripting!
Release Highlights
Boss Bars
At last, support has been added for creating and interacting with boss bars. There is full support for a bar's title, progress, color, and more:
Code:on join: set {_bar} to a white boss bar titled "<green>Welcome %player%!": set the progress of event-boss bar to 50% set the style of event-boss bar to 6 notches make event-boss bar darken the sky add the player to the viewers of {_bar} wait 5 seconds remove the player from the viewers of {_bar}
It is also possible to create keyed bars that persist through restarts and are available in the /bossbar command:
Code:command /create-ad <text[quote][/quote]<color[quote][/quote]<text>: trigger: set {_ad} to a keyed boss bar with id arg 1 set the color of {_ad} to arg 2 set the title of {_ad} to arg 3 every 30 seconds: # hide any other ads remove all players from the viewers of all keyed boss bars # show an ad set {_bar} to a random boss bar out of all keyed boss bars add all players to the viewers of {_bar}
The ability to interact with the boss bar of actual bosses is available too:
Code:on spawn of wither: set the title of the boss bar of the event-entity to "<red>Angry Wither"
Stored Enchantments
A 'stored enchantments' expression has been added for working with enchanted books. This enables the creation of enchanted books that can be applied onto items.
Here's an example for creating a book to apply to a sword:
Code:command /godbook: trigger: set {[i]item} to minecraft:enchanted[/i]book add mending to stored enchants of {_item} # adds mending 1 add knockback 12 to stored enchants of {_item} add fire aspect 3 to stored enchants of {_item} give {_item} to player
Text Component Resolution
A 'resolved component' expression has been added which provides support for using certain MiniMessage tags such as selector, score, and nbt.
Consider this example:
Code:send formatted "My name is <selector:@s>!"
The component must be resolved with a player so that the @s selector can be identified. Simply using the syntax:
You can get an actual input, such as My name is Njol!Code:send formatted "My name is <selector:@s>!" resolved for player
Wait Section
The 'wait' effect can used as a section to delay the code within it. The code after the section will continue to run as normal, without a delay.
Consider this example:
Running this would result in A and then C being broadcast, followed by B after 1 second.Code:broadcast "A" wait 1 second: broadcast "B" broadcast "C"
⚠ Breaking Changes
- Skript's support for tree types has been significantly overhauled internally. Functionality within scripts should generally rename the same, though some names have changed.
- Note for Addon Developers: the syntax usage name has changed from structuretype to treetype.
Changelog
Additions
- #8413 Adds support for all entities (not just living entities) to the leash syntaxes.
- #8500 Adds a 'skull texture' expression for obtaining and modifying the texture of a player head.
- #8501 Adds a 'pathfind' event, 'pathfinding target entity' expression, and 'pathfinding target location' expression.
- #8540 Adds an 'entity' function for obtaining an entity from its UUID.
- #8547 Adds support for using the 'wait' effect as a section.
- #8587 Adds a 'replace' expression for performing string replacements in line.
- #8600 Adds a 'player list priority' expression for ordering players in the player (tab) list.
- #8620 Adds support for writing uuids (plural) in the 'UUID' expression.
- #8630 Adds support for managing potion effects of area effect clouds and arrows (in entity form/in flight).
- #8668 Adds support for obtaining the minimum/maximum enchantment level of an enchantment, the stored enchantments of an item (e.g., enchanted book), and the enchantment hint that was shown to the player.
- #8673 Adds support for boss bars (see the dedicated section above).
- #8688 Adds support for getting multiple random elements, with or without repetition, from lists using the 'elements' expression.
- #8698 Adds a 'resolved component' expression for resolving certain parts of text components, such as selectors.
- #8708 Adds support for obtaining the location of an offline player.
- #8714 Adds an optional 'player' keyword to the 'gamemode change' event.
Changes
- #8579 Adds additional aliases to the 'send block change' effect.
- #8640 Overhauls Skript's existing tree type support, including a rename from structuretype to treetype.
- #8659 Makes internal improvements to world border syntaxes.
- #8712 Deprecates the [player] and [message] placeholders in the 'chat format' expression in favor of the existing 'player' and 'chat message' expressions.
Bug Fixes
- #8630 Fixes an issue where using remove all with the 'potion effects of entity/item' expression did not correctly consider active/hidden effects.
API Changes
- #8557 Adds SectionUtils#loadDelayableLinkedCode, an alternative to SectionUtils#loadLinkedCode that permits the use of delays within the linked code.
- #8677 Deprecates the registerComparator options of EnumClassInfo and RegistryClassInfo. This functionality was required due to a previous bug which has since been resolved.
- #8677 Adds support to EnumClassInfo and RegistryClassInfo for providing a callback consumer to be invoked on a successful parse. This is available through new constructors.
- #8709 Adds methods (SyntaxInfo#simple) for creating syntax infos from a class and patterns, without having to use a builder.
- #8728 Cleans up internals of EffTeleport and removes dependency on PaperLib.
- #8729 Adds a constructor (SimpleEvent(String)) for creating SimpleEvents with a custom toString value.
[Click here to view the full list of commits made since 2.15.4](<https://github.com/SkriptLang/Skript/compare/2.15.4...2.16.0-pre1>)
Notices
Experimental Features
Experimental features can be used to enable syntax and other behavior on a per-script basis. Some of these features are new proposals that we are testing while others may have unsafe or complex elements that regular users may not need.
While we have tested the available experiments to the best of our ability, they are they are still in development. As a result, they are subject to change and may contain bugs. Experiments should be used at your own discretion.
Additionally, example scripts demonstrating usage of the available experiments can be found here.
<details>
<summary>Click to reveal the experiments available in this release</summary>
Queue
Enable by adding using queues to your script.
A collection that removes elements whenever they are requested.
This is useful for processing tasks or keeping track of things that need to happen only once.
Code:set {queue} to a new queue of "hello" and "world" broadcast the first element of {queue} [SIZE=7]"hello" is now removed[/SIZE] broadcast the first element of {queue} [SIZE=7]"world" is now removed[/SIZE] [SIZE=7]queue is empty[/SIZE]
Code:set {queue} to a new queue of all players set {player 1} to a random element out of {queue} set {player 2} to a random element out of {queue} [SIZE=7]players 1 and 2 are guaranteed to be distinct[/SIZE]
Queues can be looped over like a regular list.
Script Reflection
Enable by adding using script reflection to your script.
This feature includes:
- The ability to reference a script in code.
- Finding and running functions by name.
- Reading configuration files and values.
Local Variable Type Hints
Enable by adding using type hints to your script.
Local variable type hints enable Skript to understand what kind of values your local variables will hold at parse time. Consider the following example:
Previously, the code above would parse without issue. However, Skript now understands that when it is used, {_a} could only be a number (and not a text). Thus, the code above would now error with a message about mismatched types.Code:set {_a} to 5 set {_b} to "some string" ... do stuff ... set {[i]c} to {[/i]a} in lowercase # oops i used the wrong variable
Please note that this feature is currently only supported by simple local variables. A simple local variable is one whose name does not contain any expressions:
Code:{_var} # can use type hints {_var::%player's name%} # can't use type hints
Runtime Error Catching
Enable by adding using error catching to your script.
A new catch [run[ ]time] error[s] section allows you to catch and suppress runtime errors within it and access them later with [the] last caught [run[ ]time] errors.
Code:catch runtime errors: ... set worldborder center of {[i]border} to {[/i]my unsafe location} ... if last caught runtime errors contains "Your location can't have a NaN value as one of its components": set worldborder center of {_border} to location(0, 0, 0)
Equippable Components
Enable by adding using equippable components to your script.
Equippable components allows retrieving and changing the data of an item in the usage as equipment/armor.
Below is an example of creating a blank equippable component, modifying it, and applying it to an item:
Code:set {_component} to a blank equippable component: set the camera overlay to "custom_overlay" set the allowed entities to a zombie and a skeleton set the equip sound to "block.note_block.pling" set the equipped model id to "custom_model" set the shear sound to "ui.toast.in" set the equipment slot to chest slot allow event-equippable component to be damage when hurt allow event-equippable component to be dispensed allow event-equippable component to be equipped onto entities allow event-equippable component to be sheared off allow event-equippable component to swap equipment set the equippable component of {[i]item} to {[/i]component}
Changes can be made directly on to the existing equippable component of an item whether using the item itself or the retrieved equippable component
Code:set the equipment slot of {_item} to helmet slot set {[i]component} to the equippable component of {[/i]item} allow {_component} to swap equipment
For more details about the syntax, visit equippable component on our documentation website.
</details>
Help Us Test
We have an official Discord community for beta testing Skript's new features and releases.
Thank You
Special thanks to the contributors whose work was included in this version:
- @ahmadmsaleem
- @AnOwlBe
- @APickledWalrus
- @bluelhf
- @MrScopes
- @novystar
- @ShaneBeee
- @ShroobzFirst contribution!
- @sovdeeth
- @TheLimeGlass
- @tibisabau
- @UnderscoreTud
As always, if you encounter any issues or have some minor suggestions, please report them at https://github.com/SkriptLang/Skript/issues.
If you have any bigger ideas or input for the future of Skript, you can share those too at https://github.com/SkriptLang/Skript/discussions.
Skript 2.15.4
Supports: Paper 1.21.1 - 26.1.2
Today, we are releasing Skript 2.15.4 to finish ironing out bugs from the transition of legacy systems in 2.15.
As always, you can report any issues on our issue tracker.
Happy Skripting!
Changelog
Changes
- #8683 Clarifies the behavior of the 'explode' event when the mob griefing gamerule is false.
Bug Fixes
- #8678 Fixes an issue where using an expression such as player's name in a variable would no longer literally resolve to that player's name.
- #8679 Fixes an issue where show was not part of the second pattern of the 'play or draw an effect' effect.
- #8681 Fixes an issue where a text component converted to a string and then back would sometimes result in a different text component.
- #8687 Fixes various issues around concurrent script reloads causing exceptions or incomplete loads.
- #8697 Fixes an issue where Skript could error when attempting to hook into a plugin that failed to load.
- #8711 Fixes an issue where some valid default function parameters could unexpectedly fail to parse.
- #8719 Fixes an issue where some named parameters were not valid when specified in a function call.
- #8736 Fixes an exception that would occur when banning a player without a reason.
Click here to view the full list of commits made since 2.15.3
Notices
Experimental Features
Experimental features can be used to enable syntax and other behavior on a per-script basis. Some of these features are new proposals that we are testing while others may have unsafe or complex elements that regular users may not need.
While we have tested the available experiments to the best of our ability, they are they are still in development. As a result, they are subject to change and may contain bugs. Experiments should be used at your own discretion.
Additionally, example scripts demonstrating usage of the available experiments can be found here.
<details>
<summary>Click to reveal the experiments available in this release</summary>
Queue
Enable by adding using queues to your script.
A collection that removes elements whenever they are requested.
This is useful for processing tasks or keeping track of things that need to happen only once.
Code:set {queue} to a new queue of "hello" and "world" broadcast the first element of {queue} [SIZE=7]"hello" is now removed[/SIZE] broadcast the first element of {queue} [SIZE=7]"world" is now removed[/SIZE] [SIZE=7]queue is empty[/SIZE]
Code:set {queue} to a new queue of all players set {player 1} to a random element out of {queue} set {player 2} to a random element out of {queue} [SIZE=7]players 1 and 2 are guaranteed to be distinct[/SIZE]
Queues can be looped over like a regular list.
Script Reflection
Enable by adding using script reflection to your script.
This feature includes:
- The ability to reference a script in code.
- Finding and running functions by name.
- Reading configuration files and values.
Local Variable Type Hints
Enable by adding using type hints to your script.
Local variable type hints enable Skript to understand what kind of values your local variables will hold at parse time. Consider the following example:
Previously, the code above would parse without issue. However, Skript now understands that when it is used, {_a} could only be a number (and not a text). Thus, the code above would now error with a message about mismatched types.Code:set {_a} to 5 set {_b} to "some string" ... do stuff ... set {[i]c} to {[/i]a} in lowercase # oops i used the wrong variable
Please note that this feature is currently only supported by simple local variables. A simple local variable is one whose name does not contain any expressions:
Code:{_var} # can use type hints {_var::%player's name%} # can't use type hints
Runtime Error Catching
Enable by adding using error catching to your script.
A new catch [run[ ]time] error[s] section allows you to catch and suppress runtime errors within it and access them later with [the] last caught [run[ ]time] errors.
Code:catch runtime errors: ... set worldborder center of {[i]border} to {[/i]my unsafe location} ... if last caught runtime errors contains "Your location can't have a NaN value as one of its components": set worldborder center of {_border} to location(0, 0, 0)
Equippable Components
Enable by adding using equippable components to your script.
Equippable components allows retrieving and changing the data of an item in the usage as equipment/armor.
Below is an example of creating a blank equippable component, modifying it, and applying it to an item:
Code:set {_component} to a blank equippable component: set the camera overlay to "custom_overlay" set the allowed entities to a zombie and a skeleton set the equip sound to "block.note_block.pling" set the equipped model id to "custom_model" set the shear sound to "ui.toast.in" set the equipment slot to chest slot allow event-equippable component to be damage when hurt allow event-equippable component to be dispensed allow event-equippable component to be equipped onto entities allow event-equippable component to be sheared off allow event-equippable component to swap equipment set the equippable component of {[i]item} to {[/i]component}
Changes can be made directly on to the existing equippable component of an item whether using the item itself or the retrieved equippable component
Code:set the equipment slot of {_item} to helmet slot set {[i]component} to the equippable component of {[/i]item} allow {_component} to swap equipment
For more details about the syntax, visit equippable component on our documentation website.
</details>
New Documentation Site
Over the past few months, we have been working hard to build our new documentation site. Not only do we have a new-and-improved syntaxes page, we are also finally launching a proper platform for official tutorials on using Skript, from writing scripts to building addons.
As we continue to prepare the site for launch later this year, the beta is available for viewing at https://beta-docs.skriptlang.org.
Join us on Discord
We have an official Discord community where we share announcements and and perform testing for upcoming features.
Thank You
Special thanks to the contributors whose work was included in this version:
- @APickledWalrus
- @erenkarakal
- @MrScopes
- @sovdeeth
- @TheMug06
As always, if you encounter any issues or have some minor suggestions, please report them at https://github.com/SkriptLang/Skript/issues.
If you have any bigger ideas or input for the future of Skript, you can share those too at https://github.com/SkriptLang/Skript/discussions.
Skript 2.15.3
Supports: Paper 1.21.1 - 26.1.2
Today, we are releasing Skript 2.15.3 to continue ironing out bugs reported with the recent 2.15 releases.
As always, you can report any issues on our issue tracker.
Happy Skripting!
Changelog
Changes
- #8598 Removes mentions of SQL variable storage in the configuration file as they do not currently work.
- #8671 Adds missing language definitions for certain 26.1 features.
Bug Fixes
- #8562 Fixes an issue where queue behavior was inconsistent.
- #8596 Corrects some invalid examples in the documentation of several loot table-related syntaxes.
- #8608 Fixes an issue where the 'rgb'' function did not validate the range of its parameters.
- #8609 Fixes an issue where an error could occur when 'hashing' a string using MD5 in an effect command.
- #8623 Fixes an issue where formatting did not work in the usage entry of 'commands'.
- #8627 Fixes an issue where uppercase characters no longer worked for legacy formatting.
- #8627 Fixes an issue where the 'contains' condition did not work as expected with text components stored in variables.
- #8628 Fixes text component (formatting) supported in the 'ban' and 'kick' effects.
- #8647 Fixes incorrect event value cache results.
- #8650 Improves the accuracy of some Turkish language translations.
- #8653 Fixes some items being stringified using legacy formatting.
- #8662 Fixes an error that could occur when indentation errors were encountered during Skript's testing process.
- #8664 Fixes an issue where using a location without a world as a variable index would cause an error.
- #8667 Fixes an issue where when reloading a script with a function, usages of that function in other scripts would not always be updated to use the latest version of the function.
Click here to view the full list of commits made since 2.15.2
Notices
Experimental Features
Experimental features can be used to enable syntax and other behavior on a per-script basis. Some of these features are new proposals that we are testing while others may have unsafe or complex elements that regular users may not need.
While we have tested the available experiments to the best of our ability, they are they are still in development. As a result, they are subject to change and may contain bugs. Experiments should be used at your own discretion.
Additionally, example scripts demonstrating usage of the available experiments can be found here.
<details>
<summary>Click to reveal the experiments available in this release</summary>
Queue
Enable by adding using queues to your script.
A collection that removes elements whenever they are requested.
This is useful for processing tasks or keeping track of things that need to happen only once.
Code:set {queue} to a new queue of "hello" and "world" broadcast the first element of {queue} [SIZE=7]"hello" is now removed[/SIZE] broadcast the first element of {queue} [SIZE=7]"world" is now removed[/SIZE] [SIZE=7]queue is empty[/SIZE]
Code:set {queue} to a new queue of all players set {player 1} to a random element out of {queue} set {player 2} to a random element out of {queue} [SIZE=7]players 1 and 2 are guaranteed to be distinct[/SIZE]
Queues can be looped over like a regular list.
Script Reflection
Enable by adding using script reflection to your script.
This feature includes:
- The ability to reference a script in code.
- Finding and running functions by name.
- Reading configuration files and values.
Local Variable Type Hints
Enable by adding using type hints to your script.
Local variable type hints enable Skript to understand what kind of values your local variables will hold at parse time. Consider the following example:
Previously, the code above would parse without issue. However, Skript now understands that when it is used, {_a} could only be a number (and not a text). Thus, the code above would now error with a message about mismatched types.Code:set {_a} to 5 set {_b} to "some string" ... do stuff ... set {[i]c} to {[/i]a} in lowercase # oops i used the wrong variable
Please note that this feature is currently only supported by simple local variables. A simple local variable is one whose name does not contain any expressions:
Code:{_var} # can use type hints {_var::%player's name%} # can't use type hints
Runtime Error Catching
Enable by adding using error catching to your script.
A new catch [run[ ]time] error[s] section allows you to catch and suppress runtime errors within it and access them later with [the] last caught [run[ ]time] errors.
Code:catch runtime errors: ... set worldborder center of {[i]border} to {[/i]my unsafe location} ... if last caught runtime errors contains "Your location can't have a NaN value as one of its components": set worldborder center of {_border} to location(0, 0, 0)
Equippable Components
Enable by adding using equippable components to your script.
Equippable components allows retrieving and changing the data of an item in the usage as equipment/armor.
Below is an example of creating a blank equippable component, modifying it, and applying it to an item:
Code:set {_component} to a blank equippable component: set the camera overlay to "custom_overlay" set the allowed entities to a zombie and a skeleton set the equip sound to "block.note_block.pling" set the equipped model id to "custom_model" set the shear sound to "ui.toast.in" set the equipment slot to chest slot allow event-equippable component to be damage when hurt allow event-equippable component to be dispensed allow event-equippable component to be equipped onto entities allow event-equippable component to be sheared off allow event-equippable component to swap equipment set the equippable component of {[i]item} to {[/i]component}
Changes can be made directly on to the existing equippable component of an item whether using the item itself or the retrieved equippable component
Code:set the equipment slot of {_item} to helmet slot set {[i]component} to the equippable component of {[/i]item} allow {_component} to swap equipment
For more details about the syntax, visit equippable component on our documentation website.
</details>
New Documentation Site
Over the past few months, we have been working hard to build our new documentation site. Not only do we have a new-and-improved syntaxes page, we are also finally launching a proper platform for official tutorials on using Skript, from writing scripts to building addons.
As we continue to prepare the site for launch later this year, the beta is available for viewing at https://beta-docs.skriptlang.org.
Join us on Discord
We have an official Discord community where we share announcements and and perform testing for upcoming features.
Thank You
Special thanks to the contributors whose work was included in this version:
- @APickledWalrus
- @Dev-XeijiFirst contribution!
- @Efnilite
- @erenkarakal
- @kayerajavaFirst contribution!
- @mvanhornFirst contribution!
- @ShaneBeee
- @sovdeeth
- @UnderscoreTud
As always, if you encounter any issues or have some minor suggestions, please report them at https://github.com/SkriptLang/Skript/issues.
If you have any bigger ideas or input for the future of Skript, you can share those too at https://github.com/SkriptLang/Skript/discussions.
Skript 2.15.2
Supports: Paper 1.21.1 - 26.1.2
Today, we are releasing Skript 2.15.2 as an emergency patch to fix major bug in Skript 2.15.1.
As always, you can report any issues on our issue tracker.
Happy Skripting!
Changelog
Bug Fixes
- #8542 Fixed an issue where certain legacy color codes (&k, &l, &m, &n, &o and &r) were not formatted.
Click here to view the full list of commits made since 2.15.1
Notices
Experimental Features
Experimental features can be used to enable syntax and other behavior on a per-script basis. Some of these features are new proposals that we are testing while others may have unsafe or complex elements that regular users may not need.
While we have tested the available experiments to the best of our ability, they are they are still in development. As a result, they are subject to change and may contain bugs. Experiments should be used at your own discretion.
Additionally, example scripts demonstrating usage of the available experiments can be found here.
<details>
<summary>Click to reveal the experiments available in this release</summary>
Queue
Enable by adding using queues to your script.
A collection that removes elements whenever they are requested.
This is useful for processing tasks or keeping track of things that need to happen only once.
Code:set {queue} to a new queue of "hello" and "world" broadcast the first element of {queue} [SIZE=7]"hello" is now removed[/SIZE] broadcast the first element of {queue} [SIZE=7]"world" is now removed[/SIZE] [SIZE=7]queue is empty[/SIZE]
Code:set {queue} to a new queue of all players set {player 1} to a random element out of {queue} set {player 2} to a random element out of {queue} [SIZE=7]players 1 and 2 are guaranteed to be distinct[/SIZE]
Queues can be looped over like a regular list.
Script Reflection
Enable by adding using script reflection to your script.
This feature includes:
- The ability to reference a script in code.
- Finding and running functions by name.
- Reading configuration files and values.
Local Variable Type Hints
Enable by adding using type hints to your script.
Local variable type hints enable Skript to understand what kind of values your local variables will hold at parse time. Consider the following example:
Previously, the code above would parse without issue. However, Skript now understands that when it is used, {_a} could only be a number (and not a text). Thus, the code above would now error with a message about mismatched types.Code:set {_a} to 5 set {_b} to "some string" ... do stuff ... set {[i]c} to {[/i]a} in lowercase # oops i used the wrong variable
Please note that this feature is currently only supported by simple local variables. A simple local variable is one whose name does not contain any expressions:
Code:{_var} # can use type hints {_var::%player's name%} # can't use type hints
Runtime Error Catching
Enable by adding using error catching to your script.
A new catch [run[ ]time] error[s] section allows you to catch and suppress runtime errors within it and access them later with [the] last caught [run[ ]time] errors.
Code:catch runtime errors: ... set worldborder center of {[i]border} to {[/i]my unsafe location} ... if last caught runtime errors contains "Your location can't have a NaN value as one of its components": set worldborder center of {_border} to location(0, 0, 0)
Equippable Components
Enable by adding using equippable components to your script.
Equippable components allows retrieving and changing the data of an item in the usage as equipment/armor.
Below is an example of creating a blank equippable component, modifying it, and applying it to an item:
Code:set {_component} to a blank equippable component: set the camera overlay to "custom_overlay" set the allowed entities to a zombie and a skeleton set the equip sound to "block.note_block.pling" set the equipped model id to "custom_model" set the shear sound to "ui.toast.in" set the equipment slot to chest slot allow event-equippable component to be damage when hurt allow event-equippable component to be dispensed allow event-equippable component to be equipped onto entities allow event-equippable component to be sheared off allow event-equippable component to swap equipment set the equippable component of {[i]item} to {[/i]component}
Changes can be made directly on to the existing equippable component of an item whether using the item itself or the retrieved equippable component
Code:set the equipment slot of {_item} to helmet slot set {[i]component} to the equippable component of {[/i]item} allow {_component} to swap equipment
For more details about the syntax, visit equippable component on our documentation website.
</details>
New Documentation Site
Over the past few months, we have been working hard to build our new documentation site. Not only do we have a new-and-improved syntaxes page, we are also finally launching a proper platform for official tutorials on using Skript, from writing scripts to building addons.
While this site is still under heavy development, the beta is available for viewing at https://beta-docs.skriptlang.org.
Join us on Discord
We have an official Discord community where we share announcements and and perform testing for upcoming features.
Thank You
Special thanks to the contributors whose work was included in this version:
- @APickledWalrus
As always, if you encounter any issues or have some minor suggestions, please report them at https://github.com/SkriptLang/Skript/issues.
If you have any bigger ideas or input for the future of Skript, you can share those too at https://github.com/SkriptLang/Skript/discussions.
Skript 2.15.1
Supports: Paper 1.21.1 - 26.1.2
Today, we are releasing Skript 2.15.1 to resolve some of the issues found with Skript 2.15.
As always, you can report any issues on our issue tracker.
Happy Skripting!
Changelog
Additions
- #8583 Added a note in code-conventions.md about version checks.
Bug Fixes
- #8542 Lowered the parsing priority of the parsed as expression for more predictable behvaior.
- #8551 Fixed an issue when trying to get the colour of a string with an empty tag.
- #8563 Fixed a rare issue where reloading a script containing function definitions used by other scripts with multiple script loading threads would cause an exception.
- #8576 Fixed an issue where the on click on entity event wouldn't get called, and the event-entity event value always being null in normal on click events.
- #8580 Fixed an issue where arguments would pass references to functions rather than copies.
- #8585 Fixed an issue where sign indices would start from 0 rather than 1.
- #8589 Fixed an issue where double hashtag hex codes no longer work (<##AABBCC>).
- #8589 Fixed an issue where escape characters for legacy formatting weren't removed.
- #8607 Fixed an issue contains didn't work with components.
- #8607 Fixed an issue where some slots didn't work with the lore expression.
- #8607 Fixed an issue where components didn't work with the replace effect.
API Fixes
- #8529 Replaced old manual event restriction checks with the modern EventRestrictedSyntax interface.
- #8610 Registering duplicate event values now print a warning rather than throwing an exception.
Click here to view the full list of commits made since 2.15.0
Notices
Experimental Features
Experimental features can be used to enable syntax and other behavior on a per-script basis. Some of these features are new proposals that we are testing while others may have unsafe or complex elements that regular users may not need.
While we have tested the available experiments to the best of our ability, they are they are still in development. As a result, they are subject to change and may contain bugs. Experiments should be used at your own discretion.
Additionally, example scripts demonstrating usage of the available experiments can be found here.
<details>
<summary>Click to reveal the experiments available in this release</summary>
Queue
Enable by adding using queues to your script.
A collection that removes elements whenever they are requested.
This is useful for processing tasks or keeping track of things that need to happen only once.
Code:set {queue} to a new queue of "hello" and "world" broadcast the first element of {queue} [SIZE=7]"hello" is now removed[/SIZE] broadcast the first element of {queue} [SIZE=7]"world" is now removed[/SIZE] [SIZE=7]queue is empty[/SIZE]
Code:set {queue} to a new queue of all players set {player 1} to a random element out of {queue} set {player 2} to a random element out of {queue} [SIZE=7]players 1 and 2 are guaranteed to be distinct[/SIZE]
Queues can be looped over like a regular list.
Script Reflection
Enable by adding using script reflection to your script.
This feature includes:
- The ability to reference a script in code.
- Finding and running functions by name.
- Reading configuration files and values.
Local Variable Type Hints
Enable by adding using type hints to your script.
Local variable type hints enable Skript to understand what kind of values your local variables will hold at parse time. Consider the following example:
Previously, the code above would parse without issue. However, Skript now understands that when it is used, {_a} could only be a number (and not a text). Thus, the code above would now error with a message about mismatched types.Code:set {_a} to 5 set {_b} to "some string" ... do stuff ... set {[i]c} to {[/i]a} in lowercase # oops i used the wrong variable
Please note that this feature is currently only supported by simple local variables. A simple local variable is one whose name does not contain any expressions:
Code:{_var} # can use type hints {_var::%player's name%} # can't use type hints
Runtime Error Catching
Enable by adding using error catching to your script.
A new catch [run[ ]time] error[s] section allows you to catch and suppress runtime errors within it and access them later with [the] last caught [run[ ]time] errors.
Code:catch runtime errors: ... set worldborder center of {[i]border} to {[/i]my unsafe location} ... if last caught runtime errors contains "Your location can't have a NaN value as one of its components": set worldborder center of {_border} to location(0, 0, 0)
Equippable Components
Enable by adding using equippable components to your script.
Equippable components allows retrieving and changing the data of an item in the usage as equipment/armor.
Below is an example of creating a blank equippable component, modifying it, and applying it to an item:
Code:set {_component} to a blank equippable component: set the camera overlay to "custom_overlay" set the allowed entities to a zombie and a skeleton set the equip sound to "block.note_block.pling" set the equipped model id to "custom_model" set the shear sound to "ui.toast.in" set the equipment slot to chest slot allow event-equippable component to be damage when hurt allow event-equippable component to be dispensed allow event-equippable component to be equipped onto entities allow event-equippable component to be sheared off allow event-equippable component to swap equipment set the equippable component of {[i]item} to {[/i]component}
Changes can be made directly on to the existing equippable component of an item whether using the item itself or the retrieved equippable component
Code:set the equipment slot of {_item} to helmet slot set {[i]component} to the equippable component of {[/i]item} allow {_component} to swap equipment
For more details about the syntax, visit equippable component on our documentation website.
</details>
New Documentation Site
Over the past few months, we have been working hard to build our new documentation site. Not only do we have a new-and-improved syntaxes page, we are also finally launching a proper platform for official tutorials on using Skript, from writing scripts to building addons.
While this site is still under heavy development, the beta is available for viewing at https://beta-docs.skriptlang.org.
Join us on Discord
We have an official Discord community where we share announcements and and perform testing for upcoming features.
Thank You
Special thanks to the contributors whose work was included in this version:
- @APickledWalrus
- @bluelhf
- @Efnilite
- @NotroDevFirst contribution!
- @sovdeeth
- @UnderscoreTud
As always, if you encounter any issues or have some minor suggestions, please report them at https://github.com/SkriptLang/Skript/issues.
If you have any bigger ideas or input for the future of Skript, you can share those too at https://github.com/SkriptLang/Skript/discussions.