Pre-Release 2.16.0-pre1 #8740
APickledWalrus
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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 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:
It is also possible to create keyed bars that persist through restarts and are available in the /bossbar command:
The ability to interact with the boss bar of actual bosses is available too:
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:
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:
send formatted "My name is <selector:@s>!"The component must be resolved with a player so that the
@sselector can be identified. Simply using the syntax:You can get an actual input, such as
My name is Njol!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
Aand thenCbeing broadcast, followed byBafter 1 second.⚠ Breaking Changes
structuretypetotreetype.Changelog
Additions
uuids(plural) in the 'UUID' expression.Changes
structuretypetotreetype.[player]and[message]placeholders in the 'chat format' expression in favor of the existing 'player' and 'chat message' expressions.Bug Fixes
remove allwith the 'potion effects of entity/item' expression did not correctly consider active/hidden effects.API Changes
SectionUtils#loadDelayableLinkedCode, an alternative toSectionUtils#loadLinkedCodethat permits the use of delays within the linked code.registerComparatoroptions ofEnumClassInfoandRegistryClassInfo. This functionality was required due to a previous bug which has since been resolved.EnumClassInfoandRegistryClassInfofor providing a callback consumer to be invoked on a successful parse. This is available through new constructors.SyntaxInfo#simple) for creating syntax infos from a class and patterns, without having to use a builder.EffTeleportand removes dependency on PaperLib.SimpleEvent(String)) for creating SimpleEvents with a customtoStringvalue.Click here to view the full list of commits made since 2.15.4
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.
Click to reveal the experiments available in this release
Queue
Enable by adding
using queuesto 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.
Queues can be looped over like a regular list.
Script Reflection
Enable by adding
using script reflectionto your script.This feature includes:
Local Variable Type Hints
Enable by adding
using type hintsto 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.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:
{_var} # can use type hints {_var::%player's name%} # can't use type hintsRuntime Error Catching
Enable by adding
using error catchingto 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.catch runtime errors: ... set worldborder center of {_border} to {_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 componentsto 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:
Changes can be made directly on to the existing equippable component of an item whether using the item itself or the retrieved equippable component
For more details about the syntax, visit equippable component on our documentation website.
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:
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.
This discussion was created from the release Pre-Release 2.16.0-pre1.
Beta Was this translation helpful? Give feedback.
All reactions