Skip to content

Update dependency com.github.SkriptLang:Skript to v2.15.2#138

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/com.github.skriptlang-skript-2.x
Open

Update dependency com.github.SkriptLang:Skript to v2.15.2#138
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/com.github.skriptlang-skript-2.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented May 3, 2024

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
com.github.SkriptLang:Skript (source) 2.13.22.15.2 age confidence

Release Notes

SkriptLang/Skript (com.github.SkriptLang:Skript)

v2.15.2: Emergency Patch Release 2.15.2

Compare Source

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 a 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.

Click to reveal the experiments available in this release
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.

set {queue} to a new queue of "hello" and "world"

broadcast the first element of {queue}

# "hello" is now removed

broadcast the first element of {queue}

# "world" is now removed

# queue is empty
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}

# players 1 and 2 are guaranteed to be distinct

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:

set {_a} to 5
set {_b} to "some string"
... do stuff ...
set {_c} to {_a} in lowercase # oops i used the wrong variable

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 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.

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

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 {_item} to {_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

set the equipment slot of {_item} to helmet slot
    
set {_component} to the equippable component of {_item}
allow {_component} to swap equipment

For more details about the syntax, visit equippable component on our documentation website.

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:

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.

v2.15.0: Feature Release 2.15.0

Compare Source

Skript 2.15.0

Today, we are releasing Skript 2.15.0 with exciting features, bug fixes and enhancements. This release includes a few new major features and enhancements as we lay the groundwork for some exciting things coming later this year.

In accordance with supporting the last 18 months of Minecraft updates, Skript 2.15.0 supports Minecraft 1.21.1 to 26.1.1. 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 patch releases starting on May 1st. We may release additional emergency patch releases before then should the need arise.

Happy Skripting!

Major Changes

Adventure and MiniMessage Integration

After several months of testing, we are excited to share that Skript is now using Adventure and MiniMessage!

What is Adventure and/or MiniMessage?

Adventure is Paper's approach for supporting Minecraft's user interface elements. This includes chat messages, titles, player tablists, and more. These elements support all kinds of features, the most notable being colors and text decorations (e.g., bold, italic, etc.). Adventure is used throughout Paper, so by making this change, Skript is better aligned to support Paper's current and upcoming features.

MiniMessage is a way of representing these features in a text-based format. Skript has long used its own similar system, which most skripters are familiar with:

send "<red>Hello there <bold>%player%!"

MiniMessage is a much more developed system, resolving many of the issues that became apparent in Skript's existing system. Further, it has better support for all sorts of features:

send "<rainbow>Wow this text is super colorful!"
# this will show a stone block in the message
# sprite tags are not processed automatically, so we use the formatted expression
send formatted "Look at my <sprite:blocks:block/stone>!"

You can read more on Paper's documentation website about using MiniMessage and the features it offers: https://docs.papermc.io/adventure/minimessage/format

What does this mean for scripters?
We have put in significant effort to ensure this transition is smooth. Legacy formatting codes are still supported. However, there are a few edge cases to be aware of.

Most importantly, we have made some changes to the tags that are processed by default. Skript will only process color and decoration based tags, such as <red> or <bold>. However, we understand that some users may have a different preference for what is parsed by default. We have added a new configuration option, safe tags, so that which tags are parsed automatically can be controlled:

safe tags: color, decorations, gradient, rainbow, reset, transition, pride, shadowColor

If we wanted to add another tag, say sprites, we simply add it to the list:

safe tags: color, decorations, gradient, rainbow, reset, transition, pride, shadowColor, sprite

In some cases, Skript's color tags went directly against their formal definition in Minecraft. As a result, you may notice some color tags appear differently than before.

For addons expecting legacy formatted strings, this formatting is no longer processed automatically. For cases where formatting is not being processed, you can attempt process the string using the colored expression: colored "This is my &4legacy &rtext!"

Persistent Data Tags

Persistent data tags, also known as persistent data containers (PDC), are a way to store custom data directly on players, entities, items, blocks, chunks, and worlds. Unlike variables, which are stored separately from the rest of the game world, persistent data tags are a direct part of the thing they are attached to.

They serve a similar role to metadata, but they persist through server restarts and attach directly to things.

Here is a simple example of storing a damage bonus on a sword:

command /enchant-sword:
    trigger:
        set data tag "myserver:damage_bonus" of player's tool to 10
        send "Your sword has been enchanted with a damage bonus!"

on damage:
    set {_bonus} to data tag "myserver:damage_bonus" of attacker's tool
    if {_bonus} is set:
        add {_bonus} to damage

You can read more about Persistent Data in the new tutorial available on our new documentation site (in beta).

Region Hook Deprecation

With this release, we are deprecating Skript's region hooks for future removal. They have been unmaintained for some time and are full of difficult to resolve issues.

As an alternative, we have developed skript-worldguard, an official addon providing far more extensive support for WorldGuard.
You can read more about skript-worldguard on its repository: https://github.com/SkriptLang/skript-worldguard

We do not currently have any plans to offer addons for other region plugins.

(API) Event Value Registry

Following our efforts to modernize syntax registration, we are introducing a new, registry-based approach for event values. This system features new benefits such as custom identifiers (event-X), enhanced event validation, and support for changers (other than SET).

Here is an example of the full process:

// Obtaining the event value registry
EventValueRegistry registry = addon.registry(EventValueRegistry.class);

// Registering a simple event value
registry.register(EventValue.simple(WorldEvent.class, World.class, WorldEvent::getWorld));

// Builder option for more complex values (changers, time state)
registry.register(EventValue.builder(PlayerItemConsumeEvent.class, ItemStack.class)
    .getter(PlayerItemConsumeEvent::getItem)
    .registerChanger(ChangeMode.SET, PlayerItemConsumeEvent::setItem)
    .time(Time.NOW)
    .build());

For more information, you can consult the relevant pull request: #​8326

⚠ Breaking Changes

  • Some tags are no longer parsed by default, and some may appear differently than before (see "Adventure and MiniMessage Integration" above).
  • (API) Long-deprecated registration methods in the EventValues class using Getters have been removed.
  • (API) Registering an already existing event value will throw a SkriptAPIException.
  • The behavior of the 'type of' and 'plain' expressions for items is now unified. Both expressions now return a base item representative of the original item. For example, potions now retain their potion effect(s) rather than becoming an "uncraftable potion". This change is more significant for the type of expression, which previously only cleared the name and durability of an item.

Changelog

Changes since pre-2
  • #​8505 Fixes an issue where attempting to kill an entity using the 'kill' effect would fail to do so under certain conditions.
  • #​8519 Significantly optimize certain list operations such as adding, deleting and getting the size of a list.
  • #​8536 Fixes an issue where sytaxes involving regular expressions take precedence over other possibly conflicting syntaxes
  • #​8538 Fixes an issue where text components were unable save in variables.
Additions
  • #​8327 Adds a 'persistent data value' expression for working with persistent data tags (see "Persistent Data Tags" above).
  • #​8329 Adds an 'attempt attack' event for when a player attempts to attack an entity. This occurs before regular damage events, and cancelling it prevents those events from triggering and prevents any sounds from playing.
  • #​8331 Adds a 'player pick item' event for when a player uses the pick key (default middle mouse button) and 'picked item/block/entity' expression to obtain the thing "picked".
  • #​8351 Adds a 'location with yaw/pitch' for obtaining a copy of a location with a modified yaw and/or pitch.
  • #​8353 Adds a 'reduce' expression for reducing a list of elements into a single value.
  • #​8396 Adds a configuration option to compress configuration, language, and variables file backups. This is enabled by default.
  • #​8415 Adds failure caches to the parsing system to further improve parse times.
  • #​8412 Adds a 'vector(n)' function, which is a shortcut for 'vector(n, n, n)'.
  • #​8483 Adds a fast path for integer indices in variables, improving comparison speeds.
  • #​8514 Adds missing definitions for certain Mounts of Mayhem features.
  • #​8522 Adds support for Paper 26.1.1.
Changes
  • #​8402 Unifies the behavior of the 'type of' and 'plain' expressions for items. Both expressions now return a base item representative of the original item. For example, potions now retain their potion effect(s) rather than becoming an "uncraftable potion". This change is more significant for the type of expression, which previously only cleared the name and durability of an item.
  • #​8414 Makes the damage source experiment mainstream, no longer requiring using damage sources to enable.
  • #​8433 Improves the code quality of the 'brushing stage' expression.
  • #​8516 Further improves internal code quality and organization.
  • #​8517 Adds a warning regarding the deprecation of region hooks.
  • #​8519 Significantly optimize certain list operations such as adding, deleting and getting the size of a list.
Bug Fixes
  • #​8435 Fixes an issue where Skript would fail to properly cancel some click events.
  • #​8463 Fixes an issue where the 'inventory close expression' failed to return a value.
  • #​8495 Fixes an issue where 'game effects' appeared incorrectly in the documentation.
  • #​8498 Fixes an issue where some syntax errors could be improperly overriden by a more generic error.
  • #​8502 Fixes an issue where internal syntax definitions were improperly compared.
  • #​8505 Fixes an issue where attempting to kill an entity using the 'kill' effect would fail to do so under certain conditions.
  • #​8512 Fixes an error that could occur when using the 'tags of x' expression.
  • #​8518 Fixes an issue where a delay in a section that results in the termination of execution would propagate beyond that section.
  • #​8536 Fixes an issue where sytaxes involving regular expressions take precedence over other possibly conflicting syntaxes
  • #​8538 Fixes an issue where text components were unable save in variables.
API Changes
  • #​8326 Overhauls the event value system with a new registration process that enables support for custom identifiers, event validation and any combination of changers.
  • #​8346 Adds a HierarchicalAddonModule, a way for modules to easily nest within other modules for better addon organization. Refactored much of the skriptlang package to utilise this.
  • #​8376 Adds an origin-applying SyntaxRegistry, which allows obtaining a SyntaxRegistry that applies a specificed origin to all syntax info that are registered through it (assuming the syntax info does not already have an origin)
  • #​8377 Skript's testing framework will now copy directories from provided resource files, rather than just singular files.
  • #​8391 Adds API to modify how syntax patterns are printed to strings (e.g. omitting literal/non-literal flags).

Click here to view the full list of commits made since 2.14.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.

Click to reveal the experiments available in this release
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.

set {queue} to a new queue of "hello" and "world"

broadcast the first element of {queue}

# "hello" is now removed

broadcast the first element of {queue}

# "world" is now removed

# queue is empty
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}

# players 1 and 2 are guaranteed to be distinct

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:

set {_a} to 5
set {_b} to "some string"
... do stuff ...
set {_c} to {_a} in lowercase # oops i used the wrong variable

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 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.

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

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 {_item} to {_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

set the equipment slot of {_item} to helmet slot
    
set {_component} to the equippable component of {_item}
allow {_component} to swap equipment

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.

v2.15.0-pre2: Pre-Release 2.15.0-pre2

Compare Source

Skript 2.15.0-pre2

Today, we are releasing the second pre-release for Skript 2.15.0 with some additional fixes and enhancements. This release includes a few new major features and enhancements as we lay the groundwork for some exciting things coming later this year.

In accordance with supporting the last 18 months of Minecraft updates, Skript 2.15.0 supports Minecraft 1.21.1 to 26.1.1. Newer versions may also work but were not tested at time of release. Paper is required. Please note that Paper 26.1 is still in alpha and this build may or may not work with future Paper 26.1 releases. We will release additional compatibility updates if later Paper builds break this.

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.15.0 on April 15th. We may release additional pre-releases before then should the need arise.

Happy Skripting!

Major Changes

Adventure and MiniMessage Integration

After several months of testing, we are excited to share that Skript is now using Adventure and MiniMessage!

What is Adventure and/or MiniMessage?

Adventure is Paper's approach for supporting Minecraft's user interface elements. This includes chat messages, titles, player tablists, and more. These elements support all kinds of features, the most notable being colors and text decorations (e.g., bold, italic, etc.). Adventure is used throughout Paper, so by making this change, Skript is better aligned to support Paper's current and upcoming features.

MiniMessage is a way of representing these features in a text-based format. Skript has long used its own similar system, which most skripters are familiar with:

send "<red>Hello there <bold>%player%!"

MiniMessage is a much more developed system, resolving many of the issues that became apparent in Skript's existing system. Further, it has better support for all sorts of features:

send "<rainbow>Wow this text is super colorful!"
# this will show a stone block in the message
# sprite tags are not processed automatically, so we use the formatted expression
send formatted "Look at my <sprite:blocks:block/stone>!"

You can read more on Paper's documentation website about using MiniMessage and the features it offers: https://docs.papermc.io/adventure/minimessage/format

What does this mean for scripters?
We have put in significant effort to ensure this transition is smooth. Legacy formatting codes are still supported. However, there are a few edge cases to be aware of.

Most importantly, we have made some changes to the tags that are processed by default. Skript will only process color and decoration based tags, such as <red> or <bold>. However, we understand that some users may have a different preference for what is parsed by default. We have added a new configuration option, safe tags, so that which tags are parsed automatically can be controlled:

safe tags: color, decorations, gradient, rainbow, reset, transition, pride, shadowColor

If we wanted to add another tag, say sprites, we simply add it to the list:

safe tags: color, decorations, gradient, rainbow, reset, transition, pride, shadowColor, sprite

In some cases, Skript's color tags went directly against their formal definition in Minecraft. As a result, you may notice some color tags appear differently than before.

For addons expecting legacy formatted strings, this formatting is no longer processed automatically. For cases where formatting is not being processed, you can attempt process the string using the colored expression: colored "This is my &4legacy &rtext!"

Persistent Data Tags

Persistent data tags, also known as persistent data containers (PDC), are a way to store custom data directly on players, entities, items, blocks, chunks, and worlds. Unlike variables, which are stored separately from the rest of the game world, persistent data tags are a direct part of the thing they are attached to.

They serve a similar role to metadata, but they persist through server restarts and attach directly to things.

Here is a simple example of storing a damage bonus on a sword:

command /enchant-sword:
    trigger:
        set data tag "myserver:damage_bonus" of player's tool to 10
        send "Your sword has been enchanted with a damage bonus!"

on damage:
    set {_bonus} to data tag "myserver:damage_bonus" of attacker's tool
    if {_bonus} is set:
        add {_bonus} to damage

You can read more about Persistent Data in the new tutorial available on our new documentation site (in beta).

Region Hook Deprecation

With this release, we are deprecating Skript's region hooks for future removal. They have been unmaintained for some time and are full of difficult to resolve issues.

As an alternative, we have developed skript-worldguard, an official addon providing far more extensive support for WorldGuard.
You can read more about skript-worldguard on its repository: https://github.com/SkriptLang/skript-worldguard

We do not currently have any plans to offer addons for other region plugins.

(API) Event Value Registry

Following our efforts to modernize syntax registration, we are introducing a new, registry-based approach for event values. This system features new benefits such as custom identifiers (event-X), enhanced event validation, and support for changers (other than SET).

Here is an example of the full process:

// Obtaining the event value registry
EventValueRegistry registry = addon.registry(EventValueRegistry.class);

// Registering a simple event value
registry.register(EventValue.simple(WorldEvent.class, World.class, WorldEvent::getWorld));

// Builder option for more complex values (changers, time state)
registry.register(EventValue.builder(PlayerItemConsumeEvent.class, ItemStack.class)
    .getter(PlayerItemConsumeEvent::getItem)
    .registerChanger(ChangeMode.SET, PlayerItemConsumeEvent::setItem)
    .time(Time.NOW)
    .build());

For more information, you can consult the relevant pull request: #​8326

⚠ Breaking Changes

  • Some tags are no longer parsed by default, and some may appear differently than before (see "Adventure and MiniMessage Integration" above).
  • (API) Long-deprecated registration methods in the EventValues class using Getters have been removed.

Changelog

Changes since pre-1
  • #​8522 Adds support for Paper 26.1.1.
  • #​8527 Fixes an issue where adding objects of the same type to a typed PDC list did not work as expected.
  • #​8528 Adds quality-of-life PDC syntaxes for checking whether something has a specific tag and obtaining all of the tags something has.
  • #​8530 Fixes an issue where event values were not properly compared when detecting duplicate registrations. Some methods have also had their return types updated.
  • #​8533 Adjusts the default list of safe formatting tags and adds a configuration option to allow customizing it.
Additions
  • #​8327 Adds a 'persistent data value' expression for working with persistent data tags (see "Persistent Data Tags" above).
  • #​8329 Adds an 'attempt attack' event for when a player attempts to attack an entity. This occurs before regular damage events, and cancelling it prevents those events from triggering and prevents any sounds from playing.
  • #​8331 Adds a 'player pick item' event for when a player uses the pick key (default middle mouse button) and 'picked item/block/entity' expression to obtain the thing "picked".
  • #​8351 Adds a 'location with yaw/pitch' for obtaining a copy of a location with a modified yaw and/or pitch.
  • #​8353 Adds a 'reduce' expression for reducing a list of elements into a single value.
  • #​8396 Adds a configuration option to compress configuration, language, and variables file backups. This is enabled by default.
  • #​8415 Adds failure caches to the parsing system to further improve parse times.
  • #​8412 Adds a 'vector(n)' function, which is a shortcut for 'vector(n, n, n)'.
  • #​8483 Adds a fast path for integer indices in variables, improving comparison speeds.
  • #​8514 Adds missing definitions for certain Mounts of Mayhem features.
  • #​8522 Adds support for Paper 26.1.1.
Changes
  • #​8402 Unifies the behavior of the 'type of' and 'plain' expressions for items. Both expressions now return a base item representative of the original item. For example, potions now retain their potion effect(s) rather than becoming an "uncraftable potion". This change is more significant for the type of expression, which previously only cleared the name and durability of an item.
  • #​8414 Makes the damage source experiment mainstream, no longer requiring using damage sources to enable.
  • #​8433 Improves the code quality of the 'brushing stage' expression.
  • #​8516 Further improves internal code quality and organization.
  • #​8517 Adds a warning regarding the deprecation of region hooks.
Bug Fixes
  • #​8435 Fixes an issue where Skript would fail to properly cancel some click events.
  • #​8463 Fixes an issue where the 'inventory close expression' failed to return a value.
  • #​8495 Fixes an issue where 'game effects' appeared incorrectly in the documentation.
  • #​8498 Fixes an issue where some syntax errors could be improperly overriden by a more generic error.
  • #​8502 Fixes an issue where internal syntax definitions were improperly compared.
  • #​8512 Fixes an error that could occur when using the 'tags of x' expression.
  • #​8518 Fixes an issue where a delay in a section that results in the termination of execution would propagate beyond that section.
API Changes
  • #​8326 Overhauls the event value system with a new registration process that enables support for custom identifiers, event validation and any combination of changers.
  • #​8346 Adds a HierarchicalAddonModule, a way for modules to easily nest within other modules for better addon organization. Refactored much of the skriptlang package to utilise this.
  • #​8376 Adds an origin-applying SyntaxRegistry, which allows obtaining a SyntaxRegistry that applies a specificed origin to all syntax info that are registered through it (assuming the syntax info does not already have an origin)
  • #​8377 Skript's testing framework will now copy directories from provided resource files, rather than just singular files.
  • #​8391 Adds API to modify how syntax patterns are printed to strings (e.g. omitting literal/non-literal flags).

Click here to view the full list of commits made since 2.14.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.

Click to reveal the experiments available in this release
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.

set {queue} to a new queue of "hello" and "world"

broadcast the first element of {queue}

# "hello" is now removed

broadcast the first element of {queue}

# "world" is now removed

# queue is empty
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}

# players 1 and 2 are guaranteed to be distinct

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:

set {_a} to 5
set {_b} to "some string"
... do stuff ...
set {_c} to {_a} in lowercase # oops i used the wrong variable

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 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.

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

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 {_item} to {_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

set the equipment slot of {_item} to helmet slot
    
set {_component} to the equippable component of {_item}
allow {_component} to swap equipment

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.

v2.15.0-pre1: Pre-Release 2.15.0-pre1

Compare Source

Skript 2.15.0-pre1

Today, we are excited to release the first pre-release for Skript 2.15.0. This release includes a few new major features and enhancements as we lay the groundwork for some exciting things coming later this year. It's no joke either, these features are real and available now!

In accordance with supporting the last 18 months of Minecraft updates, Skript 2.15.0 supports Minecraft 1.21.1 to 1.21.11. 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.15.0 on April 15th. We may release additional pre-releases before then should the need arise.

Happy Skripting!

Major Changes

Adventure and MiniMessage Integration

After several months of testing, we are excited to share that Skript is now using Adventure and MiniMessage!

What is Adventure and/or MiniMessage?

Adventure is Paper's approach for supporting Minecraft's user interface elements. This includes chat messages, titles, player tablists, and more. These elements support all kinds of features, the most notable being colors and text decorations (e.g., bold, italic, etc.). Adventure is used throughout Paper, so by making this change, Skript is better aligned to support Paper's current and upcoming features.

MiniMessage is a way of representing these features in a text-based format. Skript has long used its own similar system, which most skripters are familiar with:

send "<red>Hello there <bold>%player%!"

MiniMessage is a much more developed system, resolving many of the issues that became apparent in Skript's existing system. Further, it has better support for all sorts of features:

send "<rainbow>Wow this text is super colorful!"
# this will show a stone block in the message
send "Look at my <sprite:blocks:block/stone>!"

You can read more on Paper's documentation website about using MiniMessage and the features it offers: https://docs.papermc.io/adventure/minimessage/format

What does this mean for scripters?
We have put in significant effort to ensure this transition is smooth. We expect all scripts to continue working without issue. Legacy formatting codes are still supported. However, there are a few edge cases to be aware of.

In some cases, Skript's color tags went directly against their formal definition in Minecraft. As a result, you may notice some color tags appear differently than before.

For addons expecting legacy formatted strings, this formatting is no longer processed automatically. For cases where formatting is not being processed, you can attempt process the string using the colored expression: colored "This is my &4legacy &rtext!"

Persistent Data Tags

Persistent data tags, also known as persistent data containers (PDC), are a way to store custom data directly on players, entities, items, blocks, chunks, and worlds. Unlike variables, which are stored separately from the rest of the game world, persistent data tags are a direct part of the thing they are attached to.

They serve a similar role to metadata, but they persist through server restarts and attach directly to things.

Here is a simple example of storing a damage bonus on a sword:

command /enchant-sword:
    trigger:
        set data tag "myserver:damage_bonus" of player's tool to 10
        send "Your sword has been enchanted with a damage bonus!"

on damage:
    set {_bonus} to data tag "myserver:damage_bonus" of attacker's tool
    if {_bonus} is set:
        add {_bonus} to damage

You can read more about Persistent Data in the new tutorial available on our new documentation site (in beta).

Region Hook Deprecation

With this release, we are deprecating Skript's region hooks for future removal. They have been unmaintained for some time and are full of difficult to resolve issues.

As an alternative, we have developed skript-worldguard, an official addon providing far more extensive support for WorldGuard.
You can read more about skript-worldguard on its repository: https://github.com/SkriptLang/skript-worldguard

We do not currently have any plans to offer addons for other region plugins.

(API) Event Value Registry

Following our efforts to modernize syntax registration, we are introducing a new, registry-based approach for event values. This system features new benefits such as custom identifiers (event-X), enhanced event validation, and support for changers (other than SET).

Here is an example of the full process:

// Obtaining the event value registry
EventValueRegistry registry = addon.registry(EventValueRegistry.class);

// Registering a simple event value
registry.register(EventValue.simple(WorldEvent.class, World.class, WorldEvent::getWorld));

// Builder option for more complex values (changers, time state)
registry.register(EventValue.builder(PlayerItemConsumeEvent.class, ItemStack.class)
    .getter(PlayerItemConsumeEvent::getItem)
    .registerChanger(ChangeMode.SET, PlayerItemConsumeEvent::setItem)
    .time(Time.NOW)
    .build());

For more information, you can consult the relevant pull request: #​8326

⚠ Breaking Changes

  • Some message formatting may appear differently than before (see "Adventure and MiniMessage Integration" above).
  • (API) Long-deprecated registration methods in the EventValues class using Getters have been removed.

Changelog

Additions

Note

PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the Dependencies label May 3, 2024
@renovate renovate Bot force-pushed the renovate/com.github.skriptlang-skript-2.x branch from aca945c to 515f18b Compare June 2, 2024 07:02
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.8.5 Update dependency com.github.SkriptLang:Skript to v2.8.6 Jun 2, 2024
@renovate renovate Bot force-pushed the renovate/com.github.skriptlang-skript-2.x branch 2 times, most recently from ee8f425 to dfd5a0a Compare June 15, 2024 21:48
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.8.6 Update dependency com.github.SkriptLang:Skript to v2.8.7 Jun 15, 2024
@renovate renovate Bot force-pushed the renovate/com.github.skriptlang-skript-2.x branch from dfd5a0a to 29da13d Compare July 2, 2024 04:00
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.8.7 Update dependency com.github.SkriptLang:Skript to v2.9.0-pre1 Jul 2, 2024
@renovate renovate Bot force-pushed the renovate/com.github.skriptlang-skript-2.x branch from 29da13d to 23da9de Compare July 12, 2024 23:06
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.9.0-pre1 Update dependency com.github.SkriptLang:Skript to v2.9.0-pre2 Jul 12, 2024
@renovate renovate Bot force-pushed the renovate/com.github.skriptlang-skript-2.x branch from 23da9de to 21fc838 Compare July 16, 2024 15:00
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.9.0-pre2 Update dependency com.github.SkriptLang:Skript to v2.9.0 Jul 16, 2024
@renovate renovate Bot force-pushed the renovate/com.github.skriptlang-skript-2.x branch from 21fc838 to 9861c2e Compare August 1, 2024 21:14
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.9.0 Update dependency com.github.SkriptLang:Skript to v2.9.1 Aug 1, 2024
@renovate renovate Bot force-pushed the renovate/com.github.skriptlang-skript-2.x branch from 9861c2e to 902fd30 Compare September 1, 2024 21:10
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.9.1 Update dependency com.github.SkriptLang:Skript to v2.9.2 Sep 1, 2024
@renovate renovate Bot force-pushed the renovate/com.github.skriptlang-skript-2.x branch from 902fd30 to 07604eb Compare October 2, 2024 01:30
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.9.2 Update dependency com.github.SkriptLang:Skript to v2.9.3 Oct 2, 2024
@renovate renovate Bot force-pushed the renovate/com.github.skriptlang-skript-2.x branch from 07604eb to 1c162a4 Compare November 2, 2024 00:43
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.9.3 Update dependency com.github.SkriptLang:Skript to v2.9.4 Nov 2, 2024
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.9.4 Update dependency com.github.SkriptLang:Skript to v2.9.4 - autoclosed Nov 23, 2024
@renovate renovate Bot closed this Nov 23, 2024
@renovate renovate Bot deleted the renovate/com.github.skriptlang-skript-2.x branch November 23, 2024 14:10
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.9.4 - autoclosed Update dependency com.github.SkriptLang:Skript to v2.9.4 Nov 23, 2024
@renovate renovate Bot reopened this Nov 23, 2024
@renovate renovate Bot force-pushed the renovate/com.github.skriptlang-skript-2.x branch from e4160cc to 1c162a4 Compare November 23, 2024 15:15
@renovate renovate Bot force-pushed the renovate/com.github.skriptlang-skript-2.x branch from 1c162a4 to b374957 Compare December 2, 2024 01:30
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.9.4 Update dependency com.github.SkriptLang:Skript to v2.9.5 Dec 2, 2024
@renovate renovate Bot force-pushed the renovate/com.github.skriptlang-skript-2.x branch from b374957 to 0294209 Compare January 2, 2025 03:41
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.9.5 Update dependency com.github.SkriptLang:Skript to v2.10.0-pre1 Jan 2, 2025
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.11.0-pre2 Update dependency com.github.SkriptLang:Skript to v2.11.0 Apr 15, 2025
@renovate renovate Bot force-pushed the renovate/com.github.skriptlang-skript-2.x branch from 45e7f77 to 466f02a Compare May 1, 2025 19:45
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.11.0 Update dependency com.github.SkriptLang:Skript to v2.11.1 May 1, 2025
@renovate renovate Bot force-pushed the renovate/com.github.skriptlang-skript-2.x branch from 466f02a to e62114a Compare June 1, 2025 22:02
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.11.1 Update dependency com.github.SkriptLang:Skript to v2.11.2 Jun 1, 2025
@renovate renovate Bot force-pushed the renovate/com.github.skriptlang-skript-2.x branch from e62114a to e9e8e8d Compare July 2, 2025 08:43
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.11.2 Update dependency com.github.SkriptLang:Skript to v2.12.0-pre1 Jul 2, 2025
@renovate renovate Bot force-pushed the renovate/com.github.skriptlang-skript-2.x branch from e9e8e8d to 3b6d52b Compare July 8, 2025 23:52
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.12.0-pre1 Update dependency com.github.SkriptLang:Skript to v2.12.0-pre2 Jul 8, 2025
@renovate renovate Bot force-pushed the renovate/com.github.skriptlang-skript-2.x branch from 3b6d52b to 7f2e692 Compare July 16, 2025 09:06
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.12.0-pre2 Update dependency com.github.SkriptLang:Skript to v2.12.0 Jul 16, 2025
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.12.0 Update dependency com.github.SkriptLang:Skript to v2.12.0 - autoclosed Jul 17, 2025
@renovate renovate Bot closed this Jul 17, 2025
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.12.0 - autoclosed Update dependency com.github.SkriptLang:Skript to v2.12.0 Jul 18, 2025
@renovate renovate Bot reopened this Jul 18, 2025
@renovate renovate Bot force-pushed the renovate/com.github.skriptlang-skript-2.x branch from dc6c37d to 7f2e692 Compare July 18, 2025 13:31
@renovate renovate Bot force-pushed the renovate/com.github.skriptlang-skript-2.x branch from 7f2e692 to c4f5a5f Compare August 1, 2025 20:49
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.12.0 Update dependency com.github.SkriptLang:Skript to v2.12.1 Aug 1, 2025
@renovate renovate Bot force-pushed the renovate/com.github.skriptlang-skript-2.x branch from c4f5a5f to b793125 Compare September 6, 2025 23:41
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.12.1 Update dependency com.github.SkriptLang:Skript to v2.12.2 Sep 6, 2025
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.12.2 Update dependency com.github.SkriptLang:Skript to v2.12.2 - autoclosed Sep 30, 2025
@renovate renovate Bot closed this Sep 30, 2025
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.12.2 - autoclosed Update dependency com.github.SkriptLang:Skript to v2.12.2 Sep 30, 2025
@renovate renovate Bot reopened this Sep 30, 2025
@renovate renovate Bot force-pushed the renovate/com.github.skriptlang-skript-2.x branch 2 times, most recently from b793125 to 4a7dfff Compare October 2, 2025 04:41
@renovate renovate Bot changed the title Update dependency com.github.SkriptLang:Skript to v2.12.2 Update dependency com.github.SkriptLang:Skript to v2.13.0-pre1 Oct 2, 2025
@renovate renovate Bot force-pushed the renovate/com.github.skriptlang-skript-2.x branch 2 times, most recently from 5e87170 to 50be2bf Compare October 16, 2025 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants