Update dependency com.github.SkriptLang:Skript to v2.17.0-feature-docs-overhaul #14

Open
renovate-bot wants to merge 1 commit from renovate/com.github.skriptlang-skript-2.x into main
Owner

This PR contains the following updates:

Package Type Update Change
com.github.SkriptLang:Skript (source) dependencies minor 2.6.1 -> 2.17.0-feature-docs-overhaul

Release Notes

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

v2.16.0-pre1: Pre-Release 2.16.0-pre1

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:

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:

command /create-ad <text> <color> <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:

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:

command /godbook:
    trigger:
        set {_item} to minecraft:enchanted_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:

send formatted "My name is <selector:@&#8203;s>!"

The component must be resolved with a player so that the @s selector can be identified. Simply using the syntax:

send formatted "My name is <selector:@&#8203;s>!" resolved for player

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:

broadcast "A"
wait 1 second:
    broadcast "B"
broadcast "C"

Running this would result in A and then C being broadcast, followed by B after 1 second.

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

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.4: Patch Release 2.15.4

Compare Source

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.

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.

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:

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.3: Patch Release 2.15.3

Compare Source

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.

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.

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:

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.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.1: Patch Release 2.15.1

Compare Source

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.

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
  • #​8327 Add 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.
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.14.3: Emergency Patch 2.14.3

Compare Source

Skript 2.14.3

Supports: Paper 1.21.0 - 1.21.11

Today, we are releasing 2.14.3 as a reupload of 2.14.2 due to it being uploaded as a selfbuilt jar. Whoops!

As always, you can report any issues on our issue tracker.

Happy Skripting!

Changelog
  • Mark the jar as a GitHub release.

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

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)
Damage Sources

Enable by adding using damage sources to your script.

Note that type has been removed as an option for the 'damage cause' expression as damage cause and damage type now refer to different things.

Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more.

Below is an example of what damaging using custom damage sources looks like:

damage all players by 5 using a custom damage source:
	set the damage type to magic
	set the causing entity to {_player}
	set the direct entity to {_arrow}
	set the damage location to location(0, 0, 10)

For more details about the syntax, visit damage source on our documentation website.

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:

  • No one :p

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.14.2: Patch Release 2.14.2

Compare Source

Skript 2.14.2

Supports: Paper 1.21.0 - 1.21.11

Today, we are releasing Skript 2.14.2 to clean up some API issues, fix up some docs oversights, and generally squash a few bugs.

As always, you can report any issues on our issue tracker.

Happy Skripting!

Changelog
Bug Fixes
  • #​8432 Fixed delete name of tool not working and ensured all the name of properties support set/reset/delete where appropriate.
  • #​8438 Fixed the name of event-inventory returning incorrect values for the inventory open event.
  • #​8439 Fixed inventory of vehicle not returning the proper inventory.
  • #​8442 Fixed missing "Since" version on the draw effect.
  • #​8445 Fixed issue when creating BlockStateBlocks for unplaced BlockStates
API Fixes
  • #​8425 Removed some left-over experimental annotations from registration api classes.
  • #​8426 Fixed docs actions for archives.
  • #​8429 Opened up EntryContainer and EntryValidator methods for better extensibility.
  • #​8438 Added events to the convert method for type properties to allow event-specific overrides.
  • #​8446 Added missing documentation to the property WXYZ expression.
  • #​8456 Fixed mistaken return type assumptions in ExprArithmetic

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

Enable by adding using damage sources to your script.

Note that type has been removed as an option for the 'damage cause' expression as damage cause and damage type now refer to different things.

Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more.

Below is an example of what damaging using custom damage sources looks like:

damage all players by 5 using a custom damage source:
	set the damage type to magic
	set the causing entity to {_player}
	set the direct entity to {_arrow}
	set the damage location to location(0, 0, 10)

For more details about the syntax, visit damage source on our documentation website.

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.14.1: Patch Release 2.14.1

Compare Source

Skript 2.14.1

Supports: Paper 1.21.0 - 1.21.11

Today, we are releasing Skript 2.14.1 to resolve some of the issues found with Skript 2.14, and a significant number of older bugs too!

As always, you can report any issues on our issue tracker.

Happy Skripting!

Changelog
Additions
  • #​8400 Adds the ability to suppress the warning when using a single ':' in a variable name.
  • #​8407 Allows setting the item of an arrow projectile, which can change the item picked up when retrieving the arrow and can change the applied potion effects if the arrow is not a spectral arrow.
Bug Fixes
  • #​8375 Fixes the function argument error displaying a 'null' value for the parameter name.
  • #​8381 Fixes an issue where display name of <entity> returned the incorrect value.
  • #​8382 Fixes an issue where apostrophes (') could not be used in literal specification (e.g. dragon's breath (damage cause)).
  • #​8384 Refactors the open inventory effect to use Paper's Menu API, which fixes issues with anvils and smithing tables not functioning correctly.
  • #​8390 Fixes an issue where the documentation for the 'any of' expression is missing version information.
  • #​8395 Fixes issues where some expression sections would be erroneously parsed as sections when they clearly should not be.
  • #​8401 Fixes an issue where using past/future world of x expressions wasn't returning the correct world in some scenarios.
  • #​8403 Fixes an issue where parsing a region in a world where region data isn't loaded yet/is disabled would cause an exception.
  • #​8404 Fixes incorrect example for the particle with speed expression.
  • #​8405 Prevents the 'variables cannot be used here' warning from being used when it is not relevant.
  • #​8408 Fixes an issue where function calls would not call the most recent version of a function.
  • #​8416 Fixes an unintentional block on using x of y when both inputs were literal: 5 of flame particles.
API Fixes
  • #​8392 Fixes an issues where the Expression and Structure syntax infos would incorrectly produce warnings about being internal.
  • #​8394 Fixes an issue where test servers on GitHub Actions would randomly crash during shutdown.
  • #​8399 Fixes an issue with comparing version strings that include postfixes like 'nightly' or 'pre1'.

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

Enable by adding using damage sources to your script.

Note that type has been removed as an option for the 'damage cause' expression as damage cause and damage type now refer to different things.

Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more.

Below is an example of what damaging using custom damage sources looks like:

damage all players by 5 using a custom damage source:
	set the damage type to magic
	set the causing entity to {_player}
	set the direct entity to {_arrow}
	set the damage location to location(0, 0, 10)

For more details about the syntax, visit damage source on our documentation website.

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.14.0: Feature Release 2.14.0

Compare Source

Skript 2.14.0

Today, we are excited to be starting the year off strong with the formal release of Skript 2.14.0! This release includes dozens of major contributions to enhance Skript's existing features, along with a handful of exciting new features. With all of this early spring cleaning, there are some important breaking changes to be aware of, specifically around visual effects and potions. Be sure to look through the Breaking Changes section below to see whether your scripts are impacted.

In accordance with supporting the last 18 months of Minecraft updates, Skript 2.14.0 supports Minecraft 1.21.0 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.14.1 on February 1st. We may release additional pre-releases before then should the need arise.

Happy Skripting!

Major Changes
Potions Rework

Potion syntax has seen a major rework in order to modernize the syntax and make working with potions a breeze.

Obtaining Potion Effects

Just as before, potion effects can be obtained through syntax like:

set {_potions::*} to the potion effects of the player

However, it is now also possible to obtain specific potion effects:

set {_speed} to the player's speed effect
Potion Creation

Potion creation has been united into a single expression that may optionally be used as a section:

apply an ambient potion effect of speed of tier 5 to the player for 15 seconds:
	hide the particles
	hide the icon

The current effect has been replaced with one for applying potion effects.

Potion Modification

The six primary properties of potion effects are supported: type, duration, amplifier, ambient, particles, and icon.
All of these properties may be modified in the builder (see above).

It is also now possible to modify existing potion effects:

set the amplifier of {_potion} to 5
apply {_potion} to {_entity}

Even better, it is now possible to modify potion effects that are actively applied to entities and items:

set the duration of the player's active speed effect to 5 minutes
set the amplifier of the player's slowness effect to 10
make the potion effects of the player's tool infinite
Hidden Effects

Full support for hidden effects has been implemented too. Hidden effects allow a player to have multiple effects of the same type. For example, if a player has speed 1 for 30 seconds, and is then affected by speed 2 for 15 seconds, after those 15 seconds, the player will have 15 seconds of speed 1 remaining.

Support for obtaining these effects has been implemented:

set {_effects::*} to the player's potion effects # only active effects
set {_effects::*} to the player's active potion effects # only active effects
set {_effects::*} to the player's hidden potion effects # only hidden effects
set {_effects::*} to the player's active and hidden potion effects # all effects

Just as with active effects, hidden effects support being changed too! Note that modifying a hidden effect may result in it taking precedence over the active effect.

Comparisons

Support for more lenient comparisons has been implemented too:

player has speed 10 # checks type, amplifier
player has a potion effect of speed for 30 seconds # checks type, duration

The 'comparison' condition (as in, x is y), can be used for exact comparisons.

These comparisons are also used for removals:

remove speed 10 from the player's potion effects # removed effects must match type, amplifier
remove potion effect of speed for 30 seconds from the player's potion effects # removed effects must match type, duration
Complete Visual Effect Rework

Skript's visual effect system has been in dire need of repair, with limited to no documentation and multiple errors and outdated syntaxes. We've tackled this with a full rework of visual effects, meaning likely all code using visual effects will suffer breaking changes, but it was sadly necessary to get to a better state.

Visual effects are now split into 3 different types: particle effects, game effects, and entity effects. Entity effects are generally animations that can be played on specific entities, like the ravager attack animation effect. Game effects compose a variety of built-in game sounds and/or particle effects, like the combined sound+particles of the composter, or the footstep sound for a specific block. Particle effects are the standard particles you all know and love from /particle. We've overhauled the system to provide easier access to data-driven particles like dust; you can now draw red dust particle at player!

We've also added some syntax to help users better understand and use the admittedly labyrinthine particle api in the form of scale, distribution, and velocity support, rather than simply offset (though you can still set offset manually!).


# sets the random distribution of the particle
set particle distribution of {_flame particle} to vector(1,2,1) 

# set the velocity of the flame particle. 

# Note this only works for 'directional particles' and it will override the random distribution 
# (distribution and special effects like scale/velocity are mutually exclusive)
set the velocity of {_flame particle} to vector(1,2,1) 

# set the scale of the explostion particle. 

# Note this only works for 'scalable particles' (explosion, sweeping edge) and it will override the random distribution 
# (distribution and special effects like scale/velocity are mutually exclusive)
set the scale of {_explosion particle} to 2.5 

Drawing a particle should look more like this, now:

draw 8 red dust particles at player
draw 3 blue trail particles moving to player's target over 3 seconds at player
draw an electric spark particle with velocity vector(1,1,1) at player
draw 10 flame particles with offset vector(1,0,1) with an extra value of 0

set {_particle} to a flame particle
set velocity of {_particle} to vector(0,1,0)
draw 10 of {_particle} at player

Please note that users of SkBee and skript-particles and any other addon dealing with particles will likely need to wait for these addons to be updated to use Skript's particle system instead.

Named Function Arguments

Arguments for functions can now be specified by the name of the argument. This improves clarity with regard to the passed arguments for functions with many parameters.

function multiply(a: number, b: number) returns number:
    return {_a} * {_b}
  
on load:
    assert multiply(1, 2) is 2
    assert multiply(a: 1, b: 2) is 2
    assert multiply(1, b: 2) is 2
    assert multiply(a: 1, 2) is 2
    assert multiply(b: 2, a: 1) is 2

Mixing named and unnamed function arguments is allowed, as long as the order of the function parameters is followed, as specified in the function definition.

function add(a: number, b: number) returns number:
    return {_a} + {_b}
    
on load:
    assert multiply(a: 1, 2) is 2 # allowed! 
    assert multiply(1, b: 2) is 2 # allowed!
    assert multiply(b: 2, 2) is 2 # not allowed!
    assert multiply(2, a: 2) is 2 # not allowed!
For-Each Loop

For loops are now available by default for all users and no longer require opting into the for loops experiment. As a reminder, for loops are a kind of loop syntax that stores the loop index and value in variables for convenience.

This can be used to avoid confusion when nesting multiple loops inside each other.

for {_index}, {_value} in {my list::*}:
    broadcast "%{_index}%: %{_value}%"
for each {_player} in all players:
    send "Hello %{_player}%!" to {_player}

All existing loop features are also available in this section.

Interaction Entities

Syntax has been added for working with interaction entities. There is support for responsiveness and dimensions, along with obtaining the last date an interaction was clicked and the last player to interact.

The syntax is available on our documentation site.

Recursive Expression

Expressions may now return values recursively using recursive %objects%, or combined with the keyed %objects% expression to return its keys recursively as well. This allows Skript to pass entire structures (i.e. lists) around different contexts, like passing a list to a function while retaining indices and sublists, freely.

Note: To avoid cumbersome wording, passing a keyed expression to a function will implicitly pass it recursively as well. For example:

set {_list::a} to "Hello"
set {_list::b} to "World!"
set {_list::sublist::c} to "I'm nested!"

# This behaves the same as the same as 'print_list(recursive keyed {_list::*})'.

# This is only true for function parameter.
print_list(keyed {_list::*})

# Prints:
# a -> Hello

# b -> World!
# sublist::c -> I'm nested!

function print_list(list: objects):
    loop {_list::*}:
        broadcast "%loop-index% -> %loop-value%"

For more information, you can review the pull request.

(API) Registration API Stabilization

The modern addon and syntax registration APIs introduced in 2.10 have moved out of their experimental status. As a result, the APIs being replaced have been deprecated and marked for removal. Due to the significant nature of some of these APIs, they will continue to function. They will not be removed without explicit warnings long in advance.

Detailed API documentation is being finalized and will be available for the full 2.14 release. For now, the pull request overview can be reviewed for further information about the new APIs: #​6246

(API) Type Properties Beta Release

In 2.13 we added a new opt-in system for dealing with common properties that are often sources of conflict with addons, like name of x, or length of y.

These are a way for addons to be able to use the same generic name of x or x contains y syntaxes that Skript does without causing syntax conflicts. You can register your type (ClassInfo) as having a property, such as Property#NAME for name of x, and Skript will automatically allow it to be used in the name of expression.

For more details on how to do this and what else you can do with type properties, see the pull request. We plan on making a more comprehensive API spec/tutorial once the implementation is solidified, but for now the pull request description should be more than sufficient to try it out.

We are now enabling this by default in 2.14 to test it more thoroughly. You will notice a new use type properties option in your config.sk, which can be set to false if you encounter issues with type properties. We do not anticipate issues, but if you encounter them, there's an easy way out! Please make an issue report on GitHub if you do encounter problems, though.

For addon developers, it should be relatively safe to develop with the type properties API now, and we are in the process of preparing detailed documentation for our site.

⚠ Breaking Changes
  • #​4183 With the potion system being rewritten, there have been some breaking changes, specifically around potion creation and application. While we have tried to preserve compatibility, it is possible some syntax combinations may no longer work. Please read the dedicated section above and review our documentation site for full syntax details.
  • #​8302 With the visual effects system being rewritten, there have been changes to nearly all patterns. Please read the dedicated section above and review our documentation site for full syntax details.
  • #​8330 The text opacity expression for text displays has been modified to make it much more intuitive and easier to use. Previously, opacity was as follows:
0 to 3, fully opaque;
4 to 26, fully transparent;
27 to 127, gradually more opaque until half-opaque at 127;
-127 to -1, gradually more opaque from half to fully opaque at -1. 

defaults to -1.

This has been changed to

0 to 3, fully opaque; (this is mojang's fault, don't ask us why!)
4 to 26, fully transparent;
27 to 255, gradually more opaque from transparent to fully opaque at 255.

defaults to 255

The expression can still be set to values between -1 and -128, which correspond to 255 to 128 respectively, but the returned value will be positive and add/subtract will not allow opacity to leave the 0-255 range.

  • [API] #​8316/#​8355 As part of Registration API stabilization, there have been a few breaking changes:
    • The BukkitRegistryKeys class has been removed. The existing field, BukkitRegistryKeys.EVENT is now available at BukkitSyntaxInfos.Event.KEY.
    • SyntaxOrigin has been replaced in favor of a more generic Origin system. Origins are still constructed in a similar way using the static methods available on the Origin interface.
    • Some methods, such as patterns on SyntaxInfo now return SequencedCollections rather than regular Collections. If. you were implementing this interface before, you may need to update your code.
    • AddonModule now has a required name method. This also means that it is no longer a FunctionalInterface.
Changelog
Since pre-2
  • #​8367 Fixes misformatting in the 'sorted list' expression example.
  • #​8373 Improves the error message when an unknown function is used.
Additions
  • #​7925 Adds the ability to use local axes when offsetting vectors: player's location offset by vector(0, 1, 5) using local axes, where x becomes left/right, y is up/down, and z is forward/back.
  • #​8112 Adds support for specifying named function arguments when calling functions.
  • #​8252 Adds support for obtaining the indices of multiple values at once with the 'indices of value' expression.
  • #​8261 Adds support for obtaining and changing the BlockData of falling blocks.
  • #​8291 Adds support for working with interaction entities.
  • #​8280 Moves 'for-each loops' out of experimental status.
  • #​8314 Adds two expressions for converting colors to and from hex codes: hex code of %colors% and color from hex code %strings%.
  • #​8314 Adds two functions for converting numbers/strings to and from various bases like hexadecimal, octal, or binary: toBase(value: number, base: number) and fromBase(value: string, base: number).
  • #​8323 Adds support for obtaining the 'respawn reason' in a 'respawn' event.
  • #​8328 Adds support for Minecraft 1.21.11.
Changes
  • #​4183 Reworks potion syntax from the ground up. Read more in its dedicated section above.
  • #​8243 Looping using the 'alphabetical sort', 'reversed list', 'shuffled list', 'sorted list', and 'elements' expressions now allow you to reference the looped index using loop-index.
  • #​8280 Marks the Script Reflection experiment as stable (that is, not subject to breaking changes).
  • #​8302 Completely replaces Visual Effects with a new system of particle effects, game effects, and entity effects. Read more in its dedicated section above.
  • #​8320 Adds a negation option to the 'chance' condition: if chance of 50% fails.
  • #​8330 Reworks the 'text display opacity' expression to go from 0 to 255, rather than from -128 to 127.
  • #​8335 Improves loop performance for the 'elements' and 'reversed list' expressions.
  • #​8348 Changes the lang entry for particles effects from particle effect to simply particle to match its code name and docs name.
Bug Fixes
  • #​8243 Fixes an error that occurs when attempting to get the sorted indices of a list with empty values (sublists).
  • #​8243 Fixes an error that occurs when calling a function with two lists with values corresponding to the same keys.
  • #​8313 Fixes an issue where resetting an entity's attributes would use the global default instead of the default for that entity type. e.g. resetting player's walk speed to 0.7 instead of 0.1.
  • #​8315 Fixes an issue where the 'look' effect mistakenly required an entity in some cases (even though it was unused).
  • #​8332 Fixes arithmetic operations used for testing showing up on the documentation site.
  • #​8334 Fixes an error that could occur when attempting to change the 'yaw/pitch' to a non-finite value.
  • #​8343 Fixes an issue where indices of nested lists would contain duplicates.
  • #​8344 Fixes issue with the docs not showing function parameters properly.
API Changes
  • #​8061 Adds tests for entity AI syntaxes.
  • #​8105 Adds experiments and their descriptions to the JSONGenerator.
  • #​8112 Reworks most code related to parsing and calling functions. Some long-deprecated methods and fields have been removed. Please review the pull request overview for further information.
  • #​8224 Migrates the vast majority of syntax examples from the old @Examples annotation to the new @Example annotations.
  • #​8272 Adds the appendIf() utility method to SyntaxStringBuilder.
  • #​8274 Supports w/x/y/z of %object% via the type property WXYZ, if type properties are enabled. Reorganizes the type property handlers to avoid one massive class.
  • #​8300 Adds new utility methods for working with Fields objects.
  • #​8302 Adds a new ParticleEffect class that extends Paper's ParticleBuilder class. Addons should use this class when dealing with particles.
  • #​8303 Removes Java 17 tests (1.20.4).
  • #​8314 Adds a new function paramater Modifier for default functions, Modifier.RANGED. This can be used to limit parameters to a fixed range of values, complete with parse errors if the user uses values out of the range and automatic documentation.
  • #​8314 Ensures that runtime errors emitted during simplification result in parse errors instead. Also fixed an issue where the RuntimeErrorCatcher would not properly remove consumers from the manager.
  • #​8316 Marks the new addon and syntax registration APIs as stable. The existing APIs have been deprecated. See the full announcement above for the complete information.
  • #​8317 Adds a customTest gradle task to allow testing of any combination of environments. Parallelizes tests on GitHub.
  • #​8334 Removes the long-deprecated VectorMath utility class.
  • #​8336 Enables type properties by default. Read more in the dedicated section above.
  • #​8355 Updates some properties of SyntaxInfo (and implementations) to use SequencedCollection rather than Collection. Also adds automatic Priority detection (if not specified) for SyntaxInfo. Also adds a required name method to AddonModule (which is no longer a FunctionalInterface).

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

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)
Damage Sources

Enable by adding using damage sources to your script.

Note that type has been removed as an option for the 'damage cause' expression as damage cause and damage type now refer to different things.

Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more.

Below is an example of what damaging using custom damage sources looks like:

damage all players by 5 using a custom damage source:
	set the damage type to magic
	set the causing entity to {_player}
	set the direct entity to {_arrow}
	set the damage location to location(0, 0, 10)

For more details about the syntax, visit damage source on our documentation website.

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.

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.14.0-pre2: Pre-Release 2.14.0-pre2

Compare Source

Skript 2.14.0-pre2

We are starting the weekend with the second pre-release for Skript 2.14.0, now with more bug fixes! This release includes dozens of major contributions to enhance Skript's existing features, along with a handful of exciting new features. Major changes means some breaking changes though, so we hope you all forgive us for doing some early spring cleaning (especially with visual effects). Please remember to look through the Breaking Changes section to see if anything impacts you!

In accordance with supporting the last 18 months of Minecraft updates, Skript 2.14.0 supports Minecraft 1.21.0 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.14.0 on January 15th. We may release additional pre-releases before then should the need arise.

Happy Skripting!

Major Changes
Potions Rework

Potion syntax has seen a major rework in order to modernize the syntax and make working with potions a breeze.

Obtaining Potion Effects

Just as before, potion effects can be obtained through syntax like:

set {_potions::*} to the potion effects of the player

However, it is now also possible to obtain specific potion effects:

set {_speed} to the player's speed effect
Potion Creation

Potion creation has been united into a single expression that may optionally be used as a section:

apply an ambient potion effect of speed of tier 5 to the player for 15 seconds:
	hide the particles
	hide the icon

The current effect has been replaced with one for applying potion effects.

Potion Modification

The six primary properties of potion effects are supported: type, duration, amplifier, ambient, particles, and icon.
All of these properties may be modified in the builder (see above).

It is also now possible to modify existing potion effects:

set the amplifier of {_potion} to 5
apply {_potion} to {_entity}

Even better, it is now possible to modify potion effects that are actively applied to entities and items:

set the duration of the player's active speed effect to 5 minutes
set the amplifier of the player's slowness effect to 10
make the potion effects of the player's tool infinite
Hidden Effects

Full support for hidden effects has been implemented too. Hidden effects allow a player to have multiple effects of the same type. For example, if a player has speed 1 for 30 seconds, and is then affected by speed 2 for 15 seconds, after those 15 seconds, the player will have 15 seconds of speed 1 remaining.

Support for obtaining these effects has been implemented:

set {_effects::*} to the player's potion effects # only active effects
set {_effects::*} to the player's active effects # only active effects
set {_effects::*} to the player's hidden effects # only hidden effects
set {_effects::*} to the player's active and hidden effects # all effects

Just as with active effects, hidden effects support being changed too! Note that modifying a hidden effect may result in it taking precedence over the active effect.

Comparisons

Support for more lenient comparisons has been implemented too:

player has speed 10 # checks type, amplifier
player has a potion effect of speed for 30 seconds # checks type, duration

The 'comparison' condition (as in, x is y), can be used for exact comparisons.

These comparisons are also used for removals:

remove speed 10 from the player's potion effects # removed effects must match type, amplifier
remove potion effect of speed for 30 seconds from the player's potion effects # removed effects must match type, duration
Complete Visual Effect Rework

Skript's visual effect system has been in dire need of repair, with limited to no documentation and multiple errors and outdated syntaxes. We've tackled this with a full rework of visual effects, meaning likely all code using visual effects will suffer breaking changes, but it was sadly necessary to get to a better state.

Visual effects are now split into 3 different types: particle effects, game effects, and entity effects. Entity effects are generally animations that can be played on specific entities, like the ravager attack animation effect. Game effects compose a variety of built-in game sounds and/or particle effects, like the combined sound+particles of the composter, or the footstep sound for a specific block. Particle effects are the standard particles you all know and love from /particle. We've overhauled the system to provide easier access to data-driven particles like dust; you can now draw red dust particle at player!

We've also added some syntax to help users better understand and use the admittedly labyrinthine particle api in the form of scale, distribution, and velocity support, rather than simply offset (though you can still set offset manually!).


# sets the random distribution of the particle
set particle distribution of {_flame particle} to vector(1,2,1) 

# set the velocity of the flame particle. 

# Note this only works for 'directional particles' and it will override the random distribution 
# (distribution and special effects like scale/velocity are mutually exclusive)
set the velocity of {_flame particle} to vector(1,2,1) 

# set the scale of the explostion particle. 

# Note this only works for 'scalable particles' (explosion, sweeping edge) and it will override the random distribution 
# (distribution and special effects like scale/velocity are mutually exclusive)
set the scale of {_explosion particle} to 2.5 

Drawing a particle should look more like this, now:

draw 8 red dust particles at player
draw 3 blue trail particles moving to player's target over 3 seconds at player
draw an electric spark particle with velocity vector(1,1,1) at player
draw 10 flame particles with offset vector(1,0,1) with an extra value of 0

set {_particle} to a flame particle
set velocity of {_particle} to vector(0,1,0)
draw 10 of {_particle} at player

Please note that users of SkBee and skript-particles and any other addon dealing with particles will likely need to wait for these addons to be updated to use Skript's particle system instead.

Named Function Arguments

Arguments for functions can now be specified by the name of the argument. This improves clarity with regard to the passed arguments for functions with many parameters.

function multiply(a: number, b: number) returns number:
    return {_a} * {_b}
  
on load:
    assert multiply(1, 2) is 2
    assert multiply(a: 1, b: 2) is 2
    assert multiply(1, b: 2) is 2
    assert multiply(a: 1, 2) is 2
    assert multiply(b: 2, a: 1) is 2

Mixing named and unnamed function arguments is allowed, as long as the order of the function parameters is followed, as specified in the function definition.

function add(a: number, b: number) returns number:
    return {_a} + {_b}
    
on load:
    assert multiply(a: 1, 2) is 2 # allowed! 
    assert multiply(1, b: 2) is 2 # allowed!
    assert multiply(b: 2, 2) is 2 # not allowed!
    assert multiply(2, a: 2) is 2 # not allowed!
For-Each Loop

For loops are now available by default for all users and no longer require opting into the for loops experiment. As a reminder, for loops are a kind of loop syntax that stores the loop index and value in variables for convenience.

This can be used to avoid confusion when nesting multiple loops inside each other.

for {_index}, {_value} in {my list::*}:
    broadcast "%{_index}%: %{_value}%"
for each {_player} in all players:
    send "Hello %{_player}%!" to {_player}

All existing loop features are also available in this section.

Interaction Entities

Syntax has been added for working with interaction entities. There is support for responsiveness and dimensions, along with obtaining the last date an interaction was clicked and the last player to interact.

The syntax is available on our documentation site.

Recursive Expression

Expressions may now return values recursively using recursive %objects%, or combined with the keyed %objects% expression to return its keys recursively as well. This allows Skript to pass entire structures (i.e. lists) around different contexts, like passing a list to a function while retaining indices and sublists, freely.

Note: To avoid cumbersome wording, passing a keyed expression to a function will implicitly pass it recursively as well. For example:

set {_list::a} to "Hello"
set {_list::b} to "World!"
set {_list::sublist::c} to "I'm nested!"

# This behaves the same as the same as 'print_list(recursive keyed {_list::*})'.

# This is only true for function parameter.
print_list(keyed {_list::*})

# Prints:
# a -> Hello

# b -> World!
# sublist::c -> I'm nested!

function print_list(list: objects):
    loop {_list::*}:
        broadcast "%loop-index% -> %loop-value%"

For more information, you can review the pull request.

(API) Registration API Stabilization

The modern addon and syntax registration APIs introduced in 2.10 have moved out of their experimental status. As a result, the APIs being replaced have been deprecated and marked for removal. Due to the significant nature of some of these APIs, they will continue to function. They will not be removed without explicit warnings long in advance.

Detailed API documentation is being finalized and will be available for the full 2.14 release. For now, the pull request overview can be reviewed for further information about the new APIs: #​6246

(API) Type Properties Beta Release

In 2.13 we added a new opt-in system for dealing with common properties that are often sources of conflict with addons, like name of x, or length of y.

These are a way for addons to be able to use the same generic name of x or x contains y syntaxes that Skript does without causing syntax conflicts. You can register your type (ClassInfo) as having a property, such as Property#NAME for name of x, and Skript will automatically allow it to be used in the name of expression.

For more details on how to do this and what else you can do with type properties, see the pull request. We plan on making a more comprehensive API spec/tutorial once the implementation is solidified, but for now the pull request description should be more than sufficient to try it out.

We are now enabling this by default in 2.14 to test it more thoroughly. You will notice a new use type properties option in your config.sk, which can be set to false if you encounter issues with type properties. We do not anticipate issues, but if you encounter them, there's an easy way out! Please make an issue report on GitHub if you do encounter problems, though.

For addon developers, it should be relatively safe to develop with the type properties API now, and we are in the process of preparing detailed documentation for our site.

⚠ Breaking Changes
  • #​4183 With the potion system being rewritten, there have been some breaking changes, specifically around potion creation and application. While we have tried to preserve compatibility, it is possible some syntax combinations may no longer work. Please read the dedicated section above and review our documentation site for full syntax details.
  • #​8302 With the visual effects system being rewritten, there have been changes to nearly all patterns. Please read the dedicated section above and review our documentation site for full syntax details.
  • #​8330 The text opacity expression for text displays has been modified to make it much more intuitive and easier to use. Previously, opacity was as follows:
0 to 3, fully opaque;
4 to 26, fully transparent;
27 to 127, gradually more opaque until half-opaque at 127;
-127 to -1, gradually more opaque from half to fully opaque at -1. 

defaults to -1.

This has been changed to

0 to 3, fully opaque; (this is mojang's fault, don't ask us why!)
4 to 26, fully transparent;
27 to 255, gradually more opaque from transparent to fully opaque at 255.

defaults to 255

The expression can still be set to values between -1 and -128, which correspond to 255 to 128 respectively, but the returned value will be positive and add/subtract will not allow opacity to leave the 0-255 range.

  • [API] #​8316/#​8355 As part of Registration API stabilization, there have been a few breaking changes:
    • The BukkitRegistryKeys class has been removed. The existing field, BukkitRegistryKeys.EVENT is now available at BukkitSyntaxInfos.Event.KEY.
    • SyntaxOrigin has been replaced in favor of a more generic Origin system. Origins are still constructed in a similar way using the static methods available on the Origin interface.
    • Some methods, such as patterns on SyntaxInfo now return SequencedCollections rather than regular Collections. If. you were implementing this interface before, you may need to update your code.
    • AddonModule now has a required name method. This also means that it is no longer a FunctionalInterface.
Changelog
Since pre-1
  • #​8341 Fixes an issue with HTML documentation generation.
  • #​8343 Fixes an issue where the results of the 'indices of list' expression could have duplicate values.
  • #​8344 Fixes an issue where function parameters were not properly converted to strings (primarily for documentation).
  • #​8348 Renames the language entry for ParticleEffect to particle (rather than particle effect) for consistency with other particles.
  • #​8350 Fixes an issue where function arguments containing colons could fail to parse.
  • #​8352 Fixes an issue where optional function parameters could not be excluded when using only named arguments. Also reduces the restrictions in how named and unnamed arguments can be combined.
  • #​8354 Fixes an issue where property expressions could allow a change operation at parse time but then unexpectedly fail at performing the change during runtime. Also fixes an issue where the contains property condition failed to use converted input values during runtime.
  • #​8355 Improves SyntaxInfo creation through automatic Priority detection (when a Priority is not specified). Tweaks some properties (such as patterns) to be a SequencedCollection rather than a regular Collection. Further, AddonModule now has a required name method to be implemented (as a result, it is no longer a FunctionalInterface). This is a breaking change from 2.13.2. Finally, the newly introduced module method on AddonModule now takes an AddonModule rather than a String.
  • #​8356 Fixes an issue where item stacks could not be used as default expressions.
  • #​8360 Fixes some particle syntax not working as expected.
  • #​8361 Fixes an issue with how event documentation is processed for events registered using legacy methods.
Additions
  • #​7925 Adds the ability to use local axes when offsetting vectors: player's location offset by vector(0, 1, 5) using local axes, where x becomes left/right, y is up/down, and z is forward/back.
  • #​8112 Adds support for specifying named function arguments when calling functions.
  • #​8252 Adds support for obtaining the indices of multiple values at once with the 'indices of value' expression.
  • #​8261 Adds support for obtaining and changing the BlockData of falling blocks.
  • #​8291 Adds support for working with interaction entities.
  • #​8280 Moves 'for-each loops' out of experimental status.
  • #​8314 Adds two expressions for converting colors to and from hex codes: hex code of %colors% and color from hex code %strings%.
  • #​8314 Adds two functions for converting numbers/strings to and from various bases like hexadecimal, octal, or binary: toBase(value: number, base: number) and fromBase(value: string, base: number).
  • #​8323 Adds support for obtaining the 'respawn reason' in a 'respawn' event.
  • #​8328 Adds support for Minecraft 1.21.11.
Changes
  • #​4183 Reworks potion syntax from the ground up. Read more in its dedicated section above.
  • #​8243 Looping using the 'alphabetical sort', 'reversed list', 'shuffled list', 'sorted list', and 'elements' expressions now allow you to reference the looped index using loop-index.
  • #​8280 Marks the Script Reflection experiment as stable (that is, not subject to breaking changes).
  • #​8302 Completely replaces Visual Effects with a new system of particle effects, game effects, and entity effects. Read more in its dedicated section above.
  • #​8320 Adds a negation option to the 'chance' condition: if chance of 50% fails.
  • #​8330 Reworks the 'text display opacity' expression to go from 0 to 255, rather than from -128 to 127.
  • #​8335 Improves loop performance for the 'elements' and 'reversed list' expressions.
  • #​8348 Changes the lang entry for particles effects from particle effect to simply particle to match its code name and docs name.
Bug Fixes
  • #​8243 Fixes an error that occurs when attempting to get the sorted indices of a list with empty values (sublists).
  • #​8243 Fixes an error that occurs when calling a function with two lists with values corresponding to the same keys.
  • #​8313 Fixes an issue where resetting an entity's attributes would use the global default instead of the default for that entity type. e.g. resetting player's walk speed to 0.7 instead of 0.1.
  • #​8315 Fixes an issue where the 'look' effect mistakenly required an entity in some cases (even though it was unused).
  • #​8332 Fixes arithmetic operations used for testing showing up on the documentation site.
  • #​8334 Fixes an error that could occur when attempting to change the 'yaw/pitch' to a non-finite value.
  • #​8343 Fixes an issue where indices of nested lists would contain duplicates.
  • #​8344 Fixes issue with the docs not showing function parameters properly.
API Changes
  • #​8061 Adds tests for entity AI syntaxes.
  • #​8105 Adds experiments and their descriptions to the JSONGenerator.
  • #​8112 Reworks most code related to parsing and calling functions. Some long-deprecated methods and fields have been removed. Please review the pull request overview for further information.
  • #​8224 Migrates the vast majority of syntax examples from the old @Examples annotation to the new @Example annotations.
  • #​8272 Adds the appendIf() utility method to SyntaxStringBuilder.
  • #​8274 Supports w/x/y/z of %object% via the type property WXYZ, if type properties are enabled. Reorganizes the type property handlers to avoid one massive class.
  • #​8300 Adds new utility methods for working with Fields objects.
  • #​8302 Adds a new ParticleEffect class that extends Paper's ParticleBuilder class. Addons should use this class when dealing with particles.
  • #​8303 Removes Java 17 tests (1.20.4).
  • #​8314 Adds a new function paramater Modifier for default functions, Modifier.RANGED. This can be used to limit parameters to a fixed range of values, complete with parse errors if the user uses values out of the range and automatic documentation.
  • #​8314 Ensures that runtime errors emitted during simplification result in parse errors instead. Also fixed an issue where the RuntimeErrorCatcher would not properly remove consumers from the manager.
  • #​8316 Marks the new addon and syntax registration APIs as stable. The existing APIs have been deprecated. See the full announcement above for the complete information.
  • #​8317 Adds a customTest gradle task to allow testing of any combination of environments. Parallelizes tests on GitHub.
  • #​8334 Removes the long-deprecated VectorMath utility class.
  • #​8336 Enables type properties by default. Read more in the dedicated section above.
  • #​8355 Updates some properties of SyntaxInfo (and implementations) to use SequencedCollection rather than Collection. Also adds automatic Priority detection (if not specified) for SyntaxInfo. Also adds a required name method to AddonModule (which is no longer a FunctionalInterface).

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

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)
Damage Sources

Enable by adding using damage sources to your script.

Note that type has been removed as an option for the 'damage cause' expression as damage cause and damage type now refer to different things.

Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more.

Below is an example of what damaging using custom damage sources looks like:

damage all players by 5 using a custom damage source:
	set the damage type to magic
	set the causing entity to {_player}
	set the direct entity to {_arrow}
	set the damage location to location(0, 0, 10)

For more details about the syntax, visit damage source on our documentation website.

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.14.0-pre1: Pre-Release 2.14.0-pre1

Compare Source

Skript 2.14.0-pre1

We are kicking off the new year with the first pre-release for Skript 2.14.0. This release includes dozens of major contributions to enhance Skript's existing features, along with a handful of exciting new features. Major changes means some breaking changes though, so we hope you all forgive us for doing some early spring cleaning (especially with visual effects). Please remember to look through the Breaking Changes section to see if anything impacts you!

In accordance with supporting the last 18 months of Minecraft updates, Skript 2.14.0 supports Minecraft 1.21.0 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.14.0 on January 15th. We may release additional pre-releases before then should the need arise.

Happy Skripting!

Major Changes
Potions Rework

Potion syntax has seen a major rework in order to modernize the syntax and make working with potions a breeze.

Obtaining Potion Effects

Just as before, potion effects can be obtained through syntax like:

set {_potions::*} to the potion effects of the player

However, it is now also possible to obtain specific potion effects:

set {_speed} to the player's speed effect
Potion Creation

Potion creation has been united into a single expression that may optionally be used as a section:

apply an ambient potion effect of speed of tier 5 to the player for 15 seconds:
	hide the particles
	hide the icon

The current effect has been replaced with one for applying potion effects.

Potion Modification

The six primary properties of potion effects are supported: type, duration, amplifier, ambient, particles, and icon.
All of these properties may be modified in the builder (see above).

It is also now possible to modify existing potion effects:

set the amplifier of {_potion} to 5
apply {_potion} to {_entity}

Even better, it is now possible to modify potion effects that are actively applied to entities and items:

set the duration of the player's active speed effect to 5 minutes
set the amplifier of the player's slowness effect to 10
make the potion effects of the player's tool infinite
Hidden Effects

Full support for hidden effects has been implemented too. Hidden effects allow a player to have multiple effects of the same type. For example, if a player has speed 1 for 30 seconds, and is then affected by speed 2 for 15 seconds, after those 15 seconds, the player will have 15 seconds of speed 1 remaining.

Support for obtaining these effects has been implemented:

set {_effects::*} to the player's potion effects # only active effects
set {_effects::*} to the player's active effects # only active effects
set {_effects::*} to the player's hidden effects # only hidden effects
set {_effects::*} to the player's active and hidden effects # all effects

Just as with active effects, hidden effects support being changed too! Note that modifying a hidden effect may result in it taking precedence over the active effect.

Comparisons

Support for more lenient comparisons has been implemented too:

player has speed 10 # checks type, amplifier
player has a potion effect of speed for 30 seconds # checks type, duration

The 'comparison' condition (as in, x is y), can be used for exact comparisons.

These comparisons are also used for removals:

remove speed 10 from the player's potion effects # removed effects must match type, amplifier
remove potion effect of speed for 30 seconds from the player's potion effects # removed effects must match type, duration
Complete Visual Effect Rework

Skript's visual effect system has been in dire need of repair, with limited to no documentation and multiple errors and outdated syntaxes. We've tackled this with a full rework of visual effects, meaning likely all code using visual effects will suffer breaking changes, but it was sadly necessary to get to a better state.

Visual effects are now split into 3 different types: particle effects, game effects, and entity effects. Entity effects are generally animations that can be played on specific entities, like the ravager attack animation effect. Game effects compose a variety of built-in game sounds and/or particle effects, like the combined sound+particles of the composter, or the footstep sound for a specific block. Particle effects are the standard particles you all know and love from /particle. We've overhauled the system to provide easier access to data-driven particles like dust; you can now draw red dust particle at player!

We've also added some syntax to help users better understand and use the admittedly labyrinthine particle api in the form of scale, distribution, and velocity support, rather than simply offset (though you can still set offset manually!).


# sets the random distribution of the particle
set particle distribution of {_flame particle} to vector(1,2,1) 

# set the velocity of the flame particle. 

# Note this only works for 'directional particles' and it will override the random distribution 
# (distribution and special effects like scale/velocity are mutually exclusive)
set the velocity of {_flame particle} to vector(1,2,1) 

# set the scale of the explostion particle. 

# Note this only works for 'scalable particles' (explosion, sweeping edge) and it will override the random distribution 
# (distribution and special effects like scale/velocity are mutually exclusive)
set the scale of {_explosion particle} to 2.5 

Drawing a particle should look more like this, now:

draw 8 red dust particles at player
draw 3 blue trail particles moving to player's target over 3 seconds at player
draw an electric spark particle with velocity vector(1,1,1) at player
draw 10 flame particles with offset vector(1,0,1) with an extra value of 0

set {_particle} to a flame particle
set velocity of {_particle} to vector(0,1,0)
draw 10 of {_particle} at player

Please note that users of SkBee and skript-particles and any other addon dealing with particles will likely need to wait for these addons to be updated to use Skript's particle system instead.

Named Function Arguments

Arguments for functions can now be specified by the name of the argument. This improves clarity with regard to the passed arguments for functions with many parameters.

function multiply(a: number, b: number) returns number:
    return {_a} * {_b}
  
on load:
    assert multiply(1, 2) is 2
    assert multiply(a: 1, b: 2) is 2
    assert multiply(1, b: 2) is 2
    assert multiply(a: 1, 2) is 2
    assert multiply(b: 2, a: 1) is 2

Mixing named and unnamed function arguments is allowed, as long as the order of the function parameters is followed, as specified in the function definition.

function add(a: number, b: number) returns number:
    return {_a} + {_b}
    
on load:
    assert multiply(a: 1, 2) is 2 # allowed! 
    assert multiply(1, b: 2) is 2 # allowed!
    assert multiply(b: 2, 2) is 2 # not allowed!
    assert multiply(2, a: 2) is 2 # not allowed!
For-Each Loop

For loops are now available by default for all users and no longer require opting into the for loops experiment. As a reminder, for loops are a kind of loop syntax that stores the loop index and value in variables for convenience.

This can be used to avoid confusion when nesting multiple loops inside each other.

for {_index}, {_value} in {my list::*}:
    broadcast "%{_index}%: %{_value}%"
for each {_player} in all players:
    send "Hello %{_player}%!" to {_player}

All existing loop features are also available in this section.

Interaction Entities

Syntax has been added for working with interaction entities. There is support for responsiveness and dimensions, along with obtaining the last date an interaction was clicked and the last player to interact.

The syntax is available on our documentation site.

Recursive Expression

Expressions may now return values recursively using recursive %objects%, or combined with the keyed %objects% expression to return its keys recursively as well. This allows Skript to pass entire structures (i.e. lists) around different contexts, like passing a list to a function while retaining indices and sublists, freely.

Note: To avoid cumbersome wording, passing a keyed expression to a function will implicitly pass it recursively as well. For example:

set {_list::a} to "Hello"
set {_list::b} to "World!"
set {_list::sublist::c} to "I'm nested!"

# This behaves the same as the same as 'print_list(recursive keyed {_list::*})'.

# This is only true for function parameter.
print_list(keyed {_list::*})

# Prints:
# a -> Hello

# b -> World!
# sublist::c -> I'm nested!

function print_list(list: objects):
    loop {_list::*}:
        broadcast "%loop-index% -> %loop-value%"

For more information, you can review the pull request.

(API) Registration API Stabilization

The modern addon and syntax registration APIs introduced in 2.10 have moved out of their experimental status. As a result, the APIs being replaced have been deprecated and marked for removal. Due to the significant nature of some of these APIs, they will continue to function. They will not be removed without explicit warnings long in advance.

Detailed API documentation is being finalized and will be available for the full 2.14 release. For now, the pull request overview can be reviewed for further information about the new APIs: #​6246

(API) Type Properties Beta Release

In 2.13 we added a new opt-in system for dealing with common properties that are often sources of conflict with addons, like name of x, or length of y.

These are a way for addons to be able to use the same generic name of x or x contains y syntaxes that Skript does without causing syntax conflicts. You can register your type (ClassInfo) as having a property, such as Property#NAME for name of x, and Skript will automatically allow it to be used in the name of expression.

For more details on how to do this and what else you can do with type properties, see the pull request. We plan on making a more comprehensive API spec/tutorial once the implementation is solidified, but for now the pull request description should be more than sufficient to try it out.

We are now enabling this by default in 2.14 to test it more thoroughly. You will notice a new use type properties option in your config.sk, which can be set to false if you encounter issues with type properties. We do not anticipate issues, but if you encounter them, there's an easy way out! Please make an issue report on GitHub if you do encounter problems, though.

For addon developers, it should be relatively safe to develop with the type properties API now, and we are in the process of preparing detailed documentation for our site.

⚠ Breaking Changes
  • #​4183 With the potion system being rewritten, there have been some breaking changes, specifically around potion creation and application. While we have tried to preserve compatibility, it is possible some syntax combinations may no longer work. Please read the dedicated section above and review our documentation site for full syntax details.
  • #​8302 With the visual effects system being rewritten, there have been changes to nearly all patterns. Please read the dedicated section above and review our documentation site for full syntax details.
  • #​8330 The text opacity expression for text displays has been modified to make it much more intuitive and easier to use. Previously, opacity was as follows:
0 to 3, fully opaque;
4 to 26, fully transparent;
27 to 127, gradually more opaque until half-opaque at 127;
-127 to -1, gradually more opaque from half to fully opaque at -1. 

defaults to -1.

This has been changed to

0 to 3, fully opaque; (this is mojang's fault, don't ask us why!)
4 to 26, fully transparent;
27 to 255, gradually more opaque from transparent to fully opaque at 255.

defaults to 255

The expression can still be set to values between -1 and -128, which correspond to 255 to 128 respectively, but the returned value will be positive and add/subtract will not allow opacity to leave the 0-255 range.

Changelog
Additions
  • #​7925 Adds the ability to use local axes when offsetting vectors: player's location offset by vector(0, 1, 5) using local axes, where x becomes left/right, y is up/down, and z is forward/back.
  • #​8112 Adds support for specifying named function arguments when calling functions.
  • #​8252 Adds support for obtaining the indices of multiple values at once with the 'indices of value' expression.
  • #​8261 Adds support for obtaining and changing the BlockData of falling blocks.
  • #​8291 Adds support for working with interaction entities.
  • #​8280 Moves 'for-each loops' out of experimental status.
  • #​8314 Adds two expressions for converting colors to and from hex codes: hex code of %colors% and color from hex code %strings%.
  • #​8314 Adds two functions for converting numbers/strings to and from various bases like hexadecimal, octal, or binary: toBase(value: number, base: number) and fromBase(value: string, base: number).
  • #​8323 Adds support for obtaining the 'respawn reason' in a 'respawn' event.
  • #​8328 Adds support for Minecraft 1.21.11.
Changes
Bug Fixes
  • #​8243 Fixes an error that occurs when attempting to get the sorted indices of a list with empty values (sublists).
  • #​8243 Fixes an error that occurs when calling a function with two lists with values corresponding to the same keys.
  • #​8313 Fixes an issue where resetting an entity's attributes would use the global default instead of the default for that entity type. e.g. resetting player's walk speed to 0.7 instead of 0.1.
  • #​8315 Fixes an issue where the 'look' effect mistakenly required an entity in some cases (even though it was unused).
  • #​8332 Fixes arithmetic operations used for testing showing up on the documentation site.
  • #​8334 Fixes an error that could occur when attempting to change the 'yaw/pitch' to a non-finite value.
API Changes
  • #​8061 Adds tests for entity AI syntaxes.
  • #​8105 Adds experiments and their descriptions to the JSONGenerator.
  • #​8112 Reworks most code related to parsing and calling functions. Some long-deprecated methods and fields have been removed. Please review the pull request overview for further information.
  • #​8224 Migrates the vast majority of syntax examples from the old @Examples annotation to the new @Example annotations.
  • #​8272 Adds the appendIf() utility method to SyntaxStringBuilder.
  • #​8274 Supports w/x/y/z of %object% via the type property WXYZ, if type properties are enabled. Reorganizes the type property handlers to avoid one massive class.
  • #​8300 Adds new utility methods for working with Fields objects.
  • #​8302 Adds a new ParticleEffect class that extends Paper's ParticleBuilder class. Addons should use this class when dealing with particles.
  • #​8303 Removes Java 17 tests (1.20.4).
  • #​8314 Adds a new function paramater Modifier for default functions, Modifier.RANGED. This can be used to limit parameters to a fixed range of values, complete with parse errors if the user uses values out of the range and automatic documentation.
  • #​8314 Ensures that runtime errors emitted during simplification result in parse errors instead. Also fixed an issue where the RuntimeErrorCatcher would not properly remove consumers from the manager.
  • #​8316 Marks the new addon and syntax registration APIs as stable. The existing APIs have been deprecated. See the full announcement above for the complete information.
  • #​8317 Adds a customTest gradle task to allow testing of any combination of environments. Parallelizes tests on GitHub.
  • #​8334 Removes the long-deprecated VectorMath utility class.
  • #​8336 Enables type properties by default. Read more in the dedicated section above.

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

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)
Damage Sources

Enable by adding using damage sources to your script.

Note that type has been removed as an option for the 'damage cause' expression as damage cause and damage type now refer to different things.

Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more.

Below is an example of what damaging using custom damage sources looks like:

damage all players by 5 using a custom damage source:
	set the damage type to magic
	set the causing entity to {_player}
	set the direct entity to {_arrow}
	set the damage location to location(0, 0, 10)

For more details about the syntax, visit damage source on our documentation website.

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.13.2: Patch Release 2.13.2

Compare Source

Skript 2.13.2

Supports: Paper 1.20.4 - 1.21.10

Today, we are releasing Skript 2.13.2 to resolve some various issues found with Skript 2.13, as well as solving a few older bugs.

We have also revamped our contributor guide to be much more beginner-friendly, so now's a great time to try making your first PR! For existing contributors, please note the addition of the AI usage disclosure requirement for PRs:

If you relied on AI assistance to make a pull request, you must disclose it in the
pull request, together with the extent of the usage.

As always, you can report any issues on our issue tracker.

Happy Skripting!

Changelog
Additions / Changes
  • #​8285 Improves variable thread safety, preventing race conditions and conflicts when accessing variables on parallel threads.
  • #​8286 Adds 'child' as an option for the 'make adult/baby' effect.
  • #​8294 Updates contribution guidelines and adds AI disclosure requirement
Bug Fixes
  • #​8250 Fixes an issue where functions could be unloaded prior to the 'on unload' event firing, leading to Skript being unable to resolve function calls.
  • #​8263 Fixes issues with do-whiles not running properly in concurrent scenarios.
  • #​8271 Ensures legacy syntax infos have reference to their modern counterparts to support modern features like suppliers.
  • #​8278 Fixes vague and unclear errors when attempting to parse regions that do not exist or are ambiguous.
  • #​8284 Fixes an issue where on brew complete was not a valid pattern, but on brew complet was.
  • #​8293 Makes the auto-reload player name input case-insensitive.
  • #​8295 Fix an issue that prevented the use of past and future when using the level of player in the level change event.
  • #​8299 Fixes a bug where a delay in one event trigger could affect the behavior of another trigger of the same event that was parsed later on.
  • #​8304 Fixes an issue where a warning would be displayed when using an empty variable for cooldown storage.

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

Enable by adding using for loops to your script.

A new kind of loop syntax that stores the loop index and value in variables for convenience.

This can be used to avoid confusion when nesting multiple loops inside each other.

for {_index}, {_value} in {my list::*}:
    broadcast "%{_index}%: %{_value}%"
for each {_player} in all players:
    send "Hello %{_player}%!" to {_player}

All existing loop features are also available in this section.

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)
Damage Sources

Enable by adding using damage sources to your script.

Note that type has been removed as an option for the 'damage cause' expression as damage cause and damage type now refer to different things.

Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more.

Below is an example of what damaging using custom damage sources looks like:

damage all players by 5 using a custom damage source:
	set the damage type to magic
	set the causing entity to {_player}
	set the direct entity to {_arrow}
	set the damage location to location(0, 0, 10)

For more details about the syntax, visit damage source on our documentation website.

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.

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:

  • @​erenkarakal
  • @​ericd590 First contribution!
  • @​HarshMehta112 First contribution!
  • @​JakeGBLP
  • @​sovdeeth
  • @​TFSMads
  • @​UnderscoreTud First contribution!

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.13.1: Patch Release 2.13.1

Compare Source

Skript 2.13.1

Today, we are releasing Skript 2.13.1 to resolve some of the most common issues reported with Skript 2.13.0.

As always, you can report any issues on our issue tracker.

Happy Skripting!

Changelog
Additions / Changes
  • #​8225 Added support for using a list of strings in the text of expression.
  • #​8226 Adds support for using closest as an alias in the 'nearest entity' expression.
Bug Fixes
  • #​8221 Fixes an issue where functions with one plural parameter that has default values would cause an exception when the default values were used.
  • #​8240 Removes legacy code used in the bucket events, preventing Skript from loading legacy material support and causing a temporary server freeze.
  • #​8242 Fixes an extraneous the in the 'tablisted players' expression.
  • #​8245 Fixes an issue with matching functions that have a single list parameter.
  • #​8248 Fixes an issue with how the 'has scoreboard tag' condition handled OR inputs.
  • #​8249 Fixes an issue where the name of blocks (such as chests) would not carry over when those blocks were placed.

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

Click to reveal the experiments available in this release
For-Each Loop

Enable by adding using for loops to your script.

A new kind of loop syntax that stores the loop index and value in variables for convenience.

This can be used to avoid confusion when nesting multiple loops inside each other.

for {_index}, {_value} in {my list::*}:
    broadcast "%{_index}%: %{_value}%"
for each {_player} in all players:
    send "Hello %{_player}%!" to {_player}

All existing loop features are also available in this section.

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)
Damage Sources

Enable by adding using damage sources to your script.

Note that type has been removed as an option for the 'damage cause' expression as damage cause and damage type now refer to different things.

Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more.

Below is an example of what damaging using custom damage sources looks like:

damage all players by 5 using a custom damage source:
	set the damage type to magic
	set the causing entity to {_player}
	set the direct entity to {_arrow}
	set the damage location to location(0, 0, 10)

For more details about the syntax, visit damage source on our documentation website.

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.

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:

  • @​AfkUserMC First contribution!
  • @​CJH3139
  • @​CrebsTheCoder First contribution!
  • @​Efnilite
  • @​sovdeeth
  • @​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.

v2.13.0: Feature Release 2.13.0

Compare Source

Skript 2.13.0

Today, we are excited to release Skript 2.13.0. This release includes a handful of new features, bug fixes, and behind-the-scenes API improvements to play with. For addon developers, we strongly recommend reviewing the Type Properties section below.

Please also note our changes to the supported versions. 2.13 will be 1.20.4+, and 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.13.1 on November 1st. We may release emergency patches before then should the need arise.

Happy Skripting!

Changes to Supported Versions and Platforms

As announced with 2.12, we have updated our policy for supported versions. Going forward, Skript will guarantee support for the last 18 months of Minecraft releases. This means 2.13 will be 1.20.4+, while 2.14 will be 1.21+.

Additionally, with Paper forking itself from Spigot, it has become increasingly difficult to support both platforms. As a result, this version of Skript has dropped support for Spigot. Skript now requires Paper or a downstream fork of Paper, such as Purpur or Pufferfish.

Major Changes
Equippable Components (Experimental)

Added in #​7194

[!NOTE]
This feature is currently experimental and can be used by enabling the equippable components experiment.

Equippable components allow 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}
Automatic Reloading

Added in #​7464

A new Structure has been added that enables automatic reloading of a script when it is updated (e.g. the file is saved). This feature is only supported if asynchronous loading is enabled in Skript's configuration file (config.sk).

automatically reload this script:
    recipients: "Sahvde" # The names or uuids of players who, apart from console, will see the success/error messages in chat.
OR
auto reload:
    permission: myserver.see_auto_reloads # all players with this permission will see the messages.
Debug Information Expression

Added in #​8207

A new expression that returns additional information about a value has been added. Currently, this consists of the value itself and its class, though this is subject to change in the future.

set {my_list::*} to 1, "2", and vector(1, 2, 3)
broadcast debug info of {my_list::*}

# prints:
# 1 (integer)

# "2" (text)
# x: 1, y: 2, z: 3 (vector)
Type Properties (Experimental)

Added in #​8165

Included in 2.13 is an experimental opt-in API for what we're tenatively calling 'type properties'. These are a way for addons to be able to use the same generic name of x or x contains y syntaxes that Skript does without causing syntax conflicts. You can register your type (ClassInfo) as having a property, such as Property#NAME for name of x, and Skript will automatically allow it to be used in the name of expression. For more details on how to do this and what else you can do with type properties, see the PR. We plan on making a more comprehensive API spec/tutorial once the implementation is solidified, but for now the PR description should be more than sufficient to try it out.

However, since this is still experimental and not well tested, it requires a secret config option to enable. To activate property syntaxes, add the line use type properties: true somewhere in your config.sk. Without it, Skript will still use the old syntaxes for things like name of. We hope you try out this new API and give us feedback on what works, what doesn't, and what you'd like to see for its full release in 2.14. The number of property-driven syntaxes is rather small, but we plan on adding many more in the coming months!

⚠ Breaking Changes
  • #​7985 Changes the method signature for the abstract EntityData#init. Adds parameter matchedCodeName and refactors matchedPattern.
  • #​8072 Enforces using physics instead of physic in the block update effect.
Changelog
Additions
Changes
  • #​8072 Enforces using physics instead of physic in the block update effect.
Bug Fixes
  • #​7985 Fixes being unable to spawn certain entities in certain states, such as red fox and snow fox.
  • #​8064 Fixes an issue where it was not possible to spawn a minecart.
  • #​8177 Fixes the 'cannot reset' and 'cannot delete' error messages of the 'change' effect being swapped around.
  • #​8182 Fixes an issue where variable changes across multiple threads could be processed in the wrong order, resulting in data loss.
  • #​8185 Fixes the 'system time' event not triggering on the main thread.
  • #​8189 Fixes an issue where function calls with a single parameter to functions with 0 required parameters would fail to parse.
  • #​8195 Fixes an issue where the 'catch runtime errors' section would stop catching errors after the default error limit was reached.
  • #​8199 Fixes an issue where functions could not use Expression Sections.
  • #​8232 Fixes an issue where Expression Sections did not work properly with Effect Sections (used as an Effect).
API Changes
  • #​7797 Uses project.testEnv in build.gradle instead of updating the latest version for both.
  • #​7985 Changes Pattern to allow providing null as the object for generic usage.
  • #​8011 Exposes the script loader executor via the Task api.
  • #​8035 Adds support for using an EntryData multiple times.
  • #​8065 Adds support for custom operators.
  • #​8116 Makes JSONGenerator available for addons and updates the docs.json format.
  • #​8120 Adds a method to get a Color as an ARGB integer.
  • #​8138 Adds getting pattern combinations from PatternElement and tests to catch possible pattern conflicts.
  • #​8150 Adds SimplifiedCondition for constant conditions. Condition implements Simplifiable.
  • #​8165 Adds the Type Property API.
  • #​8180 Changes the parameter name for Expression class from expressionType to expressionClass in Skript#registerExpression.
  • #​8195 Improves runtime error filtering with the introduction of RuntimeErrorFilter, which allows different consumers to apply different levels of filtering to the errors they print.
  • #​8201 Adds support for excluding packages from being loaded in ClassLoader.
  • #​8211 Improves the classes ExpressionList returns for acceptChange to more accurately reflect the changers of the expressions within the list.
  • #​8213 Fixes Functions#getJavaFunctions to only return JavaFunctions.
  • #​8235 Adds additional null safety checks around certain API classes.

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

Click to reveal the experiments available in this release
For-Each Loop

Enable by adding using for loops to your script.

A new kind of loop syntax that stores the loop index and value in variables for convenience.

This can be used to avoid confusion when nesting multiple loops inside each other.

for {_index}, {_value} in {my list::*}:
    broadcast "%{_index}%: %{_value}%"
for each {_player} in all players:
    send "Hello %{_player}%!" to {_player}

All existing loop features are also available in this section.

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)
Damage Sources

Enable by adding using damage sources to your script.

Note that type has been removed as an option for the 'damage cause' expression as damage cause and damage type now refer to different things.

Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more.

Below is an example of what damaging using custom damage sources looks like:

damage all players by 5 using a custom damage source:
	set the damage type to magic
	set the causing entity to {_player}
	set the direct entity to {_arrow}
	set the damage location to location(0, 0, 10)

For more details about the syntax, visit damage source on our documentation website.

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.13.0-pre1: Pre-Release 2.13.0-pre1

Compare Source

Skript 2.13.0-pre1

Hi all, we've got a new feature pre-release for you all. Thankfully, this one's a bit more reasonable in size than the massive releases of 2.10, 2.11, and 2.12. We have some great features and a bunch of behind-the-scenes API improvements for you this go around. Addon developers should pay special attention to the Type Properties section below.

Please also note our changes to the supported versions. 2.13 is 1.20.4+, and Paper only.

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

Happy Skripting!

Changes to Supported Versions and Platforms

As announced with 2.12, we have updated our policy for supported versions. Going forward, Skript will guarantee support for the last 18 months of Minecraft releases. This means 2.13 is 1.20.4+, while 2.14 will be 1.21+.

Additionally, with Paper forking itself from Spigot, it has become increasingly difficult to support both platforms. As a result, this version of Skript is dropping support for Spigot. Skript now requires Paper or a downstream fork of Paper, such as Purpur or Pufferfish.

Major Changes
  • #​7194 Adds support for equippable components and all correlating data. Smurfy put in a lot of work into the backing API for components, so look forward to a lot more component support in the next few releases!
set the allowed entities of {_item} to a zombie and a skeleton
make {_item} lose durability when hurt
if {_item} can be dispensed:
	add "Dispensable" to lore of {_item}
  • #​7464 Adds a structure that allows a script to be automatically reloaded when it is saved, if async loading is enabled in config.sk:
automatically reload this script:
    recipients: "Sahvde" # The names or uuids of players who, apart from console, will see the success/error messages in chat.
OR
auto reload:
    permission: myserver.see_auto_reloads # all players with this permission will see the messages.
  • #​8165 Adds Type Property API. See below.
  • #​8207 Adds a debug info expression that prints out extra information about a value. Currently this consists of the value itself and its class, though this is subject to expansion in the future!
set {my_list::*} to 1, "2", and vector(1, 2, 3)
broadcast debug info of {my_list::*}

# prints:
# 1 (integer)

# "2" (text)
# x: 1, y: 2, z: 3 (vector)
Type Properties (For Addon Devs)

Included in 2.13 is an experimental opt-in API for what we're tenatively calling 'type properties'. These are a way for addons to be able to use the same generic name of x or x contains y syntaxes that Skript does without causing syntax conflicts. You can register your type (ClassInfo) as having a property, such as Property#NAME for name of x, and Skript will automatically allow it to be used in the name of expression. For more details on how to do this and what else you can do with type properties, see the PR. We plan on making a more comprehensive API spec/tutorial once the implementation is solidified, but for now the PR description should be more than sufficient to try it out.

However, since this is still experimental and not well tested, it requires a secret config option to enable. To activate property syntaxes, add the line use type properties: true somewhere in your config.sk. Without it, Skript will still use the old syntaxes for things like name of. We hope you try out this new API and give us feedback on what works, what doesn't, and what you'd like to see for its full release in 2.14. The number of property-driven syntaxes is rather small, but we plan on adding many more in the coming months!

⚠ Breaking Changes
  • #​7985 Changes the method signature for the abstract EntityData#init. Adds parameter matchedCodeName and refactors matchedPattern.
  • #​8072 Enforces using physics instead of physic in the block update effect.
Changelog
Additions
  • #​7194 Adds support for equippable components and all correlating data.
  • #​7275 Adds elements for brewing stands such as brewing stand slots, fuel, time, and events.
  • #​7464 Adds a structure that allows a script to be automatically reloaded when it is saved, if async loading is enabled in config.sk.
  • #​7888 Adds an expression to get the midpoint between two locations or vectors.
  • #​7985 Adds a condition to check if an entity is spawnable in a world.
  • #​8008 Adds literals for the maximum and minimum numerical values, such as longs, doubles, or ints.
  • #​8101 Adds an expression to get and modify the players listed in the tab menu for a given player.
  • #​8113 Adds the ability to enchant an item at as a specific level, as if an enchanting table was used.
  • #​8134 Adds an expression to get the duration an entity has been alive for.
  • #​8207 Adds a debug info expression that prints out extra information about a value. Currently this consists of the value itself and its class, though this is subject to expansion in the future!
Changes
  • #​7797 Uses project.testEnv in build.gradle instead of updating the latest version for both.
  • #​7878 Allows specifying the amount of damage in the force entity to attack entity effect.
  • #​8072 Enforces using physics instead of physic in the block update effect.
  • #​8092 Allows using vehicle alone in the mount event.
  • #​8196 Adds a runtime error when attempting to get the distance between locations in different worlds.
  • #​8197 Adds support for changing the event-location for on portal.
  • #​8206 Adds a runtime error when using the sort effect and mapping the input to a null value, which cannot be sorted.
Bug Fixes
  • #​7985 Fixes being unable to spawn certain entities in certain states, such as red fox and snow fox.
  • #​8064 Fixes an issue where it was not possible to spawn a minecart.
  • #​8177 Fixes the 'cannot reset' and 'cannot delete' error messages being swapped around.
  • #​8182 Fixes the order of which queued variable changes are processed.
  • #​8185 Fixes at %time% [in] real time by triggering the code on the main thread.
  • #​8189 Fixes functions with 0 required parameters.
  • #​8195 Fixes an issue where the runtime error catching section would not catch errors after the default error limit is reached.
  • #​8199 Fixes issues with expression sections not claiming sections when used as function parameters.
API Changes
  • #​7985 Changes Pattern to allow providing null as the object for generic usage.
  • #​8011 Exposes the script loader executor via the Task api.
  • #​8035 Adds support for using an EntryData multiple times.
  • #​8065 Adds support for custom operators.
  • #​8116 Makes JSONGenerator available for addons and updates the docs.json format.
  • #​8120 Adds a method to get a Color as an ARGB integer.
  • #​8138 Adds getting pattern combinations from PatternElement and tests to catch possible pattern conflicts.
  • #​8150 Adds SimplifiedCondition for constant conditions. Condition implements Simplifiable.
  • #​8165 Adds the Type Property API.
  • #​8180 Changes the parameter name for Expression class from expressionType to expressionClass in Skript#registerExpression.
  • #​8195 Improves runtime error filtering with the introduction of RuntimeErrorFilter, which allows different consumers to apply different levels of filtering to the errors they print.
  • #​8201 Adds support for excluding packages from being loaded in ClassLoader.
  • #​8211 Improves the classes ExpressionList returns for acceptChange to more accurately reflect the changers of the expressions within the list.
  • #​8213 Fixes Functions#getJavaFunctions to only return JavaFunctions.

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

Click to reveal the experiments available in this release
For-Each Loop

Enable by adding using for loops to your script.

A new kind of loop syntax that stores the loop index and value in variables for convenience.

This can be used to avoid confusion when nesting multiple loops inside each other.

for {_index}, {_value} in {my list::*}:
    broadcast "%{_index}%: %{_value}%"
for each {_player} in all players:
    send "Hello %{_player}%!" to {_player}

All existing loop features are also available in this section.

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)
Damage Sources

Enable by adding using damage sources to your script.

Note that type has been removed as an option for the 'damage cause' expression as damage cause and damage type now refer to different things.

Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more.

Below is an example of what damaging using custom damage sources looks like:

damage all players by 5 using a custom damage source:
	set the damage type to magic
	set the causing entity to {_player}
	set the direct entity to {_arrow}
	set the damage location to location(0, 0, 10)

For more details about the syntax, visit damage source on our documentation website.

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.12.2: Patch Release 2.12.2

Compare Source

Skript 2.12.2

Today, we are releasing Skript 2.12.2 to continue resolving issues reported with 2.12.

As always, you can report any issues on our issue tracker.

Happy Skripting!

Changelog
Bug Fixes
  • #​8077 Fixes an issue where using entities with the second 'play effect' pattern was not possible.
  • #​8098 Implements type-aware function parsing to fix issues where function calls could not be parsed as the correct functions.
  • #​8109 Fixes an issue where the 'loop value' expression sometimes failed to evaluate when used with other expressions.
  • #​8135 Fixes issues with function parsing related to loading and having singular default values.
  • #​8151 Removes an errant colon in the examples for the fire resistance effect.
  • #​8164 Fixes an exception being thrown for some uses of the %classinfo% input expression.
  • #​8147 Fixes a bug where an else section was considered delayed due to a delay in its if section.
  • #​8171 Fixes parsing order issue with reversed 2 times by only allowing plural inputs to reversed %objects%.
API/Development
  • #​8041 Exposes BukkitUtils#getRegistryClassInfo() to assist with creating types backed by Bukkit or Paper registries.
  • #​8121 Allows null inputs to Direction.combine().
  • #​8132 Loosens generics for EntryDataExpression from T to ? extends T to allow for subtypes for the default values.
  • #​8145 Prioritizes Skript syntaxes before addon-provided syntaxes when ordering syntaxes of the same priority.
  • #​8154 Ensures the possible return types for ExpressionList are accurate after use of getConvertedExpression().
  • #​8158 Makes SectionContext and SectionContext#modify() public for addon use.

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

Enable by adding using for loops to your script.

A new kind of loop syntax that stores the loop index and value in variables for convenience.

This can be used to avoid confusion when nesting multiple loops inside each other.

for {_index}, {_value} in {my list::*}:
    broadcast "%{_index}%: %{_value}%"
for each {_player} in all players:
    send "Hello %{_player}%!" to {_player}

All existing loop features are also available in this section.

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)
Damage Sources

Enable by adding using damage sources to your script.

Note that type has been removed as an option for the 'damage cause' expression as damage cause and damage type now refer to different things.

Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more.

Below is an example of what damaging using custom damage sources looks like:

damage all players by 5 using a custom damage source:
	set the damage type to magic
	set the causing entity to {_player}
	set the direct entity to {_arrow}
	set the damage location to location(0, 0, 10)

For more details about the syntax, visit damage source on our documentation website.

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:

  • @​Absolutionism
  • @​APickledWalrus
  • @​arpita2525 First contribution!
  • @​JakeGBLP
  • @​sovdeeth
  • @​TheLimeGlass

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.12.1: Patch Release 2.12.1

Compare Source

Skript 2.12.1

Today, we are releasing Skript 2.12.1 to resolve some of the most common issues reported with Skript 2.12.0. This release includes support for Minecraft 1.21.8.

As always, you can report any issues on our issue tracker.

Happy Skripting!

Changelog
Additions / Changes
  • #​8009 Adds launch as an alternative keyword for the 'shoot' event.
  • #​8010 Adds support for checking whether an entity has any potion effects using the 'has potion' condition.
  • #​8054 Adds support for Minecraft 1.21.8
  • #​8076 Further tweaks the default syntax ordering to improve performance and error messages.
Bug Fixes
  • #​8043 Fixes being able to wait for an indefinite amount of time.
  • #​8046 Fixes an issue where attempting to register overloaded functions with an argument type of one function being convertable to an argument type of another failed.
  • #​8068 Fixes an issue where literal specification could be too eager and fail with function parameters.
  • #​8069 Fixes an issue where looping over all item types could result in an error on newer versions.
  • #​8071 Fixes an issue where valid arguments for a single list parameter function sometimes failed to resolve to that function.
  • #​8081 Fixes an issue where seemingly non-literal inputs for the 'x of item/entity type' expression caused the syntax to fail to parse.
  • #​8082 Fixes an issue where valid statements including a section expression could fail to parse.
  • #​8086 Fixes an issue where harnesses could not be equipped onto happy ghasts.
  • #​8087 Fixes edge-case errors that could occur from rounding.
  • #​8088 Fixes a few minor typographical errors in the configuration.
  • #​8089 Fixes an issue where default expressions could fail to be used.
  • #​8090 Fixes an issue where the 'loop value' expression was too accepting of loop-X inputs for specific types.
  • #​8096 Fixes an issue where single list parameter functions were always chosen over functions with a specific number of parameters of the same type.
API/Development
  • #​8000 Improves the testing assertion output for the 'contains' condition.
  • #​8066 Fixes an issue where the project's checkstyle configuration incorrectly treated tab width.

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

Click to reveal the experiments available in this release
For-Each Loop

Enable by adding using for loops to your script.

A new kind of loop syntax that stores the loop index and value in variables for convenience.

This can be used to avoid confusion when nesting multiple loops inside each other.

for {_index}, {_value} in {my list::*}:
    broadcast "%{_index}%: %{_value}%"
for each {_player} in all players:
    send "Hello %{_player}%!" to {_player}

All existing loop features are also available in this section.

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)
Damage Sources

Enable by adding using damage sources to your script.

Note that type has been removed as an option for the 'damage cause' expression as damage cause and damage type now refer to different things.

Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more.

Below is an example of what damaging using custom damage sources looks like:

damage all players by 5 using a custom damage source:
	set the damage type to magic
	set the causing entity to {_player}
	set the direct entity to {_arrow}
	set the damage location to location(0, 0, 10)

For more details about the syntax, visit damage source on our documentation website.

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:

  • @​Absolutionism
  • @​APickledWalrus
  • @​Efnilite
  • @​Pesekjak
  • @​sovdeeth
  • @​sweetestpiper First contribution!
  • @​TheLimeGlass

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.12.0: Feature Release 2.12.0

Compare Source

Skript 2.12.0

2.12.0 is here! Please excuse the later release time, Pickle's on vacation! We've got a bounty of new features, changes, and bug fixes for you in Skript 2.12, along with early support for 1.21.6/7.

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.12.1 on August 1st. We may release emergency patches before then should the need arise.

We would also like to welcome a new addition to the team, @​Absolutionism!

Happy Skripting!

Changes to Supported Versions and Platforms

Back in 2.10, we switched to supporting the last three major versions. While reasonable at the time, Mojang has continued to make significant changes between minor versions and seems to have shyed away from incrementing the major version counter. In order to reduce the development burden of supporting so many versions with different features, as of 2.13 (next release) we have decided to switch to supporting the last 18 months of Minecraft releases. This means as of 2.13, Skript will support 1.20.4 and newer. 2.14 will be 1.21.0 and newer. We hope this change will allow us to modernize Skript more quickly and more fully support new systems like item components going forward. To clarify, 2.12 still supports 1.19.4+. These changes will affect 2.13 and later.

In the same vein, Paper has recently completed its fork away from Spigot. We have aimed to maintain support for both versions so far, but we are running into issues where the API differences between Paper and Spigot are becoming too great. It is not feasible for us to develop two parallel versions of Skript, and as a result, we will be dropping support for Spigot starting with 2.13. We encourage the small portion of our users who are still using Spigot to upgrade to Paper if possible.

Major Changes
Ephemeral Variables

Ephemeral variables (or ram vars, or memory vars) are now fully implemented by default for all users. These are global variables that are not saved between restarts. To make a variable ephemeral, add a hyphen (-) to the start of its name: {-var}. These variables are about 2.5x faster to change compared to normal global variables. You do not need to do anything to enable them.

Function Overloading

[!NOTE]
The script reflection experiment, which includes syntax for dynamically referencing and executing functions, does not yet support working with overloaded functions.

Function overloading enables creating functions that have the same name but different parameters types/parameter counts.

function send_welcome(p: player):
	send_welcome({_p}, false)

function send_welcome(p: player, first_time: boolean):
	if {_first_time} is true:
            send "Welcome to our server for the first time, %name of {_p}%!" to {_p}
        else:
            send "Welcome back to our server, %name of {_p}%!" to {_p}
    
Local Variable Type Hints (Experimental)

[!NOTE]
This feature is currently experimental and can be used by enabling the type hints experiment.

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 (Experimental)

[!NOTE]
This feature is currently experimental and can be used by enabling the error catching experiment.

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)
Damage Sources (Experimental)

[!NOTE]
This feature is currently experimental and can be used by enabling the damage sources experiment.

[!CAUTION]
Note that type has been removed as an option for the 'damage cause' expression as damage cause and damage type now refer to different things.

Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more.

Below is an example of what damaging using custom damage sources looks like:

damage all players by 5 using a custom damage source:
	set the damage type to magic
	set the causing entity to {_player}
	set the direct entity to {_arrow}
	set the damage location to location(0, 0, 10)

For more details about the syntax, visit damage source on our documentation website.

Contributing Updates

We are now allowing contributors to release their code contributions under the more-permissive MIT License. For more information, please review our LICENSING.md file.

⚠ Breaking Changes
  • When using index of "a" in "b", values that do not appear in the second string will now return none instead of the previous -1.
  • The is enchanted with condition now looks for exact levels instead of the specified level or better. Old behavior can be replicated with if {_item} is enchanted with sharpness 2 or better. Some examples:
if {_item} is enchanted with sharpness 2 # only passes for sharpness 2. Previous behavior allowed sharpness of 2 or greater to pass.
if {_item} is enchanted with sharpness 2 or better # sharpness 2+
if {_item} is enchanted with sharpness 2 or worse # sharpness 2 or 1
if {_item} is enchanted with sharpness # sharpness of any level
  • An infinite timespan literal was added, meaning Timespan math operations can now result in an infinite timespan value (just like numbers).
  • The parsing behavior of the 'amount' expression has changed. Given an expression like amount of {a::*}, "b", it was before parsed as (amount of {a::*}), "b", but it is now parsed as amount of ({a::*}, "b"). Use parentheses as necessary to clarify your intent.
  • For the old 'beacon values' expression, beacon is now a required keyword for the range and tier expressions.
  • The remove all changer for the 'custom model data' expression has been removed. It functioned the same as remove.
  • head has been removed as an option for the 'player skull' expression as head of player conflicts with the 'head location' expression.
  • type has been removed as an option for the 'damage cause' expression as damage cause and damage type now refer to different things.
  • The 'load world' effect now requires world.
  • The API method RegistryParser#getAllNames has been removed in favor of RegistryParser#getCombinedPatterns (from the PatternedParser interface).
  • API methods for the since documentation field have changed on SkriptEventInfo:
    • SkriptEventInfo#getSince() (String) -> SkriptEventInfo#getSince() (String[])
    • BukkitSyntaxInfos.Event.since() (String) -> BukkitSyntaxInfos.Event.since() (Collection<String>)
    • BukkitSyntaxInfos.Event.Builder.since(String) -> BukkitSyntaxInfos.Event.Builder.addSince(String)
  • (API) Syntax ordering is no longer based on registration order when a priority is shared. This may expose syntax conflicts if this behavior was depended on.
Changelog
Additions
  • #​4154 Adds support for boolean values to the 'toggle' effect and an 'inverse boolean' expression to obtain the inverse of a boolean (at long last).
  • #​6902 Adds a 'buried item' expression and a 'dusted stage' expression for working with brushable blocks.
  • #​7495 Adds ephemeral variables (starting with -) which are cleared when the server restarts.
  • #​7561 Adds an 'except' expression which provides a simple way to filter values from a list.
  • #​7658 Adds an 'On-screen kick message' expression to get and change the on-screen message that appears when a user is kicked, usable in the kick event.
  • #​7685 Adds support for the Catalan language (thanks to @​TwistedWar3713, @​Lukarius11, and @​ItzDuck364 for their language insights).
  • #​7707 Adds support for the 'item cooldown' syntax to respect cooldown groups (cooldown components) defined on items.
  • #​7738 Adds an 'exact item' expression that acts like creative-mode middle-click, copying the block's data exactly.
  • #​7745 Adds a 'vault display item' event for when a trial vault displays an item.
  • #​7746 Adds a 'villager career change' event for when villagers change professions along with the ability to obtain the reason why.
  • #​7748 Adds a condition and effect for working with shivering striders.
  • #​7751 Adds support for function overloading, enabling functions to have the same name but different parameters.
  • #​7803 Adds the word along as an option in the 'push' effect: push player along vector(1,1,1) at speed 3.
  • #​7807 Adds support for using the expanded custom model data system to the 'custom model data' expression. Note that remove all changer support has been removed.
  • #​7808 Adds a warning for ambiguous command arguments where expressions like arg-1 could be misinterpreted as (arg) - 1.
  • #​7823 Adds experimental syntax for catching and suppressing runtime errors. See the available experiments section below for more information.
  • #​7830 Adds support for printing errors to the 'enable/disable/unload/reload script' effect.
  • #​7841 Adds support for syntax simplification, which enables parse time pre-computation of some syntax that will always have the same result.
  • #​7846 Adds support for the new 1.21.5 pig variants.
  • #​7851 Adds a warning for when literals that can be interpeted as multiple types are used and Skript cannot determine the intended type.
  • #​7858 Adds error messages for experimental syntax that is used when the experiment is disabled.
  • #​7866 Adds support for cow variants.
  • #​7868 Adds support for chicken variants.
  • #​7892 Adds experimental support for local variable type hints. This allows Skript to determine what kind of values your local variables may hold at parse time. See the available experiments section below for more information.
  • #​7897 Expands the 'arrow attached block' expression to support multiple blocks, as arrows may be attached to multiple blocks. The existing single expression has been deprecated on versions where the plural expression is available, as it is unreliable.
  • #​7903 Adds a 'harvest block' event for when a block is harvested (berry bushes, glowberries, etc.).
  • #​7905 Adds a new event-entity type event value for entity related events.
  • #​7906 Adds saddle and dynamic equipment slot support to the 'armor slot' expression.
  • #​7909 Adds a 'keyed' expression which allows explicitly passing/including the keys of an expression alongside its values. For example, you can preserve/include keys (indices) when setting a list variable to another list variable or when providing a list variable as the argument of a function.
  • #​7914 Adds a 'first empty slot in inventory' expression to obtain the first empty slot in inventories.
  • #​7933 Adds scientific notation (e.g. 1.23E4, 10e-10) to numbers.
  • #​7942 Function names can now start with an underscore.
  • #​7949 Adds support for resetting sent block changes from the 'send block change' effect.
  • #​7950 Adds support to the 'push' effect for pushing/pulling entitites towards/away from a location.
  • #​7951 Adds support for deleting the 'spawner type' of a spawner.
  • #​7956 Adds support for an 'infinite' timespan. Note that now, just like numbers, math operations for Timespans can now result in an infinite timespan value.
  • #​7957/#​7982/#​7983 Implement early support for 1.21.6/7.
  • #​7961 Adds support for literals in the 'amount' expression. Note that, as a result, the parsing behavior has now changed. Given an expression like amount of {a::*}, "b", it was before parsed as (amount of {a::*}), "b", but it is now parsed as amount of ({a::*}, "b"). Use parentheses as necessary to clarify your intent.
Changes
  • #​7325 Improves the 'indices of value' expression to allow accessing the index/position of a specific value in a list. Note that values that are not found in a list or a string now return none instead of -1.
  • #​7729 Splits the 'beacon values' expression into multiple new expressions: 'beacon effects', 'beacon range', and 'beacon tier'. Note that the range and tier expressions now require beacon in their syntax.
  • #​7742 Cleans up the 'hash' expression and adds SHA-384 and SHA-512. A warning is now printed when using the MD5 algorithm.
  • #​7816 The 'is enchanted' condition now looks for exact enchantments, with or better and or worse added as newly available comparison options.
  • #​7840 Improves the existing comparisons for offline players and offline players-strings.
  • #​7913 The aliases folder will now be created automatically so that users know where to place custom aliases.
  • #​7944 Tweaks the 'target entity' expression to make the ray size option more grammatically correct.
  • #​7965 Splits the 'special number' expression into multiple literal expressions: 'infinity', 'NaN', and 'negative infinity'
Bug Fixes
  • #​7654 Fixes Skript's documentation using incorrect pages and formatting.
  • #​7674 Fixes an issue where the event-item in a 'craft' event often returned air due to the recipe being complex.
  • #​7879 Fixes an issue where syntax removals using the new Registration API often failed.
  • #​7917 Fixes an issue where the raid omen effect was incorrectly given the alias bad omen.
  • #​7928 Fixes an issue where sorting lists with duplicate values returned a list with only a single instance of that value.
  • #​7935 Fixes incorrect documentation for the 'expand/shrink world border' effect.
  • #​7938 Fixes an issue where using the 'name' expression with default variables could cause an exception.
  • #​7943 Fixes numerous issues with the 'gamerule value' expression.
  • #​7945 Fixes a bug where the 'is within' condition incorrectly handled or lists.
  • #​7947 Fixes comparisons between enchantments and enchantment types: if sharpness 1, efficiency 3, and knockback 2 contains sharpness.
  • #​7951 Fixes multiple issues with using and comparing against llamas/trader llamas.
  • #​7964 Fixes an issue with setting variables during script loading when asynchronous loading is enabled.
  • #​7971 Fixes some issues with comparing pig variants and that variants could not be used with baby pigs.
  • #​7976 Fixes an issue where arithmetic syntax could fail to resolve valid operations.
  • #​7986 Fixes an issue on newer versions where adding items to an inventory could result in other slots being mistakenly deleted.
  • #​7989 Fixes an issue where next/previous 'loop-value' could fail to reset in-between loops.
  • #​7998 Fixes an issue where the 'inventory holder/viewers/rows/slots' expression could cause an exception when used with other syntax.
  • #​7999 Fixes an issue where getting the entities in a chunk failed.
  • #​8005 Fixes ephemeral variables still being saved on server shutdown.
  • #​8012 Fixes an issue where pig entity data could not be saved in a variable.
  • #​8015 Fixes an issue where removing functions mistakenly used the wrong namespace.
  • #​8024 Removes the 'cannot be saved' warnings for ephemeral variables.
  • #​8026 Fixes test failures with ExprExcept and an issue where it would mistakenly simplify when it shouldn't.
  • #​8027 Fixes text arguments and other code being mistakenly parsed as specific literals.
  • #​8028 Fixes an issue where custom lang files were not loaded due to Skript looking for them in Skriptlang/ instead of Skript/lang/.
  • #​8032 Fixes an issue where overloading functions with no parameters or array parameters could result in errors.
API Changes
  • #​7256 Adds API to allow the setting of custom default values for types.
  • #​7551 Integrates the Registration API into SkriptParser and syntax class parse methods. Addons using SkriptParser methods directly may need to be recompiled, though there should be no breaking changes.
  • #​7709 Updates SkriptEventInfo (and its Registration API equivalent) to support passing an array for the since documentation field. Some methods have had their signatures changed and addons using them will need to be updated.
  • #​7710 Cleanup to the ExprTool class and EquipmentSlot conversion methods for BukkitUtils.
  • #​7778 Adds a preInit() method intended to help with doing common init work for families of syntaxes, rather than having to hijack init() and create a different signature for the children to implement.
  • #​7791 Adds a spawnTestEntity helper method for JUnit tests.
  • #​7832 Removes many unnecessary version checks for versions Skript no longer supports.
  • #​7841 The syntax simplification API is now used by the parser. For more information, review the pull request's description.
  • #​7851 Adds a PatternedParser utility interface and replaces the RegistryParser#getAllNames method with RegistryParser#getCombinedPatterns (from the PatternedParser interface).
  • #​7858 Adds ExperimentData utility class and SimpleExperimentalSyntax utility interface to simplify the work needed by syntax to restrict based on the set experiments.
  • #​7879 Registered syntax are no longer ordered by when they were registered. Priorities should be used if precise registration order is required.
  • #​7891 Improves the return types for many expressions via Expression#possibleReturnTypes() and Expression#canReturn().
  • #​7892 Adds experimental support for local variable type hints. If you have syntax that modifies variables (and may result in their type being changed), you you may need to support this feature. For more information, review the pull request's description (see "API Support").
  • #​7904 Fixes a conflict between the 'player skull' expression and the 'head location' expression. Note that head has been removed as an option for the player skull expression.
  • #​7909 Significantly expands (and reworked to some extent) the Keyed Expression API. For more information about the changes, review the pull request's description.
  • #​7918 Adds a Javadoc description for the Type generic parameter in the AnyContains interface.
  • #​7927 Adds a getter method for the expression used in PropertyCondition.
  • #​7929 Implements preInit() for Effect, Condition, and Section, allowing runtime errors to be used more easily. Adds a #isSectionOnly() method in SectionExpression allowing the ability to check if it requires a Section.
  • #​7971 Improves documentation for EntityData.
  • #​7972 Switches entitydata age/plurality from parse marks to parse tags.
  • #​7993 Adds SyntaxInfo builder methods to the "property" type syntax classes, in favor of the existing register methods.
  • #​8001 Adds a default implementation for Expression#simplify().

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

Click to reveal the experiments available in this release
For-Each Loop

Enable by adding using for loops to your script.

A new kind of loop syntax that stores the loop index and value in variables for convenience.

This can be used to avoid confusion when nesting multiple loops inside each other.

for {_index}, {_value} in {my list::*}:
    broadcast "%{_index}%: %{_value}%"
for each {_player} in all players:
    send "Hello %{_player}%!" to {_player}

All existing loop features are also available in this section.

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)
Damage Sources

Enable by adding using damage sources to your script.

Note that type has been removed as an option for the 'damage cause' expression as damage cause and damage type now refer to different things.

Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more.

Below is an example of what damaging using custom damage sources looks like:

damage all players by 5 using a custom damage source:
	set the damage type to magic
	set the causing entity to {_player}
	set the direct entity to {_arrow}
	set the damage location to location(0, 0, 10)

For more details about the syntax, visit damage source 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.12.0-pre2: Pre-Release 2.12.0-pre2

Compare Source

Skript 2.12.0-pre2

Today, we are releasing Skript 2.12.0-pre2. This pre-release includes additional bug fixes, including some for issues that were reported with the first pre-release. Skript 2.12 includes dozens of new features and bug fixes, along with early support for 1.21.6/7.

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

We would also like to welcome a new addition to the team, @​Absolutionism!

Happy Skripting!

Changes to Supported Versions and Platforms

Back in 2.10, we switched to supporting the last three major versions. While reasonable at the time, Mojang has continued to make significant changes between minor versions and seems to have shyed away from incrementing the major version counter. In order to reduce the development burden of supporting so many versions with different features, as of 2.13 (next release) we have decided to switch to supporting the last 18 months of Minecraft releases. This means as of 2.13, Skript will support 1.20.4 and newer. 2.14 will be 1.21.0 and newer. We hope this change will allow us to modernize Skript more quickly and more fully support new systems like item components going forward. To clarify, 2.12 still supports 1.19.4+. These changes will affect 2.13 and later.

In the same vein, Paper has recently completed its fork away from Spigot. We have aimed to maintain support for both versions so far, but we are running into issues where the API differences between Paper and Spigot are becoming too great. It is not feasible for us to develop two parallel versions of Skript, and as a result, we will be dropping support for Spigot starting with 2.13. We encourage the small portion of our users who are still using Spigot to upgrade to Paper if possible.

Major Changes
Ephemeral Variables

Ephemeral variables (or ram vars, or memory vars) are now fully implemented by default for all users. These are global variables that are not saved between restarts. To make a variable ephemeral, add a hyphen (-) to the start of its name: {-var}. These variables are about 2.5x faster to change compared to normal global variables. You do not need to do anything to enable them.

Function Overloading

[!NOTE]
The script reflection experiment, which includes syntax for dynamically referencing and executing functions, does not yet support working with overloaded functions.

Function overloading enables creating functions that have the same name but different parameters types/parameter counts.

function send_welcome(p: player):
	send_welcome({_p}, false)

function send_welcome(p: player, first_time: boolean):
	if {_first_time} is true:
            send "Welcome to our server for the first time, %name of {_p}%!" to {_p}
        else:
            send "Welcome back to our server, %name of {_p}%!" to {_p}
    
Local Variable Type Hints (Experimental)

[!NOTE]
This feature is currently experimental and can be used by enabling the type hints experiment.

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 (Experimental)

[!NOTE]
This feature is currently experimental and can be used by enabling the error catching experiment.

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)
Damage Sources (Experimental)

[!NOTE]
This feature is currently experimental and can be used by enabling the damage sources experiment.

[!CAUTION]
Note that type has been removed as an option for the 'damage cause' expression as damage cause and damage type now refer to different things.

Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more.

Below is an example of what damaging using custom damage sources looks like:

damage all players by 5 using a custom damage source:
	set the damage type to magic
	set the causing entity to {_player}
	set the direct entity to {_arrow}
	set the damage location to location(0, 0, 10)

For more details about the syntax, visit damage source on our documentation website.

Contributing Updates

We are now allowing contributors to release their code contributions under the more-permissive MIT License. For more information, please review our LICENSING.md file.

⚠ Breaking Changes
  • When using index of "a" in "b", values that do not appear in the second string will now return none instead of the previous -1.
  • The is enchanted with condition now looks for exact levels instead of the specified level or better. Old behavior can be replicated with if {_item} is enchanted with sharpness 2 or better. Some examples:
if {_item} is enchanted with sharpness 2 # only passes for sharpness 2. Previous behavior allowed sharpness of 2 or greater to pass.
if {_item} is enchanted with sharpness 2 or better # sharpness 2+
if {_item} is enchanted with sharpness 2 or worse # sharpness 2 or 1
if {_item} is enchanted with sharpness # sharpness of any level
  • An infinite timespan literal was added, meaning Timespan math operations can now result in an infinite timespan value (just like numbers).
  • The parsing behavior of the 'amount' expression has changed. Given an expression like amount of {a::*}, "b", it was before parsed as (amount of {a::*}), "b", but it is now parsed as amount of ({a::*}, "b"). Use parentheses as necessary to clarify your intent.
  • For the old 'beacon values' expression, beacon is now a required keyword for the range and tier expressions.
  • The remove all changer for the 'custom model data' expression has been removed. It functioned the same as remove.
  • head has been removed as an option for the 'player skull' expression as head of player conflicts with the 'head location' expression.
  • type has been removed as an option for the 'damage cause' expression as damage cause and damage type now refer to different things.
  • The 'load world' effect now requires world.
  • The API method RegistryParser#getAllNames has been removed in favor of RegistryParser#getCombinedPatterns (from the PatternedParser interface).
  • API methods for the since documentation field have changed on SkriptEventInfo:
    • SkriptEventInfo#getSince() (String) -> SkriptEventInfo#getSince() (String[])
    • BukkitSyntaxInfos.Event.since() (String) -> BukkitSyntaxInfos.Event.since() (Collection<String>)
    • BukkitSyntaxInfos.Event.Builder.since(String) -> BukkitSyntaxInfos.Event.Builder.addSince(String)
  • (API) Syntax ordering is no longer based on registration order when a priority is shared. This may expose syntax conflicts if this behavior was depended on.
Changelog
Pre-Release 2 Changes
  • #​7943 Fixes numerous issues with the 'gamerule value' expression.
  • #​7992 Fixes an issue where some examples diplayed incorrectly on the documentation site.
  • #​7993 Adds SyntaxInfo builder methods to the "property" type syntax classes, in favor of the existing register methods.
  • #​7996 Fixes an error that would occur when using experimental syntax in effect commands.
  • #​7997 Fixes an issue where the 'indices of value' expression failed to respect the case sensitivity configuration option.
  • #​7998 Fixes an issue where the 'inventory holder/viewers/rows/slots' expression could cause an exception when used with other syntax.
  • #​7999 Fixes an issue where getting the entities in a chunk failed.
  • #​8001 Adds a default implementation for Expression#simplify().
  • #​8005 Fixes ephemeral variables still being saved on server shutdown.
  • #​8006 Fixes a syntax conflict between the 'blocks' expression and the 'value within' exression.
  • #​8012 Fixes an issue where pig entity data could not be saved in a variable.
Additions
  • #​4154 Adds support for boolean values to the 'toggle' effect and an 'inverse boolean' expression to obtain the inverse of a boolean (at long last).
  • #​6902 Adds a 'buried item' expression and a 'dusted stage' expression for working with brushable blocks.
  • #​7495 Adds ephemeral variables (starting with -) which are cleared when the server restarts.
  • #​7561 Adds an 'except' expression which provides a simple way to filter values from a list.
  • #​7658 Adds an 'On-screen kick message' expression to get and change the on-screen message that appears when a user is kicked, usable in the kick event.
  • #​7685 Adds support for the Catalan language (thanks to @​TwistedWar3713, @​Lukarius11, and @​ItzDuck364 for their language insights).
  • #​7707 Adds support for the 'item cooldown' syntax to respect cooldown groups (cooldown components) defined on items.
  • #​7738 Adds an 'exact item' expression that acts like creative-mode middle-click, copying the block's data exactly.
  • #​7745 Adds a 'vault display item' event for when a trial vault displays an item.
  • #​7746 Adds a 'villager career change' event for when villagers change professions along with the ability to obtain the reason why.
  • #​7748 Adds a condition and effect for working with shivering striders.
  • #​7751 Adds support for function overloading, enabling functions to have the same name but different parameters.
  • #​7803 Adds the word along as an option in the 'push' effect: push player along vector(1,1,1) at speed 3.
  • #​7807 Adds support for using the expanded custom model data system to the 'custom model data' expression. Note that remove all changer support has been removed.
  • #​7808 Adds a warning for ambiguous command arguments where expressions like arg-1 could be misinterpreted as (arg) - 1.
  • #​7823 Adds experimental syntax for catching and suppressing runtime errors. See the available experiments section below for more information.
  • #​7830 Adds support for printing errors to the 'enable/disable/unload/reload script' effect.
  • #​7841 Adds support for syntax simplification, which enables parse time pre-computation of some syntax that will always have the same result.
  • #​7846 Adds support for the new 1.21.5 pig variants.
  • #​7851 Adds a warning for when literals that can be interpeted as multiple types are used and Skript cannot determine the intended type.
  • #​7858 Adds error messages for experimental syntax that is used when the experiment is disabled.
  • #​7866 Adds support for cow variants.
  • #​7868 Adds support for chicken variants.
  • #​7892 Adds experimental support for local variable type hints. This allows Skript to determine what kind of values your local variables may hold at parse time. See the available experiments section below for more information.
  • #​7897 Expands the 'arrow attached block' expression to support multiple blocks, as arrows may be attached to multiple blocks. The existing single expression has been deprecated on versions where the plural expression is available, as it is unreliable.
  • #​7903 Adds a 'harvest block' event for when a block is harvested (berry bushes, glowberries, etc.).
  • #​7905 Adds a new event-entity type event value for entity related events.
  • #​7906 Adds saddle and dynamic equipment slot support to the 'armor slot' expression.
  • #​7909 Adds a 'keyed' expression which allows explicitly passing/including the keys of an expression alongside its values. For example, you can preserve/include keys (indices) when setting a list variable to another list variable or when providing a list variable as the argument of a function.
  • #​7914 Adds a 'first empty slot in inventory' expression to obtain the first empty slot in inventories.
  • #​7933 Adds scientific notation (e.g. 1.23E4, 10e-10) to numbers.
  • #​7942 Function names can now start with an underscore.
  • #​7949 Adds support for resetting sent block changes from the 'send block change' effect.
  • #​7950 Adds support to the 'push' effect for pushing/pulling entitites towards/away from a location.
  • #​7951 Adds support for deleting the 'spawner type' of a spawner.
  • #​7956 Adds support for an 'infinite' timespan. Note that now, just like numbers, math operations for Timespans can now result in an infinite timespan value.
  • #​7957/#​7982/#​7983 Implement early support for 1.21.6/7.
  • #​7961 Adds support for literals in the 'amount' expression. Note that, as a result, the parsing behavior has now changed. Given an expression like amount of {a::*}, "b", it was before parsed as (amount of {a::*}), "b", but it is now parsed as amount of ({a::*}, "b"). Use parentheses as necessary to clarify your intent.
Changes
  • #​7325 Improves the 'indices of value' expression to allow accessing the index/position of a specific value in a list. Note that values that are not found in a list or a string now return none instead of -1.
  • #​7729 Splits the 'beacon values' expression into multiple new expressions: 'beacon effects', 'beacon range', and 'beacon tier'. Note that the range and tier expressions now require beacon in their syntax.
  • #​7742 Cleans up the 'hash' expression and adds SHA-384 and SHA-512. A warning is now printed when using the MD5 algorithm.
  • #​7816 The 'is enchanted' condition now looks for exact enchantments, with or better and or worse added as newly available comparison options.
  • #​7840 Improves the existing comparisons for offline players and offline players-strings.
  • #​7913 The aliases folder will now be created automatically so that users know where to place custom aliases.
  • #​7944 Tweaks the 'target entity' expression to make the ray size option more grammatically correct.
  • #​7965 Splits the 'special number' expression into multiple literal expressions: 'infinity', 'NaN', and 'negative infinity'
Bug Fixes
  • #​7654 Fixes Skript's documentation using incorrect pages and formatting.
  • #​7674 Fixes an issue where the event-item in a 'craft' event often returned air due to the recipe being complex.
  • #​7879 Fixes an issue where syntax removals using the new Registration API often failed.
  • #​7917 Fixes an issue where the raid omen effect was incorrectly given the alias bad omen.
  • #​7928 Fixes an issue where sorting lists with duplicate values returned a list with only a single instance of that value.
  • #​7935 Fixes incorrect documentation for the 'expand/shrink world border' effect.
  • #​7938 Fixes an issue where using the 'name' expression with default variables could cause an exception.
  • #​7943 Fixes numerous issues with the 'gamerule value' expression.
  • #​7945 Fixes a bug where the 'is within' condition incorrectly handled or lists.
  • #​7947 Fixes comparisons between enchantments and enchantment types: if sharpness 1, efficiency 3, and knockback 2 contains sharpness.
  • #​7951 Fixes multiple issues with using and comparing against llamas/trader llamas.
  • #​7964 Fixes an issue with setting variables during script loading when asynchronous loading is enabled.
  • #​7971 Fixes some issues with comparing pig variants and that variants could not be used with baby pigs.
  • #​7976 Fixes an issue where arithmetic syntax could fail to resolve valid operations.
  • #​7986 Fixes an issue on newer versions where adding items to an inventory could result in other slots being mistakenly deleted.
  • #​7989 Fixes an issue where next/previous 'loop-value' could fail to reset in-between loops.
  • #​7998 Fixes an issue where the 'inventory holder/viewers/rows/slots' expression could cause an exception when used with other syntax.
  • #​7999 Fixes an issue where getting the entities in a chunk failed.
  • #​8005 Fixes ephemeral variables still being saved on server shutdown.
  • #​8012 Fixes an issue where pig entity data could not be saved in a variable.
API Changes
  • #​7256 Adds API to allow the setting of custom default values for types.
  • #​7551 Integrates the Registration API into SkriptParser and syntax class parse methods. Addons using SkriptParser methods directly may need to be recompiled, though there should be no breaking changes.
  • #​7709 Updates SkriptEventInfo (and its Registration API equivalent) to support passing an array for the since documentation field. Some methods have had their signatures changed and addons using them will need to be updated.
  • #​7710 Cleanup to the ExprTool class and EquipmentSlot conversion methods for BukkitUtils.
  • #​7778 Adds a preInit() method intended to help with doing common init work for families of syntaxes, rather than having to hijack init() and create a different signature for the children to implement.
  • #​7791 Adds a spawnTestEntity helper method for JUnit tests.
  • #​7832 Removes many unnecessary version checks for versions Skript no longer supports.
  • #​7841 The syntax simplification API is now used by the parser. For more information, review the pull request's description.
  • #​7851 Adds a PatternedParser utility interface and replaces the RegistryParser#getAllNames method with RegistryParser#getCombinedPatterns (from the PatternedParser interface).
  • #​7858 Adds ExperimentData utility class and SimpleExperimentalSyntax utility interface to simplify the work needed by syntax to restrict based on the set experiments.
  • #​7879 Registered syntax are no longer ordered by when they were registered. Priorities should be used if precise registration order is required.
  • #​7891 Improves the return types for many expressions via Expression#possibleReturnTypes() and Expression#canReturn().
  • #​7892 Adds experimental support for local variable type hints. If you have syntax that modifies variables (and may result in their type being changed), you you may need to support this feature. For more information, review the pull request's description (see "API Support").
  • #​7904 Fixes a conflict between the 'player skull' expression and the 'head location' expression. Note that head has been removed as an option for the player skull expression.
  • #​7909 Significantly expands (and reworked to some extent) the Keyed Expression API. For more information about the changes, review the pull request's description.
  • #​7918 Adds a Javadoc description for the Type generic parameter in the AnyContains interface.
  • #​7927 Adds a getter method for the expression used in PropertyCondition.
  • #​7929 Implements preInit() for Effect, Condition, and Section, allowing runtime errors to be used more easily. Adds a #isSectionOnly() method in SectionExpression allowing the ability to check if it requires a Section.
  • #​7971 Improves documentation for EntityData.
  • #​7972 Switches entitydata age/plurality from parse marks to parse tags.
  • #​7993 Adds SyntaxInfo builder methods to the "property" type syntax classes, in favor of the existing register methods.
  • #​8001 Adds a default implementation for Expression#simplify().

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

Click to reveal the experiments available in this release
For-Each Loop

Enable by adding using for loops to your script.

A new kind of loop syntax that stores the loop index and value in variables for convenience.

This can be used to avoid confusion when nesting multiple loops inside each other.

for {_index}, {_value} in {my list::*}:
    broadcast "%{_index}%: %{_value}%"
for each {_player} in all players:
    send "Hello %{_player}%!" to {_player}

All existing loop features are also available in this section.

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)
Damage Sources

Enable by adding using damage sources to your script.

Note that type has been removed as an option for the 'damage cause' expression as damage cause and damage type now refer to different things.

Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more.

Below is an example of what damaging using custom damage sources looks like:

damage all players by 5 using a custom damage source:
	set the damage type to magic
	set the causing entity to {_player}
	set the direct entity to {_arrow}
	set the damage location to location(0, 0, 10)

For more details about the syntax, visit damage source 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.12.0-pre1: Pre-Release 2.12.0-pre1

Compare Source

Skript 2.12.0-pre1

Today, we are excited to celebrate the beginning of the second half of the year with a new Skript pre-release! Skript 2.12.0-pre1 is now available! This release includes dozens of new features and bug fixes, along with early support for 1.21.6/7.

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

We would also like to welcome a new addition to the team, @​Absolutionism!

Happy Skripting!

Major Changes
Ephemeral Variables

Ephemeral variables (or ram vars, or memory vars) are now fully implemented by default for all users. These are global variables that are not saved between restarts. To make a variable ephemeral, add a hyphen (-) to the start of its name: {-var}. These variables are about 2.5x faster to change compared to normal global variables. You do not need to do anything to enable them.

Function Overloading

[!NOTE]
The script reflection experiment, which includes syntax for dynamically referencing and executing functions, does not yet support working with overloaded functions.

Function overloading enables creating functions that have the same name but different parameters types/parameter counts.

function send_welcome(p: player):
	send_welcome({_p}, false)

function send_welcome(p: player, first_time: boolean):
	if {_first_time} is true:
            send "Welcome to our server for the first time, %name of {_p}%!" to {_p}
        else:
            send "Welcome back to our server, %name of {_p}%!" to {_p}
    
Local Variable Type Hints (Experimental)

[!NOTE]
This feature is currently experimental and can be used by enabling the type hints experiment.

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 (Experimental)

[!NOTE]
This feature is currently experimental and can be used by enabling the error catching experiment.

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)
Damage Sources (Experimental)

[!NOTE]
This feature is currently experimental and can be used by enabling the damage sources experiment.

[!CAUTION]
Note that type has been removed as an option for the 'damage cause' expression as damage cause and damage type now refer to different things.

Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more.

Below is an example of what damaging using custom damage sources looks like:

damage all players by 5 using a custom damage source:
	set the damage type to magic
	set the causing entity to {_player}
	set the direct entity to {_arrow}
	set the damage location to location(0, 0, 10)

For more details about the syntax, visit damage source on our documentation website.

Contributing Updates

We are now allowing contributors to release their code contributions under the more-permissive MIT License. For more information, please review our LICENSING.md file.

⚠ Breaking Changes
  • When using index of "a" in "b", values that do not appear in the second string will now return none instead of the previous -1.
  • The is enchanted with condition now looks for exact levels instead of the specified level or better. Old behavior can be replicated with if {_item} is enchanted with sharpness 2 or better. Some examples:
if {_item} is enchanted with sharpness 2 # only passes for sharpness 2. Previous behavior allowed sharpness of 2 or greater to pass.
if {_item} is enchanted with sharpness 2 or better # sharpness 2+
if {_item} is enchanted with sharpness 2 or worse # sharpness 2 or 1
if {_item} is enchanted with sharpness # sharpness of any level
  • An infinite timespan literal was added, meaning Timespan math operations can now result in an infinite timespan value (just like numbers).
  • The parsing behavior of the 'amount' expression has changed. Given an expression like amount of {a::*}, "b", it was before parsed as (amount of {a::*}), "b", but it is now parsed as amount of ({a::*}, "b"). Use parentheses as necessary to clarify your intent.
  • For the old 'beacon values' expression, beacon is now a required keyword for the range and tier expressions.
  • The remove all changer for the 'custom model data' expression has been removed. It functioned the same as remove.
  • head has been removed as an option for the 'player skull' expression as head of player conflicts with the 'head location' expression.
  • type has been removed as an option for the 'damage cause' expression as damage cause and damage type now refer to different things.
  • The 'load world' effect now requires world.
  • The API method RegistryParser#getAllNames has been removed in favor of RegistryParser#getCombinedPatterns (from the PatternedParser interface).
  • API methods for the since documentation field have changed on SkriptEventInfo:
    • SkriptEventInfo#getSince() (String) -> SkriptEventInfo#getSince() (String[])
    • BukkitSyntaxInfos.Event.since() (String) -> BukkitSyntaxInfos.Event.since() (Collection<String>)
    • BukkitSyntaxInfos.Event.Builder.since(String) -> BukkitSyntaxInfos.Event.Builder.addSince(String)
  • (API) Syntax ordering is no longer based on registration order when a priority is shared. This may expose syntax conflicts if this behavior was depended on.
Changelog
Additions
  • #​4154 Adds support for boolean values to the 'toggle' effect and an 'inverse boolean' expression to obtain the inverse of a boolean (at long last).
  • #​6902 Adds a 'buried item' expression and a 'dusted stage' expression for working with brushable blocks.
  • #​7495 Adds ephemeral variables (starting with -) which are cleared when the server restarts.
  • #​7561 Adds an 'except' expression which provides a simple way to filter values from a list.
  • #​7658 Adds an 'On-screen kick message' expression to get and change the on-screen message that appears when a user is kicked, usable in the kick event.
  • #​7685 Adds support for the Catalan language (thanks to @​TwistedWar3713, @​Lukarius11, and @​ItzDuck364 for their language insights).
  • #​7707 Adds support for the 'item cooldown' syntax to respect cooldown groups (cooldown components) defined on items.
  • #​7738 Adds an 'exact item' expression that acts like creative-mode middle-click, copying the block's data exactly.
  • #​7745 Adds a 'vault display item' event for when a trial vault displays an item.
  • #​7746 Adds a 'villager career change' event for when villagers change professions along with the ability to obtain the reason why.
  • #​7748 Adds a condition and effect for working with shivering striders.
  • #​7751 Adds support for function overloading, enabling functions to have the same name but different parameters.
  • #​7803 Adds the word along as an option in the 'push' effect: push player along vector(1,1,1) at speed 3.
  • #​7807 Adds support for using the expanded custom model data system to the 'custom model data' expression. Note that remove all changer support has been removed.
  • #​7808 Adds a warning for ambiguous command arguments where expressions like arg-1 could be misinterpreted as (arg) - 1.
  • #​7823 Adds experimental syntax for catching and suppressing runtime errors. See the available experiments section below for more information.
  • #​7830 Adds support for printing errors to the 'enable/disable/unload/reload script' effect.
  • #​7841 Adds support for syntax simplification, which enables parse time pre-computation of some syntax that will always have the same result.
  • #​7846 Adds support for the new 1.21.5 pig variants.
  • #​7851 Adds a warning for when literals that can be interpeted as multiple types are used and Skript cannot determine the intended type.
  • #​7858 Adds error messages for experimental syntax that is used when the experiment is disabled.
  • #​7866 Adds support for cow variants.
  • #​7868 Adds support for chicken variants.
  • #​7892 Adds experimental support for local variable type hints. This allows Skript to determine what kind of values your local variables may hold at parse time. See the available experiments section below for more information.
  • #​7897 Expands the 'arrow attached block' expression to support multiple blocks, as arrows may be attached to multiple blocks. The existing single expression has been deprecated on versions where the plural expression is available, as it is unreliable.
  • #​7903 Adds a 'harvest block' event for when a block is harvested (berry bushes, glowberries, etc.).
  • #​7905 Adds a new event-entity type event value for entity related events.
  • #​7906 Adds saddle and dynamic equipment slot support to the 'armor slot' expression.
  • #​7909 Adds a 'keyed' expression which allows explicitly passing/including the keys of an expression alongside its values. For example, you can preserve/include keys (indices) when setting a list variable to another list variable or when providing a list variable as the argument of a function.
  • #​7914 Adds a 'first empty slot in inventory' expression to obtain the first empty slot in inventories.
  • #​7933 Adds scientific notation (e.g. 1.23E4, 10e-10) to numbers.
  • #​7942 Function names can now start with an underscore.
  • #​7949 Adds support for resetting sent block changes from the 'send block change' effect.
  • #​7950 Adds support to the 'push' effect for pushing/pulling entitites towards/away from a location.
  • #​7951 Adds support for deleting the 'spawner type' of a spawner.
  • #​7956 Adds support for an 'infinite' timespan. Note that now, just like numbers, math operations for Timespans can now result in an infinite timespan value.
  • #​7957/#​7982/#​7983 Implement early support for 1.21.6/7.
  • #​7961 Adds support for literals in the 'amount' expression. Note that, as a result, the parsing behavior has now changed. Given an expression like amount of {a::*}, "b", it was before parsed as (amount of {a::*}), "b", but it is now parsed as amount of ({a::*}, "b"). Use parentheses as necessary to clarify your intent.
Changes
  • #​7325 Improves the 'indices of' expression to allow accessing the index/position of a specific value in a list. Note that values that are not found in a list or a string now return none instead of -1.
  • #​7729 Splits the 'beacon values' expression into multiple new expressions: 'beacon effects', 'beacon range', and 'beacon tier'. Note that the range and tier expressions now require beacon in their syntax.
  • #​7742 Cleans up the 'hash' expression and adds SHA-384 and SHA-512. A warning is now printed when using the MD5 algorithm.
  • #​7816 The 'is enchanted' condition now looks for exact enchantments, with or better and or worse added as newly available comparison options.
  • #​7840 Improves the existing comparisons for offline players and offline players-strings.
  • #​7913 The aliases folder will now be created automatically so that users know where to place custom aliases.
  • #​7944 Tweaks the 'target entity' expression to make the ray size option more grammatically correct.
  • #​7965 Splits the 'special number' expression into multiple literal expressions: 'infinity', 'NaN', and 'negative infinity'
Bug Fixes
  • #​7654 Fixes Skript's documentation using incorrect pages and formatting.
  • #​7674 Fixes an issue where the event-item in a 'craft' event often returned air due to the recipe being complex.
  • #​7879 Fixes an issue where syntax removals using the new Registration API often failed.
  • #​7917 Fixes an issue where the raid omen effect was incorrectly given the alias bad omen.
  • #​7928 Fixes an issue where sorting lists with duplicate values returned a list with only a single instance of that value.
  • #​7935 Fixes incorrect documentation for the 'expand/shrink world border' effect.
  • #​7938 Fixes an issue where using the 'name' expression with default variables could cause an exception.
  • #​7945 Fixes a bug where the 'is within' condition incorrectly handled or lists.
  • #​7947 Fixes comparisons between enchantments and enchantment types: if sharpness 1, efficiency 3, and knockback 2 contains sharpness.
  • #​7951 Fixes multiple issues with using and comparing against llamas/trader llamas.
  • #​7964 Fixes an issue with setting variables during script loading when asynchronous loading is enabled.
  • #​7971 Fixes some issues with comparing pig variants and that variants could not be used with baby pigs.
  • #​7976 Fixes an issue where arithmetic syntax could fail to resolve valid operations.
  • #​7986 Fixes an issue on newer versions where adding items to an inventory could result in other slots being mistakenly deleted.
  • #​7989 Fixes an issue where next/previous 'loop-value' could fail to reset in-between loops.
API Changes
  • #​7256 Adds API to allow the setting of custom default values for types.
  • #​7551 Integrates the Registration API into SkriptParser and syntax class parse methods. Addons using SkriptParser methods directly may need to be recompiled, though there should be no breaking changes.
  • #​7709 Updates SkriptEventInfo (and its Registration API equivalent) to support passing an array for the since documentation field. Some methods have had their signatures changed and addons using them will need to be updated.
  • #​7710 Cleanup to the ExprTool class and EquipmentSlot conversion methods for BukkitUtils.
  • #​7778 Adds a preInit() method intended to help with doing common init work for families of syntaxes, rather than having to hijack init() and create a different signature for the children to implement.
  • #​7791 Adds a spawnTestEntity helper method for JUnit tests.
  • #​7832 Removes many unnecessary version checks for versions Skript no longer supports.
  • #​7841 The syntax simplification API is now used by the parser. For more information, review the pull request's description.
  • #​7851 Adds a PatternedParser utility interface and replaces the RegistryParser#getAllNames method with RegistryParser#getCombinedPatterns (from the PatternedParser interface).
  • #​7858 Adds ExperimentData utility class and SimpleExperimentalSyntax utility interface to simplify the work needed by syntax to restrict based on the set experiments.
  • #​7879 Registered syntax are no longer ordered by when they were registered. Priorities should be used if precise registration order is required.
  • #​7891 Improves the return types for many expressions via Expression#possibleReturnTypes() and Expression#canReturn().
  • #​7892 Adds experimental support for local variable type hints. If you have syntax that modifies variables (and may result in their type being changed), you you may need to support this feature. For more information, review the pull request's description (see "API Support").
  • #​7904 Fixes a conflict between the 'player skull' expression and the 'head location' expression. Note that head has been removed as an option for the player skull expression.
  • #​7909 Significantly expands (and reworked to some extent) the Keyed Expression API. For more information about the changes, review the pull request's description.
  • #​7918 Adds a Javadoc description for the Type generic parameter in the AnyContains interface.
  • #​7927 Adds a getter method for the expression used in PropertyCondition.
  • #​7929 Implements preInit() for Effect, Condition, and Section, allowing runtime errors to be used more easily. Adds a #isSectionOnly() method in SectionExpression allowing the ability to check if it requires a Section.
  • #​7971 Improves documentation for EntityData.
  • #​7972 Switches entitydata age/plurality from parse marks to parse tags.

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

Click to reveal the experiments available in this release
For-Each Loop

Enable by adding using for loops to your script.

A new kind of loop syntax that stores the loop index and value in variables for convenience.

This can be used to avoid confusion when nesting multiple loops inside each other.

for {_index}, {_value} in {my list::*}:
    broadcast "%{_index}%: %{_value}%"
for each {_player} in all players:
    send "Hello %{_player}%!" to {_player}

All existing loop features are also available in this section.

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)
Damage Sources

Enable by adding using damage sources to your script.

Note that type has been removed as an option for the 'damage cause' expression as damage cause and damage type now refer to different things.

Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more.

Below is an example of what damaging using custom damage sources looks like:

damage all players by 5 using a custom damage source:
	set the damage type to magic
	set the causing entity to {_player}
	set the direct entity to {_arrow}
	set the damage location to location(0, 0, 10)

For more details about the syntax, visit damage source 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.11.2: Patch Release 2.11.2

Compare Source

Skript 2.11.2

As we prepare for Skript 2.12 in July, Skript 2.11.2 is here to resolve some additional bugs.

As always, you can report any issues on our issue tracker.
Skript 2.11.2 supports Spigot or Paper servers on versions 1.19.4 to 1.21.4, with tentative support for 1.21.5.

Happy Skripting!

Changelog
Bug Fixes
  • #​7845 Fixes types marked as a instead of an in the default language file.
  • #​7850 Fixes an issue where LiteralUtils#hasUnparsedLiteral() would not check recursively and therefore could miss some UnparsedLiterals.
  • #​7886 Fixes an exception/crash that could occur when using blockdata in a click event.
  • #​7889 Fixes an issue where the 'stop trigger' effect used the incorrect ExecutionIntent.
  • #​7890 Fixes an issue where the 'no damage ticks' expression printed an improper (non-suppressable) deprecation warning.
  • #​7895 Fixes the player event value not working in a 'flight toggle' event.
  • #​7907 Fixes an issue with the 'arithmetic' expression that could result in valid operations failing or exceptions.
API Changes
  • #​7826 Cleans up tests and removes outdated checks for unsupported versions.
  • #​7883 Adds safe arithmetic methods for Timespans.

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

Enable by adding using for loops to your script.

A new kind of loop syntax that stores the loop index and value in variables for convenience.

This can be used to avoid confusion when nesting multiple loops inside each other.

for {_index}, {_value} in {my list::*}:
    broadcast "%{_index}%: %{_value}%"
for each {_player} in all players:
    send "Hello %{_player}%!" to {_player}

All existing loop features are also available in this section.

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.
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
  • @​APickledWalrus
  • @​erenkarakal
  • @​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.

v2.11.1: Patch Release 2.11.1

Compare Source

Skript 2.11.1

What better than a new Skript release to celebrate the beginning of May? Today, we are releasing Skript 2.11.1 which brings with it a handful of bug fixes.

As always, you can report any issues on our issue tracker.
Skript 2.11.1 supports Spigot or Paper servers on versions 1.19.4 to 1.21.4, with tentative support for 1.21.5.

Happy Skripting!

Changelog
Changes
Bug Fixes
  • #​7698 Fixes an issue with plural type representation when generating a JSON documentation file.
  • #​7775 Fixes an issue where the 'broadcast' effect could evaluate its expressions multiple times.
  • #​7795 Fixes a crash that could occur when loading invalid BlockData.
  • #​7796 Fixes some issues that could occur when running Skript on 1.21.5.
  • #​7809 Fixes an error that could occur in variable loading from slow name parsing
  • #​7814 Fixes an issue where the 'any of' expression would mistakenly allow itself to be changed using add, set, remove, and other changers.
  • #​7827 Fixes an issue where per-player usages of the 'create worldborder' expression section shared state.
  • #​7829 Fixes an issue where using the 'shoot' effect section as a section would reset the velocity (from the head statement).
API Changes
  • #​7817 Formalized deprecation processes and updated removal dates of deprecated content. If you are using any deprecated methods or classes, check to see if they will be removed in 2.12.
  • #​7821 Moves the inventory event-value to InventoryEvent.class, rather than having to implement it on each child event individually.

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

Click to reveal the experiments avaiable in this release
For-Each Loop

Enable by adding using for loops to your script.

A new kind of loop syntax that stores the loop index and value in variables for convenience.

This can be used to avoid confusion when nesting multiple loops inside each other.

for {_index}, {_value} in {my list::*}:
    broadcast "%{_index}%: %{_value}%"
for each {_player} in all players:
    send "Hello %{_player}%!" to {_player}

All existing loop features are also available in this section.

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.
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.11.0: Feature Release 2.11.0

Compare Source

Skript 2.11.0

Skript 2.11.0 is now available! This release is of a much more manageable size compared to 2.10, but includes a significant amount of new syntaxes to play around with, as well as a major fix for some item variables. Please read the Major Changes section closely.

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!
Skript 2.11.0 supports Spigot or Paper servers on versions 1.19.4 to 1.21.4.

Per our release model, we plan to release 2.11.1 on May 1st to address any immediate issues that are spotted with this release. Should it be necessary, an emergency patch release may come before then.

Happy Skripting!

Major Changes
  • Adds the ability to clarify the type of a literal, allowing e.g. black (wolf color) or black (color).
  • A large number of additional syntaxes for various entities, like wardens, allays, and endermen.
  • Allows the use of minecraft ids to refer to items: minecraft:oak_log.
  • Adds a spanish language option.
  • Fixes bug where stored items in variables could change types between Minecraft versions.

[!CAUTION]
Updating your Minecraft version before switching to 2.11 can cause some item variables to change materials!
To avoid issues, please ensure you start your server normally with 2.11 active, shut it down normally, and only then proceed to updating your Minecraft version.

If you are still on 2.10, have updated your Minecraft version, and are experiencing item variable issues, you may find success by downgrading Minecraft to before the issues began and updating to 2.11 on that version (Or by copying your variables.csv file to a server running on an older version). Be warned that downgrading generally is not supported by Paper or Spigot, and you may encounter other unrelated issues attempting this.

Be warned that downgrading from 2.11 may cause Skript to be unable to load some item variables. Keep this in mind when testing 2.11.

⚠ Breaking Changes
  • The last colour of %string% expression has been reworked, adding additional support. This necessitated a pattern change, so existing code using this expression should now use last string colour code of %string%.
  • The potion type type has been renamed to potion effect type. Usages of the previous name will need to be updated in scripts.
  • The chiseled bookshelf and decorated pot inventory types have been renamed to [chiseled] bookshelf inventory and decorated pot inventory respectively. Usages of the previous names will need to be updated in scripts.
  • event-item in the 'armor change event' has been removed in favor of 'old armor item' and 'new armor item'
  • UUIDs are no longer represented by strings in Skript and are instead proper UUID objects. This should cause no changes for normal Skript users, but may cause issues if you are relying on them being strings in contexts like using Skript-Reflect methods.
Changelog
Additions
  • #​7006 Adds full support for modifying players' world borders.
  • #​7270 Adds additional syntax for interacting with dropped items.
  • #​7314 Adds Warden related syntaxes:
    • Make a Warden investigate an area.
    • Get the entity a Warden is most angry at.
    • Get the anger level of a Warden.
  • #​7316 Adds support for dealing with the entities in 'entity storage' blocks like beehives, as well as other beehive related syntax.
  • #​7332 Adds an event that is triggered at certain real-life times of day.
  • #​7351 Adds an effect to zombify/dezombify villagers.
  • #​7358 Adds Allay related syntaxes:
    • Get or change whether allays can duplicate and their duplication cooldown.
    • Get the target jukebox of an Allay.
    • Force an Allay to duplicate or dance.
  • #​7361 Adds an effect and condition for whether axolotls are playing dead.
  • #​7362 Updates sleeping related syntaxes to support bats, foxes and villagers.
  • #​7365 Adds effect to make a player sprint, adds a condition to check if a camel is using its dash ability.
  • #​7386 Adds ability to check if an entity is riding a specific other entity. Prevents error when trying to make an entity ride itself.
  • #​7415 Adds ability to get and change the simulation and view distances on Paper servers.
  • #​7453 Adds support for specifying slots in the armor change event like on helmet change.
  • #​7479 Adds syntax related to goats.
  • #​7480 Adds Enderman related syntaxes:
    • Check or change the block an Enderman is carrying.
    • Make Enderman randomly teleport or towards an entity.
    • Check if an Enderman is being stared at.
  • #​7532 Adds a config option for the number of variable changes required to trigger a save.
  • #​7550 Adds various math functions:
    • mean(numbers)
    • median(numbers)
    • factorial(number)
    • root(number, number)
    • permutation(number, number)
    • combination(number, number)
  • #​7554 Moves the "invulnerability time" expression to support timespans and deprecates the tick-based version.
  • #​7564 Allows modifying the persistence of entities and blocks, and allows modifying whether entities should despawn when the player is far away.
  • #​7586 Adds spanish language option.
  • #​7597 Adds checking for whether a ghast is charging its fireball and adds getting and changing the explosive power of a ghast's fireball.
  • #​7683 Added support for fishing states and generic fishing state change event.
  • #​7701 Adds an expression to treat a list as if it is of the form a, b, or c rather than a, b, and c: if {_X} is any of {_possibilities::*}.
  • #​7702 Adds an expression to change phantom and slime entity sizes.
  • #​7709 Adds past event-item, future event-item, and event-slot to the armor change event.
  • #​7714 Adds the entity shoot bow event, as well as some expressions for it.
  • #​7722 Adds the ability to clarify the type of a literal, allowing e.g. black (wolf color) or black (color).
  • #​7747 Adds support for interacting with pandas.
  • #​7750 Adds support for obtaining items with/without their tooltip.
Changes
  • #​7276 Changes the pattern of last colour of %string%, adds support for returning colour objects, the first colour, and all colours.
  • #​7287 Improves the check for what types Skript attempts to compare by comparing super classinfos.
  • #​7317 Adds examples to the location type.
  • #​7440 Enforces the use of effect when using the type potion effect type.
  • #​7442 Merges ExprWeather and ExprPlayerWeather to resolve syntax conflicts.
  • #​7492 Allows the use of minecraft ids to refer to items: minecraft:oak_log.
  • #​7547 Allows checking whether something is within multiple objects, e.g. if player is in world "world" or world "world_nether".
  • #​7549 Allows using skript tag as an alternative for custom tag.
  • #​7552 Allows using multiple numbers in the rounding expression.
  • #​7602 Adds support for using experience as a regular number, allowing for arithmetic like 5 xp + 10.
  • #​7622 Adds syntax that allows the user to improve the clarity of using experiment.
  • #​7694 Allows itemstack as another way to reference the item type.
  • #​7704 Adds support for with all item flags.
  • #​7708 Adds support for using armour instead of armor.
  • #​7716 Improves the errors for when a single value is passed, where multiple are expected.
  • #​7762 Improves the registration and internal organization of the 'bell events'.
Bug Fixes
  • aliases#126 Fixes confusion between resin brick and resin bricks.
  • #​7431 Fixes the order of in which sections are printed in debug mode.
  • #​7483 Fix conflicts with any in the player input event.
  • #​7566 Improved condition classes and added missing method overrides.
  • #​7599 Changes how event-values are determined to avoid possible conflicts when 2 or more values could apply.
  • #​7656 Fix event values not being null in docs created by the JSON generator.
  • #​7665 Ensures EffSort's input expression always returns a single value.
  • #​7669 Fixes issue when using player in entity move event.
  • #​7679 Fixes some incorrectly configured documentation annotations for events.
  • #​7688 Fixes an issue where damage component were added to undamaged items.
  • #​7696 Fixes decorated pot and bookshelf item comparisons.
  • #​7697 Improve error messages for event restricted syntaxes.
  • #​7713 Fixes an issue with comparing inventory slots.
  • #​7717 Fixes an issue when using integers in the radians expression.
  • #​7736 Maintains the inventory of items when setting blocks.
  • #​7744 Fixes an issue where spawning a tropical fish of a specific type would spawn the incorrect type.
  • #​7754 Fix name and example of ExprDisplayTeleportDuration on the docs.
  • #​7769 Fix issues with looping blocks in a straight line when starting near the edge of a block.
  • #​7773 Fixes unintended claiming errors when using section expressions without sections.
  • #​7774 Fixes crashes on Spigot due to the armor change event attempting to load a Paper class.
  • #​7776 Adds lang entries for bundle inventory actions and for the bucket spawn reason.
  • #​7786 Adds a missing 'since' annotation to ExprWithItemFlags.
  • #​7790 Fixes bug where stored items in variables could change types between Minecraft versions.
  • #​7793 Fixes errors for expression sections always saying 'cannot understand section' instead of the actual error.
Removals
  • #​7638 Removes undocumented expression [is] event cancelled as it has been superseded by CondCancelled for years.
API Changes
  • #​7478 Deprecates Skript's EquipSlot in favour of Bukkit's EquipmentSlot.
  • #​7512 Adds changers for event-values.
  • #​7530 Adds a utility entry data for nesting entries.
  • #​7548 Adds a canLoad() method to AddonModule for controlling whether a module should be initialized and then loaded.
  • #​7575 Adds an ExperimentalSyntax that syntax elements can implement to state that the element requires an experiment to be enabled in order to use it.
  • #​7787 Exposes the EntryValidator for ContainerEntryDatas.

Click here to view the full list of commits made since 2.10.2

Notices
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.11.0-pre2: Pre-Release 2.11.0-pre2

Compare Source

Skript 2.11.0-pre2

Skript 2.11.0-pre2 is now available! This release includes a handful of extra bug fixes not present in pre1, including one major bug fix relating to some item variables. Please read the Major Changes section closely.

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

Happy Skripting!

Major Changes
  • Adds the ability to clarify the type of a literal, allowing e.g. black (wolf color) or black (color).
  • A large number of additional syntaxes for various entities, like wardens, allays, and endermen.
  • Allows the use of minecraft ids to refer to items: minecraft:oak_log.
  • Adds a spanish language option.
  • Fixes bug where stored items in variables could change types between Minecraft versions.

[!CAUTION]
Updating your Minecraft version before switching to 2.11 can cause some item variables to change materials!
To avoid issues, please ensure you start your server normally with 2.11 active, shut it down normally, and only then proceed to updating your Minecraft version.

If you are still on 2.10, have updated your Minecraft version, and are experiencing item variable issues, you may find success by downgrading Minecraft to before the issues began and updating to 2.11 on that version (Or by copying your variables.csv file to a server running on an older version). Be warned that downgrading generally is not supported by Paper or Spigot, and you may encounter other unrelated issues attempting this.

Be warned that downgrading from 2.11 may cause Skript to be unable to load some item variables. Keep this in mind when testing 2.11.

⚠ Breaking Changes
  • The last colour of %string% expression has been reworked, adding additional support. This necessitated a pattern change, so existing code using this expression should now use last string colour code of %string%.
  • The potion type type has been renamed to potion effect type. Usages of the previous name will need to be updated in scripts.
  • The chiseled bookshelf and decorated pot inventory types have been renamed to [chiseled] bookshelf inventory and decorated pot inventory respectively. Usages of the previous names will need to be updated in scripts.
  • event-item in the 'armor change event' has been removed in favor of 'old armor item' and 'new armor item'
  • UUIDs are no longer represented by strings in Skript and are instead proper UUID objects. This should cause no changes for normal Skript users, but may cause issues if you are relying on them being strings in contexts like using Skript-Reflect methods.
Changelog
Pre-Release 2 Changes
  • aliases#126 Fixes confusion between resin brick and resin bricks.
  • #​7483 Fix conflicts with any in the player input event.
  • #​7656 Fix event values not being null in docs created by the JSON generator.
  • #​7697 Improve error messages for event restricted syntaxes.
  • #​7736 Maintains the inventory of items when setting blocks.
  • #​7754 Fix name and example of ExprDisplayTeleportDuration on the docs.
  • #​7769 Fix issues with looping blocks in a straight line when starting near the edge of a block.
  • #​7773 Fixes unintended claiming errors when using section expressions without sections.
  • #​7774 Fixes crashes on Spigot due to the armor change event attempting to load a Paper class.
  • #​7776 Adds lang entries for bundle inventory actions and for the bucket spawn reason.
  • #​7790 Fixes bug where stored items in variables could change types between Minecraft versions.
Additions
  • #​7006 Adds full support for modifying players' world borders.
  • #​7270 Adds additional syntax for interacting with dropped items.
  • #​7314 Adds Warden related syntaxes:
    • Make a Warden investigate an area.
    • Get the entity a Warden is most angry at.
    • Get the anger level of a Warden.
  • #​7316 Adds support for dealing with the entities in 'entity storage' blocks like beehives, as well as other beehive related syntax.
  • #​7332 Adds an event that is triggered at certain real-life times of day.
  • #​7351 Adds an effect to zombify/dezombify villagers.
  • #​7358 Adds Allay related syntaxes:
    • Get or change whether allays can duplicate and their duplication cooldown.
    • Get the target jukebox of an Allay.
    • Force an Allay to duplicate or dance.
  • #​7361 Adds an effect and condition for whether axolotls are playing dead.
  • #​7362 Updates sleeping related syntaxes to support bats, foxes and villagers.
  • #​7365 Adds effect to make a player sprint, adds a condition to check if a camel is using its dash ability.
  • #​7386 Adds ability to check if an entity is riding a specific other entity. Prevents error when trying to make an entity ride itself.
  • #​7415 Adds ability to get and change the simulation and view distances on Paper servers.
  • #​7453 Adds support for specifying slots in the armor change event like on helmet change.
  • #​7479 Adds syntax related to goats.
  • #​7480 Adds Enderman related syntaxes:
    • Check or change the block an Enderman is carrying.
    • Make Enderman randomly teleport or towards an entity.
    • Check if an Enderman is being stared at.
  • #​7532 Adds a config option for the number of variable changes required to trigger a save.
  • #​7550 Adds various math functions:
    • mean(numbers)
    • median(numbers)
    • factorial(number)
    • root(number, number)
    • permutation(number, number)
    • combination(number, number)
  • #​7554 Moves the "invulnerability time" expression to support timespans and deprecates the tick-based version.
  • #​7564 Allows modifying the persistence of entities and blocks, and allows modifying whether entities should despawn when the player is far away.
  • #​7586 Adds spanish language option.
  • #​7597 Adds checking for whether a ghast is charging its fireball and adds getting and changing the explosive power of a ghast's fireball.
  • #​7683 Added support for fishing states and generic fishing state change event.
  • #​7701 Adds an expression to treat a list as if it is of the form a, b, or c rather than a, b, and c: if {_X} is any of {_possibilities::*}.
  • #​7702 Adds an expression to change phantom and slime entity sizes.
  • #​7709 Adds past event-item, future event-item, and event-slot to the armor change event.
  • #​7714 Adds the entity shoot bow event, as well as some expressions for it.
  • #​7722 Adds the ability to clarify the type of a literal, allowing e.g. black (wolf color) or black (color).
  • #​7747 Adds support for interacting with pandas.
  • #​7750 Adds support for obtaining items with/without their tooltip.
Changes
  • #​7276 Changes the pattern of last colour of %string%, adds support for returning colour objects, the first colour, and all colours.
  • #​7287 Improves the check for what types Skript attempts to compare by comparing super classinfos.
  • #​7317 Adds examples to the location type.
  • #​7440 Enforces the use of effect when using the type potion effect type.
  • #​7442 Merges ExprWeather and ExprPlayerWeather to resolve syntax conflicts.
  • #​7492 Allows the use of minecraft ids to refer to items: minecraft:oak_log.
  • #​7547 Allows checking whether something is within multiple objects, e.g. if player is in world "world" or world "world_nether".
  • #​7549 Allows using skript tag as an alternative for custom tag.
  • #​7552 Allows using multiple numbers in the rounding expression.
  • #​7602 Adds support for using experience as a regular number, allowing for arithmetic like 5 xp + 10.
  • #​7622 Adds syntax that allows the user to improve the clarity of using experiment.
  • #​7694 Allows itemstack as another way to reference the item type.
  • #​7704 Adds support for with all item flags.
  • #​7708 Adds support for using armour instead of armor.
  • #​7716 Improves the errors for when a single value is passed, where multiple are expected.
  • #​7762 Improves the registration and internal organization of the 'bell events'.
Bug Fixes
  • aliases#126 Fixes confusion between resin brick and resin bricks.
  • #​7431 Fixes the order of in which sections are printed in debug mode.
  • #​7483 Fix conflicts with any in the player input event.
  • #​7566 Improved condition classes and added missing method overrides.
  • #​7599 Changes how event-values are determined to avoid possible conflicts when 2 or more values could apply.
  • #​7656 Fix event values not being null in docs created by the JSON generator.
  • #​7665 Ensures EffSort's input expression always returns a single value.
  • #​7669 Fixes issue when using player in entity move event.
  • #​7679 Fixes some incorrectly configured documentation annotations for events.
  • #​7688 Fixes an issue where damage component were added to undamaged items.
  • #​7696 Fixes decorated pot and bookshelf item comparisons.
  • #​7697 Improve error messages for event restricted syntaxes.
  • #​7713 Fixes an issue with comparing inventory slots.
  • #​7717 Fixes an issue when using integers in the radians expression.
  • #​7736 Maintains the inventory of items when setting blocks.
  • #​7744 Fixes an issue where spawning a tropical fish of a specific type would spawn the incorrect type.
  • #​7754 Fix name and example of ExprDisplayTeleportDuration on the docs.
  • #​7769 Fix issues with looping blocks in a straight line when starting near the edge of a block.
  • #​7773 Fixes unintended claiming errors when using section expressions without sections.
  • #​7774 Fixes crashes on Spigot due to the armor change event attempting to load a Paper class.
  • #​7776 Adds lang entries for bundle inventory actions and for the bucket spawn reason.
Removals
  • #​7638 Removes undocumented expression [is] event cancelled as it has been superseded by CondCancelled for years.
API Changes
  • #​7478 Deprecates Skript's EquipSlot in favour of Bukkit's EquipmentSlot.
  • #​7512 Adds changers for event-values.
  • #​7530 Adds a utility entry data for nesting entries.
  • #​7548 Adds a canLoad() method to AddonModule for controlling whether a module should be initialized and then loaded.
  • #​7575 Adds an ExperimentalSyntax that syntax elements can implement to state that the element requires an experiment to be enabled in order to use it.

Click here to view the full list of commits made since 2.10.2

Notices
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.11.0-pre1: Pre-Release 2.11.0-pre1

Compare Source

Skript 2.11.0-pre1

It's no joke: Skript 2.11.0-pre1 is now available! This release includes dozens of new features, bug fixes, and other enhancements.

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

Happy Skripting!

Major Changes
⚠ Breaking Changes
  • The last colour of %string% expression has been reworked, adding additional support. This necessitated a pattern change, so existing code using this expression should now use last string colour code of %string%.
  • The potion type type has been renamed to potion effect type. Usages of the previous name will need to be updated in scripts.
  • The chiseled bookshelf and decorated pot inventory types have been renamed to [chiseled] bookshelf inventory and decorated pot inventory respectively. Usages of the previous names will need to be updated in scripts.
  • event-item in the 'armor change event' has been removed in favor of 'old armor item' and 'new armor item'
Changelog
Additions
  • #​7006 Adds full support for modifying players' world borders.
  • #​7270 Adds additional syntax for interacting with dropped items.
  • #​7314 Adds Warden related syntaxes:
    • Make a Warden investigate an area.
    • Get the entity a Warden is most angry at.
    • Get the anger level of a Warden.
  • #​7316 Adds support for dealing with the entities in 'entity storage' blocks like beehives, as well as other beehive related syntax.
  • #​7332 Adds an event that is triggered at certain real-life times of day.
  • #​7351 Adds an effect to zombify/dezombify villagers.
  • #​7358 Adds Allay related syntaxes:
    • Get or change whether allays can duplicate and their duplication cooldown.
    • Get the target jukebox of an Allay.
    • Force an Allay to duplicate or dance.
  • #​7361 Adds an effect and condition for whether axolotls are playing dead.
  • #​7362 Updates sleeping related syntaxes to support bats, foxes and villagers.
  • #​7365 Adds effect to make a player sprint, adds a condition to check if a camel is using its dash ability.
  • #​7386 Adds ability to check if an entity is riding a specific other entity. Prevents error when trying to make an entity ride itself.
  • #​7415 Adds ability to get and change the simulation and view distances on Paper servers.
  • #​7453 Adds support for specifying slots in the armor change event like on helmet change.
  • #​7479 Adds syntax related to goats.
  • #​7480 Adds Enderman related syntaxes:
    • Check or change the block an Enderman is carrying.
    • Make Enderman randomly teleport or towards an entity.
    • Check if an Enderman is being stared at.
  • #​7532 Adds a config option for the number of variable changes required to trigger a save.
  • #​7550 Adds various math functions:
    • mean(numbers)
    • median(numbers)
    • factorial(number)
    • root(number, number)
    • permutation(number, number)
    • combination(number, number)
  • #​7554 Moves the "invulnerability time" expression to support timespans and deprecates the tick-based version.
  • #​7564 Allows modifying the persistence of entities and blocks, and allows modifying whether entities should despawn when the player is far away.
  • #​7586 Adds spanish language option.
  • #​7597 Adds checking for whether a ghast is charging its fireball and adds getting and changing the explosive power of a ghast's fireball.
  • #​7683 Added support for fishing states and generic fishing state change event.
  • #​7701 Adds an expression to treat a list as if it is of the form a, b, or c rather than a, b, and c: if {_X} is any of {_possibilities::*}.
  • #​7702 Adds an expression to change phantom and slime entity sizes.
  • #​7709 Adds past event-item, future event-item, and event-slot to the armor change event.
  • #​7714 Adds the entity shoot bow event, as well as some expressions for it.
  • #​7722 Adds the ability to clarify the type of a literal, allowing e.g. black (wolf color) or black (color).
  • #​7747 Adds support for interacting with pandas.
  • #​7750 Adds support for obtaining items with/without their tooltip.
Changes
  • #​7276 Changes the pattern of last colour of %string%, adds support for returning colour objects, the first colour, and all colours.
  • #​7287 Improves the check for what types Skript attempts to compare by comparing super classinfos.
  • #​7317 Adds examples to the location type.
  • #​7440 Enforces the use of effect when using the type potion effect type.
  • #​7442 Merges ExprWeather and ExprPlayerWeather to resolve syntax conflicts.
  • #​7492 Allows the use of minecraft ids to refer to items: minecraft:oak_log.
  • #​7547 Allows checking whether something is within multiple objects, e.g. if player is in world "world" or world "world_nether".
  • #​7549 Allows using skript tag as an alternative for custom tag.
  • #​7552 Allows using multiple numbers in the rounding expression.
  • #​7602 Adds support for using experience as a regular number, allowing for arithmetic like 5 xp + 10.
  • #​7622 Adds syntax that allows the user to improve the clarity of using experiment.
  • #​7694 Allows itemstack as another way to reference the item type.
  • #​7704 Adds support for with all item flags.
  • #​7708 Adds support for using armour instead of armor.
  • #​7716 Improves the errors for when a single value is passed, where multiple are expected.
  • #​7762 Improves the registration and internal organization of the 'bell events'.
Bug Fixes
  • #​7431 Fixes the order of in which sections are printed in debug mode.
  • #​7566 Improved condition classes and added missing method overrides.
  • #​7599 Changes how event-values are determined to avoid possible conflicts when 2 or more values could apply.
  • #​7665 Ensures EffSort's input expression always returns a single value.
  • #​7669 Fixes issue when using player in entity move event.
  • #​7679 Fixes some incorrectly configured documentation annotations for events.
  • #​7696 Fixes decorated pot and bookshelf item comparisons.
  • #​7688 Fixes an issue where damage component were added to undamaged items.
  • #​7713 Fixes an issue with comparing inventory slots.
  • #​7717 Fixes an issue when using integers in the radians expression.
  • #​7744 Fixes an issue where spawning a tropical fish of a specific type would spawn the incorrect type.
Removals
  • #​7638 Removes undocumented expression [is] event cancelled as it has been superseded by CondCancelled for years.
API Changes
  • #​7478 Deprecates Skript's EquipSlot in favour of Bukkit's EquipmentSlot.
  • #​7512 Adds changers for event-values.
  • #​7530 Adds a utility entry data for nesting entries.
  • #​7548 Adds a canLoad() method to AddonModule for controlling whether a module should be initialized and then loaded.
  • #​7575 Adds an ExperimentalSyntax that syntax elements can implement to state that the element requires an experiment to be enabled in order to use it.

Click here to view the full list of commits made since 2.10.2

Notices
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.10.2: Patch Release 2.10.2

Compare Source

Skript 2.10.2

Skript 2.10.2 is here with some more bug fixes and some docs enhancements!

We would like to welcome two new additions to the team, who will be focused mainly on triaging issues and bug fixes:
@​Burbulinis
@​TheMug06
Thank you to everyone who applied!

We are also updating our release schedule, which you can view here. To summarize the changes, we are introducing minor feature releases in April and October, which will be focused on additions and minimize breaking changes. This is to keep the update size more reasonable and to be quicker about responding to Minecraft's 'drops' update system. This means 2.11 will be next month, rather than in July.

As always, you can report any issues on our issue tracker.

Happy Skripting!

Changelog
Bug Fixes
  • #​7499 Fixes empty event requirement sections in the docs.
  • #​7513 Fixes issue with getting blocks between two locations.
  • #​7584 Updates the compass target expression's description to include 1.21.4 behavior changes.
  • #​7591 Adds a vehicle class-info to allow event-vehicle to work properly.
  • #​7603 Fixes a bad example in the text display alignment examples.
  • #​7632 Fixes an internal test for dates that was intermittently failing.
  • #​7641 Fixes issues with using various projectile entity datas, like fireballs and wind charges
  • #​7646 Fixes decimal multiplication/division with timespans resulting in truncated values.
  • aliases#123 Fixes brick/bricks confusion with item names.
  • aliases#125 Fixes issue when checking whether an entity is a wind charge.
API Changes
  • #​7470 Adds an Example annotation that can be applied multiple times, intended to eventually replace Examples. See PR for details.
  • #​7558 Allows the test platform to run on a Spigot server. This is not supported and may cause test failures among the existing tests if used.
  • #​7633 Improves the consistency and information provided by Skript's generated JSON documentation.

Click here to view the full list of commits made since 2.10.1

Notices
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.10.1: Patch Release 2.10.1

Compare Source

Skript 2.10.1

Skript 2.10.1 is here to address some of the most prominent issues reported with 2.10.0.

As always, you can report any issues on our issue tracker.

Happy Skripting!

Breaking Changes

There have been a few minor breaking changes:

  • When using "send" in the 'connect' effect, "server" is now a required keyword.
  • Removed the pattern "[a] %*color% %bannerpatterntype%"
Changelog
Bug Fixes
  • #​7450 Fixes an issue where tag lookups for the 'tag' expression would not check all possible tag sources.
  • #​7455 Fixes an issue with the experimental queue serialization.
  • #​7474 Fixes an issue where using 'or' in the 'is tagged' condition would not check against all tags.
  • #​7503 Fixes an issue where getting or changing the name of a block did not work.
  • #​7519 Fixes a syntax conflict between the 'send' effect and the 'connect' effect.
  • #​7521 Fixes multiple issues with 'fishing' documentation.
  • #​7525 Fixes an issue where the 'wearing' condition could check invalid slots, resulting in an exception.
  • #​7527 Fixes an issue where checking whether something is tagged as a different type (e.g. check if an entity is tagged as a type of item) would result in an exception.
  • #​7528 Fixes an issue where loot tables could not be serialized.
  • #​7537 Fixes an issue where the 'for each' loop did not fully iterate over the elements.
  • #​7540 Fixes an issue where some language entries could mistakenly be associated with non-Minecraft additions (e.g. custom biomes).
  • #​7546 Removes the pattern "[a] %*color% %bannerpatterntype%" which caused significant parsing slowdowns in some Skript environments.
  • #​7557 Fixes an issue where the tests could fail if a locale other than English was used.
  • #​7559 Fixes an issue where some syntaxes contained "the" multiple times at the beginning.
  • #​7570 Fixes an issue where date variables from older versions would fail to load on 2.10.0.
API Changes
  • #​7526 Added support for regex-based highlighting for runtime errors.

Click here to view the full list of commits made since 2.10.0

Notices
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.10.0: Feature Release 2.10.0

Compare Source

Skript 2.10.0

We are excited to share that Skript 2.10.0 is now available! It is one of our largest updates, with more than 150 new features, bug fixes, and API updates to play around with!

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.10.1 on February 1st to address any immediate issues that are spotted with this release. Should it be necessary, an emergency patch release may come before then.

Happy Skripting!

Major Changes

[!IMPORTANT]
Support for Minecraft versions below 1.19.4 has been dropped.
This means that 1.19.4, 1.20.6, and 1.21.3/1.21.4 are the only supported versions. Going forward, Skript will only support the three latest major Minecraft versions.
In addition, Skript now requires Java 17 to run. While most users are running Java 17 or newer, some may be required to update for this version.

[!WARNING]
Some addons may fail to load with 2.10.
Due to the removal of long-deprecated API, outdated addons may fail to load while others will print a warning on start up. In some cases, an addon may only need to be recompiled to work with 2.10.

[!CAUTION]
Aliases are going away! Your scripts may break if you do not take action.
This means a lot of item names will be changing to match their in-game ids. In addition, categories and blockdata aliases will also be going away, replaced by tags and blockdata respectively.

rabbit's foot -> rabbit foot
gold helmet -> golden helmet
any sword -> tag "swords"
waterlogged oak stairs -> oak_stairs[waterlogged=true]

If you do not want to make changes to your scripts, the old aliases will be provided with each Skript release, so you can continue to use them if you prefer.
See this discussion for more details.

Minecraft Tags

Skript now supports the ability to use Minecraft tags (#minecraft:swords, #minecraft:logs, etc.). These are being introduced as a replacement for the current category aliases (any sword, any log) and should provide much more flexibilty. You can even create your own tags!

set {_tag} to tag "swords"
give the player a random item out of {_tag}'s tag values
if the player's tool is tagged as item tag "minecraft:piglin_food":
    send "Yum!"
register an item tag named "my_favorite_blocks" using oak log, stone, and podzol
Display Entities

The long-awaited support for display entities is finally here! 2.10 includes a lot of syntax for creating, manipulating, and using display entities.

spawn an oak log block display at player:
    set the display scale of the display to vector(1, 10, 1)
    set the display translation of the display to vector(0.5, 0.5, 0.5)
    rotate display around its local y axis by 45 degrees
    set the view range of display to 2

More display syntax can be found on the docs.

Variable Starting Character Reservations

Some characters are reserved at the start of variable names. Users will receive a warning when trying to use them.
This is so that these characters will be available for special variable functionality in future versions.

The following characters are reserved:

  • {~variable}
  • {.variable}
  • {$variable}
  • {!variable}
  • {&variable}
  • {^variable}
  • {*variable}
  • {+variable}
  • {-variable}
Registration API (Preview)

[!CAUTION]
This is a preview feature, meaning it is subject to breaking changes without a deprecation period.

This update includes the initial preview of a new Skript/Addon API, starting with addon registration and syntax registration.

The main Skript (JavaPlugin) class now has a new method, instance(), which provides access to the modern Skript class. This class contains the registered addons and the new SyntaxRegistry, which holds all of Skript's (and its addon's) registered syntax.

A tutorial with full usage information will be coming in the near future. For now, the full details are available at the pull request.

🧪 Experimental Features

Experimental features allow users to enable syntax on a per-script basis: some of these features are new proposals that we are testing, others may have unsafe or complex elements that regular users don't want.

Experimental features can be enabled by adding 'using %feature name%' at the top of a script.

Please note that anything marked as experimental is subject to changes in future versions.

For-Each Loop

A new kind of loop syntax that stores the loop index and value in variables for convenience.

This can be used to avoid confusion when nesting multiple loops inside each other.

for {_index}, {_value} in {my list::*}:
    broadcast "%{_index}%: %{_value}%"
for each {_player} in all players:
    send "Hello %{_player}%!" to {_player}

All existing loop features are also available in this section.

Enabling Flag
using for loops
Queue

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.

Enabling Flag
using queues
Script Reflection

This feature includes:

  • The ability to reference a script in code.
  • Finding and running functions by name.
  • Reading configuration files and values.
Enabling Flag
using script reflection
⚠ Breaking Changes
  • Out-of-range dates will now return '0 seconds' instead of 'none' in the 'time since' expression:
if time since {_date} is less than 3 seconds:

# Previously, if {_date} was in the future, this would be false.

# Now, this is true, since `time since {_date}` evaluates to 0 seconds.

# These situations will not change:

# {_date} more than 3 seconds ago     -> false
# {_date} between 0 and 3 seconds ago -> true
  • The existing 'fish' event has been replaced by more specific and useful events.
  • The 'kill' effect now bypasses totems of undying.
  • For the 'script' effect, support for using 'skript %string%' was removed. Simply use 'script %string%' or 'skript file %string%'.
  • The 'future event-block' in the 'block break' event was removed. It did not work in many cases due to API limitations.
  • In the VariablesStorage class, the field 'databaseName' is no longer 'protected', and the constructor parameter now represents the database type rather than name. See #​7074 for full details.
  • In the Skript class, the syntax element info getters (e.g. 'getStatements') now return unmodifiable collections.
  • Numerous API classes were deprecated, and many long deprecated API classes were removed. As a result, addons will need to be recompiled against 2.10 to work. See the pull request for full details.
Changelog
Changes Since 2.10.0-pre1
  • #​7333 Fixed multiple issues with and expanded the experimental Registration API.
  • #​7340 Added support for using enchantment types with the 'type of' expression.
  • #​7356 Improved compatibility with legacy/abandoned addons.
  • #​7357 Fixed an issue where the documentation for the 'fishing' events was missing.
  • #​7359 Expanded the 'value' expression to be used by addons.
  • #​7363 Improved the safety of internal changing methods.
  • #​7364 Improved the internal handling of potion effect types.
  • #​7368 Fixed an issue where documentation collision checking always reported at least one collision.
  • #​7370 Improved the documentation for the 'name' expression.
  • #​7374 Fixed an issue where the 'fire burn duration' expression would cause an error.
  • #​7381 Added support for using multiple lines in the 'Since' documentation annotation.
  • #​7382 Improved the backwards compatibility of EventValues registration.
  • #​7383 Fixed a few issues with the construction of runtime error messages.
  • #​7391 Added support for listening for multiple commands for an 'command' event.
  • #​7392 Fixed an issue where the 'current input key' expression and condition would have issues in the 'key input' event if a delay was present.
  • #​7398 Fixed an issue where some syntax failed to work in an effect command.
  • #​7400 Fixed an issue where the '/skript test' command failed to report all test failures.
  • #​7402 Improved the highlighting API for runtime errors.
  • #​7404 Added an additional pattern to the 'vector from yaw and pitch' expression to improve its flexibility.
  • #​7409 Fixed an issue where section expressions reported (printed) their first error twice.
  • #​7410 Fixed an issue where some exceptions would be silently caught and not reported.
  • #​7424/#​7425 Fixed multiple issues related to the updated configuration loading/conversion process.
  • #​7426 Updated the description of the 'kill' effect to better reflect its updates.
  • #​7428 Fixed an issue where the 'tag contents' expression did not properly compute its return type.
  • #​7430 Updated and fixed issues with the example scripts.
  • #​7444 Adds examples for the experimental features in this version.
Additions
  • #​5518 Adds support for obtaining multiple random numbers at once with the 'random numbers' expression.
  • #​5601 Adds syntax for working with display entities. Involves spawning, translating, scaling, rotating, and many other interations with displays.
  • #​6203 Adds a 'time until' expression along with a condition for whether a date is in the past or future.
  • #​6419 Adds an expression for changing the custom chat completions of players.
  • #​6427 Adds support for entity leashing events.
  • #​6439 Adds a '/skript list' command which displays the current enabled and disabled scripts.
  • #​6498 Adds support for teleport flags to the 'teleport' effect. Teleport flags allow retaining entity properties such as position and direction during a teleport.
  • #​6532 Adds the entity potion effect event, which occurs when an entity gains or loses an effect.
  • #​6562 Adds experimental support for a 'for each index/value' loop syntax.
  • #​6638 Adds syntax for interacting with the enchantment glint of an item.
  • #​6698 Adds support for the changing of max stack sizes for items and inventories.
  • #​6719 Adds experimental support for configuration reading and navigation.
  • #​6741 Adds the ability to use gamemodes with the 'is invulnerable' condition.
  • #​6768 Adds the piglin barter event (with barter input & output expressions).
  • #​6780 Adds a configuration option for all operators to see information when a script is reloaded.
  • #​6849 Adds a condition to check whether an entity is saddled.
  • #​6849 Adds support for wolf armor in the 'is wearing' condition and the 'equip' effect.
  • #​6850 Adds an effect to tame an entity and a condition to test whether an entity is tamed.
  • #​6851 Adds a configuration option to limit the number of variable backup files stored.
  • #​6859 Adds an expression to get the command of a command block, as well as a condition and effect to check and set the conditionality of a command block.
  • #​6860 Adds support for using wither projectiles in the 'is charged' condition and 'charge' effect.
  • #​6861 Adds an expression to get or modify the taming level of horses.
  • #​6867 Adds non-player (other entity) support to the 'can see' condition and 'visibility' effect.
  • #​6898 Adds an effect to immediately detonate a creeper, tnt minecart, primed tnt, firework, or windcharge.
  • #​6900 Adds support for obtaining all entities within a cuboid region in the 'entities' expression.
  • #​6912 Adds a section to filter lists, like the filter expression but with the ability to retain indices.
  • #​6930 Adds the option to exclude trailing empty strings from the 'join/split' expression.
  • #​6958 Adds a warning that is printed when Skript is reloaded via '/reload' or similar means.
  • #​6960 Adds a warning for unreachable code (for example, code following a return effect in a function).
  • #​6970 Adds support for deleting/resetting the prefix/suffix of players.
  • #​6989 Adds a new option to the 'connect' effect for transfering players to a different server (using the transfer packet in 1.20.5+).
  • #​6997 Adds an explicit sort order to the sort effect.
  • #​7001 Adds support for using shortened timespan units in commands: /my_ban_command sovde 1y 2d 3s.
  • #​7013 Adds support for withers to the 'is charged' condition.
  • #​7019 Adds an expression to get various sounds of entities, like their death sound, fall damage sound, or sound for eating a certain item.
  • #​7028 Adds a list transformation (mapping) expression and effect.
  • #​7030 Adds support for using underscores in numbers for readability: 100_000_000.
  • #​7040 Adds an expression to get various sound of blocks, like their break sound, footstep sound, or place sound.
  • #​7041 Adds basic support for wolf variants.
  • #​7044 Adds proper support for using custom damage causes in the 'damage' effect.
  • #​7045 Adds a last death location expression for players.
  • #​7058 Improves the description of the 'sort' effect.
  • #​7061 Adds body armor support to the 'armor slot' expression. Body armor is for entities such as horses and wolves (e.g. horse armor and wolf armor).
  • #​7064 Adds experimental support for queues, a new type of data structure.
  • #​7065 Adds support for updating blocks without triggering physics updates.
  • #​7075 Adds an event for when blocks drop items when broken.
  • #​7076 Adds an expression for the experience pickup cooldown of players, as well as an event for when it changes.
  • #​7079 Adds events and syntax for beacons.
  • #​7083 Adds the ability to change the 'affected entities' in an 'area of effect cloud effect' event.
  • #​7086 Adds expressions to interact with the item flags of items.
  • #​7088 Adds syntax to show, hide, and check the visibility of the custom name of an entity.
  • #​7088 Adds a condition to check whether a mob was spawned from a spawner.
  • #​7088 Adds a condition to check whether an entity is currently ticking.
  • #​7088 Adds support for obtaining the maximum on-fire duration to the 'entity fire burn duration' expression.
  • #​7093 Improves existing syntax and adds new syntax for interacting with furnaces.
  • #​7094 Adds an effect to open/close the lids of lidded blocks (e.g. chests, shulker boxes), as well as a condition to check whether a lid is open or not.
  • #​7104 Adds a condition to check whether a number is evenly divisible by another.
  • #​7105 Adds syntax to obtain some client chat options on Paper servers, such as whether a player has chat coloring disabled.
  • #​7110 Adds syntax related to animal breeding and age.
  • #​7113 Adds 'add' and 'remove' change support to the 'metadata' expression.
  • #​7126 Adds automatically generated aliases for modded items. mod:item is accessible as mod's item or item from mod. This feature is not officially supported, as Skript does not officially support any modded platforms.
  • #​7127 Adds support for Minecraft tags and custom tags.
  • #​7129 Adds a specific error message to catch incorrect usages of 'pretty quotes' instead of the regular quotation mark character.
  • #​7130 Allows blockdata to be used as a filter for 'click' events.
  • #​7131 Adds a colors event-value to the 'firework' event.
  • #​7132 Adds support for obtaining the 'previous' and 'next' loop-values in a loop.
  • #​7136 Converts the shoot effect to an effect-section for more control.
  • #​7137 Adds new fishing events and syntax in place of the existing 'fish' event.
  • #​7139 Adds universal support for using 'x degrees' and 'x radians' to represent numbers. Radians will be converted to degrees, and degrees simply represent 'x' (i.e. it has no effects).
  • #​7166 Adds a function to format a number based on Java's DecimalFormat system.
  • #​7167 Adds support for regular expression replacement in the 'replace' effect.
  • #​7174 Adds item support to the 'skull owner' expression.
  • #​7190 Adds syntax for working with player input events, including the ability to listen for specific key presses and releases.
  • #​7215 Adds an expression to obtain the alpha, red, green, or blue value of a color.
  • #​7216 Adds syntax for interacting with the patterns of banners.
  • #​7220 Adds syntax for using entity snapshots, which represents an entity at a specific point in time.
  • #​7228 Adds a warning when running with server pausing enabled.
  • #​7233 Adds support for salmon size variants.
  • #​7235 Adds 'thrice' to the 'x times' expression.
  • #​7242 Adds advanced support for working with loot tables.
  • #​7250/#​7318 Add syntax for working with villager professions and types.
  • #​7260 Adds events for when vehicles move or collide.
  • #​7283 Adds the 'elytra boost' event and syntax for interacting with it.
  • #​7312 Adds a unicode tag for usage in text formatting.
  • #​7320 Adds support for using 'event-block' in command events for commands executed from a command block.
  • #​7334 Adds experimental support for advanced Script interaction and reflection.
    • #​6702 Adds a Script type and reworks existing script-related syntax to work with this new type.
    • #​6706 Improves the 'using' condition to support passing 'script' values rather than text.
    • #​6713 Adds dynamic function calling through new syntax.
    • #​6719 Adds configuration navigation syntax (e.g. working with the raw content of script files).
  • #​7340 Added support for using enchantment types with the 'type of' expression.
  • #​7391 Added support for listening for multiple commands for an 'command' event.
  • #​7404 Added an additional pattern to the 'vector from yaw and pitch' expression to improve its flexibility.
Bug Fixes
  • #​6970 Fixes an issue where the 'prefix/suffix' expression could error with some Vault-supporting plugins.
  • #​7023 Fixes performance issues with the 'book author' expression.
  • #​7055 Fixes the inability to spawn chest boats.
  • #​7124 Fixes incorrect use of 'wait' in tests.
  • #​7125 Fixes incorrect warnings when running tests.
  • #​7131 Fixes the firework event not properly filtering by color.
  • #​7163 Fixes the remove changer of variables so that it will only remove the first matching element in the list.
  • #​7165 Fixes expression conversion in some edge cases.
  • #​7185 Fixes several outstanding issues with boats.
  • #​7205 Fixes sound syntax in line with Minecraft changes.
  • #​7251 More types are able to be compared successfully.
  • #​7252 Fixes an issue where the incorrect event block was used in an 'ignition'.
  • #​7268 Fixes an issue where the using 'x of' expression with an invalid amount could cause an error.
  • #​7271 Fixes an issue where play sound on some Spigot-based servers would cause exceptions.
  • #​7279 Prevents illegal inventory types from being created.
  • #​7301 Fixes an error with boat data using any boat.
  • #​7304 Fixes an issue registering types with unusual plurals (gui, etc.).
  • #​7410 Fixed an issue where some exceptions would be silently caught and not reported.
  • #​7430 Updated and fixed issues with the example scripts.
  • #​7433 Fixed an issue where an internal error could occur due to missing event context.
Removals
  • #​7239 Removes the unnecessary download argument from skript command.
  • #​7338 Removes the 'future event-block' event-value for the 'block break' event. It did not work properly due to API limitations.
Changes
  • #​6203 Changes out-of-range dates to return '0 seconds' instead of 'none' for the 'time since' expression.
  • #​6609 Reserves some special characters at the start of variables.
  • #​6884 Effect commands are now enabled by default in the test environment server.
  • #​7073 Default names are now automatically generated for enum values missing language entries. This provides automatic support for some newer Minecraft content without waiting for a Skript update.
  • #​7084 Aliases loading is now performed asynchronously, slightly speeding up server starts.
  • #​7116 Improves the full message that is printed when Skript encounters an exception.
  • #​7148 Improves the kill effect, which now bypasses totems of undying.
  • #​7224 Improves the process in which configuration files are updated for new versions.
  • #​7308 Improves command suggestions and the output of the '/skript test' command.
  • #​7348 Adds two new test-only functions: 'line_separator' and 'file_separator'.
  • #​7364 Improved the internal handling of potion effect types.
  • #​7370 Improved the documentation for the 'name' expression.
API Changes
  • #​5552 Adds internal Skript API events, like script initialization and script load events.
  • #​5738 Documentation is now generated using GSON.
  • #​5809 Improvements to condition parsing order using condition types.
  • #​6246 Implements the initial preview of a completely new Registration API. See the pull request for full details.
  • #​6670 Removes numerous deprecated classes and deprecated many more. See the pull request for full details.
  • #​6728 Adds type converters for addons to support common properties such as 'name' and 'amount'. See the pull request description for full details.
  • #​6873 Allows multiple return types in an ExpressionEntryData.
  • #​6905 Raises the Java build version to 17.
  • #​6913 Automates alias submodule updates (pre-2.10 alias sunset).
  • #​6918 Applied new code conventions across the 'lang' package.
  • #​6993 Skript Timespans now implement the full Java time API, making them compatible with external resources.
  • #​7072 Supports assigning the indices of list variables in the SET change mode. See the pull request for full details.
  • #​7037 Adds Section Expressions, expressions that can have attached sections. Only one may be allowed in a given line.
  • #​7043 Exposes method to get the pattern strings of a property expression.
  • #​7047 Enforces a limit of one database per backing file/source.
  • #​7053 Adds support for asynchronous JUnit tests.
  • #​7057 Expands the Condition API to allow for compound conditions (complex nested conditions that evaluate lazily).
  • #​7097 Adds default supplier support for the 'EnumClassInfo' utility.
  • #​7106 Avoids sending join messages when testing to avoid complexities with mocking players.
  • #​7106 Update messages are no longer sent in the testing environment.
  • #​7107 Adds a method to get the syntax patterns for property conditions.
  • #​7142 Adds test world, block, and location expressions for use in tests.
  • #​7155 Adds API that allows syntaxes to throw runtime errors in a controlled manner.
  • #​7168 Adds a SyntaxStringBuilder utility class which makes syntax toString implementation simpler.
    • #​7244 Makes the builder return itself for convenience.
  • #​7169 Change 'expr' in PropertyExpression to @​UnknownNullability to avoid extraneous nullability warnings.
  • #​7175 Skript dates are now a type of Java date, making them compatible with external resources.
  • #​7189 Cleans up the Timespan class and proceeds with removing uses of deprecated methods.
  • #​7217 Adds utility methods for changing an item's meta using a consumer, along with a method for setting item meta on an object input (handling it being a slot, itemtype, etc.).
  • #​7240 Remove test checks for pre-1.19 versions and tests for legacy code.
  • #​7241 Fixes change-in-place for variables.
  • #​7245 Updates Paper API version for test environments.
  • #​7255 Adds a helper method 'Variables#withLocalVariables()' to make it easier to run sections with copied local variables.
  • #​7265 Adds event support for when the main Skript configuration is reloaded.
  • #​7267 Moves some namespaced key utilities.
  • #​7269 Improves registration methods for event values.
  • #​7281 Adds a method to syntax for specifying event compatibility.
  • #​7284 Adds a 'hasEntry' method for entry containers.
  • #​7285 Deprecates the getter class and replaces existing getters.
  • #​7341 Cleans up some unused registry classes.
  • #​7368 Fixes documentation IDs to not end in -2.
  • #​7381 Added support for using multiple lines in the 'Since' documentation annotation.

Click here to view the full list of commits made since 2.9.5

Notices
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.10.0-pre1: Pre-Release 2.10.0-pre1

Compare Source

Skript 2.10.0-pre1

Today, we are kicking off the new year with Skript 2.10.0 Pre-Release 1! As a pre-release, be warned that there may be bugs! We do not recommend running this version on your production servers. This release contains more than 150 new features, bug fixes, and API updates to play around with!

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

Happy Skripting!

Major Changes

[!IMPORTANT]
Skript has dropped support for Minecraft versions below 1.19.4. This means 1.19.4, 1.20.6, and 1.21.3/1.21.4 are the supported versions. Going forward, Skript will only support the latest 3 major Minecraft versions.
In addition, Skript now requires Java 17 to run. While most users are running Java 17 or newer, some may be required to update for this version.

[!WARNING]
Addons will likely not initially work with 2.10!
Due to the removal of the deprecated Converter class, many addons will need to be recompiled (no code changes) to work with 2.10.
Addon developers should only need to re-build against 2.10 to fix this issue.

[!CAUTION]
Aliases are going away! Your scripts may break if you do not take action.
This means a lot of item names will be changing to match their in-game ids. In addition, categories and blockdata aliases will also be going away, replaced by tags and blockdata respectively.

rabbit's foot -> rabbit foot
gold helmet -> golden helmet
any sword -> tag "swords"
waterlogged oak stairs -> oak_stairs[waterlogged=true]

If you do not want to make changes to your scripts, the old aliases will be provided along with each Skript release, so you can continue to use them if you'd like.
See here for more details.

Minecraft Tags

Skript now supports the ability to use Minecraft tags (#minecraft:swords, #minecraft:logs, etc.). These are being introduced as a replacement for the current category aliases (any sword, any log) and should provide much more flexibilty. You can even create your own tags!

set {_tag} to tag "swords"
give the player a random item out of {_tag}'s tag values
if the player's tool is tagged as item tag "minecraft:piglin_food":
    send "Yum!"
register an item tag named "my_favorite_blocks" using oak log, stone, and podzol
Display Entities

The long-awaited support for display entities is finally here! 2.10 includes a lot of syntax for creating, manipulating, and using display entities.

spawn an oak log block display at player:
    set the display scale of the display to vector(1, 10, 1)
    set the display translation of the display to vector(0.5, 0.5, 0.5)
    rotate display around its local y axis by 45 degrees
    set the view range of display to 2

More display syntax can be found on the docs.

Variable Starting Character Reservations

Some characters are reserved at the start of variable names. Users will receive a warning when trying to use them.
This is so that these characters will be available for special variable functionality in future versions.

The following characters are reserved:

  • {~variable}
  • {.variable}
  • {$variable}
  • {!variable}
  • {&variable}
  • {^variable}
  • {*variable}
  • {+variable}
  • {-variable}
Registration API (Preview)

[!CAUTION]
This is a preview feature, meaning it is subject to breaking changes without a deprecation period.

This update includes the initial preview of a new Skript/Addon API, starting with addon registration and syntax registration.

The main Skript (JavaPlugin) class now has a new method, instance(), which provides access to the modern Skript class. This class contains the registered addons and the new SyntaxRegistry, which holds all of Skript's (and its addon's) registered syntax.

A tutorial with full usage information will be coming in the near future. For now, the full details are available at the pull request.

🧪 Experimental Features

Experimental features allow users to enable syntax on a per-script basis: some of these features are new proposals that we are testing, others may have unsafe or complex elements that regular users don't want.

Experimental features can be enabled by adding 'using %feature name%' at the top of a script.

Please note that anything marked as experimental is subject to changes in future versions.

For-Each Loop

A new kind of loop syntax that stores the loop index and value in variables for convenience.

This can be used to avoid confusion when nesting multiple loops inside each other.

for {_index}, {_value} in {my list::*}:
    broadcast "%{_index}%: %{_value}%"
for each {_player} in all players:
    send "Hello %{_player}%!" to {_player}

All existing loop features are also available in this section.

Enabling Flag
using for loops
Queue

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.

Enabling Flag
using queues
Script Reflection

This feature includes:

  • The ability to reference a script in code.
  • Finding and running functions by name.
  • Reading configuration files and values.
Enabling Flag
using script reflection
⚠ Breaking Changes
  • Out-of-range dates will now return '0 seconds' instead of 'none' in the 'time since' expression:
if time since {_date} is less than 3 seconds:

# Previously, if {_date} was in the future, this would be false.

# Now, this is true, since `time since {_date}` evaluates to 0 seconds.

# These situations will not change:

# {_date} more than 3 seconds ago     -> false
# {_date} between 0 and 3 seconds ago -> true
  • The existing 'fish' event has been replaced by more specific and useful events.
  • The 'kill' effect now bypasses totems of undying.
  • For the 'script' effect, support for using 'skript %string%' was removed. Simply use 'script %string%' or 'skript file %string%'.
  • The 'future event-block' in the 'block break' event was removed. It did not work in many cases due to API limitations.
  • In the VariablesStorage class, the field 'databaseName' is no longer 'protected', and the constructor parameter now represents the database type rather than name. See #​7074 for full details.
  • In the Skript class, the syntax element info getters (e.g. 'getStatements') now return unmodifiable collections.
  • Numerous API classes were deprecated, and many long deprecated API classes were removed. As a result, addons will need to be recompiled against 2.10 to work. See the pull request for full details.
Changelog
Additions
  • #​5518 Adds support for obtaining multiple random numbers at once with the 'random numbers' expression.
  • #​5601 Adds syntax for working with display entities. Involves spawning, translating, scaling, rotating, and many other interations with displays.
  • #​6203 Adds a 'time until' expression along with a condition for whether a date is in the past or future.
  • #​6419 Adds an expression for changing the custom chat completions of players.
  • #​6427 Adds support for entity leashing events.
  • #​6439 Adds a '/skript list' command which displays the current enabled and disabled scripts.
  • #​6498 Adds support for teleport flags to the 'teleport' effect. Teleport flags allow retaining entity properties such as position and direction during a teleport.
  • #​6532 Adds the entity potion effect event, which occurs when an entity gains or loses an effect.
  • #​6562 Adds experimental support for a 'for each index/value' loop syntax.
  • #​6638 Adds syntax for interacting with the enchantment glint of an item.
  • #​6698 Adds support for the changing of max stack sizes for items and inventories.
  • #​6719 Adds experimental support for configuration reading and navigation.
  • #​6741 Adds the ability to use gamemodes with the 'is invulnerable' condition.
  • #​6768 Adds the piglin barter event (with barter input & output expressions).
  • #​6780 Adds a configuration option for all operators to see information when a script is reloaded.
  • #​6849 Adds a condition to check whether an entity is saddled.
  • #​6849 Adds support for wolf armor in the 'is wearing' condition and the 'equip' effect.
  • #​6850 Adds an effect to tame an entity and a condition to test whether an entity is tamed.
  • #​6851 Adds a configuration option to limit the number of variable backup files stored.
  • #​6859 Adds an expression to get the command of a command block, as well as a condition and effect to check and set the conditionality of a command block.
  • #​6860 Adds support for using wither projectiles in the 'is charged' condition and 'charge' effect.
  • #​6861 Adds an expression to get or modify the taming level of horses.
  • #​6867 Adds non-player (other entity) support to the 'can see' condition and 'visibility' effect.
  • #​6898 Adds an effect to immediately detonate a creeper, tnt minecart, primed tnt, firework, or windcharge.
  • #​6900 Adds support for obtaining all entities within a cuboid region in the 'entities' expression.
  • #​6912 Adds a section to filter lists, like the filter expression but with the ability to retain indices.
  • #​6930 Adds the option to exclude trailing empty strings from the 'join/split' expression.
  • #​6958 Adds a warning that is printed when Skript is reloaded via '/reload' or similar means.
  • #​6960 Adds a warning for unreachable code (for example, code following a return effect in a function).
  • #​6970 Adds support for deleting/resetting the prefix/suffix of players.
  • #​6989 Adds a new option to the 'connect' effect for transfering players to a different server (using the transfer packet in 1.20.5+).
  • #​6997 Adds an explicit sort order to the sort effect.
  • #​7001 Adds support for using shortened timespan units in commands: /my_ban_command sovde 1y 2d 3s.
  • #​7013 Adds support for withers to the 'is charged' condition.
  • #​7019 Adds an expression to get various sounds of entities, like their death sound, fall damage sound, or sound for eating a certain item.
  • #​7028 Adds a list transformation (mapping) expression and effect.
  • #​7030 Adds support for using underscores in numbers for readability: 100_000_000.
  • #​7040 Adds an expression to get various sound of blocks, like their break sound, footstep sound, or place sound.
  • #​7041 Adds basic support for wolf variants.
  • #​7044 Adds proper support for using custom damage causes in the 'damage' effect.
  • #​7045 Adds a last death location expression for players.
  • #​7058 Improves the description of the 'sort' effect.
  • #​7061 Adds body armor support to the 'armor slot' expression. Body armor is for entities such as horses and wolves (e.g. horse armor and wolf armor).
  • #​7064 Adds experimental support for queues, a new type of data structure.
  • #​7065 Adds support for updating blocks without triggering physics updates.
  • #​7075 Adds an event for when blocks drop items when broken.
  • #​7076 Adds an expression for the experience pickup cooldown of players, as well as an event for when it changes.
  • #​7079 Adds events and syntax for beacons.
  • #​7083 Adds the ability to change the 'affected entities' in an 'area of effect cloud effect' event.
  • #​7086 Adds expressions to interact with the item flags of items.
  • #​7088 Adds syntax to show, hide, and check the visibility of the custom name of an entity.
  • #​7088 Adds a condition to check whether a mob was spawned from a spawner.
  • #​7088 Adds a condition to check whether an entity is currently ticking.
  • #​7088 Adds support for obtaining the maximum on-fire duration to the 'entity fire burn duration' expression.
  • #​7093 Improves existing syntax and adds new syntax for interacting with furnaces.
  • #​7094 Adds an effect to open/close the lids of lidded blocks (e.g. chests, shulker boxes), as well as a condition to check whether a lid is open or not.
  • #​7104 Adds a condition to check whether a number is evenly divisible by another.
  • #​7105 Adds syntax to obtain some client chat options on Paper servers, such as whether a player has chat coloring disabled.
  • #​7110 Adds syntax related to animal breeding and age.
  • #​7113 Adds 'add' and 'remove' change support to the 'metadata' expression.
  • #​7126 Adds automatically generated aliases for modded items. mod:item is accessible as mod's item or item from mod. This feature is not officially supported, as Skript does not officially support any modded platforms.
  • #​7127 Adds support for Minecraft tags and custom tags.
  • #​7129 Adds a specific error message to catch incorrect usages of 'pretty quotes' instead of the regular quotation mark character.
  • #​7130 Allows blockdata to be used as a filter for 'click' events.
  • #​7131 Adds a colors event-value to the 'firework' event.
  • #​7132 Adds support for obtaining the 'previous' and 'next' loop-values in a loop.
  • #​7136 Converts the shoot effect to an effect-section for more control.
  • #​7137 Adds new fishing events and syntax in place of the existing 'fish' event.
  • #​7139 Adds universal support for using 'x degrees' and 'x radians' to represent numbers. Radians will be converted to degrees, and degrees simply represent 'x' (i.e. it has no effects).
  • #​7166 Adds a function to format a number based on Java's DecimalFormat system.
  • #​7167 Adds support for regular expression replacement in the 'replace' effect.
  • #​7174 Adds item support to the 'skull owner' expression.
  • #​7190 Adds syntax for working with player input events, including the ability to listen for specific key presses and releases.
  • #​7215 Adds an expression to obtain the alpha, red, green, or blue value of a color.
  • #​7216 Adds syntax for interacting with the patterns of banners.
  • #​7220 Adds syntax for using entity snapshots, which represents an entity at a specific point in time.
  • #​7228 Adds a warning when running with server pausing enabled.
  • #​7233 Adds support for salmon size variants.
  • #​7235 Adds 'thrice' to the 'x times' expression.
  • #​7242 Adds advanced support for working with loot tables.
  • #​7250/#​7318 Add syntax for working with villager professions and types.
  • #​7260 Adds events for when vehicles move or collide.
  • #​7283 Adds the 'elytra boost' event and syntax for interacting with it.
  • #​7312 Adds a unicode tag for usage in text formatting.
  • #​7320 Adds support for using 'event-block' in command events for commands executed from a command block.
  • #​7334 Adds experimental support for advanced Script interaction and reflection.
    • #​6702 Adds a Script type and reworks existing script-related syntax to work with this new type.
    • #​6706 Improves the 'using' condition to support passing 'script' values rather than text.
    • #​6713 Adds dynamic function calling through new syntax.
    • #​6719 Adds configuration navigation syntax (e.g. working with the raw content of script files).
Bug Fixes
  • #​6970 Fixes an issue where the 'prefix/suffix' expression could error with some Vault-supporting plugins.
  • #​7023 Fixes performance issues with the 'book author' expression.
  • #​7055 Fixes the inability to spawn chest boats.
  • #​7124 Fixes incorrect use of 'wait' in tests.
  • #​7125 Fixes incorrect warnings when running tests.
  • #​7131 Fixes the firework event not properly filtering by color.
  • #​7163 Fixes the remove changer of variables so that it will only remove the first matching element in the list.
  • #​7165 Fixes expression conversion in some edge cases.
  • #​7185 Fixes several outstanding issues with boats.
  • #​7205 Fixes sound syntax in line with Minecraft changes.
  • #​7251 More types are able to be compared successfully.
  • #​7252 Fixes an issue where the incorrect event block was used in an 'ignition'.
  • #​7268 Fixes an issue where the using 'x of' expression with an invalid amount could cause an error.
  • #​7271 Fixes an issue where play sound on some Spigot-based servers would cause exceptions.
  • #​7279 Prevents illegal inventory types from being created.
  • #​7301 Fixes an error with boat data using any boat.
  • #​7304 Fixes an issue registering types with unusual plurals (gui, etc.).
Removals
  • #​7239 Removes the unnecessary download argument from skript command.
  • #​7338 Removes the 'future event-block' event-value for the 'block break' event. It did not work properly due to API limitations.
Changes
  • #​6203 Changes out-of-range dates to return '0 seconds' instead of 'none' for the 'time since' expression.
  • #​6609 Reserves some special characters at the start of variables.
  • #​6884 Effect commands are now enabled by default in the test environment server.
  • #​7073 Default names are now automatically generated for enum values missing language entries. This provides automatic support for some newer Minecraft content without waiting for a Skript update.
  • #​7084 Aliases loading is now performed asynchronously, slightly speeding up server starts.
  • #​7116 Improves the full message that is printed when Skript encounters an exception.
  • #​7148 Improves the kill effect, which now bypasses totems of undying.
  • #​7224 Improves the process in which configuration files are updated for new versions.
  • #​7308 Improves command suggestions and the output of the '/skript test' command.
  • #​7348 Adds two new test-only functions: 'line_separator' and 'file_separator'.
API Changes
  • #​5552 Adds internal Skript API events, like script initialization and script load events.
  • #​5738 Documentation is now generated using GSON.
  • #​5809 Improvements to condition parsing order using condition types.
  • #​6246 Implements the initial preview of a completely new Registration API. See the pull request for full details.
  • #​6670 Removes numerous deprecated classes and deprecated many more. See the pull request for full details.
  • #​6728 Adds type converters for addons to support common properties such as 'name' and 'amount'. See the pull request description for full details.
  • #​6873 Allows multiple return types in an ExpressionEntryData.
  • #​6905 Raises the Java build version to 17.
  • #​6913 Automates alias submodule updates (pre-2.10 alias sunset).
  • #​6918 Applied new code conventions across the 'lang' package.
  • #​6993 Skript Timespans now implement the full Java time API, making them compatible with external resources.
  • #​7072 Supports assigning the indices of list variables in the SET change mode. See the pull request for full details.
  • #​7037 Adds Section Expressions, expressions that can have attached sections. Only one may be allowed in a given line.
  • #​7043 Exposes method to get the pattern strings of a property expression.
  • #​7047 Enforces a limit of one database per backing file/source.
  • #​7053 Adds support for asynchronous JUnit tests.
  • #​7057 Expands the Condition API to allow for compound conditions (complex nested conditions that evaluate lazily).
  • #​7097 Adds default supplier support for the 'EnumClassInfo' utility.
  • #​7106 Avoids sending join messages when testing to avoid complexities with mocking players.
  • #​7106 Update messages are no longer sent in the testing environment.
  • #​7107 Adds a method to get the syntax patterns for property conditions.
  • #​7142 Adds test world, block, and location expressions for use in tests.
  • #​7155 Adds API that allows syntaxes to throw runtime errors in a controlled manner.
  • #​7168 Adds a SyntaxStringBuilder utility class which makes syntax toString implementation simpler.
    • #​7244 Makes the builder return itself for convenience.
  • #​7169 Change 'expr' in PropertyExpression to @​UnknownNullability to avoid extraneous nullability warnings.
  • #​7175 Skript dates are now a type of Java date, making them compatible with external resources.
  • #​7189 Cleans up the Timespan class and proceeds with removing uses of deprecated methods.
  • #​7217 Adds utility methods for changing an item's meta using a consumer, along with a method for setting item meta on an object input (handling it being a slot, itemtype, etc.).
  • #​7240 Remove test checks for pre-1.19 versions and tests for legacy code.
  • #​7241 Fixes change-in-place for variables.
  • #​7245 Updates Paper API version for test environments.
  • #​7255 Adds a helper method 'Variables#withLocalVariables()' to make it easier to run sections with copied local variables.
  • #​7265 Adds event support for when the main Skript configuration is reloaded.
  • #​7267 Moves some namespaced key utilities.
  • #​7269 Improves registration methods for event values.
  • #​7281 Adds a method to syntax for specifying event compatibility.
  • #​7284 Adds a 'hasEntry' method for entry containers.
  • #​7285 Deprecates the getter class and replaces existing getters.
  • #​7341 Cleans up some unused registry classes.

Click here to view the full list of commits made since 2.9.5

Notices
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.9.5: Patch Release 2.9.5

Compare Source

Skript 2.9.5

Skript 2.9.5 is here with a handful of new bug fixes. As always, you can report any issues on our issue tracker.

Happy Skripting!

Changelog
Tweaks
  • #​7232 Improved the documentation of the 'projectile hit' event to be up to date with the 'victim' syntax.
Bug Fixes
  • #​7062 Fixed an error that would occur when attempting to place blocks between two points above the world limit.
  • #​7120 Fixed an issue where various expressions (enchant effect, replace effect, vector expressions, etc.) would overwrite the indices of list variables used.
  • #​7152 Fixed an issue where player skull textures would not immediately load on Paper (loading is now forced).
  • #​7188 Fixed an issue where plural event values did not work with 'past' and 'future' time states.
  • #​7195 Fixed a few Turkish language mistakes.
  • #​7199 Fixed multiple issues with playing sounds on 1.21.3+.
  • #​7202 Fixed an error that could occur when using invalid regular expression patterns in the split expression.
  • #​7210 Fixed long overflow when performing arithmetic.
  • #​7230 Fixed an issue that could occur when trying to grow new tree types (e.g. pale oak).
API Additions
  • #​7120 Added a new 'Expression#changeInPlace()' method for changing the elements of an expression without changing the entire object. For example, this allows the values of a list variable to be updated while preserving the indices.
  • #​7207 Updated the 'Arithmetics#exactOperationExists' and 'Arithmetics#exactDifferenceExists' methods to be public. They act as a safe way to check arithmetic operation existence during the registration period.

Click here to view the full list of commits made since 2.9.4

Notices
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.9.4: Patch 2.9.4

Compare Source

Skript 2.9.4

Skript 2.9.4 is here with even more bug fixes and early support for Minecraft 1.21.3. As always, you can report any issues on our issue tracker.

Happy Skripting!

Changelog
Bug Fixes
  • #​7141 Fixes leather horse armor being unequipable.
  • #​7143 Fixed entries being case-sensitive, preventing using capital letters in entries like 'Usage: ' for commands.
Additions

This includes: Pale Garden biome, creaking entity, baby squid entity, baby glow squid entity, baby dolphin entity

Click here to view the full list of commits made since 2.9.3

Notices
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.9.3: Patch 2.9.3

Compare Source

Skript 2.9.3

Skript 2.9.3 is here with even more bug fixes. As always, you can report any issues on our issue tracker.

We are also excited to welcome six new members to our team! These new members were selected from the numerous applications we received, and they have already been hard at work troubleshooting issues, patching bugs, and building new features. The full list of new members is as follows:

Happy Skripting!

Changelog
Bug Fixes
  • #​7024 Fixed an error that could occur when using invalid inputs in the 'look at' effect.
  • #​7027 Fixed some bStats reporting issues from the recent changes.
  • #​7031 Fixed formatting issues when reloading a directory.
  • #​7036 Fixed numerous and/or warnings that occurred in the tests.
  • #​7038 Fixed the within condition returning wrong values when negated and given a null input.
  • #​7052 Fixed an issue where 'Dutch' was not one of the language options listed in the config.
  • #​7056 Fixed removing entries from the hover list in a server ping event.
  • #​7060 Fixed exponents capping at long max value.
  • #​7066 Fixed an issue where the 'swim toggle' event could be cancelled. An error is now printed as cancelling it has no effect.
  • #​7067 Fixed an internal testing issue with the parse structure.
  • #​7082 Fixed an issue with modifying world times.
  • #​7085 Fixed an error message that could occur from unregistered types in changers.
  • #​7087 Fixed an issue where legacy materials were used in places they shouldn't.
  • #​7091 Fixed a bug when setting the profile of a skull to an offline player without a username.
  • #​7121 Fixed a redundant material namespace check.
API Updates
  • #​6992 Removed the usage of Eclipse annotations package. The JetBrains annotations package is now preferred.
  • #​7089 Introduced an official checkstyle for code formatting warnings.
  • #​7095 Prevents delays from being used in the testing system (excluding JUnit).

Click here to view the full list of commits made since 2.9.2

Notices
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.9.2: Patch Release 2.9.2

Compare Source

Skript 2.9.2

Skript 2.9.2 is here with more bug fixes and a few minor additions and tweaks. As always, you can report any issues on our issue tracker.

Happy Skripting!

Changelog
Additions
  • #​6942 Added Dutch language support.
  • #​7008 Added support trial spawners in the spawner type syntax.
Tweaks
  • #​6984 Enhanced and expanded the BStats charts.
  • #​7023 Improved the performance of the 'book authors' expression.
Bug Fixes
  • #​5073 Fixed an issue where items did not work with the 'is of type' condition.
  • #​6936 Fixed an issue with unreliable parsing of quotes in command arguments.
  • #​6942 Fixed a mistake in the German language support.
  • #​6982 Fixed some cases of incorrect word pluralization.
  • #​6983 Fixed a faulty error message in the 'return' effect.
  • #​6988 Fixed input validation errors that could occur with the 'hover list' expression on newer versions.
  • #​6996 Fixed a concurrency issue with default variables.
  • #​7018 Fixed the localization of the 'horse jump strength' attribute.
  • #​7016/#​7022 Fixed additional version support issues with the 'play sound' effect.
  • #​7025 Fixed an issue with the 'vehicle' expression that could prevent Skript from loading on newer versions.

Click here to view the full list of commits made since 2.9.1

Notices
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.9.1: Patch Release 2.9.1

Compare Source

Skript 2.9.1

Skript 2.9.1 is here to resolve some of the most notable issues reported with 2.9.0. We will continue to assess stability and make fixes as necessary. As always, you can report any issues on our issue tracker.

Happy Skripting!

Changelog
Additions
  • #​6906 Added some additional spawn reasons from 1.21.
  • #​6919 Added 'pufferfish' as an alias for the 'puffer fish' entity data.
Tweaks
  • #​6854 Updated the display name of potion effect types from 'potion' to 'potion effect type'.
Bug Fixes
  • #​6897 Fixed an issue where sorting the indices of a list with children caused an error.
  • #​6909 Fixed an issue with Timespan#getAs(), which was breaking timespan arithmetic.
  • #​6910 Fixed an issue where the 'play sound' effect would cause runtime errors on some server versions.
  • #​6926 Fixed an issue where Skript could fail to start on some 1.21 server versions.
  • #​6932 Fixed an issue with the SimplifiedChinese translation that caused a startup error.
  • #​6947 Fixed an issue where the 'remaining air' expression would cause runtime errors.
  • #​6948 Fixed an issue where using some events would cause parsetime errors.
  • #​6949 Fixed an issue where reloading the aliases would not automatically regenerate missing aliases.

Click here to view the full list of commits made since 2.9.0

Notices
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.9.0: Feature Release 2.9.0

Compare Source

Skript 2.9.0

Skript 2.9.0 is here with dozens of new features, quality-of-life improvements, and bug fixes. Notably, this release includes support for Minecraft 1.21.

We especially want to thank the recent influx of new contributors, many of whom are included in this update. Every contributor means a little less work for the team and a little more progress for Skript, so please, if you want a feature in Skript, go ahead and try to make a pull request! New contributors are very welcome! You can review our contributing guide by clicking here.

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 new release model, we plan to release 2.9.1 on August 1st to address any immediate issues that are spotted with this release. Should it be necessary, an emergency patch release may come before then.

Happy Skripting!

Major Changes

[!IMPORTANT]
Skript now requires Java 11 to run. While most users are running Java 11 or newer, some may be required to update for this version. Java 11 is supported on all versions Skript supports.

  • Skript can now listen to events cancelled by other plugins! Your current scripts will behave the same as they always have, but there's now the option to listen to cancelled, uncancelled, or both kinds at once:
on break of stone:
    # Normal behavior, only listens to uncancelled break events.

on uncancelled break of stone:
    # Same as 'on break of stone', only uncancelled.
    
on cancelled break of stone:
    # Will only listen to cancelled events. For example, 
    # when Worldguard prevents a block break in a protected region.

on any break of stone:
    # Will listen to both cancelled and uncancelled events.
    # Finally, 'event is cancelled' will be useful!
    
on all break of stone:
    # Same as 'on any break of stone'.
  • Alternatively, you can set the new listen to cancelled events by default config option to true to allow events to listen to both uncancelled and cancelled events by default:
on break of stone:
    # Now listens to both cancelled and uncancelled events
    # if the config option is set to true.
  • Added a config option to allow case-insensitive commands, so your accidental capslock won't mess you up as much!

# default: only /test
# insensitive: /test, /TEST, /tEsT...
command /test:
    trigger:
        broadcast "test!"
  • Adds multi-line comments. Comments are opened and closed with three hashtags ### alone on a line.
    This is code
    ###
    |
    This is a comment
    |
    ###
    This is code (again)
    
    • Triple-hashtags in the middle of a line (e.g. hello ### there) will not start or end a comment.
  • Support for string 'concatenation'!
    • Text can be appended to other text (e.g. set {text} to "hello" + "there") with the addition operator.
    • The concat(...) function joins any text or objects together into a single text.
  • We have exposed the load default aliases option in config.sk, which allows you to tell Skript to only load aliases in the plugins/Skript/aliases folder. You can provide as many or as few (even none, if you want!) aliases as you like. We will provide the default folder in the GitHub release for your convenience.
⚠ Breaking Changes
  • # characters in strings no longer need to be doubled! Skript can now tell that you are writing a string and will not start a comment in the middle of it. This change means all your ## will now appear as two # instead of one! This won't break hex colours, those support either one or two #'s, but it may break other text!

# before:
"<##aabbcc>I'm ##&#8203;1, baby!" -> "I'm #&#8203;1, baby!"

# after
"<##aabbcc>I'm ##&#8203;1, baby!" -> "I'm ##&#8203;1, baby!"
"<#aabbcc>I'm #&#8203;1, baby!" -> "I'm #&#8203;1, baby!"
  • Timespans will now show the weeks and years instead of stopping at days:
broadcast "%{_timespan}%"
- "378 days and 20 minutes"
+ "1 year and 1 week and 6 days and 20 minutes"
  • The names of function parameters can no longer include the following characters: (){}\",.
  • newl and nline are no longer valid syntaxes for the newline expression, but new line is now valid.
  • As mentioned above, # characters in strings no longer need to be doubled. This will mean existing doubled #s will appear as two, rather than one.
  • The option to use non-air instead of solid in the highest solid block expression has been removed.
  • Using on teleport will now trigger for non-player entities. To detect only player teleports, use on player teleport.
Changelog
Additions
  • #​4661 Added support for using weeks, months, and years in timespans. They are treated as 7 days, 30 days, and 365 days respectively. Additionally, an expression to obtain a timespan as a specific unit of time (e.g. as hours, days, etc.).
  • #​5284 Added a lowest solid block expression for obtaining the lowest solid block at a location.
  • #​5298 Added the ability to directly set entity and player pitch/yaw.
  • #​5422 Added support for enforcing the whitelist and working with offline players for it.
  • #​5691 Added documentation details for whether an event can be cancelled.
  • #​5698 Added support for obtaining the player represented by a player head block.
  • #​6105 Added an expression to determine whether a player is connected rather than online. Specifically, is online may continue to return true for players that have disconnected and then reconnected.
  • #​6131 Added the ability to play sounds from entities and specify a sound seed (instead of it being randomized each time).
  • #​6160 Added the option of using breakable with the existing unbreakable syntaxes.
  • #​6164 Added more internal tests for item-related syntaxes.
  • #​6207 Added the ability to listen to cancelled events.
  • #​6272 Added Russian translations.
  • #​6334 Added an expression for obtaining the codepoint of a character and the character reresented by a codepoint.
  • #​6339 Added support for filtering a heal event by entity types and by heal reason.
  • #​6393 Added invincible as a synonym of invulnerable in related syntaxes.
  • #​6422 Added a distinction when using the actual part of the target block expression. When actual is used, the hitboxes of blocks will be considered.
  • #​6456 Added syntax for bells and bell events.
  • #​6506 Added a condition for whether an entity is pathfinding.
  • #​6530 Expanded the teleport event to trigger when non-player entities are teleported. NOTE: This means on teleport will now trigger for entities other than players. Use on player teleport for detecting only player teleports.
  • #​6549 Added support for suppressing deprecated syntax warnings.
  • #​6558 Added multi-line comments using ### (see above).
  • #​6576 Added support for combining strings using the addition (+) symbol.
  • #​6577 Added a configuration option to allow case-insensitive Skript commands.
  • #​6596 Added an event for when endermen become enraged.
  • #​6627 Added the ability to use expressions in the command usage entry.
  • #​6639 Added a condition, effect, and expression for managing the fire resistance property of an item.
  • #​6659 Added support for logging messages with warning and error severities.
  • #​6680 Added a configuration option to allow all events by default to trigger even when the event is already cancelled.
  • #​6712 Added an effect to show/hide item tooltips and a condition to check whether an item's tooltip is visible.
  • #​6737 Adds an effect to sort a list by an arbitrary mapping expression. (ex: sort {_list-of-players::*} by {hide-and-seek::%input%::score})
  • #​6748 Added a whether <condition> expression to get the boolean (true/false) representation of a condition (example: send "Flying: %whether player is flying%").
  • #​6749 Added support for dividing timespans by timespans to get numbers. (1 minute / 15 seconds = 4)
  • #​6791 Added support for numerous 1.21 attributes.
  • #​6687 Added support for using (not creating) custom enchantments and referencing enchantments by namespace/key.
  • #​6828 Added the ability to explictly delete the message in join/death/quit events.
  • #​6831 Added the ability to prevent online lookups when using the offlineplayer function.
  • #​6835 Added the ability to also kick a player when using the ban effect.
  • #​6895 Added support for 1.21 damage causes and spawn reasons.
Bug Fixes
  • #​5422 Fixed several issues that resulted in the whitelist condition returning incorrect results.
  • #​6573 Fixes is connected pattern to support only Paper server.
  • #​6797 Fixes issues with the last damage expression.
  • #​6803 Fixes an issue where custom maximum durability did not work for items with a custom durability.
  • #​6821 Fixes block datas not being cloned upon use.
  • #​6823 Fixes inability to get the location of a double chest via the inventory.
  • #​6832 Fixes a bug where potion types could not be compared.
  • #​6836 Fixes an issue when trying to remove air from an empty slot.
  • #​6846 Fixed an issue where obtaining the slot index of the player's tool did not work.
  • #​6870 Fixed an error that could occur when attempting to set the damage of an item to a negative number.
Removals
  • #​5606 Removed the warnings in the default variable test.
  • #​6505 Removed the player name/UUID in variables warning.
  • #​6673 Removed deprecated vector arithmetic syntax in favour of regular arithmetic.
Changes
  • #​5676 Made Player UUIDs used by default in variables for new config files. That is, {variable::%player%} is the same as {variable::%player's uuid%}. If you need to continue using the name, use {variable::%player's name%}. Variables will not automatically migrate. Click to view this discussion for further information.
  • #​5979 Updated the broadcast effect to trigger message broadcast event.
  • #​6361 Strengthened function header rules to prevent the usage of invalid headers.
  • #​6389 Modified element-wise comparision to support checking whether two and lists are equal.
  • #​6550/#​6694 enhance pattern keywords to improve parsing speeds.
  • #​6583 Comment parsing has been updated to allow single # characters within strings. Existing strings will need updated to remove duplicate # characters. This change does not affect hex color tags.
  • #​6733 Updated the new line expression to remove the options of nline and newl. Additionally, new line is now a valid option.
  • #​6834 Exposed the load default aliases config option.
API Changes
  • #​6118 Added a way to create returnable sections (a section that can return a value using the return effect)
  • #​6276 Fixed JUnit before and after methods being called on cleanup regardless of override.
  • #​6291 Added a parse result structure for testing scripts.
  • #​6306 Added additional parsing methods within SkriptParser.
  • #​6307 Added an exception that occurs when attempting to register an abstract class as syntax.
  • #​6349 Added a SectionExitHandler interface which allows Sections to define behavior when the exit or return syntax is used (and the section is exited).
  • #​6531 Added a ClassInfoReference system for getting more details about the usage of a ClassInfo in a script (e.g. plurality).
  • #​6551 Added support simple structures that do not have entries.
  • #​6556 Added element look-behind support for sectionless effect sections during init.
  • #​6568 Added function contracts, allowing functions to modify their return type/plurality based on their arguments.
  • #​6718 Added support for using strings as literals (e.g. %*string% in syntax)
  • #​6798 Added 1.21 support and modified ItemType#getRandom() to be nullable as not all Materials can be represented as an ItemStack.
  • #​6806 Switched more Skript-based types over to registries where possible.

Click here to view the full list of commits made since 2.8.7

Notices
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.9.0-pre2: Pre-Release 2.9.0-pre2

Compare Source

Skript 2.9.0-pre2

Skript 2.9.0 Pre-Release 2 is here to fix some issues that came with the first pre-release. As with any other pre-release, be warned that there may be bugs! We do not recommend running this version on your production servers. This release contains many new features and bug fixes, including support for Minecraft 1.21.

We especially want to thank the recent influx of new contributors, many of whom are included in this update. Every contributor means a little less work for the team and a little more progress for Skript, so please, if you want a feature in Skript, go ahead and try to make a pull request! New contributors are very welcome! You can review our contributing guide by clicking here.

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 new release model, we plan to release 2.9.0 on July 15th. We may release additional pre-releases before then should the need arise.

Happy Skripting!

Major Changes

[!IMPORTANT]
Skript now requires Java 11 to run. While most users are running Java 11 or newer, some may be required to update for this version. Java 11 is supported on all versions Skript supports.

  • Skript can now listen to events cancelled by other plugins! Your current scripts will behave the same as they always have, but there's now the option to listen to cancelled, uncancelled, or both kinds at once:
on break of stone:
    # Normal behavior, only listens to uncancelled break events.

on uncancelled break of stone:
    # Same as `on break of stone`, only uncancelled.
    
on cancelled break of stone:
    # Will only listen to cancelled events. For example, 
    # when Worldguard prevents a block break in a protected region.

on any break of stone:
    # Will listen to both cancelled and uncancelled events.
    # Finally, `event is cancelled` will be useful!
    
on all break of stone:
    # Same as `on any break of stone`.
  • Alternatively, you can set the new listen to cancelled events by default config option to true to allow events to listen to both uncancelled and cancelled events by default:
on break of stone:
    # Now listens to both cancelled and uncancelled events
    # if the config option is set to true.
  • Added a config option to allow case-insensitive commands, so your accidental capslock won't mess you up as much!

# default: only /test
# insensitive: /test, /TEST, /tEsT...
command /test:
    trigger:
        broadcast "test!"
  • Adds multi-line comments. Comments are opened and closed with three hashtags ### alone on a line.
    This is code
    ###
    |
    This is a comment
    |
    ###
    This is code (again)
    
    • Triple-hashtags in the middle of a line (e.g. hello ### there) will not start or end a comment.
  • Support for string 'concatenation'!
    • Text can be appended to other text (e.g. set {text} to "hello" + "there") with the addition operator.
    • The concat(...) function joins any text or objects together into a single text.
  • We have exposed the load default aliases option in config.sk, which allows you to tell Skript to only load aliases in the plugins/Skript/aliases folder. You can provide as many or as few (even none, if you want!) aliases as you like. We will provide the default folder in the GitHub release for your convenience.
⚠ Breaking Changes
  • # characters in strings no longer need to be doubled! Skript can now tell that you are writing a string and will not start a comment in the middle of it. This change means all your ## will now appear as two # instead of one! This won't break hex colours, those support either one or two #'s, but it may break other text!

# before:
"<##aabbcc>I'm ##&#8203;1, baby!" -> "I'm #&#8203;1, baby!"

# after
"<##aabbcc>I'm ##&#8203;1, baby!" -> "I'm ##&#8203;1, baby!"
"<#aabbcc>I'm #&#8203;1, baby!" -> "I'm #&#8203;1, baby!"
  • Timespans will now show the weeks and years instead of stopping at days:
broadcast "%{_timespan}%"
- "378 days and 20 minutes"
+ "1 year and 1 week and 6 days and 20 minutes"
  • The names of function parameters can no longer include the following characters: (){}\",.
  • newl and nline are no longer valid syntaxes for the newline expression, but new line is now valid.
  • As mentioned above, # characters in strings no longer need to be doubled. This will mean existing doubled #s will appear as two, rather than one.
  • The option to use non-air instead of solid in the highest solid block expression has been removed.
  • Using on teleport will now trigger for non-player entities. To detect only player teleports, use on player teleport.
Changelog
Pre-Release 2 Changes
  • #​6846 Fixed an issue where obtaining the slot index of the player's tool did not work.
  • #​6865 Fixed an issue with saving certain types of data in global variables.
  • #​6870 Fixed an error that could occur when attempting to set the damage of an item to a negative number.
  • #​6871 Fixed an issue where the text forms of enchantments displayed incorrectly.
  • #​6874 Fixed an error that would occur when attempting to use several inventory-related expressions on versions older than 1.21.
  • #​6876 Fixed an issue with plain item comparisons not working as expected.
  • #​6886 Fixed several item-related issues that could occur due to 1.21 changes.
  • #​6888 Fixed an issue where some internal item comparisons unexpectedly failed, causing issues with syntax such as the equip effect.

Click here to view the full list of commits made since 2.9.0-pre1

Additions
  • #​4661 Added support for using weeks, months, and years in timespans. They are treated as 7 days, 30 days, and 365 days respectively. Additionally, an expression to obtain a timespan as a specific unit of time (e.g. as hours, days, etc.).
  • #​5284 Added a lowest solid block expression for obtaining the lowest solid block at a location.
  • #​5691 Added documentation details for whether an event can be cancelled.
  • #​5698 Added support for obtaining the player represented by a player head block.
  • #​6105 Added an expression to determine whether a player is connected rather than online. Specifically, is online may continue to return true for players that have disconnected and then reconnected.
  • #​6164 Added more internal tests for item-related syntaxes.
  • #​6272 Added Russian translations.
  • #​6334 Added an expression for obtaining the codepoint of a character and the character reresented by a codepoint.
  • #​6422 Added a distinction when using the actual part of the target block expression. When actual is used, the hitboxes of blocks will be considered.
  • #​6530 Expanded the teleport event to trigger when non-player entities are teleported. NOTE: This means on teleport will now trigger for entities other than players. Use on player teleport for detecting only player teleports.
  • #​6549 Added support for suppressing deprecated syntax warnings.
  • #​6558 Added multi-line comments using ###.
This is code
###
|
This is a comment
|
###
This is code (again)
  • #​6576 Added support for combining strings using the addition (+) symbol.
  • #​6596 Added an event for when endermen become enraged.
  • #​6639 Added a condition, effect, and expression for managing the fire resistance property of an item.
  • #​6680 Added a configuration option to allow all events by default to trigger even when the event is already cancelled.
  • #​6712 Added an effect to show/hide item tooltips and a condition to check whether an item's tooltip is visible.
  • #​6748 Added a whether <condition> expression to get the boolean (true/false) representation of a condition (example: send "Flying: %whether player is flying%").
  • #​6791 Added support for numerous 1.21 attributes.
  • #​6687 Added support for using (not creating) custom enchantments and referencing enchantments by namespace/key.
Bug Fixes
  • #​5422 Fixes bugs with the whitelist condition.
  • #​6573 Fixes is connected pattern to support only Paper server.
  • #​6737 Adds an effect to sort a list by an arbitrary mapping expression. (ex: sort {_list-of-players::*} by {hide-and-seek::%input%::score})
  • #​6797 Fixes issues with the last damage expression.
  • #​6803 Fixes an issue where custom maximum durability did not work for items with a custom durability.
  • #​6821 Fixes block datas not being cloned upon use.
  • #​6823 Fixes inability to get the location of a double chest via the inventory.
  • #​6832 Fixes a bug where potion types could not be compared.
  • #​6836 Fixes an issue when trying to remove air from an empty slot.
Removals
  • #​5606 Removes the warnings in the default variable test.
  • #​6505 Removes Player name/UUID in variables warning.
  • #​6673 Removes old deprecated vector arithmetic syntax in favour of regular arithmetic.
Changes
  • #​4661 Adds timespan details expression & Improvements.
  • #​5676 Changes uuid default.
  • #​5298 Adds the ability to directly set entity and player pitch/yaw.
  • #​6131 Adds the ability to play sounds from entities, as well as specify a seed instead of the sound being random each time.
  • #​6160 Adds the option of 'breakable' to the existing unbreakable syntaxes.
  • #​6207 Adds ability to listen to cancelled events.
  • #​6275 Ignore cleanup lang in git blame.
  • #​6306 Adds a more flexible static parse method.
  • #​6307 Throw an exception when attempting to register an abstract class.
  • #​6339 Adds the ability to filter a heal event by entity data and by heal reason.
  • #​6349 Creates SectionExitHandler interface.
  • #​6361 Make function parameter name rules stricter.
  • #​6389 Allows element-wise comparision when checking if two "and" lists are equal.
  • #​6393 Adds "invincible" as a synonym of "invulnerable" in related syntaxes.
  • #​6456 Adds syntax for bells and bell events.
  • #​6506 Adds pathfinding condition.
  • #​6550 and #​6694 enhance pattern keywords to improve parsing speeds.
  • #​6577 Adds a config option to allow case-insensitive Skript commands.
  • #​6583 Changes comment parsing to allow single # characters within strings.
  • #​6627 Allows usage messages to contain expressions.
  • #​6659 Supports logging with warning and error severities.
  • #​6733 Cleans up the new line expression.
  • #​6749 Supports dividing timespans by timespans to get numbers. (1 second / 5 ticks = 4)
  • #​6828 Adds the ability to delete the message expression in join/death/quit events.
  • #​6831 Adds the ability to prevent lookups when using the offlineplayer function.
  • #​6834 Exposes the load default aliases config option.
  • #​6835 Adds the ability to also kick a player when using the ban effect.
API Changes
  • #​5979 The broadcast effect now calls BroadcastMessageEvent.
  • #​6118 Adds a way to create returnable triggers (a trigger that can return a value using the return effect)
  • #​6276 Fixes JUnit before and after methods being called on cleanup regardless of override.
  • #​6291 Adds parse result structure for testing scripts.
  • #​6531 Adds ClassInfoReference system.
  • #​6551 Allows simple root-level structures.
  • #​6556 Allows look-behind for headless effect sections during init.
  • #​6568 Adds function contracts, allowing functions to modify their return type/plurality based on their arguments.
  • #​6718 Added support for using strings as literals (e.g. %*string% in syntax)
  • #​6798 Adds 1.21 support and modifies ItemType#getRandom() to be nullable as not all Materials can be represented as an ItemStack.
  • #​6806 Switches more types over to registries when possible.

Click here to view the full list of commits made since 2.8.7

Notices
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.9.0-pre1: Pre-Release 2.9.0-pre1

Compare Source

Skript 2.9.0-pre1

Skript 2.9.0 Pre-Release 1 is here for everyone to begin previewing! As a pre-release, be warned that there may be bugs! We do not recommend running this version on your production servers. This release contains many new features and bug fixes, including support for Minecraft 1.21.

We especially want to thank the recent influx of new contributors, many of whom are included in this update. Every contributor means a little less work for the team and a little more progress for Skript, so please, if you want a feature in Skript, go ahead and try to make a pull request! New contributors are very welcome! You can review our contributing guide by clicking here.

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 new release model, we plan to release 2.9.0 on July 15th. We may release additional pre-releases before then should the need arise.

Happy Skripting!

Major Changes

[!IMPORTANT]
Skript now requires Java 11 to run. While most users are running Java 11 or newer, some may be required to update for this version. Java 11 is supported on all versions Skript supports.

  • Skript can now listen to events cancelled by other plugins! Your current scripts will behave the same as they always have, but there's now the option to listen to cancelled, uncancelled, or both kinds at once:
on break of stone:
    # Normal behavior, only listens to uncancelled break events.

on uncancelled break of stone:
    # Same as `on break of stone`, only uncancelled.
    
on cancelled break of stone:
    # Will only listen to cancelled events. For example, 
    # when Worldguard prevents a block break in a protected region.

on any break of stone:
    # Will listen to both cancelled and uncancelled events.
    # Finally, `event is cancelled` will be useful!
    
on all break of stone:
    # Same as `on any break of stone`.
  • Alternatively, you can set the new listen to cancelled events by default config option to true to allow events to listen to both uncancelled and cancelled events by default:
on break of stone:
    # Now listens to both cancelled and uncancelled events
    # if the config option is set to true.
  • Added a config option to allow case-insensitive commands, so your accidental capslock won't mess you up as much!

# default: only /test
# insensitive: /test, /TEST, /tEsT...
command /test:
    trigger:
        broadcast "test!"
  • Adds multi-line comments. Comments are opened and closed with three hashtags ### alone on a line.
    This is code
    ###
    |
    This is a comment
    |
    ###
    This is code (again)
    
    • Triple-hashtags in the middle of a line (e.g. hello ### there) will not start or end a comment.
  • Support for string 'concatenation'!
    • Text can be appended to other text (e.g. set {text} to "hello" + "there") with the addition operator.
    • The concat(...) function joins any text or objects together into a single text.
  • We have exposed the load default aliases option in config.sk, which allows you to tell Skript to only load aliases in the plugins/Skript/aliases folder. You can provide as many or as few (even none, if you want!) aliases as you like. We will provide the default folder in the GitHub release for your convenience.
⚠ Breaking Changes
  • # characters in strings no longer need to be doubled! Skript can now tell that you are writing a string and will not start a comment in the middle of it. This change means all your ## will now appear as two # instead of one! This won't break hex colours, those support either one or two #'s, but it may break other text!

# before:
"<##aabbcc>I'm ##&#8203;1, baby!" -> "I'm #&#8203;1, baby!"

# after
"<##aabbcc>I'm ##&#8203;1, baby!" -> "I'm ##&#8203;1, baby!"
"<#aabbcc>I'm #&#8203;1, baby!" -> "I'm #&#8203;1, baby!"
  • Timespans will now show the weeks and years instead of stopping at days:
broadcast "%{_timespan}%"
- "378 days and 20 minutes"
+ "1 year and 1 week and 6 days and 20 minutes"
  • The names of function parameters can no longer include the following characters: (){}\",.
  • newl and nline are no longer valid syntaxes for the newline expression, but new line is now valid.
  • As mentioned above, # characters in strings no longer need to be doubled. This will mean existing doubled #s will appear as two, rather than one.
  • The option to use non-air instead of solid in the highest solid block expression has been removed.
  • Using on teleport will now trigger for non-player entities. To detect only player teleports, use on player teleport.
Changelog
Additions
  • #​4661 Adds syntax to get the second, minutes, hours, etc of a timespan.
  • #​5284 Adds the lowest solid block expression.
  • #​5691 Adds a cancellable field to the docs for events.
  • #​5698 Adds support for obtaining the player a player head block represents.
  • #​6105 Support is connected pattern in is online.
  • #​6164 Adds many internal tests relating to items.
  • #​6272 Adds Russian translation.
  • #​6334 Add support for character codepoints.
  • #​6422 Adds a new use for the 'actual' target block option.
  • #​6530 Adds support for detecting when non-player entities are teleported.
  • #​6549 Adds a suppressible warning type for deprecated syntaxes.
  • #​6558 Adds ### multi-line comment support.
  • #​6576 Support string 'concatenation'.
  • #​6596 Adds the endermen enrage event.
  • #​6639 Adds fire-resistant item property support.
  • #​6680 Adds a config option to allow all events to listen for cancelled versions by default.
  • #​6712 Adds an effect to show/hide item tooltips and a condition to check if a tooltip is visible.
  • #​6748 Adds the whether <condition> expression to allow conditions to be used as boolean expressions. (set {_test} to whether player is flying)
  • #​6791 Adds support for numerous 1.21 attributes.
  • #​6687 Adds support for using custom enchantments and referencing enchantments by key in 1.21.
Bug Fixes
  • #​5422 Fixes bugs with the whitelist condition.
  • #​6573 Fixes is connected pattern to support only Paper server.
  • #​6737 Adds an effect to sort a list by an arbitrary mapping expression. (ex: sort {_list-of-players::*} by {hide-and-seek::%input%::score})
  • #​6797 Fixes issues with the last damage expression.
  • #​6803 Fixes an issue where custom maximum durability did not work for items with a custom durability.
  • #​6821 Fixes block datas not being cloned upon use.
  • #​6823 Fixes inability to get the location of a double chest via the inventory.
  • #​6832 Fixes a bug where potion types could not be compared.
  • #​6836 Fixes an issue when trying to remove air from an empty slot.
Removals
  • #​5606 Removes the warnings in the default variable test.
  • #​6505 Removes Player name/UUID in variables warning.
  • #​6673 Removes old deprecated vector arithmetic syntax in favour of regular arithmetic.
Changes
  • #​4661 Adds timespan details expression & Improvements.
  • #​5676 Changes uuid default.
  • #​5298 Adds the ability to directly set entity and player pitch/yaw.
  • #​6131 Adds the ability to play sounds from entities, as well as specify a seed instead of the sound being random each time.
  • #​6160 Adds the option of 'breakable' to the existing unbreakable syntaxes.
  • #​6207 Adds ability to listen to cancelled events.
  • #​6275 Ignore cleanup lang in git blame.
  • #​6306 Adds a more flexible static parse method.
  • #​6307 Throw an exception when attempting to register an abstract class.
  • #​6339 Adds the ability to filter a heal event by entity data and by heal reason.
  • #​6349 Creates SectionExitHandler interface.
  • #​6361 Make function parameter name rules stricter.
  • #​6389 Allows element-wise comparision when checking if two "and" lists are equal.
  • #​6393 Adds "invincible" as a synonym of "invulnerable" in related syntaxes.
  • #​6456 Adds syntax for bells and bell events.
  • #​6506 Adds pathfinding condition.
  • #​6550 and #​6694 enhance pattern keywords to improve parsing speeds.
  • #​6577 Adds a config option to allow case-insensitive Skript commands.
  • #​6583 Changes comment parsing to allow single # characters within strings.
  • #​6627 Allows usage messages to contain expressions.
  • #​6659 Supports logging with warning and error severities.
  • #​6733 Cleans up the new line expression.
  • #​6749 Supports dividing timespans by timespans to get numbers. (1 second / 5 ticks = 4)
  • #​6828 Adds the ability to delete the message expression in join/death/quit events.
  • #​6831 Adds the ability to prevent lookups when using the offlineplayer function.
  • #​6834 Exposes the load default aliases config option.
  • #​6835 Adds the ability to also kick a player when using the ban effect.
API Changes
  • #​5979 The broadcast effect now calls BroadcastMessageEvent.
  • #​6118 Adds a way to create returnable triggers (a trigger that can return a value using the return effect)
  • #​6276 Fixes JUnit before and after methods being called on cleanup regardless of override.
  • #​6291 Adds parse result structure for testing scripts.
  • #​6531 Adds ClassInfoReference system.
  • #​6551 Allows simple root-level structures.
  • #​6556 Allows look-behind for headless effect sections during init.
  • #​6568 Adds function contracts, allowing functions to modify their return type/plurality based on their arguments.
  • #​6718 Added support for using strings as literals (e.g. %*string% in syntax)
  • #​6798 Adds 1.21 support and modifies ItemType#getRandom() to be nullable as not all Materials can be represented as an ItemStack.
  • #​6806 Switches more types over to registries when possible.

Click here to view the full list of commits made since 2.8.X

Notices
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.8.7: Patch Release 2.8.7

Compare Source

Skript 2.8.7

We're releasing 2.8.7 to fix some important issues that made their way into 2.8.6. We expect this to be the final version for Skript 2.8. You can report any issues through our issue tracker.

Happy Skripting!

Changelog
Bug Fixes
  • #​6757 Fixed an error that could occur when attempting to obtain the potion effects of a plain potion.
  • #​6758 Fixed arithmetic-related errors on Java 8 and when performing Vector-Vector multiplication.
  • #​6760 Fixed several particle definition conflicts that made it harder to use certain items and entity types with variables.
  • #​6763 Fixed an issue where reloading scripts with commands could cause an exception on Paper 1.20.5+.
  • #​6764 Fixed an issue where fireworks could not be spawned using the spawn effect/section.
  • #​6777 Fixed an issue with the text representation of the case expression.

Click here to view the full list of commits made since 2.8.6

Notices
Java 11

From Skript 2.9.0 onwards, we will be requiring a minimum Java version of 11 to run.

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.8.6: Patch Release 2.8.6

Compare Source

Skript 2.8.6

Skript 2.8.6 is here. This release delivers more bug fixes with improved 1.20.5+ support. Additionally, a few quality-of-life features have made their way in. You can report any issues through our issue tracker.

Happy Skripting!

Changelog
Additions
  • #​6652 Added missing item drop event values (dropped item and itemstack)
  • #​6654 Improved the subcommand help colours in the /skript command.
  • #​6655 Added support for modifying the exploded blocks in an explode event.
Bug Fixes
  • #​6624 Fixed unexpected math parsing issues that could occur when using variables.
  • #​6642 Fixed an error that could occur from Skript attempting to normalize zero vectors.
  • #​6644 Fixed an issue with damaging and repairing items in slots.
  • #​6646 Fixed an issue where obtaining the max durability of a custom item did not work.
  • #​6679 Fixed an issue where beta releases were considered stable by the update checker.
  • #​6683 Fixed an issue where syntaxes could modify the stored values of literals.
  • #​6716 Fixed numerous particle issues that occurred when using Minecraft 1.20.5+.
  • #​6724 Fixed an issue where forcing an entity to at a vector failed.
  • #​6742 Fixed an issue with obtaining an entity's target that could occur when no blocks were within 100 meters.
  • #​6746 Fixed an issue where dropped items could not be spawned properly.
  • #​6747 Fixed an issue where obtaining the location of an inventory holder did not work.
  • #​6752 Fixed an issue where spawning specific fish types (other than tropical fish) did not work.
API Updates / For Addon Developers
  • #​6624 Expressions can now declare multiple potential return types. This allows for providing more context regarding the return type of an expression (for example, Entity and Block compared to their shared supertype Object).
  • #​6684 Our code standards for the project have been updated. Please review the linked PR for an overview of the changes.
  • #​6700 The manner in which failed JUnit tests are displayed has been improved.

Click here to view the full list of commits made since 2.8.5

Notices
Java 11

From Skript 2.9.0 onwards, we will be requiring a minimum Java version of 11 to run.

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.8.5: Patch Release 2.8.5

Compare Source

Skript 2.8.5

Skript 2.8.5 is here with some more bug fixes and quality-of-life additions. There is also early support for 1.20.5/1.20.6 (Skript will run and some basic 1.20.5/1.20.6 features will work). Further support will come in the next releases. You can report any issues on our issue tracker.

Happy Skripting!

Changelog
Additions
  • #​6134 Added mushroom cow alias for mooshroom.
  • #​6163 Added tests for vector syntaxes.
  • #​6525 Added support for specifying charged creeper rather than powered creeper.
  • #​6526 Improved the documentation of the elements expression.
  • #​6528 Improved the documentation of the leash effect.
  • #​6628 The Skript artifact name now includes the plugin version (e.g. Skript-2.8.5.jar).
  • #​6632 Added basic support for the new Armadillo and Bogged entities.
Bug Fixes
  • #​6302 Removed the outdated Location to Chunk converter.
  • #​6523 Fixed an issue that could occur when attempting to spawn non-spawnable entities.
  • #​6561 Fix the move event's example.
  • #​6566 Removed redundant [the] in the hotbar expression.
  • #​6578 Fixed an error that could occur with the inventory click event.
  • #​6579 Fixed function parsing issues with ambiguous parameter lists.
  • Fixes locations with no world causing an error:
  • #​6591 Fixed an incorrect internal check that determined whether an expression was nullable.
  • #​6594/#​6604 Improved the efficiency of element input pattern checks.
  • #​6595 Fixed incorrect coloring with some error messages.
  • #​6600 Fixed an error that could occur when setting the value of a variable.
  • #​6619 Fixed an issue that could occur when reloading a command on newer Paper versions.
  • #​6617/#​6630 Fixed multiple issues that could occur when using Skript on 1.20.5/1.20.6.

Click here to view the full list of commits made since 2.8.4

Notices
Java 11

From Skript 2.9.0 onwards, we will be requiring a minimum Java version of 11 to run.

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.8.4: Patch Release 2.8.4

Compare Source

Skript 2.8.4

Skript 2.8.4 is here and it brings with it many bug fixes. You can report any issues on our issue tracker.

Happy Skripting!

Changelog
Bug Fixes
  • #​6413 Adds missing attributes for MC 1.20.5
  • #​6473 Fixes an issue where spawning a falling block would load the chunk at 0,0.
  • #​6475 Fixes issue when spawning an entity at a location with no world.
  • #​6484 Fixes error when trying to spawn en entity from a disabled datapack.
  • #​6495 Fixes strings in lists not getting sorted properly.
  • #​6497 Adds error message to catch null return types.
  • #​6502 Fixes error when using invalid amounts of random characters.
  • #​6510 Fixes Anvil Text examples, updates Location function examples.
  • #​6512 Fixes unparsed literal error with the random expression.

Click here to view the full list of commits made since 2.8.3

Notices
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.8.3: Patch Release 2.8.3

Compare Source

Skript 2.8.3

A new month means a new patch! Skript 2.8.3 is here and it brings with it many bug fixes. You can report any issues on our issue tracker.

Happy Skripting!

Notices

If, and only if, you have the case-insensitive-variables config option set to false, you may experience slight changes to code behavior in functions. Previously, function parameters did not respect this option. This means that if you relied the bug that made the following code work (despite your config option set to false), your code will no longer work in this update.

function test(TEST: text):
    broadcast {_test} # only {_TEST} is set now, not {_test}
Changelog
Bug Fixes
  • #​6233 Fixed an issue where event values for the inventory item move event were mistakenly removed.
  • #​6309 Fixed an issue that caused some click events to fire multiple times for a single event.
  • #​6192 Fixed an issue where using the groups expression with LuckPerms would cause an exception.
  • #​6328 Fixed an issue where multiplying or adding timespans could overflow into negative values.
  • #​6387 Fixed an exception when trying to get the components of a non-vector.
  • #​6388 Fixed function parameters not respecting the case-insensitive-variables config option.
  • #​6391 Fixed plain always getting the same item for aliases representing multiple items.
  • #​6392 Fixed bucket events returning the wrong event-block.
  • #​6463 Fixed the at time event failing to property trigger when a world's time was changed.
  • #​6455 Fixed a parser issue that caused parsing to fail for some syntax when special characters were used.

Click here to view the full list of commits made since 2.8.2

Notices
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.8.2: Emergency Patch Release 2.8.2

Compare Source

Skript 2.8.2

We are releasing Skript 2.8.2 to patch a critical issue that prevented the plugin from loading on Spigot versions older than 1.18. You can report any issues on our issue tracker.

Happy Skripting!

Changelog
Bug Fixes
  • #​6399 Fixed an issue that prevented Skript from loading on Spigot versions older than 1.18.

Click here to view the full list of commits made since 2.8.1

Notices
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.8.1: Patch Release 2.8.1

Compare Source

Skript 2.8.1

Skript 2.8.1 is here to resolve some of the most notable issues reported with 2.8.0. We will continue to assess stability and make fixes as necessary. As always, you can report any issues on our issue tracker.

Happy Skripting!

Changelog
Additions
  • #​6367 Added support for experimental entities from 1.20.3, breeze and wind charge.
Tweaks
  • #​6357 armour is now valid for the player armor change event.
Bug Fixes
  • #​6352 Fixed a mapping issue that could cause an error on shutdown.
  • #​6357 Fixed an issue that caused armor of %entities% to be considered a single value.
  • #​6358 Fixed an issue that allowed invalid function definitions to parse successfully.
  • #​6360 Fixed parsing issues that caused valid code like loop-value - 1 to error. Additionally, many improvements have been made to the arithmetic expression to greatly improve parsing and general stability.
  • #​6374 Fixed an issue that caused the scripts expression to return absolute paths for enabled scripts.
  • #​6375 Fixed an error that could occur when Skript attempted to interpret an unknown enumerator as a string.
  • #​6378 Fixed an invalid documentation link to the text tutorial.
  • #​6383 Fixed a syntax conflict that prevented the usage of the vector from coordinates expression.

Click here to view the full list of commits made since 2.8.0

Notices
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.8.0: Feature Release 2.8.0

Compare Source

Skript 2.8.0

Skript 2.8.0 is here for everyone to enjoy! This release contains many new features and bug fixes to improve the Skript experience.

Below, you can familiarize yourself with the changes. As always, report any issues to our issues page! Per our new release model, we plan to release 2.8.1 on February 1st to continue addressing bugs. In the event of any critical issues, an emergency patch release may come sooner.

Happy Skripting!

⚠ Breaking Changes
  • Using players in variable names will soon change from defaulting to names to defaulting to UUIDs. Warnings have been added to help smooth out this transition. See https://github.com/SkriptLang/Skript/discussions/6270 for more information.
  • Removed Projectile Bounce State condition and expression. These haven't done anything for years.
  • The target entity of player expression has been improved and now uses raytracing to find the player's target. This should cut down on false positives significantly, but the change in behavior may cause issues for some users who relied on its quirks.
  • Parsing players from player names is now a bit more intuitive. Previously, parsing "xyz" as a player would return the first online player to contain "xyz" somewhere in their name. Now, it only returns players that start with "xyz". See #​5875 for more.
  • Major changes have been made to the on grow event. The grow event now has many more options to specify how you want it to listen. These changes mean that code that uses on grow of x may fire twice as often as expected.

# x -> something
on grow[th] from X

# something -> x
on grow[th] into X

# X -> Y
on grow[th] from X [in]to Y

# x is involved in some way
on grow[th] of X
  • The expression durability of %item% now actually returns the durability (a pick with durability 103/160, for example, returns 103) instead of the prior behavior, where it would act like damage of %item% (returning 57 for 103/160).
  • When there are multiple valid event-values for a default expression, Skript will now error and ask you to state which one you want instead of silently picking one. See the following example:
on right click on entity:
    send "test" 
    # This will now error, because Skript doesn't know whether to 
    # send it to the clicked entity or the player doing the clicking. 
  • Arithmetic evaluation will now return <none> for a whole chain if one of the operations is illegal. Previously, adding 1 + "hello" would treat "hello" as 0 and just return 1. This now returns <none>. However, the behavior of adding things to unset values hasn't changed. 1 + {_none} still returns 1.
Changelog
Additions
  • #​4198 Added syntax for interacting with item cooldowns:
    • a condition that checks whether a player has a cooldown for an item
    • an expression to get and change the cooldown of an item for a player
  • #​4593 Added raw index of slot expression.
  • #​4595 Added loop-(counter|iteration)[-%number%] for both normal and while loop and improved performance for loop-value.
  • #​4614 Added the ability to only get certain item types when using the items in inventory expression.
  • #​4617 Added anvil repair cost expression.
  • #​5098 Added an expression to repeat a given string multiple times.
  • #​5271 Added time states for the tool change event's event-slot and for the hotbar slot expression. Also allows the ommission of the player in hotbar slot when using it in events that have an event-player.
  • #​5356 Added an expression for getting and changing the portal cooldown of an entity.
  • #​5357 Added toggle pickup for items on living entities.
  • #​5359 Added is jumping for living entities condition. (Paper 1.15+)
  • #​5365 Added syntax for interacting with an entity's active item:
    • a condition that checks whether an entity's hand(s) is raised
    • an expression to get an entity's active item (e.g. a bow)
    • an expression to get the time they've spent using it or how long they need to keep using it to complete the action (e.g. eating)
    • an expression to get the maximum time an item can be used for
    • an expression to get the arrow selected in the ready arrow event
    • an effect to cancel the usage of an item
    • events for when a player readies an arrow and when a player stops using an item.
  • #​5366 Added support for getting and modifying the inventories of items, like shulker boxes.
  • #​5367 Added syntax to check and set whether a sign has glowing text.
  • #​5456 Added the ability to get all armor pieces of an entity.
  • #​5460 Added an event for when a player selects a stonecutting recipe.
  • #​5462 Added InventoryMoveItemEvent.
  • #​5482 Added an expression to get the vector projection of two vectors.
  • #​5494 Added a condition to check if an entity is left or right handed, and adds an effect to change their handedness.
  • #​5502 Added syntax to create vectors from directions.
  • #​5562 Added a condition to check if an entity has unbstructed line of sight to another entity or location.
  • #​5571 Added a condition to check if an entity is shorn or not. Also expands the entities that can be shorn with the shear effect.
  • #​5573 Added a function to clamp a value between two others.
  • #​5588 Added player arrow pickup event.
  • #​5589 Added hit block of projectile.
  • #​5618 Added is climbing for living entities condition.
  • #​5636 Added Free/Max/Total Server Memory expression.
  • #​5662 Added expression to return the loaded chunks of worlds.
  • #​5678 Added item damage to the damage expression.
  • #​5680 Added inventory close reason in inventory close event.
  • #​5683 Added event-item and event-slot to the resurrect event. If no totem is present, these values are none.
  • #​5763 Added Paper 1.16.5+ quit reason for finding out why a player disconnected.
  • #​5800 Added an event for when an entity transforms into another entity, like a zombie villager being cured or a slime splitting into smaller slimes.
  • #​5811 Added the ability to execute a command as a bungeecord command like /alert.
  • #​5814 Added returns aliases for function definition.
  • #​5845 Added player and offlineplayer functions.
  • #​5867 Added expressions to get all characters between two characters, or an amount of random characters within a range.
  • #​5894 Added support for keybind components in formatted messages (<keybind:value>).
  • #​5898 Added apply bone meal effect.
  • #​5948 Added an event for when players are sent the server's list of commands, as well as an expression to modify them.
  • #​5949 Added an expression to get a percentage of one or more numbers.
  • #​5961 Added the ability to listen for entities rotating, or rotating and moving, in the on move event.
  • #​6101 Adds an effect to copy the contents and indices of one variable into others.
  • #​6146 Multiple # signs at the beginning of a line now start a comment.
  • #​6162 Added a function isNaN(number) to check if a number is NaN.
  • #​6180 The syntax to get a location from a vector and a world has been re-added.
  • #​6198 Added Turkish translation.
Bug Fixes
  • #​5308 Fixed cursor slot not always returning the correct item in inventory click events.
  • #​5406 Fixed some order of operation issues with the difference expression.
  • #​5744 Fixed an issue where the error for missing enum lang entries would be printed much more often than they should be.
  • #​5815 Improvements to comparators and converters.
  • #​5878 Fixed some issues with the parsed as expression returning arrays or throwing exceptions.
  • #​6224 Fixed the examples for applying potion effects.
  • #​6229 Fixed an exception when trying to get the text input of an anvil.
  • #​6231 Fixed an exception when trying to print a block state.
  • #​6239 Fixed an exception when removing items from drops in 1.20.2+.
  • #​6266 Fixed a bug that caused incorrect errors to be printed when comparing things.
Removals
  • #​5958 Removed the projectile bounce state condition and expression. These had no function.
Changes
  • #​4281 Rewrote the furnace slot expressions and fixes numerous issues with them.
  • #​5114 Added the ability to save, load, and unload specific worlds, or listen for those event for specific worlds.
  • #​5279 Changed how Skript does arithmetic to support many more combinations, like multiplying vectors by scalars, adding timespans, and more.
  • #​5478 Improved the element expression and adds the ability to A, get the first or last x elements of a list, and B, get the elements in a range from x to y in the list.
  • #​5639 Major changes to the on grow event. Fixes an issue where listening to on grow of sugarcane or any other full-block plant, like cacti or pumpkins, would never fire. Adds more functionality to specify what exactly to listen for.

# x -> something
on grow[th] from X

# something -> x
on grow[th] into X

# X -> Y
on grow[th] from X [in]to Y

# x is involved in some way
on grow[th] of X
  • #​5674 Made the case-insensitive variables config option visible by default in the config file.
  • #​5769 Skript now errors when an ambiguous event value is found for a default expression:

# This will now error, as it's unclear who to send "test" to!
on right click on entity:
	send "test"
  • #​5796 Expanded the block change event and adds block and blockdata event values.
  • #​5841 Inventory titles now support hex colours and more.
  • #​5875 Changed the parsing of players to only match players that start with that name, rather than simply containing the name.
  • #​5889 Allows the omission of the command name when using the command info expressions within a command's trigger section or command event.
  • #​5900 Improved how event parsing is handled internally.
  • #​5976 Added decrease as an alias for reduce, e.g. decrease {_var} by 2.
  • #​6010 Allows the use of and with before fade out in the title effect.
  • #​6024 Allows continue to continue outer loops.
  • #​6139 Allows setting the current hotbar slot of a player to a number as well as a slot.
  • #​6157 Changes the target entity expression to use raytracing for a player's target. This should make it much more accurate, but may change behavior slightly. Also adds an option to change the ray size and to ignore blocks.
  • #​6172 Allows the plural "commands" in the execute command effect.
  • #​6271 Added warnings for using players in variable names, without the use player uuids in variable names config option enabled.
  • #​6298 Fixed the outdated website link in Skript's plugin description.
API Changes
  • #​5307 Switched Timespan#getTicks and Timespan#fromTicks from returning ints to returning longs. Deprecated Timespan#getTicks_i and Timespan#fromTicks_i due to API name change.
  • #​5408 Cleaned up the Yggsdrasil serialization code.
  • #​5440 Added a "parse section", which can be used to test if code properly parses or not. This is for the testing suite.
  • #​5502 Added method Direction#getDirection which returns a vector.
  • #​5550 The Skript profiler can now run for as long as the user wants.
  • #​5874 SimplePropertyExpression now automatically defends %objects% to avoid UnparsedLiterals.
  • #​5941 ExpressionType#NORMAL was removed. ExpressionType#EVENT was added for EventValueExpressions. A new default register method was added to EventValueExpression.
  • #​5955 Added WILL to PropertyCondition to allow for easy registration for conditions like player will consume the firework charge.
  • #​6000 Renames the field SyntaxElementInfo#c to SyntaxElementInfo#elementClass. This field will be made private in 2.9. Please use the SyntaxElementInfo#getElementClass() getter instead.
  • #​6001 Renamed the Slot classinfo from Inventory Slot to Slot.
  • #​6054 Replaced MarkedForRemoval annotations with ApiStatus.ScheduledForRemoval.
  • #​6261 Allows overrides of the cleanup() method in JUnit tests.

Click here to view the full list of commits made since 2.7.3

Notices
Help Us Test

We have an official Discord community for beta testing Skript's new features and releases. We're currently testing a new version of skript-reflect and we would love some more testers!

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.8.0-pre2: Pre-Release 2.8.0-pre2

Compare Source

Skript 2.8.0-pre2

Skript 2.8.0 Pre-Release 2 is here to fix some of the issues found on the first pre-release. As a pre-release, be warned that there may be bugs! We do not recommend running this version on your production servers. Per our new release model, we plan to release Skript 2.8.0 on January 15th.

Below, you can familiarize yourself with the changes. As always, report any issues to our issues page. We will continue to work on addressing any major issues before the full release.

Happy Skripting!

Changelog

The changelog below highlights all changes since the first pre-release. For the complete 2.8.0 changelog, please review the first pre-release's changelog.

Bug Fixes
  • #​6286 Fixed command parsing errors that could occur for valid commands.
  • #​6287 Fixed warnings about the upcoming player UUID variable changes being printed for incorrect lines.
  • #​6292 Fixed an issue that caused custom event priorities to pollute the parsing of event declarations that did not specify a priority.
  • #​6294 Fixed an error that would occur when trying to obtain the "shoes" of an entity.
  • #​6298 Fixed the outdated website link in Skript's plugin description.
  • #​6312 Fixed a few issues with the updater system that caused pre-releases to be shown to users in the stable release channel. This will only apply to future releases, and users running a 2.7.x version will continue to see prompts to update to a potentially unstable build.
  • #​6317 Fixed "parsed as a player" not working for valid inputs.

Click here to view the full list of commits made since 2.8.0-pre1

Changes
  • ⚠️ #​6310 The newly re-added location from vector expression now requires "to location" in the syntax.

The syntax is now %vector% to location in %world%.

Notices
Help Us Test

We have an official Discord community for beta testing Skript's new features and releases. We're currently testing a new version of skript-reflect and we would love some more testers!

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.8.0-pre1: Pre-Release 2.8.0-pre1

Compare Source

Skript 2.8.0-pre1

Skript 2.8.0 Pre-Release 1 is here for everyone to begin previewing! This release contains all major features for Skript 2.8.0. As a pre-release, be warned that there may be bugs! We do not recommend running this version on your production servers. We will release additional pre-releases as necessary. Per our new release model, we plan to release Skript 2.8.0 on January 15th.

Below, you can familiarize yourself with the changes. As always, report any issues to our issues page! We will be working over the next two weeks to address any issues that are found.

Happy New Year and Happy Skripting!

⚠ Breaking Changes
  • Using players in variable names will soon change from defaulting to names to defaulting to UUIDs. Warnings have been added to help smooth out this transition. See https://github.com/SkriptLang/Skript/discussions/6270 for more information.
  • Removed Projectile Bounce State condition and expression. These haven't done anything for years.
  • The target entity of player expression has been improved and now uses raytracing to find the player's target. This should cut down on false positives significantly, but the change in behavior may cause issues for some users who relied on its quirks.
  • Parsing players from player names is now a bit more intuitive. Previously, parsing "xyz" as a player would return the first online player to contain "xyz" somewhere in their name. Now, it only returns players that start with "xyz". See #​5875 for more.
  • Major changes have been made to the on grow event. The grow event now has many more options to specify how you want it to listen. These changes mean that code that uses on grow of x may fire twice as often as expected.

# x -> something
on grow[th] from X

# something -> x
on grow[th] into X

# X -> Y
on grow[th] from X [in]to Y

# x is involved in some way
on grow[th] of X
  • The expression durability of %item% now actually returns the durability (a pick with durability 103/160, for example, returns 103) instead of the prior behavior, where it would act like damage of %item% (returning 57 for 103/160).
  • When there are multiple valid event-values for a default expression, Skript will now error and ask you to state which one you want instead of silently picking one. See the following example:
on right click on entity:
    send "test" 
    # This will now error, because Skript doesn't know whether to 
    # send it to the clicked entity or the player doing the clicking. 
  • Arithmetic evaluation will now return <none> for a whole chain if one of the operations is illegal. Previously, adding 1 + "hello" would treat "hello" as 0 and just return 1. This now returns <none>. However, the behavior of adding things to unset values hasn't changed. 1 + {_none} still returns 1.
Changelog
Additions
  • #​4198 Added syntax for interacting with item cooldowns:
    • a condition that checks whether a player has a cooldown for an item
    • an expression to get and change the cooldown of an item for a player
  • #​4593 Added raw index of slot expression.
  • #​4595 Added loop-(counter|iteration)[-%number%] for both normal and while loop and improved performance for loop-value.
  • #​4614 Added the ability to only get certain item types when using the items in inventory expression.
  • #​4617 Added anvil repair cost expression.
  • #​5098 Added an expression to repeat a given string multiple times.
  • #​5271 Added time states for the tool change event's event-slot and for the hotbar slot expression. Also allows the ommission of the player in hotbar slot when using it in events that have an event-player.
  • #​5356 Added an expression for getting and changing the portal cooldown of an entity.
  • #​5357 Added toggle pickup for items on living entities.
  • #​5359 Added is jumping for living entities condition. (Paper 1.15+)
  • #​5365 Added syntax for interacting with an entity's active item:
    • a condition that checks whether an entity's hand(s) is raised
    • an expression to get an entity's active item (e.g. a bow)
    • an expression to get the time they've spent using it or how long they need to keep using it to complete the action (e.g. eating)
    • an expression to get the maximum time an item can be used for
    • an expression to get the arrow selected in the ready arrow event
    • an effect to cancel the usage of an item
    • events for when a player readies an arrow and when a player stops using an item.
  • #​5366 Added support for getting and modifying the inventories of items, like shulker boxes.
  • #​5367 Added syntax to check and set whether a sign has glowing text.
  • #​5456 Added the ability to get all armor pieces of an entity.
  • #​5460 Added an event for when a player selects a stonecutting recipe.
  • #​5462 Added InventoryMoveItemEvent.
  • #​5482 Added an expression to get the vector projection of two vectors.
  • #​5494 Added a condition to check if an entity is left or right handed, and adds an effect to change their handedness.
  • #​5502 Added syntax to create vectors from directions.
  • #​5562 Added a condition to check if an entity has unbstructed line of sight to another entity or location.
  • #​5571 Added a condition to check if an entity is shorn or not. Also expands the entities that can be shorn with the shear effect.
  • #​5573 Added a function to clamp a value between two others.
  • #​5588 Added player arrow pickup event.
  • #​5589 Added hit block of projectile.
  • #​5618 Added is climbing for living entities condition.
  • #​5633 Added an event for when endermen attempt to escape, along with their reason for doing so.
  • #​5636 Added Free/Max/Total Server Memory expression.
  • #​5662 Added expression to return the loaded chunks of worlds.
  • #​5678 Added item damage to the damage expression.
  • #​5680 Added inventory close reason in inventory close event.
  • #​5683 Added event-item and event-slot to the resurrect event. If no totem is present, these values are none.
  • #​5763 Added Paper 1.16.5+ quit reason for finding out why a player disconnected.
  • #​5800 Added an event for when an entity transforms into another entity, like a zombie villager being cured or a slime splitting into smaller slimes.
  • #​5811 Added the ability to execute a command as a bungeecord command like /alert.
  • #​5814 Added returns aliases for function definition.
  • #​5845 Added player and offlineplayer functions.
  • #​5867 Added expressions to get all characters between two characters, or an amount of random characters within a range.
  • #​5894 Added support for keybind components in formatted messages (<keybind:value>).
  • #​5898 Added apply bone meal effect.
  • #​5948 Added an event for when players are sent the server's list of commands, as well as an expression to modify them.
  • #​5949 Added an expression to get a percentage of one or more numbers.
  • #​5961 Added the ability to listen for entities rotating, or rotating and moving, in the on move event.
  • #​6101 Adds an effect to copy the contents and indices of one variable into others.
  • #​6146 Multiple # signs at the beginning of a line now start a comment.
  • #​6162 Added a function isNaN(number) to check if a number is NaN.
  • #​6180 The syntax to get a location from a vector and a world has been re-added.
  • #​6198 Added Turkish translation.
Bug Fixes
  • #​5308 Fixed cursor slot not always returning the correct item in inventory click events.
  • #​5406 Fixed some order of operation issues with the difference expression.
  • #​5744 Fixed an issue where the error for missing enum lang entries would be printed much more often than they should be.
  • #​5815 Improvements to comparators and converters.
  • #​5878 Fixed some issues with the parsed as expression returning arrays or throwing exceptions.
  • #​6224 Fixed the examples for applying potion effects.
  • #​6229 Fixed an exception when trying to get the text input of an anvil.
  • #​6231 Fixed an exception when trying to print a block state.
  • #​6239 Fixed an exception when removing items from drops in 1.20.2+.
  • #​6266 Fixed a bug that caused incorrect errors to be printed when comparing things.
Removals
  • #​5958 Removed the projectile bounce state condition and expression. These had no function.
Changes
  • #​4281 Rewrote the furnace slot expressions and fixes numerous issues with them.
  • #​5114 Added the ability to save, load, and unload specific worlds, or listen for those event for specific worlds.
  • #​5279 Changed how Skript does arithmetic to support many more combinations, like multiplying vectors by scalars, adding timespans, and more.
  • #​5478 Improved the element expression and adds the ability to A, get the first or last x elements of a list, and B, get the elements in a range from x to y in the list.
  • #​5639 Major changes to the on grow event. Fixes an issue where listening to on grow of sugarcane or any other full-block plant, like cacti or pumpkins, would never fire. Adds more functionality to specify what exactly to listen for.

# x -> something
on grow[th] from X

# something -> x
on grow[th] into X

# X -> Y
on grow[th] from X [in]to Y

# x is involved in some way
on grow[th] of X
  • #​5674 Made the case-insensitive variables config option visible by default in the config file.
  • #​5769 Skript now errors when an ambiguous event value is found for a default expression:

# This will now error, as it's unclear who to send "test" to!
on right click on entity:
	send "test"
  • #​5796 Expanded the block change event and adds block and blockdata event values.
  • #​5841 Inventory titles now support hex colours and more.
  • #​5875 Changed the parsing of players to only match players that start with that name, rather than simply containing the name.
  • #​5889 Allows the omission of the command name when using the command info expressions within a command's trigger section or command event.
  • #​5900 Improved how event parsing is handled internally.
  • #​5976 Added decrease as an alias for reduce, e.g. decrease {_var} by 2.
  • #​6010 Allows the use of and with before fade out in the title effect.
  • #​6024 Allows continue to continue outer loops.
  • #​6139 Allows setting the current hotbar slot of a player to a number as well as a slot.
  • #​6157 Changes the target entity expression to use raytracing for a player's target. This should make it much more accurate, but may change behavior slightly. Also adds an option to change the ray size and to ignore blocks.
  • #​6172 Allows the plural "commands" in the execute command effect.
  • #​6271 Added warnings for using players in variable names, without the use player uuids in variable names config option enabled.
API Changes
  • #​5307 Switched Timespan#getTicks and Timespan#fromTicks from returning ints to returning longs. Deprecated Timespan#getTicks_i and Timespan#fromTicks_i due to API name change.
  • #​5408 Cleaned up the Yggsdrasil serialization code.
  • #​5440 Added a "parse section", which can be used to test if code properly parses or not. This is for the testing suite.
  • #​5502 Added method Direction#getDirection which returns a vector.
  • #​5550 The Skript profiler can now run for as long as the user wants.
  • #​5874 SimplePropertyExpression now automatically defends %objects% to avoid UnparsedLiterals.
  • #​5941 ExpressionType#NORMAL was removed. ExpressionType#EVENT was added for EventValueExpressions. A new default register method was added to EventValueExpression.
  • #​5955 Added WILL to PropertyCondition to allow for easy registration for conditions like player will consume the firework charge.
  • #​6000 Renames the field SyntaxElementInfo#c to SyntaxElementInfo#elementClass. This field will be made private in 2.9. Please use the SyntaxElementInfo#getElementClass() getter instead.
  • #​6001 Renamed the Slot classinfo from Inventory Slot to Slot.
  • #​6054 Replaced MarkedForRemoval annotations with ApiStatus.ScheduledForRemoval.
  • #​6261 Allows overrides of the cleanup() method in JUnit tests.

Click here to view the full list of commits made since 2.7.3

Notices
Help Us Test

We have an official Discord community for beta testing Skript's new features and releases. We're currently testing a new version of skript-reflect and we would love some more testers!

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.7.3: Patch 2.7.3

Compare Source

Skript 2.7.3

Skript 2.7.3 is here to end off the year with a few bug fixes. This will be the final release for Skript 2.7 versions. As per the new release model, Skript 2.8 will release after the new year on January 15th.

We are immensely appreciative of all of the support we have received this year.

Happy Holidays and Happy Skripting!

Changelog
Bug Fixes
  • #​6123 Fixed a priority issue that could cause the "sets" expression to match over other, better-fitting possibilities.
  • #​6171 Fixed an issue that caused accessing inventories in death events as well as checking the type of a spawner to be impossible.
  • #​6205 Location comparisons have been improved to significantly reduce the possibility of false negative results.
API Changes
  • #​6201 This is a behavioral change for the asynchronous execution API that was added to SkriptEvent (SkriptEvent#canExecuteAsynchronously). The SkriptEvent#check method may now be called asynchronously if the SkriptEvent can execute asynchronously. While we will not typically include behavioral changes like this in patch releases, this change was to address major performance issues that could occur from locking threads.
Notices
Help Us Test

We have an official Discord community for beta testing Skript's new features and releases. We're currently testing a new version of skript-reflect and we would love some more testers!

Compatibility Warning

Due to the major internal changes within the 2.7 update, some addons may no longer work properly.
Please be patient as addon developers work to update their addons.
We have published a new release of our Addon Patcher, but be aware that it cannot fix all issues.

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.7.2: Patch 2.7.2

Compare Source

Skript 2.7.2

As per the new release model, the first of the month brings with it a new Skript release! This release includes several bug fixes for issues that have been reported.

Thank you all for your continued support.

Happy Skripting!

Changelog
Bug Fixes
  • #​5765 Fixed an error with non-finite vectors
  • #​6038 Fixed the JavaDocs name and title elements
  • #​6078 Updated documentation links to the new Minecraft wiki
  • #​6080 Fixed issues with language nodes in command help
  • #​6090 Fixed the fake player count syntax for Paper
  • #​6102 Fixed an error when sorting lists
  • #​6103 Fixed UTF-8 encoding when building Skript
  • #​6106 Fixed reloading a directory with the script file effect
  • #​6117 Fixed an error when printing block inventories
  • #​6121 Fixed an issue where Skript options would not work in functions in some cases
  • #​6126 Fixed permission messages not showing for Skript commands
  • #​6128 Fixed issue when checking if Minecraft time is between two values that span across midnight
  • #​6130 Fixed issues with changing in the drops expression not setting all items and possibly causing an error
  • #​6132 Fixed floating point error that could occur when trying to loop with "x times"
  • #​6150 Fixed the message when reloading multiple scripts in a directory
  • #​6154 Fixed an issue with changing the durability of an item

Click here to view the full list of commits made since 2.7.1

Notices
Help Us Test

We have an official Discord community for beta testing Skript's new features and releases.

Compatibility Warning

Due to the major internal changes within the 2.7 update, some addons may no longer work properly.
Please be patient as addon developers work to update their addons.
We have published a new release of our Addon Patcher, but be aware that it cannot fix all issues.

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.7.1: Patch 2.7.1

Compare Source

Skript 2.7.1

In this release, we have patched many of the current known issues of Skript 2.7.0. We have also added support for Minecraft 1.20.2 and most its aliases.

Thank you all again for your continued support.

Happy Skripting!

Changelog
Bug Fixes
  • #​5658 Fixed keep inventory in a death event and related issues
  • #​5952 Fixed bugs with removing from vector length, setting components of multiple vectors, and issues when running with debug verbosity.
  • #​5965 Fixed event values in chunk enter event
  • #​5966 Fixed the registration (and logging) of Skript commands
  • #​5997 Fixed potion durations being locked to 15 seconds
  • #​6004 Added missing event-item for the book sign event
  • #​6021 Fixed inability to change the remaining time of a command cooldown
  • #​6022 Fixed an issue generating random numbers on older versions of Java
  • #​6023 Fixed an exception when attempting to use an attribute that an entity does not support
  • #​6026 Fixed a casting error when using a pre-set variable for command cooldown storage
  • #​6027 Corrected some missing versions in the documentation
  • #​6033 Fixed local variables in the spawn effect section
  • #​6047 Fixed an issue when using two or more 'variables' sections
  • #​6050 Fixed an issue when using two or more 'aliases' sections
  • #​6067 Fixed an issue when using the 'stop all sounds' effect
  • #​6072 Fixed the spawn section not working on Minecraft 1.20.2
  • #​6081 Fixed duplicate logging issues that could occur due to recent API changes

Click here to view the full list of commits made since 2.7.0

Notices
New Release Model

We have switched to a new release model starting with this version.

New syntax, features, and quality-of-life changes will be saved for large 2.X versions, released twice per year.
Bug fixes will be released monthly in smaller 2.7.X versions.

The full details of this model are available here.

Help Us Test

We have an official Discord community for beta testing Skript's new features and releases.

Compatibility Warning

Due to the major internal changes within the 2.7 update, some addons may no longer work properly.
Please be patient as addon developers work to update their addons.
We have published a new release of our Addon Patcher, but be aware that it cannot fix all issues.

Thank You

We have continued to see an increase in new contributors recently, and we would like to thank all who have contributed to this version of Skript. 🙂

Special thanks to the team members and 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.7.0

Compare Source

🚀 Skript 2.7.0
📢 We are proud to finally say that 2.7.0 is here!

Our last stable release was 2.6.4 nearly a year ago, and a lot has happened since then. In this release, we have implemented over 80 new features along with nearly 70 bug fixes. Beyond that, a significant portion of this time has been spent on overhauling Skript's codebase. This update includes some of the biggest internal enhancements in years. Almost every part of Skript should run faster, and as we continue to build upon these improvements, the benefits will only grow.

We realize that this update has taken much longer than expected. Our development cycle has been rather flawed, and we are committed to making changes that will result in a clearer release schedule. We will have more to share about that soon when we finalize a new process.

🎉 We are also very excited to welcome a new member, @​sovdeeth to our team.

Thank you all again for your continued support. Happy Skripting!

📢 End of 1.12.2 Support

As mentioned in the previous releases, we have decided to drop support for 1.12 and lower (legacy versions).
This means that this version will only work on versions 1.13 and higher.
Only critical fixes will be backported to 2.6.X.

⚠ Compatibility Warning

Due to the major internal changes within this update, some addons may no longer work properly.
Please be patient as addon developers work to update their addons.
We have published a new release of our AddonPatcher, but be aware that it cannot fix all issues.

⚠ Breaking Changes
  • Scripts in subdirectories will now load before those in the main directory.
  • List parsing order has changed to function in a clearer manner:

# Here is an example list declaration
set {_l::*} to "abc", length of "def", "ghi"

# Previous Behavior
Interpretation: "abc", length of ("def", "ghi")
Result: "abc", 3, 3

# New Behavior
Interpretation: "abc", length of ("def"), "ghi"
Result: "abc", 3, "ghi"
  • Removed the expression for obtaining the numerical ID of an item
  • The durability expression has changed. Durability now works counter to damage. That is, as the damage of an item increases, its durability decreases. Here is an example:
set {_item} to <some item with 1000 durability>
add 5 to the damage of {_item} # durability is now 995/1000
add 5 to the durability of {_item} # durability is now 1000/1000 again
️ 2.7.0 Changelog
Click here to view the full list of commits made since 2.6.4

Click below to view the entire changelog for this release (all changes since 2.6.4).

Full changelog
Notable Additions

📃 All new syntax can be viewed on docs.skriptlang.org.

  • Language support for French, Polish, Simplified Chinese, and Japanese has been added.

  • We have significantly overhauled the default examples. The goal of these new examples is to display most of Skript's feature set with a better range of difficulties.

  • Multiline conditionals has been added. These work on an if-then based structure.

Multiline Conditional Example

# all conditions must pass
if:
  condition 1
  condition 2
then:
  do stuff

# at least one condition must pass
if any:
  condition 1
  condition 2
then:
  do stuff

# it can also be used in else-if statements
if 1 + 1 = 3:
  do stuff that will never actually be done
else if:
  condition 1
  condition 2
then:
  do stuff
else:
  do stuff
  • Local Functions that can only be used in the script that they are declared have been added.
Local Function Example

# in script1.sk
local function welcome():
  broadcast "Welcome!"
  

# in script2.sk
on script load:
  welcome() # this will error as `welcome()` is only available in script1.sk
  • The Options section has been expanded to support nesting.
Nested Options Example
options:
  price:
    apple: 1000
	orange: 100

# {@&#8203;price.apple} and {@&#8203;price.orange} are now valid options
Additions
  • Added syntax support for obtaining and modifying the age of blocks (e.g. crops) and entities (closes #​3068, #​4534)
  • Added support for providing multiple players in the played before condition
  • Added syntax support for the freezing mechanics introduced in 1.18
  • Added support for the last struck lightning (this only applies to lighting strikes created by Skript) (closes #​3872)
  • Added syntax for forcing entities to pathfind to a location (closes #​2334)
  • Added syntax for obtaining a list of the names of all loaded plugins (closes #​4189)
  • Added syntax for obtaining the bed location of offline players (closes #​4659)
  • Added syntax for modifying the unsafe bed location of players, meaning they will respawn there even if the location is obstructed
  • Added events and event values for when an anvil is damaged (requires Paper) and when an item is placed in an anvil (e.g. preparing for a repair) (closes #​4456)
  • Added additional event values for the player and entity move events (closes #​4890)
  • Added a new configuration option for printing warnings for script lines that take too long to parse (closes #​4759)

Look for long parse time warning threshold in your config.sk!

  • Added an expression for obtaining the raw content of a string (no parsing or stripping of formatting) (closes #​4102)
  • Added support for spawning a wolf with a specific collar color (closes #​1760)
  • Added support for obtaining the amplifier of an entity's potion effect (thanks @​Ankoki)
  • Added complete support for the "player egg throw event"
  • Added French language support (thanks @​Romitou)
  • Added support for multiple entities in the equip syntax (closes #​5083)
  • Added the player trade event with support for obtaining the involved entity (thanks @​AbeTGT)
  • Added case sensitivty support for the join and split syntax

Note that these expressions will now take into account the case sensitivity config option (closes #​4886)

  • Added support for lang files to automatically update when changes are detected

Note that when a change is detected, existing lang files will be moved into a backups folder

  • Added the ability for creating sectioned options (closes #​4032)
  • Added support for obtaining and modifying the pickup delay of a dropped item
  • Added Polish language support
  • Added support for the last launched firework (this only applies to fireworks launched by Skript) (closes #​4942)
  • Added syntax for obtaining the environment (overworld, nether, end) of a world (closes #​3673)
  • Added a condition for checking whether an entity is gliding (thanks @​Ankoki) (closes #​5145)
  • Added syntax for modifying and checking whether an entity is invisible (thanks @​D4isDAVID)
  • Added an event for when an entity jumps (thanks @​AbeTGT)
  • Added syntax for obtaining and modifying the duration of an entity burning (closes #​923)
  • Added support for creating local functions (closes #​2188, #​5167)
  • Added syntax for obtaining the nearest entity relative to another entity or location (closes #​4674)
  • Added syntax for checking whether a location is within a certain radius of another location (closes #​5201)
  • Added syntax for obtaining the list of all banned players or IP addresses
  • Added syntax for checking if a location is within two other locations
  • Added syntax for obtaining the current moon phase of a world (closes #​746)
  • Added past, present, and future event values for the block place event
  • Added block data support to the type of expression
  • Added syntax for obtaining the text input of an anvil
  • Added the ability to set a block to a specific skull (e.g. the player's skull) (closes #​1789)
  • Added syntax for obtaining, modifying, and checking for server operators (closes #​4910)
  • Added support for multiline conditions (closes #​5152)
  • Added syntax for forcing an entity to look at another entity
  • Added syntax for allowing modification of the actual maximum player count (thanks @​kiip1)
  • Added events for when a player starts/stops/swaps spectating another entity
  • Added modification support to the book pages expression
  • Added support for using a/an in inventory types

That is, you can now write set {_var} to a shulker box inventory.

  • Added syntax for respawn anchors (thanks @​hotpocket184) (closes #​4726)
  • Added a literal representing pi (thanks @​kiip1) (closes #​5288)
  • Added a new command entry for changing the command prefix

The command prefix is used when there may be command name conflicts with another plugin (this is the skript: part of skript:mycustomcommand).

  • Added support for worlds in the name of syntax (thanks @​DelayedGaming)
  • Added support for determining whether an entity is valid

An entity will be considered invalid if it has died or despawned.

  • Added an event for when an entity drops an item (thanks @​ShaneBeee)
  • Added support for determining whether an entity is an enemy (thanks @​ShaneBeee)

Note that this is only available on Minecraft 1.19.3 and newer.

  • Added support for obtaining the source block in a block spread event (thanks @​GodModed) (closes #​5346)
  • Added the loot generate event and support for modifying the loot
  • Added syntax for obtaining and modifying the number of sea pickles at a block
  • Added support for unequipping items from an entity (thanks @​colton-boi) (closes #​5360)
  • Added Simplified Chinese language support (thanks @​CJYKK)
  • Added Japanese language support (thanks @​faketuna and @​rilyhugu)
  • Added a chat component tag for copying to the clipboard (closes #​5351)

Example: `send "<copy:text to copy>text to display"

  • Added syntax for determining whether a tool is the preferred tool for harvesting a block
  • Added syntax for determining whether an item is stackable (max stack size > 1) (thanks @​cooffeeRequired)
  • Re-enabled support for the the player view distance on newer versions where it functions (thanks @​ShaneBeee)
  • Added syntax for obtaining all values of a specific type (closes #​5065, #​5082, #​5235)

Examples include all colors, all potion effect types, etc.

  • Added syntax for obtaining how fast a player can break block at a given moment
  • Alias names can now be used for parsing block data (previously only Minecraft IDs were valid)
  • Added a value within syntax for modifying the values of a variable rather than the variable itself

Example: delete the entity within {_entity} # deletes the entity rather than the variable

  • Added syntax for applying knockback to an entity
  • Added support for rounding to a specific decimal point in the round function (closes #​3579)
  • Added an event and event values for when a change occurs in a player's inventory slot
  • Added an event for when a player has slept long enough to count as passing the night/storm (thanks @​DelayedGaming)
  • Added an event for when a player enters a chunk (thanks @​DelayedGaming) (closes #​5441)
  • Added an event for when a player's experience changes (closes #​2858)
  • Added syntax for checking if a location is within an entity, chunk, world, or block
  • Added support for modifying the Skript prefix in the language files (thanks @​Fusezion) (closes #​5424)
  • Added a chat component tag for translating game strings based on the player's locale (closes #​4875)

Example: send "<translate:block.minecraft.diamond_block>" prints Block of Diamond

  • Added support for reseting the target of an entity
  • Added an event for when a falling block starts falling (thanks @​DelayedGaming)
  • Added support for serial (Oxford) commas in lists (thanks @​Mr-Darth)
  • Added support for the inventory drag event (closes #​3744)
  • Added support for using formatting in the book pages syntax
  • Added InventoryDragEvent (closes #​3744)
Tweaks and Removals
  • Countless internal optimizations and improvements
  • Many minor syntax tweaks
  • Updated the random vector expression to return positive and negative components (closes #​3135)
  • Removed support for WorldGuard 6
  • Fixed and improved some errors and exceptions (closes #​4234)
  • Enhanced support for obtaining the target location of additional mobs
  • Scripts in subdirectories will now load before those in the main directory (closes #​466)
  • The date formatting expression now supports the usage of variables in custom formats
  • Significantly improved asynchronous script loading
  • Significantly improved the tab completion of the /skript command (specifically for enabling/reloading/disabling scripts) (closes #​4666)
  • Enhanced the "command already defined" error message to include the source of the error (closes #​1329)
  • Improved modification of the spawn point (greater accuracy) (closes #​4955)
  • Events listeners will now be unregistered when the last occurence of that event is removed from loaded scripts (closes #​5141)
  • Renamed the subtext expression to substring (thanks @​Kanvi1) (closes #​5196)
  • Removed the operator entity data (syntax was added to replace this)
  • Completely rewrote the default example scripts to better represent best practices of Skript (closes #​2252)
  • Reworked the event values for the edit book event (now includes a future event value)
  • Completely rewrote the Comparator system (closes #​4928)
  • Completely rewrote the Converter system (closes #​1747, #​5045, #​5302)
  • Improved parsing speeds, especially for larger scripts (closes #​1117, #​1783, #​4905)
  • Optimized and reworked list parsing (closes #​4025, #​5122, #​5243)
  • Overhauled the quality of code in the variables package (closes #​5398)
  • Removed the expression for obtaining the numerical ID of an item
  • The durability expression no longer functions the same as damage (now, as damage increases, durability decreases) (closes #​4692)
  • Rewrote internal math functions to improve their performance (thanks @​kiip1)
  • Improved the error message for when a left click event on an entity is used (thanks @​oskarkk)
  • Improved the performance of aliases (thanks @​bluelhf)
  • Prevents Skript from enabling Timings support for Paper versions 1.19.4 or greater (closes #​5726)
Bug Fixes
  • Fixed an issue where variables are loaded after Skript loads which breaks the usage of variables in on skript start (closes #​5882)
  • Fixed an issue where some syntax could be used in unintended events causing an exception (closes #​4872)
  • Fixed an issue where the same error may be printed multiple times for incorrect function definitions (closes #​4771)
  • Fixed an issue with function return values failed to properly convert to the expected type (closes #​4524)
  • Fixed an issue where plural arguments could be passed in singular function parameters (closes #​4859)
  • Fixed an exception that could occur when formatting a date
  • Fixed an exception that could occur if a location did not contain a world for the teleport effect
  • Fixed an exception that could occur when spawning a falling block without specifying the type (closes #​5042)
  • Fixed an issue that could occur where some events would not register if related events were already registered (thanks @​TFSMads) (closes #​4705)
  • Fixed an issue where options did not work in function declarations (closes #​2492)
  • Addressed mutliple exceptions that could occur when using parallel (multithreaded) script loading (closes #​4579)

Please understand that for the moment, parallel loading is not performed for most script loading, and therefore will have little effect. Significant improvements are expected for the future.

  • Fixed numerous issues that could occur when trying to reload script files using different cases on operating systems where file names are case insensitive (e.g. Windows) (closes #​4459)
  • Fixed an issue where adding aliases to commands would not properly sync with clients (meaning it appeared as if the alias was not registered in game) (closes #​4307)
  • Fixed an issue where function (re)loading would often incorrectly error if asynchrounous script reloading is enabled (closes #​4246)
  • Fixed an issue where an exception could occur when disabling a script that disables another one (using on stop) (closes #​4916)
  • Fixed an issue where the replace syntax would erroneously modify all used variables (closes #​5232)
  • Fixed an issue where target falling block did not work (closes #​5223)
  • Fixed an issue where block data could not be compared (closes #​5251)
  • Fixed an issue where the parse expression would have the incorrect return type when used with a pattern (closes #​5274)
  • Fixed an exception that could occur when setting the time of a SimpleExpression and providing a null default expression

Note that a SkriptAPIException will now occur instead as this in incorrect API usage.

  • Improved rounding accuracy (closes #​4235)
  • Fixed an issue where the event values for the block spread event returned the same value (thanks @​ShaneBeee)
  • Fixed a few cases where some syntax could be used in unintended events
  • Fixed an issue where obtaining a random element out of a list of literals would only randomize during parse time (rather than during runtime) (closes #​5345)
  • Fixed an issue where ghost items may remain in the inventory after cancelling an inventory interaction event (closes #​5342)
  • Fixed a few issues with integer division and multiplication (closes #​4445)
  • Fixed an issue where some expressions could erroneously modify the values of another (closes #​5322)
  • Fixed an issue where the uncolored expression failed to handle nested tags (closes #​5224)
  • Fixed an issue where goat horn variants did not work (closes #​4882)
  • Fixed an issue where negated conditions could erroneously fail on lists
  • Fixed several issues with default variables, including them not working for any expression type that wasn't an object (closes #​2174, #​4567)
  • Fixed an issue where the drop syntax would overwrite the experience amount for merged experience orbs (closes #​5490)
  • Fixed an exception that occured when getting a random number between two numbers that only differ by decimal
  • Fixed several bugs that could occur when using the all blocks syntax (closes #​5565)
  • Fixed an issue where random vectors were not unit and not true random generations (thanks @​DelayedGaming)
  • Fixed an issue where deleting the target of a player would not function as expected (closes #​4221)
  • Fixed an issue where the falling block land event was also called when a block started falling (thanks @​DelayedGaming)
  • Fixed an issue where the color of some messages (e.g. warnings, errors) was missing
  • Fixed an exception that could occur when attempting to serialize a location with an unloaded world
  • Fixed an issue where entity data was not properly applied before running the spawn effect section (closes #​5711)
  • Fixed many issues where comparisons could fail when using literals that match multiple types (closes #​2711, #​4773, #​5497, #​5556, #​5675)
  • Fixed an exception that could occur when using an invalid message for the action bar syntax (closes #​5776)
  • Fixed an exception that could occur when executing certain syntax in asynchronous events (closes #​5689)
  • Fixed an issue where book pages can't be set (closes #​5709)
  • Fixed target of expression throwing an exception in some cases when deleting an entity (closes #​5761)
  • Fixed an issue with all blocks expression throwing an exception when used with directions only (closes #​5787)
  • Fixed an issue with ExprRawString using a Java 9 feature instead of Java 8 (closes #​5794)
  • Fixed an issue where an exception is thrown when using stop all sounds effect (closes #​5756)
  • Fixed an issue where chained multiline else-ifs errors when first if is not multiline (closes #​5866)
  • Fixed an issue where you can't enchant multiple players tools (closes #​5530)
API Changes
  • We want to bring attention to the usage of ParserInstance#isCurrentEvent. When using this method to restrict your syntax to a specific event during init, you should also be performing a runtime instanceof check on the Event object. For further details, review PR #​4884.
  • Parse tags can now also be expanded onto optional pattern elements. That is, :[abc|def] is now equivalent to [:abc|:def] (this was already the case for :(abc|def) and (:abc|:def))
  • Added a utility class for easily creating Enum-based ClassInfos (see #​5129)
  • Added a utility method or deleting a variable in the Variables class (see #​5217)
  • Added support for registering plural event values (see #​5168)
  • The Comparator system has been completely rewritten. Please review the javadoc as many classes and methods have been deprecated. These will continue to function for now
  • The Converter system has been completely rewritten. Please review the javadoc as many classes and methods have been deprecated. These will continue to function for now
  • SelfRegisteringSkriptEvent has been deprecated (see #​5140)
  • Added support for registering a property expression with default expressions (see #​5272)
  • The final modifier on PropertyExpression has been removed, allowing them to return multiple items per element if overriden (see #​5455) (closes #​5521)
  • Added support for registering custom VariableStorage implementations (see #​4873)

Credit to the team on this release: @​APickledWalrus @​TheLimeGlass @​TPGamesNL @​AyhamAl-Ali @​sovdeeth @​Pikachu920 @​UnderscoreTud @​Moderocky

📝 Help Us Test

We have an official Discord community for beta testing Skript's new features and releases.

️ Thank You

We saw a large increase in new contributors recently, and we just wanted to thank all who have contributed to this version of Skript. Lots of issues and suggestions arise and we could not have made it here without the help of the community.

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.6.4: Bug fixes for legacy versions

Compare Source

Hello Skripters 👋

Today we're releasing version 2.6.4 which brings out a couple fixes towards Minecraft versions below 1.14

📢 End of 1.12.2 Support

As mentioned in the previous releases, we have decided to drop support for 1.12 and lower (legacy versions) in Skript 2.7.
This means that Skript 2.6.X is the last version that will work with the legacy versions.
Only critical fixes will be backported to 2.6.X.

️ 2.6.4 Changelog

Click below to view the entire changelog for this release.

Full changelog
Bug Fixes
  • Fixed a bug where if the lifetime value of a firework launch was greater than 127 or less than 0, it would throw an error. (thanks @​DelayedGaming)
  • Fixed a bug where the offhand tool of player was incorrect in the PlayerHeldItem event. (https://github.com/SkriptLang/Skript/issues/5094 thanks @​TUCAOEVER)
  • Fixed variable names with long numbers either taking long parsing time, or not being able to compare with another similar number. (https://github.com/SkriptLang/Skript/issues/4729, https://github.com/SkriptLang/Skript/pull/3929)
  • Fixed ExprTimePlayed not working on versions 1.13-1.14 (https://github.com/SkriptLang/Skript/issues/4929)
  • Fixed VariableString#isQuoted to work correctly, should be returning false for the input string " (with withQuotes=true). (#​5149)
  • Fixed a bug where the component type of the returned array from ExprEntities not being the return type (e.g. Player), but a generic Entity instead, in the case that the syntax was used with radius, and no entities matched the query. (#​5124)
  • Fixed a bunch of issues relating to conversion for list-modifying expressions.
  • Fixed an issue with how EffPotion interacted with patterns for potioneffects and potioneffecttypes (#​5117) (thanks @​Fusezion)
  • Fixed EffBroadcast not working on 1.9.4 (#​5019)
  • Fixed a bug where you couldn't use colons in the ExprParse syntax (thanks @​Mr-Darth)
  • Fixed a NPE from happening when spawning a falling block without specifying the block type and will default to Stone (https://github.com/SkriptLang/Skript/issues/5042) (thanks @​UnderscoreTud)
  • Fixed [on] silverfish enter and [on] silverfish exit events not actually working.
  • Changed item serialization with blocks to properly serialize. This means you cannot downgrade your Skript version after this version without losing those variables storing block value data!
  • Changed some event-values to return as an ItemStack rather than Skript's own ItemType to avoid some issues. (https://github.com/SkriptLang/Skript/issues/4109)
  • Fixed a bug where Skript couldn't spawn lingering potions in 1.9-1.13 (https://github.com/SkriptLang/Skript/issues/4933)
  • Fixed a bug where Skript might not start on 1.11.2 due to enchantment sweeping edge not being registered (https://github.com/SkriptLang/Skript/issues/4933)
  • Fixed a bug where Skript wouldn't register sound syntaxes on 1.10.2 due to sound category not existing (https://github.com/SkriptLang/Skript/issues/4933)
  • Fixed a NPE when using of %itemtype% syntax in preparing craft event (https://github.com/SkriptLang/Skript/issues/4959)
  • Fixed an issue where EffConnect would error due to Bukkit#getOnlinePlayers not returning anything, yet a player instance was provided. (#​5189)

Click here to view the full list of commits made since 2.6.3

Help Us Test

We have an official Discord community for beta testing Skript's new features and releases.

️ Thank you

We saw a large increase in new contributors recently, and we just wanted to thank all those who have contributed to this version of Skript, lots of issues and suggestions arise and we couldn't have done it all without the help of the community.

As always, if you encounter any issues or suggestions please report them at https://github.com/SkriptLang/Skript/issues
If you have any ideas or input for the future development of Skript, you can share those too at https://github.com/SkriptLang/Skript/discussions

v2.6.3: 🚀 The 1.19 Update

Compare Source

Hello Skripters 👋

Today we're releasing version 2.6.3 which brings out Minecraft 1.19 Support and some critical fixes towards UnparsedLiterals aka your itemtype being parsed as something totally different!

📢 End of 1.12.2 Support

As mentioned in the previous releases, we have decided to drop support for 1.12 and lower (legacy versions) in Skript 2.7.
This means that Skript 2.6.X is the last version that will work with the legacy versions.
Only critical fixes will be backported to 2.6.X.

️ 2.6.3 Changelog

Click below to view the entire changelog for this release.

Full changelog
Additions / Improvements
  • Updated to Minecraft 1.19 (closes #​4850)
    • Added support for all new chested boats aside from mangrove. Spigot forgot to include mangrove boats for now, they're currently working on it. (#​4834)
    • Added support for the new frogs (#​4834)
    • Added support for the new particles (#​4834)
    • Note: Goat Horn variations will not work as expected due to a kind-of bug in Bukkit, they will always return Ponder Goat Horn, see #​4882
  • Cleaned up the visual effect area pattern for area particles (#​4851)
  • Added missing event values for crafting events event-inventory & event-itemtype (#​4409)
  • Added tutorials link in /sk info (they are soon to come) (#​4838)
Fixes
  • Fixed Skript crashing on startup for Spigot only in 1.19 (#​4849)
  • Fixed a major issue with UnparsedLiterals, where sometimes things like items would be incorrectly interpreted as something else, causing parsing errors. (#​4776 closes #​3465, #​4769, #​4774 and #​4841)
  • Fixed dropping of air causing an error (#​4795 closes #​4757) (Thanks @​TFSMads)
  • Fixed a locale issue when converting from lower/upper case (#​4822 closes #​4712 and #​4821)
  • Fixed an issue where if the visual display range was not defined on a visual effect, the range would default to 1 block radius and not 32 (#​4843 closes #​4806) (Thanks @​kiip1)
  • Fixed an issue where the event-slot of the prepare crafting event would return the incorrect slot. The initial plan was for event-slot to return the result slot when the user has already placed the ingredients in the grid and the result item is being displayed. Use inventory click event for checking the slots the user used in the recipe (#​4852 closes #​4747) (Thanks @​hotpocket184)
  • Fixes an IllegalArgumentException from happening when attempting to set the player's experience level to a negative number. (#​4805 closes #​4804)
  • Fixes a few issues with the title effect (#​4362) (Thanks @​oskarkk)
  • Fixed on preparing craft: event not firing at the right time (#​4409)
  • Fixed some Skript command arguments were case sensitive (#​4838)
  • Updated documentation link in /sk info (#​4838)
  • Fixed looping entities in chunks returning wrong amount of actual entities amount (#​4608)
  • Fixed script command named arguments not working as expected (#​4796) (Thanks @​TFSMads)
  • Fixed a CCE when using hanging entity expression in non-hanging-events (e.g. breaking a stone) (#​4874)

Click here to view the full list of commits made since 2.6.2

️ Thank you

We saw a large increase in new contributors recently, and we just wanted to thank all those who have contributed to this version of Skript, lots of issues and suggestions arise and we couldn't have done it all without the help of the community.

As always, if you encounter any issues or suggestions please report them at https://github.com/SkriptLang/Skript/issues
If you have any ideas or input for the future development of Skript, you can share those too at https://github.com/SkriptLang/Skript/discussions

v2.6.2: Cleaning Up 2.6

Compare Source

It's been some time since our last release, but we're finally ready and able to release Skript 2.6.2 today. This version mainly contains bug fixes and improvements, but there are also a few minor additions. For full details, you can check out the update's full changelog below.

I'd also like to welcome our newest team member, @​AyhamAl-Ali! They have become a crucial part of this project with their awesome feature and bug patches, but more importantly, their terrific web experience and contributions. The docs have never looked better! I'm truly looking forward to everything they'll continue to offer this project. Thank you again for your contributions!

End of 1.12.2 Support

As mentioned in the previous releases, we have decided to drop support for 1.12 and lower (legacy versions).
This is likely to be the last 2.6.x release, making this the last version to support 1.12 and lower. If necessary, we will backport critical fixes.

️ Changes
Click here to view the full list of commits made since 2.6.1
Click here to view the full list of fixes, improvements, and additions
Fixes

Please note that with this change, or lists will no longer always pick a set value, meaning in something like:

set {_x} to 10
set {_y} to {_x} or {_not-set-variable}

{_y} will be set to 10 or set to nothing (whereas it would always be set to 10 before)

Please note that this change removes the ability to use saturation as a default expression. This breaks scripts that do something like:

on hunger bar change:
    broadcast "%saturation%"
Additions / Improvements

This is useful for plugins like Geyser where some usernames are prefixed by a specific character.

This change forces users to use attacker/victim to avoid confusion as to why they're not getting a message or why their code isn't erroring.

️ Thanks for Reading

As always, if you encounter any issues please report them at https://github.com/SkriptLang/Skript/issues.
If you have any ideas or input for the future development of Skript, you can share those too at https://github.com/SkriptLang/Skript/discussions.


Configuration

📅 Schedule: 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 has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [com.github.SkriptLang:Skript](https://docs.skriptlang.org) ([source](https://github.com/SkriptLang/Skript)) | dependencies | minor | `2.6.1` -> `2.17.0-feature-docs-overhaul` | --- ### Release Notes <details> <summary>SkriptLang/Skript (com.github.SkriptLang:Skript)</summary> ### [`v2.16.0-pre1`](https://github.com/SkriptLang/Skript/releases/tag/2.16.0-pre1): Pre-Release 2.16.0-pre1 ##### 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](https://papermc.io) is required**. Below, you can familiarize yourself with the changes. Additionally, [by clicking here](https://docs.skriptlang.org/docs.html?isNew), you can view the list of new syntax on our documentation site. As always, report any issues to our [issues page](https://github.com/SkriptLang/Skript/issues)! Per our [release model](https://github.com/SkriptLang/Skript/blob/master/CLOCKWORK_RELEASE_MODEL.md), 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](https://minecraft.wiki/w/Bossbar). There is full support for a bar's title, progress, color, and more: ```applescript 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](https://minecraft.wiki/w/Commands/bossbar) command: ```applescript command /create-ad <text> <color> <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: ```applescript on spawn of wither: set the title of the boss bar of the event-entity to "<red>Angry Wither" ``` ##### Stored Enchantments A '[stored enchantments](https://docs.skriptlang.org/docs?search=%23ExprStoredEnchantments)' 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: ```applescript command /godbook: trigger: set {_item} to minecraft:enchanted_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](https://docs.skriptlang.org/docs?search=%23ExprResolvedComponent)' expression has been added which provides support for using certain MiniMessage tags such as [selector](https://docs.papermc.io/adventure/minimessage/format/#selector), [score](https://docs.papermc.io/adventure/minimessage/format/#score), and [nbt](https://docs.papermc.io/adventure/minimessage/format/#nbt). Consider this example: ```applescript send formatted "My name is <selector:@&#8203;s>!" ``` The component must be resolved with a player so that the `@s` selector can be identified. Simply using the syntax: ```applescript send formatted "My name is <selector:@&#8203;s>!" resolved for player ``` You can get an actual input, such as `My name is Njol!` ##### Wait Section The ['wait'](https://docs.skriptlang.org/docs?search=%23Delay) 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: ```applescript broadcast "A" wait 1 second: broadcast "B" broadcast "C" ``` Running this would result in `A` and then `C` being broadcast, followed by `B` after 1 second. ##### ⚠ 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 - [#&#8203;8413](https://github.com/SkriptLang/Skript/issues/8413) Adds support for all entities (not just living entities) to the leash syntaxes. - [#&#8203;8500](https://github.com/SkriptLang/Skript/issues/8500) Adds a '[skull texture](https://docs.skriptlang.org/docs?search=%23ExprSkullTexture)' expression for obtaining and modifying the texture of a player head. - [#&#8203;8501](https://github.com/SkriptLang/Skript/issues/8501) Adds a '[pathfind](https://docs.skriptlang.org/docs?search=%23pathfind)' event, '[pathfinding target entity](https://docs.skriptlang.org/docs?search=%23ExprPathfindingTarget)' expression, and '[pathfinding target location](https://docs.skriptlang.org/docs?search=%23ExprPathfindingLocation)' expression. - [#&#8203;8540](https://github.com/SkriptLang/Skript/issues/8540) Adds an '[entity](https://docs.skriptlang.org/docs?search=%23entity)' function for obtaining an entity from its [UUID](https://docs.skriptlang.org/docs?search=%23uuid). - [#&#8203;8547](https://github.com/SkriptLang/Skript/issues/8547) Adds support for using the ['wait'](https://docs.skriptlang.org/docs?search=%23Delay) effect as a section. - [#&#8203;8587](https://github.com/SkriptLang/Skript/issues/8587) Adds a '[replace](https://docs.skriptlang.org/docs?search=%23ExprReplace)' expression for performing string replacements in line. - [#&#8203;8600](https://github.com/SkriptLang/Skript/issues/8600) Adds a '[player list priority](https://docs.skriptlang.org/docs?search=%23ExprHash)' expression for ordering players in the player (tab) list. - [#&#8203;8620](https://github.com/SkriptLang/Skript/issues/8620) Adds support for writing `uuids` (plural) in the '[UUID](https://docs.skriptlang.org/docs?search=%23ExprUUID)' expression. - [#&#8203;8630](https://github.com/SkriptLang/Skript/issues/8630) Adds support for managing potion effects of area effect clouds and arrows (in entity form/in flight). - [#&#8203;8668](https://github.com/SkriptLang/Skript/issues/8668) Adds support for obtaining the [minimum/maximum enchantment level](https://docs.skriptlang.org/docs?search=%23ExprMinMaxEnchantmentLevel) of an enchantment, the [stored enchantments](https://docs.skriptlang.org/docs?search=%23ExprStoredEnchantments) of an item (e.g., enchanted book), and the [enchantment hint](https://docs.skriptlang.org/docs?search=%23ExprEnchantmentHint) that was shown to the player. - [#&#8203;8673](https://github.com/SkriptLang/Skript/issues/8673) Adds support for boss bars (see the dedicated section above). - [#&#8203;8688](https://github.com/SkriptLang/Skript/issues/8688) Adds support for getting multiple random elements, with or without repetition, from lists using the '[elements](https://docs.skriptlang.org/docs?search=%23ExprElement)' expression. - [#&#8203;8698](https://github.com/SkriptLang/Skript/issues/8698) Adds a '[resolved component](https://docs.skriptlang.org/docs?search=%23ExprResolvedComponent)' expression for resolving certain parts of text components, such as selectors. - [#&#8203;8708](https://github.com/SkriptLang/Skript/issues/8708) Adds support for [obtaining the location](https://docs.skriptlang.org/docs?search=%23ExprLocation) of an offline player. - [#&#8203;8714](https://github.com/SkriptLang/Skript/issues/8714) Adds an optional 'player' keyword to the '[gamemode change](https://docs.skriptlang.org/docs.html?search=%23gamemode_change)' event. ##### Changes - [#&#8203;8579](https://github.com/SkriptLang/Skript/issues/8579) Adds additional aliases to the '[send block change](https://docs.skriptlang.org/docs?search=%23EffSendBlockChange)' effect. - [#&#8203;8640](https://github.com/SkriptLang/Skript/issues/8640) Overhauls Skript's existing tree type support, including a rename from `structuretype` to `treetype`. - [#&#8203;8659](https://github.com/SkriptLang/Skript/issues/8659) Makes internal improvements to world border syntaxes. - [#&#8203;8712](https://github.com/SkriptLang/Skript/issues/8712) Deprecates the `[player]` and `[message]` placeholders in the '[chat format](https://docs.skriptlang.org/docs.html?search=%23ExprChatFormat)' expression in favor of the existing '[player](https://docs.skriptlang.org/docs.html?search=#ExprEntity)' and '[chat message](https://docs.skriptlang.org/docs.html?search=%23ExprChatMessage)' expressions. ##### Bug Fixes - [#&#8203;8630](https://github.com/SkriptLang/Skript/issues/8630) Fixes an issue where using `remove all` with the '[potion effects of entity/item](https://docs.skriptlang.org/docs?search=%23ExprPotionEffects)' expression did not correctly consider active/hidden effects. ##### API Changes - [#&#8203;8557](https://github.com/SkriptLang/Skript/issues/8557) Adds `SectionUtils#loadDelayableLinkedCode`, an alternative to `SectionUtils#loadLinkedCode` that permits the use of delays within the linked code. - [#&#8203;8677](https://github.com/SkriptLang/Skript/issues/8677) Deprecates the `registerComparator` options of `EnumClassInfo` and `RegistryClassInfo`. This functionality was required due to a previous bug which has since been resolved. - [#&#8203;8677](https://github.com/SkriptLang/Skript/issues/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. - [#&#8203;8709](https://github.com/SkriptLang/Skript/issues/8709) Adds methods (`SyntaxInfo#simple`) for creating syntax infos from a class and patterns, without having to use a builder. - [#&#8203;8728](https://github.com/SkriptLang/Skript/issues/8728) Cleans up internals of `EffTeleport` and removes dependency on PaperLib. - [#&#8203;8729](https://github.com/SkriptLang/Skript/issues/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](https://github.com/SkriptLang/Skript/tree/master/src/main/resources/scripts/-examples/experimental%20features). <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. ```applescript 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 ``` ```applescript 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: ```applescript 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: ```applescript {_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`. ```applescript 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: ```applescript 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 ```applescript 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](https://docs.skriptlang.org/docs.html?search=equippable%20component) on our documentation website. </details> ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;ahmadmsaleem](https://github.com/ahmadmsaleem) - [@&#8203;AnOwlBe](https://github.com/AnOwlBe) - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;bluelhf](https://github.com/bluelhf) - [@&#8203;MrScopes](https://github.com/MrScopes) - [@&#8203;novystar](https://github.com/novystar) - [@&#8203;ShaneBeee](https://github.com/ShaneBeee) - [@&#8203;Shroobz](https://github.com/Shroobz) ⭐ First contribution! ⭐ - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) - [@&#8203;tibisabau](https://github.com/tibisabau) - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.15.4`](https://github.com/SkriptLang/Skript/releases/tag/2.15.4): Patch Release 2.15.4 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.15.3...2.15.4) ##### 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](https://github.com/SkriptLang/Skript/issues). Happy Skripting! ##### Changelog ##### Changes - [#&#8203;8683](https://github.com/SkriptLang/Skript/issues/8683) Clarifies the behavior of the '[explode](https://docs.skriptlang.org/docs?search=%23EvtExplode)' event when the `mob griefing` gamerule is `false`. ##### Bug Fixes - [#&#8203;8678](https://github.com/SkriptLang/Skript/issues/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. - [#&#8203;8679](https://github.com/SkriptLang/Skript/issues/8679) Fixes an issue where `show` was not part of the second pattern of the '[play or draw an effect](https://docs.skriptlang.org/docs?search=%23EffPlayEffect)' effect. - [#&#8203;8681](https://github.com/SkriptLang/Skript/issues/8681) Fixes an issue where a text component converted to a string and then back would sometimes result in a different text component. - [#&#8203;8687](https://github.com/SkriptLang/Skript/issues/8687) Fixes various issues around concurrent script reloads causing exceptions or incomplete loads. - [#&#8203;8697](https://github.com/SkriptLang/Skript/issues/8697) Fixes an issue where Skript could error when attempting to hook into a plugin that failed to load. - [#&#8203;8711](https://github.com/SkriptLang/Skript/issues/8711) Fixes an issue where some valid default function parameters could unexpectedly fail to parse. - [#&#8203;8719](https://github.com/SkriptLang/Skript/issues/8719) Fixes an issue where some named parameters were not valid when specified in a function call. - [#&#8203;8736](https://github.com/SkriptLang/Skript/issues/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](https://github.com/SkriptLang/Skript/compare/2.15.3...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](https://github.com/SkriptLang/Skript/tree/2.15.4/src/main/resources/scripts/-examples/experimental%20features). <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. ```applescript= 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 ``` ```applescript= 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: ```applescript 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: ```applescript {_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`. ```applescript 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: ```applescript 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 ```applescript 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](https://docs.skriptlang.org/docs.html?search=equippable%20component) 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](https://discord.gg/ZPsZAg6ygu) 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: - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;MrScopes](https://github.com/MrScopes) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;TheMug06](https://github.com/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>. ### [`v2.15.3`](https://github.com/SkriptLang/Skript/releases/tag/2.15.3): Patch Release 2.15.3 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.15.2...2.15.3) ##### 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](https://github.com/SkriptLang/Skript/issues). Happy Skripting! ##### Changelog ##### Changes - [#&#8203;8598](https://github.com/SkriptLang/Skript/issues/8598) Removes mentions of SQL variable storage in the configuration file as they do not currently work. - [#&#8203;8671](https://github.com/SkriptLang/Skript/issues/8671) Adds missing language definitions for certain 26.1 features. ##### Bug Fixes - [#&#8203;8562](https://github.com/SkriptLang/Skript/issues/8562) Fixes an issue where queue behavior was inconsistent. - [#&#8203;8596](https://github.com/SkriptLang/Skript/issues/8596) Corrects some invalid examples in the documentation of several loot table-related syntaxes. - [#&#8203;8608](https://github.com/SkriptLang/Skript/issues/8608) Fixes an issue where the '[rgb](https://docs.skriptlang.org/docs.html?search=#rgb)'' function did not validate the range of its parameters. - [#&#8203;8609](https://github.com/SkriptLang/Skript/issues/8609) Fixes an issue where an error could occur when '[hashing](https://docs.skriptlang.org/docs.html?search=#ExprHash)' a string using `MD5` in an effect command. - [#&#8203;8623](https://github.com/SkriptLang/Skript/issues/8623) Fixes an issue where formatting did not work in the `usage` entry of '[commands](https://docs.skriptlang.org/docs.html?search=#StructCommand)'. - [#&#8203;8627](https://github.com/SkriptLang/Skript/issues/8627) Fixes an issue where uppercase characters no longer worked for legacy formatting. - [#&#8203;8627](https://github.com/SkriptLang/Skript/issues/8627) Fixes an issue where the '[contains](https://docs.skriptlang.org/docs.html?search=#PropCondContains)' condition did not work as expected with text components stored in variables. - [#&#8203;8628](https://github.com/SkriptLang/Skript/issues/8628) Fixes text component (formatting) supported in the '[ban](https://docs.skriptlang.org/docs.html?search=#EffBan)' and '[kick](https://docs.skriptlang.org/docs.html?search=#EffKick)' effects. - [#&#8203;8647](https://github.com/SkriptLang/Skript/issues/8647) Fixes incorrect event value cache results. - [#&#8203;8650](https://github.com/SkriptLang/Skript/issues/8650) Improves the accuracy of some Turkish language translations. - [#&#8203;8653](https://github.com/SkriptLang/Skript/issues/8653) Fixes some items being stringified using legacy formatting. - [#&#8203;8662](https://github.com/SkriptLang/Skript/issues/8662) Fixes an error that could occur when indentation errors were encountered during Skript's testing process. - [#&#8203;8664](https://github.com/SkriptLang/Skript/issues/8664) Fixes an issue where using a location without a world as a variable index would cause an error. - [#&#8203;8667](https://github.com/SkriptLang/Skript/issues/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](https://github.com/SkriptLang/Skript/compare/2.15.2...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](https://github.com/SkriptLang/Skript/tree/2.15.3/src/main/resources/scripts/-examples/experimental%20features). <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. ```applescript= 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 ``` ```applescript= 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: ```applescript 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: ```applescript {_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`. ```applescript 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: ```applescript 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 ```applescript 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](https://docs.skriptlang.org/docs.html?search=equippable%20component) 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](https://discord.gg/ZPsZAg6ygu) 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: - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;Dev-Xeiji](https://github.com/Dev-Xeiji) ⭐ First contribution! ⭐ - [@&#8203;Efnilite](https://github.com/Efnilite) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;kayerajava](https://github.com/kayerajava) ⭐ First contribution! ⭐ - [@&#8203;mvanhorn](https://github.com/mvanhorn) ⭐ First contribution! ⭐ - [@&#8203;ShaneBeee](https://github.com/ShaneBeee) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.15.2`](https://github.com/SkriptLang/Skript/releases/tag/2.15.2): Emergency Patch Release 2.15.2 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.15.1...2.15.2) ##### 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](https://github.com/SkriptLang/Skript/issues). Happy Skripting! ##### Changelog ##### Bug Fixes - [#&#8203;8542](https://github.com/SkriptLang/Skript/issues/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](https://github.com/SkriptLang/Skript/compare/2.15.1...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](https://github.com/SkriptLang/Skript/tree/2.15.2/src/main/resources/scripts/-examples/experimental%20features). <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. ```applescript= 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 ``` ```applescript= 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: ```applescript 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: ```applescript {_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`. ```applescript 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: ```applescript 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 ```applescript 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](https://docs.skriptlang.org/docs.html?search=equippable%20component) 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](https://discord.gg/ZPsZAg6ygu) 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: - [@&#8203;APickledWalrus](https://github.com/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>. ### [`v2.15.1`](https://github.com/SkriptLang/Skript/releases/tag/2.15.1): Patch Release 2.15.1 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.15.0...2.15.1) ##### 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](https://github.com/SkriptLang/Skript/issues). Happy Skripting! ##### Changelog ##### Additions - [#&#8203;8583](https://github.com/SkriptLang/Skript/issues/8583) Added a note in code-conventions.md about version checks. ##### Bug Fixes - [#&#8203;8542](https://github.com/SkriptLang/Skript/issues/8542) Lowered the parsing priority of the `parsed as` expression for more predictable behvaior. - [#&#8203;8551](https://github.com/SkriptLang/Skript/issues/8551) Fixed an issue when trying to get the colour of a string with an empty tag. - [#&#8203;8563](https://github.com/SkriptLang/Skript/issues/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. - [#&#8203;8576](https://github.com/SkriptLang/Skript/issues/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. - [#&#8203;8580](https://github.com/SkriptLang/Skript/issues/8580) Fixed an issue where arguments would pass references to functions rather than copies. - [#&#8203;8585](https://github.com/SkriptLang/Skript/issues/8585) Fixed an issue where sign indices would start from 0 rather than 1. - [#&#8203;8589](https://github.com/SkriptLang/Skript/issues/8589) Fixed an issue where double hashtag hex codes no longer work (`<##AABBCC>`). - [#&#8203;8589](https://github.com/SkriptLang/Skript/issues/8589) Fixed an issue where escape characters for legacy formatting weren't removed. - [#&#8203;8607](https://github.com/SkriptLang/Skript/issues/8607) Fixed an issue `contains` didn't work with components. - [#&#8203;8607](https://github.com/SkriptLang/Skript/issues/8607) Fixed an issue where some slots didn't work with the `lore` expression. - [#&#8203;8607](https://github.com/SkriptLang/Skript/issues/8607) Fixed an issue where components didn't work with the `replace` effect. ##### API Fixes - [#&#8203;8529](https://github.com/SkriptLang/Skript/issues/8529) Replaced old manual event restriction checks with the modern EventRestrictedSyntax interface. - [#&#8203;8610](https://github.com/SkriptLang/Skript/issues/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](https://github.com/SkriptLang/Skript/compare/2.15.0...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](https://github.com/SkriptLang/Skript/tree/2.15.1/src/main/resources/scripts/-examples/experimental%20features). <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. ```applescript= 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 ``` ```applescript= 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: ```applescript 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: ```applescript {_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`. ```applescript 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: ```applescript 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 ```applescript 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](https://docs.skriptlang.org/docs.html?search=equippable%20component) 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](https://discord.gg/ZPsZAg6ygu) 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: - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;bluelhf](https://github.com/bluelhf) - [@&#8203;Efnilite](https://github.com/Efnilite) - [@&#8203;NotroDev](https://github.com/NotroDev) ⭐ First contribution! ⭐ - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.15.0`](https://github.com/SkriptLang/Skript/releases/tag/2.15.0): Feature Release 2.15.0 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.15.0-pre2...2.15.0) ##### 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](https://papermc.io) is required**. Below, you can familiarize yourself with the changes. Additionally, [by clicking here](https://docs.skriptlang.org/docs.html?isNew), you can view the list of new syntax on our documentation site. As always, report any issues to our [issues page](https://github.com/SkriptLang/Skript/issues)! Per our [release model](https://github.com/SkriptLang/Skript/blob/master/CLOCKWORK_RELEASE_MODEL.md), 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: ```applescript 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: ```applescript send "<rainbow>Wow this text is super colorful!" ``` ```applescript # 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](https://docs.skriptlang.org/docs.html?search=#ExprColored) 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](https://docs.skriptlang.org/docs.html?search=#ExprMetadata), but they persist through server restarts and attach directly to things. Here is a simple example of storing a damage bonus on a sword: ```applescript 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](https://beta-docs.skriptlang.org/scripting/pdc/) 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: ```java // 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: [#&#8203;8326](https://github.com/SkriptLang/Skript/pull/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](https://docs.skriptlang.org/docs.html?search=#ExprTypeOf)' and '[plain](https://docs.skriptlang.org/docs.html?search=#ExprPlain)' 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 - [#&#8203;8505](https://github.com/SkriptLang/Skript/issues/8505) Fixes an issue where attempting to kill an entity using the 'kill' effect would fail to do so under certain conditions. - [#&#8203;8519](https://github.com/SkriptLang/Skript/issues/8519) Significantly optimize certain list operations such as adding, deleting and getting the size of a list. - [#&#8203;8536](https://github.com/SkriptLang/Skript/issues/8536) Fixes an issue where sytaxes involving regular expressions take precedence over other possibly conflicting syntaxes - [#&#8203;8538](https://github.com/SkriptLang/Skript/issues/8538) Fixes an issue where text components were unable save in variables. ##### Additions - [#&#8203;8327](https://github.com/SkriptLang/Skript/issues/8327) Adds a '[persistent data value](https://docs.skriptlang.org/docs.html?search=#ExprPersistentData)' expression for working with persistent data tags (see "Persistent Data Tags" above). - [#&#8203;8329](https://github.com/SkriptLang/Skript/issues/8329) Adds an '[attempt attack](https://docs.skriptlang.org/docs.html?search=#EvtAttemptAttack)' 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. - [#&#8203;8331](https://github.com/SkriptLang/Skript/issues/8331) Adds a '[player pick item](https://docs.skriptlang.org/docs.html?search=#EvtPlayerPickItem)' event for when a player uses the pick key (default middle mouse button) and '[picked item/block/entity](https://docs.skriptlang.org/docs.html?search=#ExprPickedItem)' expression to obtain the thing "picked". - [#&#8203;8351](https://github.com/SkriptLang/Skript/issues/8351) Adds a '[location with yaw/pitch](https://docs.skriptlang.org/docs.html?search=#ExprWithYawPitch)' for obtaining a copy of a location with a modified yaw and/or pitch. - [#&#8203;8353](https://github.com/SkriptLang/Skript/issues/8353) Adds a '[reduce](https://docs.skriptlang.org/docs.html?search=#ExprReduce)' expression for reducing a list of elements into a single value. - [#&#8203;8396](https://github.com/SkriptLang/Skript/issues/8396) Adds a configuration option to compress configuration, language, and variables file backups. This is enabled by default. - [#&#8203;8415](https://github.com/SkriptLang/Skript/issues/8415) Adds failure caches to the parsing system to further improve parse times. - [#&#8203;8412](https://github.com/SkriptLang/Skript/issues/8412) Adds a '[vector(n)](https://docs.skriptlang.org/docs.html?search=#vector)' function, which is a shortcut for '[vector(n, n, n)](https://docs.skriptlang.org/docs.html?search=#vector)'. - [#&#8203;8483](https://github.com/SkriptLang/Skript/issues/8483) Adds a fast path for integer indices in variables, improving comparison speeds. - [#&#8203;8514](https://github.com/SkriptLang/Skript/issues/8514) Adds missing definitions for certain Mounts of Mayhem features. - [#&#8203;8522](https://github.com/SkriptLang/Skript/issues/8522) Adds support for Paper 26.1.1. ##### Changes - [#&#8203;8402](https://github.com/SkriptLang/Skript/issues/8402) Unifies the behavior of the '[type of](https://docs.skriptlang.org/docs.html?search=#ExprTypeOf)' and '[plain](https://docs.skriptlang.org/docs.html?search=#ExprPlain)' 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. - [#&#8203;8414](https://github.com/SkriptLang/Skript/issues/8414) Makes the `damage source` experiment mainstream, no longer requiring `using damage sources` to enable. - [#&#8203;8433](https://github.com/SkriptLang/Skript/issues/8433) Improves the code quality of the '[brushing stage](https://docs.skriptlang.org/docs.html?search=#ExprDustedStage)' expression. - [#&#8203;8516](https://github.com/SkriptLang/Skript/issues/8516) Further improves internal code quality and organization. - [#&#8203;8517](https://github.com/SkriptLang/Skript/issues/8517) Adds a warning regarding the deprecation of region hooks. - [#&#8203;8519](https://github.com/SkriptLang/Skript/issues/8519) Significantly optimize certain list operations such as adding, deleting and getting the size of a list. ##### Bug Fixes - [#&#8203;8435](https://github.com/SkriptLang/Skript/issues/8435) Fixes an issue where Skript would fail to properly cancel some click events. - [#&#8203;8463](https://github.com/SkriptLang/Skript/issues/8463) Fixes an issue where the '[inventory close expression](https://docs.skriptlang.org/docs.html?search=#ExprInventoryCloseReason)' failed to return a value. - [#&#8203;8495](https://github.com/SkriptLang/Skript/issues/8495) Fixes an issue where '[game effects](https://docs.skriptlang.org/docs.html?search=#gameeffect)' appeared incorrectly in the documentation. - [#&#8203;8498](https://github.com/SkriptLang/Skript/issues/8498) Fixes an issue where some syntax errors could be improperly overriden by a more generic error. - [#&#8203;8502](https://github.com/SkriptLang/Skript/issues/8502) Fixes an issue where internal syntax definitions were improperly compared. - [#&#8203;8505](https://github.com/SkriptLang/Skript/issues/8505) Fixes an issue where attempting to kill an entity using the 'kill' effect would fail to do so under certain conditions. - [#&#8203;8512](https://github.com/SkriptLang/Skript/issues/8512) Fixes an error that could occur when using the '[tags of x](https://docs.skriptlang.org/docs.html?search=#ExprTagsOf)' expression. - [#&#8203;8518](https://github.com/SkriptLang/Skript/issues/8518) Fixes an issue where a delay in a section that results in the termination of execution would propagate beyond that section. - [#&#8203;8536](https://github.com/SkriptLang/Skript/issues/8536) Fixes an issue where sytaxes involving regular expressions take precedence over other possibly conflicting syntaxes - [#&#8203;8538](https://github.com/SkriptLang/Skript/issues/8538) Fixes an issue where text components were unable save in variables. ##### API Changes - [#&#8203;8326](https://github.com/SkriptLang/Skript/issues/8326) Overhauls the event value system with a new registration process that enables support for custom identifiers, event validation and any combination of changers. - [#&#8203;8346](https://github.com/SkriptLang/Skript/issues/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. - [#&#8203;8376](https://github.com/SkriptLang/Skript/issues/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) - [#&#8203;8377](https://github.com/SkriptLang/Skript/issues/8377) Skript's testing framework will now copy directories from provided resource files, rather than just singular files. - [#&#8203;8391](https://github.com/SkriptLang/Skript/issues/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](https://github.com/SkriptLang/Skript/compare/2.14.3...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](https://github.com/SkriptLang/Skript/tree/master/src/main/resources/scripts/-examples/experimental%20features). <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. ```applescript 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 ``` ```applescript 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: ```applescript 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: ```applescript {_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`. ```applescript 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: ```applescript 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 ```applescript 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](https://docs.skriptlang.org/docs.html?search=equippable%20component) on our documentation website. </details> ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;bluelhf](https://github.com/bluelhf) - [@&#8203;devdinc](https://github.com/devdinc) ⭐ First contribution! ⭐ - [@&#8203;Efnilite](https://github.com/Efnilite) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;miberss](https://github.com/miberss) - [@&#8203;MrScopes](https://github.com/MrScopes) - [@&#8203;Pesekjak](https://github.com/Pesekjak) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;tibisabau](https://github.com/tibisabau) ⭐ First contribution! ⭐ - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.15.0-pre2`](https://github.com/SkriptLang/Skript/releases/tag/2.15.0-pre2): Pre-Release 2.15.0-pre2 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.15.0-pre1...2.15.0-pre2) ##### 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](https://papermc.io) 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](https://docs.skriptlang.org/docs.html?isNew), you can view the list of new syntax on our documentation site. As always, report any issues to our [issues page](https://github.com/SkriptLang/Skript/issues)! Per our [release model](https://github.com/SkriptLang/Skript/blob/master/CLOCKWORK_RELEASE_MODEL.md), 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: ```applescript 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: ```applescript send "<rainbow>Wow this text is super colorful!" ``` ```applescript # 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](https://docs.skriptlang.org/docs.html?search=#ExprColored) 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](https://docs.skriptlang.org/docs.html?search=#ExprMetadata), but they persist through server restarts and attach directly to things. Here is a simple example of storing a damage bonus on a sword: ```applescript 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](https://beta-docs.skriptlang.org/scripting/pdc/) 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: ```java // 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: [#&#8203;8326](https://github.com/SkriptLang/Skript/pull/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 - [#&#8203;8522](https://github.com/SkriptLang/Skript/issues/8522) Adds support for Paper 26.1.1. - [#&#8203;8527](https://github.com/SkriptLang/Skript/issues/8527) Fixes an issue where adding objects of the same type to a typed PDC list did not work as expected. - [#&#8203;8528](https://github.com/SkriptLang/Skript/issues/8528) Adds quality-of-life PDC syntaxes for checking whether something has a specific tag and obtaining all of the tags something has. - [#&#8203;8530](https://github.com/SkriptLang/Skript/issues/8530) Fixes an issue where event values were not properly compared when detecting duplicate registrations. Some methods have also had their return types updated. - [#&#8203;8533](https://github.com/SkriptLang/Skript/issues/8533) Adjusts the default list of safe formatting tags and adds a configuration option to allow customizing it. ##### Additions - [#&#8203;8327](https://github.com/SkriptLang/Skript/issues/8327) Adds a '[persistent data value](https://docs.skriptlang.org/docs.html?search=#ExprPersistentData)' expression for working with persistent data tags (see "Persistent Data Tags" above). - [#&#8203;8329](https://github.com/SkriptLang/Skript/issues/8329) Adds an '[attempt attack](https://docs.skriptlang.org/docs.html?search=#EvtAttemptAttack)' 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. - [#&#8203;8331](https://github.com/SkriptLang/Skript/issues/8331) Adds a '[player pick item](https://docs.skriptlang.org/docs.html?search=#EvtPlayerPickItem)' event for when a player uses the pick key (default middle mouse button) and '[picked item/block/entity](https://docs.skriptlang.org/docs.html?search=#ExprPickedItem)' expression to obtain the thing "picked". - [#&#8203;8351](https://github.com/SkriptLang/Skript/issues/8351) Adds a '[location with yaw/pitch](https://docs.skriptlang.org/docs.html?search=#ExprWithYawPitch)' for obtaining a copy of a location with a modified yaw and/or pitch. - [#&#8203;8353](https://github.com/SkriptLang/Skript/issues/8353) Adds a '[reduce](https://docs.skriptlang.org/docs.html?search=#ExprReduce)' expression for reducing a list of elements into a single value. - [#&#8203;8396](https://github.com/SkriptLang/Skript/issues/8396) Adds a configuration option to compress configuration, language, and variables file backups. This is enabled by default. - [#&#8203;8415](https://github.com/SkriptLang/Skript/issues/8415) Adds failure caches to the parsing system to further improve parse times. - [#&#8203;8412](https://github.com/SkriptLang/Skript/issues/8412) Adds a '[vector(n)](https://docs.skriptlang.org/docs.html?search=#vector)' function, which is a shortcut for '[vector(n, n, n)](https://docs.skriptlang.org/docs.html?search=#vector)'. - [#&#8203;8483](https://github.com/SkriptLang/Skript/issues/8483) Adds a fast path for integer indices in variables, improving comparison speeds. - [#&#8203;8514](https://github.com/SkriptLang/Skript/issues/8514) Adds missing definitions for certain Mounts of Mayhem features. - [#&#8203;8522](https://github.com/SkriptLang/Skript/issues/8522) Adds support for Paper 26.1.1. ##### Changes - [#&#8203;8402](https://github.com/SkriptLang/Skript/issues/8402) Unifies the behavior of the '[type of](https://docs.skriptlang.org/docs.html?search=#ExprTypeOf)' and '[plain](https://docs.skriptlang.org/docs.html?search=#ExprPlain)' 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. - [#&#8203;8414](https://github.com/SkriptLang/Skript/issues/8414) Makes the `damage source` experiment mainstream, no longer requiring `using damage sources` to enable. - [#&#8203;8433](https://github.com/SkriptLang/Skript/issues/8433) Improves the code quality of the '[brushing stage](https://docs.skriptlang.org/docs.html?search=#ExprDustedStage)' expression. - [#&#8203;8516](https://github.com/SkriptLang/Skript/issues/8516) Further improves internal code quality and organization. - [#&#8203;8517](https://github.com/SkriptLang/Skript/issues/8517) Adds a warning regarding the deprecation of region hooks. ##### Bug Fixes - [#&#8203;8435](https://github.com/SkriptLang/Skript/issues/8435) Fixes an issue where Skript would fail to properly cancel some click events. - [#&#8203;8463](https://github.com/SkriptLang/Skript/issues/8463) Fixes an issue where the '[inventory close expression](https://docs.skriptlang.org/docs.html?search=#ExprInventoryCloseReason)' failed to return a value. - [#&#8203;8495](https://github.com/SkriptLang/Skript/issues/8495) Fixes an issue where '[game effects](https://docs.skriptlang.org/docs.html?search=#gameeffect)' appeared incorrectly in the documentation. - [#&#8203;8498](https://github.com/SkriptLang/Skript/issues/8498) Fixes an issue where some syntax errors could be improperly overriden by a more generic error. - [#&#8203;8502](https://github.com/SkriptLang/Skript/issues/8502) Fixes an issue where internal syntax definitions were improperly compared. - [#&#8203;8512](https://github.com/SkriptLang/Skript/issues/8512) Fixes an error that could occur when using the '[tags of x](https://docs.skriptlang.org/docs.html?search=#ExprTagsOf)' expression. - [#&#8203;8518](https://github.com/SkriptLang/Skript/issues/8518) Fixes an issue where a delay in a section that results in the termination of execution would propagate beyond that section. ##### API Changes - [#&#8203;8326](https://github.com/SkriptLang/Skript/issues/8326) Overhauls the event value system with a new registration process that enables support for custom identifiers, event validation and any combination of changers. - [#&#8203;8346](https://github.com/SkriptLang/Skript/issues/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. - [#&#8203;8376](https://github.com/SkriptLang/Skript/issues/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) - [#&#8203;8377](https://github.com/SkriptLang/Skript/issues/8377) Skript's testing framework will now copy directories from provided resource files, rather than just singular files. - [#&#8203;8391](https://github.com/SkriptLang/Skript/issues/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](https://github.com/SkriptLang/Skript/compare/2.14.3...2.15.0-pre2) ##### 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](https://github.com/SkriptLang/Skript/tree/master/src/main/resources/scripts/-examples/experimental%20features). <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. ```applescript 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 ``` ```applescript 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: ```applescript 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: ```applescript {_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`. ```applescript 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: ```applescript 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 ```applescript 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](https://docs.skriptlang.org/docs.html?search=equippable%20component) on our documentation website. </details> ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;devdinc](https://github.com/devdinc) ⭐ First contribution! ⭐ - [@&#8203;Efnilite](https://github.com/Efnilite) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;miberss](https://github.com/miberss) - [@&#8203;MrScopes](https://github.com/MrScopes) - [@&#8203;Pesekjak](https://github.com/Pesekjak) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;tibisabau](https://github.com/tibisabau) ⭐ First contribution! ⭐ - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.15.0-pre1`](https://github.com/SkriptLang/Skript/releases/tag/2.15.0-pre1): Pre-Release 2.15.0-pre1 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.14.3...2.15.0-pre1) ##### 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](https://papermc.io) is required**. Below, you can familiarize yourself with the changes. Additionally, [by clicking here](https://docs.skriptlang.org/docs.html?isNew), you can view the list of new syntax on our documentation site. As always, report any issues to our [issues page](https://github.com/SkriptLang/Skript/issues)! Per our [release model](https://github.com/SkriptLang/Skript/blob/master/CLOCKWORK_RELEASE_MODEL.md), 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: ```applescript 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: ```applescript send "<rainbow>Wow this text is super colorful!" ``` ```applescript # 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](https://docs.skriptlang.org/docs.html?search=#ExprColored) 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](https://docs.skriptlang.org/docs.html?search=#ExprMetadata), but they persist through server restarts and attach directly to things. Here is a simple example of storing a damage bonus on a sword: ```applescript 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](https://beta-docs.skriptlang.org/scripting/pdc/) 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: ```java // 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: [#&#8203;8326](https://github.com/SkriptLang/Skript/pull/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 - [#&#8203;8327](https://github.com/SkriptLang/Skript/issues/8327) Add a '[persistent data value](https://docs.skriptlang.org/docs.html?search=#ExprPersistentData)' expression for working with persistent data tags (see "Persistent Data Tags" above). - [#&#8203;8329](https://github.com/SkriptLang/Skript/issues/8329) Adds an '[attempt attack](https://docs.skriptlang.org/docs.html?search=#EvtAttemptAttack)' 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. - [#&#8203;8331](https://github.com/SkriptLang/Skript/issues/8331) Adds a '[player pick item](https://docs.skriptlang.org/docs.html?search=#EvtPlayerPickItem)' event for when a player uses the pick key (default middle mouse button) and '[picked item/block/entity](https://docs.skriptlang.org/docs.html?search=#ExprPickedItem)' expression to obtain the thing "picked". - [#&#8203;8351](https://github.com/SkriptLang/Skript/issues/8351) Adds a '[location with yaw/pitch](https://docs.skriptlang.org/docs.html?search=#ExprWithYawPitch)' for obtaining a copy of a location with a modified yaw and/or pitch. - [#&#8203;8353](https://github.com/SkriptLang/Skript/issues/8353) Adds a '[reduce](https://docs.skriptlang.org/docs.html?search=#ExprReduce)' expression for reducing a list of elements into a single value. - [#&#8203;8396](https://github.com/SkriptLang/Skript/issues/8396) Adds a configuration option to compress configuration, language, and variables file backups. This is enabled by default. - [#&#8203;8415](https://github.com/SkriptLang/Skript/issues/8415) Adds failure caches to the parsing system to further improve parse times. - [#&#8203;8412](https://github.com/SkriptLang/Skript/issues/8412) Adds a '[vector(n)](https://docs.skriptlang.org/docs.html?search=#vector)' function, which is a shortcut for '[vector(n, n, n)](https://docs.skriptlang.org/docs.html?search=#vector)'. - [#&#8203;8483](https://github.com/SkriptLang/Skript/issues/8483) Adds a fast path for integer indices in variables, improving comparison speeds. - [#&#8203;8514](https://github.com/SkriptLang/Skript/issues/8514) Adds missing definitions for certain Mounts of Mayhem features. ##### Changes - [#&#8203;8402](https://github.com/SkriptLang/Skript/issues/8402) Unifies the behavior of the '[type of](https://docs.skriptlang.org/docs.html?search=#ExprTypeOf)' and '[plain](https://docs.skriptlang.org/docs.html?search=#ExprPlain)' 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. - [#&#8203;8414](https://github.com/SkriptLang/Skript/issues/8414) Makes the `damage source` experiment mainstream, no longer requiring `using damage sources` to enable. - [#&#8203;8433](https://github.com/SkriptLang/Skript/issues/8433) Improves the code quality of the '[brushing stage](https://docs.skriptlang.org/docs.html?search=#ExprDustedStage)' expression. - [#&#8203;8516](https://github.com/SkriptLang/Skript/issues/8516) Further improves internal code quality and organization. - [#&#8203;8517](https://github.com/SkriptLang/Skript/issues/8517) Adds a warning regarding the deprecation of region hooks. ##### Bug Fixes - [#&#8203;8435](https://github.com/SkriptLang/Skript/issues/8435) Fixes an issue where Skript would fail to properly cancel some click events. - [#&#8203;8463](https://github.com/SkriptLang/Skript/issues/8463) Fixes an issue where the '[inventory close expression](https://docs.skriptlang.org/docs.html?search=#ExprInventoryCloseReason)' failed to return a value. - [#&#8203;8495](https://github.com/SkriptLang/Skript/issues/8495) Fixes an issue where '[game effects](https://docs.skriptlang.org/docs.html?search=#gameeffect)' appeared incorrectly in the documentation. - [#&#8203;8498](https://github.com/SkriptLang/Skript/issues/8498) Fixes an issue where some syntax errors could be improperly overriden by a more generic error. - [#&#8203;8502](https://github.com/SkriptLang/Skript/issues/8502) Fixes an issue where internal syntax definitions were improperly compared. - [#&#8203;8512](https://github.com/SkriptLang/Skript/issues/8512) Fixes an error that could occur when using the '[tags of x](https://docs.skriptlang.org/docs.html?search=#ExprTagsOf)' expression. - [#&#8203;8518](https://github.com/SkriptLang/Skript/issues/8518) Fixes an issue where a delay in a section that results in the termination of execution would propagate beyond that section. ##### API Changes - [#&#8203;8326](https://github.com/SkriptLang/Skript/issues/8326) Overhauls the event value system with a new registration process that enables support for custom identifiers, event validation and any combination of changers. - [#&#8203;8346](https://github.com/SkriptLang/Skript/issues/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. - [#&#8203;8376](https://github.com/SkriptLang/Skript/issues/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) - [#&#8203;8377](https://github.com/SkriptLang/Skript/issues/8377) Skript's testing framework will now copy directories from provided resource files, rather than just singular files. - [#&#8203;8391](https://github.com/SkriptLang/Skript/issues/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](https://github.com/SkriptLang/Skript/compare/2.14.3...2.15.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](https://github.com/SkriptLang/Skript/tree/master/src/main/resources/scripts/-examples/experimental%20features). <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. ```applescript 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 ``` ```applescript 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: ```applescript 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: ```applescript {_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`. ```applescript 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: ```applescript 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 ```applescript 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](https://docs.skriptlang.org/docs.html?search=equippable%20component) on our documentation website. </details> ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;devdinc](https://github.com/devdinc) ⭐ First contribution! ⭐ - [@&#8203;Efnilite](https://github.com/Efnilite) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;miberss](https://github.com/miberss) - [@&#8203;MrScopes](https://github.com/MrScopes) - [@&#8203;Pesekjak](https://github.com/Pesekjak) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;tibisabau](https://github.com/tibisabau) ⭐ First contribution! ⭐ - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.14.3`](https://github.com/SkriptLang/Skript/releases/tag/2.14.3): Emergency Patch 2.14.3 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.14.2...2.14.3) ##### Skript 2.14.3 **Supports: Paper 1.21.0 - 1.21.11** Today, we are releasing 2.14.3 as a reupload of 2.14.2 due to it being uploaded as a selfbuilt jar. Whoops! As always, you can report any issues on our [issue tracker](https://github.com/SkriptLang/Skript/issues). Happy Skripting! ##### Changelog - Mark the jar as a GitHub release. [Click here to view the change log for 2.14.2](https://github.com/SkriptLang/Skript/releases/tag/2.14.2) [Click here to view the full list of commits made since 2.14.2](https://github.com/SkriptLang/Skript/compare/2.14.2...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](https://github.com/SkriptLang/Skript/tree/2.14.1/src/main/resources/scripts/-examples/experimental%20features). <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. ```applescript= 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 ``` ```applescript= 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: ```applescript 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: ```applescript {_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`. ```applescript 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) ``` ##### Damage Sources **Enable by adding `using damage sources` to your script.** > Note that `type` has been removed as an option for the '[damage cause](https://docs.skriptlang.org/docs.html?search=#ExprDamageCause)' expression as `damage cause` and `damage type` now refer to different things. Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more. Below is an example of what damaging using custom damage sources looks like: ```applescript damage all players by 5 using a custom damage source: set the damage type to magic set the causing entity to {_player} set the direct entity to {_arrow} set the damage location to location(0, 0, 10) ``` For more details about the syntax, visit [damage source](https://docs.skriptlang.org/docs.html?search=damage%20source) on our documentation website. ##### 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: ```applescript 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 ```applescript 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](https://docs.skriptlang.org/docs.html?search=equippable%20component) 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](https://discord.gg/ZPsZAg6ygu) 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: - No one :p 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.14.2`](https://github.com/SkriptLang/Skript/releases/tag/2.14.2): Patch Release 2.14.2 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.14.1...2.14.2) ##### Skript 2.14.2 **Supports: Paper 1.21.0 - 1.21.11** Today, we are releasing Skript 2.14.2 to clean up some API issues, fix up some docs oversights, and generally squash a few bugs. As always, you can report any issues on our [issue tracker](https://github.com/SkriptLang/Skript/issues). Happy Skripting! ##### Changelog ##### Bug Fixes - [#&#8203;8432](https://github.com/SkriptLang/Skript/issues/8432) Fixed `delete name of tool` not working and ensured all the `name of` properties support set/reset/delete where appropriate. - [#&#8203;8438](https://github.com/SkriptLang/Skript/issues/8438) Fixed the `name of event-inventory` returning incorrect values for the `inventory open` event. - [#&#8203;8439](https://github.com/SkriptLang/Skript/issues/8439) Fixed `inventory of vehicle` not returning the proper inventory. - [#&#8203;8442](https://github.com/SkriptLang/Skript/issues/8442) Fixed missing "Since" version on the draw effect. - [#&#8203;8445](https://github.com/SkriptLang/Skript/issues/8445) Fixed issue when creating `BlockStateBlocks` for unplaced `BlockStates` ##### API Fixes - [#&#8203;8425](https://github.com/SkriptLang/Skript/issues/8425) Removed some left-over experimental annotations from registration api classes. - [#&#8203;8426](https://github.com/SkriptLang/Skript/issues/8426) Fixed docs actions for archives. - [#&#8203;8429](https://github.com/SkriptLang/Skript/issues/8429) Opened up `EntryContainer` and `EntryValidator` methods for better extensibility. - [#&#8203;8438](https://github.com/SkriptLang/Skript/issues/8438) Added events to the convert method for type properties to allow event-specific overrides. - [#&#8203;8446](https://github.com/SkriptLang/Skript/issues/8446) Added missing documentation to the property WXYZ expression. - [#&#8203;8456](https://github.com/SkriptLang/Skript/issues/8456) Fixed mistaken return type assumptions in `ExprArithmetic` [Click here to view the full list of commits made since 2.14.1](https://github.com/SkriptLang/Skript/compare/2.14.1...2.14.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](https://github.com/SkriptLang/Skript/tree/2.14.1/src/main/resources/scripts/-examples/experimental%20features). <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. ```applescript= 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 ``` ```applescript= 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: ```applescript 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: ```applescript {_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`. ```applescript 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) ``` ##### Damage Sources **Enable by adding `using damage sources` to your script.** > Note that `type` has been removed as an option for the '[damage cause](https://docs.skriptlang.org/docs.html?search=#ExprDamageCause)' expression as `damage cause` and `damage type` now refer to different things. Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more. Below is an example of what damaging using custom damage sources looks like: ```applescript damage all players by 5 using a custom damage source: set the damage type to magic set the causing entity to {_player} set the direct entity to {_arrow} set the damage location to location(0, 0, 10) ``` For more details about the syntax, visit [damage source](https://docs.skriptlang.org/docs.html?search=damage%20source) on our documentation website. ##### 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: ```applescript 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 ```applescript 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](https://docs.skriptlang.org/docs.html?search=equippable%20component) 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](https://discord.gg/ZPsZAg6ygu) 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: - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;JakeGBLP](https://github.com/JakeGBLP) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.14.1`](https://github.com/SkriptLang/Skript/releases/tag/2.14.1): Patch Release 2.14.1 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.14.0...2.14.1) ##### Skript 2.14.1 **Supports: Paper 1.21.0 - 1.21.11** Today, we are releasing Skript 2.14.1 to resolve some of the issues found with Skript 2.14, and a significant number of older bugs too! As always, you can report any issues on our [issue tracker](https://github.com/SkriptLang/Skript/issues). Happy Skripting! ##### Changelog ##### Additions - [#&#8203;8400](https://github.com/SkriptLang/Skript/issues/8400) Adds the ability to suppress the warning when using a single ':' in a variable name. - [#&#8203;8407](https://github.com/SkriptLang/Skript/issues/8407) Allows setting the `item of` an arrow projectile, which can change the item picked up when retrieving the arrow and can change the applied potion effects if the arrow is not a spectral arrow. ##### Bug Fixes - [#&#8203;8375](https://github.com/SkriptLang/Skript/issues/8375) Fixes the function argument error displaying a 'null' value for the parameter name. - [#&#8203;8381](https://github.com/SkriptLang/Skript/issues/8381) Fixes an issue where `display name of <entity>` returned the incorrect value. - [#&#8203;8382](https://github.com/SkriptLang/Skript/issues/8382) Fixes an issue where apostrophes (`'`) could not be used in literal specification (e.g. `dragon's breath (damage cause)`). - [#&#8203;8384](https://github.com/SkriptLang/Skript/issues/8384) Refactors the `open inventory` effect to use Paper's Menu API, which fixes issues with anvils and smithing tables not functioning correctly. - [#&#8203;8390](https://github.com/SkriptLang/Skript/issues/8390) Fixes an issue where the documentation for the '[any of](https://docs.skriptlang.org/docs.html?search=#ExprAnyOf)' expression is missing version information. - [#&#8203;8395](https://github.com/SkriptLang/Skript/issues/8395) Fixes issues where some expression sections would be erroneously parsed as sections when they clearly should not be. - [#&#8203;8401](https://github.com/SkriptLang/Skript/issues/8401) Fixes an issue where using past/future `world of x` expressions wasn't returning the correct world in some scenarios. - [#&#8203;8403](https://github.com/SkriptLang/Skript/issues/8403) Fixes an issue where parsing a region in a world where region data isn't loaded yet/is disabled would cause an exception. - [#&#8203;8404](https://github.com/SkriptLang/Skript/issues/8404) Fixes incorrect example for the particle with speed expression. - [#&#8203;8405](https://github.com/SkriptLang/Skript/issues/8405) Prevents the 'variables cannot be used here' warning from being used when it is not relevant. - [#&#8203;8408](https://github.com/SkriptLang/Skript/issues/8408) Fixes an issue where function calls would not call the most recent version of a function. - [#&#8203;8416](https://github.com/SkriptLang/Skript/issues/8416) Fixes an unintentional block on using `x of y` when both inputs were literal: `5 of flame particles`. ##### API Fixes - [#&#8203;8392](https://github.com/SkriptLang/Skript/issues/8392) Fixes an issues where the Expression and Structure syntax infos would incorrectly produce warnings about being internal. - [#&#8203;8394](https://github.com/SkriptLang/Skript/issues/8394) Fixes an issue where test servers on GitHub Actions would randomly crash during shutdown. - [#&#8203;8399](https://github.com/SkriptLang/Skript/issues/8399) Fixes an issue with comparing version strings that include postfixes like 'nightly' or 'pre1'. [Click here to view the full list of commits made since 2.14.1](https://github.com/SkriptLang/Skript/compare/2.14.0...2.14.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](https://github.com/SkriptLang/Skript/tree/2.14.1/src/main/resources/scripts/-examples/experimental%20features). <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. ```applescript= 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 ``` ```applescript= 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: ```applescript 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: ```applescript {_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`. ```applescript 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) ``` ##### Damage Sources **Enable by adding `using damage sources` to your script.** > Note that `type` has been removed as an option for the '[damage cause](https://docs.skriptlang.org/docs.html?search=#ExprDamageCause)' expression as `damage cause` and `damage type` now refer to different things. Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more. Below is an example of what damaging using custom damage sources looks like: ```applescript damage all players by 5 using a custom damage source: set the damage type to magic set the causing entity to {_player} set the direct entity to {_arrow} set the damage location to location(0, 0, 10) ``` For more details about the syntax, visit [damage source](https://docs.skriptlang.org/docs.html?search=damage%20source) on our documentation website. ##### 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: ```applescript 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 ```applescript 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](https://docs.skriptlang.org/docs.html?search=equippable%20component) 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](https://discord.gg/ZPsZAg6ygu) 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: - [@&#8203;3add](https://github.com/3add) - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;Efnilite](https://github.com/Efnilite) - [@&#8203;sovdeeth](https://github.com/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>. ### [`v2.14.0`](https://github.com/SkriptLang/Skript/releases/tag/2.14.0): Feature Release 2.14.0 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.14.0-pre2...2.14.0) ##### Skript 2.14.0 Today, we are excited to be starting the year off strong with the formal release of Skript 2.14.0! This release includes dozens of major contributions to enhance Skript's existing features, along with a handful of exciting new features. With all of this early spring cleaning, there are some important breaking changes to be aware of, specifically around visual effects and potions. Be sure to look through the **Breaking Changes** section below to see whether your scripts are impacted. In accordance with supporting the last 18 months of Minecraft updates, Skript 2.14.0 supports **Minecraft 1.21.0 to 1.21.11**. Newer versions may also work but were not tested at time of release. **[Paper](https://papermc.io) is required**. Below, you can familiarize yourself with the changes. Additionally, [by clicking here](https://docs.skriptlang.org/docs.html?isNew), you can view the list of new syntax on our documentation site. As always, report any issues to our [issues page](https://github.com/SkriptLang/Skript/issues)! Per our [release model](https://github.com/SkriptLang/Skript/blob/master/CLOCKWORK_RELEASE_MODEL.md), we plan to release 2.14.1 on February 1st. We may release additional pre-releases before then should the need arise. Happy Skripting! ##### Major Changes ##### Potions Rework Potion syntax has seen a major rework in order to modernize the syntax and make working with potions a breeze. ##### Obtaining Potion Effects Just as before, potion effects can be obtained through syntax like: ```applescript set {_potions::*} to the potion effects of the player ``` However, it is now also possible to obtain specific potion effects: ```applescript set {_speed} to the player's speed effect ``` ##### Potion Creation Potion creation has been united into a single expression that may optionally be used as a section: ```applescript apply an ambient potion effect of speed of tier 5 to the player for 15 seconds: hide the particles hide the icon ``` The current effect has been replaced with one for applying potion effects. ##### Potion Modification The six primary properties of potion effects are supported: `type`, `duration`, `amplifier`, `ambient`, `particles`, and `icon`. All of these properties may be modified in the builder (see above). It is also now possible to modify existing potion effects: ```applescript set the amplifier of {_potion} to 5 apply {_potion} to {_entity} ``` Even better, it is now possible to modify potion effects that are **actively** applied to entities and items: ```applescript set the duration of the player's active speed effect to 5 minutes set the amplifier of the player's slowness effect to 10 make the potion effects of the player's tool infinite ``` ##### Hidden Effects Full support for hidden effects has been implemented too. Hidden effects allow a player to have multiple effects of the same type. For example, if a player has speed 1 for 30 seconds, and is then affected by speed 2 for 15 seconds, after those 15 seconds, the player will have 15 seconds of speed 1 remaining. Support for obtaining these effects has been implemented: ```applescript set {_effects::*} to the player's potion effects # only active effects set {_effects::*} to the player's active potion effects # only active effects set {_effects::*} to the player's hidden potion effects # only hidden effects set {_effects::*} to the player's active and hidden potion effects # all effects ``` Just as with active effects, hidden effects support being changed too! Note that modifying a hidden effect may result in it taking precedence over the active effect. ##### Comparisons Support for more lenient comparisons has been implemented too: ```applescript player has speed 10 # checks type, amplifier player has a potion effect of speed for 30 seconds # checks type, duration ``` The '[comparison](https://docs.skriptlang.org/docs.html?search=#CondCompare)' condition (as in, `x is y`), can be used for exact comparisons. These comparisons are also used for removals: ``` remove speed 10 from the player's potion effects # removed effects must match type, amplifier remove potion effect of speed for 30 seconds from the player's potion effects # removed effects must match type, duration ``` ##### Complete Visual Effect Rework Skript's visual effect system has been in dire need of repair, with limited to no documentation and multiple errors and outdated syntaxes. We've tackled this with a full rework of visual effects, meaning likely all code using visual effects will suffer breaking changes, but it was sadly necessary to get to a better state. Visual effects are now split into 3 different types: particle effects, game effects, and entity effects. **Entity effects** are generally animations that can be played on specific entities, like the `ravager attack animation` effect. **Game effects** compose a variety of built-in game sounds and/or particle effects, like the combined sound+particles of the composter, or the footstep sound for a specific block. **Particle effects** are the standard particles you all know and love from `/particle`. We've overhauled the system to provide easier access to data-driven particles like `dust`; you can now `draw red dust particle at player`! We've also added some syntax to help users better understand and use the admittedly labyrinthine particle api in the form of scale, distribution, and velocity support, rather than simply offset (though you can still set offset manually!). ```applescript # sets the random distribution of the particle set particle distribution of {_flame particle} to vector(1,2,1) # set the velocity of the flame particle. # Note this only works for 'directional particles' and it will override the random distribution # (distribution and special effects like scale/velocity are mutually exclusive) set the velocity of {_flame particle} to vector(1,2,1) # set the scale of the explostion particle. # Note this only works for 'scalable particles' (explosion, sweeping edge) and it will override the random distribution # (distribution and special effects like scale/velocity are mutually exclusive) set the scale of {_explosion particle} to 2.5 ``` Drawing a particle should look more like this, now: ```applescript draw 8 red dust particles at player draw 3 blue trail particles moving to player's target over 3 seconds at player draw an electric spark particle with velocity vector(1,1,1) at player draw 10 flame particles with offset vector(1,0,1) with an extra value of 0 set {_particle} to a flame particle set velocity of {_particle} to vector(0,1,0) draw 10 of {_particle} at player ``` Please note that users of **SkBee and skript-particles** and any other addon dealing with particles will likely need to wait for these addons to be updated to use Skript's particle system instead. ##### Named Function Arguments Arguments for functions can now be specified by the name of the argument. This improves clarity with regard to the passed arguments for functions with many parameters. ```applescript function multiply(a: number, b: number) returns number: return {_a} * {_b} on load: assert multiply(1, 2) is 2 assert multiply(a: 1, b: 2) is 2 assert multiply(1, b: 2) is 2 assert multiply(a: 1, 2) is 2 assert multiply(b: 2, a: 1) is 2 ``` Mixing named and unnamed function arguments is allowed, as long as the order of the function parameters is followed, as specified in the function definition. ```applescript function add(a: number, b: number) returns number: return {_a} + {_b} on load: assert multiply(a: 1, 2) is 2 # allowed! assert multiply(1, b: 2) is 2 # allowed! assert multiply(b: 2, 2) is 2 # not allowed! assert multiply(2, a: 2) is 2 # not allowed! ``` ##### For-Each Loop For loops are now available by default for all users and no longer require opting into the `for loops` experiment. As a reminder, for loops are a kind of loop syntax that stores the loop index and value in variables for convenience. This can be used to avoid confusion when nesting multiple loops inside each other. ```applescript for {_index}, {_value} in {my list::*}: broadcast "%{_index}%: %{_value}%" ``` ```applescript for each {_player} in all players: send "Hello %{_player}%!" to {_player} ``` All existing loop features are also available in this section. ##### Interaction Entities Syntax has been added for working with [interaction entities](https://minecraft.wiki/w/Interaction). There is support for responsiveness and dimensions, along with obtaining the last date an interaction was clicked and the last player to interact. The syntax is available on our [documentation site](https://docs.skriptlang.org/docs.html?search=interaction). ##### Recursive Expression Expressions may now return values recursively using `recursive %objects%`, or combined with the `keyed %objects%` expression to return its keys recursively as well. This allows Skript to pass entire structures (i.e. lists) around different contexts, like passing a list to a function while retaining indices and sublists, freely. Note: To avoid cumbersome wording, passing a keyed expression to a function will implicitly pass it recursively as well. For example: ```applescript set {_list::a} to "Hello" set {_list::b} to "World!" set {_list::sublist::c} to "I'm nested!" # This behaves the same as the same as 'print_list(recursive keyed {_list::*})'. # This is only true for function parameter. print_list(keyed {_list::*}) # Prints: # a -> Hello # b -> World! # sublist::c -> I'm nested! function print_list(list: objects): loop {_list::*}: broadcast "%loop-index% -> %loop-value%" ``` For more information, you can review the [pull request](https://github.com/SkriptLang/Skript/pull/8243). ##### (API) Registration API Stabilization The modern addon and syntax registration APIs introduced in 2.10 have moved out of their experimental status. As a result, the APIs being replaced have been deprecated and marked for removal. Due to the significant nature of some of these APIs, they will continue to function. They will not be removed without explicit warnings long in advance. Detailed API documentation is being finalized and will be available for the full 2.14 release. For now, the pull request overview can be reviewed for further information about the new APIs: [#&#8203;6246](https://github.com/SkriptLang/Skript/pull/6246) ##### (API) Type Properties Beta Release In 2.13 we added a new opt-in system for dealing with common properties that are often sources of conflict with addons, like `name of x`, or `length of y`. > These are a way for addons to be able to use the same generic `name of x` or `x contains y` syntaxes that Skript does without causing syntax conflicts. You can register your type (`ClassInfo`) as having a property, such as `Property#NAME` for `name of x`, and Skript will automatically allow it to be used in the `name of` expression. > > For more details on how to do this and what else you can do with type properties, see [the pull request](https://github.com/SkriptLang/Skript/pull/8165). We plan on making a more comprehensive API spec/tutorial once the implementation is solidified, but for now the pull request description should be more than sufficient to try it out. We are now enabling this by default in 2.14 to test it more thoroughly. You will notice a new `use type properties` option in your `config.sk`, which can be set to false if you encounter issues with type properties. We do not anticipate issues, but if you encounter them, there's an easy way out! Please make an issue report on GitHub if you do encounter problems, though. For addon developers, it should be relatively safe to develop with the type properties API now, and we are in the process of preparing detailed documentation for our site. ##### ⚠ Breaking Changes - [#&#8203;4183](https://github.com/SkriptLang/Skript/issues/4183) With the potion system being rewritten, there have been some breaking changes, specifically around potion creation and application. While we have tried to preserve compatibility, it is possible some syntax combinations may no longer work. Please read the dedicated section above and review our documentation site for full syntax details. - [#&#8203;8302](https://github.com/SkriptLang/Skript/issues/8302) With the visual effects system being rewritten, there have been changes to nearly all patterns. Please read the dedicated section above and review our documentation site for full syntax details. - [#&#8203;8330](https://github.com/SkriptLang/Skript/issues/8330) The `text opacity` expression for text displays has been modified to make it much more intuitive and easier to use. Previously, opacity was as follows: ```= 0 to 3, fully opaque; 4 to 26, fully transparent; 27 to 127, gradually more opaque until half-opaque at 127; -127 to -1, gradually more opaque from half to fully opaque at -1. defaults to -1. ``` This has been changed to ```= 0 to 3, fully opaque; (this is mojang's fault, don't ask us why!) 4 to 26, fully transparent; 27 to 255, gradually more opaque from transparent to fully opaque at 255. defaults to 255 ``` The expression can still be set to values between -1 and -128, which correspond to 255 to 128 respectively, but the returned value will be positive and add/subtract will not allow opacity to leave the 0-255 range. - \[API] [#&#8203;8316](https://github.com/SkriptLang/Skript/issues/8316)/[#&#8203;8355](https://github.com/SkriptLang/Skript/issues/8355) As part of Registration API stabilization, there have been a few breaking changes: - The `BukkitRegistryKeys` class has been removed. The existing field, `BukkitRegistryKeys.EVENT` is now available at `BukkitSyntaxInfos.Event.KEY`. - `SyntaxOrigin` has been replaced in favor of a more generic `Origin` system. Origins are still constructed in a similar way using the static methods available on the `Origin` interface. - Some methods, such as `patterns` on `SyntaxInfo` now return [SequencedCollection](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/SequencedCollection.html)s rather than regular [Collection](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/Collection.html)s. If. you were implementing this interface before, you may need to update your code. - `AddonModule` now has a required `name` method. This also means that it is no longer a [FunctionalInterface](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/FunctionalInterface.html). ##### Changelog ##### Since pre-2 - [#&#8203;8367](https://github.com/SkriptLang/Skript/issues/8367) Fixes misformatting in the '[sorted list](https://docs.skriptlang.org/docs.html?search=#ExprSortedList)' expression example. - [#&#8203;8373](https://github.com/SkriptLang/Skript/issues/8373) Improves the error message when an unknown function is used. ##### Additions - [#&#8203;7925](https://github.com/SkriptLang/Skript/issues/7925) Adds the ability to use local axes when offsetting vectors: `player's location offset by vector(0, 1, 5) using local axes`, where x becomes left/right, y is up/down, and z is forward/back. - [#&#8203;8112](https://github.com/SkriptLang/Skript/issues/8112) Adds support for specifying named function arguments when calling functions. - [#&#8203;8252](https://github.com/SkriptLang/Skript/issues/8252) Adds support for obtaining the indices of multiple values at once with the '[indices of value](https://docs.skriptlang.org/docs.html?search=#ExprIndicesOfValue)' expression. - [#&#8203;8261](https://github.com/SkriptLang/Skript/issues/8261) Adds support for obtaining and changing the BlockData of falling blocks. - [#&#8203;8291](https://github.com/SkriptLang/Skript/issues/8291) Adds support for working with interaction entities. - [#&#8203;8280](https://github.com/SkriptLang/Skript/issues/8280) Moves '[for-each loops](https://docs.skriptlang.org/docs.html?search=#SecFor)' out of experimental status. - [#&#8203;8314](https://github.com/SkriptLang/Skript/issues/8314) Adds two expressions for converting colors to and from hex codes: `hex code of %colors%` and `color from hex code %strings%`. - [#&#8203;8314](https://github.com/SkriptLang/Skript/issues/8314) Adds two functions for converting numbers/strings to and from various bases like hexadecimal, octal, or binary: `toBase(value: number, base: number)` and `fromBase(value: string, base: number)`. - [#&#8203;8323](https://github.com/SkriptLang/Skript/issues/8323) Adds support for obtaining the '[respawn reason](https://docs.skriptlang.org/docs.html?search=#ExprRespawnReason)' in a '[respawn](https://docs.skriptlang.org/docs.html?search=#respawn)' event. - [#&#8203;8328](https://github.com/SkriptLang/Skript/issues/8328) Adds support for Minecraft 1.21.11. ##### Changes - [#&#8203;4183](https://github.com/SkriptLang/Skript/issues/4183) Reworks potion syntax from the ground up. Read more in its dedicated section above. - [#&#8203;8243](https://github.com/SkriptLang/Skript/issues/8243) Looping using the '[alphabetical sort](https://docs.skriptlang.org/docs.html?search=#ExprAlphabetList)', '[reversed list](https://docs.skriptlang.org/docs.html?search=#ExprReversedList)', '[shuffled list](https://docs.skriptlang.org/docs.html?search=#ExprShuffledList)', '[sorted list](https://docs.skriptlang.org/docs.html?search=#ExprSortedList)', and '[elements](https://docs.skriptlang.org/docs.html?search=#ExprElement)' expressions now allow you to reference the looped index using `loop-index`. - [#&#8203;8280](https://github.com/SkriptLang/Skript/issues/8280) Marks the Script Reflection experiment as stable (that is, not subject to breaking changes). - [#&#8203;8302](https://github.com/SkriptLang/Skript/issues/8302) Completely replaces Visual Effects with a new system of particle effects, game effects, and entity effects. Read more in its dedicated section above. - [#&#8203;8320](https://github.com/SkriptLang/Skript/issues/8320) Adds a negation option to the '[chance](https://docs.skriptlang.org/docs.html?search=#CondChance)' condition: `if chance of 50% fails`. - [#&#8203;8330](https://github.com/SkriptLang/Skript/issues/8330) Reworks the '[text display opacity](https://docs.skriptlang.org/docs.html?search=#ExprTextDisplayOpacity)' expression to go from 0 to 255, rather than from -128 to 127. - [#&#8203;8335](https://github.com/SkriptLang/Skript/issues/8335) Improves loop performance for the '[elements](https://docs.skriptlang.org/docs.html?search=#ExprElement)' and '[reversed list](https://docs.skriptlang.org/docs.html?search=#ExprReversedList)' expressions. - [#&#8203;8348](https://github.com/SkriptLang/Skript/issues/8348) Changes the lang entry for particles effects from `particle effect` to simply `particle` to match its code name and docs name. ##### Bug Fixes - [#&#8203;8243](https://github.com/SkriptLang/Skript/issues/8243) Fixes an error that occurs when attempting to get the sorted indices of a list with empty values (sublists). - [#&#8203;8243](https://github.com/SkriptLang/Skript/issues/8243) Fixes an error that occurs when calling a function with two lists with values corresponding to the same keys. - [#&#8203;8313](https://github.com/SkriptLang/Skript/issues/8313) Fixes an issue where resetting an entity's attributes would use the global default instead of the default for that entity type. e.g. resetting player's walk speed to 0.7 instead of 0.1. - [#&#8203;8315](https://github.com/SkriptLang/Skript/issues/8315) Fixes an issue where the '[look](https://docs.skriptlang.org/docs.html?search=#EffLook)' effect mistakenly required an entity in some cases (even though it was unused). - [#&#8203;8332](https://github.com/SkriptLang/Skript/issues/8332) Fixes arithmetic operations used for testing showing up on the documentation site. - [#&#8203;8334](https://github.com/SkriptLang/Skript/issues/8334) Fixes an error that could occur when attempting to change the '[yaw/pitch](https://docs.skriptlang.org/docs.html?search=#ExprYawPitch)' to a non-finite value. - [#&#8203;8343](https://github.com/SkriptLang/Skript/issues/8343) Fixes an issue where indices of nested lists would contain duplicates. - [#&#8203;8344](https://github.com/SkriptLang/Skript/issues/8344) Fixes issue with the docs not showing function parameters properly. ##### API Changes - [#&#8203;8061](https://github.com/SkriptLang/Skript/issues/8061) Adds tests for entity AI syntaxes. - [#&#8203;8105](https://github.com/SkriptLang/Skript/issues/8105) Adds experiments and their descriptions to the `JSONGenerator`. - [#&#8203;8112](https://github.com/SkriptLang/Skript/issues/8112) Reworks most code related to parsing and calling functions. Some long-deprecated methods and fields have been removed. Please review the pull request overview for further information. - [#&#8203;8224](https://github.com/SkriptLang/Skript/issues/8224) Migrates the vast majority of syntax examples from the old `@Examples` annotation to the new `@Example` annotations. - [#&#8203;8272](https://github.com/SkriptLang/Skript/issues/8272) Adds the `appendIf()` utility method to `SyntaxStringBuilder`. - [#&#8203;8274](https://github.com/SkriptLang/Skript/issues/8274) Supports `w/x/y/z of %object%` via the type property WXYZ, if type properties are enabled. Reorganizes the type property handlers to avoid one massive class. - [#&#8203;8300](https://github.com/SkriptLang/Skript/issues/8300) Adds new utility methods for working with Fields objects. - [#&#8203;8302](https://github.com/SkriptLang/Skript/issues/8302) Adds a new `ParticleEffect` class that extends Paper's `ParticleBuilder` class. Addons should use this class when dealing with particles. - [#&#8203;8303](https://github.com/SkriptLang/Skript/issues/8303) Removes Java 17 tests (1.20.4). - [#&#8203;8314](https://github.com/SkriptLang/Skript/issues/8314) Adds a new function paramater `Modifier` for default functions, `Modifier.RANGED`. This can be used to limit parameters to a fixed range of values, complete with parse errors if the user uses values out of the range and automatic documentation. - [#&#8203;8314](https://github.com/SkriptLang/Skript/issues/8314) Ensures that runtime errors emitted during simplification result in parse errors instead. Also fixed an issue where the `RuntimeErrorCatcher` would not properly remove consumers from the manager. - [#&#8203;8316](https://github.com/SkriptLang/Skript/issues/8316) Marks the new addon and syntax registration APIs as stable. The existing APIs have been deprecated. See the full announcement above for the complete information. - [#&#8203;8317](https://github.com/SkriptLang/Skript/issues/8317) Adds a customTest gradle task to allow testing of any combination of environments. Parallelizes tests on GitHub. - [#&#8203;8334](https://github.com/SkriptLang/Skript/issues/8334) Removes the long-deprecated VectorMath utility class. - [#&#8203;8336](https://github.com/SkriptLang/Skript/issues/8336) Enables type properties by default. Read more in the dedicated section above. - [#&#8203;8355](https://github.com/SkriptLang/Skript/issues/8355) Updates some properties of SyntaxInfo (and implementations) to use `SequencedCollection` rather than `Collection`. Also adds automatic Priority detection (if not specified) for `SyntaxInfo`. Also adds a required `name` method to `AddonModule` (which is no longer a `FunctionalInterface`). [Click here to view the full list of commits made since 2.13.2](https://github.com/SkriptLang/Skript/compare/2.13.2...2.14.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](https://github.com/SkriptLang/Skript/tree/master/src/main/resources/scripts/-examples/experimental%20features). <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. ```applescript 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 ``` ```applescript 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: ```applescript 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: ```applescript {_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`. ```applescript 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) ``` ##### Damage Sources **Enable by adding `using damage sources` to your script.** > Note that `type` has been removed as an option for the '[damage cause](https://docs.skriptlang.org/docs.html?search=#ExprDamageCause)' expression as `damage cause` and `damage type` now refer to different things. Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more. Below is an example of what damaging using custom damage sources looks like: ```applescript damage all players by 5 using a custom damage source: set the damage type to magic set the causing entity to {_player} set the direct entity to {_arrow} set the damage location to location(0, 0, 10) ``` For more details about the syntax, visit [damage source](https://docs.skriptlang.org/docs.html?search=damage%20source) on our documentation website. ##### 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: ```applescript 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 ```applescript 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](https://docs.skriptlang.org/docs.html?search=equippable%20component) 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>. ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;bluelhf](https://github.com/bluelhf) - [@&#8203;Efnilite](https://github.com/Efnilite) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;F1r3w477](https://github.com/F1r3w477) ⭐ First contribution! ⭐ - [@&#8203;Fusezion](https://github.com/Fusezion) - [@&#8203;isuniverseok-ua](https://github.com/isuniverseok-ua) ⭐ First contribution! ⭐ - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) - [@&#8203;TheMug06](https://github.com/TheMug06) - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.14.0-pre2`](https://github.com/SkriptLang/Skript/releases/tag/2.14.0-pre2): Pre-Release 2.14.0-pre2 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.14.0-pre1...2.14.0-pre2) ##### Skript 2.14.0-pre2 We are starting the weekend with the second pre-release for Skript 2.14.0, now with more bug fixes! This release includes dozens of major contributions to enhance Skript's existing features, along with a handful of exciting new features. Major changes means some breaking changes though, so we hope you all forgive us for doing some early spring cleaning (especially with visual effects). Please remember to look through the **Breaking Changes** section to see if anything impacts you! In accordance with supporting the last 18 months of Minecraft updates, Skript 2.14.0 supports **Minecraft 1.21.0 to 1.21.11**. Newer versions may also work but were not tested at time of release. **[Paper](https://papermc.io) is required**. Below, you can familiarize yourself with the changes. Additionally, [by clicking here](https://docs.skriptlang.org/docs.html?isNew), you can view the list of new syntax on our documentation site. As always, report any issues to our [issues page](https://github.com/SkriptLang/Skript/issues)! Per our [release model](https://github.com/SkriptLang/Skript/blob/master/CLOCKWORK_RELEASE_MODEL.md), we plan to release 2.14.0 on January 15th. We may release additional pre-releases before then should the need arise. Happy Skripting! ##### Major Changes ##### Potions Rework Potion syntax has seen a major rework in order to modernize the syntax and make working with potions a breeze. ##### Obtaining Potion Effects Just as before, potion effects can be obtained through syntax like: ```applescript set {_potions::*} to the potion effects of the player ``` However, it is now also possible to obtain specific potion effects: ```applescript set {_speed} to the player's speed effect ``` ##### Potion Creation Potion creation has been united into a single expression that may optionally be used as a section: ```applescript apply an ambient potion effect of speed of tier 5 to the player for 15 seconds: hide the particles hide the icon ``` The current effect has been replaced with one for applying potion effects. ##### Potion Modification The six primary properties of potion effects are supported: `type`, `duration`, `amplifier`, `ambient`, `particles`, and `icon`. All of these properties may be modified in the builder (see above). It is also now possible to modify existing potion effects: ```applescript set the amplifier of {_potion} to 5 apply {_potion} to {_entity} ``` Even better, it is now possible to modify potion effects that are **actively** applied to entities and items: ```applescript set the duration of the player's active speed effect to 5 minutes set the amplifier of the player's slowness effect to 10 make the potion effects of the player's tool infinite ``` ##### Hidden Effects Full support for hidden effects has been implemented too. Hidden effects allow a player to have multiple effects of the same type. For example, if a player has speed 1 for 30 seconds, and is then affected by speed 2 for 15 seconds, after those 15 seconds, the player will have 15 seconds of speed 1 remaining. Support for obtaining these effects has been implemented: ```applescript set {_effects::*} to the player's potion effects # only active effects set {_effects::*} to the player's active effects # only active effects set {_effects::*} to the player's hidden effects # only hidden effects set {_effects::*} to the player's active and hidden effects # all effects ``` Just as with active effects, hidden effects support being changed too! Note that modifying a hidden effect may result in it taking precedence over the active effect. ##### Comparisons Support for more lenient comparisons has been implemented too: ```applescript player has speed 10 # checks type, amplifier player has a potion effect of speed for 30 seconds # checks type, duration ``` The '[comparison](https://docs.skriptlang.org/docs.html?search=#CondCompare)' condition (as in, `x is y`), can be used for exact comparisons. These comparisons are also used for removals: ``` remove speed 10 from the player's potion effects # removed effects must match type, amplifier remove potion effect of speed for 30 seconds from the player's potion effects # removed effects must match type, duration ``` ##### Complete Visual Effect Rework Skript's visual effect system has been in dire need of repair, with limited to no documentation and multiple errors and outdated syntaxes. We've tackled this with a full rework of visual effects, meaning likely all code using visual effects will suffer breaking changes, but it was sadly necessary to get to a better state. Visual effects are now split into 3 different types: particle effects, game effects, and entity effects. **Entity effects** are generally animations that can be played on specific entities, like the `ravager attack animation` effect. **Game effects** compose a variety of built-in game sounds and/or particle effects, like the combined sound+particles of the composter, or the footstep sound for a specific block. **Particle effects** are the standard particles you all know and love from `/particle`. We've overhauled the system to provide easier access to data-driven particles like `dust`; you can now `draw red dust particle at player`! We've also added some syntax to help users better understand and use the admittedly labyrinthine particle api in the form of scale, distribution, and velocity support, rather than simply offset (though you can still set offset manually!). ```applescript # sets the random distribution of the particle set particle distribution of {_flame particle} to vector(1,2,1) # set the velocity of the flame particle. # Note this only works for 'directional particles' and it will override the random distribution # (distribution and special effects like scale/velocity are mutually exclusive) set the velocity of {_flame particle} to vector(1,2,1) # set the scale of the explostion particle. # Note this only works for 'scalable particles' (explosion, sweeping edge) and it will override the random distribution # (distribution and special effects like scale/velocity are mutually exclusive) set the scale of {_explosion particle} to 2.5 ``` Drawing a particle should look more like this, now: ```applescript draw 8 red dust particles at player draw 3 blue trail particles moving to player's target over 3 seconds at player draw an electric spark particle with velocity vector(1,1,1) at player draw 10 flame particles with offset vector(1,0,1) with an extra value of 0 set {_particle} to a flame particle set velocity of {_particle} to vector(0,1,0) draw 10 of {_particle} at player ``` Please note that users of **SkBee and skript-particles** and any other addon dealing with particles will likely need to wait for these addons to be updated to use Skript's particle system instead. ##### Named Function Arguments Arguments for functions can now be specified by the name of the argument. This improves clarity with regard to the passed arguments for functions with many parameters. ```applescript function multiply(a: number, b: number) returns number: return {_a} * {_b} on load: assert multiply(1, 2) is 2 assert multiply(a: 1, b: 2) is 2 assert multiply(1, b: 2) is 2 assert multiply(a: 1, 2) is 2 assert multiply(b: 2, a: 1) is 2 ``` Mixing named and unnamed function arguments is allowed, as long as the order of the function parameters is followed, as specified in the function definition. ```applescript function add(a: number, b: number) returns number: return {_a} + {_b} on load: assert multiply(a: 1, 2) is 2 # allowed! assert multiply(1, b: 2) is 2 # allowed! assert multiply(b: 2, 2) is 2 # not allowed! assert multiply(2, a: 2) is 2 # not allowed! ``` ##### For-Each Loop For loops are now available by default for all users and no longer require opting into the `for loops` experiment. As a reminder, for loops are a kind of loop syntax that stores the loop index and value in variables for convenience. This can be used to avoid confusion when nesting multiple loops inside each other. ```applescript for {_index}, {_value} in {my list::*}: broadcast "%{_index}%: %{_value}%" ``` ```applescript for each {_player} in all players: send "Hello %{_player}%!" to {_player} ``` All existing loop features are also available in this section. ##### Interaction Entities Syntax has been added for working with [interaction entities](https://minecraft.wiki/w/Interaction). There is support for responsiveness and dimensions, along with obtaining the last date an interaction was clicked and the last player to interact. The syntax is available on our [documentation site](https://docs.skriptlang.org/docs.html?search=interaction). ##### Recursive Expression Expressions may now return values recursively using `recursive %objects%`, or combined with the `keyed %objects%` expression to return its keys recursively as well. This allows Skript to pass entire structures (i.e. lists) around different contexts, like passing a list to a function while retaining indices and sublists, freely. Note: To avoid cumbersome wording, passing a keyed expression to a function will implicitly pass it recursively as well. For example: ```applescript set {_list::a} to "Hello" set {_list::b} to "World!" set {_list::sublist::c} to "I'm nested!" # This behaves the same as the same as 'print_list(recursive keyed {_list::*})'. # This is only true for function parameter. print_list(keyed {_list::*}) # Prints: # a -> Hello # b -> World! # sublist::c -> I'm nested! function print_list(list: objects): loop {_list::*}: broadcast "%loop-index% -> %loop-value%" ``` For more information, you can review the [pull request](https://github.com/SkriptLang/Skript/pull/8243). ##### (API) Registration API Stabilization The modern addon and syntax registration APIs introduced in 2.10 have moved out of their experimental status. As a result, the APIs being replaced have been deprecated and marked for removal. Due to the significant nature of some of these APIs, they will continue to function. They will not be removed without explicit warnings long in advance. Detailed API documentation is being finalized and will be available for the full 2.14 release. For now, the pull request overview can be reviewed for further information about the new APIs: [#&#8203;6246](https://github.com/SkriptLang/Skript/pull/6246) ##### (API) Type Properties Beta Release In 2.13 we added a new opt-in system for dealing with common properties that are often sources of conflict with addons, like `name of x`, or `length of y`. > These are a way for addons to be able to use the same generic `name of x` or `x contains y` syntaxes that Skript does without causing syntax conflicts. You can register your type (`ClassInfo`) as having a property, such as `Property#NAME` for `name of x`, and Skript will automatically allow it to be used in the `name of` expression. > > For more details on how to do this and what else you can do with type properties, see [the pull request](https://github.com/SkriptLang/Skript/pull/8165). We plan on making a more comprehensive API spec/tutorial once the implementation is solidified, but for now the pull request description should be more than sufficient to try it out. We are now enabling this by default in 2.14 to test it more thoroughly. You will notice a new `use type properties` option in your `config.sk`, which can be set to false if you encounter issues with type properties. We do not anticipate issues, but if you encounter them, there's an easy way out! Please make an issue report on GitHub if you do encounter problems, though. For addon developers, it should be relatively safe to develop with the type properties API now, and we are in the process of preparing detailed documentation for our site. ##### ⚠ Breaking Changes - [#&#8203;4183](https://github.com/SkriptLang/Skript/issues/4183) With the potion system being rewritten, there have been some breaking changes, specifically around potion creation and application. While we have tried to preserve compatibility, it is possible some syntax combinations may no longer work. Please read the dedicated section above and review our documentation site for full syntax details. - [#&#8203;8302](https://github.com/SkriptLang/Skript/issues/8302) With the visual effects system being rewritten, there have been changes to nearly all patterns. Please read the dedicated section above and review our documentation site for full syntax details. - [#&#8203;8330](https://github.com/SkriptLang/Skript/issues/8330) The `text opacity` expression for text displays has been modified to make it much more intuitive and easier to use. Previously, opacity was as follows: ```= 0 to 3, fully opaque; 4 to 26, fully transparent; 27 to 127, gradually more opaque until half-opaque at 127; -127 to -1, gradually more opaque from half to fully opaque at -1. defaults to -1. ``` This has been changed to ```= 0 to 3, fully opaque; (this is mojang's fault, don't ask us why!) 4 to 26, fully transparent; 27 to 255, gradually more opaque from transparent to fully opaque at 255. defaults to 255 ``` The expression can still be set to values between -1 and -128, which correspond to 255 to 128 respectively, but the returned value will be positive and add/subtract will not allow opacity to leave the 0-255 range. - \[API] [#&#8203;8316](https://github.com/SkriptLang/Skript/issues/8316)/[#&#8203;8355](https://github.com/SkriptLang/Skript/issues/8355) As part of Registration API stabilization, there have been a few breaking changes: - The `BukkitRegistryKeys` class has been removed. The existing field, `BukkitRegistryKeys.EVENT` is now available at `BukkitSyntaxInfos.Event.KEY`. - `SyntaxOrigin` has been replaced in favor of a more generic `Origin` system. Origins are still constructed in a similar way using the static methods available on the `Origin` interface. - Some methods, such as `patterns` on `SyntaxInfo` now return [SequencedCollection](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/SequencedCollection.html)s rather than regular [Collection](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/Collection.html)s. If. you were implementing this interface before, you may need to update your code. - `AddonModule` now has a required `name` method. This also means that it is no longer a [FunctionalInterface](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/FunctionalInterface.html). ##### Changelog ##### Since pre-1 - [#&#8203;8341](https://github.com/SkriptLang/Skript/issues/8341) Fixes an issue with HTML documentation generation. - [#&#8203;8343](https://github.com/SkriptLang/Skript/issues/8343) Fixes an issue where the results of the '[indices of list](https://docs.skriptlang.org/docs.html?search=#ExprIndices)' expression could have duplicate values. - [#&#8203;8344](https://github.com/SkriptLang/Skript/issues/8344) Fixes an issue where function parameters were not properly converted to strings (primarily for documentation). - [#&#8203;8348](https://github.com/SkriptLang/Skript/issues/8348) Renames the language entry for ParticleEffect to `particle` (rather than `particle effect`) for consistency with other particles. - [#&#8203;8350](https://github.com/SkriptLang/Skript/issues/8350) Fixes an issue where function arguments containing colons could fail to parse. - [#&#8203;8352](https://github.com/SkriptLang/Skript/issues/8352) Fixes an issue where optional function parameters could not be excluded when using only named arguments. Also reduces the restrictions in how named and unnamed arguments can be combined. - [#&#8203;8354](https://github.com/SkriptLang/Skript/issues/8354) Fixes an issue where property expressions could allow a change operation at parse time but then unexpectedly fail at performing the change during runtime. Also fixes an issue where the contains property condition failed to use converted input values during runtime. - [#&#8203;8355](https://github.com/SkriptLang/Skript/issues/8355) Improves SyntaxInfo creation through automatic Priority detection (when a Priority is not specified). Tweaks some properties (such as `patterns`) to be a [SequencedCollection](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/SequencedCollection.html) rather than a regular [Collection](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/Collection.html). Further, `AddonModule` now has a required `name` method to be implemented (as a result, it is no longer a [FunctionalInterface](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/FunctionalInterface.html)). This is a **breaking change** from 2.13.2. Finally, the newly introduced `module` method on `AddonModule` now takes an `AddonModule` rather than a `String`. - [#&#8203;8356](https://github.com/SkriptLang/Skript/issues/8356) Fixes an issue where item stacks could not be used as default expressions. - [#&#8203;8360](https://github.com/SkriptLang/Skript/issues/8360) Fixes some particle syntax not working as expected. - [#&#8203;8361](https://github.com/SkriptLang/Skript/issues/8361) Fixes an issue with how event documentation is processed for events registered using legacy methods. ##### Additions - [#&#8203;7925](https://github.com/SkriptLang/Skript/issues/7925) Adds the ability to use local axes when offsetting vectors: `player's location offset by vector(0, 1, 5) using local axes`, where x becomes left/right, y is up/down, and z is forward/back. - [#&#8203;8112](https://github.com/SkriptLang/Skript/issues/8112) Adds support for specifying named function arguments when calling functions. - [#&#8203;8252](https://github.com/SkriptLang/Skript/issues/8252) Adds support for obtaining the indices of multiple values at once with the '[indices of value](https://docs.skriptlang.org/docs.html?search=#ExprIndicesOfValue)' expression. - [#&#8203;8261](https://github.com/SkriptLang/Skript/issues/8261) Adds support for obtaining and changing the BlockData of falling blocks. - [#&#8203;8291](https://github.com/SkriptLang/Skript/issues/8291) Adds support for working with interaction entities. - [#&#8203;8280](https://github.com/SkriptLang/Skript/issues/8280) Moves '[for-each loops](https://docs.skriptlang.org/docs.html?search=#SecFor)' out of experimental status. - [#&#8203;8314](https://github.com/SkriptLang/Skript/issues/8314) Adds two expressions for converting colors to and from hex codes: `hex code of %colors%` and `color from hex code %strings%`. - [#&#8203;8314](https://github.com/SkriptLang/Skript/issues/8314) Adds two functions for converting numbers/strings to and from various bases like hexadecimal, octal, or binary: `toBase(value: number, base: number)` and `fromBase(value: string, base: number)`. - [#&#8203;8323](https://github.com/SkriptLang/Skript/issues/8323) Adds support for obtaining the '[respawn reason](https://docs.skriptlang.org/docs.html?search=#ExprRespawnReason)' in a '[respawn](https://docs.skriptlang.org/docs.html?search=#respawn)' event. - [#&#8203;8328](https://github.com/SkriptLang/Skript/issues/8328) Adds support for Minecraft 1.21.11. ##### Changes - [#&#8203;4183](https://github.com/SkriptLang/Skript/issues/4183) Reworks potion syntax from the ground up. Read more in its dedicated section above. - [#&#8203;8243](https://github.com/SkriptLang/Skript/issues/8243) Looping using the '[alphabetical sort](https://docs.skriptlang.org/docs.html?search=#ExprAlphabetList)', '[reversed list](https://docs.skriptlang.org/docs.html?search=#ExprReversedList)', '[shuffled list](https://docs.skriptlang.org/docs.html?search=#ExprShuffledList)', '[sorted list](https://docs.skriptlang.org/docs.html?search=#ExprSortedList)', and '[elements](https://docs.skriptlang.org/docs.html?search=#ExprElement)' expressions now allow you to reference the looped index using `loop-index`. - [#&#8203;8280](https://github.com/SkriptLang/Skript/issues/8280) Marks the Script Reflection experiment as stable (that is, not subject to breaking changes). - [#&#8203;8302](https://github.com/SkriptLang/Skript/issues/8302) Completely replaces Visual Effects with a new system of particle effects, game effects, and entity effects. Read more in its dedicated section above. - [#&#8203;8320](https://github.com/SkriptLang/Skript/issues/8320) Adds a negation option to the '[chance](https://docs.skriptlang.org/docs.html?search=#CondChance)' condition: `if chance of 50% fails`. - [#&#8203;8330](https://github.com/SkriptLang/Skript/issues/8330) Reworks the '[text display opacity](https://docs.skriptlang.org/docs.html?search=#ExprTextDisplayOpacity)' expression to go from 0 to 255, rather than from -128 to 127. - [#&#8203;8335](https://github.com/SkriptLang/Skript/issues/8335) Improves loop performance for the '[elements](https://docs.skriptlang.org/docs.html?search=#ExprElement)' and '[reversed list](https://docs.skriptlang.org/docs.html?search=#ExprReversedList)' expressions. - [#&#8203;8348](https://github.com/SkriptLang/Skript/issues/8348) Changes the lang entry for particles effects from `particle effect` to simply `particle` to match its code name and docs name. ##### Bug Fixes - [#&#8203;8243](https://github.com/SkriptLang/Skript/issues/8243) Fixes an error that occurs when attempting to get the sorted indices of a list with empty values (sublists). - [#&#8203;8243](https://github.com/SkriptLang/Skript/issues/8243) Fixes an error that occurs when calling a function with two lists with values corresponding to the same keys. - [#&#8203;8313](https://github.com/SkriptLang/Skript/issues/8313) Fixes an issue where resetting an entity's attributes would use the global default instead of the default for that entity type. e.g. resetting player's walk speed to 0.7 instead of 0.1. - [#&#8203;8315](https://github.com/SkriptLang/Skript/issues/8315) Fixes an issue where the '[look](https://docs.skriptlang.org/docs.html?search=#EffLook)' effect mistakenly required an entity in some cases (even though it was unused). - [#&#8203;8332](https://github.com/SkriptLang/Skript/issues/8332) Fixes arithmetic operations used for testing showing up on the documentation site. - [#&#8203;8334](https://github.com/SkriptLang/Skript/issues/8334) Fixes an error that could occur when attempting to change the '[yaw/pitch](https://docs.skriptlang.org/docs.html?search=#ExprYawPitch)' to a non-finite value. - [#&#8203;8343](https://github.com/SkriptLang/Skript/issues/8343) Fixes an issue where indices of nested lists would contain duplicates. - [#&#8203;8344](https://github.com/SkriptLang/Skript/issues/8344) Fixes issue with the docs not showing function parameters properly. ##### API Changes - [#&#8203;8061](https://github.com/SkriptLang/Skript/issues/8061) Adds tests for entity AI syntaxes. - [#&#8203;8105](https://github.com/SkriptLang/Skript/issues/8105) Adds experiments and their descriptions to the `JSONGenerator`. - [#&#8203;8112](https://github.com/SkriptLang/Skript/issues/8112) Reworks most code related to parsing and calling functions. Some long-deprecated methods and fields have been removed. Please review the pull request overview for further information. - [#&#8203;8224](https://github.com/SkriptLang/Skript/issues/8224) Migrates the vast majority of syntax examples from the old `@Examples` annotation to the new `@Example` annotations. - [#&#8203;8272](https://github.com/SkriptLang/Skript/issues/8272) Adds the `appendIf()` utility method to `SyntaxStringBuilder`. - [#&#8203;8274](https://github.com/SkriptLang/Skript/issues/8274) Supports `w/x/y/z of %object%` via the type property WXYZ, if type properties are enabled. Reorganizes the type property handlers to avoid one massive class. - [#&#8203;8300](https://github.com/SkriptLang/Skript/issues/8300) Adds new utility methods for working with Fields objects. - [#&#8203;8302](https://github.com/SkriptLang/Skript/issues/8302) Adds a new `ParticleEffect` class that extends Paper's `ParticleBuilder` class. Addons should use this class when dealing with particles. - [#&#8203;8303](https://github.com/SkriptLang/Skript/issues/8303) Removes Java 17 tests (1.20.4). - [#&#8203;8314](https://github.com/SkriptLang/Skript/issues/8314) Adds a new function paramater `Modifier` for default functions, `Modifier.RANGED`. This can be used to limit parameters to a fixed range of values, complete with parse errors if the user uses values out of the range and automatic documentation. - [#&#8203;8314](https://github.com/SkriptLang/Skript/issues/8314) Ensures that runtime errors emitted during simplification result in parse errors instead. Also fixed an issue where the `RuntimeErrorCatcher` would not properly remove consumers from the manager. - [#&#8203;8316](https://github.com/SkriptLang/Skript/issues/8316) Marks the new addon and syntax registration APIs as stable. The existing APIs have been deprecated. See the full announcement above for the complete information. - [#&#8203;8317](https://github.com/SkriptLang/Skript/issues/8317) Adds a customTest gradle task to allow testing of any combination of environments. Parallelizes tests on GitHub. - [#&#8203;8334](https://github.com/SkriptLang/Skript/issues/8334) Removes the long-deprecated VectorMath utility class. - [#&#8203;8336](https://github.com/SkriptLang/Skript/issues/8336) Enables type properties by default. Read more in the dedicated section above. - [#&#8203;8355](https://github.com/SkriptLang/Skript/issues/8355) Updates some properties of SyntaxInfo (and implementations) to use `SequencedCollection` rather than `Collection`. Also adds automatic Priority detection (if not specified) for `SyntaxInfo`. Also adds a required `name` method to `AddonModule` (which is no longer a `FunctionalInterface`). [Click here to view the full list of commits made since 2.13.2](https://github.com/SkriptLang/Skript/compare/2.13.2...2.14.0-pre2) ##### 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](https://github.com/SkriptLang/Skript/tree/master/src/main/resources/scripts/-examples/experimental%20features). <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. ```applescript 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 ``` ```applescript 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: ```applescript 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: ```applescript {_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`. ```applescript 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) ``` ##### Damage Sources **Enable by adding `using damage sources` to your script.** > Note that `type` has been removed as an option for the '[damage cause](https://docs.skriptlang.org/docs.html?search=#ExprDamageCause)' expression as `damage cause` and `damage type` now refer to different things. Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more. Below is an example of what damaging using custom damage sources looks like: ```applescript damage all players by 5 using a custom damage source: set the damage type to magic set the causing entity to {_player} set the direct entity to {_arrow} set the damage location to location(0, 0, 10) ``` For more details about the syntax, visit [damage source](https://docs.skriptlang.org/docs.html?search=damage%20source) on our documentation website. ##### 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: ```applescript 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 ```applescript 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](https://docs.skriptlang.org/docs.html?search=equippable%20component) on our documentation website. </details> ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;bluelhf](https://github.com/bluelhf) - [@&#8203;Efnilite](https://github.com/Efnilite) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;F1r3w477](https://github.com/F1r3w477) ⭐ First contribution! ⭐ - [@&#8203;Fusezion](https://github.com/Fusezion) - [@&#8203;isuniverseok-ua](https://github.com/isuniverseok-ua) ⭐ First contribution! ⭐ - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) - [@&#8203;TheMug06](https://github.com/TheMug06) - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.14.0-pre1`](https://github.com/SkriptLang/Skript/releases/tag/2.14.0-pre1): Pre-Release 2.14.0-pre1 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.13.2...2.14.0-pre1) ##### Skript 2.14.0-pre1 We are kicking off the new year with the first pre-release for Skript 2.14.0. This release includes dozens of major contributions to enhance Skript's existing features, along with a handful of exciting new features. Major changes means some breaking changes though, so we hope you all forgive us for doing some early spring cleaning (especially with visual effects). Please remember to look through the **Breaking Changes** section to see if anything impacts you! In accordance with supporting the last 18 months of Minecraft updates, Skript 2.14.0 supports **Minecraft 1.21.0 to 1.21.11**. Newer versions may also work but were not tested at time of release. **[Paper](https://papermc.io) is required**. Below, you can familiarize yourself with the changes. Additionally, [by clicking here](https://docs.skriptlang.org/docs.html?isNew), you can view the list of new syntax on our documentation site. As always, report any issues to our [issues page](https://github.com/SkriptLang/Skript/issues)! Per our [release model](https://github.com/SkriptLang/Skript/blob/master/CLOCKWORK_RELEASE_MODEL.md), we plan to release 2.14.0 on January 15th. We may release additional pre-releases before then should the need arise. Happy Skripting! ##### Major Changes ##### Potions Rework Potion syntax has seen a major rework in order to modernize the syntax and make working with potions a breeze. ##### Obtaining Potion Effects Just as before, potion effects can be obtained through syntax like: ```applescript set {_potions::*} to the potion effects of the player ``` However, it is now also possible to obtain specific potion effects: ```applescript set {_speed} to the player's speed effect ``` ##### Potion Creation Potion creation has been united into a single expression that may optionally be used as a section: ```applescript apply an ambient potion effect of speed of tier 5 to the player for 15 seconds: hide the particles hide the icon ``` The current effect has been replaced with one for applying potion effects. ##### Potion Modification The six primary properties of potion effects are supported: `type`, `duration`, `amplifier`, `ambient`, `particles`, and `icon`. All of these properties may be modified in the builder (see above). It is also now possible to modify existing potion effects: ```applescript set the amplifier of {_potion} to 5 apply {_potion} to {_entity} ``` Even better, it is now possible to modify potion effects that are **actively** applied to entities and items: ```applescript set the duration of the player's active speed effect to 5 minutes set the amplifier of the player's slowness effect to 10 make the potion effects of the player's tool infinite ``` ##### Hidden Effects Full support for hidden effects has been implemented too. Hidden effects allow a player to have multiple effects of the same type. For example, if a player has speed 1 for 30 seconds, and is then affected by speed 2 for 15 seconds, after those 15 seconds, the player will have 15 seconds of speed 1 remaining. Support for obtaining these effects has been implemented: ```applescript set {_effects::*} to the player's potion effects # only active effects set {_effects::*} to the player's active effects # only active effects set {_effects::*} to the player's hidden effects # only hidden effects set {_effects::*} to the player's active and hidden effects # all effects ``` Just as with active effects, hidden effects support being changed too! Note that modifying a hidden effect may result in it taking precedence over the active effect. ##### Comparisons Support for more lenient comparisons has been implemented too: ```applescript player has speed 10 # checks type, amplifier player has a potion effect of speed for 30 seconds # checks type, duration ``` The '[comparison](https://docs.skriptlang.org/docs.html?search=#CondCompare)' condition (as in, `x is y`), can be used for exact comparisons. These comparisons are also used for removals: ``` remove speed 10 from the player's potion effects # removed effects must match type, amplifier remove potion effect of speed for 30 seconds from the player's potion effects # removed effects must match type, duration ``` ##### Complete Visual Effect Rework Skript's visual effect system has been in dire need of repair, with limited to no documentation and multiple errors and outdated syntaxes. We've tackled this with a full rework of visual effects, meaning likely all code using visual effects will suffer breaking changes, but it was sadly necessary to get to a better state. Visual effects are now split into 3 different types: particle effects, game effects, and entity effects. **Entity effects** are generally animations that can be played on specific entities, like the `ravager attack animation` effect. **Game effects** compose a variety of built-in game sounds and/or particle effects, like the combined sound+particles of the composter, or the footstep sound for a specific block. **Particle effects** are the standard particles you all know and love from `/particle`. We've overhauled the system to provide easier access to data-driven particles like `dust`; you can now `draw red dust particle at player`! We've also added some syntax to help users better understand and use the admittedly labyrinthine particle api in the form of scale, distribution, and velocity support, rather than simply offset (though you can still set offset manually!). ```applescript # sets the random distribution of the particle set particle distribution of {_flame particle} to vector(1,2,1) # set the velocity of the flame particle. # Note this only works for 'directional particles' and it will override the random distribution # (distribution and special effects like scale/velocity are mutually exclusive) set the velocity of {_flame particle} to vector(1,2,1) # set the scale of the explostion particle. # Note this only works for 'scalable particles' (explosion, sweeping edge) and it will override the random distribution # (distribution and special effects like scale/velocity are mutually exclusive) set the scale of {_explosion particle} to 2.5 ``` Drawing a particle should look more like this, now: ```applescript draw 8 red dust particles at player draw 3 blue trail particles moving to player's target over 3 seconds at player draw an electric spark particle with velocity vector(1,1,1) at player draw 10 flame particles with offset vector(1,0,1) with an extra value of 0 set {_particle} to a flame particle set velocity of {_particle} to vector(0,1,0) draw 10 of {_particle} at player ``` Please note that users of **SkBee and skript-particles** and any other addon dealing with particles will likely need to wait for these addons to be updated to use Skript's particle system instead. ##### Named Function Arguments Arguments for functions can now be specified by the name of the argument. This improves clarity with regard to the passed arguments for functions with many parameters. ```applescript function multiply(a: number, b: number) returns number: return {_a} * {_b} on load: assert multiply(1, 2) is 2 assert multiply(a: 1, b: 2) is 2 assert multiply(1, b: 2) is 2 assert multiply(a: 1, 2) is 2 assert multiply(b: 2, a: 1) is 2 ``` Mixing named and unnamed function arguments is allowed, as long as the order of the function parameters is followed, as specified in the function definition. ```applescript function add(a: number, b: number) returns number: return {_a} + {_b} on load: assert multiply(a: 1, 2) is 2 # allowed! assert multiply(1, b: 2) is 2 # allowed! assert multiply(b: 2, 2) is 2 # not allowed! assert multiply(2, a: 2) is 2 # not allowed! ``` ##### For-Each Loop For loops are now available by default for all users and no longer require opting into the `for loops` experiment. As a reminder, for loops are a kind of loop syntax that stores the loop index and value in variables for convenience. This can be used to avoid confusion when nesting multiple loops inside each other. ```applescript for {_index}, {_value} in {my list::*}: broadcast "%{_index}%: %{_value}%" ``` ```applescript for each {_player} in all players: send "Hello %{_player}%!" to {_player} ``` All existing loop features are also available in this section. ##### Interaction Entities Syntax has been added for working with [interaction entities](https://minecraft.wiki/w/Interaction). There is support for responsiveness and dimensions, along with obtaining the last date an interaction was clicked and the last player to interact. The syntax is available on our [documentation site](https://docs.skriptlang.org/docs.html?search=interaction). ##### Recursive Expression Expressions may now return values recursively using `recursive %objects%`, or combined with the `keyed %objects%` expression to return its keys recursively as well. This allows Skript to pass entire structures (i.e. lists) around different contexts, like passing a list to a function while retaining indices and sublists, freely. Note: To avoid cumbersome wording, passing a keyed expression to a function will implicitly pass it recursively as well. For example: ```applescript set {_list::a} to "Hello" set {_list::b} to "World!" set {_list::sublist::c} to "I'm nested!" # This behaves the same as the same as 'print_list(recursive keyed {_list::*})'. # This is only true for function parameter. print_list(keyed {_list::*}) # Prints: # a -> Hello # b -> World! # sublist::c -> I'm nested! function print_list(list: objects): loop {_list::*}: broadcast "%loop-index% -> %loop-value%" ``` For more information, you can review the [pull request](https://github.com/SkriptLang/Skript/pull/8243). ##### (API) Registration API Stabilization The modern addon and syntax registration APIs introduced in 2.10 have moved out of their experimental status. As a result, the APIs being replaced have been deprecated and marked for removal. Due to the significant nature of some of these APIs, they will continue to function. They will not be removed without explicit warnings long in advance. Detailed API documentation is being finalized and will be available for the full 2.14 release. For now, the pull request overview can be reviewed for further information about the new APIs: [#&#8203;6246](https://github.com/SkriptLang/Skript/pull/6246) ##### (API) Type Properties Beta Release In 2.13 we added a new opt-in system for dealing with common properties that are often sources of conflict with addons, like `name of x`, or `length of y`. > These are a way for addons to be able to use the same generic `name of x` or `x contains y` syntaxes that Skript does without causing syntax conflicts. You can register your type (`ClassInfo`) as having a property, such as `Property#NAME` for `name of x`, and Skript will automatically allow it to be used in the `name of` expression. > > For more details on how to do this and what else you can do with type properties, see [the pull request](https://github.com/SkriptLang/Skript/pull/8165). We plan on making a more comprehensive API spec/tutorial once the implementation is solidified, but for now the pull request description should be more than sufficient to try it out. We are now enabling this by default in 2.14 to test it more thoroughly. You will notice a new `use type properties` option in your `config.sk`, which can be set to false if you encounter issues with type properties. We do not anticipate issues, but if you encounter them, there's an easy way out! Please make an issue report on GitHub if you do encounter problems, though. For addon developers, it should be relatively safe to develop with the type properties API now, and we are in the process of preparing detailed documentation for our site. ##### ⚠ Breaking Changes - [#&#8203;4183](https://github.com/SkriptLang/Skript/issues/4183) With the potion system being rewritten, there have been some breaking changes, specifically around potion creation and application. While we have tried to preserve compatibility, it is possible some syntax combinations may no longer work. Please read the dedicated section above and review our documentation site for full syntax details. - [#&#8203;8302](https://github.com/SkriptLang/Skript/issues/8302) With the visual effects system being rewritten, there have been changes to nearly all patterns. Please read the dedicated section above and review our documentation site for full syntax details. - [#&#8203;8330](https://github.com/SkriptLang/Skript/issues/8330) The `text opacity` expression for text displays has been modified to make it much more intuitive and easier to use. Previously, opacity was as follows: ```= 0 to 3, fully opaque; 4 to 26, fully transparent; 27 to 127, gradually more opaque until half-opaque at 127; -127 to -1, gradually more opaque from half to fully opaque at -1. defaults to -1. ``` This has been changed to ```= 0 to 3, fully opaque; (this is mojang's fault, don't ask us why!) 4 to 26, fully transparent; 27 to 255, gradually more opaque from transparent to fully opaque at 255. defaults to 255 ``` The expression can still be set to values between -1 and -128, which correspond to 255 to 128 respectively, but the returned value will be positive and add/subtract will not allow opacity to leave the 0-255 range. ##### Changelog ##### Additions - [#&#8203;7925](https://github.com/SkriptLang/Skript/issues/7925) Adds the ability to use local axes when offsetting vectors: `player's location offset by vector(0, 1, 5) using local axes`, where x becomes left/right, y is up/down, and z is forward/back. - [#&#8203;8112](https://github.com/SkriptLang/Skript/issues/8112) Adds support for specifying named function arguments when calling functions. - [#&#8203;8252](https://github.com/SkriptLang/Skript/issues/8252) Adds support for obtaining the indices of multiple values at once with the '[indices of value](https://docs.skriptlang.org/docs.html?search=#ExprIndicesOfValue)' expression. - [#&#8203;8261](https://github.com/SkriptLang/Skript/issues/8261) Adds support for obtaining and changing the BlockData of falling blocks. - [#&#8203;8291](https://github.com/SkriptLang/Skript/issues/8291) Adds support for working with interaction entities. - [#&#8203;8280](https://github.com/SkriptLang/Skript/issues/8280) Moves '[for-each loops](https://docs.skriptlang.org/docs.html?search=#SecFor)' out of experimental status. - [#&#8203;8314](https://github.com/SkriptLang/Skript/issues/8314) Adds two expressions for converting colors to and from hex codes: `hex code of %colors%` and `color from hex code %strings%`. - [#&#8203;8314](https://github.com/SkriptLang/Skript/issues/8314) Adds two functions for converting numbers/strings to and from various bases like hexadecimal, octal, or binary: `toBase(value: number, base: number)` and `fromBase(value: string, base: number)`. - [#&#8203;8323](https://github.com/SkriptLang/Skript/issues/8323) Adds support for obtaining the '[respawn reason](https://docs.skriptlang.org/docs.html?search=#ExprRespawnReason)' in a '[respawn](https://docs.skriptlang.org/docs.html?search=#respawn)' event. - [#&#8203;8328](https://github.com/SkriptLang/Skript/issues/8328) Adds support for Minecraft 1.21.11. ##### Changes - [#&#8203;4183](https://github.com/SkriptLang/Skript/issues/4183) Reworks potion syntax from the ground up. Read more in its dedicated section above. - [#&#8203;8243](https://github.com/SkriptLang/Skript/issues/8243) Looping using the '[alphabetical sort](https://docs.skriptlang.org/docs.html?search=#ExprAlphabetList)', '[reversed list](https://docs.skriptlang.org/docs.html?search=#ExprReversedList)', '[shuffled list](https://docs.skriptlang.org/docs.html?search=#ExprShuffledList)', '[sorted list](https://docs.skriptlang.org/docs.html?search=#ExprSortedList)', and '[elements](https://docs.skriptlang.org/docs.html?search=#ExprElement)' expressions now allow you to reference the looped index using `loop-index`. - [#&#8203;8280](https://github.com/SkriptLang/Skript/issues/8280) Marks the Script Reflection experiment as stable (that is, not subject to breaking changes). - [#&#8203;8302](https://github.com/SkriptLang/Skript/issues/8302) Completely replaces Visual Effects with a new system of particle effects, game effects, and entity effects. Read more in its dedicated section above. - [#&#8203;8320](https://github.com/SkriptLang/Skript/issues/8320) Adds a negation option to the '[chance](https://docs.skriptlang.org/docs.html?search=#CondChance)' condition: `if chance of 50% fails`. - [#&#8203;8330](https://github.com/SkriptLang/Skript/issues/8330) Reworks the '[text display opacity](https://docs.skriptlang.org/docs.html?search=#ExprTextDisplayOpacity)' expression to go from 0 to 255, rather than from -128 to 127. - [#&#8203;8335](https://github.com/SkriptLang/Skript/issues/8335) Improves loop performance for the '[elements](https://docs.skriptlang.org/docs.html?search=#ExprElement)' and '[reversed list](https://docs.skriptlang.org/docs.html?search=#ExprReversedList)' expressions. ##### Bug Fixes - [#&#8203;8243](https://github.com/SkriptLang/Skript/issues/8243) Fixes an error that occurs when attempting to get the sorted indices of a list with empty values (sublists). - [#&#8203;8243](https://github.com/SkriptLang/Skript/issues/8243) Fixes an error that occurs when calling a function with two lists with values corresponding to the same keys. - [#&#8203;8313](https://github.com/SkriptLang/Skript/issues/8313) Fixes an issue where resetting an entity's attributes would use the global default instead of the default for that entity type. e.g. resetting player's walk speed to 0.7 instead of 0.1. - [#&#8203;8315](https://github.com/SkriptLang/Skript/issues/8315) Fixes an issue where the '[look](https://docs.skriptlang.org/docs.html?search=#EffLook)' effect mistakenly required an entity in some cases (even though it was unused). - [#&#8203;8332](https://github.com/SkriptLang/Skript/issues/8332) Fixes arithmetic operations used for testing showing up on the documentation site. - [#&#8203;8334](https://github.com/SkriptLang/Skript/issues/8334) Fixes an error that could occur when attempting to change the '[yaw/pitch](https://docs.skriptlang.org/docs.html?search=#ExprYawPitch)' to a non-finite value. ##### API Changes - [#&#8203;8061](https://github.com/SkriptLang/Skript/issues/8061) Adds tests for entity AI syntaxes. - [#&#8203;8105](https://github.com/SkriptLang/Skript/issues/8105) Adds experiments and their descriptions to the `JSONGenerator`. - [#&#8203;8112](https://github.com/SkriptLang/Skript/issues/8112) Reworks most code related to parsing and calling functions. Some long-deprecated methods and fields have been removed. Please review the pull request overview for further information. - [#&#8203;8224](https://github.com/SkriptLang/Skript/issues/8224) Migrates the vast majority of syntax examples from the old `@Examples` annotation to the new `@Example` annotations. - [#&#8203;8272](https://github.com/SkriptLang/Skript/issues/8272) Adds the `appendIf()` utility method to `SyntaxStringBuilder`. - [#&#8203;8274](https://github.com/SkriptLang/Skript/issues/8274) Supports `w/x/y/z of %object%` via the type property WXYZ, if type properties are enabled. Reorganizes the type property handlers to avoid one massive class. - [#&#8203;8300](https://github.com/SkriptLang/Skript/issues/8300) Adds new utility methods for working with Fields objects. - [#&#8203;8302](https://github.com/SkriptLang/Skript/issues/8302) Adds a new `ParticleEffect` class that extends Paper's `ParticleBuilder` class. Addons should use this class when dealing with particles. - [#&#8203;8303](https://github.com/SkriptLang/Skript/issues/8303) Removes Java 17 tests (1.20.4). - [#&#8203;8314](https://github.com/SkriptLang/Skript/issues/8314) Adds a new function paramater `Modifier` for default functions, `Modifier.RANGED`. This can be used to limit parameters to a fixed range of values, complete with parse errors if the user uses values out of the range and automatic documentation. - [#&#8203;8314](https://github.com/SkriptLang/Skript/issues/8314) Ensures that runtime errors emitted during simplification result in parse errors instead. Also fixed an issue where the `RuntimeErrorCatcher` would not properly remove consumers from the manager. - [#&#8203;8316](https://github.com/SkriptLang/Skript/issues/8316) Marks the new addon and syntax registration APIs as stable. The existing APIs have been deprecated. See the full announcement above for the complete information. - [#&#8203;8317](https://github.com/SkriptLang/Skript/issues/8317) Adds a customTest gradle task to allow testing of any combination of environments. Parallelizes tests on GitHub. - [#&#8203;8334](https://github.com/SkriptLang/Skript/issues/8334) Removes the long-deprecated VectorMath utility class. - [#&#8203;8336](https://github.com/SkriptLang/Skript/issues/8336) Enables type properties by default. Read more in the dedicated section above. [Click here to view the full list of commits made since 2.13.2](https://github.com/SkriptLang/Skript/compare/2.13.2...2.14.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](https://github.com/SkriptLang/Skript/tree/master/src/main/resources/scripts/-examples/experimental%20features). <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. ```applescript 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 ``` ```applescript 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: ```applescript 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: ```applescript {_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`. ```applescript 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) ``` ##### Damage Sources **Enable by adding `using damage sources` to your script.** > Note that `type` has been removed as an option for the '[damage cause](https://docs.skriptlang.org/docs.html?search=#ExprDamageCause)' expression as `damage cause` and `damage type` now refer to different things. Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more. Below is an example of what damaging using custom damage sources looks like: ```applescript damage all players by 5 using a custom damage source: set the damage type to magic set the causing entity to {_player} set the direct entity to {_arrow} set the damage location to location(0, 0, 10) ``` For more details about the syntax, visit [damage source](https://docs.skriptlang.org/docs.html?search=damage%20source) on our documentation website. ##### 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: ```applescript 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 ```applescript 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](https://docs.skriptlang.org/docs.html?search=equippable%20component) on our documentation website. </details> ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;bluelhf](https://github.com/bluelhf) - [@&#8203;Efnilite](https://github.com/Efnilite) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;F1r3w477](https://github.com/F1r3w477) ⭐ First contribution! ⭐ - [@&#8203;Fusezion](https://github.com/Fusezion) - [@&#8203;isuniverseok-ua](https://github.com/isuniverseok-ua) ⭐ First contribution! ⭐ - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) - [@&#8203;TheMug06](https://github.com/TheMug06) - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.13.2`](https://github.com/SkriptLang/Skript/releases/tag/2.13.2): Patch Release 2.13.2 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.13.1...2.13.2) ##### Skript 2.13.2 **Supports: Paper 1.20.4 - 1.21.10** Today, we are releasing Skript 2.13.2 to resolve some various issues found with Skript 2.13, as well as solving a few older bugs. We have also revamped our [contributor guide](https://github.com/SkriptLang/Skript/blob/master/.github/contributing.md) to be much more beginner-friendly, so now's a great time to try making your first PR! For existing contributors, please note the addition of the AI usage disclosure requirement for PRs: > If you relied on AI assistance to make a pull request, you must disclose it in the > pull request, together with the extent of the usage. As always, you can report any issues on our [issue tracker](https://github.com/SkriptLang/Skript/issues). Happy Skripting! ##### Changelog ##### Additions / Changes - [#&#8203;8285](https://github.com/SkriptLang/Skript/issues/8285) Improves variable thread safety, preventing race conditions and conflicts when accessing variables on parallel threads. - [#&#8203;8286](https://github.com/SkriptLang/Skript/issues/8286) Adds 'child' as an option for the 'make adult/baby' effect. - [#&#8203;8294](https://github.com/SkriptLang/Skript/issues/8294) Updates contribution guidelines and adds AI disclosure requirement ##### Bug Fixes - [#&#8203;8250](https://github.com/SkriptLang/Skript/issues/8250) Fixes an issue where functions could be unloaded prior to the 'on unload' event firing, leading to Skript being unable to resolve function calls. - [#&#8203;8263](https://github.com/SkriptLang/Skript/issues/8263) Fixes issues with do-whiles not running properly in concurrent scenarios. - [#&#8203;8271](https://github.com/SkriptLang/Skript/issues/8271) Ensures legacy syntax infos have reference to their modern counterparts to support modern features like suppliers. - [#&#8203;8278](https://github.com/SkriptLang/Skript/issues/8278) Fixes vague and unclear errors when attempting to parse regions that do not exist or are ambiguous. - [#&#8203;8284](https://github.com/SkriptLang/Skript/issues/8284) Fixes an issue where `on brew complete` was not a valid pattern, but `on brew complet` was. - [#&#8203;8293](https://github.com/SkriptLang/Skript/issues/8293) Makes the auto-reload player name input case-insensitive. - [#&#8203;8295](https://github.com/SkriptLang/Skript/issues/8295) Fix an issue that prevented the use of `past` and `future` when using the `level of player` in the `level change` event. - [#&#8203;8299](https://github.com/SkriptLang/Skript/issues/8299) Fixes a bug where a delay in one event trigger could affect the behavior of another trigger of the same event that was parsed later on. - [#&#8203;8304](https://github.com/SkriptLang/Skript/issues/8304) Fixes an issue where a warning would be displayed when using an empty variable for cooldown storage. [Click here to view the full list of commits made since 2.13.1](https://github.com/SkriptLang/Skript/compare/2.13.1...2.13.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](https://github.com/SkriptLang/Skript/tree/2.12.0-pre1/src/main/resources/scripts/-examples/experimental%20features). <details> <summary>Click to reveal the experiments available in this release</summary> ##### For-Each Loop **Enable by adding `using for loops` to your script.** A new kind of loop syntax that stores the loop index and value in variables for convenience. This can be used to avoid confusion when nesting multiple loops inside each other. ```applescript= for {_index}, {_value} in {my list::*}: broadcast "%{_index}%: %{_value}%" ``` ```applescript= for each {_player} in all players: send "Hello %{_player}%!" to {_player} ``` All existing loop features are also available in this section. ##### 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. ```applescript= 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 ``` ```applescript= 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: ```applescript 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: ```applescript {_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`. ```applescript 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) ``` ##### Damage Sources **Enable by adding `using damage sources` to your script.** > Note that `type` has been removed as an option for the '[damage cause](https://docs.skriptlang.org/docs.html?search=#ExprDamageCause)' expression as `damage cause` and `damage type` now refer to different things. Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more. Below is an example of what damaging using custom damage sources looks like: ```applescript damage all players by 5 using a custom damage source: set the damage type to magic set the causing entity to {_player} set the direct entity to {_arrow} set the damage location to location(0, 0, 10) ``` For more details about the syntax, visit [damage source](https://docs.skriptlang.org/docs.html?search=damage%20source) on our documentation website. ##### 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: ```applescript 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 ```applescript 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](https://docs.skriptlang.org/docs.html?search=equippable%20component) on our documentation website. </details> ##### Join us on Discord We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) 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: - @&#8203;erenkarakal - @&#8203;ericd590 ⭐ First contribution! ⭐ - @&#8203;HarshMehta112 ⭐ First contribution! ⭐ - @&#8203;JakeGBLP - @&#8203;sovdeeth - @&#8203;TFSMads - @&#8203;UnderscoreTud ⭐ First contribution! ⭐ 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.13.1`](https://github.com/SkriptLang/Skript/releases/tag/2.13.1): Patch Release 2.13.1 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.13.0...2.13.1) ##### Skript 2.13.1 Today, we are releasing Skript 2.13.1 to resolve some of the most common issues reported with Skript 2.13.0. As always, you can report any issues on our [issue tracker](https://github.com/SkriptLang/Skript/issues). Happy Skripting! ##### Changelog ##### Additions / Changes - [#&#8203;8225](https://github.com/SkriptLang/Skript/issues/8225) Added support for using a list of strings in the `text of` expression. - [#&#8203;8226](https://github.com/SkriptLang/Skript/issues/8226) Adds support for using `closest` as an alias in the '[nearest entity](https://docs.skriptlang.org/docs.html?search=#ExprNearestEntity)' expression. ##### Bug Fixes - [#&#8203;8221](https://github.com/SkriptLang/Skript/issues/8221) Fixes an issue where functions with one plural parameter that has default values would cause an exception when the default values were used. - [#&#8203;8240](https://github.com/SkriptLang/Skript/issues/8240) Removes legacy code used in the bucket events, preventing Skript from loading legacy material support and causing a temporary server freeze. - [#&#8203;8242](https://github.com/SkriptLang/Skript/issues/8242) Fixes an extraneous `the` in the '[tablisted players](https://docs.skriptlang.org/docs.html?search=#ExprTablistedPlayers)' expression. - [#&#8203;8245](https://github.com/SkriptLang/Skript/issues/8245) Fixes an issue with matching functions that have a single list parameter. - [#&#8203;8248](https://github.com/SkriptLang/Skript/issues/8248) Fixes an issue with how the '[has scoreboard tag](https://docs.skriptlang.org/docs.html?search=#CondHasScoreboardTag)' condition handled `OR` inputs. - [#&#8203;8249](https://github.com/SkriptLang/Skript/issues/8249) Fixes an issue where the name of blocks (such as chests) would not carry over when those blocks were placed. [Click here to view the full list of commits made since 2.13.0](https://github.com/SkriptLang/Skript/compare/2.13.0...2.13.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](https://github.com/SkriptLang/Skript/tree/2.12.0-pre1/src/main/resources/scripts/-examples/experimental%20features). <details> <summary>Click to reveal the experiments available in this release</summary> ##### For-Each Loop **Enable by adding `using for loops` to your script.** A new kind of loop syntax that stores the loop index and value in variables for convenience. This can be used to avoid confusion when nesting multiple loops inside each other. ```applescript= for {_index}, {_value} in {my list::*}: broadcast "%{_index}%: %{_value}%" ``` ```applescript= for each {_player} in all players: send "Hello %{_player}%!" to {_player} ``` All existing loop features are also available in this section. ##### 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. ```applescript= 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 ``` ```applescript= 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: ```applescript 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: ```applescript {_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`. ```applescript 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) ``` ##### Damage Sources **Enable by adding `using damage sources` to your script.** > Note that `type` has been removed as an option for the '[damage cause](https://docs.skriptlang.org/docs.html?search=#ExprDamageCause)' expression as `damage cause` and `damage type` now refer to different things. Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more. Below is an example of what damaging using custom damage sources looks like: ```applescript damage all players by 5 using a custom damage source: set the damage type to magic set the causing entity to {_player} set the direct entity to {_arrow} set the damage location to location(0, 0, 10) ``` For more details about the syntax, visit [damage source](https://docs.skriptlang.org/docs.html?search=damage%20source) on our documentation website. ##### 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: ```applescript 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 ```applescript 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](https://docs.skriptlang.org/docs.html?search=equippable%20component) on our documentation website. </details> ##### Join us on Discord We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) 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: - @&#8203;AfkUserMC ⭐ First contribution! ⭐ - @&#8203;CJH3139 - @&#8203;CrebsTheCoder ⭐ First contribution! ⭐ - @&#8203;Efnilite - @&#8203;sovdeeth - @&#8203;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>. ### [`v2.13.0`](https://github.com/SkriptLang/Skript/releases/tag/2.13.0): Feature Release 2.13.0 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.13.0-pre1...2.13.0) ##### Skript 2.13.0 Today, we are excited to release Skript 2.13.0. This release includes a handful of new features, bug fixes, and behind-the-scenes API improvements to play with. For addon developers, we strongly recommend reviewing the **Type Properties** section below. Please also note our changes to the supported versions. **2.13 will be 1.20.4+, and [Paper](https://papermc.io) is required**. Below, you can familiarize yourself with the changes. Additionally, [by clicking here](https://docs.skriptlang.org/docs.html?isNew), you can view the list of new syntax on our documentation site. As always, report any issues to our [issues page](https://github.com/SkriptLang/Skript/issues)! Per our [release model](https://stable.skriptlang.org/clockwork-release-model), we plan to release 2.13.1 on November 1st. We may release emergency patches before then should the need arise. Happy Skripting! ##### Changes to Supported Versions and Platforms As announced with 2.12, we have updated our policy for supported versions. Going forward, Skript will guarantee support for the last 18 months of Minecraft releases. This means 2.13 will be 1.20.4+, while 2.14 will be 1.21+. Additionally, with Paper forking itself from Spigot, it has become increasingly difficult to support both platforms. As a result, this version of Skript has dropped support for Spigot. Skript now requires [Paper](https://papermc.io/software/paper) or a downstream fork of Paper, such as Purpur or Pufferfish. ##### Major Changes ##### Equippable Components (Experimental) *Added in [#&#8203;7194](https://github.com/SkriptLang/Skript/issues/7194)* > \[!NOTE] > This feature is currently experimental and can be used by [enabling](https://docs.skriptlang.org/docs.html?search=#StructUsing) the `equippable components` experiment. Equippable components allow 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: ```applescript 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} ``` ##### Automatic Reloading *Added in [#&#8203;7464](https://github.com/SkriptLang/Skript/issues/7464)* A new Structure has been added that enables automatic reloading of a script when it is updated (e.g. the file is saved). This feature is only supported if asynchronous loading is enabled in Skript's configuration file (`config.sk`). ```applescript automatically reload this script: recipients: "Sahvde" # The names or uuids of players who, apart from console, will see the success/error messages in chat. OR auto reload: permission: myserver.see_auto_reloads # all players with this permission will see the messages. ``` ##### Debug Information Expression *Added in [#&#8203;8207](https://github.com/SkriptLang/Skript/issues/8207)* A new expression that returns additional information about a value has been added. Currently, this consists of the value itself and its class, though this is subject to change in the future. ```applescript set {my_list::*} to 1, "2", and vector(1, 2, 3) broadcast debug info of {my_list::*} # prints: # 1 (integer) # "2" (text) # x: 1, y: 2, z: 3 (vector) ``` ##### Type Properties (Experimental) *Added in [#&#8203;8165](https://github.com/SkriptLang/Skript/issues/8165)* Included in 2.13 is an experimental opt-in API for what we're tenatively calling 'type properties'. These are a way for addons to be able to use the same generic `name of x` or `x contains y` syntaxes that Skript does without causing syntax conflicts. You can register your type (`ClassInfo`) as having a property, such as `Property#NAME` for `name of x`, and Skript will automatically allow it to be used in the `name of` expression. For more details on how to do this and what else you can do with type properties, see [the PR](https://github.com/SkriptLang/Skript/pull/8165). We plan on making a more comprehensive API spec/tutorial once the implementation is solidified, but for now the PR description should be more than sufficient to try it out. However, since this is still experimental and not well tested, it requires a secret config option to enable. To activate property syntaxes, add the line `use type properties: true` somewhere in your `config.sk`. Without it, Skript will still use the old syntaxes for things like `name of`. We hope you try out this new API and give us feedback on what works, what doesn't, and what you'd like to see for its full release in 2.14. The number of property-driven syntaxes is rather small, but we plan on adding many more in the coming months! ##### ⚠ Breaking Changes - [#&#8203;7985](https://github.com/SkriptLang/Skript/issues/7985) Changes the method signature for the abstract `EntityData#init`. Adds parameter `matchedCodeName` and refactors `matchedPattern`. - [#&#8203;8072](https://github.com/SkriptLang/Skript/issues/8072) Enforces using `physics` instead of `physic` in the block update effect. ##### Changelog ##### Additions - [#&#8203;7194](https://github.com/SkriptLang/Skript/issues/7194) Adds experimental support for [equippable components](https://docs.skriptlang.org/docs.html?search=equippable) and all correlating data. - [#&#8203;7275](https://github.com/SkriptLang/Skript/issues/7275) Adds [elements for brewing stands](https://docs.skriptlang.org/docs.html?search=brewing) such as brewing stand slots, fuel, time, and events. - [#&#8203;7464](https://github.com/SkriptLang/Skript/issues/7464) Adds a [structure that allows a script to be automatically reloaded](https://docs.skriptlang.org/docs.html?search=#StructAutoReload) when it is saved, if async loading is enabled in config.sk. - [#&#8203;7878](https://github.com/SkriptLang/Skript/issues/7878) Adds support for specifying the amount of damage in the '[force attack](https://docs.skriptlang.org/docs.html?search=#EffForceAttack)' effect. - [#&#8203;7888](https://github.com/SkriptLang/Skript/issues/7888) Adds a '[midpoint](https://docs.skriptlang.org/docs.html?search=#ExprMidpoint)' expression to obtain the midpoint between two locations or vectors. - [#&#8203;7985](https://github.com/SkriptLang/Skript/issues/7985) Adds an '[is spawnable](https://docs.skriptlang.org/docs.html?search=#CondIsSpawnable)' condition to check whether an entity is spawnable in a world. - [#&#8203;8008](https://github.com/SkriptLang/Skript/issues/8008) Adds literals for the maximum '[double](https://docs.skriptlang.org/docs.html?search=#LitDoubleMaxValue)', '[float](https://docs.skriptlang.org/docs.html?search=#LitFloatMaxValue)', '[integer](https://docs.skriptlang.org/docs.html?search=#LitIntMaxValue)', and '[long](https://docs.skriptlang.org/docs.html?search=#LitLongMaxValue)' values and the minimum '[double](https://docs.skriptlang.org/docs.html?search=#LitDoubleMinValue)', '[float](https://docs.skriptlang.org/docs.html?search=#LitFloatMinValue)', '[integer](https://docs.skriptlang.org/docs.html?search=#LitIntMinValue)', and '[long](https://docs.skriptlang.org/docs.html?search=#LitLongMinValue)' values. - [#&#8203;8092](https://github.com/SkriptLang/Skript/issues/8092) Adds support for using '[vehicle](https://docs.skriptlang.org/docs.html?search=#ExprVehicle)' alone in the '[mount](https://docs.skriptlang.org/events.html?search=#entity_mount)' event. - [#&#8203;8101](https://github.com/SkriptLang/Skript/issues/8101) Adds a '[tablisted players](https://docs.skriptlang.org/docs.html?search=#ExprTablistedPlayers)' expression to obtain and modify the players listed in the tablist menu for a given player. - [#&#8203;8113](https://github.com/SkriptLang/Skript/issues/8113) Adds the ability to enchant an item at as a specific level, as if an enchanting table was used, to the '[enchant](https://docs.skriptlang.org/docs.html?search=#EffEnchant)' effect. - [#&#8203;8134](https://github.com/SkriptLang/Skript/issues/8134) Adds a '[time lived](https://docs.skriptlang.org/docs.html?search=#ExprTimeLived)' expression to get the duration an entity has been alive for. - [#&#8203;8196](https://github.com/SkriptLang/Skript/issues/8196) Adds a runtime error when attempting to get the distance between locations in different worlds. - [#&#8203;8197](https://github.com/SkriptLang/Skript/issues/8197) Adds support for changing the `event-location` for '[portal](https://docs.skriptlang.org/events.html?search=#portal)' event. - [#&#8203;8206](https://github.com/SkriptLang/Skript/issues/8206) Adds a runtime error when using the sort effect and mapping the input to a null value, which cannot be sorted. - [#&#8203;8207](https://github.com/SkriptLang/Skript/issues/8207) Adds a '[debug info](https://docs.skriptlang.org/docs.html?search=#ExprDebugInfo)' expression that returns extra information about a value. - [#&#8203;8219](https://github.com/SkriptLang/Skript/issues/8219) Adds early support for Minecraft 1.21.10. - [#&#8203;8229](https://github.com/SkriptLang/Skript/issues/8229) Adds `playtime` as an alias to the '[time played](https://docs.skriptlang.org/docs.html?search=#ExprTimePlayed)' expression. - [#&#8203;8230](https://github.com/SkriptLang/Skript/issues/8230) Adds `pull` as an alias to the '[push](https://docs.skriptlang.org/docs.html?search=#EffPush)' effect. ##### Changes - [#&#8203;8072](https://github.com/SkriptLang/Skript/issues/8072) Enforces using `physics` instead of `physic` in the block update effect. ##### Bug Fixes - [#&#8203;7985](https://github.com/SkriptLang/Skript/issues/7985) Fixes being unable to spawn certain entities in certain states, such as `red fox` and `snow fox`. - [#&#8203;8064](https://github.com/SkriptLang/Skript/issues/8064) Fixes an issue where it was not possible to spawn a `minecart`. - [#&#8203;8177](https://github.com/SkriptLang/Skript/issues/8177) Fixes the 'cannot reset' and 'cannot delete' error messages of the '[change](https://docs.skriptlang.org/effects.html?search=#EffChange)' effect being swapped around. - [#&#8203;8182](https://github.com/SkriptLang/Skript/issues/8182) Fixes an issue where variable changes across multiple threads could be processed in the wrong order, resulting in data loss. - [#&#8203;8185](https://github.com/SkriptLang/Skript/issues/8185) Fixes the '[system time](https://docs.skriptlang.org/events.html?search=#system_time)' event not triggering on the main thread. - [#&#8203;8189](https://github.com/SkriptLang/Skript/issues/8189) Fixes an issue where function calls with a single parameter to functions with 0 required parameters would fail to parse. - [#&#8203;8195](https://github.com/SkriptLang/Skript/issues/8195) Fixes an issue where the '[catch runtime errors](https://docs.skriptlang.org/docs.html?search=#SecCatchErrors)' section would stop catching errors after the default error limit was reached. - [#&#8203;8199](https://github.com/SkriptLang/Skript/issues/8199) Fixes an issue where [functions](https://docs.skriptlang.org/docs.html?search=#StructFunction) could not use Expression Sections. - [#&#8203;8232](https://github.com/SkriptLang/Skript/issues/8232) Fixes an issue where Expression Sections did not work properly with Effect Sections (used as an Effect). ##### API Changes - [#&#8203;7797](https://github.com/SkriptLang/Skript/issues/7797) Uses `project.testEnv` in `build.gradle` instead of updating the latest version for both. - [#&#8203;7985](https://github.com/SkriptLang/Skript/issues/7985) Changes `Pattern` to allow providing `null` as the object for generic usage. - [#&#8203;8011](https://github.com/SkriptLang/Skript/issues/8011) Exposes the script loader executor via the `Task` api. - [#&#8203;8035](https://github.com/SkriptLang/Skript/issues/8035) Adds support for using an `EntryData` multiple times. - [#&#8203;8065](https://github.com/SkriptLang/Skript/issues/8065) Adds support for custom operators. - [#&#8203;8116](https://github.com/SkriptLang/Skript/issues/8116) Makes `JSONGenerator` available for addons and updates the `docs.json` format. - [#&#8203;8120](https://github.com/SkriptLang/Skript/issues/8120) Adds a method to get a `Color` as an ARGB integer. - [#&#8203;8138](https://github.com/SkriptLang/Skript/issues/8138) Adds getting pattern combinations from `PatternElement` and tests to catch possible pattern conflicts. - [#&#8203;8150](https://github.com/SkriptLang/Skript/issues/8150) Adds `SimplifiedCondition` for constant conditions. `Condition` implements `Simplifiable`. - [#&#8203;8165](https://github.com/SkriptLang/Skript/issues/8165) Adds the Type Property API. - [#&#8203;8180](https://github.com/SkriptLang/Skript/issues/8180) Changes the parameter name for `Expression` class from `expressionType` to `expressionClass` in `Skript#registerExpression`. - [#&#8203;8195](https://github.com/SkriptLang/Skript/issues/8195) Improves runtime error filtering with the introduction of `RuntimeErrorFilter`, which allows different consumers to apply different levels of filtering to the errors they print. - [#&#8203;8201](https://github.com/SkriptLang/Skript/issues/8201) Adds support for excluding packages from being loaded in `ClassLoader`. - [#&#8203;8211](https://github.com/SkriptLang/Skript/issues/8211) Improves the classes `ExpressionList` returns for `acceptChange` to more accurately reflect the changers of the expressions within the list. - [#&#8203;8213](https://github.com/SkriptLang/Skript/issues/8213) Fixes `Functions#getJavaFunctions` to only return `JavaFunction`s. - [#&#8203;8235](https://github.com/SkriptLang/Skript/issues/8235) Adds additional null safety checks around certain API classes. [Click here to view the full list of commits made since 2.12.2](https://github.com/SkriptLang/Skript/compare/2.12.2...2.13.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](https://github.com/SkriptLang/Skript/tree/2.13.0-pre1/src/main/resources/scripts/-examples/experimental%20features). <details> <summary>Click to reveal the experiments available in this release</summary> ##### For-Each Loop **Enable by adding `using for loops` to your script.** A new kind of loop syntax that stores the loop index and value in variables for convenience. This can be used to avoid confusion when nesting multiple loops inside each other. ```applescript= for {_index}, {_value} in {my list::*}: broadcast "%{_index}%: %{_value}%" ``` ```applescript= for each {_player} in all players: send "Hello %{_player}%!" to {_player} ``` All existing loop features are also available in this section. ##### 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. ```applescript= 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 ``` ```applescript= 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: ```applescript 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: ```applescript {_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`. ```applescript 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) ``` ##### Damage Sources **Enable by adding `using damage sources` to your script.** > Note that `type` has been removed as an option for the '[damage cause](https://docs.skriptlang.org/docs.html?search=#ExprDamageCause)' expression as `damage cause` and `damage type` now refer to different things. Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more. Below is an example of what damaging using custom damage sources looks like: ```applescript damage all players by 5 using a custom damage source: set the damage type to magic set the causing entity to {_player} set the direct entity to {_arrow} set the damage location to location(0, 0, 10) ``` For more details about the syntax, visit [damage source](https://docs.skriptlang.org/docs.html?search=damage%20source) on our documentation website. ##### 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: ```applescript 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 ```applescript 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](https://docs.skriptlang.org/docs.html?search=equippable%20component) on our documentation website. </details> ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;Absolutionism](https://github.com/Absolutionism) - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;Chrissblock99](https://github.com/Chrissblock99) ⭐ First contribution! ⭐ - [@&#8203;CJH3139](https://github.com/CJH3139) ⭐ First contribution! ⭐ - [@&#8203;Efnilite](https://github.com/Efnilite) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;MrScopes](https://github.com/MrScopes) ⭐ First contribution! ⭐ - [@&#8203;NotSoDelayed](https://github.com/NotSoDelayed) - [@&#8203;Pesekjak](https://github.com/Pesekjak) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) 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.13.0-pre1`](https://github.com/SkriptLang/Skript/releases/tag/2.13.0-pre1): Pre-Release 2.13.0-pre1 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.12.2...2.13.0-pre1) ##### Skript 2.13.0-pre1 Hi all, we've got a new feature pre-release for you all. Thankfully, this one's a bit more reasonable in size than the massive releases of 2.10, 2.11, and 2.12. We have some great features and a bunch of behind-the-scenes API improvements for you this go around. Addon developers should pay special attention to the **Type Properties** section below. Please also note our changes to the supported versions. **2.13 is 1.20.4+, and Paper only**. Below, you can familiarize yourself with the changes. Additionally, [by clicking here](https://docs.skriptlang.org/docs.html?isNew), you can view the list of new syntax on our documentation site. As always, report any issues to our [issues page](https://github.com/SkriptLang/Skript/issues)! Per our [release model](https://stable.skriptlang.org/clockwork-release-model), we plan to release 2.13.0 on October 15th. We may release additional pre-releases before then should the need arise. Happy Skripting! ##### Changes to Supported Versions and Platforms As announced with 2.12, we have updated our policy for supported versions. Going forward, Skript will guarantee support for the last 18 months of Minecraft releases. This means 2.13 is 1.20.4+, while 2.14 will be 1.21+. Additionally, with Paper forking itself from Spigot, it has become increasingly difficult to support both platforms. As a result, this version of Skript is dropping support for Spigot. Skript now requires [Paper](https://papermc.io/software/paper) or a downstream fork of Paper, such as Purpur or Pufferfish. ##### Major Changes - [#&#8203;7194](https://github.com/SkriptLang/Skript/issues/7194) Adds support for equippable components and all correlating data. Smurfy put in a lot of work into the backing API for components, so look forward to a lot more component support in the next few releases! ```applescript set the allowed entities of {_item} to a zombie and a skeleton make {_item} lose durability when hurt if {_item} can be dispensed: add "Dispensable" to lore of {_item} ``` - [#&#8203;7464](https://github.com/SkriptLang/Skript/issues/7464) Adds a structure that allows a script to be automatically reloaded when it is saved, if async loading is enabled in `config.sk`: ```applescript automatically reload this script: recipients: "Sahvde" # The names or uuids of players who, apart from console, will see the success/error messages in chat. OR auto reload: permission: myserver.see_auto_reloads # all players with this permission will see the messages. ``` - [#&#8203;8165](https://github.com/SkriptLang/Skript/issues/8165) Adds Type Property API. See below. - [#&#8203;8207](https://github.com/SkriptLang/Skript/issues/8207) Adds a `debug info` expression that prints out extra information about a value. Currently this consists of the value itself and its class, though this is subject to expansion in the future! ```applescript set {my_list::*} to 1, "2", and vector(1, 2, 3) broadcast debug info of {my_list::*} # prints: # 1 (integer) # "2" (text) # x: 1, y: 2, z: 3 (vector) ``` ##### Type Properties (For Addon Devs) Included in 2.13 is an experimental opt-in API for what we're tenatively calling 'type properties'. These are a way for addons to be able to use the same generic `name of x` or `x contains y` syntaxes that Skript does without causing syntax conflicts. You can register your type (`ClassInfo`) as having a property, such as `Property#NAME` for `name of x`, and Skript will automatically allow it to be used in the `name of` expression. For more details on how to do this and what else you can do with type properties, see [the PR](https://github.com/SkriptLang/Skript/pull/8165). We plan on making a more comprehensive API spec/tutorial once the implementation is solidified, but for now the PR description should be more than sufficient to try it out. However, since this is still experimental and not well tested, it requires a secret config option to enable. To activate property syntaxes, add the line `use type properties: true` somewhere in your `config.sk`. Without it, Skript will still use the old syntaxes for things like `name of`. We hope you try out this new API and give us feedback on what works, what doesn't, and what you'd like to see for its full release in 2.14. The number of property-driven syntaxes is rather small, but we plan on adding many more in the coming months! ##### ⚠ Breaking Changes - [#&#8203;7985](https://github.com/SkriptLang/Skript/issues/7985) Changes the method signature for the abstract `EntityData#init`. Adds parameter `matchedCodeName` and refactors `matchedPattern`. - [#&#8203;8072](https://github.com/SkriptLang/Skript/issues/8072) Enforces using `physics` instead of `physic` in the block update effect. ##### Changelog ##### Additions - [#&#8203;7194](https://github.com/SkriptLang/Skript/issues/7194) Adds support for equippable components and all correlating data. - [#&#8203;7275](https://github.com/SkriptLang/Skript/issues/7275) Adds elements for brewing stands such as brewing stand slots, fuel, time, and events. - [#&#8203;7464](https://github.com/SkriptLang/Skript/issues/7464) Adds a structure that allows a script to be automatically reloaded when it is saved, if async loading is enabled in config.sk. - [#&#8203;7888](https://github.com/SkriptLang/Skript/issues/7888) Adds an expression to get the midpoint between two locations or vectors. - [#&#8203;7985](https://github.com/SkriptLang/Skript/issues/7985) Adds a condition to check if an entity is spawnable in a world. - [#&#8203;8008](https://github.com/SkriptLang/Skript/issues/8008) Adds literals for the maximum and minimum numerical values, such as longs, doubles, or ints. - [#&#8203;8101](https://github.com/SkriptLang/Skript/issues/8101) Adds an expression to get and modify the players listed in the tab menu for a given player. - [#&#8203;8113](https://github.com/SkriptLang/Skript/issues/8113) Adds the ability to enchant an item at as a specific level, as if an enchanting table was used. - [#&#8203;8134](https://github.com/SkriptLang/Skript/issues/8134) Adds an expression to get the duration an entity has been alive for. - [#&#8203;8207](https://github.com/SkriptLang/Skript/issues/8207) Adds a `debug info` expression that prints out extra information about a value. Currently this consists of the value itself and its class, though this is subject to expansion in the future! ##### Changes - [#&#8203;7797](https://github.com/SkriptLang/Skript/issues/7797) Uses `project.testEnv` in `build.gradle` instead of updating the latest version for both. - [#&#8203;7878](https://github.com/SkriptLang/Skript/issues/7878) Allows specifying the amount of damage in the `force entity to attack entity` effect. - [#&#8203;8072](https://github.com/SkriptLang/Skript/issues/8072) Enforces using `physics` instead of `physic` in the block update effect. - [#&#8203;8092](https://github.com/SkriptLang/Skript/issues/8092) Allows using `vehicle` alone in the mount event. - [#&#8203;8196](https://github.com/SkriptLang/Skript/issues/8196) Adds a runtime error when attempting to get the distance between locations in different worlds. - [#&#8203;8197](https://github.com/SkriptLang/Skript/issues/8197) Adds support for changing the `event-location` for `on portal`. - [#&#8203;8206](https://github.com/SkriptLang/Skript/issues/8206) Adds a runtime error when using the sort effect and mapping the input to a null value, which cannot be sorted. ##### Bug Fixes - [#&#8203;7985](https://github.com/SkriptLang/Skript/issues/7985) Fixes being unable to spawn certain entities in certain states, such as `red fox` and `snow fox`. - [#&#8203;8064](https://github.com/SkriptLang/Skript/issues/8064) Fixes an issue where it was not possible to spawn a `minecart`. - [#&#8203;8177](https://github.com/SkriptLang/Skript/issues/8177) Fixes the 'cannot reset' and 'cannot delete' error messages being swapped around. - [#&#8203;8182](https://github.com/SkriptLang/Skript/issues/8182) Fixes the order of which queued variable changes are processed. - [#&#8203;8185](https://github.com/SkriptLang/Skript/issues/8185) Fixes `at %time% [in] real time` by triggering the code on the main thread. - [#&#8203;8189](https://github.com/SkriptLang/Skript/issues/8189) Fixes functions with 0 required parameters. - [#&#8203;8195](https://github.com/SkriptLang/Skript/issues/8195) Fixes an issue where the runtime error catching section would not catch errors after the default error limit is reached. - [#&#8203;8199](https://github.com/SkriptLang/Skript/issues/8199) Fixes issues with expression sections not claiming sections when used as function parameters. ##### API Changes - [#&#8203;7985](https://github.com/SkriptLang/Skript/issues/7985) Changes `Pattern` to allow providing `null` as the object for generic usage. - [#&#8203;8011](https://github.com/SkriptLang/Skript/issues/8011) Exposes the script loader executor via the `Task` api. - [#&#8203;8035](https://github.com/SkriptLang/Skript/issues/8035) Adds support for using an `EntryData` multiple times. - [#&#8203;8065](https://github.com/SkriptLang/Skript/issues/8065) Adds support for custom operators. - [#&#8203;8116](https://github.com/SkriptLang/Skript/issues/8116) Makes `JSONGenerator` available for addons and updates the `docs.json` format. - [#&#8203;8120](https://github.com/SkriptLang/Skript/issues/8120) Adds a method to get a `Color` as an ARGB integer. - [#&#8203;8138](https://github.com/SkriptLang/Skript/issues/8138) Adds getting pattern combinations from `PatternElement` and tests to catch possible pattern conflicts. - [#&#8203;8150](https://github.com/SkriptLang/Skript/issues/8150) Adds `SimplifiedCondition` for constant conditions. `Condition` implements `Simplifiable`. - [#&#8203;8165](https://github.com/SkriptLang/Skript/issues/8165) Adds the Type Property API. - [#&#8203;8180](https://github.com/SkriptLang/Skript/issues/8180) Changes the parameter name for `Expression` class from `expressionType` to `expressionClass` in `Skript#registerExpression`. - [#&#8203;8195](https://github.com/SkriptLang/Skript/issues/8195) Improves runtime error filtering with the introduction of `RuntimeErrorFilter`, which allows different consumers to apply different levels of filtering to the errors they print. - [#&#8203;8201](https://github.com/SkriptLang/Skript/issues/8201) Adds support for excluding packages from being loaded in `ClassLoader`. - [#&#8203;8211](https://github.com/SkriptLang/Skript/issues/8211) Improves the classes `ExpressionList` returns for `acceptChange` to more accurately reflect the changers of the expressions within the list. - [#&#8203;8213](https://github.com/SkriptLang/Skript/issues/8213) Fixes `Functions#getJavaFunctions` to only return `JavaFunction`s. [Click here to view the full list of commits made since 2.12.2](https://github.com/SkriptLang/Skript/compare/2.12.2...2.13.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](https://github.com/SkriptLang/Skript/tree/2.13.0-pre1/src/main/resources/scripts/-examples/experimental%20features). <details> <summary>Click to reveal the experiments available in this release</summary> ##### For-Each Loop **Enable by adding `using for loops` to your script.** A new kind of loop syntax that stores the loop index and value in variables for convenience. This can be used to avoid confusion when nesting multiple loops inside each other. ```applescript= for {_index}, {_value} in {my list::*}: broadcast "%{_index}%: %{_value}%" ``` ```applescript= for each {_player} in all players: send "Hello %{_player}%!" to {_player} ``` All existing loop features are also available in this section. ##### 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. ```applescript= 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 ``` ```applescript= 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: ```applescript 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: ```applescript {_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`. ```applescript 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) ``` ##### Damage Sources **Enable by adding `using damage sources` to your script.** > Note that `type` has been removed as an option for the '[damage cause](https://docs.skriptlang.org/docs.html?search=#ExprDamageCause)' expression as `damage cause` and `damage type` now refer to different things. Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more. Below is an example of what damaging using custom damage sources looks like: ```applescript damage all players by 5 using a custom damage source: set the damage type to magic set the causing entity to {_player} set the direct entity to {_arrow} set the damage location to location(0, 0, 10) ``` For more details about the syntax, visit [damage source](https://docs.skriptlang.org/docs.html?search=damage%20source) on our documentation website. ##### 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: ```applescript 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 ```applescript 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](https://docs.skriptlang.org/docs.html?search=equippable%20component) on our documentation website. </details> ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;Absolutionism](https://github.com/Absolutionism) - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;Chrissblock99](https://github.com/Chrissblock99) ⭐ First contribution! ⭐ - [@&#8203;Efnilite](https://github.com/Efnilite) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;MrScopes](https://github.com/MrScopes) ⭐ First contribution! ⭐ - [@&#8203;NotSoDelayed](https://github.com/NotSoDelayed) - [@&#8203;Pesekjak](https://github.com/Pesekjak) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) 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.12.2`](https://github.com/SkriptLang/Skript/releases/tag/2.12.2): Patch Release 2.12.2 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.12.1...2.12.2) ##### Skript 2.12.2 Today, we are releasing Skript 2.12.2 to continue resolving issues reported with 2.12. As always, you can report any issues on our [issue tracker](https://github.com/SkriptLang/Skript/issues). Happy Skripting! ##### Changelog ##### Bug Fixes - [#&#8203;8077](https://github.com/SkriptLang/Skript/issues/8077) Fixes an issue where using entities with the second '[play effect](https://docs.skriptlang.org/docs.html?search=#EffVisualEffect)' pattern was not possible. - [#&#8203;8098](https://github.com/SkriptLang/Skript/issues/8098) Implements type-aware function parsing to fix issues where function calls could not be parsed as the correct functions. - [#&#8203;8109](https://github.com/SkriptLang/Skript/issues/8109) Fixes an issue where the '[loop value](https://docs.skriptlang.org/docs.html?search=#ExprLoopValue)' expression sometimes failed to evaluate when used with other expressions. - [#&#8203;8135](https://github.com/SkriptLang/Skript/issues/8135) Fixes issues with function parsing related to loading and having singular default values. - [#&#8203;8151](https://github.com/SkriptLang/Skript/issues/8151) Removes an errant colon in the examples for the fire resistance effect. - [#&#8203;8164](https://github.com/SkriptLang/Skript/issues/8164) Fixes an exception being thrown for some uses of the `%classinfo% input` expression. - [#&#8203;8147](https://github.com/SkriptLang/Skript/issues/8147) Fixes a bug where an `else` section was considered delayed due to a delay in its `if` section. - [#&#8203;8171](https://github.com/SkriptLang/Skript/issues/8171) Fixes parsing order issue with `reversed 2 times` by only allowing plural inputs to `reversed %objects%`. ##### API/Development - [#&#8203;8041](https://github.com/SkriptLang/Skript/issues/8041) Exposes `BukkitUtils#getRegistryClassInfo()` to assist with creating types backed by Bukkit or Paper registries. - [#&#8203;8121](https://github.com/SkriptLang/Skript/issues/8121) Allows null inputs to `Direction.combine()`. - [#&#8203;8132](https://github.com/SkriptLang/Skript/issues/8132) Loosens generics for `EntryDataExpression` from `T` to `? extends T` to allow for subtypes for the default values. - [#&#8203;8145](https://github.com/SkriptLang/Skript/issues/8145) Prioritizes Skript syntaxes before addon-provided syntaxes when ordering syntaxes of the same priority. - [#&#8203;8154](https://github.com/SkriptLang/Skript/issues/8154) Ensures the possible return types for `ExpressionList` are accurate after use of `getConvertedExpression()`. - [#&#8203;8158](https://github.com/SkriptLang/Skript/issues/8158) Makes `SectionContext` and `SectionContext#modify()` public for addon use. [Click here to view the full list of commits made since 2.12.1](https://github.com/SkriptLang/Skript/compare/2.12.1...2.12.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](https://github.com/SkriptLang/Skript/tree/2.12.2/src/main/resources/scripts/-examples/experimental%20features). <details> <summary>Click to reveal the experiments available in this release</summary> ##### For-Each Loop **Enable by adding `using for loops` to your script.** A new kind of loop syntax that stores the loop index and value in variables for convenience. This can be used to avoid confusion when nesting multiple loops inside each other. ```applescript= for {_index}, {_value} in {my list::*}: broadcast "%{_index}%: %{_value}%" ``` ```applescript= for each {_player} in all players: send "Hello %{_player}%!" to {_player} ``` All existing loop features are also available in this section. ##### 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. ```applescript= 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 ``` ```applescript= 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: ```applescript 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: ```applescript {_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`. ```applescript 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) ``` ##### Damage Sources **Enable by adding `using damage sources` to your script.** > Note that `type` has been removed as an option for the '[damage cause](https://docs.skriptlang.org/docs.html?search=#ExprDamageCause)' expression as `damage cause` and `damage type` now refer to different things. Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more. Below is an example of what damaging using custom damage sources looks like: ```applescript damage all players by 5 using a custom damage source: set the damage type to magic set the causing entity to {_player} set the direct entity to {_arrow} set the damage location to location(0, 0, 10) ``` For more details about the syntax, visit [damage source](https://docs.skriptlang.org/docs.html?search=damage%20source) on our documentation website. </details> ##### Join us on Discord We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) 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: - @&#8203;Absolutionism - @&#8203;APickledWalrus - @&#8203;arpita2525 ⭐ First contribution! ⭐ - @&#8203;JakeGBLP - @&#8203;sovdeeth - @&#8203;TheLimeGlass 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.12.1`](https://github.com/SkriptLang/Skript/releases/tag/2.12.1): Patch Release 2.12.1 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.12.0...2.12.1) ##### Skript 2.12.1 Today, we are releasing Skript 2.12.1 to resolve some of the most common issues reported with Skript 2.12.0. This release includes support for Minecraft 1.21.8. As always, you can report any issues on our [issue tracker](https://github.com/SkriptLang/Skript/issues). Happy Skripting! ##### Changelog ##### Additions / Changes - [#&#8203;8009](https://github.com/SkriptLang/Skript/issues/8009) Adds `launch` as an alternative keyword for the '[shoot](https://docs.skriptlang.org/docs.html?search=#shoot)' event. - [#&#8203;8010](https://github.com/SkriptLang/Skript/issues/8010) Adds support for checking whether an entity has any potion effects using the '[has potion](https://docs.skriptlang.org/docs.html?search=#CondHasPotion)' condition. - [#&#8203;8054](https://github.com/SkriptLang/Skript/issues/8054) Adds support for Minecraft 1.21.8 - [#&#8203;8076](https://github.com/SkriptLang/Skript/issues/8076) Further tweaks the default syntax ordering to improve performance and error messages. ##### Bug Fixes - [#&#8203;8043](https://github.com/SkriptLang/Skript/issues/8043) Fixes being able to wait for an indefinite amount of time. - [#&#8203;8046](https://github.com/SkriptLang/Skript/issues/8046) Fixes an issue where attempting to register overloaded functions with an argument type of one function being convertable to an argument type of another failed. - [#&#8203;8068](https://github.com/SkriptLang/Skript/issues/8068) Fixes an issue where literal specification could be too eager and fail with function parameters. - [#&#8203;8069](https://github.com/SkriptLang/Skript/issues/8069) Fixes an issue where looping over `all item types` could result in an error on newer versions. - [#&#8203;8071](https://github.com/SkriptLang/Skript/issues/8071) Fixes an issue where valid arguments for a single list parameter function sometimes failed to resolve to that function. - [#&#8203;8081](https://github.com/SkriptLang/Skript/issues/8081) Fixes an issue where seemingly non-literal inputs for the '[x of item/entity type](https://docs.skriptlang.org/docs.html?search=#ExprXOf)' expression caused the syntax to fail to parse. - [#&#8203;8082](https://github.com/SkriptLang/Skript/issues/8082) Fixes an issue where valid statements including a section expression could fail to parse. - [#&#8203;8086](https://github.com/SkriptLang/Skript/issues/8086) Fixes an issue where harnesses could not be equipped onto happy ghasts. - [#&#8203;8087](https://github.com/SkriptLang/Skript/issues/8087) Fixes edge-case errors that could occur from rounding. - [#&#8203;8088](https://github.com/SkriptLang/Skript/issues/8088) Fixes a few minor typographical errors in the configuration. - [#&#8203;8089](https://github.com/SkriptLang/Skript/issues/8089) Fixes an issue where default expressions could fail to be used. - [#&#8203;8090](https://github.com/SkriptLang/Skript/issues/8090) Fixes an issue where the '[loop value](https://docs.skriptlang.org/docs.html?search=#ExprLoopValue)' expression was too accepting of `loop-X` inputs for specific types. - [#&#8203;8096](https://github.com/SkriptLang/Skript/issues/8096) Fixes an issue where single list parameter functions were always chosen over functions with a specific number of parameters of the same type. ##### API/Development - [#&#8203;8000](https://github.com/SkriptLang/Skript/issues/8000) Improves the testing assertion output for the '[contains](https://docs.skriptlang.org/docs.html?search=#CondContains)' condition. - [#&#8203;8066](https://github.com/SkriptLang/Skript/issues/8066) Fixes an issue where the project's checkstyle configuration incorrectly treated tab width. [Click here to view the full list of commits made since 2.12.0](https://github.com/SkriptLang/Skript/compare/2.12.0...2.12.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](https://github.com/SkriptLang/Skript/tree/2.12.0-pre1/src/main/resources/scripts/-examples/experimental%20features). <details> <summary>Click to reveal the experiments available in this release</summary> ##### For-Each Loop **Enable by adding `using for loops` to your script.** A new kind of loop syntax that stores the loop index and value in variables for convenience. This can be used to avoid confusion when nesting multiple loops inside each other. ```applescript= for {_index}, {_value} in {my list::*}: broadcast "%{_index}%: %{_value}%" ``` ```applescript= for each {_player} in all players: send "Hello %{_player}%!" to {_player} ``` All existing loop features are also available in this section. ##### 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. ```applescript= 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 ``` ```applescript= 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: ```applescript 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: ```applescript {_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`. ```applescript 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) ``` ##### Damage Sources **Enable by adding `using damage sources` to your script.** > Note that `type` has been removed as an option for the '[damage cause](https://docs.skriptlang.org/docs.html?search=#ExprDamageCause)' expression as `damage cause` and `damage type` now refer to different things. Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more. Below is an example of what damaging using custom damage sources looks like: ```applescript damage all players by 5 using a custom damage source: set the damage type to magic set the causing entity to {_player} set the direct entity to {_arrow} set the damage location to location(0, 0, 10) ``` For more details about the syntax, visit [damage source](https://docs.skriptlang.org/docs.html?search=damage%20source) on our documentation website. </details> ##### Join us on Discord We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) 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: - @&#8203;Absolutionism - @&#8203;APickledWalrus - @&#8203;Efnilite - @&#8203;Pesekjak - @&#8203;sovdeeth - @&#8203;sweetestpiper ⭐ First contribution! ⭐ - @&#8203;TheLimeGlass 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.12.0`](https://github.com/SkriptLang/Skript/releases/tag/2.12.0): Feature Release 2.12.0 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.12.0-pre2...2.12.0) ##### Skript 2.12.0 2.12.0 is here! Please excuse the later release time, Pickle's on vacation! We've got a bounty of new features, changes, and bug fixes for you in Skript 2.12, along with early support for 1.21.6/7. Below, you can familiarize yourself with the changes. Additionally, [by clicking here](https://docs.skriptlang.org/docs.html?isNew), you can view the list of new syntax on our documentation site. As always, report any issues to our [issues page](https://github.com/SkriptLang/Skript/issues)! Per our [release model](https://stable.skriptlang.org/clockwork-release-model), we plan to release 2.12.1 on August 1st. We may release emergency patches before then should the need arise. We would also like to welcome a new addition to the team, [@&#8203;Absolutionism](https://github.com/Absolutionism)! Happy Skripting! ##### Changes to Supported Versions and Platforms Back in 2.10, we switched to supporting the last three major versions. While reasonable at the time, Mojang has continued to make significant changes between minor versions and seems to have shyed away from incrementing the major version counter. In order to reduce the development burden of supporting so many versions with different features, **as of 2.13** (next release) **we have decided to switch to supporting the last 18 months of Minecraft releases**. This means as of 2.13, Skript will support 1.20.4 and newer. 2.14 will be 1.21.0 and newer. We hope this change will allow us to modernize Skript more quickly and more fully support new systems like item components going forward. To clarify, **2.12 still supports 1.19.4+**. These changes will affect 2.13 and later. In the same vein, Paper has recently completed its fork away from Spigot. We have aimed to maintain support for both versions so far, but we are running into issues where the API differences between Paper and Spigot are becoming too great. It is not feasible for us to develop two parallel versions of Skript, and as a result, **we will be dropping support for Spigot starting with 2.13**. We encourage the small portion of our users who are still using Spigot to upgrade to Paper if possible. ##### Major Changes ##### Ephemeral Variables Ephemeral variables (or ram vars, or memory vars) are now fully implemented by default for all users. These are global variables that are not saved between restarts. To make a variable ephemeral, add a hyphen (`-`) to the start of its name: `{-var}`. These variables are about 2.5x faster to change compared to normal global variables. You do not need to do anything to enable them. ##### Function Overloading > \[!NOTE] > The `script reflection` experiment, which includes syntax for dynamically referencing and executing functions, does not yet support working with overloaded functions. Function overloading enables creating functions that have the same name but different parameters types/parameter counts. ```applescript function send_welcome(p: player): send_welcome({_p}, false) function send_welcome(p: player, first_time: boolean): if {_first_time} is true: send "Welcome to our server for the first time, %name of {_p}%!" to {_p} else: send "Welcome back to our server, %name of {_p}%!" to {_p} ``` ##### Local Variable Type Hints (Experimental) > \[!NOTE] > This feature is currently experimental and can be used by [enabling](https://docs.skriptlang.org/docs.html?search=#StructUsing) the `type hints` experiment. Local variable type hints enable Skript to understand what kind of values your local variables will hold at parse time. Consider the following example: ```applescript 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: ```applescript {_var} # can use type hints {_var::%player's name%} # can't use type hints ``` ##### Runtime Error Catching (Experimental) > \[!NOTE] > This feature is currently experimental and can be used by [enabling](https://docs.skriptlang.org/docs.html?search=#StructUsing) the `error catching` experiment. 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`. ```applescript 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) ``` ##### Damage Sources (Experimental) > \[!NOTE] > This feature is currently experimental and can be used by [enabling](https://docs.skriptlang.org/docs.html?search=#StructUsing) the `damage sources` experiment. > \[!CAUTION] > Note that `type` has been removed as an option for the '[damage cause](https://docs.skriptlang.org/docs.html?search=#ExprDamageCause)' expression as `damage cause` and `damage type` now refer to different things. Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more. Below is an example of what damaging using custom damage sources looks like: ```applescript damage all players by 5 using a custom damage source: set the damage type to magic set the causing entity to {_player} set the direct entity to {_arrow} set the damage location to location(0, 0, 10) ``` For more details about the syntax, visit [damage source](https://docs.skriptlang.org/docs.html?search=damage%20source) on our documentation website. ##### Contributing Updates We are now allowing contributors to release their code contributions under the more-permissive MIT License. For more information, please review our [LICENSING.md](https://github.com/SkriptLang/Skript/blob/master/LICENSING.md) file. ##### ⚠ Breaking Changes - When using `index of "a" in "b"`, values that do not appear in the second string will now return `none` instead of the previous `-1`. - The `is enchanted with` condition now looks for exact levels instead of the specified level or better. Old behavior can be replicated with `if {_item} is enchanted with sharpness 2 or better`. Some examples: ```applescript if {_item} is enchanted with sharpness 2 # only passes for sharpness 2. Previous behavior allowed sharpness of 2 or greater to pass. if {_item} is enchanted with sharpness 2 or better # sharpness 2+ if {_item} is enchanted with sharpness 2 or worse # sharpness 2 or 1 if {_item} is enchanted with sharpness # sharpness of any level ``` - An [infinite timespan literal](https://docs.skriptlang.org/docs.html#LitEternity) was added, meaning Timespan math operations can now result in an infinite timespan value (just like numbers). - The parsing behavior of the '[amount](https://docs.skriptlang.org/docs.html?search=#ExprAmount)' expression has changed. Given an expression like `amount of {a::*}, "b"`, it was before parsed as `(amount of {a::*}), "b"`, but it is now parsed as `amount of ({a::*}, "b")`. Use parentheses as necessary to clarify your intent. - For the old '[beacon values](https://docs.skriptlang.org/archives/2.11.2/docs.html#ExprBeaconValues)' expression, `beacon` is now a required keyword for the `range` and `tier` expressions. - The `remove all` changer for the '[custom model data](https://docs.skriptlang.org/docs.html?search=#ExprCustomModelData)' expression has been removed. It functioned the same as `remove`. - `head` has been removed as an option for the '[player skull](https://docs.skriptlang.org/docs.html?search=#ExprSkull)' expression as `head of player` conflicts with the '[head location](https://docs.skriptlang.org/docs.html?search=#ExprEyeLocation)' expression. - `type` has been removed as an option for the '[damage cause](https://docs.skriptlang.org/docs.html?search=#ExprDamageCause)' expression as `damage cause` and `damage type` now refer to different things. - The '[load world](https://docs.skriptlang.org/docs.html?search=#EffWorldLoad)' effect now requires `world`. - The API method `RegistryParser#getAllNames` has been removed in favor of `RegistryParser#getCombinedPatterns` (from the `PatternedParser` interface). - API methods for the `since` documentation field have changed on SkriptEventInfo: - `SkriptEventInfo#getSince() (String) -> SkriptEventInfo#getSince() (String[])` - `BukkitSyntaxInfos.Event.since() (String) -> BukkitSyntaxInfos.Event.since() (Collection<String>)` - `BukkitSyntaxInfos.Event.Builder.since(String) -> BukkitSyntaxInfos.Event.Builder.addSince(String)` - (API) Syntax ordering is no longer based on registration order when a priority is shared. This may expose syntax conflicts if this behavior was depended on. ##### Changelog ##### Additions - [#&#8203;4154](https://github.com/SkriptLang/Skript/issues/4154) Adds support for boolean values to the '[toggle](https://docs.skriptlang.org/docs.html?search=#EffToggle)' effect and an '[inverse boolean](https://docs.skriptlang.org/docs.html?search=#ExprInverse)' expression to obtain the inverse of a boolean (at long last). - [#&#8203;6902](https://github.com/SkriptLang/Skript/issues/6902) Adds a '[buried item](https://docs.skriptlang.org/docs.html?search=#ExprBrushableItem)' expression and a '[dusted stage](https://docs.skriptlang.org/docs.html?search=#ExprDustedStage)' expression for working with brushable blocks. - [#&#8203;7495](https://github.com/SkriptLang/Skript/issues/7495) Adds ephemeral variables (starting with `-`) which are cleared when the server restarts. - [#&#8203;7561](https://github.com/SkriptLang/Skript/issues/7561) Adds an '[except](https://docs.skriptlang.org/docs.html?search=#ExprExcept)' expression which provides a simple way to filter values from a list. - [#&#8203;7658](https://github.com/SkriptLang/Skript/issues/7658) Adds an '[On-screen kick message](https://docs.skriptlang.org/docs.html?search=#ExprOnScreenKickMessage)' expression to get and change the on-screen message that appears when a user is kicked, usable in the kick event. - [#&#8203;7685](https://github.com/SkriptLang/Skript/issues/7685) Adds support for the Catalan language (thanks to [@&#8203;TwistedWar3713](https://github.com/TwistedWar3713), [@&#8203;Lukarius11](https://github.com/Lukarius11), and [@&#8203;ItzDuck364](https://github.com/ItzDuck364) for their language insights). - [#&#8203;7707](https://github.com/SkriptLang/Skript/issues/7707) Adds support for the '[item cooldown](https://docs.skriptlang.org/docs.html?search=item%20cooldown)' syntax to respect cooldown groups (cooldown components) defined on items. - [#&#8203;7738](https://github.com/SkriptLang/Skript/issues/7738) Adds an '[exact item](https://docs.skriptlang.org/docs.html?search=#ExprExactItem)' expression that acts like creative-mode middle-click, copying the block's data exactly. - [#&#8203;7745](https://github.com/SkriptLang/Skript/issues/7745) Adds a '[vault display item](https://docs.skriptlang.org/docs.html?search=#vault_display_item)' event for when a trial vault displays an item. - [#&#8203;7746](https://github.com/SkriptLang/Skript/issues/7746) Adds a '[villager career change](https://docs.skriptlang.org/docs.html?search=#villager_career_change)' event for when villagers change professions along with the ability to obtain the reason why. - [#&#8203;7748](https://github.com/SkriptLang/Skript/issues/7748) Adds a [condition](https://docs.skriptlang.org/docs.html?search=#CondStriderIsShivering) and [effect](https://docs.skriptlang.org/docs.html?search=#EffStriderShivering) for working with shivering striders. - [#&#8203;7751](https://github.com/SkriptLang/Skript/issues/7751) Adds support for function overloading, enabling functions to have the same name but different parameters. - [#&#8203;7803](https://github.com/SkriptLang/Skript/issues/7803) Adds the word `along` as an option in the '[push](https://docs.skriptlang.org/docs.html?search=#EffPush)' effect: `push player along vector(1,1,1) at speed 3`. - [#&#8203;7807](https://github.com/SkriptLang/Skript/issues/7807) Adds support for using the expanded custom model data system to the '[custom model data](https://docs.skriptlang.org/docs.html?search=#ExprCustomModelData)' expression. Note that `remove all` changer support has been removed. - [#&#8203;7808](https://github.com/SkriptLang/Skript/issues/7808) Adds a warning for ambiguous command arguments where expressions like `arg-1` could be misinterpreted as `(arg) - 1`. - [#&#8203;7823](https://github.com/SkriptLang/Skript/issues/7823) Adds experimental syntax for catching and suppressing runtime errors. See the available experiments section below for more information. - [#&#8203;7830](https://github.com/SkriptLang/Skript/issues/7830) Adds support for printing errors to the '[enable/disable/unload/reload script](https://docs.skriptlang.org/docs.html?search=#EffScriptFile)' effect. - [#&#8203;7841](https://github.com/SkriptLang/Skript/issues/7841) Adds support for syntax simplification, which enables parse time pre-computation of some syntax that will always have the same result. - [#&#8203;7846](https://github.com/SkriptLang/Skript/issues/7846) Adds support for the new 1.21.5 [pig variants](https://minecraft.wiki/w/Pig#Variants). - [#&#8203;7851](https://github.com/SkriptLang/Skript/issues/7851) Adds a warning for when literals that can be interpeted as multiple types are used and Skript cannot determine the intended type. - [#&#8203;7858](https://github.com/SkriptLang/Skript/issues/7858) Adds error messages for experimental syntax that is used when the experiment is disabled. - [#&#8203;7866](https://github.com/SkriptLang/Skript/issues/7866) Adds support for [cow variants](https://minecraft.wiki/w/Cow#Variants). - [#&#8203;7868](https://github.com/SkriptLang/Skript/issues/7868) Adds support for [chicken variants](https://minecraft.wiki/w/Chicken#Variants). - [#&#8203;7892](https://github.com/SkriptLang/Skript/issues/7892) Adds experimental support for local variable type hints. This allows Skript to determine what kind of values your local variables may hold at parse time. See the available experiments section below for more information. - [#&#8203;7897](https://github.com/SkriptLang/Skript/issues/7897) Expands the '[arrow attached block](https://docs.skriptlang.org/docs.html?search=#ExprAttachedBlock)' expression to support multiple blocks, as arrows may be attached to multiple blocks. The existing single expression has been deprecated on versions where the plural expression is available, as it is unreliable. - [#&#8203;7903](https://github.com/SkriptLang/Skript/issues/7903) Adds a '[harvest block](https://docs.skriptlang.org/docs.html?search=#harvest_block)' event for when a block is harvested (berry bushes, glowberries, etc.). - [#&#8203;7905](https://github.com/SkriptLang/Skript/issues/7905) Adds a new `event-entity type` event value for entity related events. - [#&#8203;7906](https://github.com/SkriptLang/Skript/issues/7906) Adds saddle and dynamic equipment slot support to the '[armor slot](https://docs.skriptlang.org/docs.html?search=#ExprArmorSlot)' expression. - [#&#8203;7909](https://github.com/SkriptLang/Skript/issues/7909) Adds a '[keyed](https://docs.skriptlang.org/docs.html?search=#ExprKeyed)' expression which allows explicitly passing/including the keys of an expression alongside its values. For example, you can preserve/include keys (indices) when setting a list variable to another list variable or when providing a list variable as the argument of a function. - [#&#8203;7914](https://github.com/SkriptLang/Skript/issues/7914) Adds a '[first empty slot in inventory](https://docs.skriptlang.org/docs.html?search=#ExprFirstEmptySlot)' expression to obtain the first empty slot in inventories. - [#&#8203;7933](https://github.com/SkriptLang/Skript/issues/7933) Adds scientific notation (e.g. `1.23E4`, `10e-10`) to numbers. - [#&#8203;7942](https://github.com/SkriptLang/Skript/issues/7942) Function names can now start with an underscore. - [#&#8203;7949](https://github.com/SkriptLang/Skript/issues/7949) Adds support for resetting sent block changes from the '[send block change](https://docs.skriptlang.org/docs.html?search=#EffSendBlockChange)' effect. - [#&#8203;7950](https://github.com/SkriptLang/Skript/issues/7950) Adds support to the '[push](https://docs.skriptlang.org/docs.html?search=#EffPush)' effect for pushing/pulling entitites towards/away from a location. - [#&#8203;7951](https://github.com/SkriptLang/Skript/issues/7951) Adds support for deleting the '[spawner type](https://docs.skriptlang.org/docs.html?search=#ExprSpawnerType)' of a spawner. - [#&#8203;7956](https://github.com/SkriptLang/Skript/issues/7956) Adds support for an '[infinite](https://docs.skriptlang.org/docs.html#LitEternity)' timespan. Note that now, just like numbers, math operations for Timespans can now result in an infinite timespan value. - [#&#8203;7957](https://github.com/SkriptLang/Skript/issues/7957)/[#&#8203;7982](https://github.com/SkriptLang/Skript/issues/7982)/[#&#8203;7983](https://github.com/SkriptLang/Skript/issues/7983) Implement early support for 1.21.6/7. - [#&#8203;7961](https://github.com/SkriptLang/Skript/issues/7961) Adds support for literals in the '[amount](https://docs.skriptlang.org/docs.html?search=#ExprAmount)' expression. Note that, as a result, the parsing behavior has now changed. Given an expression like `amount of {a::*}, "b"`, it was before parsed as `(amount of {a::*}), "b"`, but it is now parsed as `amount of ({a::*}, "b")`. Use parentheses as necessary to clarify your intent. ##### Changes - [#&#8203;7325](https://github.com/SkriptLang/Skript/issues/7325) Improves the '[indices of value](https://docs.skriptlang.org/docs.html?search=#ExprIndicesOfValue)' expression to allow accessing the index/position of a specific value in a list. Note that values that are not found in a list or a string now return `none` instead of `-1`. - [#&#8203;7729](https://github.com/SkriptLang/Skript/issues/7729) Splits the '[beacon values](https://docs.skriptlang.org/archives/2.11.2/docs.html#ExprBeaconValues)' expression into multiple new expressions: '[beacon effects](https://docs.skriptlang.org/docs.html?search=#ExprBeaconEffects)', '[beacon range](https://docs.skriptlang.org/docs.html?search=#ExprBeaconRange)', and '[beacon tier](https://docs.skriptlang.org/docs.html?search=#ExprBeaconTier)'. Note that the `range` and `tier` expressions now require `beacon` in their syntax. - [#&#8203;7742](https://github.com/SkriptLang/Skript/issues/7742) Cleans up the '[hash](https://docs.skriptlang.org/docs.html?search=#ExprHash)' expression and adds SHA-384 and SHA-512. A warning is now printed when using the MD5 algorithm. - [#&#8203;7816](https://github.com/SkriptLang/Skript/issues/7816) The '[is enchanted](https://docs.skriptlang.org/docs.html?search=#CondIsEnchanted)' condition now looks for exact enchantments, with `or better` and `or worse` added as newly available comparison options. - [#&#8203;7840](https://github.com/SkriptLang/Skript/issues/7840) Improves the existing comparisons for offline players and offline players-strings. - [#&#8203;7913](https://github.com/SkriptLang/Skript/issues/7913) The `aliases` folder will now be created automatically so that users know where to place custom aliases. - [#&#8203;7944](https://github.com/SkriptLang/Skript/issues/7944) Tweaks the '[target entity](https://docs.skriptlang.org/docs.html?search=#ExprTarget)' expression to make the ray size option more grammatically correct. - [#&#8203;7965](https://github.com/SkriptLang/Skript/issues/7965) Splits the 'special number' expression into multiple literal expressions: '[infinity](https://docs.skriptlang.org/docs.html?search=#LitInfinity)', '[NaN](https://docs.skriptlang.org/docs.html?search=#LitNaN)', and '[negative infinity](https://docs.skriptlang.org/docs.html?search=#LitNegativeInfinity)' ##### Bug Fixes - [#&#8203;7654](https://github.com/SkriptLang/Skript/issues/7654) Fixes Skript's documentation using incorrect pages and formatting. - [#&#8203;7674](https://github.com/SkriptLang/Skript/issues/7674) Fixes an issue where the `event-item` in a '[craft](https://docs.skriptlang.org/docs.html?search=#craft)' event often returned `air` due to the recipe being complex. - [#&#8203;7879](https://github.com/SkriptLang/Skript/issues/7879) Fixes an issue where syntax removals using the new Registration API often failed. - [#&#8203;7917](https://github.com/SkriptLang/Skript/issues/7917) Fixes an issue where the `raid omen` effect was incorrectly given the alias `bad omen`. - [#&#8203;7928](https://github.com/SkriptLang/Skript/issues/7928) Fixes an issue where sorting lists with duplicate values returned a list with only a single instance of that value. - [#&#8203;7935](https://github.com/SkriptLang/Skript/issues/7935) Fixes incorrect documentation for the '[expand/shrink world border](https://docs.skriptlang.org/docs.html?search=#EffWorldBorderExpand)' effect. - [#&#8203;7938](https://github.com/SkriptLang/Skript/issues/7938) Fixes an issue where using the '[name](https://docs.skriptlang.org/docs.html?search=#ExprName)' expression with [default variables](https://docs.skriptlang.org/docs.html?search=#StructVariables) could cause an exception. - [#&#8203;7943](https://github.com/SkriptLang/Skript/issues/7943) Fixes numerous issues with the '[gamerule value](https://docs.skriptlang.org/docs.html?search=#ExprGameRule)' expression. - [#&#8203;7945](https://github.com/SkriptLang/Skript/issues/7945) Fixes a bug where the '[is within](https://docs.skriptlang.org/docs.html?search=#CondIsWithin)' condition incorrectly handled `or` lists. - [#&#8203;7947](https://github.com/SkriptLang/Skript/issues/7947) Fixes comparisons between enchantments and enchantment types: `if sharpness 1, efficiency 3, and knockback 2 contains sharpness`. - [#&#8203;7951](https://github.com/SkriptLang/Skript/issues/7951) Fixes multiple issues with using and comparing against llamas/trader llamas. - [#&#8203;7964](https://github.com/SkriptLang/Skript/issues/7964) Fixes an issue with setting variables during script loading when asynchronous loading is enabled. - [#&#8203;7971](https://github.com/SkriptLang/Skript/issues/7971) Fixes some issues with comparing [pig variants](https://minecraft.wiki/w/Pig#Variants) and that variants could not be used with baby pigs. - [#&#8203;7976](https://github.com/SkriptLang/Skript/issues/7976) Fixes an issue where [arithmetic syntax](https://docs.skriptlang.org/docs.html?search=#ExprArithmetic) could fail to resolve valid operations. - [#&#8203;7986](https://github.com/SkriptLang/Skript/issues/7986) Fixes an issue on newer versions where adding items to an inventory could result in other slots being mistakenly deleted. - [#&#8203;7989](https://github.com/SkriptLang/Skript/issues/7989) Fixes an issue where `next`/`previous` '[loop-value](https://docs.skriptlang.org/docs.html?search=#ExprLoopValue)' could fail to reset in-between loops. - [#&#8203;7998](https://github.com/SkriptLang/Skript/issues/7998) Fixes an issue where the '[inventory holder/viewers/rows/slots](https://docs.skriptlang.org/docs.html?search=#ExprInventoryInfo)' expression could cause an exception when used with other syntax. - [#&#8203;7999](https://github.com/SkriptLang/Skript/issues/7999) Fixes an issue where getting the entities in a chunk failed. - [#&#8203;8005](https://github.com/SkriptLang/Skript/issues/8005) Fixes ephemeral variables still being saved on server shutdown. - [#&#8203;8012](https://github.com/SkriptLang/Skript/issues/8012) Fixes an issue where `pig` entity data could not be saved in a variable. - [#&#8203;8015](https://github.com/SkriptLang/Skript/issues/8015) Fixes an issue where removing functions mistakenly used the wrong namespace. - [#&#8203;8024](https://github.com/SkriptLang/Skript/issues/8024) Removes the 'cannot be saved' warnings for ephemeral variables. - [#&#8203;8026](https://github.com/SkriptLang/Skript/issues/8026) Fixes test failures with ExprExcept and an issue where it would mistakenly simplify when it shouldn't. - [#&#8203;8027](https://github.com/SkriptLang/Skript/issues/8027) Fixes text arguments and other code being mistakenly parsed as specific literals. - [#&#8203;8028](https://github.com/SkriptLang/Skript/issues/8028) Fixes an issue where custom lang files were not loaded due to Skript looking for them in `Skriptlang/` instead of `Skript/lang/`. - [#&#8203;8032](https://github.com/SkriptLang/Skript/issues/8032) Fixes an issue where overloading functions with no parameters or array parameters could result in errors. ##### API Changes - [#&#8203;7256](https://github.com/SkriptLang/Skript/issues/7256) Adds API to allow the setting of custom default values for types. - [#&#8203;7551](https://github.com/SkriptLang/Skript/issues/7551) Integrates the [Registration API](https://github.com/SkriptLang/Skript/pull/6246) into SkriptParser and syntax class parse methods. Addons using SkriptParser methods directly *may* need to be recompiled, though there should be no breaking changes. - [#&#8203;7709](https://github.com/SkriptLang/Skript/issues/7709) Updates SkriptEventInfo (and its Registration API equivalent) to support passing an array for the `since` documentation field. Some methods have had their signatures changed and addons using them will need to be updated. - [#&#8203;7710](https://github.com/SkriptLang/Skript/issues/7710) Cleanup to the ExprTool class and EquipmentSlot conversion methods for BukkitUtils. - [#&#8203;7778](https://github.com/SkriptLang/Skript/issues/7778) Adds a preInit() method intended to help with doing common init work for families of syntaxes, rather than having to hijack init() and create a different signature for the children to implement. - [#&#8203;7791](https://github.com/SkriptLang/Skript/issues/7791) Adds a spawnTestEntity helper method for JUnit tests. - [#&#8203;7832](https://github.com/SkriptLang/Skript/issues/7832) Removes many unnecessary version checks for versions Skript no longer supports. - [#&#8203;7841](https://github.com/SkriptLang/Skript/issues/7841) The syntax simplification API is now used by the parser. For more information, review the pull request's description. - [#&#8203;7851](https://github.com/SkriptLang/Skript/issues/7851) Adds a [PatternedParser](https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/classes/PatternedParser.java) utility interface and replaces the `RegistryParser#getAllNames` method with `RegistryParser#getCombinedPatterns` (from the `PatternedParser` interface). - [#&#8203;7858](https://github.com/SkriptLang/Skript/issues/7858) Adds ExperimentData utility class and SimpleExperimentalSyntax utility interface to simplify the work needed by syntax to restrict based on the set experiments. - [#&#8203;7879](https://github.com/SkriptLang/Skript/issues/7879) Registered syntax are no longer ordered by when they were registered. Priorities should be used if precise registration order is required. - [#&#8203;7891](https://github.com/SkriptLang/Skript/issues/7891) Improves the return types for many expressions via `Expression#possibleReturnTypes()` and `Expression#canReturn()`. - [#&#8203;7892](https://github.com/SkriptLang/Skript/issues/7892) Adds experimental support for local variable type hints. If you have syntax that modifies variables (and may result in their type being changed), you you may need to support this feature. For more information, review the pull request's description (see "API Support"). - [#&#8203;7904](https://github.com/SkriptLang/Skript/issues/7904) Fixes a conflict between the '[player skull](https://docs.skriptlang.org/docs.html?search=#ExprSkull)' expression and the '[head location](https://docs.skriptlang.org/docs.html?search=#ExprEyeLocation)' expression. Note that `head` has been removed as an option for the `player skull` expression. - [#&#8203;7909](https://github.com/SkriptLang/Skript/issues/7909) Significantly expands (and reworked to some extent) the Keyed Expression API. For more information about the changes, review the pull request's description. - [#&#8203;7918](https://github.com/SkriptLang/Skript/issues/7918) Adds a Javadoc description for the `Type` generic parameter in the `AnyContains` interface. - [#&#8203;7927](https://github.com/SkriptLang/Skript/issues/7927) Adds a getter method for the expression used in `PropertyCondition`. - [#&#8203;7929](https://github.com/SkriptLang/Skript/issues/7929) Implements preInit() for Effect, Condition, and Section, allowing runtime errors to be used more easily. Adds a `#isSectionOnly()` method in SectionExpression allowing the ability to check if it requires a Section. - [#&#8203;7971](https://github.com/SkriptLang/Skript/issues/7971) Improves documentation for EntityData. - [#&#8203;7972](https://github.com/SkriptLang/Skript/issues/7972) Switches entitydata age/plurality from parse marks to parse tags. - [#&#8203;7993](https://github.com/SkriptLang/Skript/issues/7993) Adds `SyntaxInfo` builder methods to the "property" type syntax classes, in favor of the existing `register` methods. - [#&#8203;8001](https://github.com/SkriptLang/Skript/issues/8001) Adds a default implementation for Expression#simplify(). [Click here to view the full list of commits made since 2.11.2](https://github.com/SkriptLang/Skript/compare/2.11.2...2.12.0-pre2) [Click here to view the full list of commits made since 2.12.0-pre1](https://github.com/SkriptLang/Skript/compare/2.12.0-pre1...2.12.0-pre2) ##### 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](https://github.com/SkriptLang/Skript/tree/2.12.0-pre1/src/main/resources/scripts/-examples/experimental%20features). <details> <summary>Click to reveal the experiments available in this release</summary> ##### For-Each Loop **Enable by adding `using for loops` to your script.** A new kind of loop syntax that stores the loop index and value in variables for convenience. This can be used to avoid confusion when nesting multiple loops inside each other. ```applescript= for {_index}, {_value} in {my list::*}: broadcast "%{_index}%: %{_value}%" ``` ```applescript= for each {_player} in all players: send "Hello %{_player}%!" to {_player} ``` All existing loop features are also available in this section. ##### 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. ```applescript= 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 ``` ```applescript= 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: ```applescript 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: ```applescript {_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`. ```applescript 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) ``` ##### Damage Sources **Enable by adding `using damage sources` to your script.** > Note that `type` has been removed as an option for the '[damage cause](https://docs.skriptlang.org/docs.html?search=#ExprDamageCause)' expression as `damage cause` and `damage type` now refer to different things. Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more. Below is an example of what damaging using custom damage sources looks like: ```applescript damage all players by 5 using a custom damage source: set the damage type to magic set the causing entity to {_player} set the direct entity to {_arrow} set the damage location to location(0, 0, 10) ``` For more details about the syntax, visit [damage source](https://docs.skriptlang.org/docs.html?search=damage%20source) on our documentation website. </details> ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;Absolutionism](https://github.com/Absolutionism) - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;Asleeepp](https://github.com/Asleeepp) - [@&#8203;Burbulinis](https://github.com/Burbulinis) - [@&#8203;ChickChicky](https://github.com/ChickChicky) ⭐ First contribution! ⭐ - [@&#8203;Efnilite](https://github.com/Efnilite) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;Fusezion](https://github.com/Fusezion) - [@&#8203;LalitNarayanYadav](https://github.com/LalitNarayanYadav) ⭐ First contribution! ⭐ - [@&#8203;Moderocky](https://github.com/Moderocky) - [@&#8203;Mr-Errors](https://github.com/Mr-Errors) ⭐ First contribution! ⭐ - [@&#8203;nopeless](https://github.com/nopeless) - [@&#8203;OfficialDonut](https://github.com/OfficialDonut) - [@&#8203;Olyno](https://github.com/Olyno) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) - [@&#8203;TheMug06](https://github.com/TheMug06) - [@&#8203;TwistedWar3713](https://github.com/TwistedWar3713) ⭐ First contribution! ⭐ - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.12.0-pre2`](https://github.com/SkriptLang/Skript/releases/tag/2.12.0-pre2): Pre-Release 2.12.0-pre2 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.12.0-pre1...2.12.0-pre2) ##### Skript 2.12.0-pre2 Today, we are releasing Skript 2.12.0-pre2. This pre-release includes additional bug fixes, including some for issues that were reported with the first pre-release. Skript 2.12 includes dozens of new features and bug fixes, along with early support for 1.21.6/7. Below, you can familiarize yourself with the changes. Additionally, [by clicking here](https://docs.skriptlang.org/docs.html?isNew), you can view the list of new syntax on our documentation site. As always, report any issues to our [issues page](https://github.com/SkriptLang/Skript/issues)! Per our [release model](https://stable.skriptlang.org/clockwork-release-model), we plan to release 2.12.0 on July 15th. We may release additional pre-releases before then should the need arise. We would also like to welcome a new addition to the team, [@&#8203;Absolutionism](https://github.com/Absolutionism)! Happy Skripting! ##### Changes to Supported Versions and Platforms Back in 2.10, we switched to supporting the last three major versions. While reasonable at the time, Mojang has continued to make significant changes between minor versions and seems to have shyed away from incrementing the major version counter. In order to reduce the development burden of supporting so many versions with different features, **as of 2.13** (next release) **we have decided to switch to supporting the last 18 months of Minecraft releases**. This means as of 2.13, Skript will support 1.20.4 and newer. 2.14 will be 1.21.0 and newer. We hope this change will allow us to modernize Skript more quickly and more fully support new systems like item components going forward. To clarify, **2.12 still supports 1.19.4+**. These changes will affect 2.13 and later. In the same vein, Paper has recently completed its fork away from Spigot. We have aimed to maintain support for both versions so far, but we are running into issues where the API differences between Paper and Spigot are becoming too great. It is not feasible for us to develop two parallel versions of Skript, and as a result, **we will be dropping support for Spigot starting with 2.13**. We encourage the small portion of our users who are still using Spigot to upgrade to Paper if possible. ##### Major Changes ##### Ephemeral Variables Ephemeral variables (or ram vars, or memory vars) are now fully implemented by default for all users. These are global variables that are not saved between restarts. To make a variable ephemeral, add a hyphen (`-`) to the start of its name: `{-var}`. These variables are about 2.5x faster to change compared to normal global variables. You do not need to do anything to enable them. ##### Function Overloading > \[!NOTE] > The `script reflection` experiment, which includes syntax for dynamically referencing and executing functions, does not yet support working with overloaded functions. Function overloading enables creating functions that have the same name but different parameters types/parameter counts. ```applescript function send_welcome(p: player): send_welcome({_p}, false) function send_welcome(p: player, first_time: boolean): if {_first_time} is true: send "Welcome to our server for the first time, %name of {_p}%!" to {_p} else: send "Welcome back to our server, %name of {_p}%!" to {_p} ``` ##### Local Variable Type Hints (Experimental) > \[!NOTE] > This feature is currently experimental and can be used by [enabling](https://docs.skriptlang.org/docs.html?search=#StructUsing) the `type hints` experiment. Local variable type hints enable Skript to understand what kind of values your local variables will hold at parse time. Consider the following example: ```applescript 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: ```applescript {_var} # can use type hints {_var::%player's name%} # can't use type hints ``` ##### Runtime Error Catching (Experimental) > \[!NOTE] > This feature is currently experimental and can be used by [enabling](https://docs.skriptlang.org/docs.html?search=#StructUsing) the `error catching` experiment. 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`. ```applescript 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) ``` ##### Damage Sources (Experimental) > \[!NOTE] > This feature is currently experimental and can be used by [enabling](https://docs.skriptlang.org/docs.html?search=#StructUsing) the `damage sources` experiment. > \[!CAUTION] > Note that `type` has been removed as an option for the '[damage cause](https://docs.skriptlang.org/docs.html?search=#ExprDamageCause)' expression as `damage cause` and `damage type` now refer to different things. Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more. Below is an example of what damaging using custom damage sources looks like: ```applescript damage all players by 5 using a custom damage source: set the damage type to magic set the causing entity to {_player} set the direct entity to {_arrow} set the damage location to location(0, 0, 10) ``` For more details about the syntax, visit [damage source](https://docs.skriptlang.org/docs.html?search=damage%20source) on our documentation website. ##### Contributing Updates We are now allowing contributors to release their code contributions under the more-permissive MIT License. For more information, please review our [LICENSING.md](https://github.com/SkriptLang/Skript/blob/master/LICENSING.md) file. ##### ⚠ Breaking Changes - When using `index of "a" in "b"`, values that do not appear in the second string will now return `none` instead of the previous `-1`. - The `is enchanted with` condition now looks for exact levels instead of the specified level or better. Old behavior can be replicated with `if {_item} is enchanted with sharpness 2 or better`. Some examples: ```applescript if {_item} is enchanted with sharpness 2 # only passes for sharpness 2. Previous behavior allowed sharpness of 2 or greater to pass. if {_item} is enchanted with sharpness 2 or better # sharpness 2+ if {_item} is enchanted with sharpness 2 or worse # sharpness 2 or 1 if {_item} is enchanted with sharpness # sharpness of any level ``` - An [infinite timespan literal](https://docs.skriptlang.org/docs.html#LitEternity) was added, meaning Timespan math operations can now result in an infinite timespan value (just like numbers). - The parsing behavior of the '[amount](https://docs.skriptlang.org/docs.html?search=#ExprAmount)' expression has changed. Given an expression like `amount of {a::*}, "b"`, it was before parsed as `(amount of {a::*}), "b"`, but it is now parsed as `amount of ({a::*}, "b")`. Use parentheses as necessary to clarify your intent. - For the old '[beacon values](https://docs.skriptlang.org/archives/2.11.2/docs.html#ExprBeaconValues)' expression, `beacon` is now a required keyword for the `range` and `tier` expressions. - The `remove all` changer for the '[custom model data](https://docs.skriptlang.org/docs.html?search=#ExprCustomModelData)' expression has been removed. It functioned the same as `remove`. - `head` has been removed as an option for the '[player skull](https://docs.skriptlang.org/docs.html?search=#ExprSkull)' expression as `head of player` conflicts with the '[head location](https://docs.skriptlang.org/docs.html?search=#ExprEyeLocation)' expression. - `type` has been removed as an option for the '[damage cause](https://docs.skriptlang.org/docs.html?search=#ExprDamageCause)' expression as `damage cause` and `damage type` now refer to different things. - The '[load world](https://docs.skriptlang.org/docs.html?search=#EffWorldLoad)' effect now requires `world`. - The API method `RegistryParser#getAllNames` has been removed in favor of `RegistryParser#getCombinedPatterns` (from the `PatternedParser` interface). - API methods for the `since` documentation field have changed on SkriptEventInfo: - `SkriptEventInfo#getSince() (String) -> SkriptEventInfo#getSince() (String[])` - `BukkitSyntaxInfos.Event.since() (String) -> BukkitSyntaxInfos.Event.since() (Collection<String>)` - `BukkitSyntaxInfos.Event.Builder.since(String) -> BukkitSyntaxInfos.Event.Builder.addSince(String)` - (API) Syntax ordering is no longer based on registration order when a priority is shared. This may expose syntax conflicts if this behavior was depended on. ##### Changelog ##### Pre-Release 2 Changes - [#&#8203;7943](https://github.com/SkriptLang/Skript/issues/7943) Fixes numerous issues with the '[gamerule value](https://docs.skriptlang.org/docs.html?search=#ExprGameRule)' expression. - [#&#8203;7992](https://github.com/SkriptLang/Skript/issues/7992) Fixes an issue where some examples diplayed incorrectly on the documentation site. - [#&#8203;7993](https://github.com/SkriptLang/Skript/issues/7993) Adds `SyntaxInfo` builder methods to the "property" type syntax classes, in favor of the existing `register` methods. - [#&#8203;7996](https://github.com/SkriptLang/Skript/issues/7996) Fixes an error that would occur when using experimental syntax in effect commands. - [#&#8203;7997](https://github.com/SkriptLang/Skript/issues/7997) Fixes an issue where the '[indices of value](https://docs.skriptlang.org/docs.html?search=#ExprIndicesOfValue)' expression failed to respect the case sensitivity configuration option. - [#&#8203;7998](https://github.com/SkriptLang/Skript/issues/7998) Fixes an issue where the '[inventory holder/viewers/rows/slots](https://docs.skriptlang.org/docs.html?search=#ExprInventoryInfo)' expression could cause an exception when used with other syntax. - [#&#8203;7999](https://github.com/SkriptLang/Skript/issues/7999) Fixes an issue where getting the entities in a chunk failed. - [#&#8203;8001](https://github.com/SkriptLang/Skript/issues/8001) Adds a default implementation for `Expression#simplify()`. - [#&#8203;8005](https://github.com/SkriptLang/Skript/issues/8005) Fixes ephemeral variables still being saved on server shutdown. - [#&#8203;8006](https://github.com/SkriptLang/Skript/issues/8006) Fixes a syntax conflict between the '[blocks](https://docs.skriptlang.org/docs.html?search=#ExprBlocks)' expression and the '[value within](https://docs.skriptlang.org/docs.html?search=#ExprValueWithin)' exression. - [#&#8203;8012](https://github.com/SkriptLang/Skript/issues/8012) Fixes an issue where `pig` entity data could not be saved in a variable. ##### Additions - [#&#8203;4154](https://github.com/SkriptLang/Skript/issues/4154) Adds support for boolean values to the '[toggle](https://docs.skriptlang.org/docs.html?search=#EffToggle)' effect and an '[inverse boolean](https://docs.skriptlang.org/docs.html?search=#ExprInverse)' expression to obtain the inverse of a boolean (at long last). - [#&#8203;6902](https://github.com/SkriptLang/Skript/issues/6902) Adds a '[buried item](https://docs.skriptlang.org/docs.html?search=#ExprBrushableItem)' expression and a '[dusted stage](https://docs.skriptlang.org/docs.html?search=#ExprDustedStage)' expression for working with brushable blocks. - [#&#8203;7495](https://github.com/SkriptLang/Skript/issues/7495) Adds ephemeral variables (starting with `-`) which are cleared when the server restarts. - [#&#8203;7561](https://github.com/SkriptLang/Skript/issues/7561) Adds an '[except](https://docs.skriptlang.org/docs.html?search=#ExprExcept)' expression which provides a simple way to filter values from a list. - [#&#8203;7658](https://github.com/SkriptLang/Skript/issues/7658) Adds an '[On-screen kick message](https://docs.skriptlang.org/docs.html?search=#ExprOnScreenKickMessage)' expression to get and change the on-screen message that appears when a user is kicked, usable in the kick event. - [#&#8203;7685](https://github.com/SkriptLang/Skript/issues/7685) Adds support for the Catalan language (thanks to [@&#8203;TwistedWar3713](https://github.com/TwistedWar3713), [@&#8203;Lukarius11](https://github.com/Lukarius11), and [@&#8203;ItzDuck364](https://github.com/ItzDuck364) for their language insights). - [#&#8203;7707](https://github.com/SkriptLang/Skript/issues/7707) Adds support for the '[item cooldown](https://docs.skriptlang.org/docs.html?search=item%20cooldown)' syntax to respect cooldown groups (cooldown components) defined on items. - [#&#8203;7738](https://github.com/SkriptLang/Skript/issues/7738) Adds an '[exact item](https://docs.skriptlang.org/docs.html?search=#ExprExactItem)' expression that acts like creative-mode middle-click, copying the block's data exactly. - [#&#8203;7745](https://github.com/SkriptLang/Skript/issues/7745) Adds a '[vault display item](https://docs.skriptlang.org/docs.html?search=#vault_display_item)' event for when a trial vault displays an item. - [#&#8203;7746](https://github.com/SkriptLang/Skript/issues/7746) Adds a '[villager career change](https://docs.skriptlang.org/docs.html?search=#villager_career_change)' event for when villagers change professions along with the ability to obtain the reason why. - [#&#8203;7748](https://github.com/SkriptLang/Skript/issues/7748) Adds a [condition](https://docs.skriptlang.org/docs.html?search=#CondStriderIsShivering) and [effect](https://docs.skriptlang.org/docs.html?search=#EffStriderShivering) for working with shivering striders. - [#&#8203;7751](https://github.com/SkriptLang/Skript/issues/7751) Adds support for function overloading, enabling functions to have the same name but different parameters. - [#&#8203;7803](https://github.com/SkriptLang/Skript/issues/7803) Adds the word `along` as an option in the '[push](https://docs.skriptlang.org/docs.html?search=#EffPush)' effect: `push player along vector(1,1,1) at speed 3`. - [#&#8203;7807](https://github.com/SkriptLang/Skript/issues/7807) Adds support for using the expanded custom model data system to the '[custom model data](https://docs.skriptlang.org/docs.html?search=#ExprCustomModelData)' expression. Note that `remove all` changer support has been removed. - [#&#8203;7808](https://github.com/SkriptLang/Skript/issues/7808) Adds a warning for ambiguous command arguments where expressions like `arg-1` could be misinterpreted as `(arg) - 1`. - [#&#8203;7823](https://github.com/SkriptLang/Skript/issues/7823) Adds experimental syntax for catching and suppressing runtime errors. See the available experiments section below for more information. - [#&#8203;7830](https://github.com/SkriptLang/Skript/issues/7830) Adds support for printing errors to the '[enable/disable/unload/reload script](https://docs.skriptlang.org/docs.html?search=#EffScriptFile)' effect. - [#&#8203;7841](https://github.com/SkriptLang/Skript/issues/7841) Adds support for syntax simplification, which enables parse time pre-computation of some syntax that will always have the same result. - [#&#8203;7846](https://github.com/SkriptLang/Skript/issues/7846) Adds support for the new 1.21.5 [pig variants](https://minecraft.wiki/w/Pig#Variants). - [#&#8203;7851](https://github.com/SkriptLang/Skript/issues/7851) Adds a warning for when literals that can be interpeted as multiple types are used and Skript cannot determine the intended type. - [#&#8203;7858](https://github.com/SkriptLang/Skript/issues/7858) Adds error messages for experimental syntax that is used when the experiment is disabled. - [#&#8203;7866](https://github.com/SkriptLang/Skript/issues/7866) Adds support for [cow variants](https://minecraft.wiki/w/Cow#Variants). - [#&#8203;7868](https://github.com/SkriptLang/Skript/issues/7868) Adds support for [chicken variants](https://minecraft.wiki/w/Chicken#Variants). - [#&#8203;7892](https://github.com/SkriptLang/Skript/issues/7892) Adds experimental support for local variable type hints. This allows Skript to determine what kind of values your local variables may hold at parse time. See the available experiments section below for more information. - [#&#8203;7897](https://github.com/SkriptLang/Skript/issues/7897) Expands the '[arrow attached block](https://docs.skriptlang.org/docs.html?search=#ExprAttachedBlock)' expression to support multiple blocks, as arrows may be attached to multiple blocks. The existing single expression has been deprecated on versions where the plural expression is available, as it is unreliable. - [#&#8203;7903](https://github.com/SkriptLang/Skript/issues/7903) Adds a '[harvest block](https://docs.skriptlang.org/docs.html?search=#harvest_block)' event for when a block is harvested (berry bushes, glowberries, etc.). - [#&#8203;7905](https://github.com/SkriptLang/Skript/issues/7905) Adds a new `event-entity type` event value for entity related events. - [#&#8203;7906](https://github.com/SkriptLang/Skript/issues/7906) Adds saddle and dynamic equipment slot support to the '[armor slot](https://docs.skriptlang.org/docs.html?search=#ExprArmorSlot)' expression. - [#&#8203;7909](https://github.com/SkriptLang/Skript/issues/7909) Adds a '[keyed](https://docs.skriptlang.org/docs.html?search=#ExprKeyed)' expression which allows explicitly passing/including the keys of an expression alongside its values. For example, you can preserve/include keys (indices) when setting a list variable to another list variable or when providing a list variable as the argument of a function. - [#&#8203;7914](https://github.com/SkriptLang/Skript/issues/7914) Adds a '[first empty slot in inventory](https://docs.skriptlang.org/docs.html?search=#ExprFirstEmptySlot)' expression to obtain the first empty slot in inventories. - [#&#8203;7933](https://github.com/SkriptLang/Skript/issues/7933) Adds scientific notation (e.g. `1.23E4`, `10e-10`) to numbers. - [#&#8203;7942](https://github.com/SkriptLang/Skript/issues/7942) Function names can now start with an underscore. - [#&#8203;7949](https://github.com/SkriptLang/Skript/issues/7949) Adds support for resetting sent block changes from the '[send block change](https://docs.skriptlang.org/docs.html?search=#EffSendBlockChange)' effect. - [#&#8203;7950](https://github.com/SkriptLang/Skript/issues/7950) Adds support to the '[push](https://docs.skriptlang.org/docs.html?search=#EffPush)' effect for pushing/pulling entitites towards/away from a location. - [#&#8203;7951](https://github.com/SkriptLang/Skript/issues/7951) Adds support for deleting the '[spawner type](https://docs.skriptlang.org/docs.html?search=#ExprSpawnerType)' of a spawner. - [#&#8203;7956](https://github.com/SkriptLang/Skript/issues/7956) Adds support for an '[infinite](https://docs.skriptlang.org/docs.html#LitEternity)' timespan. Note that now, just like numbers, math operations for Timespans can now result in an infinite timespan value. - [#&#8203;7957](https://github.com/SkriptLang/Skript/issues/7957)/[#&#8203;7982](https://github.com/SkriptLang/Skript/issues/7982)/[#&#8203;7983](https://github.com/SkriptLang/Skript/issues/7983) Implement early support for 1.21.6/7. - [#&#8203;7961](https://github.com/SkriptLang/Skript/issues/7961) Adds support for literals in the '[amount](https://docs.skriptlang.org/docs.html?search=#ExprAmount)' expression. Note that, as a result, the parsing behavior has now changed. Given an expression like `amount of {a::*}, "b"`, it was before parsed as `(amount of {a::*}), "b"`, but it is now parsed as `amount of ({a::*}, "b")`. Use parentheses as necessary to clarify your intent. ##### Changes - [#&#8203;7325](https://github.com/SkriptLang/Skript/issues/7325) Improves the '[indices of value](https://docs.skriptlang.org/docs.html?search=#ExprIndicesOfValue)' expression to allow accessing the index/position of a specific value in a list. Note that values that are not found in a list or a string now return `none` instead of `-1`. - [#&#8203;7729](https://github.com/SkriptLang/Skript/issues/7729) Splits the '[beacon values](https://docs.skriptlang.org/archives/2.11.2/docs.html#ExprBeaconValues)' expression into multiple new expressions: '[beacon effects](https://docs.skriptlang.org/docs.html?search=#ExprBeaconEffects)', '[beacon range](https://docs.skriptlang.org/docs.html?search=#ExprBeaconRange)', and '[beacon tier](https://docs.skriptlang.org/docs.html?search=#ExprBeaconTier)'. Note that the `range` and `tier` expressions now require `beacon` in their syntax. - [#&#8203;7742](https://github.com/SkriptLang/Skript/issues/7742) Cleans up the '[hash](https://docs.skriptlang.org/docs.html?search=#ExprHash)' expression and adds SHA-384 and SHA-512. A warning is now printed when using the MD5 algorithm. - [#&#8203;7816](https://github.com/SkriptLang/Skript/issues/7816) The '[is enchanted](https://docs.skriptlang.org/docs.html?search=#CondIsEnchanted)' condition now looks for exact enchantments, with `or better` and `or worse` added as newly available comparison options. - [#&#8203;7840](https://github.com/SkriptLang/Skript/issues/7840) Improves the existing comparisons for offline players and offline players-strings. - [#&#8203;7913](https://github.com/SkriptLang/Skript/issues/7913) The `aliases` folder will now be created automatically so that users know where to place custom aliases. - [#&#8203;7944](https://github.com/SkriptLang/Skript/issues/7944) Tweaks the '[target entity](https://docs.skriptlang.org/docs.html?search=#ExprTarget)' expression to make the ray size option more grammatically correct. - [#&#8203;7965](https://github.com/SkriptLang/Skript/issues/7965) Splits the 'special number' expression into multiple literal expressions: '[infinity](https://docs.skriptlang.org/docs.html?search=#LitInfinity)', '[NaN](https://docs.skriptlang.org/docs.html?search=#LitNaN)', and '[negative infinity](https://docs.skriptlang.org/docs.html?search=#LitNegativeInfinity)' ##### Bug Fixes - [#&#8203;7654](https://github.com/SkriptLang/Skript/issues/7654) Fixes Skript's documentation using incorrect pages and formatting. - [#&#8203;7674](https://github.com/SkriptLang/Skript/issues/7674) Fixes an issue where the `event-item` in a '[craft](https://docs.skriptlang.org/docs.html?search=#craft)' event often returned `air` due to the recipe being complex. - [#&#8203;7879](https://github.com/SkriptLang/Skript/issues/7879) Fixes an issue where syntax removals using the new Registration API often failed. - [#&#8203;7917](https://github.com/SkriptLang/Skript/issues/7917) Fixes an issue where the `raid omen` effect was incorrectly given the alias `bad omen`. - [#&#8203;7928](https://github.com/SkriptLang/Skript/issues/7928) Fixes an issue where sorting lists with duplicate values returned a list with only a single instance of that value. - [#&#8203;7935](https://github.com/SkriptLang/Skript/issues/7935) Fixes incorrect documentation for the '[expand/shrink world border](https://docs.skriptlang.org/docs.html?search=#EffWorldBorderExpand)' effect. - [#&#8203;7938](https://github.com/SkriptLang/Skript/issues/7938) Fixes an issue where using the '[name](https://docs.skriptlang.org/docs.html?search=#ExprName)' expression with [default variables](https://docs.skriptlang.org/docs.html?search=#StructVariables) could cause an exception. - [#&#8203;7943](https://github.com/SkriptLang/Skript/issues/7943) Fixes numerous issues with the '[gamerule value](https://docs.skriptlang.org/docs.html?search=#ExprGameRule)' expression. - [#&#8203;7945](https://github.com/SkriptLang/Skript/issues/7945) Fixes a bug where the '[is within](https://docs.skriptlang.org/docs.html?search=#CondIsWithin)' condition incorrectly handled `or` lists. - [#&#8203;7947](https://github.com/SkriptLang/Skript/issues/7947) Fixes comparisons between enchantments and enchantment types: `if sharpness 1, efficiency 3, and knockback 2 contains sharpness`. - [#&#8203;7951](https://github.com/SkriptLang/Skript/issues/7951) Fixes multiple issues with using and comparing against llamas/trader llamas. - [#&#8203;7964](https://github.com/SkriptLang/Skript/issues/7964) Fixes an issue with setting variables during script loading when asynchronous loading is enabled. - [#&#8203;7971](https://github.com/SkriptLang/Skript/issues/7971) Fixes some issues with comparing [pig variants](https://minecraft.wiki/w/Pig#Variants) and that variants could not be used with baby pigs. - [#&#8203;7976](https://github.com/SkriptLang/Skript/issues/7976) Fixes an issue where [arithmetic syntax](https://docs.skriptlang.org/docs.html?search=#ExprArithmetic) could fail to resolve valid operations. - [#&#8203;7986](https://github.com/SkriptLang/Skript/issues/7986) Fixes an issue on newer versions where adding items to an inventory could result in other slots being mistakenly deleted. - [#&#8203;7989](https://github.com/SkriptLang/Skript/issues/7989) Fixes an issue where `next`/`previous` '[loop-value](https://docs.skriptlang.org/docs.html?search=#ExprLoopValue)' could fail to reset in-between loops. - [#&#8203;7998](https://github.com/SkriptLang/Skript/issues/7998) Fixes an issue where the '[inventory holder/viewers/rows/slots](https://docs.skriptlang.org/docs.html?search=#ExprInventoryInfo)' expression could cause an exception when used with other syntax. - [#&#8203;7999](https://github.com/SkriptLang/Skript/issues/7999) Fixes an issue where getting the entities in a chunk failed. - [#&#8203;8005](https://github.com/SkriptLang/Skript/issues/8005) Fixes ephemeral variables still being saved on server shutdown. - [#&#8203;8012](https://github.com/SkriptLang/Skript/issues/8012) Fixes an issue where `pig` entity data could not be saved in a variable. ##### API Changes - [#&#8203;7256](https://github.com/SkriptLang/Skript/issues/7256) Adds API to allow the setting of custom default values for types. - [#&#8203;7551](https://github.com/SkriptLang/Skript/issues/7551) Integrates the [Registration API](https://github.com/SkriptLang/Skript/pull/6246) into SkriptParser and syntax class parse methods. Addons using SkriptParser methods directly *may* need to be recompiled, though there should be no breaking changes. - [#&#8203;7709](https://github.com/SkriptLang/Skript/issues/7709) Updates SkriptEventInfo (and its Registration API equivalent) to support passing an array for the `since` documentation field. Some methods have had their signatures changed and addons using them will need to be updated. - [#&#8203;7710](https://github.com/SkriptLang/Skript/issues/7710) Cleanup to the ExprTool class and EquipmentSlot conversion methods for BukkitUtils. - [#&#8203;7778](https://github.com/SkriptLang/Skript/issues/7778) Adds a preInit() method intended to help with doing common init work for families of syntaxes, rather than having to hijack init() and create a different signature for the children to implement. - [#&#8203;7791](https://github.com/SkriptLang/Skript/issues/7791) Adds a spawnTestEntity helper method for JUnit tests. - [#&#8203;7832](https://github.com/SkriptLang/Skript/issues/7832) Removes many unnecessary version checks for versions Skript no longer supports. - [#&#8203;7841](https://github.com/SkriptLang/Skript/issues/7841) The syntax simplification API is now used by the parser. For more information, review the pull request's description. - [#&#8203;7851](https://github.com/SkriptLang/Skript/issues/7851) Adds a [PatternedParser](https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/classes/PatternedParser.java) utility interface and replaces the `RegistryParser#getAllNames` method with `RegistryParser#getCombinedPatterns` (from the `PatternedParser` interface). - [#&#8203;7858](https://github.com/SkriptLang/Skript/issues/7858) Adds ExperimentData utility class and SimpleExperimentalSyntax utility interface to simplify the work needed by syntax to restrict based on the set experiments. - [#&#8203;7879](https://github.com/SkriptLang/Skript/issues/7879) Registered syntax are no longer ordered by when they were registered. Priorities should be used if precise registration order is required. - [#&#8203;7891](https://github.com/SkriptLang/Skript/issues/7891) Improves the return types for many expressions via `Expression#possibleReturnTypes()` and `Expression#canReturn()`. - [#&#8203;7892](https://github.com/SkriptLang/Skript/issues/7892) Adds experimental support for local variable type hints. If you have syntax that modifies variables (and may result in their type being changed), you you may need to support this feature. For more information, review the pull request's description (see "API Support"). - [#&#8203;7904](https://github.com/SkriptLang/Skript/issues/7904) Fixes a conflict between the '[player skull](https://docs.skriptlang.org/docs.html?search=#ExprSkull)' expression and the '[head location](https://docs.skriptlang.org/docs.html?search=#ExprEyeLocation)' expression. Note that `head` has been removed as an option for the `player skull` expression. - [#&#8203;7909](https://github.com/SkriptLang/Skript/issues/7909) Significantly expands (and reworked to some extent) the Keyed Expression API. For more information about the changes, review the pull request's description. - [#&#8203;7918](https://github.com/SkriptLang/Skript/issues/7918) Adds a Javadoc description for the `Type` generic parameter in the `AnyContains` interface. - [#&#8203;7927](https://github.com/SkriptLang/Skript/issues/7927) Adds a getter method for the expression used in `PropertyCondition`. - [#&#8203;7929](https://github.com/SkriptLang/Skript/issues/7929) Implements preInit() for Effect, Condition, and Section, allowing runtime errors to be used more easily. Adds a `#isSectionOnly()` method in SectionExpression allowing the ability to check if it requires a Section. - [#&#8203;7971](https://github.com/SkriptLang/Skript/issues/7971) Improves documentation for EntityData. - [#&#8203;7972](https://github.com/SkriptLang/Skript/issues/7972) Switches entitydata age/plurality from parse marks to parse tags. - [#&#8203;7993](https://github.com/SkriptLang/Skript/issues/7993) Adds `SyntaxInfo` builder methods to the "property" type syntax classes, in favor of the existing `register` methods. - [#&#8203;8001](https://github.com/SkriptLang/Skript/issues/8001) Adds a default implementation for Expression#simplify(). [Click here to view the full list of commits made since 2.11.2](https://github.com/SkriptLang/Skript/compare/2.11.2...2.12.0-pre2) [Click here to view the full list of commits made since 2.12.0-pre1](https://github.com/SkriptLang/Skript/compare/2.12.0-pre1...2.12.0-pre2) ##### 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](https://github.com/SkriptLang/Skript/tree/2.12.0-pre1/src/main/resources/scripts/-examples/experimental%20features). <details> <summary>Click to reveal the experiments available in this release</summary> ##### For-Each Loop **Enable by adding `using for loops` to your script.** A new kind of loop syntax that stores the loop index and value in variables for convenience. This can be used to avoid confusion when nesting multiple loops inside each other. ```applescript= for {_index}, {_value} in {my list::*}: broadcast "%{_index}%: %{_value}%" ``` ```applescript= for each {_player} in all players: send "Hello %{_player}%!" to {_player} ``` All existing loop features are also available in this section. ##### 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. ```applescript= 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 ``` ```applescript= 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: ```applescript 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: ```applescript {_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`. ```applescript 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) ``` ##### Damage Sources **Enable by adding `using damage sources` to your script.** > Note that `type` has been removed as an option for the '[damage cause](https://docs.skriptlang.org/docs.html?search=#ExprDamageCause)' expression as `damage cause` and `damage type` now refer to different things. Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more. Below is an example of what damaging using custom damage sources looks like: ```applescript damage all players by 5 using a custom damage source: set the damage type to magic set the causing entity to {_player} set the direct entity to {_arrow} set the damage location to location(0, 0, 10) ``` For more details about the syntax, visit [damage source](https://docs.skriptlang.org/docs.html?search=damage%20source) on our documentation website. </details> ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;Absolutionism](https://github.com/Absolutionism) - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;Asleeepp](https://github.com/Asleeepp) - [@&#8203;Burbulinis](https://github.com/Burbulinis) - [@&#8203;ChickChicky](https://github.com/ChickChicky) ⭐ First contribution! ⭐ - [@&#8203;Efnilite](https://github.com/Efnilite) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;Fusezion](https://github.com/Fusezion) - [@&#8203;LalitNarayanYadav](https://github.com/LalitNarayanYadav) ⭐ First contribution! ⭐ - [@&#8203;Moderocky](https://github.com/Moderocky) - [@&#8203;Mr-Errors](https://github.com/Mr-Errors) ⭐ First contribution! ⭐ - [@&#8203;nopeless](https://github.com/nopeless) - [@&#8203;OfficialDonut](https://github.com/OfficialDonut) - [@&#8203;Olyno](https://github.com/Olyno) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) - [@&#8203;TheMug06](https://github.com/TheMug06) - [@&#8203;TwistedWar3713](https://github.com/TwistedWar3713) ⭐ First contribution! ⭐ - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.12.0-pre1`](https://github.com/SkriptLang/Skript/releases/tag/2.12.0-pre1): Pre-Release 2.12.0-pre1 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.11.2...2.12.0-pre1) ##### Skript 2.12.0-pre1 Today, we are excited to celebrate the beginning of the second half of the year with a new Skript pre-release! Skript 2.12.0-pre1 is now available! This release includes dozens of new features and bug fixes, along with early support for 1.21.6/7. Below, you can familiarize yourself with the changes. Additionally, [by clicking here](https://docs.skriptlang.org/docs.html?isNew), you can view the list of new syntax on our documentation site. As always, report any issues to our [issues page](https://github.com/SkriptLang/Skript/issues)! Per our [release model](https://stable.skriptlang.org/clockwork-release-model), we plan to release 2.12.0 on July 15th. We may release additional pre-releases before then should the need arise. We would also like to welcome a new addition to the team, [@&#8203;Absolutionism](https://github.com/Absolutionism)! Happy Skripting! ##### Major Changes ##### Ephemeral Variables Ephemeral variables (or ram vars, or memory vars) are now fully implemented by default for all users. These are global variables that are not saved between restarts. To make a variable ephemeral, add a hyphen (`-`) to the start of its name: `{-var}`. These variables are about 2.5x faster to change compared to normal global variables. You do not need to do anything to enable them. ##### Function Overloading > \[!NOTE] > The `script reflection` experiment, which includes syntax for dynamically referencing and executing functions, does not yet support working with overloaded functions. Function overloading enables creating functions that have the same name but different parameters types/parameter counts. ```applescript function send_welcome(p: player): send_welcome({_p}, false) function send_welcome(p: player, first_time: boolean): if {_first_time} is true: send "Welcome to our server for the first time, %name of {_p}%!" to {_p} else: send "Welcome back to our server, %name of {_p}%!" to {_p} ``` ##### Local Variable Type Hints (Experimental) > \[!NOTE] > This feature is currently experimental and can be used by [enabling](https://docs.skriptlang.org/docs.html?search=#StructUsing) the `type hints` experiment. Local variable type hints enable Skript to understand what kind of values your local variables will hold at parse time. Consider the following example: ```applescript 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: ```applescript {_var} # can use type hints {_var::%player's name%} # can't use type hints ``` ##### Runtime Error Catching (Experimental) > \[!NOTE] > This feature is currently experimental and can be used by [enabling](https://docs.skriptlang.org/docs.html?search=#StructUsing) the `error catching` experiment. 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`. ```applescript 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) ``` ##### Damage Sources (Experimental) > \[!NOTE] > This feature is currently experimental and can be used by [enabling](https://docs.skriptlang.org/docs.html?search=#StructUsing) the `damage sources` experiment. > \[!CAUTION] > Note that `type` has been removed as an option for the '[damage cause](https://docs.skriptlang.org/docs.html?search=#ExprDamageCause)' expression as `damage cause` and `damage type` now refer to different things. Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more. Below is an example of what damaging using custom damage sources looks like: ```applescript damage all players by 5 using a custom damage source: set the damage type to magic set the causing entity to {_player} set the direct entity to {_arrow} set the damage location to location(0, 0, 10) ``` For more details about the syntax, visit [damage source](https://docs.skriptlang.org/docs.html?search=damage%20source) on our documentation website. ##### Contributing Updates We are now allowing contributors to release their code contributions under the more-permissive MIT License. For more information, please review our [LICENSING.md](https://github.com/SkriptLang/Skript/blob/master/LICENSING.md) file. ##### ⚠ Breaking Changes - When using `index of "a" in "b"`, values that do not appear in the second string will now return `none` instead of the previous `-1`. - The `is enchanted with` condition now looks for exact levels instead of the specified level or better. Old behavior can be replicated with `if {_item} is enchanted with sharpness 2 or better`. Some examples: ```applescript if {_item} is enchanted with sharpness 2 # only passes for sharpness 2. Previous behavior allowed sharpness of 2 or greater to pass. if {_item} is enchanted with sharpness 2 or better # sharpness 2+ if {_item} is enchanted with sharpness 2 or worse # sharpness 2 or 1 if {_item} is enchanted with sharpness # sharpness of any level ``` - An [infinite timespan literal](https://docs.skriptlang.org/docs.html#LitEternity) was added, meaning Timespan math operations can now result in an infinite timespan value (just like numbers). - The parsing behavior of the '[amount](https://docs.skriptlang.org/docs.html?search=#ExprAmount)' expression has changed. Given an expression like `amount of {a::*}, "b"`, it was before parsed as `(amount of {a::*}), "b"`, but it is now parsed as `amount of ({a::*}, "b")`. Use parentheses as necessary to clarify your intent. - For the old '[beacon values](https://docs.skriptlang.org/archives/2.11.2/docs.html#ExprBeaconValues)' expression, `beacon` is now a required keyword for the `range` and `tier` expressions. - The `remove all` changer for the '[custom model data](https://docs.skriptlang.org/docs.html?search=#ExprCustomModelData)' expression has been removed. It functioned the same as `remove`. - `head` has been removed as an option for the '[player skull](https://docs.skriptlang.org/docs.html?search=#ExprSkull)' expression as `head of player` conflicts with the '[head location](https://docs.skriptlang.org/docs.html?search=#ExprEyeLocation)' expression. - `type` has been removed as an option for the '[damage cause](https://docs.skriptlang.org/docs.html?search=#ExprDamageCause)' expression as `damage cause` and `damage type` now refer to different things. - The '[load world](https://docs.skriptlang.org/docs.html?search=#EffWorldLoad)' effect now requires `world`. - The API method `RegistryParser#getAllNames` has been removed in favor of `RegistryParser#getCombinedPatterns` (from the `PatternedParser` interface). - API methods for the `since` documentation field have changed on SkriptEventInfo: - `SkriptEventInfo#getSince() (String) -> SkriptEventInfo#getSince() (String[])` - `BukkitSyntaxInfos.Event.since() (String) -> BukkitSyntaxInfos.Event.since() (Collection<String>)` - `BukkitSyntaxInfos.Event.Builder.since(String) -> BukkitSyntaxInfos.Event.Builder.addSince(String)` - (API) Syntax ordering is no longer based on registration order when a priority is shared. This may expose syntax conflicts if this behavior was depended on. ##### Changelog ##### Additions - [#&#8203;4154](https://github.com/SkriptLang/Skript/pull/4154) Adds support for boolean values to the '[toggle](https://docs.skriptlang.org/docs.html?search=#EffToggle)' effect and an '[inverse boolean](https://docs.skriptlang.org/docs.html?search=#ExprInverse)' expression to obtain the inverse of a boolean (at long last). - [#&#8203;6902](https://github.com/SkriptLang/Skript/pull/6902) Adds a '[buried item](https://docs.skriptlang.org/docs.html?search=#ExprBrushableItem)' expression and a '[dusted stage](https://docs.skriptlang.org/docs.html?search=#ExprDustedStage)' expression for working with brushable blocks. - [#&#8203;7495](https://github.com/SkriptLang/Skript/pull/7495) Adds ephemeral variables (starting with `-`) which are cleared when the server restarts. - [#&#8203;7561](https://github.com/SkriptLang/Skript/pull/7561) Adds an '[except](https://docs.skriptlang.org/docs.html?search=#ExprExcept)' expression which provides a simple way to filter values from a list. - [#&#8203;7658](https://github.com/SkriptLang/Skript/pull/7658) Adds an '[On-screen kick message](https://docs.skriptlang.org/docs.html?search=#ExprOnScreenKickMessage)' expression to get and change the on-screen message that appears when a user is kicked, usable in the kick event. - [#&#8203;7685](https://github.com/SkriptLang/Skript/pull/7685) Adds support for the Catalan language (thanks to [@&#8203;TwistedWar3713](https://github.com/TwistedWar3713), [@&#8203;Lukarius11](https://github.com/Lukarius11), and [@&#8203;ItzDuck364](https://github.com/ItzDuck364) for their language insights). - [#&#8203;7707](https://github.com/SkriptLang/Skript/pull/7707) Adds support for the '[item cooldown](https://docs.skriptlang.org/docs.html?search=item%20cooldown)' syntax to respect cooldown groups (cooldown components) defined on items. - [#&#8203;7738](https://github.com/SkriptLang/Skript/pull/7738) Adds an '[exact item](https://docs.skriptlang.org/docs.html?search=#ExprExactItem)' expression that acts like creative-mode middle-click, copying the block's data exactly. - [#&#8203;7745](https://github.com/SkriptLang/Skript/pull/7745) Adds a '[vault display item](https://docs.skriptlang.org/docs.html?search=#vault_display_item)' event for when a trial vault displays an item. - [#&#8203;7746](https://github.com/SkriptLang/Skript/pull/7746) Adds a '[villager career change](https://docs.skriptlang.org/docs.html?search=#villager_career_change)' event for when villagers change professions along with the ability to obtain the reason why. - [#&#8203;7748](https://github.com/SkriptLang/Skript/pull/7748) Adds a [condition](https://docs.skriptlang.org/docs.html?search=#CondStriderIsShivering) and [effect](https://docs.skriptlang.org/docs.html?search=#EffStriderShivering) for working with shivering striders. - [#&#8203;7751](https://github.com/SkriptLang/Skript/pull/7757) Adds support for function overloading, enabling functions to have the same name but different parameters. - [#&#8203;7803](https://github.com/SkriptLang/Skript/pull/7803) Adds the word `along` as an option in the '[push](https://docs.skriptlang.org/docs.html?search=#EffPush)' effect: `push player along vector(1,1,1) at speed 3`. - [#&#8203;7807](https://github.com/SkriptLang/Skript/pull/7807) Adds support for using the expanded custom model data system to the '[custom model data](https://docs.skriptlang.org/docs.html?search=#ExprCustomModelData)' expression. Note that `remove all` changer support has been removed. - [#&#8203;7808](https://github.com/SkriptLang/Skript/pull/7808) Adds a warning for ambiguous command arguments where expressions like `arg-1` could be misinterpreted as `(arg) - 1`. - [#&#8203;7823](https://github.com/SkriptLang/Skript/pull/7823) Adds experimental syntax for catching and suppressing runtime errors. See the available experiments section below for more information. - [#&#8203;7830](https://github.com/SkriptLang/Skript/pull/7830) Adds support for printing errors to the '[enable/disable/unload/reload script](https://docs.skriptlang.org/docs.html?search=#EffScriptFile)' effect. - [#&#8203;7841](https://github.com/SkriptLang/Skript/pull/7841) Adds support for syntax simplification, which enables parse time pre-computation of some syntax that will always have the same result. - [#&#8203;7846](https://github.com/SkriptLang/Skript/pull/7846) Adds support for the new 1.21.5 [pig variants](https://minecraft.wiki/w/Pig#Variants). - [#&#8203;7851](https://github.com/SkriptLang/Skript/pull/7851) Adds a warning for when literals that can be interpeted as multiple types are used and Skript cannot determine the intended type. - [#&#8203;7858](https://github.com/SkriptLang/Skript/pull/7858) Adds error messages for experimental syntax that is used when the experiment is disabled. - [#&#8203;7866](https://github.com/SkriptLang/Skript/pull/7866) Adds support for [cow variants](https://minecraft.wiki/w/Cow#Variants). - [#&#8203;7868](https://github.com/SkriptLang/Skript/pull/7868) Adds support for [chicken variants](https://minecraft.wiki/w/Chicken#Variants). - [#&#8203;7892](https://github.com/SkriptLang/Skript/pull/7892) Adds experimental support for local variable type hints. This allows Skript to determine what kind of values your local variables may hold at parse time. See the available experiments section below for more information. - [#&#8203;7897](https://github.com/SkriptLang/Skript/pull/7897) Expands the '[arrow attached block](https://docs.skriptlang.org/docs.html?search=#ExprAttachedBlock)' expression to support multiple blocks, as arrows may be attached to multiple blocks. The existing single expression has been deprecated on versions where the plural expression is available, as it is unreliable. - [#&#8203;7903](https://github.com/SkriptLang/Skript/pull/7903) Adds a '[harvest block](https://docs.skriptlang.org/docs.html?search=#harvest_block)' event for when a block is harvested (berry bushes, glowberries, etc.). - [#&#8203;7905](https://github.com/SkriptLang/Skript/pull/7905) Adds a new `event-entity type` event value for entity related events. - [#&#8203;7906](https://github.com/SkriptLang/Skript/pull/7906) Adds saddle and dynamic equipment slot support to the '[armor slot](https://docs.skriptlang.org/docs.html?search=#ExprArmorSlot)' expression. - [#&#8203;7909](https://github.com/SkriptLang/Skript/pull/7909) Adds a '[keyed](https://docs.skriptlang.org/docs.html?search=#ExprKeyed)' expression which allows explicitly passing/including the keys of an expression alongside its values. For example, you can preserve/include keys (indices) when setting a list variable to another list variable or when providing a list variable as the argument of a function. - [#&#8203;7914](https://github.com/SkriptLang/Skript/pull/7914) Adds a '[first empty slot in inventory](https://docs.skriptlang.org/docs.html?search=#ExprFirstEmptySlot)' expression to obtain the first empty slot in inventories. - [#&#8203;7933](https://github.com/SkriptLang/Skript/pull/7933) Adds scientific notation (e.g. `1.23E4`, `10e-10`) to numbers. - [#&#8203;7942](https://github.com/SkriptLang/Skript/pull/7942) Function names can now start with an underscore. - [#&#8203;7949](https://github.com/SkriptLang/Skript/pull/7949) Adds support for resetting sent block changes from the '[send block change](https://docs.skriptlang.org/docs.html?search=#EffSendBlockChange)' effect. - [#&#8203;7950](https://github.com/SkriptLang/Skript/pull/7950) Adds support to the '[push](https://docs.skriptlang.org/docs.html?search=#EffPush)' effect for pushing/pulling entitites towards/away from a location. - [#&#8203;7951](https://github.com/SkriptLang/Skript/pull/7951) Adds support for deleting the '[spawner type](https://docs.skriptlang.org/docs.html?search=#ExprSpawnerType)' of a spawner. - [#&#8203;7956](https://github.com/SkriptLang/Skript/pull/7956) Adds support for an '[infinite](https://docs.skriptlang.org/docs.html#LitEternity)' timespan. Note that now, just like numbers, math operations for Timespans can now result in an infinite timespan value. - [#&#8203;7957](https://github.com/SkriptLang/Skript/pull/7957)/[#&#8203;7982](https://github.com/SkriptLang/Skript/pull/7982)/[#&#8203;7983](https://github.com/SkriptLang/Skript/pull/7983) Implement early support for 1.21.6/7. - [#&#8203;7961](https://github.com/SkriptLang/Skript/pull/7961) Adds support for literals in the '[amount](https://docs.skriptlang.org/docs.html?search=#ExprAmount)' expression. Note that, as a result, the parsing behavior has now changed. Given an expression like `amount of {a::*}, "b"`, it was before parsed as `(amount of {a::*}), "b"`, but it is now parsed as `amount of ({a::*}, "b")`. Use parentheses as necessary to clarify your intent. ##### Changes - [#&#8203;7325](https://github.com/SkriptLang/Skript/pull/7323) Improves the '[indices of](https://docs.skriptlang.org/docs.html?search=#ExprIndicesOf)' expression to allow accessing the index/position of a specific value in a list. Note that values that are not found in a list or a string now return `none` instead of `-1`. - [#&#8203;7729](https://github.com/SkriptLang/Skript/pull/7729) Splits the '[beacon values](https://docs.skriptlang.org/archives/2.11.2/docs.html#ExprBeaconValues)' expression into multiple new expressions: '[beacon effects](https://docs.skriptlang.org/docs.html?search=#ExprBeaconEffects)', '[beacon range](https://docs.skriptlang.org/docs.html?search=#ExprBeaconRange)', and '[beacon tier](https://docs.skriptlang.org/docs.html?search=#ExprBeaconTier)'. Note that the `range` and `tier` expressions now require `beacon` in their syntax. - [#&#8203;7742](https://github.com/SkriptLang/Skript/pull/7742) Cleans up the '[hash](https://docs.skriptlang.org/docs.html?search=#ExprHash)' expression and adds SHA-384 and SHA-512. A warning is now printed when using the MD5 algorithm. - [#&#8203;7816](https://github.com/SkriptLang/Skript/pull/7816) The '[is enchanted](https://docs.skriptlang.org/docs.html?search=#CondIsEnchanted)' condition now looks for exact enchantments, with `or better` and `or worse` added as newly available comparison options. - [#&#8203;7840](https://github.com/SkriptLang/Skript/pull/7840) Improves the existing comparisons for offline players and offline players-strings. - [#&#8203;7913](https://github.com/SkriptLang/Skript/pull/7913) The `aliases` folder will now be created automatically so that users know where to place custom aliases. - [#&#8203;7944](https://github.com/SkriptLang/Skript/pull/7944) Tweaks the '[target entity](https://docs.skriptlang.org/docs.html?search=#ExprTarget)' expression to make the ray size option more grammatically correct. - [#&#8203;7965](https://github.com/SkriptLang/Skript/pull/7965) Splits the 'special number' expression into multiple literal expressions: '[infinity](https://docs.skriptlang.org/docs.html?search=#LitInfinity)', '[NaN](https://docs.skriptlang.org/docs.html?search=#LitNaN)', and '[negative infinity](https://docs.skriptlang.org/docs.html?search=#LitNegativeInfinity)' ##### Bug Fixes - [#&#8203;7654](https://github.com/SkriptLang/Skript/pull/7654) Fixes Skript's documentation using incorrect pages and formatting. - [#&#8203;7674](https://github.com/SkriptLang/Skript/pull/7674) Fixes an issue where the `event-item` in a '[craft](https://docs.skriptlang.org/docs.html?search=#craft)' event often returned `air` due to the recipe being complex. - [#&#8203;7879](https://github.com/SkriptLang/Skript/pull/7879) Fixes an issue where syntax removals using the new Registration API often failed. - [#&#8203;7917](https://github.com/SkriptLang/Skript/pull/7917) Fixes an issue where the `raid omen` effect was incorrectly given the alias `bad omen`. - [#&#8203;7928](https://github.com/SkriptLang/Skript/pull/7928) Fixes an issue where sorting lists with duplicate values returned a list with only a single instance of that value. - [#&#8203;7935](https://github.com/SkriptLang/Skript/pull/7935) Fixes incorrect documentation for the '[expand/shrink world border](https://docs.skriptlang.org/docs.html?search=#EffWorldBorderExpand)' effect. - [#&#8203;7938](https://github.com/SkriptLang/Skript/pull/7938) Fixes an issue where using the '[name](https://docs.skriptlang.org/docs.html?search=#ExprName)' expression with [default variables](https://docs.skriptlang.org/docs.html?search=#StructVariables) could cause an exception. - [#&#8203;7945](https://github.com/SkriptLang/Skript/pull/7945) Fixes a bug where the '[is within](https://docs.skriptlang.org/docs.html?search=#CondIsWithin)' condition incorrectly handled `or` lists. - [#&#8203;7947](https://github.com/SkriptLang/Skript/pull/7947) Fixes comparisons between enchantments and enchantment types: `if sharpness 1, efficiency 3, and knockback 2 contains sharpness`. - [#&#8203;7951](https://github.com/SkriptLang/Skript/pull/7951) Fixes multiple issues with using and comparing against llamas/trader llamas. - [#&#8203;7964](https://github.com/SkriptLang/Skript/pull/7964) Fixes an issue with setting variables during script loading when asynchronous loading is enabled. - [#&#8203;7971](https://github.com/SkriptLang/Skript/pull/7971) Fixes some issues with comparing [pig variants](https://minecraft.wiki/w/Pig#Variants) and that variants could not be used with baby pigs. - [#&#8203;7976](https://github.com/SkriptLang/Skript/pull/7976) Fixes an issue where [arithmetic syntax](https://docs.skriptlang.org/docs.html?search=#ExprArithmetic) could fail to resolve valid operations. - [#&#8203;7986](https://github.com/SkriptLang/Skript/pull/7986) Fixes an issue on newer versions where adding items to an inventory could result in other slots being mistakenly deleted. - [#&#8203;7989](https://github.com/SkriptLang/Skript/pull/7989) Fixes an issue where `next`/`previous` '[loop-value](https://docs.skriptlang.org/docs.html?search=#ExprLoopValue)' could fail to reset in-between loops. ##### API Changes - [#&#8203;7256](https://github.com/SkriptLang/Skript/pull/7256) Adds API to allow the setting of custom default values for types. - [#&#8203;7551](https://github.com/SkriptLang/Skript/pull/7551/) Integrates the [Registration API](https://github.com/SkriptLang/Skript/pull/6246) into SkriptParser and syntax class parse methods. Addons using SkriptParser methods directly *may* need to be recompiled, though there should be no breaking changes. - [#&#8203;7709](https://github.com/SkriptLang/Skript/pull/7706) Updates SkriptEventInfo (and its Registration API equivalent) to support passing an array for the `since` documentation field. Some methods have had their signatures changed and addons using them will need to be updated. - [#&#8203;7710](https://github.com/SkriptLang/Skript/pull/7710) Cleanup to the ExprTool class and EquipmentSlot conversion methods for BukkitUtils. - [#&#8203;7778](https://github.com/SkriptLang/Skript/pull/7778) Adds a preInit() method intended to help with doing common init work for families of syntaxes, rather than having to hijack init() and create a different signature for the children to implement. - [#&#8203;7791](https://github.com/SkriptLang/Skript/pull/7791) Adds a spawnTestEntity helper method for JUnit tests. - [#&#8203;7832](https://github.com/SkriptLang/Skript/pull/7832) Removes many unnecessary version checks for versions Skript no longer supports. - [#&#8203;7841](https://github.com/SkriptLang/Skript/pull/7841) The syntax simplification API is now used by the parser. For more information, review the pull request's description. - [#&#8203;7851](https://github.com/SkriptLang/Skript/pull/7851) Adds a [PatternedParser](https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/classes/PatternedParser.java) utility interface and replaces the `RegistryParser#getAllNames` method with `RegistryParser#getCombinedPatterns` (from the `PatternedParser` interface). - [#&#8203;7858](https://github.com/SkriptLang/Skript/pull/7858) Adds ExperimentData utility class and SimpleExperimentalSyntax utility interface to simplify the work needed by syntax to restrict based on the set experiments. - [#&#8203;7879](https://github.com/SkriptLang/Skript/pull/7879) Registered syntax are no longer ordered by when they were registered. Priorities should be used if precise registration order is required. - [#&#8203;7891](https://github.com/SkriptLang/Skript/pull/7891) Improves the return types for many expressions via `Expression#possibleReturnTypes()` and `Expression#canReturn()`. - [#&#8203;7892](https://github.com/SkriptLang/Skript/pull/7892) Adds experimental support for local variable type hints. If you have syntax that modifies variables (and may result in their type being changed), you you may need to support this feature. For more information, review the pull request's description (see "API Support"). - [#&#8203;7904](https://github.com/SkriptLang/Skript/pull/7904) Fixes a conflict between the '[player skull](https://docs.skriptlang.org/docs.html?search=#ExprSkull)' expression and the '[head location](https://docs.skriptlang.org/docs.html?search=#ExprEyeLocation)' expression. Note that `head` has been removed as an option for the `player skull` expression. - [#&#8203;7909](https://github.com/SkriptLang/Skript/pull/7909) Significantly expands (and reworked to some extent) the Keyed Expression API. For more information about the changes, review the pull request's description. - [#&#8203;7918](https://github.com/SkriptLang/Skript/pull/7918) Adds a Javadoc description for the `Type` generic parameter in the `AnyContains` interface. - [#&#8203;7927](https://github.com/SkriptLang/Skript/pull/7927) Adds a getter method for the expression used in `PropertyCondition`. - [#&#8203;7929](https://github.com/SkriptLang/Skript/pull/7929) Implements preInit() for Effect, Condition, and Section, allowing runtime errors to be used more easily. Adds a `#isSectionOnly()` method in SectionExpression allowing the ability to check if it requires a Section. - [#&#8203;7971](https://github.com/SkriptLang/Skript/pull/7971) Improves documentation for EntityData. - [#&#8203;7972](https://github.com/SkriptLang/Skript/pull/7972) Switches entitydata age/plurality from parse marks to parse tags. [Click here to view the full list of commits made since 2.11.2](https://github.com/SkriptLang/Skript/compare/2.11.2...2.12.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](https://github.com/SkriptLang/Skript/tree/2.12.0-pre1/src/main/resources/scripts/-examples/experimental%20features). <details> <summary>Click to reveal the experiments available in this release</summary> ##### For-Each Loop **Enable by adding `using for loops` to your script.** A new kind of loop syntax that stores the loop index and value in variables for convenience. This can be used to avoid confusion when nesting multiple loops inside each other. ```applescript= for {_index}, {_value} in {my list::*}: broadcast "%{_index}%: %{_value}%" ``` ```applescript= for each {_player} in all players: send "Hello %{_player}%!" to {_player} ``` All existing loop features are also available in this section. ##### 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. ```applescript= 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 ``` ```applescript= 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: ```applescript 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: ```applescript {_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`. ```applescript 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) ``` ##### Damage Sources **Enable by adding `using damage sources` to your script.** > Note that `type` has been removed as an option for the '[damage cause](https://docs.skriptlang.org/docs.html?search=#ExprDamageCause)' expression as `damage cause` and `damage type` now refer to different things. Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more. Below is an example of what damaging using custom damage sources looks like: ```applescript damage all players by 5 using a custom damage source: set the damage type to magic set the causing entity to {_player} set the direct entity to {_arrow} set the damage location to location(0, 0, 10) ``` For more details about the syntax, visit [damage source](https://docs.skriptlang.org/docs.html?search=damage%20source) on our documentation website. </details> ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;Absolutionism](https://github.com/Absolutionism) - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;Asleeepp](https://github.com/Asleeepp) - [@&#8203;Burbulinis](https://github.com/Burbulinis) - [@&#8203;ChickChicky](https://github.com/ChickChicky) ⭐ First contribution! ⭐ - [@&#8203;Efnilite](https://github.com/Efnilite) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;Fusezion](https://github.com/Fusezion) - [@&#8203;LalitNarayanYadav](https://github.com/LalitNarayanYadav) ⭐ First contribution! ⭐ - [@&#8203;Moderocky](https://github.com/Moderocky) - [@&#8203;Mr-Errors](https://github.com/Mr-Errors) ⭐ First contribution! ⭐ - [@&#8203;nopeless](https://github.com/nopeless) - [@&#8203;OfficialDonut](https://github.com/OfficialDonut) - [@&#8203;Olyno](https://github.com/Olyno) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) - [@&#8203;TheMug06](https://github.com/TheMug06) - [@&#8203;TwistedWar3713](https://github.com/TwistedWar3713) ⭐ First contribution! ⭐ - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.11.2`](https://github.com/SkriptLang/Skript/releases/tag/2.11.2): Patch Release 2.11.2 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.11.1...2.11.2) ##### Skript 2.11.2 As we prepare for Skript 2.12 in July, Skript 2.11.2 is here to resolve some additional bugs. As always, you can report any issues on our [issue tracker](https://github.com/SkriptLang/Skript/issues). Skript 2.11.2 supports Spigot or Paper servers on versions 1.19.4 to 1.21.4, with tentative support for 1.21.5. Happy Skripting! ##### Changelog ##### Bug Fixes - [#&#8203;7845](https://github.com/SkriptLang/Skript/pull/7845) Fixes types marked as `a` instead of `an` in the default language file. - [#&#8203;7850](https://github.com/SkriptLang/Skript/pull/7850) Fixes an issue where LiteralUtils#hasUnparsedLiteral() would not check recursively and therefore could miss some UnparsedLiterals. - [#&#8203;7886](https://github.com/SkriptLang/Skript/pull/7886) Fixes an exception/crash that could occur when using blockdata in a click event. - [#&#8203;7889](https://github.com/SkriptLang/Skript/pull/7889) Fixes an issue where the '[stop trigger](https://docs.skriptlang.org/docs.html?search=#EffExit)' effect used the incorrect ExecutionIntent. - [#&#8203;7890](https://github.com/SkriptLang/Skript/pull/7890) Fixes an issue where the '[no damage ticks](https://docs.skriptlang.org/docs.html?search=#ExprNoDamageTicks)' expression printed an improper (non-suppressable) deprecation warning. - [#&#8203;7895](https://github.com/SkriptLang/Skript/pull/7895) Fixes the `player` event value not working in a '[flight toggle](https://docs.skriptlang.org/docs.html?search=#flight_toggle)' event. - [#&#8203;7907](https://github.com/SkriptLang/Skript/pull/7907) Fixes an issue with the '[arithmetic](https://docs.skriptlang.org/docs.html?search=#ExprArithmetic)' expression that could result in valid operations failing or exceptions. ##### API Changes - [#&#8203;7826](https://github.com/SkriptLang/Skript/pull/7826) Cleans up tests and removes outdated checks for unsupported versions. - [#&#8203;7883](https://github.com/SkriptLang/Skript/pull/7883) Adds safe arithmetic methods for Timespans. [Click here to view the full list of commits made since 2.11.1](https://github.com/SkriptLang/Skript/compare/2.11.1...2.11.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](https://github.com/SkriptLang/Skript/tree/2.11.2/src/main/resources/scripts/-examples/experimental%20features). <details> <summary>Click to reveal the experiments available in this release</summary> ##### For-Each Loop **Enable by adding `using for loops` to your script.** A new kind of loop syntax that stores the loop index and value in variables for convenience. This can be used to avoid confusion when nesting multiple loops inside each other. ```applescript= for {_index}, {_value} in {my list::*}: broadcast "%{_index}%: %{_value}%" ``` ```applescript= for each {_player} in all players: send "Hello %{_player}%!" to {_player} ``` All existing loop features are also available in this section. ##### 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. ```applescript= 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 ``` ```applescript= 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. </details> ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - @&#8203;Absolutionism - @&#8203;APickledWalrus - @&#8203;erenkarakal - @&#8203;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>. ### [`v2.11.1`](https://github.com/SkriptLang/Skript/releases/tag/2.11.1): Patch Release 2.11.1 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.11.0...2.11.1) ##### Skript 2.11.1 What better than a new Skript release to celebrate the beginning of May? Today, we are releasing Skript 2.11.1 which brings with it a handful of bug fixes. As always, you can report any issues on our [issue tracker](https://github.com/SkriptLang/Skript/issues). Skript 2.11.1 supports Spigot or Paper servers on versions 1.19.4 to 1.21.4, with tentative support for 1.21.5. Happy Skripting! ##### Changelog ##### Changes - [#&#8203;7806](https://github.com/SkriptLang/Skript/pull/7806) Tweaked the documentation of the '[using experimental feature](https://docs.skriptlang.org/docs.html?search=#StructUsing)' structure. - [#&#8203;7827](https://github.com/SkriptLang/Skript/pull/7828) Corrects the documentation examples to reflect the usage of minimized aliases. - [#&#8203;7838](https://github.com/SkriptLang/Skript/pull/7838) Improves the documentation of the '[create worldborder](https://docs.skriptlang.org/docs.html?search=#ExprSecCreateWorldBorder)' expression section. ##### Bug Fixes - [#&#8203;7698](https://github.com/SkriptLang/Skript/pull/7698) Fixes an issue with plural type representation when generating a JSON documentation file. - [#&#8203;7775](https://github.com/SkriptLang/Skript/pull/7775) Fixes an issue where the '[broadcast](https://docs.skriptlang.org/docs.html?search=#EffBroadcast)' effect could evaluate its expressions multiple times. - [#&#8203;7795](https://github.com/SkriptLang/Skript/pull/7795) Fixes a crash that could occur when loading invalid BlockData. - [#&#8203;7796](https://github.com/SkriptLang/Skript/pull/7796) Fixes some issues that could occur when running Skript on 1.21.5. - [#&#8203;7809](https://github.com/SkriptLang/Skript/pull/7809) Fixes an error that could occur in variable loading from slow name parsing - [#&#8203;7814](https://github.com/SkriptLang/Skript/pull/7814) Fixes an issue where the '[any of](https://docs.skriptlang.org/docs.html?search=#ExprAnyOf)' expression would mistakenly allow itself to be changed using add, set, remove, and other changers. - [#&#8203;7827](https://github.com/SkriptLang/Skript/pull/7827) Fixes an issue where per-player usages of the '[create worldborder](https://docs.skriptlang.org/docs.html?search=#ExprSecCreateWorldBorder)' expression section shared state. - [#&#8203;7829](https://github.com/SkriptLang/Skript/pull/7829) Fixes an issue where using the '[shoot](https://docs.skriptlang.org/docs.html?search=#EffSecShoot)' effect section as a section would reset the velocity (from the head statement). ##### API Changes - [#&#8203;7817](https://github.com/SkriptLang/Skript/pull/7817) Formalized deprecation processes and updated removal dates of deprecated content. If you are using any deprecated methods or classes, check to see if they will be removed in 2.12. - [#&#8203;7821](https://github.com/SkriptLang/Skript/pull/7821) Moves the inventory event-value to InventoryEvent.class, rather than having to implement it on each child event individually. [Click here to view the full list of commits made since 2.11.0](https://github.com/SkriptLang/Skript/compare/2.11.0...2.11.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](https://github.com/SkriptLang/Skript/tree/2.11.1/src/main/resources/scripts/-examples/experimental%20features). <details> <summary>Click to reveal the experiments avaiable in this release</summary> ##### For-Each Loop **Enable by adding `using for loops` to your script.** A new kind of loop syntax that stores the loop index and value in variables for convenience. This can be used to avoid confusion when nesting multiple loops inside each other. ```applescript for {_index}, {_value} in {my list::*}: broadcast "%{_index}%: %{_value}%" ``` ```applescript for each {_player} in all players: send "Hello %{_player}%!" to {_player} ``` All existing loop features are also available in this section. ##### 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. ```applescript 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 ``` ```applescript= 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. </details> ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;Absolutionism](https://github.com/Absolutionism) - [@&#8203;ahmadmsaleem](https://github.com/ahmadmsaleem) - [@&#8203;cRxPtiCz](https://github.com/cRxPtiCz) (first time) - [@&#8203;Efnilite](https://github.com/Efnilite) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;sovdeeth](https://github.com/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>. ### [`v2.11.0`](https://github.com/SkriptLang/Skript/releases/tag/2.11.0): Feature Release 2.11.0 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.11.0-pre2...2.11.0) ##### Skript 2.11.0 Skript 2.11.0 is now available! This release is of a much more manageable size compared to 2.10, but includes a significant amount of new syntaxes to play around with, as well as a major fix for some item variables. Please read the Major Changes section closely. Below, you can familiarize yourself with the changes. Additionally, [by clicking here](https://docs.skriptlang.org/docs.html?isNew), you can view the list of new syntax on our documentation site. As always, report any issues to our [issues page](https://github.com/SkriptLang/Skript/issues)! Skript 2.11.0 supports Spigot or Paper servers on versions 1.19.4 to 1.21.4. Per our [release model](https://stable.skriptlang.org/clockwork-release-model), we plan to release 2.11.1 on May 1st to address any immediate issues that are spotted with this release. Should it be necessary, an emergency patch release may come before then. Happy Skripting! ##### Major Changes - Adds the ability to clarify the type of a literal, allowing e.g. `black (wolf color)` or `black (color)`. - A large number of additional syntaxes for various entities, like wardens, allays, and endermen. - Allows the use of minecraft ids to refer to items: minecraft:oak\_log. - Adds a spanish language option. - Fixes bug where stored items in variables could change types between Minecraft versions. > \[!CAUTION] > **Updating your Minecraft version *before* switching to 2.11 can cause some item variables to change materials!** > To avoid issues, please ensure you start your server normally with 2.11 active, shut it down normally, and only then proceed to updating your Minecraft version. > > If you are still on 2.10, have updated your Minecraft version, and are experiencing item variable issues, you may find success by downgrading Minecraft to before the issues began and updating to 2.11 on that version (Or by copying your variables.csv file to a server running on an older version). Be warned that downgrading generally is not supported by Paper or Spigot, and you may encounter other unrelated issues attempting this. > > Be warned that **downgrading from 2.11 may cause Skript to be unable to load some item variables**. Keep this in mind when testing 2.11. ##### ⚠ Breaking Changes - The `last colour of %string%` expression has been reworked, adding additional support. This necessitated a pattern change, so existing code using this expression should now use `last string colour code of %string%`. - The `potion type` type has been renamed to `potion effect type`. Usages of the previous name will need to be updated in scripts. - The `chiseled bookshelf` and `decorated pot` inventory types have been renamed to `[chiseled] bookshelf inventory` and `decorated pot inventory` respectively. Usages of the previous names will need to be updated in scripts. - `event-item` in the '[armor change event](https://docs.skriptlang.org/events.html?search=#armor_change)' has been removed in favor of 'old armor item' and 'new armor item' - UUIDs are no longer represented by strings in Skript and are instead proper UUID objects. This should cause no changes for normal Skript users, but may cause issues if you are relying on them being strings in contexts like using Skript-Reflect methods. ##### Changelog ##### Additions - [#&#8203;7006](https://github.com/SkriptLang/Skript/pull/7006) Adds full support for modifying players' world borders. - [#&#8203;7270](https://github.com/SkriptLang/Skript/pull/7270) Adds additional syntax for interacting with dropped items. - [#&#8203;7314](https://github.com/SkriptLang/Skript/pull/7314) Adds Warden related syntaxes: - Make a Warden investigate an area. - Get the entity a Warden is most angry at. - Get the anger level of a Warden. - [#&#8203;7316](https://github.com/SkriptLang/Skript/pull/7316) Adds support for dealing with the entities in 'entity storage' blocks like beehives, as well as other beehive related syntax. - [#&#8203;7332](https://github.com/SkriptLang/Skript/pull/7332) Adds an event that is triggered at certain real-life times of day. - [#&#8203;7351](https://github.com/SkriptLang/Skript/pull/7351) Adds an effect to zombify/dezombify villagers. - [#&#8203;7358](https://github.com/SkriptLang/Skript/pull/7358) Adds Allay related syntaxes: - Get or change whether allays can duplicate and their duplication cooldown. - Get the target jukebox of an Allay. - Force an Allay to duplicate or dance. - [#&#8203;7361](https://github.com/SkriptLang/Skript/pull/7361) Adds an effect and condition for whether axolotls are playing dead. - [#&#8203;7362](https://github.com/SkriptLang/Skript/pull/7362) Updates sleeping related syntaxes to support bats, foxes and villagers. - [#&#8203;7365](https://github.com/SkriptLang/Skript/pull/7365) Adds effect to make a player sprint, adds a condition to check if a camel is using its dash ability. - [#&#8203;7386](https://github.com/SkriptLang/Skript/pull/7386) Adds ability to check if an entity is riding a specific other entity. Prevents error when trying to make an entity ride itself. - [#&#8203;7415](https://github.com/SkriptLang/Skript/pull/7415) Adds ability to get and change the simulation and view distances on Paper servers. - [#&#8203;7453](https://github.com/SkriptLang/Skript/pull/7453) Adds support for specifying slots in the armor change event like `on helmet change`. - [#&#8203;7479](https://github.com/SkriptLang/Skript/pull/7479) Adds syntax related to goats. - [#&#8203;7480](https://github.com/SkriptLang/Skript/pull/7480) Adds Enderman related syntaxes: - Check or change the block an Enderman is carrying. - Make Enderman randomly teleport or towards an entity. - Check if an Enderman is being stared at. - [#&#8203;7532](https://github.com/SkriptLang/Skript/pull/7532) Adds a config option for the number of variable changes required to trigger a save. - [#&#8203;7550](https://github.com/SkriptLang/Skript/pull/7550) Adds various math functions: - mean(numbers) - median(numbers) - factorial(number) - root(number, number) - permutation(number, number) - combination(number, number) - [#&#8203;7554](https://github.com/SkriptLang/Skript/pull/7554) Moves the "invulnerability time" expression to support timespans and deprecates the tick-based version. - [#&#8203;7564](https://github.com/SkriptLang/Skript/pull/7564) Allows modifying the persistence of entities and blocks, and allows modifying whether entities should despawn when the player is far away. - [#&#8203;7586](https://github.com/SkriptLang/Skript/pull/7586) Adds spanish language option. - [#&#8203;7597](https://github.com/SkriptLang/Skript/pull/7597) Adds checking for whether a ghast is charging its fireball and adds getting and changing the explosive power of a ghast's fireball. - [#&#8203;7683](https://github.com/SkriptLang/Skript/pull/7683) Added support for fishing states and generic fishing state change event. - [#&#8203;7701](https://github.com/SkriptLang/Skript/pull/7701) Adds an expression to treat a list as if it is of the form `a, b, or c` rather than `a, b, and c`: `if {_X} is any of {_possibilities::*}`. - [#&#8203;7702](https://github.com/SkriptLang/Skript/pull/7702) Adds an expression to change phantom and slime entity sizes. - [#&#8203;7709](https://github.com/SkriptLang/Skript/pull/7709) Adds `past event-item`, `future event-item`, and `event-slot` to the armor change event. - [#&#8203;7714](https://github.com/SkriptLang/Skript/pull/7714) Adds the entity shoot bow event, as well as some expressions for it. - [#&#8203;7722](https://github.com/SkriptLang/Skript/pull/7722) Adds the ability to clarify the type of a literal, allowing e.g. `black (wolf color)` or `black (color)`. - [#&#8203;7747](https://github.com/SkriptLang/Skript/pull/7747) Adds support for interacting with pandas. - [#&#8203;7750](https://github.com/SkriptLang/Skript/pull/7750) Adds support for obtaining items with/without their tooltip. ##### Changes - [#&#8203;7276](https://github.com/SkriptLang/Skript/pull/7276) Changes the pattern of `last colour of %string%`, adds support for returning colour objects, the first colour, and all colours. - [#&#8203;7287](https://github.com/SkriptLang/Skript/pull/7287) Improves the check for what types Skript attempts to compare by comparing super classinfos. - [#&#8203;7317](https://github.com/SkriptLang/Skript/pull/7317) Adds examples to the location type. - [#&#8203;7440](https://github.com/SkriptLang/Skript/pull/7440) Enforces the use of `effect` when using the type `potion effect type`. - [#&#8203;7442](https://github.com/SkriptLang/Skript/pull/7442) Merges ExprWeather and ExprPlayerWeather to resolve syntax conflicts. - [#&#8203;7492](https://github.com/SkriptLang/Skript/pull/7492) Allows the use of minecraft ids to refer to items: `minecraft:oak_log`. - [#&#8203;7547](https://github.com/SkriptLang/Skript/pull/7547) Allows checking whether something is within multiple objects, e.g. `if player is in world "world" or world "world_nether"`. - [#&#8203;7549](https://github.com/SkriptLang/Skript/pull/7549) Allows using `skript tag` as an alternative for `custom tag`. - [#&#8203;7552](https://github.com/SkriptLang/Skript/pull/7552) Allows using multiple numbers in the rounding expression. - [#&#8203;7602](https://github.com/SkriptLang/Skript/pull/7602) Adds support for using experience as a regular number, allowing for arithmetic like `5 xp + 10`. - [#&#8203;7622](https://github.com/SkriptLang/Skript/pull/7622) Adds syntax that allows the user to improve the clarity of `using experiment`. - [#&#8203;7694](https://github.com/SkriptLang/Skript/pull/7694) Allows `itemstack` as another way to reference the `item` type. - [#&#8203;7704](https://github.com/SkriptLang/Skript/pull/7704) Adds support for `with all item flags`. - [#&#8203;7708](https://github.com/SkriptLang/Skript/pull/7708) Adds support for using `armour` instead of `armor`. - [#&#8203;7716](https://github.com/SkriptLang/Skript/pull/7716) Improves the errors for when a single value is passed, where multiple are expected. - [#&#8203;7762](https://github.com/SkriptLang/Skript/pull/7762) Improves the registration and internal organization of the '[bell events](https://docs.skriptlang.org/events.html?search=bell)'. ##### Bug Fixes - [aliases#126](https://github.com/SkriptLang/skript-aliases/pull/126) Fixes confusion between `resin brick` and `resin bricks`. - [#&#8203;7431](https://github.com/SkriptLang/Skript/pull/7431) Fixes the order of in which sections are printed in debug mode. - [#&#8203;7483](https://github.com/SkriptLang/Skript/pull/7483) Fix conflicts with `any` in the player input event. - [#&#8203;7566](https://github.com/SkriptLang/Skript/pull/7566) Improved condition classes and added missing method overrides. - [#&#8203;7599](https://github.com/SkriptLang/Skript/pull/7599) Changes how event-values are determined to avoid possible conflicts when 2 or more values could apply. - [#&#8203;7656](https://github.com/SkriptLang/Skript/pull/7656) Fix event values not being null in docs created by the JSON generator. - [#&#8203;7665](https://github.com/SkriptLang/Skript/pull/7665) Ensures EffSort's input expression always returns a single value. - [#&#8203;7669](https://github.com/SkriptLang/Skript/pull/7669) Fixes issue when using player in entity move event. - [#&#8203;7679](https://github.com/SkriptLang/Skript/pull/7679) Fixes some incorrectly configured documentation annotations for events. - [#&#8203;7688](https://github.com/SkriptLang/Skript/pull/7688) Fixes an issue where damage component were added to undamaged items. - [#&#8203;7696](https://github.com/SkriptLang/Skript/pull/7696) Fixes decorated pot and bookshelf item comparisons. - [#&#8203;7697](https://github.com/SkriptLang/Skript/pull/7697) Improve error messages for event restricted syntaxes. - [#&#8203;7713](https://github.com/SkriptLang/Skript/pull/7713) Fixes an issue with comparing inventory slots. - [#&#8203;7717](https://github.com/SkriptLang/Skript/pull/7717) Fixes an issue when using integers in the radians expression. - [#&#8203;7736](https://github.com/SkriptLang/Skript/pull/7736) Maintains the inventory of items when setting blocks. - [#&#8203;7744](https://github.com/SkriptLang/Skript/pull/7744) Fixes an issue where spawning a tropical fish of a specific type would spawn the incorrect type. - [#&#8203;7754](https://github.com/SkriptLang/Skript/pull/7754) Fix name and example of ExprDisplayTeleportDuration on the docs. - [#&#8203;7769](https://github.com/SkriptLang/Skript/pull/7769) Fix issues with looping blocks in a straight line when starting near the edge of a block. - [#&#8203;7773](https://github.com/SkriptLang/Skript/pull/7773) Fixes unintended claiming errors when using section expressions without sections. - [#&#8203;7774](https://github.com/SkriptLang/Skript/pull/7774) Fixes crashes on Spigot due to the armor change event attempting to load a Paper class. - [#&#8203;7776](https://github.com/SkriptLang/Skript/pull/7776) Adds lang entries for bundle inventory actions and for the bucket spawn reason. - [#&#8203;7786](https://github.com/SkriptLang/Skript/pull/7786) Adds a missing 'since' annotation to ExprWithItemFlags. - [#&#8203;7790](https://github.com/SkriptLang/Skript/pull/7790) Fixes bug where stored items in variables could change types between Minecraft versions. - [#&#8203;7793](https://github.com/SkriptLang/Skript/pull/7793) Fixes errors for expression sections always saying 'cannot understand section' instead of the actual error. ##### Removals - [#&#8203;7638](https://github.com/SkriptLang/Skript/pull/7638) Removes undocumented expression `[is] event cancelled` as it has been superseded by CondCancelled for years. ##### API Changes - [#&#8203;7478](https://github.com/SkriptLang/Skript/pull/7478) Deprecates Skript's EquipSlot in favour of Bukkit's EquipmentSlot. - [#&#8203;7512](https://github.com/SkriptLang/Skript/pull/7512) Adds changers for event-values. - [#&#8203;7530](https://github.com/SkriptLang/Skript/pull/7530) Adds a utility entry data for nesting entries. - [#&#8203;7548](https://github.com/SkriptLang/Skript/pull/7548) Adds a `canLoad()` method to `AddonModule` for controlling whether a module should be initialized and then loaded. - [#&#8203;7575](https://github.com/SkriptLang/Skript/pull/7575) Adds an ExperimentalSyntax that syntax elements can implement to state that the element requires an experiment to be enabled in order to use it. - [#&#8203;7787](https://github.com/SkriptLang/Skript/pull/7787) Exposes the EntryValidator for ContainerEntryDatas. [Click here to view the full list of commits made since 2.10.2](https://github.com/SkriptLang/Skript/compare/2.10.2...2.11.0) ##### Notices ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;Absolutionism](https://github.com/Absolutionism) - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;Burbulinis](https://github.com/Burbulinis) - [@&#8203;cheeezburga](https://github.com/cheeezburga) - [@&#8203;Efnilite](https://github.com/Efnilite) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;Fusezion](https://github.com/Fusezion) - [@&#8203;kiip1](https://github.com/kiip1) - [@&#8203;milanjaros](https://github.com/milanjaros) - [@&#8203;Moderocky](https://github.com/Moderocky) - [@&#8203;Phill310](https://github.com/Phill310) - [@&#8203;ShaneBeee](https://github.com/ShaneBeee) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) - [@&#8203;TheMug06](https://github.com/TheMug06) - [@&#8203;TPGamesNL](https://github.com/TPGamesNL) - [@&#8203;yzz17](https://github.com/yzz17) 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.11.0-pre2`](https://github.com/SkriptLang/Skript/releases/tag/2.11.0-pre2): Pre-Release 2.11.0-pre2 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.11.0-pre1...2.11.0-pre2) ##### Skript 2.11.0-pre2 Skript 2.11.0-pre2 is now available! This release includes a handful of extra bug fixes not present in pre1, including one major bug fix relating to some item variables. Please read the Major Changes section closely. Below, you can familiarize yourself with the changes. Additionally, [by clicking here](https://docs.skriptlang.org/docs.html?isNew), you can view the list of new syntax on our documentation site. As always, report any issues to our [issues page](https://github.com/SkriptLang/Skript/issues)! Per our [release model](https://stable.skriptlang.org/clockwork-release-model), we plan to release 2.11.0 on April 15th. We may release additional pre-releases before then should the need arise. Happy Skripting! ##### Major Changes - Adds the ability to clarify the type of a literal, allowing e.g. `black (wolf color)` or `black (color)`. - A large number of additional syntaxes for various entities, like wardens, allays, and endermen. - Allows the use of minecraft ids to refer to items: minecraft:oak\_log. - Adds a spanish language option. - Fixes bug where stored items in variables could change types between Minecraft versions. > \[!CAUTION] > **Updating your Minecraft version before switching to 2.11 can cause some item variables to change materials!** > To avoid issues, please ensure you start your server normally with 2.11 active, shut it down normally, and only then proceed to updating your Minecraft version. > > If you are still on 2.10, have updated your Minecraft version, and are experiencing item variable issues, you may find success by downgrading Minecraft to before the issues began and updating to 2.11 on that version (Or by copying your variables.csv file to a server running on an older version). Be warned that downgrading generally is not supported by Paper or Spigot, and you may encounter other unrelated issues attempting this. > > Be warned that **downgrading from 2.11 may cause Skript to be unable to load some item variables**. Keep this in mind when testing 2.11. ##### ⚠ Breaking Changes - The `last colour of %string%` expression has been reworked, adding additional support. This necessitated a pattern change, so existing code using this expression should now use `last string colour code of %string%`. - The `potion type` type has been renamed to `potion effect type`. Usages of the previous name will need to be updated in scripts. - The `chiseled bookshelf` and `decorated pot` inventory types have been renamed to `[chiseled] bookshelf inventory` and `decorated pot inventory` respectively. Usages of the previous names will need to be updated in scripts. - `event-item` in the '[armor change event](https://docs.skriptlang.org/events.html?search=#armor_change)' has been removed in favor of 'old armor item' and 'new armor item' - UUIDs are no longer represented by strings in Skript and are instead proper UUID objects. This should cause no changes for normal Skript users, but may cause issues if you are relying on them being strings in contexts like using Skript-Reflect methods. ##### Changelog ##### Pre-Release 2 Changes - [aliases#126](https://github.com/SkriptLang/skript-aliases/pull/126) Fixes confusion between `resin brick` and `resin bricks`. - [#&#8203;7483](https://github.com/SkriptLang/Skript/pull/7483) Fix conflicts with `any` in the player input event. - [#&#8203;7656](https://github.com/SkriptLang/Skript/pull/7656) Fix event values not being null in docs created by the JSON generator. - [#&#8203;7697](https://github.com/SkriptLang/Skript/pull/7697) Improve error messages for event restricted syntaxes. - [#&#8203;7736](https://github.com/SkriptLang/Skript/pull/7736) Maintains the inventory of items when setting blocks. - [#&#8203;7754](https://github.com/SkriptLang/Skript/pull/7754) Fix name and example of ExprDisplayTeleportDuration on the docs. - [#&#8203;7769](https://github.com/SkriptLang/Skript/pull/7769) Fix issues with looping blocks in a straight line when starting near the edge of a block. - [#&#8203;7773](https://github.com/SkriptLang/Skript/pull/7773) Fixes unintended claiming errors when using section expressions without sections. - [#&#8203;7774](https://github.com/SkriptLang/Skript/pull/7774) Fixes crashes on Spigot due to the armor change event attempting to load a Paper class. - [#&#8203;7776](https://github.com/SkriptLang/Skript/pull/7776) Adds lang entries for bundle inventory actions and for the bucket spawn reason. - [#&#8203;7790](https://github.com/SkriptLang/Skript/pull/7790) Fixes bug where stored items in variables could change types between Minecraft versions. ##### Additions - [#&#8203;7006](https://github.com/SkriptLang/Skript/pull/7006) Adds full support for modifying players' world borders. - [#&#8203;7270](https://github.com/SkriptLang/Skript/pull/7270) Adds additional syntax for interacting with dropped items. - [#&#8203;7314](https://github.com/SkriptLang/Skript/pull/7314) Adds Warden related syntaxes: - Make a Warden investigate an area. - Get the entity a Warden is most angry at. - Get the anger level of a Warden. - [#&#8203;7316](https://github.com/SkriptLang/Skript/pull/7316) Adds support for dealing with the entities in 'entity storage' blocks like beehives, as well as other beehive related syntax. - [#&#8203;7332](https://github.com/SkriptLang/Skript/pull/7332) Adds an event that is triggered at certain real-life times of day. - [#&#8203;7351](https://github.com/SkriptLang/Skript/pull/7351) Adds an effect to zombify/dezombify villagers. - [#&#8203;7358](https://github.com/SkriptLang/Skript/pull/7358) Adds Allay related syntaxes: - Get or change whether allays can duplicate and their duplication cooldown. - Get the target jukebox of an Allay. - Force an Allay to duplicate or dance. - [#&#8203;7361](https://github.com/SkriptLang/Skript/pull/7361) Adds an effect and condition for whether axolotls are playing dead. - [#&#8203;7362](https://github.com/SkriptLang/Skript/pull/7362) Updates sleeping related syntaxes to support bats, foxes and villagers. - [#&#8203;7365](https://github.com/SkriptLang/Skript/pull/7365) Adds effect to make a player sprint, adds a condition to check if a camel is using its dash ability. - [#&#8203;7386](https://github.com/SkriptLang/Skript/pull/7386) Adds ability to check if an entity is riding a specific other entity. Prevents error when trying to make an entity ride itself. - [#&#8203;7415](https://github.com/SkriptLang/Skript/pull/7415) Adds ability to get and change the simulation and view distances on Paper servers. - [#&#8203;7453](https://github.com/SkriptLang/Skript/pull/7453) Adds support for specifying slots in the armor change event like `on helmet change`. - [#&#8203;7479](https://github.com/SkriptLang/Skript/pull/7479) Adds syntax related to goats. - [#&#8203;7480](https://github.com/SkriptLang/Skript/pull/7480) Adds Enderman related syntaxes: - Check or change the block an Enderman is carrying. - Make Enderman randomly teleport or towards an entity. - Check if an Enderman is being stared at. - [#&#8203;7532](https://github.com/SkriptLang/Skript/pull/7532) Adds a config option for the number of variable changes required to trigger a save. - [#&#8203;7550](https://github.com/SkriptLang/Skript/pull/7550) Adds various math functions: - mean(numbers) - median(numbers) - factorial(number) - root(number, number) - permutation(number, number) - combination(number, number) - [#&#8203;7554](https://github.com/SkriptLang/Skript/pull/7554) Moves the "invulnerability time" expression to support timespans and deprecates the tick-based version. - [#&#8203;7564](https://github.com/SkriptLang/Skript/pull/7564) Allows modifying the persistence of entities and blocks, and allows modifying whether entities should despawn when the player is far away. - [#&#8203;7586](https://github.com/SkriptLang/Skript/pull/7586) Adds spanish language option. - [#&#8203;7597](https://github.com/SkriptLang/Skript/pull/7597) Adds checking for whether a ghast is charging its fireball and adds getting and changing the explosive power of a ghast's fireball. - [#&#8203;7683](https://github.com/SkriptLang/Skript/pull/7683) Added support for fishing states and generic fishing state change event. - [#&#8203;7701](https://github.com/SkriptLang/Skript/pull/7701) Adds an expression to treat a list as if it is of the form `a, b, or c` rather than `a, b, and c`: `if {_X} is any of {_possibilities::*}`. - [#&#8203;7702](https://github.com/SkriptLang/Skript/pull/7702) Adds an expression to change phantom and slime entity sizes. - [#&#8203;7709](https://github.com/SkriptLang/Skript/pull/7709) Adds `past event-item`, `future event-item`, and `event-slot` to the armor change event. - [#&#8203;7714](https://github.com/SkriptLang/Skript/pull/7714) Adds the entity shoot bow event, as well as some expressions for it. - [#&#8203;7722](https://github.com/SkriptLang/Skript/pull/7722) Adds the ability to clarify the type of a literal, allowing e.g. `black (wolf color)` or `black (color)`. - [#&#8203;7747](https://github.com/SkriptLang/Skript/pull/7747) Adds support for interacting with pandas. - [#&#8203;7750](https://github.com/SkriptLang/Skript/pull/7750) Adds support for obtaining items with/without their tooltip. ##### Changes - [#&#8203;7276](https://github.com/SkriptLang/Skript/pull/7276) Changes the pattern of `last colour of %string%`, adds support for returning colour objects, the first colour, and all colours. - [#&#8203;7287](https://github.com/SkriptLang/Skript/pull/7287) Improves the check for what types Skript attempts to compare by comparing super classinfos. - [#&#8203;7317](https://github.com/SkriptLang/Skript/pull/7317) Adds examples to the location type. - [#&#8203;7440](https://github.com/SkriptLang/Skript/pull/7440) Enforces the use of `effect` when using the type `potion effect type`. - [#&#8203;7442](https://github.com/SkriptLang/Skript/pull/7442) Merges ExprWeather and ExprPlayerWeather to resolve syntax conflicts. - [#&#8203;7492](https://github.com/SkriptLang/Skript/pull/7492) Allows the use of minecraft ids to refer to items: `minecraft:oak_log`. - [#&#8203;7547](https://github.com/SkriptLang/Skript/pull/7547) Allows checking whether something is within multiple objects, e.g. `if player is in world "world" or world "world_nether"`. - [#&#8203;7549](https://github.com/SkriptLang/Skript/pull/7549) Allows using `skript tag` as an alternative for `custom tag`. - [#&#8203;7552](https://github.com/SkriptLang/Skript/pull/7552) Allows using multiple numbers in the rounding expression. - [#&#8203;7602](https://github.com/SkriptLang/Skript/pull/7602) Adds support for using experience as a regular number, allowing for arithmetic like `5 xp + 10`. - [#&#8203;7622](https://github.com/SkriptLang/Skript/pull/7622) Adds syntax that allows the user to improve the clarity of `using experiment`. - [#&#8203;7694](https://github.com/SkriptLang/Skript/pull/7694) Allows `itemstack` as another way to reference the `item` type. - [#&#8203;7704](https://github.com/SkriptLang/Skript/pull/7704) Adds support for `with all item flags`. - [#&#8203;7708](https://github.com/SkriptLang/Skript/pull/7708) Adds support for using `armour` instead of `armor`. - [#&#8203;7716](https://github.com/SkriptLang/Skript/pull/7716) Improves the errors for when a single value is passed, where multiple are expected. - [#&#8203;7762](https://github.com/SkriptLang/Skript/pull/7762) Improves the registration and internal organization of the '[bell events](https://docs.skriptlang.org/events.html?search=bell)'. ##### Bug Fixes - [aliases#126](https://github.com/SkriptLang/skript-aliases/pull/126) Fixes confusion between `resin brick` and `resin bricks`. - [#&#8203;7431](https://github.com/SkriptLang/Skript/pull/7431) Fixes the order of in which sections are printed in debug mode. - [#&#8203;7483](https://github.com/SkriptLang/Skript/pull/7483) Fix conflicts with `any` in the player input event. - [#&#8203;7566](https://github.com/SkriptLang/Skript/pull/7566) Improved condition classes and added missing method overrides. - [#&#8203;7599](https://github.com/SkriptLang/Skript/pull/7599) Changes how event-values are determined to avoid possible conflicts when 2 or more values could apply. - [#&#8203;7656](https://github.com/SkriptLang/Skript/pull/7656) Fix event values not being null in docs created by the JSON generator. - [#&#8203;7665](https://github.com/SkriptLang/Skript/pull/7665) Ensures EffSort's input expression always returns a single value. - [#&#8203;7669](https://github.com/SkriptLang/Skript/pull/7669) Fixes issue when using player in entity move event. - [#&#8203;7679](https://github.com/SkriptLang/Skript/pull/7679) Fixes some incorrectly configured documentation annotations for events. - [#&#8203;7688](https://github.com/SkriptLang/Skript/pull/7688) Fixes an issue where damage component were added to undamaged items. - [#&#8203;7696](https://github.com/SkriptLang/Skript/pull/7696) Fixes decorated pot and bookshelf item comparisons. - [#&#8203;7697](https://github.com/SkriptLang/Skript/pull/7697) Improve error messages for event restricted syntaxes. - [#&#8203;7713](https://github.com/SkriptLang/Skript/pull/7713) Fixes an issue with comparing inventory slots. - [#&#8203;7717](https://github.com/SkriptLang/Skript/pull/7717) Fixes an issue when using integers in the radians expression. - [#&#8203;7736](https://github.com/SkriptLang/Skript/pull/7736) Maintains the inventory of items when setting blocks. - [#&#8203;7744](https://github.com/SkriptLang/Skript/pull/7744) Fixes an issue where spawning a tropical fish of a specific type would spawn the incorrect type. - [#&#8203;7754](https://github.com/SkriptLang/Skript/pull/7754) Fix name and example of ExprDisplayTeleportDuration on the docs. - [#&#8203;7769](https://github.com/SkriptLang/Skript/pull/7769) Fix issues with looping blocks in a straight line when starting near the edge of a block. - [#&#8203;7773](https://github.com/SkriptLang/Skript/pull/7773) Fixes unintended claiming errors when using section expressions without sections. - [#&#8203;7774](https://github.com/SkriptLang/Skript/pull/7774) Fixes crashes on Spigot due to the armor change event attempting to load a Paper class. - [#&#8203;7776](https://github.com/SkriptLang/Skript/pull/7776) Adds lang entries for bundle inventory actions and for the bucket spawn reason. ##### Removals - [#&#8203;7638](https://github.com/SkriptLang/Skript/pull/7638) Removes undocumented expression `[is] event cancelled` as it has been superseded by CondCancelled for years. ##### API Changes - [#&#8203;7478](https://github.com/SkriptLang/Skript/pull/7478) Deprecates Skript's EquipSlot in favour of Bukkit's EquipmentSlot. - [#&#8203;7512](https://github.com/SkriptLang/Skript/pull/7512) Adds changers for event-values. - [#&#8203;7530](https://github.com/SkriptLang/Skript/pull/7530) Adds a utility entry data for nesting entries. - [#&#8203;7548](https://github.com/SkriptLang/Skript/pull/7548) Adds a `canLoad()` method to `AddonModule` for controlling whether a module should be initialized and then loaded. - [#&#8203;7575](https://github.com/SkriptLang/Skript/pull/7575) Adds an ExperimentalSyntax that syntax elements can implement to state that the element requires an experiment to be enabled in order to use it. [Click here to view the full list of commits made since 2.10.2](https://github.com/SkriptLang/Skript/compare/2.10.2...2.11.0-pre2) ##### Notices ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;Absolutionism](https://github.com/Absolutionism) - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;Burbulinis](https://github.com/Burbulinis) - [@&#8203;cheeezburga](https://github.com/cheeezburga) - [@&#8203;Efnilite](https://github.com/Efnilite) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;Fusezion](https://github.com/Fusezion) - [@&#8203;kiip1](https://github.com/kiip1) - [@&#8203;milanjaros](https://github.com/milanjaros) - [@&#8203;Moderocky](https://github.com/Moderocky) - [@&#8203;Phill310](https://github.com/Phill310) - [@&#8203;ShaneBeee](https://github.com/ShaneBeee) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) - [@&#8203;TheMug06](https://github.com/TheMug06) - [@&#8203;TPGamesNL](https://github.com/TPGamesNL) - [@&#8203;yzz17](https://github.com/yzz17) 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.11.0-pre1`](https://github.com/SkriptLang/Skript/releases/tag/2.11.0-pre1): Pre-Release 2.11.0-pre1 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.10.2...2.11.0-pre1) ##### Skript 2.11.0-pre1 It's no joke: Skript 2.11.0-pre1 is now available! This release includes dozens of new features, bug fixes, and other enhancements. Below, you can familiarize yourself with the changes. Additionally, [by clicking here](https://docs.skriptlang.org/docs.html?isNew), you can view the list of new syntax on our documentation site. As always, report any issues to our [issues page](https://github.com/SkriptLang/Skript/issues)! Per our [release model](https://stable.skriptlang.org/clockwork-release-model), we plan to release 2.11.0 on April 15th. We may release additional pre-releases before then should the need arise. Happy Skripting! ##### Major Changes ##### ⚠ Breaking Changes - The `last colour of %string%` expression has been reworked, adding additional support. This necessitated a pattern change, so existing code using this expression should now use `last string colour code of %string%`. - The `potion type` type has been renamed to `potion effect type`. Usages of the previous name will need to be updated in scripts. - The `chiseled bookshelf` and `decorated pot` inventory types have been renamed to `[chiseled] bookshelf inventory` and `decorated pot inventory` respectively. Usages of the previous names will need to be updated in scripts. - `event-item` in the '[armor change event](https://docs.skriptlang.org/events.html?search=#armor_change)' has been removed in favor of 'old armor item' and 'new armor item' ##### Changelog ##### Additions - [#&#8203;7006](https://github.com/SkriptLang/Skript/pull/7006) Adds full support for modifying players' world borders. - [#&#8203;7270](https://github.com/SkriptLang/Skript/pull/7270) Adds additional syntax for interacting with dropped items. - [#&#8203;7314](https://github.com/SkriptLang/Skript/pull/7314) Adds Warden related syntaxes: - Make a Warden investigate an area. - Get the entity a Warden is most angry at. - Get the anger level of a Warden. - [#&#8203;7316](https://github.com/SkriptLang/Skript/pull/7316) Adds support for dealing with the entities in 'entity storage' blocks like beehives, as well as other beehive related syntax. - [#&#8203;7332](https://github.com/SkriptLang/Skript/pull/7332) Adds an event that is triggered at certain real-life times of day. - [#&#8203;7351](https://github.com/SkriptLang/Skript/pull/7351) Adds an effect to zombify/dezombify villagers. - [#&#8203;7358](https://github.com/SkriptLang/Skript/pull/7358) Adds Allay related syntaxes: - Get or change whether allays can duplicate and their duplication cooldown. - Get the target jukebox of an Allay. - Force an Allay to duplicate or dance. - [#&#8203;7361](https://github.com/SkriptLang/Skript/pull/7361) Adds an effect and condition for whether axolotls are playing dead. - [#&#8203;7362](https://github.com/SkriptLang/Skript/pull/7362) Updates sleeping related syntaxes to support bats, foxes and villagers. - [#&#8203;7365](https://github.com/SkriptLang/Skript/pull/7365) Adds effect to make a player sprint, adds a condition to check if a camel is using its dash ability. - [#&#8203;7386](https://github.com/SkriptLang/Skript/pull/7386) Adds ability to check if an entity is riding a specific other entity. Prevents error when trying to make an entity ride itself. - [#&#8203;7415](https://github.com/SkriptLang/Skript/pull/7415) Adds ability to get and change the simulation and view distances on Paper servers. - [#&#8203;7453](https://github.com/SkriptLang/Skript/pull/7453) Adds support for specifying slots in the armor change event like `on helmet change`. - [#&#8203;7479](https://github.com/SkriptLang/Skript/pull/7479) Adds syntax related to goats. - [#&#8203;7480](https://github.com/SkriptLang/Skript/pull/7480) Adds Enderman related syntaxes: - Check or change the block an Enderman is carrying. - Make Enderman randomly teleport or towards an entity. - Check if an Enderman is being stared at. - [#&#8203;7532](https://github.com/SkriptLang/Skript/pull/7532) Adds a config option for the number of variable changes required to trigger a save. - [#&#8203;7550](https://github.com/SkriptLang/Skript/pull/7550) Adds various math functions: - mean(numbers) - median(numbers) - factorial(number) - root(number, number) - permutation(number, number) - combination(number, number) - [#&#8203;7554](https://github.com/SkriptLang/Skript/pull/7554) Moves the "invulnerability time" expression to support timespans and deprecates the tick-based version. - [#&#8203;7564](https://github.com/SkriptLang/Skript/pull/7564) Allows modifying the persistence of entities and blocks, and allows modifying whether entities should despawn when the player is far away. - [#&#8203;7586](https://github.com/SkriptLang/Skript/pull/7586) Adds spanish language option. - [#&#8203;7597](https://github.com/SkriptLang/Skript/pull/7597) Adds checking for whether a ghast is charging its fireball and adds getting and changing the explosive power of a ghast's fireball. - [#&#8203;7683](https://github.com/SkriptLang/Skript/pull/7683) Added support for fishing states and generic fishing state change event. - [#&#8203;7701](https://github.com/SkriptLang/Skript/pull/7701) Adds an expression to treat a list as if it is of the form `a, b, or c` rather than `a, b, and c`: `if {_X} is any of {_possibilities::*}`. - [#&#8203;7702](https://github.com/SkriptLang/Skript/pull/7702) Adds an expression to change phantom and slime entity sizes. - [#&#8203;7709](https://github.com/SkriptLang/Skript/pull/7709) Adds `past event-item`, `future event-item`, and `event-slot` to the armor change event. - [#&#8203;7714](https://github.com/SkriptLang/Skript/pull/7714) Adds the entity shoot bow event, as well as some expressions for it. - [#&#8203;7722](https://github.com/SkriptLang/Skript/pull/7722) Adds the ability to clarify the type of a literal, allowing e.g. `black (wolf color)` or `black (color)`. - [#&#8203;7747](https://github.com/SkriptLang/Skript/pull/7747) Adds support for interacting with pandas. - [#&#8203;7750](https://github.com/SkriptLang/Skript/pull/7750) Adds support for obtaining items with/without their tooltip. ##### Changes - [#&#8203;7276](https://github.com/SkriptLang/Skript/pull/7276) Changes the pattern of `last colour of %string%`, adds support for returning colour objects, the first colour, and all colours. - [#&#8203;7287](https://github.com/SkriptLang/Skript/pull/7287) Improves the check for what types Skript attempts to compare by comparing super classinfos. - [#&#8203;7317](https://github.com/SkriptLang/Skript/pull/7317) Adds examples to the location type. - [#&#8203;7440](https://github.com/SkriptLang/Skript/pull/7440) Enforces the use of `effect` when using the type `potion effect type`. - [#&#8203;7442](https://github.com/SkriptLang/Skript/pull/7442) Merges ExprWeather and ExprPlayerWeather to resolve syntax conflicts. - [#&#8203;7492](https://github.com/SkriptLang/Skript/pull/7492) Allows the use of minecraft ids to refer to items: `minecraft:oak_log`. - [#&#8203;7547](https://github.com/SkriptLang/Skript/pull/7547) Allows checking whether something is within multiple objects, e.g. `if player is in world "world" or world "world_nether"`. - [#&#8203;7549](https://github.com/SkriptLang/Skript/pull/7549) Allows using `skript tag` as an alternative for `custom tag`. - [#&#8203;7552](https://github.com/SkriptLang/Skript/pull/7552) Allows using multiple numbers in the rounding expression. - [#&#8203;7602](https://github.com/SkriptLang/Skript/pull/7602) Adds support for using experience as a regular number, allowing for arithmetic like `5 xp + 10`. - [#&#8203;7622](https://github.com/SkriptLang/Skript/pull/7622) Adds syntax that allows the user to improve the clarity of `using experiment`. - [#&#8203;7694](https://github.com/SkriptLang/Skript/pull/7694) Allows `itemstack` as another way to reference the `item` type. - [#&#8203;7704](https://github.com/SkriptLang/Skript/pull/7704) Adds support for `with all item flags`. - [#&#8203;7708](https://github.com/SkriptLang/Skript/pull/7708) Adds support for using `armour` instead of `armor`. - [#&#8203;7716](https://github.com/SkriptLang/Skript/pull/7716) Improves the errors for when a single value is passed, where multiple are expected. - [#&#8203;7762](https://github.com/SkriptLang/Skript/pull/7762) Improves the registration and internal organization of the '[bell events](https://docs.skriptlang.org/events.html?search=bell)'. ##### Bug Fixes - [#&#8203;7431](https://github.com/SkriptLang/Skript/pull/7431) Fixes the order of in which sections are printed in debug mode. - [#&#8203;7566](https://github.com/SkriptLang/Skript/pull/7566) Improved condition classes and added missing method overrides. - [#&#8203;7599](https://github.com/SkriptLang/Skript/pull/7599) Changes how event-values are determined to avoid possible conflicts when 2 or more values could apply. - [#&#8203;7665](https://github.com/SkriptLang/Skript/pull/7665) Ensures EffSort's input expression always returns a single value. - [#&#8203;7669](https://github.com/SkriptLang/Skript/pull/7669) Fixes issue when using player in entity move event. - [#&#8203;7679](https://github.com/SkriptLang/Skript/pull/7679) Fixes some incorrectly configured documentation annotations for events. - [#&#8203;7696](https://github.com/SkriptLang/Skript/pull/7696) Fixes decorated pot and bookshelf item comparisons. - [#&#8203;7688](https://github.com/SkriptLang/Skript/pull/7688) Fixes an issue where damage component were added to undamaged items. - [#&#8203;7713](https://github.com/SkriptLang/Skript/pull/7713) Fixes an issue with comparing inventory slots. - [#&#8203;7717](https://github.com/SkriptLang/Skript/pull/7717) Fixes an issue when using integers in the radians expression. - [#&#8203;7744](https://github.com/SkriptLang/Skript/pull/7744) Fixes an issue where spawning a tropical fish of a specific type would spawn the incorrect type. ##### Removals - [#&#8203;7638](https://github.com/SkriptLang/Skript/pull/7638) Removes undocumented expression `[is] event cancelled` as it has been superseded by CondCancelled for years. ##### API Changes - [#&#8203;7478](https://github.com/SkriptLang/Skript/pull/7478) Deprecates Skript's EquipSlot in favour of Bukkit's EquipmentSlot. - [#&#8203;7512](https://github.com/SkriptLang/Skript/pull/7512) Adds changers for event-values. - [#&#8203;7530](https://github.com/SkriptLang/Skript/pull/7530) Adds a utility entry data for nesting entries. - [#&#8203;7548](https://github.com/SkriptLang/Skript/pull/7548) Adds a `canLoad()` method to `AddonModule` for controlling whether a module should be initialized and then loaded. - [#&#8203;7575](https://github.com/SkriptLang/Skript/pull/7575) Adds an ExperimentalSyntax that syntax elements can implement to state that the element requires an experiment to be enabled in order to use it. [Click here to view the full list of commits made since 2.10.2](https://github.com/SkriptLang/Skript/compare/2.10.2...2.11.0-pre1) ##### Notices ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;Absolutionism](https://github.com/Absolutionism) - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;Burbulinis](https://github.com/Burbulinis) - [@&#8203;cheeezburga](https://github.com/cheeezburga) - [@&#8203;Efnilite](https://github.com/Efnilite) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;Fusezion](https://github.com/Fusezion) - [@&#8203;kiip1](https://github.com/kiip1) - [@&#8203;milanjaros](https://github.com/milanjaros) - [@&#8203;Moderocky](https://github.com/Moderocky) - [@&#8203;Phill310](https://github.com/Phill310) - [@&#8203;ShaneBeee](https://github.com/ShaneBeee) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) - [@&#8203;TheMug06](https://github.com/TheMug06) - [@&#8203;TPGamesNL](https://github.com/TPGamesNL) - [@&#8203;yzz17](https://github.com/yzz17) 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.10.2`](https://github.com/SkriptLang/Skript/releases/tag/2.10.2): Patch Release 2.10.2 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.10.1...2.10.2) ##### Skript 2.10.2 Skript 2.10.2 is here with some more bug fixes and some docs enhancements! We would like to welcome two new additions to the team, who will be focused mainly on triaging issues and bug fixes: [@&#8203;Burbulinis](https://github.com/Burbulinis) [@&#8203;TheMug06](https://github.com/TheMug06) Thank you to everyone who applied! We are also updating our release schedule, which you can view [here](https://github.com/SkriptLang/Skript/blob/master/CLOCKWORK_RELEASE_MODEL.md). To summarize the changes, we are introducing minor feature releases in April and October, which will be focused on additions and minimize breaking changes. This is to keep the update size more reasonable and to be quicker about responding to Minecraft's 'drops' update system. This means **2.11 will be next month**, rather than in July. As always, you can report any issues on our [issue tracker](https://github.com/SkriptLang/Skript/issues). Happy Skripting! ##### Changelog ##### Bug Fixes - [#&#8203;7499](https://github.com/SkriptLang/Skript/pull/7499) Fixes empty event requirement sections in the docs. - [#&#8203;7513](https://github.com/SkriptLang/Skript/pull/7513) Fixes issue with getting blocks between two locations. - [#&#8203;7584](https://github.com/SkriptLang/Skript/pull/7584) Updates the compass target expression's description to include 1.21.4 behavior changes. - [#&#8203;7591](https://github.com/SkriptLang/Skript/pull/7591) Adds a vehicle class-info to allow `event-vehicle` to work properly. - [#&#8203;7603](https://github.com/SkriptLang/Skript/pull/7603) Fixes a bad example in the text display alignment examples. - [#&#8203;7632](https://github.com/SkriptLang/Skript/pull/7632) Fixes an internal test for dates that was intermittently failing. - [#&#8203;7641](https://github.com/SkriptLang/Skript/pull/7641) Fixes issues with using various projectile entity datas, like fireballs and wind charges - [#&#8203;7646](https://github.com/SkriptLang/Skript/pull/7646) Fixes decimal multiplication/division with timespans resulting in truncated values. - [aliases#123](https://github.com/SkriptLang/skript-aliases/pull/123) Fixes brick/bricks confusion with item names. - [aliases#125](https://github.com/SkriptLang/skript-aliases/pull/125) Fixes issue when checking whether an entity is a wind charge. ##### API Changes - [#&#8203;7470](https://github.com/SkriptLang/Skript/pull/7470) Adds an Example annotation that can be applied multiple times, intended to eventually replace Examples. See PR for details. - [#&#8203;7558](https://github.com/SkriptLang/Skript/pull/7558) Allows the test platform to run on a Spigot server. This is not supported and may cause test failures among the existing tests if used. - [#&#8203;7633](https://github.com/SkriptLang/Skript/pull/7633) Improves the consistency and information provided by Skript's generated JSON documentation. [Click here to view the full list of commits made since 2.10.1](https://github.com/SkriptLang/Skript/compare/2.10.1...2.10.2) ##### Notices ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;Efnilite](https://github.com/Efnilite/) - [@&#8203;erenkarakal](https://github.com/erenkarakal/) - [@&#8203;JakeGBLP](https://github.com/JakeGBLP/) - [@&#8203;Moderocky](https://github.com/Moderocky/) - [@&#8203;ShaneBeee](https://github.com/ShaneBeee/) - [@&#8203;sovdeeth](https://github.com/sovdeeth/) - [@&#8203;TheAbsolutionism](https://github.com/TheAbsolutionism/) 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.10.1`](https://github.com/SkriptLang/Skript/releases/tag/2.10.1): Patch Release 2.10.1 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.10.0...2.10.1) ##### Skript 2.10.1 Skript 2.10.1 is here to address some of the most prominent issues reported with 2.10.0. As always, you can report any issues on our [issue tracker](https://github.com/SkriptLang/Skript/issues). Happy Skripting! ##### Breaking Changes There have been a few minor breaking changes: - When using "send" in the '[connect](https://docs.skriptlang.org/docs.html?search=#EffConnect)' effect, "server" is now a required keyword. - Removed the pattern "\[a] %\*color% %bannerpatterntype%" ##### Changelog ##### Bug Fixes - [#&#8203;7450](https://github.com/SkriptLang/Skript/pull/7450) Fixes an issue where tag lookups for the '[tag](https://docs.skriptlang.org/docs.html?search=#ExprTag)' expression would not check all possible tag sources. - [#&#8203;7455](https://github.com/SkriptLang/Skript/pull/7455) Fixes an issue with the experimental queue serialization. - [#&#8203;7474](https://github.com/SkriptLang/Skript/pull/7474) Fixes an issue where using 'or' in the '[is tagged](https://docs.skriptlang.org/docs.html?search=#CondIsTagged)' condition would not check against all tags. - [#&#8203;7503](https://github.com/SkriptLang/Skript/pull/7503) Fixes an issue where getting or changing the name of a block did not work. - [#&#8203;7519](https://github.com/SkriptLang/Skript/pull/7519) Fixes a syntax conflict between the '[send](https://docs.skriptlang.org/docs.html?search=#EffMessage)' effect and the '[connect](https://docs.skriptlang.org/docs.html?search=#EffConnect)' effect. - [#&#8203;7521](https://github.com/SkriptLang/Skript/pull/7521) Fixes multiple issues with '[fishing](https://docs.skriptlang.org/docs.html?search=#fishing)' documentation. - [#&#8203;7525](https://github.com/SkriptLang/Skript/pull/7525) Fixes an issue where the '[wearing](https://docs.skriptlang.org/docs.html?search=#CondIsWearing)' condition could check invalid slots, resulting in an exception. - [#&#8203;7527](https://github.com/SkriptLang/Skript/pull/7527) Fixes an issue where checking whether something is tagged as a different type (e.g. check if an entity is tagged as a type of item) would result in an exception. - [#&#8203;7528](https://github.com/SkriptLang/Skript/pull/7528) Fixes an issue where loot tables could not be serialized. - [#&#8203;7537](https://github.com/SkriptLang/Skript/pull/7537) Fixes an issue where the '[for each](https://docs.skriptlang.org/docs.html?search=#SecFor)' loop did not fully iterate over the elements. - [#&#8203;7540](https://github.com/SkriptLang/Skript/pull/7540) Fixes an issue where some language entries could mistakenly be associated with non-Minecraft additions (e.g. custom biomes). - [#&#8203;7546](https://github.com/SkriptLang/Skript/pull/7546) Removes the pattern "\[a] %\*color% %bannerpatterntype%" which caused significant parsing slowdowns in some Skript environments. - [#&#8203;7557](https://github.com/SkriptLang/Skript/pull/7557) Fixes an issue where the tests could fail if a locale other than English was used. - [#&#8203;7559](https://github.com/SkriptLang/Skript/pull/7559) Fixes an issue where some syntaxes contained "the" multiple times at the beginning. - [#&#8203;7570](https://github.com/SkriptLang/Skript/pull/7570) Fixes an issue where date variables from older versions would fail to load on 2.10.0. ##### API Changes - [#&#8203;7526](https://github.com/SkriptLang/Skript/pull/7526) Added support for regex-based highlighting for runtime errors. [Click here to view the full list of commits made since 2.10.0](https://github.com/SkriptLang/Skript/compare/2.10.0...2.10.1) ##### Notices ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;APickledWalrus](https://github.com/APickledWalrus/) - [@&#8203;Burbulinis](https://github.com/Burbulinis/) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;Fusezion](https://github.com/Fusezion/) - [@&#8203;Moderocky](https://github.com/Moderocky/) - [@&#8203;Phill310](https://github.com/Phill310/) - [@&#8203;ShaneBeee](https://github.com/ShaneBeee/) - [@&#8203;sovdeeth](https://github.com/sovdeeth/) - [@&#8203;TheAbsolutionism](https://github.com/TheAbsolutionism/) - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.10.0`](https://github.com/SkriptLang/Skript/releases/tag/2.10.0): Feature Release 2.10.0 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.10.0-pre1...2.10.0) ##### Skript 2.10.0 We are excited to share that Skript 2.10.0 is now available! It is one of our largest updates, with more than 150 new features, bug fixes, and API updates to play around with! Below, you can familiarize yourself with the changes. Additionally, [by clicking here](https://docs.skriptlang.org/docs.html?isNew), you can view the list of new syntax on our documentation site. As always, report any issues to our [issues page](https://github.com/SkriptLang/Skript/issues)! Per our [release model](https://stable.skriptlang.org/clockwork-release-model), we plan to release 2.10.1 on February 1st to address any immediate issues that are spotted with this release. Should it be necessary, an emergency patch release may come before then. Happy Skripting! ##### Major Changes > \[!IMPORTANT] > **Support for Minecraft versions below 1.19.4 has been dropped.** > This means that **1.19.4**, **1.20.6**, and **1.21.3/1.21.4** are the only supported versions. Going forward, Skript will only support the three latest major Minecraft versions. > In addition, Skript now requires **Java 17** to run. While most users are running Java 17 or newer, some may be required to update for this version. > \[!WARNING] > **Some addons may fail to load with 2.10.** > Due to the removal of long-deprecated API, outdated addons may fail to load while others will print a warning on start up. In some cases, an addon may only need to be recompiled to work with 2.10. > \[!CAUTION] > **Aliases are going away! Your scripts may break if you do not take action.** > This means a lot of item names will be changing to match their in-game ids. In addition, categories and blockdata aliases will also be going away, replaced by tags and blockdata respectively. > > ```applescript > rabbit's foot -> rabbit foot > gold helmet -> golden helmet > any sword -> tag "swords" > waterlogged oak stairs -> oak_stairs[waterlogged=true] > ``` > > If you do not want to make changes to your scripts, the old aliases will be provided with each Skript release, so you can continue to use them if you prefer. > **See [this discussion](https://github.com/SkriptLang/Skript/discussions/7349) for more details.** ##### Minecraft Tags Skript now supports the ability to use Minecraft tags (`#minecraft:swords`, `#minecraft:logs`, etc.). These are being introduced as a replacement for the current category aliases (`any sword`, `any log`) and should provide much more flexibilty. You can even create your own tags! ```applescript set {_tag} to tag "swords" give the player a random item out of {_tag}'s tag values if the player's tool is tagged as item tag "minecraft:piglin_food": send "Yum!" register an item tag named "my_favorite_blocks" using oak log, stone, and podzol ``` ##### Display Entities The long-awaited support for display entities is finally here! 2.10 includes a lot of syntax for creating, manipulating, and using display entities. ```applescript spawn an oak log block display at player: set the display scale of the display to vector(1, 10, 1) set the display translation of the display to vector(0.5, 0.5, 0.5) rotate display around its local y axis by 45 degrees set the view range of display to 2 ``` More display syntax can be found [on the docs](https://docs.skriptlang.org/docs.html?search=display). ##### Variable Starting Character Reservations Some characters are reserved at the start of variable names. Users will receive a warning when trying to use them. This is so that these characters will be available for special variable functionality in future versions. The following characters are reserved: - `{~variable}` - `{.variable}` - `{$variable}` - `{!variable}` - `{&variable}` - `{^variable}` - `{*variable}` - `{+variable}` - `{-variable}` ##### Registration API (Preview) > \[!CAUTION] > This is a preview feature, meaning it is subject to breaking changes without a deprecation period. This update includes the initial preview of a new Skript/Addon API, starting with addon registration and syntax registration. The main Skript (JavaPlugin) class now has a new method, `instance()`, which provides access to the modern Skript class. This class contains the registered addons and the new `SyntaxRegistry`, which holds all of Skript's (and its addon's) registered syntax. A tutorial with full usage information will be coming in the near future. For now, the full details are available at the [pull request](https://github.com/SkriptLang/Skript/pull/6246). ##### 🧪 Experimental Features Experimental features allow users to enable syntax on a per-script basis: some of these features are new proposals that we are testing, others may have unsafe or complex elements that regular users don't want. Experimental features can be enabled by adding 'using %feature name%' at the top of a script. Please note that anything marked as experimental is subject to changes in future versions. ##### For-Each Loop A new kind of loop syntax that stores the loop index and value in variables for convenience. This can be used to avoid confusion when nesting multiple loops inside each other. ```applescript= for {_index}, {_value} in {my list::*}: broadcast "%{_index}%: %{_value}%" ``` ```applescript= for each {_player} in all players: send "Hello %{_player}%!" to {_player} ``` All existing loop features are also available in this section. ##### Enabling Flag ``` using for loops ``` ##### Queue 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. ```applescript= 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 ``` ```applescript= 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. ##### Enabling Flag ``` using queues ``` ##### Script Reflection This feature includes: - The ability to reference a script in code. - Finding and running functions by name. - Reading configuration files and values. ##### Enabling Flag ``` using script reflection ``` ##### ⚠ Breaking Changes - Out-of-range dates will now return '0 seconds' instead of 'none' in the '[time since](https://docs.skriptlang.org/docs.html?search=#ExprTimeSince)' expression: ```applescript if time since {_date} is less than 3 seconds: # Previously, if {_date} was in the future, this would be false. # Now, this is true, since `time since {_date}` evaluates to 0 seconds. # These situations will not change: # {_date} more than 3 seconds ago -> false # {_date} between 0 and 3 seconds ago -> true ``` - The existing '[fish](https://docs.skriptlang.org/docs.html?search=#fishing)' event has been replaced by [more specific and useful events](https://github.com/SkriptLang/Skript/pull/7137). - The '[kill](https://docs.skriptlang.org/docs.html?search=#EffKill)' effect now bypasses totems of undying. - For the '[script](https://docs.skriptlang.org/docs.html?search=#EffScriptFile)' effect, support for using 'skript %string%' was removed. Simply use 'script %string%' or 'skript file %string%'. - The 'future event-block' in the '[block break](https://docs.skriptlang.org/events.html?search=#break_mine)' event was removed. It did not work in many cases due to API limitations. - In the [VariablesStorage](https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/variables/VariablesStorage.java) class, the field 'databaseName' is no longer 'protected', and the constructor parameter now represents the database type rather than name. See [#&#8203;7074](https://github.com/SkriptLang/Skript/pull/7047) for full details. - In the [Skript](https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/Skript.java) class, the syntax element info getters (e.g. 'getStatements') now return unmodifiable collections. - Numerous API classes were deprecated, and many long deprecated API classes were removed. As a result, **addons will need to be recompiled** against 2.10 to work. See the [pull request](https://github.com/SkriptLang/Skript/pull/6670) for full details. ##### Changelog <details> <summary>Changes Since 2.10.0-pre1</summary> - [#&#8203;7333](https://github.com/SkriptLang/Skript/pull/7333) Fixed multiple issues with and expanded the experimental Registration API. - [#&#8203;7340](https://github.com/SkriptLang/Skript/pull/7340) Added support for using enchantment types with the '[type of](https://docs.skriptlang.org/docs.html?search=#ExprTypeOf)' expression. - [#&#8203;7356](https://github.com/SkriptLang/Skript/pull/7356) Improved compatibility with legacy/abandoned addons. - [#&#8203;7357](https://github.com/SkriptLang/Skript/pull/7357) Fixed an issue where the documentation for the '[fishing](https://docs.skriptlang.org/docs.html?search=#fishing)' events was missing. - [#&#8203;7359](https://github.com/SkriptLang/Skript/pull/7359) Expanded the '[value](https://docs.skriptlang.org/docs.html?search=#ExprValue)' expression to be used by addons. - [#&#8203;7363](https://github.com/SkriptLang/Skript/pull/7363) Improved the safety of internal changing methods. - [#&#8203;7364](https://github.com/SkriptLang/Skript/pull/7364) Improved the internal handling of [potion effect types](https://docs.skriptlang.org/docs.html?search=#potioneffecttype). - [#&#8203;7368](https://github.com/SkriptLang/Skript/pull/7368) Fixed an issue where documentation collision checking always reported at least one collision. - [#&#8203;7370](https://github.com/SkriptLang/Skript/pull/7370) Improved the documentation for the '[name](https://docs.skriptlang.org/docs.html#ExprName)' expression. - [#&#8203;7374](https://github.com/SkriptLang/Skript/pull/7374) Fixed an issue where the '[fire burn duration](https://docs.skriptlang.org/docs.html?search=#ExprFireTicks)' expression would cause an error. - [#&#8203;7381](https://github.com/SkriptLang/Skript/pull/7381) Added support for using multiple lines in the '[Since](https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/doc/Since.java)' documentation annotation. - [#&#8203;7382](https://github.com/SkriptLang/Skript/pull/7382) Improved the backwards compatibility of [EventValues](https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/registrations/EventValues.java) registration. - [#&#8203;7383](https://github.com/SkriptLang/Skript/pull/7383) Fixed a few issues with the construction of runtime error messages. - [#&#8203;7391](https://github.com/SkriptLang/Skript/pull/7391) Added support for listening for multiple commands for an '[command](https://docs.skriptlang.org/docs.html#command)' event. - [#&#8203;7392](https://github.com/SkriptLang/Skript/pull/7392) Fixed an issue where the 'current input key' expression and condition would have issues in the 'key input' event if a delay was present. - [#&#8203;7398](https://github.com/SkriptLang/Skript/pull/7398) Fixed an issue where some syntax failed to work in an effect command. - [#&#8203;7400](https://github.com/SkriptLang/Skript/pull/7400) Fixed an issue where the '/skript test' command failed to report all test failures. - [#&#8203;7402](https://github.com/SkriptLang/Skript/pull/7402) Improved the highlighting API for runtime errors. - [#&#8203;7404](https://github.com/SkriptLang/Skript/pull/7404) Added an additional pattern to the '[vector from yaw and pitch](https://docs.skriptlang.org/docs.html?search=#ExprVectorFromYawAndPitch)' expression to improve its flexibility. - [#&#8203;7409](https://github.com/SkriptLang/Skript/pull/7409) Fixed an issue where section expressions reported (printed) their first error twice. - [#&#8203;7410](https://github.com/SkriptLang/Skript/pull/7410) Fixed an issue where some exceptions would be silently caught and not reported. - [#&#8203;7424](https://github.com/SkriptLang/Skript/pull/7424)/[#&#8203;7425](https://github.com/SkriptLang/Skript/pull/7425) Fixed multiple issues related to the updated configuration loading/conversion process. - [#&#8203;7426](https://github.com/SkriptLang/Skript/pull/7426) Updated the description of the '[kill](https://docs.skriptlang.org/docs.html?search=#EffKill)' effect to better reflect its updates. - [#&#8203;7428](https://github.com/SkriptLang/Skript/pull/7428) Fixed an issue where the '[tag contents](https://docs.skriptlang.org/docs.html?search=#ExprTagContents)' expression did not properly compute its return type. - [#&#8203;7430](https://github.com/SkriptLang/Skript/pull/7430) Updated and fixed issues with the example scripts. - [#&#8203;7444](https://github.com/SkriptLang/Skript/pull/7444) Adds examples for the experimental features in this version. </details> ##### Additions - [#&#8203;5518](https://github.com/SkriptLang/Skript/pull/5518) Adds support for obtaining multiple random numbers at once with the '[random numbers](https://docs.skriptlang.org/docs.html?search=#ExprRandomNumber)' expression. - [#&#8203;5601](https://github.com/SkriptLang/Skript/pull/5601) Adds syntax for working with display entities. Involves spawning, translating, scaling, rotating, and many other interations with displays. - [#&#8203;6203](https://github.com/SkriptLang/Skript/pull/6203) Adds a 'time until' expression along with a condition for whether a date is in the past or future. - [#&#8203;6419](https://github.com/SkriptLang/Skript/pull/6419) Adds an expression for changing the custom chat completions of players. - [#&#8203;6427](https://github.com/SkriptLang/Skript/pull/6427) Adds support for entity leashing events. - [#&#8203;6439](https://github.com/SkriptLang/Skript/pull/6439) Adds a '/skript list' command which displays the current enabled and disabled scripts. - [#&#8203;6498](https://github.com/SkriptLang/Skript/pull/6498) Adds support for teleport flags to the '[teleport](https://docs.skriptlang.org/docs.html?search=#EffTeleport)' effect. Teleport flags allow retaining entity properties such as position and direction during a teleport. - [#&#8203;6532](https://github.com/SkriptLang/Skript/pull/6532) Adds the entity potion effect event, which occurs when an entity gains or loses an effect. - [#&#8203;6562](https://github.com/SkriptLang/Skript/pull/6562) Adds experimental support for a 'for each index/value' loop syntax. - [#&#8203;6638](https://github.com/SkriptLang/Skript/pull/6638) Adds syntax for interacting with the enchantment glint of an item. - [#&#8203;6698](https://github.com/SkriptLang/Skript/pull/6698) Adds support for the changing of max stack sizes for items and inventories. - [#&#8203;6719](https://github.com/SkriptLang/Skript/pull/6719) Adds experimental support for configuration reading and navigation. - [#&#8203;6741](https://github.com/SkriptLang/Skript/pull/6741) Adds the ability to use gamemodes with the '[is invulnerable](https://docs.skriptlang.org/docs.html?search=#CondIsInvulnerable)' condition. - [#&#8203;6768](https://github.com/SkriptLang/Skript/pull/6768) Adds the piglin barter event (with barter input & output expressions). - [#&#8203;6780](https://github.com/SkriptLang/Skript/pull/6780) Adds a configuration option for all operators to see information when a script is reloaded. - [#&#8203;6849](https://github.com/SkriptLang/Skript/pull/6849) Adds a condition to check whether an entity is saddled. - [#&#8203;6849](https://github.com/SkriptLang/Skript/pull/6849) Adds support for wolf armor in the '[is wearing](https://docs.skriptlang.org/docs.html?search=#CondIsWearing)' condition and the '[equip](https://docs.skriptlang.org/docs.html?search=#EffEquip)' effect. - [#&#8203;6850](https://github.com/SkriptLang/Skript/pull/6850) Adds an effect to tame an entity and a condition to test whether an entity is tamed. - [#&#8203;6851](https://github.com/SkriptLang/Skript/pull/6851) Adds a configuration option to limit the number of variable backup files stored. - [#&#8203;6859](https://github.com/SkriptLang/Skript/pull/6859) Adds an expression to get the command of a command block, as well as a condition and effect to check and set the conditionality of a command block. - [#&#8203;6860](https://github.com/SkriptLang/Skript/pull/6860) Adds support for using wither projectiles in the '[is charged](https://docs.skriptlang.org/docs.html?search=#CondIsCharged)' condition and '[charge](https://docs.skriptlang.org/docs.html?search=#EffCharge)' effect. - [#&#8203;6861](https://github.com/SkriptLang/Skript/pull/6861) Adds an expression to get or modify the taming level of horses. - [#&#8203;6867](https://github.com/SkriptLang/Skript/pull/6867) Adds non-player (other entity) support to the '[can see](https://docs.skriptlang.org/docs.html?search=#CondCanSee)' condition and '[visibility](https://docs.skriptlang.org/docs.html?search=#EffEntityVisibility)' effect. - [#&#8203;6898](https://github.com/SkriptLang/Skript/pull/6898) Adds an effect to immediately detonate a creeper, tnt minecart, primed tnt, firework, or windcharge. - [#&#8203;6900](https://github.com/SkriptLang/Skript/pull/6900) Adds support for obtaining all entities within a cuboid region in the '[entities](https://docs.skriptlang.org/docs.html?search=#ExprEntities)' expression. - [#&#8203;6912](https://github.com/SkriptLang/Skript/pull/6912) Adds a section to filter lists, like the filter expression but with the ability to retain indices. - [#&#8203;6930](https://github.com/SkriptLang/Skript/pull/6930) Adds the option to exclude trailing empty strings from the '[join/split](https://docs.skriptlang.org/docs.html?search=#ExprJoinSplit)' expression. - [#&#8203;6958](https://github.com/SkriptLang/Skript/pull/6958) Adds a warning that is printed when Skript is reloaded via '/reload' or similar means. - [#&#8203;6960](https://github.com/SkriptLang/Skript/pull/6960) Adds a warning for unreachable code (for example, code following a return effect in a function). - [#&#8203;6970](https://github.com/SkriptLang/Skript/pull/6970) Adds support for deleting/resetting the prefix/suffix of players. - [#&#8203;6989](https://github.com/SkriptLang/Skript/pull/6989) Adds a new option to the '[connect](https://docs.skriptlang.org/docs.html?search=#EffConnect)' effect for transfering players to a different server (using the transfer packet in 1.20.5+). - [#&#8203;6997](https://github.com/SkriptLang/Skript/pull/6997) Adds an explicit sort order to the sort effect. - [#&#8203;7001](https://github.com/SkriptLang/Skript/pull/7001) Adds support for using shortened timespan units in commands: `/my_ban_command sovde 1y 2d 3s`. - [#&#8203;7013](https://github.com/SkriptLang/Skript/pull/7013) Adds support for withers to the '[is charged](https://docs.skriptlang.org/docs.html?search=#CondIsCharged)' condition. - [#&#8203;7019](https://github.com/SkriptLang/Skript/pull/7019) Adds an expression to get various sounds of entities, like their death sound, fall damage sound, or sound for eating a certain item. - [#&#8203;7028](https://github.com/SkriptLang/Skript/pull/7028) Adds a list transformation (mapping) expression and effect. - [#&#8203;7030](https://github.com/SkriptLang/Skript/pull/7030) Adds support for using underscores in numbers for readability: `100_000_000`. - [#&#8203;7040](https://github.com/SkriptLang/Skript/pull/7040) Adds an expression to get various sound of blocks, like their break sound, footstep sound, or place sound. - [#&#8203;7041](https://github.com/SkriptLang/Skript/pull/7041) Adds basic support for wolf variants. - [#&#8203;7044](https://github.com/SkriptLang/Skript/pull/7044) Adds proper support for using custom damage causes in the '[damage](https://docs.skriptlang.org/effects.html?search=#EffHealth)' effect. - [#&#8203;7045](https://github.com/SkriptLang/Skript/pull/7045) Adds a last death location expression for players. - [#&#8203;7058](https://github.com/SkriptLang/Skript/pull/7058) Improves the description of the '[sort](https://docs.skriptlang.org/effects.html?search=#EffSort)' effect. - [#&#8203;7061](https://github.com/SkriptLang/Skript/pull/7061) Adds body armor support to the '[armor slot](https://docs.skriptlang.org/docs.html?search=#ExprArmorSlot)' expression. Body armor is for entities such as horses and wolves (e.g. horse armor and wolf armor). - [#&#8203;7064](https://github.com/SkriptLang/Skript/pull/7064) Adds experimental support for queues, a new type of data structure. - [#&#8203;7065](https://github.com/SkriptLang/Skript/pull/7065) Adds support for updating blocks without triggering physics updates. - [#&#8203;7075](https://github.com/SkriptLang/Skript/pull/7075) Adds an event for when blocks drop items when broken. - [#&#8203;7076](https://github.com/SkriptLang/Skript/pull/7076) Adds an expression for the experience pickup cooldown of players, as well as an event for when it changes. - [#&#8203;7079](https://github.com/SkriptLang/Skript/pull/7079) Adds events and syntax for beacons. - [#&#8203;7083](https://github.com/SkriptLang/Skript/pull/7083) Adds the ability to change the '[affected entities](https://docs.skriptlang.org/docs.html?search=#ExprAffectedEntities)' in an '[area of effect cloud effect](https://docs.skriptlang.org/docs.html?search=#aoe_cloud_effect)' event. - [#&#8203;7086](https://github.com/SkriptLang/Skript/pull/7086) Adds expressions to interact with the item flags of items. - [#&#8203;7088](https://github.com/SkriptLang/Skript/pull/7088) Adds syntax to show, hide, and check the visibility of the custom name of an entity. - [#&#8203;7088](https://github.com/SkriptLang/Skript/pull/7088) Adds a condition to check whether a mob was spawned from a spawner. - [#&#8203;7088](https://github.com/SkriptLang/Skript/pull/7088) Adds a condition to check whether an entity is currently ticking. - [#&#8203;7088](https://github.com/SkriptLang/Skript/pull/7088) Adds support for obtaining the maximum on-fire duration to the '[entity fire burn duration](https://docs.skriptlang.org/docs.html?search=#ExprFireTicks)' expression. - [#&#8203;7093](https://github.com/SkriptLang/Skript/pull/7093) Improves existing syntax and adds new syntax for interacting with furnaces. - [#&#8203;7094](https://github.com/SkriptLang/Skript/pull/7094) Adds an effect to open/close the lids of lidded blocks (e.g. chests, shulker boxes), as well as a condition to check whether a lid is open or not. - [#&#8203;7104](https://github.com/SkriptLang/Skript/pull/7104) Adds a condition to check whether a number is evenly divisible by another. - [#&#8203;7105](https://github.com/SkriptLang/Skript/pull/7105) Adds syntax to obtain some client chat options on Paper servers, such as whether a player has chat coloring disabled. - [#&#8203;7110](https://github.com/SkriptLang/Skript/pull/7110) Adds syntax related to animal breeding and age. - [#&#8203;7113](https://github.com/SkriptLang/Skript/pull/7113) Adds 'add' and 'remove' change support to the '[metadata](https://docs.skriptlang.org/docs.html?search=#ExprMetadata)' expression. - [#&#8203;7126](https://github.com/SkriptLang/Skript/pull/7126) Adds automatically generated aliases for modded items. `mod:item` is accessible as `mod's item` or `item from mod`. This feature is not officially supported, as Skript does not officially support any modded platforms. - [#&#8203;7127](https://github.com/SkriptLang/Skript/pull/7127) Adds support for Minecraft tags and custom tags. - [#&#8203;7129](https://github.com/SkriptLang/Skript/pull/7129) Adds a specific error message to catch incorrect usages of 'pretty quotes' instead of the regular quotation mark character. - [#&#8203;7130](https://github.com/SkriptLang/Skript/pull/7130) Allows blockdata to be used as a filter for '[click](https://docs.skriptlang.org/docs.html?search=#click)' events. - [#&#8203;7131](https://github.com/SkriptLang/Skript/pull/7131) Adds a colors event-value to the '[firework](https://docs.skriptlang.org/docs.html?search=#firework_explode)' event. - [#&#8203;7132](https://github.com/SkriptLang/Skript/pull/7132) Adds support for obtaining the 'previous' and 'next' loop-values in a loop. - [#&#8203;7136](https://github.com/SkriptLang/Skript/pull/7136) Converts the shoot effect to an effect-section for more control. - [#&#8203;7137](https://github.com/SkriptLang/Skript/pull/7137) Adds new fishing events and syntax in place of the existing '[fish](https://docs.skriptlang.org/events.html?search=#fishing)' event. - [#&#8203;7139](https://github.com/SkriptLang/Skript/pull/7139) Adds universal support for using 'x degrees' and 'x radians' to represent numbers. Radians will be converted to degrees, and degrees simply represent 'x' (i.e. it has no effects). - [#&#8203;7166](https://github.com/SkriptLang/Skript/pull/7166) Adds a function to format a number based on Java's DecimalFormat system. - [#&#8203;7167](https://github.com/SkriptLang/Skript/pull/7167) Adds support for regular expression replacement in the '[replace](https://docs.skriptlang.org/docs.html?search=#EffReplace)' effect. - [#&#8203;7174](https://github.com/SkriptLang/Skript/pull/7174) Adds item support to the '[skull owner](https://docs.skriptlang.org/docs.html?search=#ExprSkullOwner)' expression. - [#&#8203;7190](https://github.com/SkriptLang/Skript/pull/7190) Adds syntax for working with player input events, including the ability to listen for specific key presses and releases. - [#&#8203;7215](https://github.com/SkriptLang/Skript/pull/7215) Adds an expression to obtain the alpha, red, green, or blue value of a color. - [#&#8203;7216](https://github.com/SkriptLang/Skript/pull/7216) Adds syntax for interacting with the patterns of banners. - [#&#8203;7220](https://github.com/SkriptLang/Skript/pull/7220) Adds syntax for using entity snapshots, which represents an entity at a specific point in time. - [#&#8203;7228](https://github.com/SkriptLang/Skript/pull/7228) Adds a warning when running with server pausing enabled. - [#&#8203;7233](https://github.com/SkriptLang/Skript/pull/7233) Adds support for salmon size variants. - [#&#8203;7235](https://github.com/SkriptLang/Skript/pull/7235) Adds 'thrice' to the '[x times](https://docs.skriptlang.org/docs.html?search=#ExprTimes)' expression. - [#&#8203;7242](https://github.com/SkriptLang/Skript/pull/7242) Adds advanced support for working with loot tables. - [#&#8203;7250](https://github.com/SkriptLang/Skript/pull/7250)/[#&#8203;7318](https://github.com/SkriptLang/Skript/pull/7318) Add syntax for working with villager professions and types. - [#&#8203;7260](https://github.com/SkriptLang/Skript/pull/7260) Adds events for when vehicles move or collide. - [#&#8203;7283](https://github.com/SkriptLang/Skript/pull/7283) Adds the 'elytra boost' event and syntax for interacting with it. - [#&#8203;7312](https://github.com/SkriptLang/Skript/pull/7312) Adds a unicode tag for usage in text formatting. - [#&#8203;7320](https://github.com/SkriptLang/Skript/pull/7320) Adds support for using 'event-block' in command events for commands executed from a command block. - [#&#8203;7334](https://github.com/SkriptLang/Skript/pull/7334) Adds experimental support for advanced Script interaction and reflection. - [#&#8203;6702](https://github.com/SkriptLang/Skript/pull/6702) Adds a Script type and reworks existing script-related syntax to work with this new type. - [#&#8203;6706](https://github.com/SkriptLang/Skript/pull/6706) Improves the '[using](https://docs.skriptlang.org/docs.html?search=#CondIsUsingFeature)' condition to support passing 'script' values rather than text. - [#&#8203;6713](https://github.com/SkriptLang/Skript/pull/6713) Adds dynamic function calling through new syntax. - [#&#8203;6719](https://github.com/SkriptLang/Skript/pull/6719) Adds configuration navigation syntax (e.g. working with the raw content of script files). - [#&#8203;7340](https://github.com/SkriptLang/Skript/pull/7340) Added support for using enchantment types with the '[type of](https://docs.skriptlang.org/docs.html?search=#ExprTypeOf)' expression. - [#&#8203;7391](https://github.com/SkriptLang/Skript/pull/7391) Added support for listening for multiple commands for an '[command](https://docs.skriptlang.org/docs.html#command)' event. - [#&#8203;7404](https://github.com/SkriptLang/Skript/pull/7404) Added an additional pattern to the '[vector from yaw and pitch](https://docs.skriptlang.org/docs.html?search=#ExprVectorFromYawAndPitch)' expression to improve its flexibility. ##### Bug Fixes - [#&#8203;6970](https://github.com/SkriptLang/Skript/pull/6970) Fixes an issue where the '[prefix/suffix](https://docs.skriptlang.org/docs.html?search=#ExprPrefixSuffix)' expression could error with some Vault-supporting plugins. - [#&#8203;7023](https://github.com/SkriptLang/Skript/pull/7023) Fixes performance issues with the '[book author](https://docs.skriptlang.org/docs.html?search=#ExprBookAuthor)' expression. - [#&#8203;7055](https://github.com/SkriptLang/Skript/pull/7055) Fixes the inability to spawn chest boats. - [#&#8203;7124](https://github.com/SkriptLang/Skript/pull/7124) Fixes incorrect use of 'wait' in tests. - [#&#8203;7125](https://github.com/SkriptLang/Skript/pull/7125) Fixes incorrect warnings when running tests. - [#&#8203;7131](https://github.com/SkriptLang/Skript/pull/7131) Fixes the firework event not properly filtering by color. - [#&#8203;7163](https://github.com/SkriptLang/Skript/pull/7163) Fixes the remove changer of variables so that it will only remove the first matching element in the list. - [#&#8203;7165](https://github.com/SkriptLang/Skript/pull/7165) Fixes expression conversion in some edge cases. - [#&#8203;7185](https://github.com/SkriptLang/Skript/pull/7185) Fixes several outstanding issues with boats. - [#&#8203;7205](https://github.com/SkriptLang/Skript/pull/7205) Fixes sound syntax in line with Minecraft changes. - [#&#8203;7251](https://github.com/SkriptLang/Skript/pull/7251) More types are able to be compared successfully. - [#&#8203;7252](https://github.com/SkriptLang/Skript/pull/7252) Fixes an issue where the incorrect event block was used in an '[ignition](https://docs.skriptlang.org/docs.html?search=#ignition)'. - [#&#8203;7268](https://github.com/SkriptLang/Skript/pull/7268) Fixes an issue where the using '[x of](https://docs.skriptlang.org/docs.html?search=#ExprXOf)' expression with an invalid amount could cause an error. - [#&#8203;7271](https://github.com/SkriptLang/Skript/pull/7271) Fixes an issue where play sound on some Spigot-based servers would cause exceptions. - [#&#8203;7279](https://github.com/SkriptLang/Skript/pull/7279) Prevents illegal inventory types from being created. - [#&#8203;7301](https://github.com/SkriptLang/Skript/pull/7301) Fixes an error with boat data using `any boat`. - [#&#8203;7304](https://github.com/SkriptLang/Skript/pull/7304) Fixes an issue registering types with unusual plurals (gui, etc.). - [#&#8203;7410](https://github.com/SkriptLang/Skript/pull/7410) Fixed an issue where some exceptions would be silently caught and not reported. - [#&#8203;7430](https://github.com/SkriptLang/Skript/pull/7430) Updated and fixed issues with the example scripts. - [#&#8203;7433](https://github.com/SkriptLang/Skript/pull/7433) Fixed an issue where an internal error could occur due to missing event context. ##### Removals - [#&#8203;7239](https://github.com/SkriptLang/Skript/pull/7239) Removes the unnecessary `download` argument from skript command. - [#&#8203;7338](https://github.com/SkriptLang/Skript/pull/7338) Removes the 'future event-block' event-value for the '[block break](https://docs.skriptlang.org/events.html?search=#break_mine)' event. It did not work properly due to API limitations. ##### Changes - [#&#8203;6203](https://github.com/SkriptLang/Skript/pull/6203) Changes out-of-range dates to return '0 seconds' instead of 'none' for the '[time since](https://docs.skriptlang.org/docs.html?search=#ExprTimeSince)' expression. - [#&#8203;6609](https://github.com/SkriptLang/Skript/pull/6609) Reserves some special characters at the start of variables. - [#&#8203;6884](https://github.com/SkriptLang/Skript/pull/6884) Effect commands are now enabled by default in the test environment server. - [#&#8203;7073](https://github.com/SkriptLang/Skript/pull/7073) Default names are now automatically generated for enum values missing language entries. This provides automatic support for some newer Minecraft content without waiting for a Skript update. - [#&#8203;7084](https://github.com/SkriptLang/Skript/pull/7084) Aliases loading is now performed asynchronously, slightly speeding up server starts. - [#&#8203;7116](https://github.com/SkriptLang/Skript/pull/7116) Improves the full message that is printed when Skript encounters an exception. - [#&#8203;7148](https://github.com/SkriptLang/Skript/pull/7148) Improves the kill effect, **which now bypasses totems of undying**. - [#&#8203;7224](https://github.com/SkriptLang/Skript/pull/7224) Improves the process in which configuration files are updated for new versions. - [#&#8203;7308](https://github.com/SkriptLang/Skript/pull/7308) Improves command suggestions and the output of the '/skript test' command. - [#&#8203;7348](https://github.com/SkriptLang/Skript/pull/7348) Adds two new test-only functions: 'line_separator' and 'file_separator'. - [#&#8203;7364](https://github.com/SkriptLang/Skript/pull/7364) Improved the internal handling of [potion effect types](https://docs.skriptlang.org/docs.html?search=#potioneffecttype). - [#&#8203;7370](https://github.com/SkriptLang/Skript/pull/7370) Improved the documentation for the '[name](https://docs.skriptlang.org/docs.html#ExprName)' expression. ##### API Changes - [#&#8203;5552](https://github.com/SkriptLang/Skript/pull/5552) Adds internal Skript API events, like script initialization and script load events. - [#&#8203;5738](https://github.com/SkriptLang/Skript/pull/5738) Documentation is now generated using GSON. - [#&#8203;5809](https://github.com/SkriptLang/Skript/pull/5809) Improvements to condition parsing order using condition types. - [#&#8203;6246](https://github.com/SkriptLang/Skript/pull/6246) Implements the initial preview of a completely new Registration API. See the pull request for full details. - [#&#8203;6670](https://github.com/SkriptLang/Skript/pull/6670) Removes numerous deprecated classes and deprecated many more. See the pull request for full details. - [#&#8203;6728](https://github.com/SkriptLang/Skript/pull/6728) Adds type converters for addons to support common properties such as 'name' and 'amount'. See the pull request description for full details. - [#&#8203;6873](https://github.com/SkriptLang/Skript/pull/6873) Allows multiple return types in an [ExpressionEntryData](https://github.com/SkriptLang/Skript/blob/master/src/main/java/org/skriptlang/skript/lang/entry/util/ExpressionEntryData.java). - [#&#8203;6905](https://github.com/SkriptLang/Skript/pull/6905) Raises the Java build version to 17. - [#&#8203;6913](https://github.com/SkriptLang/Skript/pull/6913) Automates alias submodule updates (pre-2.10 alias sunset). - [#&#8203;6918](https://github.com/SkriptLang/Skript/pull/6918) Applied new code conventions across the '[lang](https://github.com/SkriptLang/Skript/tree/master/src/main/java/org/skriptlang/skript/lang)' package. - [#&#8203;6993](https://github.com/SkriptLang/Skript/pull/6993) Skript Timespans now implement the full Java time API, making them compatible with external resources. - [#&#8203;7072](https://github.com/SkriptLang/Skript/pull/7072) Supports assigning the indices of list variables in the SET change mode. See the pull request for full details. - [#&#8203;7037](https://github.com/SkriptLang/Skript/pull/7037) Adds Section Expressions, expressions that can have attached sections. Only one may be allowed in a given line. - [#&#8203;7043](https://github.com/SkriptLang/Skript/pull/7043) Exposes method to get the pattern strings of a property expression. - [#&#8203;7047](https://github.com/SkriptLang/Skript/pull/7047) Enforces a limit of one database per backing file/source. - [#&#8203;7053](https://github.com/SkriptLang/Skript/pull/7053) Adds support for asynchronous JUnit tests. - [#&#8203;7057](https://github.com/SkriptLang/Skript/pull/7057) Expands the Condition API to allow for compound conditions (complex nested conditions that evaluate lazily). - [#&#8203;7097](https://github.com/SkriptLang/Skript/pull/7097) Adds default supplier support for the '[EnumClassInfo](https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/classes/EnumClassInfo.java)' utility. - [#&#8203;7106](https://github.com/SkriptLang/Skript/pull/7106) Avoids sending join messages when testing to avoid complexities with mocking players. - [#&#8203;7106](https://github.com/SkriptLang/Skript/pull/7106) Update messages are no longer sent in the testing environment. - [#&#8203;7107](https://github.com/SkriptLang/Skript/pull/7107) Adds a method to get the syntax patterns for property conditions. - [#&#8203;7142](https://github.com/SkriptLang/Skript/pull/7142) Adds test world, block, and location expressions for use in tests. - [#&#8203;7155](https://github.com/SkriptLang/Skript/pull/7155) Adds API that allows syntaxes to throw runtime errors in a controlled manner. - [#&#8203;7168](https://github.com/SkriptLang/Skript/pull/7168) Adds a SyntaxStringBuilder utility class which makes syntax toString implementation simpler. - [#&#8203;7244](https://github.com/SkriptLang/Skript/pull/7244) Makes the builder return itself for convenience. - [#&#8203;7169](https://github.com/SkriptLang/Skript/pull/7169) Change 'expr' in [PropertyExpression](https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/expressions/base/PropertyExpression.java) to @&#8203;UnknownNullability to avoid extraneous nullability warnings. - [#&#8203;7175](https://github.com/SkriptLang/Skript/pull/7175) Skript dates are now a type of Java date, making them compatible with external resources. - [#&#8203;7189](https://github.com/SkriptLang/Skript/pull/7189) Cleans up the Timespan class and proceeds with removing uses of deprecated methods. - [#&#8203;7217](https://github.com/SkriptLang/Skript/pull/7217) Adds utility methods for changing an item's meta using a consumer, along with a method for setting item meta on an object input (handling it being a slot, itemtype, etc.). - [#&#8203;7240](https://github.com/SkriptLang/Skript/pull/7240) Remove test checks for pre-1.19 versions and tests for legacy code. - [#&#8203;7241](https://github.com/SkriptLang/Skript/pull/7241) Fixes change-in-place for variables. - [#&#8203;7245](https://github.com/SkriptLang/Skript/pull/7245) Updates Paper API version for test environments. - [#&#8203;7255](https://github.com/SkriptLang/Skript/pull/7255) Adds a helper method 'Variables#withLocalVariables()' to make it easier to run sections with copied local variables. - [#&#8203;7265](https://github.com/SkriptLang/Skript/pull/7265) Adds event support for when the main Skript configuration is reloaded. - [#&#8203;7267](https://github.com/SkriptLang/Skript/pull/7267) Moves some namespaced key utilities. - [#&#8203;7269](https://github.com/SkriptLang/Skript/pull/7269) Improves registration methods for event values. - [#&#8203;7281](https://github.com/SkriptLang/Skript/pull/7281) Adds a method to syntax for specifying event compatibility. - [#&#8203;7284](https://github.com/SkriptLang/Skript/pull/7284) Adds a 'hasEntry' method for entry containers. - [#&#8203;7285](https://github.com/SkriptLang/Skript/pull/7285) Deprecates the getter class and replaces existing getters. - [#&#8203;7341](https://github.com/SkriptLang/Skript/pull/7341) Cleans up some unused registry classes. - [#&#8203;7368](https://github.com/SkriptLang/Skript/pull/7368) Fixes documentation IDs to not end in `-2`. - [#&#8203;7381](https://github.com/SkriptLang/Skript/pull/7381) Added support for using multiple lines in the '[Since](https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/doc/Since.java)' documentation annotation. <!-- Uncredited: [#&#8203;5905], [#&#8203;7262], [#&#8203;7277], [#&#8203;7303], [#&#8203;7274], [#&#8203;7309], [#&#8203;7310], [#&#8203;7313], [#&#8203;7330], [#&#8203;7335], [#&#8203;7345], [#&#8203;7346], [#&#8203;7293], [#&#8203;7315], [#&#8203;7319], [#&#8203;7305], [#&#8203;7299], [#&#8203;7296], [#&#8203;7273], [#&#8203;7247], [#&#8203;7221], [#&#8203;7219], [#&#8203;7192], [#&#8203;7321], [#&#8203;7344], [#&#8203;7046], [#&#8203;7111], [#&#8203;7147], [#&#8203;7350], [#&#8203;7115], [#&#8203;6667], [#&#8203;6666], [#&#8203;6668], [#&#8203;7325], [#&#8203;7294], [#&#8203;7327], [#&#8203;6663], [#&#8203;6664], [#&#8203;7145], [#&#8203;7291], [#&#8203;7337], [#&#8203;7371], [#&#8203;7369], [#&#8203;7366], [#&#8203;7390], [#&#8203;7401], [#&#8203;7396], [#&#8203;7406], [#&#8203;7405], [#&#8203;7379], [7378] --> [Click here to view the full list of commits made since 2.9.5](https://github.com/SkriptLang/Skript/compare/2.9.5...2.10.0-pre1) ##### Notices ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;0XPYEX0](https://github.com/0XPYEX0) - [@&#8203;Ankoki](https://github.com/Ankoki) - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;Asleeepp](https://github.com/Asleeepp) - [@&#8203;Burbulinis](https://github.com/Burbulinis) ⭐ First contribution! ⭐ - [@&#8203;cheeezburga](https://github.com/cheeezburga) - [@&#8203;Efnilite](https://github.com/Efnilite) - [@&#8203;EquipableMC](https://github.com/EquipableMC) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;Fusezion](https://github.com/Fusezion) - [@&#8203;JakeGBLP](https://github.com/JakeGBLP) - [@&#8203;kyoshuske](https://github.com/kyoshuske) - [@&#8203;Moderocky](https://github.com/Moderocky) - [@&#8203;NotSoDelayed](https://github.com/NotSoDelayed) - [@&#8203;Nuutrai](https://github.com/Nuutrai) ⭐ First contribution! ⭐ - [@&#8203;Phill310](https://github.com/Phill310) - [@&#8203;Pikachu920](https://github.com/Pikachu920) - [@&#8203;ShaneBeee](https://github.com/ShaneBeee) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;TenFont](https://github.com/TenFont) - [@&#8203;TheAbsolutionism](https://github.com/TheAbsolutionism) - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.10.0-pre1`](https://github.com/SkriptLang/Skript/releases/tag/2.10.0-pre1): Pre-Release 2.10.0-pre1 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.9.5...2.10.0-pre1) ##### Skript 2.10.0-pre1 Today, we are kicking off the new year with Skript 2.10.0 Pre-Release 1! As a pre-release, be warned that there may be bugs! We do not recommend running this version on your production servers. This release contains more than 150 new features, bug fixes, and API updates to play around with! Below, you can familiarize yourself with the changes. Additionally, [by clicking here](https://docs.skriptlang.org/docs.html?search=v:2.10.0+), you can view the list of new syntax on our documentation site. As always, report any issues to our [issues page](https://github.com/SkriptLang/Skript/issues)! Per our [release model](https://stable.skriptlang.org/clockwork-release-model), we plan to release 2.10.0 on January 15th. We may release additional pre-releases before then should the need arise. Happy Skripting! ##### Major Changes > \[!IMPORTANT] > **Skript has dropped support for Minecraft versions below 1.19.4.** This means **1.19.4**, **1.20.6**, and **1.21.3/1.21.4** are the supported versions. Going forward, Skript will only support the latest 3 major Minecraft versions. > In addition, Skript now requires **Java 17** to run. While most users are running Java 17 or newer, some may be required to update for this version. > \[!WARNING] > **Addons will likely not initially work with 2.10!** > Due to the removal of the deprecated Converter class, many addons will need to be **recompiled** (no code changes) to work with 2.10. > Addon developers should only need to re-build against 2.10 to fix this issue. > \[!CAUTION] > **Aliases are going away! Your scripts may break if you do not take action.** > This means a lot of item names will be changing to match their in-game ids. In addition, categories and blockdata aliases will also be going away, replaced by tags and blockdata respectively. > > ```applescript > rabbit's foot -> rabbit foot > gold helmet -> golden helmet > any sword -> tag "swords" > waterlogged oak stairs -> oak_stairs[waterlogged=true] > ``` > > If you do not want to make changes to your scripts, the old aliases will be provided along with each Skript release, so you can continue to use them if you'd like. > **See [here](https://github.com/SkriptLang/Skript/discussions/7349) for more details.** ##### Minecraft Tags Skript now supports the ability to use Minecraft tags (`#minecraft:swords`, `#minecraft:logs`, etc.). These are being introduced as a replacement for the current category aliases (`any sword`, `any log`) and should provide much more flexibilty. You can even create your own tags! ```applescript set {_tag} to tag "swords" give the player a random item out of {_tag}'s tag values if the player's tool is tagged as item tag "minecraft:piglin_food": send "Yum!" register an item tag named "my_favorite_blocks" using oak log, stone, and podzol ``` ##### Display Entities The long-awaited support for display entities is finally here! 2.10 includes a lot of syntax for creating, manipulating, and using display entities. ```applescript spawn an oak log block display at player: set the display scale of the display to vector(1, 10, 1) set the display translation of the display to vector(0.5, 0.5, 0.5) rotate display around its local y axis by 45 degrees set the view range of display to 2 ``` More display syntax can be found [on the docs](https://docs.skriptlang.org/docs.html?search=display). ##### Variable Starting Character Reservations Some characters are reserved at the start of variable names. Users will receive a warning when trying to use them. This is so that these characters will be available for special variable functionality in future versions. The following characters are reserved: - `{~variable}` - `{.variable}` - `{$variable}` - `{!variable}` - `{&variable}` - `{^variable}` - `{*variable}` - `{+variable}` - `{-variable}` ##### Registration API (Preview) > \[!CAUTION] > This is a preview feature, meaning it is subject to breaking changes without a deprecation period. This update includes the initial preview of a new Skript/Addon API, starting with addon registration and syntax registration. The main Skript (JavaPlugin) class now has a new method, `instance()`, which provides access to the modern Skript class. This class contains the registered addons and the new `SyntaxRegistry`, which holds all of Skript's (and its addon's) registered syntax. A tutorial with full usage information will be coming in the near future. For now, the full details are available at the [pull request](https://github.com/SkriptLang/Skript/pull/6246). ##### 🧪 Experimental Features Experimental features allow users to enable syntax on a per-script basis: some of these features are new proposals that we are testing, others may have unsafe or complex elements that regular users don't want. Experimental features can be enabled by adding 'using %feature name%' at the top of a script. Please note that anything marked as experimental is subject to changes in future versions. ##### For-Each Loop A new kind of loop syntax that stores the loop index and value in variables for convenience. This can be used to avoid confusion when nesting multiple loops inside each other. ```applescript= for {_index}, {_value} in {my list::*}: broadcast "%{_index}%: %{_value}%" ``` ```applescript= for each {_player} in all players: send "Hello %{_player}%!" to {_player} ``` All existing loop features are also available in this section. ##### Enabling Flag ``` using for loops ``` ##### Queue 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. ```applescript= 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 ``` ```applescript= 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. ##### Enabling Flag ``` using queues ``` ##### Script Reflection This feature includes: - The ability to reference a script in code. - Finding and running functions by name. - Reading configuration files and values. ##### Enabling Flag ``` using script reflection ``` ##### ⚠ Breaking Changes - Out-of-range dates will now return '0 seconds' instead of 'none' in the '[time since](https://docs.skriptlang.org/docs.html?search=#ExprTimeSince)' expression: ```applescript if time since {_date} is less than 3 seconds: # Previously, if {_date} was in the future, this would be false. # Now, this is true, since `time since {_date}` evaluates to 0 seconds. # These situations will not change: # {_date} more than 3 seconds ago -> false # {_date} between 0 and 3 seconds ago -> true ``` - The existing '[fish](https://docs.skriptlang.org/docs.html?search=#fishing)' event has been replaced by [more specific and useful events](https://github.com/SkriptLang/Skript/pull/7137). - The '[kill](https://docs.skriptlang.org/docs.html?search=#EffKill)' effect now bypasses totems of undying. - For the '[script](https://docs.skriptlang.org/docs.html?search=#EffScriptFile)' effect, support for using 'skript %string%' was removed. Simply use 'script %string%' or 'skript file %string%'. - The 'future event-block' in the '[block break](https://docs.skriptlang.org/events.html?search=#break_mine)' event was removed. It did not work in many cases due to API limitations. - In the [VariablesStorage](https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/variables/VariablesStorage.java) class, the field 'databaseName' is no longer 'protected', and the constructor parameter now represents the database type rather than name. See [#&#8203;7074](https://github.com/SkriptLang/Skript/pull/7047) for full details. - In the [Skript](https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/Skript.java) class, the syntax element info getters (e.g. 'getStatements') now return unmodifiable collections. - Numerous API classes were deprecated, and many long deprecated API classes were removed. As a result, **addons will need to be recompiled** against 2.10 to work. See the [pull request](https://github.com/SkriptLang/Skript/pull/6670) for full details. ##### Changelog ##### Additions - [#&#8203;5518](https://github.com/SkriptLang/Skript/pull/5518) Adds support for obtaining multiple random numbers at once with the '[random numbers](https://docs.skriptlang.org/docs.html?search=#ExprRandomNumber)' expression. - [#&#8203;5601](https://github.com/SkriptLang/Skript/pull/5601) Adds syntax for working with display entities. Involves spawning, translating, scaling, rotating, and many other interations with displays. - [#&#8203;6203](https://github.com/SkriptLang/Skript/pull/6203) Adds a 'time until' expression along with a condition for whether a date is in the past or future. - [#&#8203;6419](https://github.com/SkriptLang/Skript/pull/6419) Adds an expression for changing the custom chat completions of players. - [#&#8203;6427](https://github.com/SkriptLang/Skript/pull/6427) Adds support for entity leashing events. - [#&#8203;6439](https://github.com/SkriptLang/Skript/pull/6439) Adds a '/skript list' command which displays the current enabled and disabled scripts. - [#&#8203;6498](https://github.com/SkriptLang/Skript/pull/6498) Adds support for teleport flags to the '[teleport](https://docs.skriptlang.org/docs.html?search=#EffTeleport)' effect. Teleport flags allow retaining entity properties such as position and direction during a teleport. - [#&#8203;6532](https://github.com/SkriptLang/Skript/pull/6532) Adds the entity potion effect event, which occurs when an entity gains or loses an effect. - [#&#8203;6562](https://github.com/SkriptLang/Skript/pull/6562) Adds experimental support for a 'for each index/value' loop syntax. - [#&#8203;6638](https://github.com/SkriptLang/Skript/pull/6638) Adds syntax for interacting with the enchantment glint of an item. - [#&#8203;6698](https://github.com/SkriptLang/Skript/pull/6698) Adds support for the changing of max stack sizes for items and inventories. - [#&#8203;6719](https://github.com/SkriptLang/Skript/pull/6719) Adds experimental support for configuration reading and navigation. - [#&#8203;6741](https://github.com/SkriptLang/Skript/pull/6741) Adds the ability to use gamemodes with the '[is invulnerable](https://docs.skriptlang.org/docs.html?search=#CondIsInvulnerable)' condition. - [#&#8203;6768](https://github.com/SkriptLang/Skript/pull/6768) Adds the piglin barter event (with barter input & output expressions). - [#&#8203;6780](https://github.com/SkriptLang/Skript/pull/6780) Adds a configuration option for all operators to see information when a script is reloaded. - [#&#8203;6849](https://github.com/SkriptLang/Skript/pull/6849) Adds a condition to check whether an entity is saddled. - [#&#8203;6849](https://github.com/SkriptLang/Skript/pull/6849) Adds support for wolf armor in the '[is wearing](https://docs.skriptlang.org/docs.html?search=#CondIsWearing)' condition and the '[equip](https://docs.skriptlang.org/docs.html?search=#EffEquip)' effect. - [#&#8203;6850](https://github.com/SkriptLang/Skript/pull/6850) Adds an effect to tame an entity and a condition to test whether an entity is tamed. - [#&#8203;6851](https://github.com/SkriptLang/Skript/pull/6851) Adds a configuration option to limit the number of variable backup files stored. - [#&#8203;6859](https://github.com/SkriptLang/Skript/pull/6859) Adds an expression to get the command of a command block, as well as a condition and effect to check and set the conditionality of a command block. - [#&#8203;6860](https://github.com/SkriptLang/Skript/pull/6860) Adds support for using wither projectiles in the '[is charged](https://docs.skriptlang.org/docs.html?search=#CondIsCharged)' condition and '[charge](https://docs.skriptlang.org/docs.html?search=#EffCharge)' effect. - [#&#8203;6861](https://github.com/SkriptLang/Skript/pull/6861) Adds an expression to get or modify the taming level of horses. - [#&#8203;6867](https://github.com/SkriptLang/Skript/pull/6867) Adds non-player (other entity) support to the '[can see](https://docs.skriptlang.org/docs.html?search=#CondCanSee)' condition and '[visibility](https://docs.skriptlang.org/docs.html?search=#EffEntityVisibility)' effect. - [#&#8203;6898](https://github.com/SkriptLang/Skript/pull/6898) Adds an effect to immediately detonate a creeper, tnt minecart, primed tnt, firework, or windcharge. - [#&#8203;6900](https://github.com/SkriptLang/Skript/pull/6900) Adds support for obtaining all entities within a cuboid region in the '[entities](https://docs.skriptlang.org/docs.html?search=#ExprEntities)' expression. - [#&#8203;6912](https://github.com/SkriptLang/Skript/pull/6912) Adds a section to filter lists, like the filter expression but with the ability to retain indices. - [#&#8203;6930](https://github.com/SkriptLang/Skript/pull/6930) Adds the option to exclude trailing empty strings from the '[join/split](https://docs.skriptlang.org/docs.html?search=#ExprJoinSplit)' expression. - [#&#8203;6958](https://github.com/SkriptLang/Skript/pull/6958) Adds a warning that is printed when Skript is reloaded via '/reload' or similar means. - [#&#8203;6960](https://github.com/SkriptLang/Skript/pull/6960) Adds a warning for unreachable code (for example, code following a return effect in a function). - [#&#8203;6970](https://github.com/SkriptLang/Skript/pull/6970) Adds support for deleting/resetting the prefix/suffix of players. - [#&#8203;6989](https://github.com/SkriptLang/Skript/pull/6989) Adds a new option to the '[connect](https://docs.skriptlang.org/docs.html?search=#EffConnect)' effect for transfering players to a different server (using the transfer packet in 1.20.5+). - [#&#8203;6997](https://github.com/SkriptLang/Skript/pull/6997) Adds an explicit sort order to the sort effect. - [#&#8203;7001](https://github.com/SkriptLang/Skript/pull/7001) Adds support for using shortened timespan units in commands: `/my_ban_command sovde 1y 2d 3s`. - [#&#8203;7013](https://github.com/SkriptLang/Skript/pull/7013) Adds support for withers to the '[is charged](https://docs.skriptlang.org/docs.html?search=#CondIsCharged)' condition. - [#&#8203;7019](https://github.com/SkriptLang/Skript/pull/7019) Adds an expression to get various sounds of entities, like their death sound, fall damage sound, or sound for eating a certain item. - [#&#8203;7028](https://github.com/SkriptLang/Skript/pull/7028) Adds a list transformation (mapping) expression and effect. - [#&#8203;7030](https://github.com/SkriptLang/Skript/pull/7030) Adds support for using underscores in numbers for readability: `100_000_000`. - [#&#8203;7040](https://github.com/SkriptLang/Skript/pull/7040) Adds an expression to get various sound of blocks, like their break sound, footstep sound, or place sound. - [#&#8203;7041](https://github.com/SkriptLang/Skript/pull/7041) Adds basic support for wolf variants. - [#&#8203;7044](https://github.com/SkriptLang/Skript/pull/7044) Adds proper support for using custom damage causes in the '[damage](https://docs.skriptlang.org/effects.html?search=#EffHealth)' effect. - [#&#8203;7045](https://github.com/SkriptLang/Skript/pull/7045) Adds a last death location expression for players. - [#&#8203;7058](https://github.com/SkriptLang/Skript/pull/7058) Improves the description of the '[sort](https://docs.skriptlang.org/effects.html?search=#EffSort)' effect. - [#&#8203;7061](https://github.com/SkriptLang/Skript/pull/7061) Adds body armor support to the '[armor slot](https://docs.skriptlang.org/docs.html?search=#ExprArmorSlot)' expression. Body armor is for entities such as horses and wolves (e.g. horse armor and wolf armor). - [#&#8203;7064](https://github.com/SkriptLang/Skript/pull/7064) Adds experimental support for queues, a new type of data structure. - [#&#8203;7065](https://github.com/SkriptLang/Skript/pull/7065) Adds support for updating blocks without triggering physics updates. - [#&#8203;7075](https://github.com/SkriptLang/Skript/pull/7075) Adds an event for when blocks drop items when broken. - [#&#8203;7076](https://github.com/SkriptLang/Skript/pull/7076) Adds an expression for the experience pickup cooldown of players, as well as an event for when it changes. - [#&#8203;7079](https://github.com/SkriptLang/Skript/pull/7079) Adds events and syntax for beacons. - [#&#8203;7083](https://github.com/SkriptLang/Skript/pull/7083) Adds the ability to change the '[affected entities](https://docs.skriptlang.org/docs.html?search=#ExprAffectedEntities)' in an '[area of effect cloud effect](https://docs.skriptlang.org/docs.html?search=#aoe_cloud_effect)' event. - [#&#8203;7086](https://github.com/SkriptLang/Skript/pull/7086) Adds expressions to interact with the item flags of items. - [#&#8203;7088](https://github.com/SkriptLang/Skript/pull/7088) Adds syntax to show, hide, and check the visibility of the custom name of an entity. - [#&#8203;7088](https://github.com/SkriptLang/Skript/pull/7088) Adds a condition to check whether a mob was spawned from a spawner. - [#&#8203;7088](https://github.com/SkriptLang/Skript/pull/7088) Adds a condition to check whether an entity is currently ticking. - [#&#8203;7088](https://github.com/SkriptLang/Skript/pull/7088) Adds support for obtaining the maximum on-fire duration to the '[entity fire burn duration](https://docs.skriptlang.org/docs.html?search=#ExprFireTicks)' expression. - [#&#8203;7093](https://github.com/SkriptLang/Skript/pull/7093) Improves existing syntax and adds new syntax for interacting with furnaces. - [#&#8203;7094](https://github.com/SkriptLang/Skript/pull/7094) Adds an effect to open/close the lids of lidded blocks (e.g. chests, shulker boxes), as well as a condition to check whether a lid is open or not. - [#&#8203;7104](https://github.com/SkriptLang/Skript/pull/7104) Adds a condition to check whether a number is evenly divisible by another. - [#&#8203;7105](https://github.com/SkriptLang/Skript/pull/7105) Adds syntax to obtain some client chat options on Paper servers, such as whether a player has chat coloring disabled. - [#&#8203;7110](https://github.com/SkriptLang/Skript/pull/7110) Adds syntax related to animal breeding and age. - [#&#8203;7113](https://github.com/SkriptLang/Skript/pull/7113) Adds 'add' and 'remove' change support to the '[metadata](https://docs.skriptlang.org/docs.html?search=#ExprMetadata)' expression. - [#&#8203;7126](https://github.com/SkriptLang/Skript/pull/7126) Adds automatically generated aliases for modded items. `mod:item` is accessible as `mod's item` or `item from mod`. This feature is not officially supported, as Skript does not officially support any modded platforms. - [#&#8203;7127](https://github.com/SkriptLang/Skript/pull/7127) Adds support for Minecraft tags and custom tags. - [#&#8203;7129](https://github.com/SkriptLang/Skript/pull/7129) Adds a specific error message to catch incorrect usages of 'pretty quotes' instead of the regular quotation mark character. - [#&#8203;7130](https://github.com/SkriptLang/Skript/pull/7130) Allows blockdata to be used as a filter for '[click](https://docs.skriptlang.org/docs.html?search=#click)' events. - [#&#8203;7131](https://github.com/SkriptLang/Skript/pull/7131) Adds a colors event-value to the '[firework](https://docs.skriptlang.org/docs.html?search=#firework_explode)' event. - [#&#8203;7132](https://github.com/SkriptLang/Skript/pull/7132) Adds support for obtaining the 'previous' and 'next' loop-values in a loop. - [#&#8203;7136](https://github.com/SkriptLang/Skript/pull/7136) Converts the shoot effect to an effect-section for more control. - [#&#8203;7137](https://github.com/SkriptLang/Skript/pull/7137) Adds new fishing events and syntax in place of the existing '[fish](https://docs.skriptlang.org/events.html?search=#fishing)' event. - [#&#8203;7139](https://github.com/SkriptLang/Skript/pull/7139) Adds universal support for using 'x degrees' and 'x radians' to represent numbers. Radians will be converted to degrees, and degrees simply represent 'x' (i.e. it has no effects). - [#&#8203;7166](https://github.com/SkriptLang/Skript/pull/7166) Adds a function to format a number based on Java's DecimalFormat system. - [#&#8203;7167](https://github.com/SkriptLang/Skript/pull/7167) Adds support for regular expression replacement in the '[replace](https://docs.skriptlang.org/docs.html?search=#EffReplace)' effect. - [#&#8203;7174](https://github.com/SkriptLang/Skript/pull/7174) Adds item support to the '[skull owner](https://docs.skriptlang.org/docs.html?search=#ExprSkullOwner)' expression. - [#&#8203;7190](https://github.com/SkriptLang/Skript/pull/7190) Adds syntax for working with player input events, including the ability to listen for specific key presses and releases. - [#&#8203;7215](https://github.com/SkriptLang/Skript/pull/7215) Adds an expression to obtain the alpha, red, green, or blue value of a color. - [#&#8203;7216](https://github.com/SkriptLang/Skript/pull/7216) Adds syntax for interacting with the patterns of banners. - [#&#8203;7220](https://github.com/SkriptLang/Skript/pull/7220) Adds syntax for using entity snapshots, which represents an entity at a specific point in time. - [#&#8203;7228](https://github.com/SkriptLang/Skript/pull/7228) Adds a warning when running with server pausing enabled. - [#&#8203;7233](https://github.com/SkriptLang/Skript/pull/7233) Adds support for salmon size variants. - [#&#8203;7235](https://github.com/SkriptLang/Skript/pull/7235) Adds 'thrice' to the '[x times](https://docs.skriptlang.org/docs.html?search=#ExprTimes)' expression. - [#&#8203;7242](https://github.com/SkriptLang/Skript/pull/7242) Adds advanced support for working with loot tables. - [#&#8203;7250](https://github.com/SkriptLang/Skript/pull/7250)/[#&#8203;7318](https://github.com/SkriptLang/Skript/pull/7318) Add syntax for working with villager professions and types. - [#&#8203;7260](https://github.com/SkriptLang/Skript/pull/7260) Adds events for when vehicles move or collide. - [#&#8203;7283](https://github.com/SkriptLang/Skript/pull/7283) Adds the 'elytra boost' event and syntax for interacting with it. - [#&#8203;7312](https://github.com/SkriptLang/Skript/pull/7312) Adds a unicode tag for usage in text formatting. - [#&#8203;7320](https://github.com/SkriptLang/Skript/pull/7320) Adds support for using 'event-block' in command events for commands executed from a command block. - [#&#8203;7334](https://github.com/SkriptLang/Skript/pull/7334) Adds experimental support for advanced Script interaction and reflection. - [#&#8203;6702](https://github.com/SkriptLang/Skript/pull/6702) Adds a Script type and reworks existing script-related syntax to work with this new type. - [#&#8203;6706](https://github.com/SkriptLang/Skript/pull/6706) Improves the '[using](https://docs.skriptlang.org/docs.html?search=#CondIsUsingFeature)' condition to support passing 'script' values rather than text. - [#&#8203;6713](https://github.com/SkriptLang/Skript/pull/6713) Adds dynamic function calling through new syntax. - [#&#8203;6719](https://github.com/SkriptLang/Skript/pull/6719) Adds configuration navigation syntax (e.g. working with the raw content of script files). ##### Bug Fixes - [#&#8203;6970](https://github.com/SkriptLang/Skript/pull/6970) Fixes an issue where the '[prefix/suffix](https://docs.skriptlang.org/docs.html?search=#ExprPrefixSuffix)' expression could error with some Vault-supporting plugins. - [#&#8203;7023](https://github.com/SkriptLang/Skript/pull/7023) Fixes performance issues with the '[book author](https://docs.skriptlang.org/docs.html?search=#ExprBookAuthor)' expression. - [#&#8203;7055](https://github.com/SkriptLang/Skript/pull/7055) Fixes the inability to spawn chest boats. - [#&#8203;7124](https://github.com/SkriptLang/Skript/pull/7124) Fixes incorrect use of 'wait' in tests. - [#&#8203;7125](https://github.com/SkriptLang/Skript/pull/7125) Fixes incorrect warnings when running tests. - [#&#8203;7131](https://github.com/SkriptLang/Skript/pull/7131) Fixes the firework event not properly filtering by color. - [#&#8203;7163](https://github.com/SkriptLang/Skript/pull/7163) Fixes the remove changer of variables so that it will only remove the first matching element in the list. - [#&#8203;7165](https://github.com/SkriptLang/Skript/pull/7165) Fixes expression conversion in some edge cases. - [#&#8203;7185](https://github.com/SkriptLang/Skript/pull/7185) Fixes several outstanding issues with boats. - [#&#8203;7205](https://github.com/SkriptLang/Skript/pull/7205) Fixes sound syntax in line with Minecraft changes. - [#&#8203;7251](https://github.com/SkriptLang/Skript/pull/7251) More types are able to be compared successfully. - [#&#8203;7252](https://github.com/SkriptLang/Skript/pull/7252) Fixes an issue where the incorrect event block was used in an '[ignition](https://docs.skriptlang.org/docs.html?search=#ignition)'. - [#&#8203;7268](https://github.com/SkriptLang/Skript/pull/7268) Fixes an issue where the using '[x of](https://docs.skriptlang.org/docs.html?search=#ExprXOf)' expression with an invalid amount could cause an error. - [#&#8203;7271](https://github.com/SkriptLang/Skript/pull/7271) Fixes an issue where play sound on some Spigot-based servers would cause exceptions. - [#&#8203;7279](https://github.com/SkriptLang/Skript/pull/7279) Prevents illegal inventory types from being created. - [#&#8203;7301](https://github.com/SkriptLang/Skript/pull/7301) Fixes an error with boat data using `any boat`. - [#&#8203;7304](https://github.com/SkriptLang/Skript/pull/7304) Fixes an issue registering types with unusual plurals (gui, etc.). ##### Removals - [#&#8203;7239](https://github.com/SkriptLang/Skript/pull/7239) Removes the unnecessary `download` argument from skript command. - [#&#8203;7338](https://github.com/SkriptLang/Skript/pull/7338) Removes the 'future event-block' event-value for the '[block break](https://docs.skriptlang.org/events.html?search=#break_mine)' event. It did not work properly due to API limitations. ##### Changes - [#&#8203;6203](https://github.com/SkriptLang/Skript/pull/6203) Changes out-of-range dates to return '0 seconds' instead of 'none' for the '[time since](https://docs.skriptlang.org/docs.html?search=#ExprTimeSince)' expression. - [#&#8203;6609](https://github.com/SkriptLang/Skript/pull/6609) Reserves some special characters at the start of variables. - [#&#8203;6884](https://github.com/SkriptLang/Skript/pull/6884) Effect commands are now enabled by default in the test environment server. - [#&#8203;7073](https://github.com/SkriptLang/Skript/pull/7073) Default names are now automatically generated for enum values missing language entries. This provides automatic support for some newer Minecraft content without waiting for a Skript update. - [#&#8203;7084](https://github.com/SkriptLang/Skript/pull/7084) Aliases loading is now performed asynchronously, slightly speeding up server starts. - [#&#8203;7116](https://github.com/SkriptLang/Skript/pull/7116) Improves the full message that is printed when Skript encounters an exception. - [#&#8203;7148](https://github.com/SkriptLang/Skript/pull/7148) Improves the kill effect, **which now bypasses totems of undying**. - [#&#8203;7224](https://github.com/SkriptLang/Skript/pull/7224) Improves the process in which configuration files are updated for new versions. - [#&#8203;7308](https://github.com/SkriptLang/Skript/pull/7308) Improves command suggestions and the output of the '/skript test' command. - [#&#8203;7348](https://github.com/SkriptLang/Skript/pull/7348) Adds two new test-only functions: 'line\_separator' and 'file\_separator'. ##### API Changes - [#&#8203;5552](https://github.com/SkriptLang/Skript/pull/5552) Adds internal Skript API events, like script initialization and script load events. - [#&#8203;5738](https://github.com/SkriptLang/Skript/pull/5738) Documentation is now generated using GSON. - [#&#8203;5809](https://github.com/SkriptLang/Skript/pull/5809) Improvements to condition parsing order using condition types. - [#&#8203;6246](https://github.com/SkriptLang/Skript/pull/6246) Implements the initial preview of a completely new Registration API. See the pull request for full details. - [#&#8203;6670](https://github.com/SkriptLang/Skript/pull/6670) Removes numerous deprecated classes and deprecated many more. See the pull request for full details. - [#&#8203;6728](https://github.com/SkriptLang/Skript/pull/6728) Adds type converters for addons to support common properties such as 'name' and 'amount'. See the pull request description for full details. - [#&#8203;6873](https://github.com/SkriptLang/Skript/pull/6873) Allows multiple return types in an [ExpressionEntryData](https://github.com/SkriptLang/Skript/blob/master/src/main/java/org/skriptlang/skript/lang/entry/util/ExpressionEntryData.java). - [#&#8203;6905](https://github.com/SkriptLang/Skript/pull/6905) Raises the Java build version to 17. - [#&#8203;6913](https://github.com/SkriptLang/Skript/pull/6913) Automates alias submodule updates (pre-2.10 alias sunset). - [#&#8203;6918](https://github.com/SkriptLang/Skript/pull/6918) Applied new code conventions across the '[lang](https://github.com/SkriptLang/Skript/tree/master/src/main/java/org/skriptlang/skript/lang)' package. - [#&#8203;6993](https://github.com/SkriptLang/Skript/pull/6993) Skript Timespans now implement the full Java time API, making them compatible with external resources. - [#&#8203;7072](https://github.com/SkriptLang/Skript/pull/7072) Supports assigning the indices of list variables in the SET change mode. See the pull request for full details. - [#&#8203;7037](https://github.com/SkriptLang/Skript/pull/7037) Adds Section Expressions, expressions that can have attached sections. Only one may be allowed in a given line. - [#&#8203;7043](https://github.com/SkriptLang/Skript/pull/7043) Exposes method to get the pattern strings of a property expression. - [#&#8203;7047](https://github.com/SkriptLang/Skript/pull/7047) Enforces a limit of one database per backing file/source. - [#&#8203;7053](https://github.com/SkriptLang/Skript/pull/7053) Adds support for asynchronous JUnit tests. - [#&#8203;7057](https://github.com/SkriptLang/Skript/pull/7057) Expands the Condition API to allow for compound conditions (complex nested conditions that evaluate lazily). - [#&#8203;7097](https://github.com/SkriptLang/Skript/pull/7097) Adds default supplier support for the '[EnumClassInfo](https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/classes/EnumClassInfo.java)' utility. - [#&#8203;7106](https://github.com/SkriptLang/Skript/pull/7106) Avoids sending join messages when testing to avoid complexities with mocking players. - [#&#8203;7106](https://github.com/SkriptLang/Skript/pull/7106) Update messages are no longer sent in the testing environment. - [#&#8203;7107](https://github.com/SkriptLang/Skript/pull/7107) Adds a method to get the syntax patterns for property conditions. - [#&#8203;7142](https://github.com/SkriptLang/Skript/pull/7142) Adds test world, block, and location expressions for use in tests. - [#&#8203;7155](https://github.com/SkriptLang/Skript/pull/7155) Adds API that allows syntaxes to throw runtime errors in a controlled manner. - [#&#8203;7168](https://github.com/SkriptLang/Skript/pull/7168) Adds a SyntaxStringBuilder utility class which makes syntax toString implementation simpler. - [#&#8203;7244](https://github.com/SkriptLang/Skript/pull/7244) Makes the builder return itself for convenience. - [#&#8203;7169](https://github.com/SkriptLang/Skript/pull/7169) Change 'expr' in [PropertyExpression](https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/expressions/base/PropertyExpression.java) to [@&#8203;UnknownNullability](https://github.com/UnknownNullability) to avoid extraneous nullability warnings. - [#&#8203;7175](https://github.com/SkriptLang/Skript/pull/7175) Skript dates are now a type of Java date, making them compatible with external resources. - [#&#8203;7189](https://github.com/SkriptLang/Skript/pull/7189) Cleans up the Timespan class and proceeds with removing uses of deprecated methods. - [#&#8203;7217](https://github.com/SkriptLang/Skript/pull/7217) Adds utility methods for changing an item's meta using a consumer, along with a method for setting item meta on an object input (handling it being a slot, itemtype, etc.). - [#&#8203;7240](https://github.com/SkriptLang/Skript/pull/7240) Remove test checks for pre-1.19 versions and tests for legacy code. - [#&#8203;7241](https://github.com/SkriptLang/Skript/pull/7241) Fixes change-in-place for variables. - [#&#8203;7245](https://github.com/SkriptLang/Skript/pull/7245) Updates Paper API version for test environments. - [#&#8203;7255](https://github.com/SkriptLang/Skript/pull/7255) Adds a helper method 'Variables#withLocalVariables()' to make it easier to run sections with copied local variables. - [#&#8203;7265](https://github.com/SkriptLang/Skript/pull/7265) Adds event support for when the main Skript configuration is reloaded. - [#&#8203;7267](https://github.com/SkriptLang/Skript/pull/7267) Moves some namespaced key utilities. - [#&#8203;7269](https://github.com/SkriptLang/Skript/pull/7269) Improves registration methods for event values. - [#&#8203;7281](https://github.com/SkriptLang/Skript/pull/7281) Adds a method to syntax for specifying event compatibility. - [#&#8203;7284](https://github.com/SkriptLang/Skript/pull/7284) Adds a 'hasEntry' method for entry containers. - [#&#8203;7285](https://github.com/SkriptLang/Skript/pull/7285) Deprecates the getter class and replaces existing getters. - [#&#8203;7341](https://github.com/SkriptLang/Skript/pull/7341) Cleans up some unused registry classes. [Click here to view the full list of commits made since 2.9.5](https://github.com/SkriptLang/Skript/compare/2.9.5...2.10.0-pre1) ##### Notices ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;0XPYEX0](https://github.com/0XPYEX0) - [@&#8203;Ankoki](https://github.com/Ankoki) - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;Asleeepp](https://github.com/Asleeepp) - [@&#8203;Burbulinis](https://github.com/Burbulinis) ⭐ First contribution! ⭐ - [@&#8203;cheeezburga](https://github.com/cheeezburga) - [@&#8203;Efnilite](https://github.com/Efnilite) - [@&#8203;EquipableMC](https://github.com/EquipableMC) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;Fusezion](https://github.com/Fusezion) - [@&#8203;JakeGBLP](https://github.com/JakeGBLP) - [@&#8203;kyoshuske](https://github.com/kyoshuske) - [@&#8203;Moderocky](https://github.com/Moderocky) - [@&#8203;NotSoDelayed](https://github.com/NotSoDelayed) - [@&#8203;Nuutrai](https://github.com/Nuutrai) ⭐ First contribution! ⭐ - [@&#8203;Phill310](https://github.com/Phill310) - [@&#8203;Pikachu920](https://github.com/Pikachu920) - [@&#8203;ShaneBeee](https://github.com/ShaneBeee) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;TenFont](https://github.com/TenFont) - [@&#8203;TheAbsolutionism](https://github.com/TheAbsolutionism) - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.9.5`](https://github.com/SkriptLang/Skript/releases/tag/2.9.5): Patch Release 2.9.5 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.9.4...2.9.5) ##### Skript 2.9.5 Skript 2.9.5 is here with a handful of new bug fixes. As always, you can report any issues on our [issue tracker](https://github.com/SkriptLang/Skript/issues). Happy Skripting! ##### Changelog ##### Tweaks - [#&#8203;7232](https://github.com/SkriptLang/Skript/pull/7232) Improved the documentation of the 'projectile hit' event to be up to date with the 'victim' syntax. ##### Bug Fixes - [#&#8203;7062](https://github.com/SkriptLang/Skript/pull/7062) Fixed an error that would occur when attempting to place blocks between two points above the world limit. - [#&#8203;7120](https://github.com/SkriptLang/Skript/pull/7120) Fixed an issue where various expressions (enchant effect, replace effect, vector expressions, etc.) would overwrite the indices of list variables used. - [#&#8203;7152](https://github.com/SkriptLang/Skript/pull/7152) Fixed an issue where player skull textures would not immediately load on Paper (loading is now forced). - [#&#8203;7188](https://github.com/SkriptLang/Skript/pull/7188) Fixed an issue where plural event values did not work with 'past' and 'future' time states. - [#&#8203;7195](https://github.com/SkriptLang/Skript/pull/7195) Fixed a few Turkish language mistakes. - [#&#8203;7199](https://github.com/SkriptLang/Skript/pull/7199) Fixed multiple issues with playing sounds on 1.21.3+. - [#&#8203;7202](https://github.com/SkriptLang/Skript/pull/7202) Fixed an error that could occur when using invalid regular expression patterns in the split expression. - [#&#8203;7210](https://github.com/SkriptLang/Skript/pull/7210) Fixed long overflow when performing arithmetic. - [#&#8203;7230](https://github.com/SkriptLang/Skript/pull/7230) Fixed an issue that could occur when trying to grow new tree types (e.g. pale oak). ##### API Additions - [#&#8203;7120](https://github.com/SkriptLang/Skript/pull/7120) Added a new 'Expression#changeInPlace()' method for changing the elements of an expression without changing the entire object. For example, this allows the values of a list variable to be updated while preserving the indices. - [#&#8203;7207](https://github.com/SkriptLang/Skript/pull/7207) Updated the 'Arithmetics#exactOperationExists' and 'Arithmetics#exactDifferenceExists' methods to be public. They act as a safe way to check arithmetic operation existence during the registration period. [Click here to view the full list of commits made since 2.9.4](https://github.com/SkriptLang/Skript/compare/2.9.4...2.9.5) ##### Notices ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;Asleeepp](https://github.com/Asleeepp) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;ShaneBeee](https://github.com/ShaneBeee) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;TheAbsolutionism](https://github.com/TheAbsolutionism) - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.9.4`](https://github.com/SkriptLang/Skript/releases/tag/2.9.4): Patch 2.9.4 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.9.3...2.9.4) ##### Skript 2.9.4 Skript 2.9.4 is here with even more bug fixes and early support for Minecraft 1.21.3. As always, you can report any issues on our [issue tracker](https://github.com/SkriptLang/Skript/issues). Happy Skripting! ##### Changelog ##### Bug Fixes - [#&#8203;7141](https://github.com/SkriptLang/Skript/pull/7141) Fixes leather horse armor being unequipable. - [#&#8203;7143](https://github.com/SkriptLang/Skript/pull/7143) Fixed entries being case-sensitive, preventing using capital letters in entries like 'Usage: ' for commands. ##### Additions - [#&#8203;7163](https://github.com/SkriptLang/Skript/pull/7173)/[#&#8203;7176](https://github.com/SkriptLang/Skript/pull/7176) Added early support for Minecraft 1.21.3 features > This includes: Pale Garden biome, creaking entity, baby squid entity, baby glow squid entity, baby dolphin entity [Click here to view the full list of commits made since 2.9.3](https://github.com/SkriptLang/Skript/compare/2.9.3...2.9.4) ##### Notices ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;Efnilite](https://github.com/Efnilite) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;sovdeeth](https://github.com/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>. ### [`v2.9.3`](https://github.com/SkriptLang/Skript/releases/tag/2.9.3): Patch 2.9.3 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.9.2...2.9.3) ##### Skript 2.9.3 Skript 2.9.3 is here with even more bug fixes. As always, you can report any issues on our [issue tracker](https://github.com/SkriptLang/Skript/issues). We are also excited to welcome **six** new members to our team! These new members were selected from the numerous applications we received, and they have already been hard at work troubleshooting issues, patching bugs, and building new features. The full list of new members is as follows: - [@&#8203;cheeezburga](https://github.com/cheeezburga) - [@&#8203;Efnilite](https://github.com/Efnilite) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;Pesekjak](https://github.com/Pesekjak) - [@&#8203;Romitou](https://github.com/Romitou) - [@&#8203;TenFont](https://github.com/TenFont) Happy Skripting! ##### Changelog ##### Bug Fixes - [#&#8203;7024](https://github.com/SkriptLang/Skript/pull/7024) Fixed an error that could occur when using invalid inputs in the 'look at' effect. - [#&#8203;7027](https://github.com/SkriptLang/Skript/pull/7027) Fixed some bStats reporting issues from the recent changes. - [#&#8203;7031](https://github.com/SkriptLang/Skript/pull/7031) Fixed formatting issues when reloading a directory. - [#&#8203;7036](https://github.com/SkriptLang/Skript/pull/7036) Fixed numerous and/or warnings that occurred in the tests. - [#&#8203;7038](https://github.com/SkriptLang/Skript/pull/7038) Fixed the within condition returning wrong values when negated and given a null input. - [#&#8203;7052](https://github.com/SkriptLang/Skript/pull/7052) Fixed an issue where 'Dutch' was not one of the language options listed in the config. - [#&#8203;7056](https://github.com/SkriptLang/Skript/pull/7056) Fixed removing entries from the hover list in a server ping event. - [#&#8203;7060](https://github.com/SkriptLang/Skript/pull/7060) Fixed exponents capping at long max value. - [#&#8203;7066](https://github.com/SkriptLang/Skript/pull/7066) Fixed an issue where the 'swim toggle' event could be cancelled. An error is now printed as cancelling it has no effect. - [#&#8203;7067](https://github.com/SkriptLang/Skript/pull/7067) Fixed an internal testing issue with the parse structure. - [#&#8203;7082](https://github.com/SkriptLang/Skript/pull/7082) Fixed an issue with modifying world times. - [#&#8203;7085](https://github.com/SkriptLang/Skript/pull/7085) Fixed an error message that could occur from unregistered types in changers. - [#&#8203;7087](https://github.com/SkriptLang/Skript/pull/7087) Fixed an issue where legacy materials were used in places they shouldn't. - [#&#8203;7091](https://github.com/SkriptLang/Skript/pull/7091) Fixed a bug when setting the profile of a skull to an offline player without a username. - [#&#8203;7121](https://github.com/SkriptLang/Skript/pull/7121) Fixed a redundant material namespace check. ##### API Updates - [#&#8203;6992](https://github.com/SkriptLang/Skript/pull/6992) Removed the usage of Eclipse annotations package. The JetBrains annotations package is now preferred. - [#&#8203;7089](https://github.com/SkriptLang/Skript/pull/7089) Introduced an official checkstyle for code formatting warnings. - [#&#8203;7095](https://github.com/SkriptLang/Skript/pull/7095) Prevents delays from being used in the testing system (excluding JUnit). [Click here to view the full list of commits made since 2.9.2](https://github.com/SkriptLang/Skript/compare/2.9.2...2.9.3) ##### Notices ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;0XPYEX0](https://github.com/0XPYEX0) - [@&#8203;Asleeepp](https://github.com/Asleeepp) - [@&#8203;cheeezburga](https://github.com/cheeezburga) - [@&#8203;Efnilite](https://github.com/Efnilite) - [@&#8203;Moderocky](https://github.com/Moderocky) - [@&#8203;Pesekjak](https://github.com/Pesekjak) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;Sparky200](https://github.com/Sparky200) - [@&#8203;TenFont](https://github.com/TenFont) - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) 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.9.2`](https://github.com/SkriptLang/Skript/releases/tag/2.9.2): Patch Release 2.9.2 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.9.1...2.9.2) ##### Skript 2.9.2 Skript 2.9.2 is here with more bug fixes and a few minor additions and tweaks. As always, you can report any issues on our [issue tracker](https://github.com/SkriptLang/Skript/issues). Happy Skripting! ##### Changelog ##### Additions - [#&#8203;6942](https://github.com/SkriptLang/Skript/pull/6942) Added Dutch language support. - [#&#8203;7008](https://github.com/SkriptLang/Skript/pull/7008) Added support trial spawners in the spawner type syntax. ##### Tweaks - [#&#8203;6984](https://github.com/SkriptLang/Skript/pull/6984) Enhanced and expanded the BStats charts. - [#&#8203;7023](https://github.com/SkriptLang/Skript/pull/7023) Improved the performance of the 'book authors' expression. ##### Bug Fixes - [#&#8203;5073](https://github.com/SkriptLang/Skript/pull/5073) Fixed an issue where items did not work with the 'is of type' condition. - [#&#8203;6936](https://github.com/SkriptLang/Skript/pull/6936) Fixed an issue with unreliable parsing of quotes in command arguments. - [#&#8203;6942](https://github.com/SkriptLang/Skript/pull/6942) Fixed a mistake in the German language support. - [#&#8203;6982](https://github.com/SkriptLang/Skript/pull/6982) Fixed some cases of incorrect word pluralization. - [#&#8203;6983](https://github.com/SkriptLang/Skript/pull/6983) Fixed a faulty error message in the 'return' effect. - [#&#8203;6988](https://github.com/SkriptLang/Skript/pull/6988) Fixed input validation errors that could occur with the 'hover list' expression on newer versions. - [#&#8203;6996](https://github.com/SkriptLang/Skript/pull/6996) Fixed a concurrency issue with default variables. - [#&#8203;7018](https://github.com/SkriptLang/Skript/pull/7018) Fixed the localization of the 'horse jump strength' attribute. - [#&#8203;7016](https://github.com/SkriptLang/Skript/pull/7016)/[#&#8203;7022](https://github.com/SkriptLang/Skript/pull/7022) Fixed additional version support issues with the 'play sound' effect. - [#&#8203;7025](https://github.com/SkriptLang/Skript/pull/7025) Fixed an issue with the 'vehicle' expression that could prevent Skript from loading on newer versions. [Click here to view the full list of commits made since 2.9.1](https://github.com/SkriptLang/Skript/compare/2.9.1...2.9.2) ##### Notices ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;Asleeepp](https://github.com/Asleeepp) - [@&#8203;Efnilite](https://github.com/Efnilite) - [@&#8203;Moderocky](https://github.com/Moderocky) - [@&#8203;Mr-Darth](https://github.com/Mr-Darth) - [@&#8203;mugu2006](https://github.com/mugu2006) - [@&#8203;Mwexim](https://github.com/Mwexim) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.9.1`](https://github.com/SkriptLang/Skript/releases/tag/2.9.1): Patch Release 2.9.1 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.9.0...2.9.1) ##### Skript 2.9.1 Skript 2.9.1 is here to resolve some of the most notable issues reported with 2.9.0. We will continue to assess stability and make fixes as necessary. As always, you can report any issues on our [issue tracker](https://github.com/SkriptLang/Skript/issues). Happy Skripting! ##### Changelog ##### Additions - [#&#8203;6906](https://github.com/SkriptLang/Skript/pull/6906) Added some additional spawn reasons from 1.21. - [#&#8203;6919](https://github.com/SkriptLang/Skript/pull/6919) Added 'pufferfish' as an alias for the 'puffer fish' entity data. ##### Tweaks - [#&#8203;6854](https://github.com/SkriptLang/Skript/pull/6854) Updated the display name of potion effect types from 'potion' to 'potion effect type'. ##### Bug Fixes - [#&#8203;6897](https://github.com/SkriptLang/Skript/pull/6897) Fixed an issue where sorting the indices of a list with children caused an error. - [#&#8203;6909](https://github.com/SkriptLang/Skript/pull/6909) Fixed an issue with Timespan#getAs(), which was breaking timespan arithmetic. - [#&#8203;6910](https://github.com/SkriptLang/Skript/pull/6910) Fixed an issue where the 'play sound' effect would cause runtime errors on some server versions. - [#&#8203;6926](https://github.com/SkriptLang/Skript/pull/6926) Fixed an issue where Skript could fail to start on some 1.21 server versions. - [#&#8203;6932](https://github.com/SkriptLang/Skript/pull/6932) Fixed an issue with the SimplifiedChinese translation that caused a startup error. - [#&#8203;6947](https://github.com/SkriptLang/Skript/pull/6947) Fixed an issue where the 'remaining air' expression would cause runtime errors. - [#&#8203;6948](https://github.com/SkriptLang/Skript/pull/6948) Fixed an issue where using some events would cause parsetime errors. - [#&#8203;6949](https://github.com/SkriptLang/Skript/pull/6949) Fixed an issue where reloading the aliases would not automatically regenerate missing aliases. [Click here to view the full list of commits made since 2.9.0](https://github.com/SkriptLang/Skript/compare/2.9.0...2.9.1) ##### Notices ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;EquipableMC](https://github.com/EquipableMC) - [@&#8203;potaromc](https://github.com/potaromc) - [@&#8203;ShaneBeee](https://github.com/ShaneBeee) - [@&#8203;sovdeeth](https://github.com/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>. ### [`v2.9.0`](https://github.com/SkriptLang/Skript/releases/tag/2.9.0): Feature Release 2.9.0 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.9.0-pre2...2.9.0) ##### Skript 2.9.0 Skript 2.9.0 is here with dozens of new features, quality-of-life improvements, and bug fixes. Notably, this release includes support for Minecraft 1.21. We especially want to thank the recent influx of new contributors, many of whom are included in this update. Every contributor means a little less work for the team and a little more progress for Skript, so please, if you want a feature in Skript, go ahead and try to make a pull request! New contributors are very welcome! You can review our contributing guide [by clicking here](https://github.com/SkriptLang/Skript/blob/master/.github/contributing.md). Below, you can familiarize yourself with the changes. Additionally, [by clicking here](https://docs.skriptlang.org/docs.html?search=v:2.9.0+), you can view the list of new syntax on our documentation site. As always, report any issues to our [issues page](https://github.com/SkriptLang/Skript/issues)! Per our [new release model](https://stable.skriptlang.org/clockwork-release-model), we plan to release 2.9.1 on August 1st to address any immediate issues that are spotted with this release. Should it be necessary, an emergency patch release may come before then. Happy Skripting! ##### Major Changes > \[!IMPORTANT] > Skript now requires **Java 11** to run. While most users are running Java 11 or newer, some may be required to update for this version. Java 11 is supported on all versions Skript supports. - Skript can now listen to events cancelled by other plugins! Your current scripts will behave the same as they always have, but there's now the option to listen to cancelled, uncancelled, or both kinds at once: ```applescript on break of stone: # Normal behavior, only listens to uncancelled break events. on uncancelled break of stone: # Same as 'on break of stone', only uncancelled. on cancelled break of stone: # Will only listen to cancelled events. For example, # when Worldguard prevents a block break in a protected region. on any break of stone: # Will listen to both cancelled and uncancelled events. # Finally, 'event is cancelled' will be useful! on all break of stone: # Same as 'on any break of stone'. ``` - Alternatively, you can set the new `listen to cancelled events by default` config option to `true` to allow events to listen to both uncancelled and cancelled events by default: ``` on break of stone: # Now listens to both cancelled and uncancelled events # if the config option is set to true. ``` - Added a config option to allow case-insensitive commands, so your accidental capslock won't mess you up as much! ```applescript # default: only /test # insensitive: /test, /TEST, /tEsT... command /test: trigger: broadcast "test!" ``` - Adds multi-line comments. Comments are opened and closed with **three** hashtags `###` alone on a line. ```applescript This is code ### | This is a comment | ### This is code (again) ``` - Triple-hashtags in the middle of a line (e.g. `hello ### there`) will **not** start or end a comment. - Support for string 'concatenation'! - Text can be appended to other text (e.g. `set {text} to "hello" + "there"`) with the addition operator. - The `concat(...)` function joins any text or objects together into a single text. - We have exposed the `load default aliases` option in `config.sk`, which allows you to tell Skript to only load aliases in the `plugins/Skript/aliases` folder. You can provide as many or as few (even none, if you want!) aliases as you like. We will provide the default folder in the GitHub release for your convenience. ##### ⚠ Breaking Changes - `#` characters in strings no longer need to be doubled! Skript can now tell that you are writing a string and will not start a comment in the middle of it. This change means all your `##` will now appear as two `#` instead of one! This won't break hex colours, those support either one or two `#`'s, but it may break other text! ```applescript # before: "<##aabbcc>I'm ##&#8203;1, baby!" -> "I'm #&#8203;1, baby!" # after "<##aabbcc>I'm ##&#8203;1, baby!" -> "I'm ##&#8203;1, baby!" "<#aabbcc>I'm #&#8203;1, baby!" -> "I'm #&#8203;1, baby!" ``` - Timespans will now show the weeks and years instead of stopping at days: ```patch broadcast "%{_timespan}%" - "378 days and 20 minutes" + "1 year and 1 week and 6 days and 20 minutes" ``` - The names of function parameters can no longer include the following characters: `(){}\",`. - `newl` and `nline` are no longer valid syntaxes for the `newline` expression, but `new line` is now valid. - As mentioned above, `#` characters in strings no longer need to be doubled. This will mean existing doubled `#`s will appear as two, rather than one. - The option to use `non-air` instead of `solid` in the `highest solid block` expression has been removed. - Using `on teleport` will now trigger for non-player entities. To detect only player teleports, use `on player teleport`. ##### Changelog ##### Additions - [#&#8203;4661](https://github.com/SkriptLang/Skript/pull/4661) Added support for using weeks, months, and years in timespans. They are treated as 7 days, 30 days, and 365 days respectively. Additionally, an expression to obtain a timespan as a specific unit of time (e.g. as hours, days, etc.). - [#&#8203;5284](https://github.com/SkriptLang/Skript/pull/5284) Added a `lowest solid block` expression for obtaining the lowest solid block at a location. - [#&#8203;5298](https://github.com/SkriptLang/Skript/pull/5298) Added the ability to directly set entity and player pitch/yaw. - [#&#8203;5422](https://github.com/SkriptLang/Skript/pull/5422) Added support for enforcing the whitelist and working with offline players for it. - [#&#8203;5691](https://github.com/SkriptLang/Skript/pull/5691) Added documentation details for whether an event can be cancelled. - [#&#8203;5698](https://github.com/SkriptLang/Skript/pull/5698) Added support for obtaining the player represented by a player head block. - [#&#8203;6105](https://github.com/SkriptLang/Skript/pull/6105) Added an expression to determine whether a player is connected rather than online. Specifically, `is online` may continue to return true for players that have disconnected and then reconnected. - [#&#8203;6131](https://github.com/SkriptLang/Skript/pull/6131) Added the ability to play sounds from entities and specify a sound seed (instead of it being randomized each time). - [#&#8203;6160](https://github.com/SkriptLang/Skript/pull/6160) Added the option of using `breakable` with the existing unbreakable syntaxes. - [#&#8203;6164](https://github.com/SkriptLang/Skript/pull/6164) Added more internal tests for item-related syntaxes. - [#&#8203;6207](https://github.com/SkriptLang/Skript/pull/6207) Added the ability to listen to cancelled events. - [#&#8203;6272](https://github.com/SkriptLang/Skript/pull/6272) Added Russian translations. - [#&#8203;6334](https://github.com/SkriptLang/Skript/pull/6334) Added an expression for obtaining the codepoint of a character and the character reresented by a codepoint. - [#&#8203;6339](https://github.com/SkriptLang/Skript/pull/6339) Added support for filtering a heal event by entity types and by heal reason. - [#&#8203;6393](https://github.com/SkriptLang/Skript/pull/6393) Added `invincible` as a synonym of `invulnerable` in related syntaxes. - [#&#8203;6422](https://github.com/SkriptLang/Skript/pull/6422) Added a distinction when using the `actual` part of the target block expression. When `actual` is used, the hitboxes of blocks will be considered. - [#&#8203;6456](https://github.com/SkriptLang/Skript/pull/6456) Added syntax for bells and bell events. - [#&#8203;6506](https://github.com/SkriptLang/Skript/pull/6506) Added a condition for whether an entity is pathfinding. - [#&#8203;6530](https://github.com/SkriptLang/Skript/pull/6530) Expanded the `teleport` event to trigger when non-player entities are teleported. **NOTE: This means `on teleport` will now trigger for entities other than players. Use `on player teleport` for detecting only player teleports.** - [#&#8203;6549](https://github.com/SkriptLang/Skript/pull/6549) Added support for suppressing deprecated syntax warnings. - [#&#8203;6558](https://github.com/SkriptLang/Skript/pull/6558) Added multi-line comments using `###` (see above). - [#&#8203;6576](https://github.com/SkriptLang/Skript/pull/6576) Added support for combining strings using the addition (`+`) symbol. - [#&#8203;6577](https://github.com/SkriptLang/Skript/pull/6577) Added a configuration option to allow case-insensitive Skript commands. - [#&#8203;6596](https://github.com/SkriptLang/Skript/pull/6596) Added an event for when endermen become enraged. - [#&#8203;6627](https://github.com/SkriptLang/Skript/pull/6627) Added the ability to use expressions in the command usage entry. - [#&#8203;6639](https://github.com/SkriptLang/Skript/pull/6639) Added a condition, effect, and expression for managing the fire resistance property of an item. - [#&#8203;6659](https://github.com/SkriptLang/Skript/pull/6659) Added support for logging messages with warning and error severities. - [#&#8203;6680](https://github.com/SkriptLang/Skript/pull/6680) Added a configuration option to allow all events by default to trigger even when the event is already cancelled. - [#&#8203;6712](https://github.com/SkriptLang/Skript/pull/6712) Added an effect to show/hide item tooltips and a condition to check whether an item's tooltip is visible. - [#&#8203;6737](https://github.com/SkriptLang/Skript/pull/6737) Adds an effect to sort a list by an arbitrary mapping expression. (ex: `sort {_list-of-players::*} by {hide-and-seek::%input%::score}`) - [#&#8203;6748](https://github.com/SkriptLang/Skript/pull/6748) Added a `whether <condition>` expression to get the boolean (true/false) representation of a condition (example: `send "Flying: %whether player is flying%"`). - [#&#8203;6749](https://github.com/SkriptLang/Skript/pull/6749) Added support for dividing timespans by timespans to get numbers. (`1 minute / 15 seconds = 4`) - [#&#8203;6791](https://github.com/SkriptLang/Skript/pull/6791) Added support for numerous 1.21 attributes. - [#&#8203;6687](https://github.com/SkriptLang/Skript/pull/6687) Added support for using (not creating) custom enchantments and referencing enchantments by namespace/key. - [#&#8203;6828](https://github.com/SkriptLang/Skript/pull/6828) Added the ability to explictly delete the message in join/death/quit events. - [#&#8203;6831](https://github.com/SkriptLang/Skript/pull/6831) Added the ability to prevent online lookups when using the offlineplayer function. - [#&#8203;6835](https://github.com/SkriptLang/Skript/pull/6835) Added the ability to also kick a player when using the ban effect. - [#&#8203;6895](https://github.com/SkriptLang/Skript/pull/6895) Added support for 1.21 damage causes and spawn reasons. ##### Bug Fixes - [#&#8203;5422](https://github.com/SkriptLang/Skript/pull/5422) Fixed several issues that resulted in the whitelist condition returning incorrect results. - [#&#8203;6573](https://github.com/SkriptLang/Skript/pull/6573) Fixes `is connected` pattern to support only Paper server. - [#&#8203;6797](https://github.com/SkriptLang/Skript/pull/6797) Fixes issues with the `last damage` expression. - [#&#8203;6803](https://github.com/SkriptLang/Skript/pull/6803) Fixes an issue where custom maximum durability did not work for items with a custom durability. - [#&#8203;6821](https://github.com/SkriptLang/Skript/pull/6829) Fixes block datas not being cloned upon use. - [#&#8203;6823](https://github.com/SkriptLang/Skript/pull/6823) Fixes inability to get the location of a double chest via the inventory. - [#&#8203;6832](https://github.com/SkriptLang/Skript/pull/6832) Fixes a bug where potion types could not be compared. - [#&#8203;6836](https://github.com/SkriptLang/Skript/pull/6836) Fixes an issue when trying to remove air from an empty slot. - [#&#8203;6846](https://github.com/SkriptLang/Skript/pull/6846) Fixed an issue where obtaining the slot index of the player's tool did not work. - [#&#8203;6870](https://github.com/SkriptLang/Skript/pull/6870) Fixed an error that could occur when attempting to set the damage of an item to a negative number. ##### Removals - [#&#8203;5606](https://github.com/SkriptLang/Skript/pull/5606) Removed the warnings in the default variable test. - [#&#8203;6505](https://github.com/SkriptLang/Skript/pull/6505) Removed the player name/UUID in variables warning. - [#&#8203;6673](https://github.com/SkriptLang/Skript/pull/6673) Removed deprecated vector arithmetic syntax in favour of regular arithmetic. ##### Changes - [#&#8203;5676](https://github.com/SkriptLang/Skript/pull/5676) Made Player UUIDs used by default in variables **for new config files**. That is, `{variable::%player%}` is the same as `{variable::%player's uuid%}`. If you need to continue using the name, use `{variable::%player's name%}`. Variables **will not** automatically migrate. Click to view [this discussion](https://github.com/SkriptLang/Skript/discussions/6270) for further information. - [#&#8203;5979](https://github.com/SkriptLang/Skript/pull/5979) Updated the `broadcast` effect to trigger message broadcast event. - [#&#8203;6361](https://github.com/SkriptLang/Skript/pull/6361) Strengthened function header rules to prevent the usage of invalid headers. - [#&#8203;6389](https://github.com/SkriptLang/Skript/pull/6389) Modified element-wise comparision to support checking whether two `and` lists are equal. - [#&#8203;6550](https://github.com/SkriptLang/Skript/pull/6550)/[#&#8203;6694](https://github.com/SkriptLang/Skript/pull/6694) enhance pattern keywords to improve parsing speeds. - [#&#8203;6583](https://github.com/SkriptLang/Skript/pull/6583) Comment parsing has been updated to allow single `#` characters within strings. Existing strings will need updated to remove duplicate `#` characters. This change does not affect hex color tags. - [#&#8203;6733](https://github.com/SkriptLang/Skript/pull/6733) Updated the new line expression to remove the options of `nline` and `newl`. Additionally, `new line` is now a valid option. - [#&#8203;6834](https://github.com/SkriptLang/Skript/pull/6834) Exposed the `load default aliases` config option. ##### API Changes - [#&#8203;6118](https://github.com/SkriptLang/Skript/pull/6118) Added a way to create returnable sections (a section that can return a value using the `return` effect) - [#&#8203;6276](https://github.com/SkriptLang/Skript/pull/6276) Fixed JUnit before and after methods being called on cleanup regardless of override. - [#&#8203;6291](https://github.com/SkriptLang/Skript/pull/6291) Added a parse result structure for testing scripts. - [#&#8203;6306](https://github.com/SkriptLang/Skript/pull/6306) Added additional parsing methods within SkriptParser. - [#&#8203;6307](https://github.com/SkriptLang/Skript/pull/6307) Added an exception that occurs when attempting to register an abstract class as syntax. - [#&#8203;6349](https://github.com/SkriptLang/Skript/pull/6349) Added a SectionExitHandler interface which allows Sections to define behavior when the `exit` or `return` syntax is used (and the section is exited). - [#&#8203;6531](https://github.com/SkriptLang/Skript/pull/6531) Added a ClassInfoReference system for getting more details about the usage of a ClassInfo in a script (e.g. plurality). - [#&#8203;6551](https://github.com/SkriptLang/Skript/pull/6551) Added support simple structures that do not have entries. - [#&#8203;6556](https://github.com/SkriptLang/Skript/pull/6556) Added element look-behind support for sectionless effect sections during init. - [#&#8203;6568](https://github.com/SkriptLang/Skript/pull/6568) Added function contracts, allowing functions to modify their return type/plurality based on their arguments. - [#&#8203;6718](https://github.com/SkriptLang/Skript/pull/6718) Added support for using strings as literals (e.g. `%*string%` in syntax) - [#&#8203;6798](https://github.com/SkriptLang/Skript/pull/6798) Added 1.21 support and modified ItemType#getRandom() to be nullable as not all Materials can be represented as an ItemStack. - [#&#8203;6806](https://github.com/SkriptLang/Skript/pull/6806) Switched more Skript-based types over to registries where possible. [Click here to view the full list of commits made since 2.8.7](https://github.com/SkriptLang/Skript/compare/2.8.7...2.9.0) ##### Notices ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;Asleeepp](https://github.com/Asleeepp) - [@&#8203;AyhamAl-Ali](https://github.com/AyhamAl-Ali) - [@&#8203;bluelhf](https://github.com/bluelhf) - [@&#8203;cheeezburga](https://github.com/cheeezburga) - [@&#8203;envizar](https://github.com/envizar) - [@&#8203;EquipableMC](https://github.com/EquipableMC) - [@&#8203;Fusezion](https://github.com/Fusezion) - [@&#8203;Lotzyprod](https://github.com/Lotzyprod) - [@&#8203;Moderocky](https://github.com/Moderocky) - [@&#8203;Mwexim](https://github.com/Mwexim) - [@&#8203;NotSoDelayed](https://github.com/NotSoDelayed) - [@&#8203;Phill310](https://github.com/Phill310) - [@&#8203;Pikachu920](https://github.com/Pikachu920) - [@&#8203;ShaneBeee](https://github.com/ShaneBeee) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;takejohn](https://github.com/takejohn) - @&#8203;TFSMads\_ - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) - [@&#8203;TPGamesNL](https://github.com/TPGamesNL) - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.9.0-pre2`](https://github.com/SkriptLang/Skript/releases/tag/2.9.0-pre2): Pre-Release 2.9.0-pre2 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.9.0-pre1...2.9.0-pre2) ##### Skript 2.9.0-pre2 Skript 2.9.0 Pre-Release 2 is here to fix some issues that came with the first pre-release. As with any other pre-release, be warned that there may be bugs! We do not recommend running this version on your production servers. This release contains many new features and bug fixes, including support for Minecraft 1.21. We especially want to thank the recent influx of new contributors, many of whom are included in this update. Every contributor means a little less work for the team and a little more progress for Skript, so please, if you want a feature in Skript, go ahead and try to make a pull request! New contributors are very welcome! You can review our contributing guide [by clicking here](https://github.com/SkriptLang/Skript/blob/master/.github/contributing.md). Below, you can familiarize yourself with the changes. Additionally, [by clicking here](https://docs.skriptlang.org/docs.html?search=v:2.9.0+), you can view the list of new syntax on our documentation site. As always, report any issues to our [issues page](https://github.com/SkriptLang/Skript/issues)! Per our [new release model](https://stable.skriptlang.org/clockwork-release-model), we plan to release 2.9.0 on July 15th. We may release additional pre-releases before then should the need arise. Happy Skripting! ##### Major Changes > \[!IMPORTANT] > Skript now requires **Java 11** to run. While most users are running Java 11 or newer, some may be required to update for this version. Java 11 is supported on all versions Skript supports. - Skript can now listen to events cancelled by other plugins! Your current scripts will behave the same as they always have, but there's now the option to listen to cancelled, uncancelled, or both kinds at once: ```applescript on break of stone: # Normal behavior, only listens to uncancelled break events. on uncancelled break of stone: # Same as `on break of stone`, only uncancelled. on cancelled break of stone: # Will only listen to cancelled events. For example, # when Worldguard prevents a block break in a protected region. on any break of stone: # Will listen to both cancelled and uncancelled events. # Finally, `event is cancelled` will be useful! on all break of stone: # Same as `on any break of stone`. ``` - Alternatively, you can set the new `listen to cancelled events by default` config option to `true` to allow events to listen to both uncancelled and cancelled events by default: ``` on break of stone: # Now listens to both cancelled and uncancelled events # if the config option is set to true. ``` - Added a config option to allow case-insensitive commands, so your accidental capslock won't mess you up as much! ```applescript # default: only /test # insensitive: /test, /TEST, /tEsT... command /test: trigger: broadcast "test!" ``` - Adds multi-line comments. Comments are opened and closed with **three** hashtags `###` alone on a line. ```applescript This is code ### | This is a comment | ### This is code (again) ``` - Triple-hashtags in the middle of a line (e.g. `hello ### there`) will **not** start or end a comment. - Support for string 'concatenation'! - Text can be appended to other text (e.g. `set {text} to "hello" + "there"`) with the addition operator. - The `concat(...)` function joins any text or objects together into a single text. - We have exposed the `load default aliases` option in `config.sk`, which allows you to tell Skript to only load aliases in the `plugins/Skript/aliases` folder. You can provide as many or as few (even none, if you want!) aliases as you like. We will provide the default folder in the GitHub release for your convenience. ##### ⚠ Breaking Changes - `#` characters in strings no longer need to be doubled! Skript can now tell that you are writing a string and will not start a comment in the middle of it. This change means all your `##` will now appear as two `#` instead of one! This won't break hex colours, those support either one or two `#`'s, but it may break other text! ```applescript # before: "<##aabbcc>I'm ##&#8203;1, baby!" -> "I'm #&#8203;1, baby!" # after "<##aabbcc>I'm ##&#8203;1, baby!" -> "I'm ##&#8203;1, baby!" "<#aabbcc>I'm #&#8203;1, baby!" -> "I'm #&#8203;1, baby!" ``` - Timespans will now show the weeks and years instead of stopping at days: ```patch broadcast "%{_timespan}%" - "378 days and 20 minutes" + "1 year and 1 week and 6 days and 20 minutes" ``` - The names of function parameters can no longer include the following characters: `(){}\",`. - `newl` and `nline` are no longer valid syntaxes for the `newline` expression, but `new line` is now valid. - As mentioned above, `#` characters in strings no longer need to be doubled. This will mean existing doubled `#`s will appear as two, rather than one. - The option to use `non-air` instead of `solid` in the `highest solid block` expression has been removed. - Using `on teleport` will now trigger for non-player entities. To detect only player teleports, use `on player teleport`. ##### Changelog ##### Pre-Release 2 Changes - [#&#8203;6846](https://github.com/SkriptLang/Skript/pull/6846) Fixed an issue where obtaining the slot index of the player's tool did not work. - [#&#8203;6865](https://github.com/SkriptLang/Skript/pull/6865) Fixed an issue with saving certain types of data in global variables. - [#&#8203;6870](https://github.com/SkriptLang/Skript/pull/6870) Fixed an error that could occur when attempting to set the damage of an item to a negative number. - [#&#8203;6871](https://github.com/SkriptLang/Skript/pull/6871) Fixed an issue where the text forms of enchantments displayed incorrectly. - [#&#8203;6874](https://github.com/SkriptLang/Skript/pull/6874) Fixed an error that would occur when attempting to use several inventory-related expressions on versions older than 1.21. - [#&#8203;6876](https://github.com/SkriptLang/Skript/pull/6876) Fixed an issue with plain item comparisons not working as expected. - [#&#8203;6886](https://github.com/SkriptLang/Skript/pull/6886) Fixed several item-related issues that could occur due to 1.21 changes. - [#&#8203;6888](https://github.com/SkriptLang/Skript/pull/6888) Fixed an issue where some internal item comparisons unexpectedly failed, causing issues with syntax such as the equip effect. [Click here to view the full list of commits made since 2.9.0-pre1](https://github.com/SkriptLang/Skript/compare/2.9.0-pre1...2.9.0-pre2) ##### Additions - [#&#8203;4661](https://github.com/SkriptLang/Skript/pull/4661) Added support for using weeks, months, and years in timespans. They are treated as 7 days, 30 days, and 365 days respectively. Additionally, an expression to obtain a timespan as a specific unit of time (e.g. as hours, days, etc.). - [#&#8203;5284](https://github.com/SkriptLang/Skript/pull/5284) Added a `lowest solid block` expression for obtaining the lowest solid block at a location. - [#&#8203;5691](https://github.com/SkriptLang/Skript/pull/5691) Added documentation details for whether an event can be cancelled. - [#&#8203;5698](https://github.com/SkriptLang/Skript/pull/5698) Added support for obtaining the player represented by a player head block. - [#&#8203;6105](https://github.com/SkriptLang/Skript/pull/6105) Added an expression to determine whether a player is connected rather than online. Specifically, `is online` may continue to return true for players that have disconnected and then reconnected. - [#&#8203;6164](https://github.com/SkriptLang/Skript/pull/6164) Added more internal tests for item-related syntaxes. - [#&#8203;6272](https://github.com/SkriptLang/Skript/pull/6272) Added Russian translations. - [#&#8203;6334](https://github.com/SkriptLang/Skript/pull/6334) Added an expression for obtaining the codepoint of a character and the character reresented by a codepoint. - [#&#8203;6422](https://github.com/SkriptLang/Skript/pull/6422) Added a distinction when using the `actual` part of the target block expression. When `actual` is used, the hitboxes of blocks will be considered. - [#&#8203;6530](https://github.com/SkriptLang/Skript/pull/6530) Expanded the `teleport` event to trigger when non-player entities are teleported. **NOTE: This means `on teleport` will now trigger for entities other than players. Use `on player teleport` for detecting only player teleports.** - [#&#8203;6549](https://github.com/SkriptLang/Skript/pull/6549) Added support for suppressing deprecated syntax warnings. - [#&#8203;6558](https://github.com/SkriptLang/Skript/pull/6558) Added multi-line comments using `###`. > ```applescript > This is code > ### > | > This is a comment > | > ### > This is code (again) > ``` - [#&#8203;6576](https://github.com/SkriptLang/Skript/pull/6576) Added support for combining strings using the addition (`+`) symbol. - [#&#8203;6596](https://github.com/SkriptLang/Skript/pull/6596) Added an event for when endermen become enraged. - [#&#8203;6639](https://github.com/SkriptLang/Skript/pull/6639) Added a condition, effect, and expression for managing the fire resistance property of an item. - [#&#8203;6680](https://github.com/SkriptLang/Skript/pull/6680) Added a configuration option to allow all events by default to trigger even when the event is already cancelled. - [#&#8203;6712](https://github.com/SkriptLang/Skript/pull/6712) Added an effect to show/hide item tooltips and a condition to check whether an item's tooltip is visible. - [#&#8203;6748](https://github.com/SkriptLang/Skript/pull/6748) Added a `whether <condition>` expression to get the boolean (true/false) representation of a condition (example: `send "Flying: %whether player is flying%"`). - [#&#8203;6791](https://github.com/SkriptLang/Skript/pull/6791) Added support for numerous 1.21 attributes. - [#&#8203;6687](https://github.com/SkriptLang/Skript/pull/6687) Added support for using (not creating) custom enchantments and referencing enchantments by namespace/key. ##### Bug Fixes - [#&#8203;5422](https://github.com/SkriptLang/Skript/pull/5422) Fixes bugs with the whitelist condition. - [#&#8203;6573](https://github.com/SkriptLang/Skript/pull/6573) Fixes `is connected` pattern to support only Paper server. - [#&#8203;6737](https://github.com/SkriptLang/Skript/pull/6737) Adds an effect to sort a list by an arbitrary mapping expression. (ex: `sort {_list-of-players::*} by {hide-and-seek::%input%::score}`) - [#&#8203;6797](https://github.com/SkriptLang/Skript/pull/6797) Fixes issues with the `last damage` expression. - [#&#8203;6803](https://github.com/SkriptLang/Skript/pull/6803) Fixes an issue where custom maximum durability did not work for items with a custom durability. - [#&#8203;6821](https://github.com/SkriptLang/Skript/pull/6829) Fixes block datas not being cloned upon use. - [#&#8203;6823](https://github.com/SkriptLang/Skript/pull/6823) Fixes inability to get the location of a double chest via the inventory. - [#&#8203;6832](https://github.com/SkriptLang/Skript/pull/6832) Fixes a bug where potion types could not be compared. - [#&#8203;6836](https://github.com/SkriptLang/Skript/pull/6836) Fixes an issue when trying to remove air from an empty slot. ##### Removals - [#&#8203;5606](https://github.com/SkriptLang/Skript/pull/5606) Removes the warnings in the default variable test. - [#&#8203;6505](https://github.com/SkriptLang/Skript/pull/6505) Removes Player name/UUID in variables warning. - [#&#8203;6673](https://github.com/SkriptLang/Skript/pull/6673) Removes old deprecated vector arithmetic syntax in favour of regular arithmetic. ##### Changes - [#&#8203;4661](https://github.com/SkriptLang/Skript/pull/4661) Adds timespan details expression & Improvements. - [#&#8203;5676](https://github.com/SkriptLang/Skript/pull/5676) Changes uuid default. - [#&#8203;5298](https://github.com/SkriptLang/Skript/pull/5298) Adds the ability to directly set entity and player pitch/yaw. - [#&#8203;6131](https://github.com/SkriptLang/Skript/pull/6131) Adds the ability to play sounds from entities, as well as specify a seed instead of the sound being random each time. - [#&#8203;6160](https://github.com/SkriptLang/Skript/pull/6160) Adds the option of 'breakable' to the existing unbreakable syntaxes. - [#&#8203;6207](https://github.com/SkriptLang/Skript/pull/6207) Adds ability to listen to cancelled events. - [#&#8203;6275](https://github.com/SkriptLang/Skript/pull/6275) Ignore cleanup lang in git blame. - [#&#8203;6306](https://github.com/SkriptLang/Skript/pull/6306) Adds a more flexible static parse method. - [#&#8203;6307](https://github.com/SkriptLang/Skript/pull/6307) Throw an exception when attempting to register an abstract class. - [#&#8203;6339](https://github.com/SkriptLang/Skript/pull/6339) Adds the ability to filter a heal event by entity data and by heal reason. - [#&#8203;6349](https://github.com/SkriptLang/Skript/pull/6349) Creates SectionExitHandler interface. - [#&#8203;6361](https://github.com/SkriptLang/Skript/pull/6361) Make function parameter name rules stricter. - [#&#8203;6389](https://github.com/SkriptLang/Skript/pull/6389) Allows element-wise comparision when checking if two "and" lists are equal. - [#&#8203;6393](https://github.com/SkriptLang/Skript/pull/6393) Adds "invincible" as a synonym of "invulnerable" in related syntaxes. - [#&#8203;6456](https://github.com/SkriptLang/Skript/pull/6456) Adds syntax for bells and bell events. - [#&#8203;6506](https://github.com/SkriptLang/Skript/pull/6506) Adds pathfinding condition. - [#&#8203;6550](https://github.com/SkriptLang/Skript/pull/6550) and [#&#8203;6694](https://github.com/SkriptLang/Skript/pull/6694) enhance pattern keywords to improve parsing speeds. - [#&#8203;6577](https://github.com/SkriptLang/Skript/pull/6577) Adds a config option to allow case-insensitive Skript commands. - [#&#8203;6583](https://github.com/SkriptLang/Skript/pull/6583) Changes comment parsing to allow single `#` characters within strings. - [#&#8203;6627](https://github.com/SkriptLang/Skript/pull/6627) Allows usage messages to contain expressions. - [#&#8203;6659](https://github.com/SkriptLang/Skript/pull/6659) Supports logging with warning and error severities. - [#&#8203;6733](https://github.com/SkriptLang/Skript/pull/6733) Cleans up the `new line` expression. - [#&#8203;6749](https://github.com/SkriptLang/Skript/pull/6749) Supports dividing timespans by timespans to get numbers. (`1 second / 5 ticks = 4`) - [#&#8203;6828](https://github.com/SkriptLang/Skript/pull/6828) Adds the ability to delete the message expression in join/death/quit events. - [#&#8203;6831](https://github.com/SkriptLang/Skript/pull/6831) Adds the ability to prevent lookups when using the offlineplayer function. - [#&#8203;6834](https://github.com/SkriptLang/Skript/pull/6834) Exposes the `load default aliases` config option. - [#&#8203;6835](https://github.com/SkriptLang/Skript/pull/6835) Adds the ability to also kick a player when using the ban effect. ##### API Changes - [#&#8203;5979](https://github.com/SkriptLang/Skript/pull/5979) The `broadcast` effect now calls BroadcastMessageEvent. - [#&#8203;6118](https://github.com/SkriptLang/Skript/pull/6118) Adds a way to create returnable triggers (a trigger that can return a value using the `return` effect) - [#&#8203;6276](https://github.com/SkriptLang/Skript/pull/6276) Fixes JUnit before and after methods being called on cleanup regardless of override. - [#&#8203;6291](https://github.com/SkriptLang/Skript/pull/6291) Adds parse result structure for testing scripts. - [#&#8203;6531](https://github.com/SkriptLang/Skript/pull/6531) Adds ClassInfoReference system. - [#&#8203;6551](https://github.com/SkriptLang/Skript/pull/6551) Allows simple root-level structures. - [#&#8203;6556](https://github.com/SkriptLang/Skript/pull/6556) Allows look-behind for headless effect sections during init. - [#&#8203;6568](https://github.com/SkriptLang/Skript/pull/6568) Adds function contracts, allowing functions to modify their return type/plurality based on their arguments. - [#&#8203;6718](https://github.com/SkriptLang/Skript/pull/6718) Added support for using strings as literals (e.g. `%*string%` in syntax) - [#&#8203;6798](https://github.com/SkriptLang/Skript/pull/6798) Adds 1.21 support and modifies ItemType#getRandom() to be nullable as not all Materials can be represented as an ItemStack. - [#&#8203;6806](https://github.com/SkriptLang/Skript/pull/6806) Switches more types over to registries when possible. [Click here to view the full list of commits made since 2.8.7](https://github.com/SkriptLang/Skript/compare/2.8.7...2.9.0-pre2) ##### Notices ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;Asleeepp](https://github.com/Asleeepp) - [@&#8203;AyhamAl-Ali](https://github.com/AyhamAl-Ali) - [@&#8203;bluelhf](https://github.com/bluelhf) - [@&#8203;cheeezburga](https://github.com/cheeezburga) - [@&#8203;envizar](https://github.com/envizar) - [@&#8203;EquipableMC](https://github.com/EquipableMC) - [@&#8203;Fusezion](https://github.com/Fusezion) - [@&#8203;Lotzyprod](https://github.com/Lotzyprod) - [@&#8203;Moderocky](https://github.com/Moderocky) - [@&#8203;Mwexim](https://github.com/Mwexim) - [@&#8203;NotSoDelayed](https://github.com/NotSoDelayed) - [@&#8203;Phill310](https://github.com/Phill310) - [@&#8203;Pikachu920](https://github.com/Pikachu920) - [@&#8203;ShaneBeee](https://github.com/ShaneBeee) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;takejohn](https://github.com/takejohn) - @&#8203;TFSMads\_ - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) - [@&#8203;TPGamesNL](https://github.com/TPGamesNL) - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.9.0-pre1`](https://github.com/SkriptLang/Skript/releases/tag/2.9.0-pre1): Pre-Release 2.9.0-pre1 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.8.7...2.9.0-pre1) ##### Skript 2.9.0-pre1 Skript 2.9.0 Pre-Release 1 is here for everyone to begin previewing! As a pre-release, be warned that there may be bugs! We do not recommend running this version on your production servers. This release contains many new features and bug fixes, including support for Minecraft 1.21. We especially want to thank the recent influx of new contributors, many of whom are included in this update. Every contributor means a little less work for the team and a little more progress for Skript, so please, if you want a feature in Skript, go ahead and try to make a pull request! New contributors are very welcome! You can review our contributing guide [by clicking here](https://github.com/SkriptLang/Skript/blob/master/.github/contributing.md). Below, you can familiarize yourself with the changes. Additionally, [by clicking here](https://docs.skriptlang.org/docs.html?search=v:2.9.0+), you can view the list of new syntax on our documentation site. As always, report any issues to our [issues page](https://github.com/SkriptLang/Skript/issues)! Per our [new release model](https://stable.skriptlang.org/clockwork-release-model), we plan to release 2.9.0 on July 15th. We may release additional pre-releases before then should the need arise. Happy Skripting! ##### Major Changes > \[!IMPORTANT] > Skript now requires **Java 11** to run. While most users are running Java 11 or newer, some may be required to update for this version. Java 11 is supported on all versions Skript supports. - Skript can now listen to events cancelled by other plugins! Your current scripts will behave the same as they always have, but there's now the option to listen to cancelled, uncancelled, or both kinds at once: ```applescript on break of stone: # Normal behavior, only listens to uncancelled break events. on uncancelled break of stone: # Same as `on break of stone`, only uncancelled. on cancelled break of stone: # Will only listen to cancelled events. For example, # when Worldguard prevents a block break in a protected region. on any break of stone: # Will listen to both cancelled and uncancelled events. # Finally, `event is cancelled` will be useful! on all break of stone: # Same as `on any break of stone`. ``` - Alternatively, you can set the new `listen to cancelled events by default` config option to `true` to allow events to listen to both uncancelled and cancelled events by default: ``` on break of stone: # Now listens to both cancelled and uncancelled events # if the config option is set to true. ``` - Added a config option to allow case-insensitive commands, so your accidental capslock won't mess you up as much! ```applescript # default: only /test # insensitive: /test, /TEST, /tEsT... command /test: trigger: broadcast "test!" ``` - Adds multi-line comments. Comments are opened and closed with **three** hashtags `###` alone on a line. ```applescript This is code ### | This is a comment | ### This is code (again) ``` - Triple-hashtags in the middle of a line (e.g. `hello ### there`) will **not** start or end a comment. - Support for string 'concatenation'! - Text can be appended to other text (e.g. `set {text} to "hello" + "there"`) with the addition operator. - The `concat(...)` function joins any text or objects together into a single text. - We have exposed the `load default aliases` option in `config.sk`, which allows you to tell Skript to only load aliases in the `plugins/Skript/aliases` folder. You can provide as many or as few (even none, if you want!) aliases as you like. We will provide the default folder in the GitHub release for your convenience. ##### ⚠ Breaking Changes - `#` characters in strings no longer need to be doubled! Skript can now tell that you are writing a string and will not start a comment in the middle of it. This change means all your `##` will now appear as two `#` instead of one! This won't break hex colours, those support either one or two `#`'s, but it may break other text! ```applescript # before: "<##aabbcc>I'm ##&#8203;1, baby!" -> "I'm #&#8203;1, baby!" # after "<##aabbcc>I'm ##&#8203;1, baby!" -> "I'm ##&#8203;1, baby!" "<#aabbcc>I'm #&#8203;1, baby!" -> "I'm #&#8203;1, baby!" ``` - Timespans will now show the weeks and years instead of stopping at days: ```patch broadcast "%{_timespan}%" - "378 days and 20 minutes" + "1 year and 1 week and 6 days and 20 minutes" ``` - The names of function parameters can no longer include the following characters: `(){}\",`. - `newl` and `nline` are no longer valid syntaxes for the `newline` expression, but `new line` is now valid. - As mentioned above, `#` characters in strings no longer need to be doubled. This will mean existing doubled `#`s will appear as two, rather than one. - The option to use `non-air` instead of `solid` in the `highest solid block` expression has been removed. - Using `on teleport` will now trigger for non-player entities. To detect only player teleports, use `on player teleport`. ##### Changelog ##### Additions - [#&#8203;4661](https://github.com/SkriptLang/Skript/pull/4661) Adds syntax to get the second, minutes, hours, etc of a timespan. - [#&#8203;5284](https://github.com/SkriptLang/Skript/pull/5284) Adds the `lowest solid block` expression. - [#&#8203;5691](https://github.com/SkriptLang/Skript/pull/5691) Adds a cancellable field to the docs for events. - [#&#8203;5698](https://github.com/SkriptLang/Skript/pull/5698) Adds support for obtaining the player a player head block represents. - [#&#8203;6105](https://github.com/SkriptLang/Skript/pull/6105) Support `is connected` pattern in `is online`. - [#&#8203;6164](https://github.com/SkriptLang/Skript/pull/6164) Adds many internal tests relating to items. - [#&#8203;6272](https://github.com/SkriptLang/Skript/pull/6272) Adds Russian translation. - [#&#8203;6334](https://github.com/SkriptLang/Skript/pull/6334) Add support for character codepoints. - [#&#8203;6422](https://github.com/SkriptLang/Skript/pull/6422) Adds a new use for the 'actual' target block option. - [#&#8203;6530](https://github.com/SkriptLang/Skript/pull/6530) Adds support for detecting when non-player entities are teleported. - [#&#8203;6549](https://github.com/SkriptLang/Skript/pull/6549) Adds a suppressible warning type for deprecated syntaxes. - [#&#8203;6558](https://github.com/SkriptLang/Skript/pull/6558) Adds `###` multi-line comment support. - [#&#8203;6576](https://github.com/SkriptLang/Skript/pull/6576) Support string 'concatenation'. - [#&#8203;6596](https://github.com/SkriptLang/Skript/pull/6596) Adds the endermen enrage event. - [#&#8203;6639](https://github.com/SkriptLang/Skript/pull/6639) Adds fire-resistant item property support. - [#&#8203;6680](https://github.com/SkriptLang/Skript/pull/6680) Adds a config option to allow all events to listen for cancelled versions by default. - [#&#8203;6712](https://github.com/SkriptLang/Skript/pull/6712) Adds an effect to show/hide item tooltips and a condition to check if a tooltip is visible. - [#&#8203;6748](https://github.com/SkriptLang/Skript/pull/6748) Adds the `whether <condition>` expression to allow conditions to be used as boolean expressions. (`set {_test} to whether player is flying`) - [#&#8203;6791](https://github.com/SkriptLang/Skript/pull/6791) Adds support for numerous 1.21 attributes. - [#&#8203;6687](https://github.com/SkriptLang/Skript/pull/6687) Adds support for using custom enchantments and referencing enchantments by key in 1.21. ##### Bug Fixes - [#&#8203;5422](https://github.com/SkriptLang/Skript/pull/5422) Fixes bugs with the whitelist condition. - [#&#8203;6573](https://github.com/SkriptLang/Skript/pull/6573) Fixes `is connected` pattern to support only Paper server. - [#&#8203;6737](https://github.com/SkriptLang/Skript/pull/6737) Adds an effect to sort a list by an arbitrary mapping expression. (ex: `sort {_list-of-players::*} by {hide-and-seek::%input%::score}`) - [#&#8203;6797](https://github.com/SkriptLang/Skript/pull/6797) Fixes issues with the `last damage` expression. - [#&#8203;6803](https://github.com/SkriptLang/Skript/pull/6803) Fixes an issue where custom maximum durability did not work for items with a custom durability. - [#&#8203;6821](https://github.com/SkriptLang/Skript/pull/6829) Fixes block datas not being cloned upon use. - [#&#8203;6823](https://github.com/SkriptLang/Skript/pull/6823) Fixes inability to get the location of a double chest via the inventory. - [#&#8203;6832](https://github.com/SkriptLang/Skript/pull/6832) Fixes a bug where potion types could not be compared. - [#&#8203;6836](https://github.com/SkriptLang/Skript/pull/6836) Fixes an issue when trying to remove air from an empty slot. ##### Removals - [#&#8203;5606](https://github.com/SkriptLang/Skript/pull/5606) Removes the warnings in the default variable test. - [#&#8203;6505](https://github.com/SkriptLang/Skript/pull/6505) Removes Player name/UUID in variables warning. - [#&#8203;6673](https://github.com/SkriptLang/Skript/pull/6673) Removes old deprecated vector arithmetic syntax in favour of regular arithmetic. ##### Changes - [#&#8203;4661](https://github.com/SkriptLang/Skript/pull/4661) Adds timespan details expression & Improvements. - [#&#8203;5676](https://github.com/SkriptLang/Skript/pull/5676) Changes uuid default. - [#&#8203;5298](https://github.com/SkriptLang/Skript/pull/5298) Adds the ability to directly set entity and player pitch/yaw. - [#&#8203;6131](https://github.com/SkriptLang/Skript/pull/6131) Adds the ability to play sounds from entities, as well as specify a seed instead of the sound being random each time. - [#&#8203;6160](https://github.com/SkriptLang/Skript/pull/6160) Adds the option of 'breakable' to the existing unbreakable syntaxes. - [#&#8203;6207](https://github.com/SkriptLang/Skript/pull/6207) Adds ability to listen to cancelled events. - [#&#8203;6275](https://github.com/SkriptLang/Skript/pull/6275) Ignore cleanup lang in git blame. - [#&#8203;6306](https://github.com/SkriptLang/Skript/pull/6306) Adds a more flexible static parse method. - [#&#8203;6307](https://github.com/SkriptLang/Skript/pull/6307) Throw an exception when attempting to register an abstract class. - [#&#8203;6339](https://github.com/SkriptLang/Skript/pull/6339) Adds the ability to filter a heal event by entity data and by heal reason. - [#&#8203;6349](https://github.com/SkriptLang/Skript/pull/6349) Creates SectionExitHandler interface. - [#&#8203;6361](https://github.com/SkriptLang/Skript/pull/6361) Make function parameter name rules stricter. - [#&#8203;6389](https://github.com/SkriptLang/Skript/pull/6389) Allows element-wise comparision when checking if two "and" lists are equal. - [#&#8203;6393](https://github.com/SkriptLang/Skript/pull/6393) Adds "invincible" as a synonym of "invulnerable" in related syntaxes. - [#&#8203;6456](https://github.com/SkriptLang/Skript/pull/6456) Adds syntax for bells and bell events. - [#&#8203;6506](https://github.com/SkriptLang/Skript/pull/6506) Adds pathfinding condition. - [#&#8203;6550](https://github.com/SkriptLang/Skript/pull/6550) and [#&#8203;6694](https://github.com/SkriptLang/Skript/pull/6694) enhance pattern keywords to improve parsing speeds. - [#&#8203;6577](https://github.com/SkriptLang/Skript/pull/6577) Adds a config option to allow case-insensitive Skript commands. - [#&#8203;6583](https://github.com/SkriptLang/Skript/pull/6583) Changes comment parsing to allow single `#` characters within strings. - [#&#8203;6627](https://github.com/SkriptLang/Skript/pull/6627) Allows usage messages to contain expressions. - [#&#8203;6659](https://github.com/SkriptLang/Skript/pull/6659) Supports logging with warning and error severities. - [#&#8203;6733](https://github.com/SkriptLang/Skript/pull/6733) Cleans up the `new line` expression. - [#&#8203;6749](https://github.com/SkriptLang/Skript/pull/6749) Supports dividing timespans by timespans to get numbers. (`1 second / 5 ticks = 4`) - [#&#8203;6828](https://github.com/SkriptLang/Skript/pull/6828) Adds the ability to delete the message expression in join/death/quit events. - [#&#8203;6831](https://github.com/SkriptLang/Skript/pull/6831) Adds the ability to prevent lookups when using the offlineplayer function. - [#&#8203;6834](https://github.com/SkriptLang/Skript/pull/6834) Exposes the `load default aliases` config option. - [#&#8203;6835](https://github.com/SkriptLang/Skript/pull/6835) Adds the ability to also kick a player when using the ban effect. ##### API Changes - [#&#8203;5979](https://github.com/SkriptLang/Skript/pull/5979) The `broadcast` effect now calls BroadcastMessageEvent. - [#&#8203;6118](https://github.com/SkriptLang/Skript/pull/6118) Adds a way to create returnable triggers (a trigger that can return a value using the `return` effect) - [#&#8203;6276](https://github.com/SkriptLang/Skript/pull/6276) Fixes JUnit before and after methods being called on cleanup regardless of override. - [#&#8203;6291](https://github.com/SkriptLang/Skript/pull/6291) Adds parse result structure for testing scripts. - [#&#8203;6531](https://github.com/SkriptLang/Skript/pull/6531) Adds ClassInfoReference system. - [#&#8203;6551](https://github.com/SkriptLang/Skript/pull/6551) Allows simple root-level structures. - [#&#8203;6556](https://github.com/SkriptLang/Skript/pull/6556) Allows look-behind for headless effect sections during init. - [#&#8203;6568](https://github.com/SkriptLang/Skript/pull/6568) Adds function contracts, allowing functions to modify their return type/plurality based on their arguments. - [#&#8203;6718](https://github.com/SkriptLang/Skript/pull/6718) Added support for using strings as literals (e.g. `%*string%` in syntax) - [#&#8203;6798](https://github.com/SkriptLang/Skript/pull/6798) Adds 1.21 support and modifies ItemType#getRandom() to be nullable as not all Materials can be represented as an ItemStack. - [#&#8203;6806](https://github.com/SkriptLang/Skript/pull/6806) Switches more types over to registries when possible. [Click here to view the full list of commits made since 2.8.X](https://github.com/SkriptLang/Skript/compare/2.8.X...2.9.0) ##### Notices ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;Asleeepp](https://github.com/Asleeepp) - [@&#8203;AyhamAl-Ali](https://github.com/AyhamAl-Ali) - [@&#8203;bluelhf](https://github.com/bluelhf) - [@&#8203;cheeezburga](https://github.com/cheeezburga) - [@&#8203;envizar](https://github.com/envizar) - [@&#8203;EquipableMC](https://github.com/EquipableMC) - [@&#8203;Fusezion](https://github.com/Fusezion) - [@&#8203;Lotzyprod](https://github.com/Lotzyprod) - [@&#8203;Moderocky](https://github.com/Moderocky) - [@&#8203;Mwexim](https://github.com/Mwexim) - [@&#8203;NotSoDelayed](https://github.com/NotSoDelayed) - [@&#8203;Phill310](https://github.com/Phill310) - [@&#8203;Pikachu920](https://github.com/Pikachu920) - [@&#8203;ShaneBeee](https://github.com/ShaneBeee) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;takejohn](https://github.com/takejohn) - @&#8203;TFSMads\_ - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) - [@&#8203;TPGamesNL](https://github.com/TPGamesNL) - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.8.7`](https://github.com/SkriptLang/Skript/releases/tag/2.8.7): Patch Release 2.8.7 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.8.6...2.8.7) ##### Skript 2.8.7 We're releasing 2.8.7 to fix some important issues that made their way into 2.8.6. We expect this to be the final version for Skript 2.8. You can report any issues through our [issue tracker](https://github.com/SkriptLang/Skript/issues). Happy Skripting! ##### Changelog ##### Bug Fixes - [#&#8203;6757](https://github.com/SkriptLang/Skript/pull/6757) Fixed an error that could occur when attempting to obtain the potion effects of a plain potion. - [#&#8203;6758](https://github.com/SkriptLang/Skript/pull/6758) Fixed arithmetic-related errors on Java 8 and when performing Vector-Vector multiplication. - [#&#8203;6760](https://github.com/SkriptLang/Skript/pull/6760) Fixed several particle definition conflicts that made it harder to use certain items and entity types with variables. - [#&#8203;6763](https://github.com/SkriptLang/Skript/pull/6763) Fixed an issue where reloading scripts with commands could cause an exception on Paper 1.20.5+. - [#&#8203;6764](https://github.com/SkriptLang/Skript/pull/6764) Fixed an issue where fireworks could not be spawned using the spawn effect/section. - [#&#8203;6777](https://github.com/SkriptLang/Skript/pull/6777) Fixed an issue with the text representation of the case expression. [Click here to view the full list of commits made since 2.8.6](https://github.com/SkriptLang/Skript/compare/2.8.6...2.8.7) ##### Notices ##### Java 11 From Skript 2.9.0 onwards, we will be requiring a minimum Java version of 11 to run. ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;ShaneBeee](https://github.com/ShaneBeee) 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.8.6`](https://github.com/SkriptLang/Skript/releases/tag/2.8.6): Patch Release 2.8.6 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.8.5...2.8.6) ##### Skript 2.8.6 Skript 2.8.6 is here. This release delivers more bug fixes with improved 1.20.5+ support. Additionally, a few quality-of-life features have made their way in. You can report any issues through our [issue tracker](https://github.com/SkriptLang/Skript/issues). Happy Skripting! ##### Changelog ##### Additions - [#&#8203;6652](https://github.com/SkriptLang/Skript/pull/6652) Added missing item drop event values (dropped item and itemstack) - [#&#8203;6654](https://github.com/SkriptLang/Skript/pull/6654) Improved the subcommand help colours in the /skript command. - [#&#8203;6655](https://github.com/SkriptLang/Skript/pull/6655) Added support for modifying the exploded blocks in an explode event. ##### Bug Fixes - [#&#8203;6624](https://github.com/SkriptLang/Skript/pull/6624) Fixed unexpected math parsing issues that could occur when using variables. - [#&#8203;6642](https://github.com/SkriptLang/Skript/pull/6642) Fixed an error that could occur from Skript attempting to normalize zero vectors. - [#&#8203;6644](https://github.com/SkriptLang/Skript/pull/6644) Fixed an issue with damaging and repairing items in slots. - [#&#8203;6646](https://github.com/SkriptLang/Skript/pull/6646) Fixed an issue where obtaining the max durability of a custom item did not work. - [#&#8203;6679](https://github.com/SkriptLang/Skript/pull/6679) Fixed an issue where beta releases were considered stable by the update checker. - [#&#8203;6683](https://github.com/SkriptLang/Skript/pull/6683) Fixed an issue where syntaxes could modify the stored values of literals. - [#&#8203;6716](https://github.com/SkriptLang/Skript/pull/6716) Fixed numerous particle issues that occurred when using Minecraft 1.20.5+. - [#&#8203;6724](https://github.com/SkriptLang/Skript/pull/6724) Fixed an issue where forcing an entity to at a vector failed. - [#&#8203;6742](https://github.com/SkriptLang/Skript/pull/6742) Fixed an issue with obtaining an entity's target that could occur when no blocks were within 100 meters. - [#&#8203;6746](https://github.com/SkriptLang/Skript/pull/6746) Fixed an issue where dropped items could not be spawned properly. - [#&#8203;6747](https://github.com/SkriptLang/Skript/pull/6747) Fixed an issue where obtaining the location of an inventory holder did not work. - [#&#8203;6752](https://github.com/SkriptLang/Skript/pull/6752) Fixed an issue where spawning specific fish types (other than tropical fish) did not work. ##### API Updates / For Addon Developers - [#&#8203;6624](https://github.com/SkriptLang/Skript/pull/6624) Expressions can now declare multiple potential return types. This allows for providing more context regarding the return type of an expression (for example, `Entity and Block` compared to their shared supertype `Object`). - [#&#8203;6684](https://github.com/SkriptLang/Skript/pull/6684) Our code standards for the project have been updated. Please review the linked PR for an overview of the changes. - [#&#8203;6700](https://github.com/SkriptLang/Skript/pull/6700) The manner in which failed JUnit tests are displayed has been improved. [Click here to view the full list of commits made since 2.8.5](https://github.com/SkriptLang/Skript/compare/2.8.5...2.8.6) ##### Notices ##### Java 11 From Skript 2.9.0 onwards, we will be requiring a minimum Java version of 11 to run. ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;AyhamAl-Ali](https://github.com/AyhamAl-Ali) - [@&#8203;bluelhf](https://github.com/bluelhf) - [@&#8203;Fusezion](https://github.com/Fusezion) - [@&#8203;Moderocky](https://github.com/Moderocky) - [@&#8203;NotSoDelayed](https://github.com/NotSoDelayed) - [@&#8203;Phill310](https://github.com/Phill310) - [@&#8203;Shanebeee](https://github.com/Shanebeee) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.8.5`](https://github.com/SkriptLang/Skript/releases/tag/2.8.5): Patch Release 2.8.5 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.8.4...2.8.5) ##### Skript 2.8.5 Skript 2.8.5 is here with some more bug fixes and quality-of-life additions. There is also early support for 1.20.5/1.20.6 (Skript will run and some basic 1.20.5/1.20.6 features will work). Further support will come in the next releases. You can report any issues on our [issue tracker](https://github.com/SkriptLang/Skript/issues). Happy Skripting! ##### Changelog ##### Additions - [#&#8203;6134](https://github.com/SkriptLang/Skript/pull/6134) Added `mushroom cow` alias for `mooshroom`. - [#&#8203;6163](https://github.com/SkriptLang/Skript/pull/6163) Added tests for vector syntaxes. - [#&#8203;6525](https://github.com/SkriptLang/Skript/pull/6525) Added support for specifying `charged creeper` rather than `powered creeper`. - [#&#8203;6526](https://github.com/SkriptLang/Skript/pull/6526) Improved the documentation of the elements expression. - [#&#8203;6528](https://github.com/SkriptLang/Skript/pull/6528) Improved the documentation of the leash effect. - [#&#8203;6628](https://github.com/SkriptLang/Skript/pull/6628) The Skript artifact name now includes the plugin version (e.g. `Skript-2.8.5.jar`). - [#&#8203;6632](https://github.com/SkriptLang/Skript/pull/6632) Added basic support for the new Armadillo and Bogged entities. ##### Bug Fixes - [#&#8203;6302](https://github.com/SkriptLang/Skript/pull/6302) Removed the outdated Location to Chunk converter. - [#&#8203;6523](https://github.com/SkriptLang/Skript/pull/6523) Fixed an issue that could occur when attempting to spawn non-spawnable entities. - [#&#8203;6561](https://github.com/SkriptLang/Skript/pull/6561) Fix the move event's example. - [#&#8203;6566](https://github.com/SkriptLang/Skript/pull/6566) Removed redundant `[the]` in the hotbar expression. - [#&#8203;6578](https://github.com/SkriptLang/Skript/pull/6578) Fixed an error that could occur with the inventory click event. - [#&#8203;6579](https://github.com/SkriptLang/Skript/pull/6579) Fixed function parsing issues with ambiguous parameter lists. - Fixes locations with no world causing an error: - [#&#8203;6590](https://github.com/SkriptLang/Skript/pull/6590) Entity look at effect. - [#&#8203;6589](https://github.com/SkriptLang/Skript/pull/6589) Blocks (below, above, etc.) expression. - [#&#8203;6588](https://github.com/SkriptLang/Skript/pull/6588) Explode effect. - [#&#8203;6591](https://github.com/SkriptLang/Skript/pull/6591) Fixed an incorrect internal check that determined whether an expression was nullable. - [#&#8203;6594](https://github.com/SkriptLang/Skript/pull/6594)/[#&#8203;6604](https://github.com/SkriptLang/Skript/pull/6594) Improved the efficiency of element input pattern checks. - [#&#8203;6595](https://github.com/SkriptLang/Skript/pull/6595) Fixed incorrect coloring with some error messages. - [#&#8203;6600](https://github.com/SkriptLang/Skript/pull/6600) Fixed an error that could occur when setting the value of a variable. - [#&#8203;6619](https://github.com/SkriptLang/Skript/pull/6619) Fixed an issue that could occur when reloading a command on newer Paper versions. - [#&#8203;6617](https://github.com/SkriptLang/Skript/pull/6617)/[#&#8203;6630](https://github.com/SkriptLang/Skript/pull/6630) Fixed multiple issues that could occur when using Skript on 1.20.5/1.20.6. [Click here to view the full list of commits made since 2.8.4](https://github.com/SkriptLang/Skript/compare/2.8.4...2.8.5) ##### Notices ##### Java 11 From Skript 2.9.0 onwards, we will be requiring a minimum Java version of 11 to run. ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;Asleeepp](https://github.com/Asleeepp) - [@&#8203;Fusezion](https://github.com/Fusezion) - [@&#8203;Moderocky](https://github.com/Moderocky) - [@&#8203;NotSoDelayed](https://github.com/NotSoDelayed) - [@&#8203;Phill310](https://github.com/Phill310) - [@&#8203;ShaneBeee](https://github.com/ShaneBeee) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) 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.8.4`](https://github.com/SkriptLang/Skript/releases/tag/2.8.4): Patch Release 2.8.4 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.8.3...2.8.4) ##### Skript 2.8.4 Skript 2.8.4 is here and it brings with it many bug fixes. You can report any issues on our [issue tracker](https://github.com/SkriptLang/Skript/issues). Happy Skripting! ##### Changelog ##### Bug Fixes - [#&#8203;6413](https://github.com/SkriptLang/Skript/pull/6413) Adds missing attributes for MC 1.20.5 - [#&#8203;6473](https://github.com/SkriptLang/Skript/pull/6473) Fixes an issue where spawning a falling block would load the chunk at 0,0. - [#&#8203;6475](https://github.com/SkriptLang/Skript/pull/6475) Fixes issue when spawning an entity at a location with no world. - [#&#8203;6484](https://github.com/SkriptLang/Skript/pull/6484) Fixes error when trying to spawn en entity from a disabled datapack. - [#&#8203;6495](https://github.com/SkriptLang/Skript/pull/6495) Fixes strings in lists not getting sorted properly. - [#&#8203;6497](https://github.com/SkriptLang/Skript/pull/6497) Adds error message to catch null return types. - [#&#8203;6502](https://github.com/SkriptLang/Skript/pull/6502) Fixes error when using invalid amounts of random characters. - [#&#8203;6510](https://github.com/SkriptLang/Skript/pull/6510) Fixes Anvil Text examples, updates Location function examples. - [#&#8203;6512](https://github.com/SkriptLang/Skript/pull/6512) Fixes unparsed literal error with the random expression. [Click here to view the full list of commits made since 2.8.3](https://github.com/SkriptLang/Skript/compare/2.8.3...2.8.4) ##### Notices ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;AyhamAl-Ali](https://github.com/AyhamAl-Ali) - [@&#8203;Moderocky](https://github.com/Moderocky) (moral support) - [@&#8203;ShaneBeee](https://github.com/ShaneBeee) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) 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.8.3`](https://github.com/SkriptLang/Skript/releases/tag/2.8.3): Patch Release 2.8.3 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.8.2...2.8.3) ##### Skript 2.8.3 A new month means a new patch! Skript 2.8.3 is here and it brings with it many bug fixes. You can report any issues on our [issue tracker](https://github.com/SkriptLang/Skript/issues). Happy Skripting! ##### Notices If, *and only if*, you have the `case-insensitive-variables` config option set to `false`, you may experience slight changes to code behavior in functions. Previously, function parameters did not respect this option. This means that if you relied the bug that made the following code work (despite your config option set to false), your code will no longer work in this update. ```applescript function test(TEST: text): broadcast {_test} # only {_TEST} is set now, not {_test} ``` ##### Changelog ##### Bug Fixes - [#&#8203;6233](https://github.com/SkriptLang/Skript/pull/6233) Fixed an issue where event values for the `inventory item move` event were mistakenly removed. - [#&#8203;6309](https://github.com/SkriptLang/Skript/pull/6309) Fixed an issue that caused some click events to fire multiple times for a single event. - [#&#8203;6192](https://github.com/SkriptLang/Skript/pull/6192) Fixed an issue where using the `groups` expression with LuckPerms would cause an exception. - [#&#8203;6328](https://github.com/SkriptLang/Skript/pull/6328) Fixed an issue where multiplying or adding timespans could overflow into negative values. - [#&#8203;6387](https://github.com/SkriptLang/Skript/pull/6387) Fixed an exception when trying to get the components of a non-vector. - [#&#8203;6388](https://github.com/SkriptLang/Skript/pull/6388) Fixed function parameters not respecting the case-insensitive-variables config option. - [#&#8203;6391](https://github.com/SkriptLang/Skript/pull/6391) Fixed `plain` always getting the same item for aliases representing multiple items. - [#&#8203;6392](https://github.com/SkriptLang/Skript/pull/6392) Fixed bucket events returning the wrong `event-block`. - [#&#8203;6463](https://github.com/SkriptLang/Skript/pull/6463) Fixed the `at time` event failing to property trigger when a world's time was changed. - [#&#8203;6455](https://github.com/SkriptLang/Skript/pull/6455) Fixed a parser issue that caused parsing to fail for some syntax when special characters were used. [Click here to view the full list of commits made since 2.8.2](https://github.com/SkriptLang/Skript/compare/2.8.2...2.8.3) ##### Notices ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;DelayedGaming](https://github.com/DelayedGaming) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;Moderocky](https://github.com/Moderocky) - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.8.2`](https://github.com/SkriptLang/Skript/releases/tag/2.8.2): Emergency Patch Release 2.8.2 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.8.1...2.8.2) ##### Skript 2.8.2 We are releasing Skript 2.8.2 to patch a critical issue that prevented the plugin from loading on Spigot versions older than 1.18. You can report any issues on our [issue tracker](https://github.com/SkriptLang/Skript/issues). Happy Skripting! ##### Changelog ##### Bug Fixes - [#&#8203;6399](https://github.com/SkriptLang/Skript/pull/6399) Fixed an issue that prevented Skript from loading on Spigot versions older than 1.18. [Click here to view the full list of commits made since 2.8.1](https://github.com/SkriptLang/Skript/compare/2.8.1...2.8.2) ##### Notices ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;APickledWalrus](https://github.com/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>. ### [`v2.8.1`](https://github.com/SkriptLang/Skript/releases/tag/2.8.1): Patch Release 2.8.1 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.8.0...2.8.1) ##### Skript 2.8.1 Skript 2.8.1 is here to resolve some of the most notable issues reported with 2.8.0. We will continue to assess stability and make fixes as necessary. As always, you can report any issues on our [issue tracker](https://github.com/SkriptLang/Skript/issues). Happy Skripting! ##### Changelog ##### Additions - [#&#8203;6367](https://github.com/SkriptLang/Skript/pull/6367) Added support for experimental entities from 1.20.3, `breeze` and `wind charge`. ##### Tweaks - [#&#8203;6357](https://github.com/SkriptLang/Skript/pull/6357) `armour` is now valid for the player armor change event. ##### Bug Fixes - [#&#8203;6352](https://github.com/SkriptLang/Skript/pull/6352) Fixed a mapping issue that could cause an error on shutdown. - [#&#8203;6357](https://github.com/SkriptLang/Skript/pull/6356) Fixed an issue that caused `armor of %entities%` to be considered a single value. - [#&#8203;6358](https://github.com/SkriptLang/Skript/pull/6358) Fixed an issue that allowed invalid function definitions to parse successfully. - [#&#8203;6360](https://github.com/SkriptLang/Skript/pull/6360) Fixed parsing issues that caused valid code like `loop-value - 1` to error. Additionally, many improvements have been made to the `arithmetic` expression to greatly improve parsing and general stability. - [#&#8203;6374](https://github.com/SkriptLang/Skript/pull/6374) Fixed an issue that caused the `scripts` expression to return absolute paths for enabled scripts. - [#&#8203;6375](https://github.com/SkriptLang/Skript/pull/6375) Fixed an error that could occur when Skript attempted to interpret an unknown enumerator as a string. - [#&#8203;6378](https://github.com/SkriptLang/Skript/pull/6378) Fixed an invalid documentation link to the text tutorial. - [#&#8203;6383](https://github.com/SkriptLang/Skript/pull/6383) Fixed a syntax conflict that prevented the usage of the `vector from coordinates` expression. [Click here to view the full list of commits made since 2.8.0](https://github.com/SkriptLang/Skript/compare/2.8.0...2.8.1) ##### Notices ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;AyhamAl-Ali](https://github.com/AyhamAl-Ali) - [@&#8203;C0D3-M4513R](https://github.com/C0D3-M4513R) - [@&#8203;RamonJales](https://github.com/RamonJales) - [@&#8203;shaneBeee](https://github.com/shaneBeee) - [@&#8203;sovdeeth](https://github.com/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>. ### [`v2.8.0`](https://github.com/SkriptLang/Skript/releases/tag/2.8.0): Feature Release 2.8.0 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.8.0-pre2...2.8.0) ##### Skript 2.8.0 Skript 2.8.0 is here for everyone to enjoy! This release contains many new features and bug fixes to improve the Skript experience. Below, you can familiarize yourself with the changes. As always, report any issues to our [issues page](https://github.com/SkriptLang/Skript/issues)! Per our [new release model](https://stable.skriptlang.org/clockwork-release-model), we plan to release 2.8.1 on February 1st to continue addressing bugs. In the event of any critical issues, an emergency patch release may come sooner. Happy Skripting! ##### ⚠ Breaking Changes - Using players in variable names will soon change from defaulting to names to defaulting to UUIDs. Warnings have been added to help smooth out this transition. See <https://github.com/SkriptLang/Skript/discussions/6270> for more information. - Removed Projectile Bounce State condition and expression. These haven't done anything for years. - The `target entity of player` expression has been improved and now uses raytracing to find the player's target. This should cut down on false positives significantly, but the change in behavior may cause issues for some users who relied on its quirks. - Parsing players from player names is now a bit more intuitive. Previously, parsing `"xyz"` as a player would return the first online player to contain `"xyz"` somewhere in their name. Now, it only returns players that start with `"xyz"`. See [#&#8203;5875](https://github.com/SkriptLang/Skript/pull/5875) for more. - Major changes have been made to the `on grow` event. The grow event now has many more options to specify how you want it to listen. These changes mean that code that uses `on grow of x` may fire twice as often as expected. ```applescript # x -> something on grow[th] from X # something -> x on grow[th] into X # X -> Y on grow[th] from X [in]to Y # x is involved in some way on grow[th] of X ``` - The expression `durability of %item%` now actually returns the durability (a pick with durability 103/160, for example, returns 103) instead of the prior behavior, where it would act like `damage of %item%` (returning 57 for 103/160). - When there are multiple valid event-values for a default expression, Skript will now error and ask you to state which one you want instead of silently picking one. See the following example: ```applescript on right click on entity: send "test" # This will now error, because Skript doesn't know whether to # send it to the clicked entity or the player doing the clicking. ``` - Arithmetic evaluation will now return `<none>` for a whole chain if one of the operations is illegal. Previously, adding `1 + "hello"` would treat `"hello"` as `0` and just return `1`. This now returns `<none>`. However, the behavior of adding things to unset values hasn't changed. `1 + {_none}` still returns `1`. ##### Changelog ##### Additions - [#&#8203;4198](https://github.com/SkriptLang/Skript/pull/4198) Added syntax for interacting with item cooldowns: - a condition that checks whether a player has a cooldown for an item - an expression to get and change the cooldown of an item for a player - [#&#8203;4593](https://github.com/SkriptLang/Skript/pull/4593) Added `raw index of slot` expression. - [#&#8203;4595](https://github.com/SkriptLang/Skript/pull/4595) Added `loop-(counter|iteration)[-%number%]` for both normal and while loop and improved performance for loop-value. - [#&#8203;4614](https://github.com/SkriptLang/Skript/pull/4614) Added the ability to only get certain item types when using the `items in inventory` expression. - [#&#8203;4617](https://github.com/SkriptLang/Skript/pull/4617) Added anvil repair cost expression. - [#&#8203;5098](https://github.com/SkriptLang/Skript/pull/5098) Added an expression to repeat a given string multiple times. - [#&#8203;5271](https://github.com/SkriptLang/Skript/pull/5271) Added time states for the `tool change` event's `event-slot` and for the `hotbar slot` expression. Also allows the ommission of the player in `hotbar slot` when using it in events that have an event-player. - [#&#8203;5356](https://github.com/SkriptLang/Skript/pull/5356) Added an expression for getting and changing the portal cooldown of an entity. - [#&#8203;5357](https://github.com/SkriptLang/Skript/pull/5357) Added toggle pickup for items on living entities. - [#&#8203;5359](https://github.com/SkriptLang/Skript/pull/5359) Added `is jumping` for living entities condition. (Paper 1.15+) - [#&#8203;5365](https://github.com/SkriptLang/Skript/pull/5365) Added syntax for interacting with an entity's active item: - a condition that checks whether an entity's hand(s) is raised - an expression to get an entity's active item (e.g. a bow) - an expression to get the time they've spent using it or how long they need to keep using it to complete the action (e.g. eating) - an expression to get the maximum time an item can be used for - an expression to get the arrow selected in the `ready arrow` event - an effect to cancel the usage of an item - events for when a player readies an arrow and when a player stops using an item. - [#&#8203;5366](https://github.com/SkriptLang/Skript/pull/5366) Added support for getting and modifying the inventories of items, like shulker boxes. - [#&#8203;5367](https://github.com/SkriptLang/Skript/pull/5367) Added syntax to check and set whether a sign has glowing text. - [#&#8203;5456](https://github.com/SkriptLang/Skript/pull/5456) Added the ability to get all armor pieces of an entity. - [#&#8203;5460](https://github.com/SkriptLang/Skript/pull/5460) Added an event for when a player selects a stonecutting recipe. - [#&#8203;5462](https://github.com/SkriptLang/Skript/pull/5462) Added InventoryMoveItemEvent. - [#&#8203;5482](https://github.com/SkriptLang/Skript/pull/5482) Added an expression to get the vector projection of two vectors. - [#&#8203;5494](https://github.com/SkriptLang/Skript/pull/5494) Added a condition to check if an entity is left or right handed, and adds an effect to change their handedness. - [#&#8203;5502](https://github.com/SkriptLang/Skript/pull/5502) Added syntax to create vectors from directions. - [#&#8203;5562](https://github.com/SkriptLang/Skript/pull/5562) Added a condition to check if an entity has unbstructed line of sight to another entity or location. - [#&#8203;5571](https://github.com/SkriptLang/Skript/pull/5571) Added a condition to check if an entity is shorn or not. Also expands the entities that can be shorn with the `shear` effect. - [#&#8203;5573](https://github.com/SkriptLang/Skript/pull/5573) Added a function to clamp a value between two others. - [#&#8203;5588](https://github.com/SkriptLang/Skript/pull/5588) Added player arrow pickup event. - [#&#8203;5589](https://github.com/SkriptLang/Skript/pull/5589) Added hit block of projectile. - [#&#8203;5618](https://github.com/SkriptLang/Skript/pull/5618) Added `is climbing` for living entities condition. - [#&#8203;5636](https://github.com/SkriptLang/Skript/pull/5636) Added `Free/Max/Total Server Memory` expression. - [#&#8203;5662](https://github.com/SkriptLang/Skript/pull/5662) Added expression to return the loaded chunks of worlds. - [#&#8203;5678](https://github.com/SkriptLang/Skript/pull/5678) Added item damage to the `damage` expression. - [#&#8203;5680](https://github.com/SkriptLang/Skript/pull/5680) Added inventory close reason in inventory close event. - [#&#8203;5683](https://github.com/SkriptLang/Skript/pull/5683) Added `event-item` and `event-slot` to the resurrect event. If no totem is present, these values are `none`. - [#&#8203;5763](https://github.com/SkriptLang/Skript/pull/5763) Added Paper 1.16.5+ quit reason for finding out why a player disconnected. - [#&#8203;5800](https://github.com/SkriptLang/Skript/pull/5800) Added an event for when an entity transforms into another entity, like a zombie villager being cured or a slime splitting into smaller slimes. - [#&#8203;5811](https://github.com/SkriptLang/Skript/pull/5811) Added the ability to execute a command as a bungeecord command like /alert. - [#&#8203;5814](https://github.com/SkriptLang/Skript/pull/5814) Added `returns` aliases for `function` definition. - [#&#8203;5845](https://github.com/SkriptLang/Skript/pull/5845) Added `player` and `offlineplayer` functions. - [#&#8203;5867](https://github.com/SkriptLang/Skript/pull/5867) Added expressions to get all characters between two characters, or an amount of random characters within a range. - [#&#8203;5894](https://github.com/SkriptLang/Skript/pull/5894) Added support for keybind components in formatted messages (`<keybind:value>`). - [#&#8203;5898](https://github.com/SkriptLang/Skript/pull/5898) Added `apply bone meal` effect. - [#&#8203;5948](https://github.com/SkriptLang/Skript/pull/5948) Added an event for when players are sent the server's list of commands, as well as an expression to modify them. - [#&#8203;5949](https://github.com/SkriptLang/Skript/pull/5949) Added an expression to get a percentage of one or more numbers. - [#&#8203;5961](https://github.com/SkriptLang/Skript/pull/5961) Added the ability to listen for entities rotating, or rotating and moving, in the `on move` event. - [#&#8203;6101](https://github.com/SkriptLang/Skript/pull/6101) Adds an effect to copy the contents and indices of one variable into others. - [#&#8203;6146](https://github.com/SkriptLang/Skript/pull/6146) Multiple # signs at the beginning of a line now start a comment. - [#&#8203;6162](https://github.com/SkriptLang/Skript/pull/6162) Added a function `isNaN(number)` to check if a number is NaN. - [#&#8203;6180](https://github.com/SkriptLang/Skript/pull/6180) The syntax to get a location from a vector and a world has been re-added. - [#&#8203;6198](https://github.com/SkriptLang/Skript/pull/6198) Added Turkish translation. ##### Bug Fixes - [#&#8203;5308](https://github.com/SkriptLang/Skript/pull/5308) Fixed `cursor slot` not always returning the correct item in `inventory click` events. - [#&#8203;5406](https://github.com/SkriptLang/Skript/pull/5406) Fixed some order of operation issues with the `difference` expression. - [#&#8203;5744](https://github.com/SkriptLang/Skript/pull/5744) Fixed an issue where the error for missing enum lang entries would be printed much more often than they should be. - [#&#8203;5815](https://github.com/SkriptLang/Skript/pull/5815) Improvements to comparators and converters. - [#&#8203;5878](https://github.com/SkriptLang/Skript/pull/5878) Fixed some issues with the `parsed as` expression returning arrays or throwing exceptions. - [#&#8203;6224](https://github.com/SkriptLang/Skript/pull/6224) Fixed the examples for applying potion effects. - [#&#8203;6229](https://github.com/SkriptLang/Skript/pull/6229) Fixed an exception when trying to get the text input of an anvil. - [#&#8203;6231](https://github.com/SkriptLang/Skript/pull/6231) Fixed an exception when trying to print a block state. - [#&#8203;6239](https://github.com/SkriptLang/Skript/pull/6239) Fixed an exception when removing items from `drops` in 1.20.2+. - [#&#8203;6266](https://github.com/SkriptLang/Skript/pull/6266) Fixed a bug that caused incorrect errors to be printed when comparing things. ##### Removals - [#&#8203;5958](https://github.com/SkriptLang/Skript/pull/5958) Removed the projectile bounce state condition and expression. These had no function. ##### Changes - [#&#8203;4281](https://github.com/SkriptLang/Skript/pull/4281) Rewrote the `furnace slot` expressions and fixes numerous issues with them. - [#&#8203;5114](https://github.com/SkriptLang/Skript/pull/5114) Added the ability to save, load, and unload specific worlds, or listen for those event for specific worlds. - [#&#8203;5279](https://github.com/SkriptLang/Skript/pull/5279) Changed how Skript does arithmetic to support many more combinations, like multiplying vectors by scalars, adding timespans, and more. - [#&#8203;5478](https://github.com/SkriptLang/Skript/pull/5478) Improved the `element` expression and adds the ability to A, get the first or last x elements of a list, and B, get the elements in a range from x to y in the list. - [#&#8203;5639](https://github.com/SkriptLang/Skript/pull/5639) Major changes to the `on grow` event. Fixes an issue where listening to `on grow of sugarcane` or any other full-block plant, like cacti or pumpkins, would never fire. Adds more functionality to specify what exactly to listen for. ```applescript # x -> something on grow[th] from X # something -> x on grow[th] into X # X -> Y on grow[th] from X [in]to Y # x is involved in some way on grow[th] of X ``` - [#&#8203;5674](https://github.com/SkriptLang/Skript/pull/5674) Made the `case-insensitive variables` config option visible by default in the config file. - [#&#8203;5769](https://github.com/SkriptLang/Skript/pull/5769) Skript now errors when an ambiguous event value is found for a default expression: ```applescript! # This will now error, as it's unclear who to send "test" to! on right click on entity: send "test" ``` - [#&#8203;5796](https://github.com/SkriptLang/Skript/pull/5796) Expanded the `block change` event and adds block and blockdata event values. - [#&#8203;5841](https://github.com/SkriptLang/Skript/pull/5841) Inventory titles now support hex colours and more. - [#&#8203;5875](https://github.com/SkriptLang/Skript/pull/5875) Changed the parsing of players to only match players that start with that name, rather than simply containing the name. - [#&#8203;5889](https://github.com/SkriptLang/Skript/pull/5889) Allows the omission of the command name when using the command info expressions within a command's trigger section or command event. - [#&#8203;5900](https://github.com/SkriptLang/Skript/pull/5900) Improved how event parsing is handled internally. - [#&#8203;5976](https://github.com/SkriptLang/Skript/pull/5976) Added `decrease` as an alias for `reduce`, e.g. `decrease {_var} by 2`. - [#&#8203;6010](https://github.com/SkriptLang/Skript/pull/6010) Allows the use of `and with` before `fade out` in the `title` effect. - [#&#8203;6024](https://github.com/SkriptLang/Skript/pull/6024) Allows `continue` to continue outer loops. - [#&#8203;6139](https://github.com/SkriptLang/Skript/pull/6139) Allows setting the current hotbar slot of a player to a number as well as a slot. - [#&#8203;6157](https://github.com/SkriptLang/Skript/pull/6157) Changes the `target entity` expression to use raytracing for a player's target. This should make it much more accurate, but may change behavior slightly. Also adds an option to change the ray size and to ignore blocks. - [#&#8203;6172](https://github.com/SkriptLang/Skript/pull/6172) Allows the plural "commands" in the execute command effect. - [#&#8203;6271](https://github.com/SkriptLang/Skript/pull/6271) Added warnings for using players in variable names, without the `use player uuids in variable names` config option enabled. - [#&#8203;6298](https://github.com/SkriptLang/Skript/pull/6298) Fixed the outdated website link in Skript's plugin description. ##### API Changes - [#&#8203;5307](https://github.com/SkriptLang/Skript/pull/5307) Switched `Timespan#getTicks` and `Timespan#fromTicks` from returning ints to returning longs. Deprecated `Timespan#getTicks_i` and `Timespan#fromTicks_i` due to API name change. - [#&#8203;5408](https://github.com/SkriptLang/Skript/pull/5408) Cleaned up the Yggsdrasil serialization code. - [#&#8203;5440](https://github.com/SkriptLang/Skript/pull/5440) Added a "parse section", which can be used to test if code properly parses or not. This is for the testing suite. - [#&#8203;5502](https://github.com/SkriptLang/Skript/pull/5502) Added method `Direction#getDirection` which returns a vector. - [#&#8203;5550](https://github.com/SkriptLang/Skript/pull/5550) The Skript profiler can now run for as long as the user wants. - [#&#8203;5874](https://github.com/SkriptLang/Skript/pull/5874) SimplePropertyExpression now automatically defends `%objects%` to avoid UnparsedLiterals. - [#&#8203;5941](https://github.com/SkriptLang/Skript/pull/5941) `ExpressionType#NORMAL` was removed. `ExpressionType#EVENT` was added for EventValueExpressions. A new default register method was added to EventValueExpression. - [#&#8203;5955](https://github.com/SkriptLang/Skript/pull/5955) Added `WILL` to PropertyCondition to allow for easy registration for conditions like `player will consume the firework charge`. - [#&#8203;6000](https://github.com/SkriptLang/Skript/pull/6000) Renames the field `SyntaxElementInfo#c` to `SyntaxElementInfo#elementClass`. This field will be made private in 2.9. Please use the `SyntaxElementInfo#getElementClass()` getter instead. - [#&#8203;6001](https://github.com/SkriptLang/Skript/pull/6001) Renamed the Slot classinfo from `Inventory Slot` to `Slot`. - [#&#8203;6054](https://github.com/SkriptLang/Skript/pull/6054) Replaced `MarkedForRemoval` annotations with `ApiStatus.ScheduledForRemoval`. - [#&#8203;6261](https://github.com/SkriptLang/Skript/pull/6261) Allows overrides of the `cleanup()` method in JUnit tests. [Click here to view the full list of commits made since 2.7.3](https://github.com/SkriptLang/Skript/compare/2.7.3...2.8.0) ##### Notices ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. We're currently testing a new version of skript-reflect and we would love some more testers! ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;3meraldK](https://github.com/3meraldK) - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;AyhamAl-Ali](https://github.com/AyhamAl-Ali) - [@&#8203;DelayedGaming](https://github.com/DelayedGaming) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;EquipableMC](https://github.com/EquipableMC) - [@&#8203;Fusezion](https://github.com/Fusezion) - [@&#8203;kiip1](https://github.com/kiip1) - [@&#8203;MihirKohli](https://github.com/MihirKohli) - [@&#8203;Moderocky](https://github.com/Moderocky) - [@&#8203;Noteult](https://github.com/Noteult) - [@&#8203;nylhus](https://github.com/nylhus) - [@&#8203;Pikachu920](https://github.com/Pikachu920) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.8.0-pre2`](https://github.com/SkriptLang/Skript/releases/tag/2.8.0-pre2): Pre-Release 2.8.0-pre2 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.8.0-pre1...2.8.0-pre2) ##### Skript 2.8.0-pre2 Skript 2.8.0 Pre-Release 2 is here to fix some of the issues found on the first pre-release. As a pre-release, be warned that there may be bugs! We do not recommend running this version on your production servers. Per our [new release model](https://stable.skriptlang.org/clockwork-release-model), we plan to release Skript 2.8.0 on January 15th. Below, you can familiarize yourself with the changes. As always, report any issues to our [issues page](https://github.com/SkriptLang/Skript/issues). We will continue to work on addressing any major issues before the full release. Happy Skripting! ##### Changelog The changelog below highlights all changes since the first pre-release. For the complete 2.8.0 changelog, please review [the first pre-release's changelog](https://github.com/SkriptLang/Skript/releases/tag/2.8.0-pre1). ##### Bug Fixes - [#&#8203;6286](https://github.com/SkriptLang/Skript/pull/6286) Fixed command parsing errors that could occur for valid commands. - [#&#8203;6287](https://github.com/SkriptLang/Skript/pull/6287) Fixed warnings about the upcoming player UUID variable changes being printed for incorrect lines. - [#&#8203;6292](https://github.com/SkriptLang/Skript/pull/6292) Fixed an issue that caused custom event priorities to pollute the parsing of event declarations that did not specify a priority. - [#&#8203;6294](https://github.com/SkriptLang/Skript/pull/6294) Fixed an error that would occur when trying to obtain the "shoes" of an entity. - [#&#8203;6298](https://github.com/SkriptLang/Skript/pull/6298) Fixed the outdated website link in Skript's plugin description. - [#&#8203;6312](https://github.com/SkriptLang/Skript/pull/6312) Fixed a few issues with the updater system that caused pre-releases to be shown to users in the stable release channel. This will only apply to future releases, and users running a 2.7.x version will continue to see prompts to update to a potentially unstable build. - [#&#8203;6317](https://github.com/SkriptLang/Skript/pull/6317) Fixed "parsed as a player" not working for valid inputs. [Click here to view the full list of commits made since 2.8.0-pre1](https://github.com/SkriptLang/Skript/compare/2.8.0-pre1...2.8.0-pre2) ##### Changes - ⚠️ [#&#8203;6310](https://github.com/SkriptLang/Skript/pull/6310) The newly re-added location from vector expression now requires "to location" in the syntax. > The syntax is now `%vector% to location in %world%`. ##### Notices ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. We're currently testing a new version of skript-reflect and we would love some more testers! ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;EquipableMC](https://github.com/EquipableMC) - [@&#8203;sovdeeth](https://github.com/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>. ### [`v2.8.0-pre1`](https://github.com/SkriptLang/Skript/releases/tag/2.8.0-pre1): Pre-Release 2.8.0-pre1 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.7.3...2.8.0-pre1) ##### Skript 2.8.0-pre1 Skript 2.8.0 Pre-Release 1 is here for everyone to begin previewing! This release contains all major features for Skript 2.8.0. As a pre-release, be warned that there may be bugs! We do not recommend running this version on your production servers. We will release additional pre-releases as necessary. Per our [new release model](https://stable.skriptlang.org/clockwork-release-model), we plan to release Skript 2.8.0 on January 15th. Below, you can familiarize yourself with the changes. As always, report any issues to our [issues page](https://github.com/SkriptLang/Skript/issues)! We will be working over the next two weeks to address any issues that are found. Happy New Year and Happy Skripting! ##### ⚠ Breaking Changes - Using players in variable names will soon change from defaulting to names to defaulting to UUIDs. Warnings have been added to help smooth out this transition. See <https://github.com/SkriptLang/Skript/discussions/6270> for more information. - Removed Projectile Bounce State condition and expression. These haven't done anything for years. - The `target entity of player` expression has been improved and now uses raytracing to find the player's target. This should cut down on false positives significantly, but the change in behavior may cause issues for some users who relied on its quirks. - Parsing players from player names is now a bit more intuitive. Previously, parsing `"xyz"` as a player would return the first online player to contain `"xyz"` somewhere in their name. Now, it only returns players that start with `"xyz"`. See [#&#8203;5875](https://github.com/SkriptLang/Skript/pull/5875) for more. - Major changes have been made to the `on grow` event. The grow event now has many more options to specify how you want it to listen. These changes mean that code that uses `on grow of x` may fire twice as often as expected. ```applescript # x -> something on grow[th] from X # something -> x on grow[th] into X # X -> Y on grow[th] from X [in]to Y # x is involved in some way on grow[th] of X ``` - The expression `durability of %item%` now actually returns the durability (a pick with durability 103/160, for example, returns 103) instead of the prior behavior, where it would act like `damage of %item%` (returning 57 for 103/160). - When there are multiple valid event-values for a default expression, Skript will now error and ask you to state which one you want instead of silently picking one. See the following example: ```applescript on right click on entity: send "test" # This will now error, because Skript doesn't know whether to # send it to the clicked entity or the player doing the clicking. ``` - Arithmetic evaluation will now return `<none>` for a whole chain if one of the operations is illegal. Previously, adding `1 + "hello"` would treat `"hello"` as `0` and just return `1`. This now returns `<none>`. However, the behavior of adding things to unset values hasn't changed. `1 + {_none}` still returns `1`. ##### Changelog ##### Additions - [#&#8203;4198](https://github.com/SkriptLang/Skript/pull/4198) Added syntax for interacting with item cooldowns: - a condition that checks whether a player has a cooldown for an item - an expression to get and change the cooldown of an item for a player - [#&#8203;4593](https://github.com/SkriptLang/Skript/pull/4593) Added `raw index of slot` expression. - [#&#8203;4595](https://github.com/SkriptLang/Skript/pull/4595) Added `loop-(counter|iteration)[-%number%]` for both normal and while loop and improved performance for loop-value. - [#&#8203;4614](https://github.com/SkriptLang/Skript/pull/4614) Added the ability to only get certain item types when using the `items in inventory` expression. - [#&#8203;4617](https://github.com/SkriptLang/Skript/pull/4617) Added anvil repair cost expression. - [#&#8203;5098](https://github.com/SkriptLang/Skript/pull/5098) Added an expression to repeat a given string multiple times. - [#&#8203;5271](https://github.com/SkriptLang/Skript/pull/5271) Added time states for the `tool change` event's `event-slot` and for the `hotbar slot` expression. Also allows the ommission of the player in `hotbar slot` when using it in events that have an event-player. - [#&#8203;5356](https://github.com/SkriptLang/Skript/pull/5356) Added an expression for getting and changing the portal cooldown of an entity. - [#&#8203;5357](https://github.com/SkriptLang/Skript/pull/5357) Added toggle pickup for items on living entities. - [#&#8203;5359](https://github.com/SkriptLang/Skript/pull/5359) Added `is jumping` for living entities condition. (Paper 1.15+) - [#&#8203;5365](https://github.com/SkriptLang/Skript/pull/5365) Added syntax for interacting with an entity's active item: - a condition that checks whether an entity's hand(s) is raised - an expression to get an entity's active item (e.g. a bow) - an expression to get the time they've spent using it or how long they need to keep using it to complete the action (e.g. eating) - an expression to get the maximum time an item can be used for - an expression to get the arrow selected in the `ready arrow` event - an effect to cancel the usage of an item - events for when a player readies an arrow and when a player stops using an item. - [#&#8203;5366](https://github.com/SkriptLang/Skript/pull/5366) Added support for getting and modifying the inventories of items, like shulker boxes. - [#&#8203;5367](https://github.com/SkriptLang/Skript/pull/5367) Added syntax to check and set whether a sign has glowing text. - [#&#8203;5456](https://github.com/SkriptLang/Skript/pull/5456) Added the ability to get all armor pieces of an entity. - [#&#8203;5460](https://github.com/SkriptLang/Skript/pull/5460) Added an event for when a player selects a stonecutting recipe. - [#&#8203;5462](https://github.com/SkriptLang/Skript/pull/5462) Added InventoryMoveItemEvent. - [#&#8203;5482](https://github.com/SkriptLang/Skript/pull/5482) Added an expression to get the vector projection of two vectors. - [#&#8203;5494](https://github.com/SkriptLang/Skript/pull/5494) Added a condition to check if an entity is left or right handed, and adds an effect to change their handedness. - [#&#8203;5502](https://github.com/SkriptLang/Skript/pull/5502) Added syntax to create vectors from directions. - [#&#8203;5562](https://github.com/SkriptLang/Skript/pull/5562) Added a condition to check if an entity has unbstructed line of sight to another entity or location. - [#&#8203;5571](https://github.com/SkriptLang/Skript/pull/5571) Added a condition to check if an entity is shorn or not. Also expands the entities that can be shorn with the `shear` effect. - [#&#8203;5573](https://github.com/SkriptLang/Skript/pull/5573) Added a function to clamp a value between two others. - [#&#8203;5588](https://github.com/SkriptLang/Skript/pull/5588) Added player arrow pickup event. - [#&#8203;5589](https://github.com/SkriptLang/Skript/pull/5589) Added hit block of projectile. - [#&#8203;5618](https://github.com/SkriptLang/Skript/pull/5618) Added `is climbing` for living entities condition. - [#&#8203;5633](https://github.com/SkriptLang/Skript/pull/5633) Added an event for when endermen attempt to escape, along with their reason for doing so. - [#&#8203;5636](https://github.com/SkriptLang/Skript/pull/5636) Added `Free/Max/Total Server Memory` expression. - [#&#8203;5662](https://github.com/SkriptLang/Skript/pull/5662) Added expression to return the loaded chunks of worlds. - [#&#8203;5678](https://github.com/SkriptLang/Skript/pull/5678) Added item damage to the `damage` expression. - [#&#8203;5680](https://github.com/SkriptLang/Skript/pull/5680) Added inventory close reason in inventory close event. - [#&#8203;5683](https://github.com/SkriptLang/Skript/pull/5683) Added `event-item` and `event-slot` to the resurrect event. If no totem is present, these values are `none`. - [#&#8203;5763](https://github.com/SkriptLang/Skript/pull/5763) Added Paper 1.16.5+ quit reason for finding out why a player disconnected. - [#&#8203;5800](https://github.com/SkriptLang/Skript/pull/5800) Added an event for when an entity transforms into another entity, like a zombie villager being cured or a slime splitting into smaller slimes. - [#&#8203;5811](https://github.com/SkriptLang/Skript/pull/5811) Added the ability to execute a command as a bungeecord command like /alert. - [#&#8203;5814](https://github.com/SkriptLang/Skript/pull/5814) Added `returns` aliases for `function` definition. - [#&#8203;5845](https://github.com/SkriptLang/Skript/pull/5845) Added `player` and `offlineplayer` functions. - [#&#8203;5867](https://github.com/SkriptLang/Skript/pull/5867) Added expressions to get all characters between two characters, or an amount of random characters within a range. - [#&#8203;5894](https://github.com/SkriptLang/Skript/pull/5894) Added support for keybind components in formatted messages (`<keybind:value>`). - [#&#8203;5898](https://github.com/SkriptLang/Skript/pull/5898) Added `apply bone meal` effect. - [#&#8203;5948](https://github.com/SkriptLang/Skript/pull/5948) Added an event for when players are sent the server's list of commands, as well as an expression to modify them. - [#&#8203;5949](https://github.com/SkriptLang/Skript/pull/5949) Added an expression to get a percentage of one or more numbers. - [#&#8203;5961](https://github.com/SkriptLang/Skript/pull/5961) Added the ability to listen for entities rotating, or rotating and moving, in the `on move` event. - [#&#8203;6101](https://github.com/SkriptLang/Skript/pull/6101) Adds an effect to copy the contents and indices of one variable into others. - [#&#8203;6146](https://github.com/SkriptLang/Skript/pull/6146) Multiple # signs at the beginning of a line now start a comment. - [#&#8203;6162](https://github.com/SkriptLang/Skript/pull/6162) Added a function `isNaN(number)` to check if a number is NaN. - [#&#8203;6180](https://github.com/SkriptLang/Skript/pull/6180) The syntax to get a location from a vector and a world has been re-added. - [#&#8203;6198](https://github.com/SkriptLang/Skript/pull/6198) Added Turkish translation. ##### Bug Fixes - [#&#8203;5308](https://github.com/SkriptLang/Skript/pull/5308) Fixed `cursor slot` not always returning the correct item in `inventory click` events. - [#&#8203;5406](https://github.com/SkriptLang/Skript/pull/5406) Fixed some order of operation issues with the `difference` expression. - [#&#8203;5744](https://github.com/SkriptLang/Skript/pull/5744) Fixed an issue where the error for missing enum lang entries would be printed much more often than they should be. - [#&#8203;5815](https://github.com/SkriptLang/Skript/pull/5815) Improvements to comparators and converters. - [#&#8203;5878](https://github.com/SkriptLang/Skript/pull/5878) Fixed some issues with the `parsed as` expression returning arrays or throwing exceptions. - [#&#8203;6224](https://github.com/SkriptLang/Skript/pull/6224) Fixed the examples for applying potion effects. - [#&#8203;6229](https://github.com/SkriptLang/Skript/pull/6229) Fixed an exception when trying to get the text input of an anvil. - [#&#8203;6231](https://github.com/SkriptLang/Skript/pull/6231) Fixed an exception when trying to print a block state. - [#&#8203;6239](https://github.com/SkriptLang/Skript/pull/6239) Fixed an exception when removing items from `drops` in 1.20.2+. - [#&#8203;6266](https://github.com/SkriptLang/Skript/pull/6266) Fixed a bug that caused incorrect errors to be printed when comparing things. ##### Removals - [#&#8203;5958](https://github.com/SkriptLang/Skript/pull/5958) Removed the projectile bounce state condition and expression. These had no function. ##### Changes - [#&#8203;4281](https://github.com/SkriptLang/Skript/pull/4281) Rewrote the `furnace slot` expressions and fixes numerous issues with them. - [#&#8203;5114](https://github.com/SkriptLang/Skript/pull/5114) Added the ability to save, load, and unload specific worlds, or listen for those event for specific worlds. - [#&#8203;5279](https://github.com/SkriptLang/Skript/pull/5279) Changed how Skript does arithmetic to support many more combinations, like multiplying vectors by scalars, adding timespans, and more. - [#&#8203;5478](https://github.com/SkriptLang/Skript/pull/5478) Improved the `element` expression and adds the ability to A, get the first or last x elements of a list, and B, get the elements in a range from x to y in the list. - [#&#8203;5639](https://github.com/SkriptLang/Skript/pull/5639) Major changes to the `on grow` event. Fixes an issue where listening to `on grow of sugarcane` or any other full-block plant, like cacti or pumpkins, would never fire. Adds more functionality to specify what exactly to listen for. ```applescript # x -> something on grow[th] from X # something -> x on grow[th] into X # X -> Y on grow[th] from X [in]to Y # x is involved in some way on grow[th] of X ``` - [#&#8203;5674](https://github.com/SkriptLang/Skript/pull/5674) Made the `case-insensitive variables` config option visible by default in the config file. - [#&#8203;5769](https://github.com/SkriptLang/Skript/pull/5769) Skript now errors when an ambiguous event value is found for a default expression: ```applescript! # This will now error, as it's unclear who to send "test" to! on right click on entity: send "test" ``` - [#&#8203;5796](https://github.com/SkriptLang/Skript/pull/5796) Expanded the `block change` event and adds block and blockdata event values. - [#&#8203;5841](https://github.com/SkriptLang/Skript/pull/5841) Inventory titles now support hex colours and more. - [#&#8203;5875](https://github.com/SkriptLang/Skript/pull/5875) Changed the parsing of players to only match players that start with that name, rather than simply containing the name. - [#&#8203;5889](https://github.com/SkriptLang/Skript/pull/5889) Allows the omission of the command name when using the command info expressions within a command's trigger section or command event. - [#&#8203;5900](https://github.com/SkriptLang/Skript/pull/5900) Improved how event parsing is handled internally. - [#&#8203;5976](https://github.com/SkriptLang/Skript/pull/5976) Added `decrease` as an alias for `reduce`, e.g. `decrease {_var} by 2`. - [#&#8203;6010](https://github.com/SkriptLang/Skript/pull/6010) Allows the use of `and with` before `fade out` in the `title` effect. - [#&#8203;6024](https://github.com/SkriptLang/Skript/pull/6024) Allows `continue` to continue outer loops. - [#&#8203;6139](https://github.com/SkriptLang/Skript/pull/6139) Allows setting the current hotbar slot of a player to a number as well as a slot. - [#&#8203;6157](https://github.com/SkriptLang/Skript/pull/6157) Changes the `target entity` expression to use raytracing for a player's target. This should make it much more accurate, but may change behavior slightly. Also adds an option to change the ray size and to ignore blocks. - [#&#8203;6172](https://github.com/SkriptLang/Skript/pull/6172) Allows the plural "commands" in the execute command effect. - [#&#8203;6271](https://github.com/SkriptLang/Skript/pull/6271) Added warnings for using players in variable names, without the `use player uuids in variable names` config option enabled. ##### API Changes - [#&#8203;5307](https://github.com/SkriptLang/Skript/pull/5307) Switched `Timespan#getTicks` and `Timespan#fromTicks` from returning ints to returning longs. Deprecated `Timespan#getTicks_i` and `Timespan#fromTicks_i` due to API name change. - [#&#8203;5408](https://github.com/SkriptLang/Skript/pull/5408) Cleaned up the Yggsdrasil serialization code. - [#&#8203;5440](https://github.com/SkriptLang/Skript/pull/5440) Added a "parse section", which can be used to test if code properly parses or not. This is for the testing suite. - [#&#8203;5502](https://github.com/SkriptLang/Skript/pull/5502) Added method `Direction#getDirection` which returns a vector. - [#&#8203;5550](https://github.com/SkriptLang/Skript/pull/5550) The Skript profiler can now run for as long as the user wants. - [#&#8203;5874](https://github.com/SkriptLang/Skript/pull/5874) SimplePropertyExpression now automatically defends `%objects%` to avoid UnparsedLiterals. - [#&#8203;5941](https://github.com/SkriptLang/Skript/pull/5941) `ExpressionType#NORMAL` was removed. `ExpressionType#EVENT` was added for EventValueExpressions. A new default register method was added to EventValueExpression. - [#&#8203;5955](https://github.com/SkriptLang/Skript/pull/5955) Added `WILL` to PropertyCondition to allow for easy registration for conditions like `player will consume the firework charge`. - [#&#8203;6000](https://github.com/SkriptLang/Skript/pull/6000) Renames the field `SyntaxElementInfo#c` to `SyntaxElementInfo#elementClass`. This field will be made private in 2.9. Please use the `SyntaxElementInfo#getElementClass()` getter instead. - [#&#8203;6001](https://github.com/SkriptLang/Skript/pull/6001) Renamed the Slot classinfo from `Inventory Slot` to `Slot`. - [#&#8203;6054](https://github.com/SkriptLang/Skript/pull/6054) Replaced `MarkedForRemoval` annotations with `ApiStatus.ScheduledForRemoval`. - [#&#8203;6261](https://github.com/SkriptLang/Skript/pull/6261) Allows overrides of the `cleanup()` method in JUnit tests. [Click here to view the full list of commits made since 2.7.3](https://github.com/SkriptLang/Skript/compare/2.7.3...2.8.0-pre1) ##### Notices ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. We're currently testing a new version of skript-reflect and we would love some more testers! ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;3meraldK](https://github.com/3meraldK) - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;AyhamAl-Ali](https://github.com/AyhamAl-Ali) - [@&#8203;DelayedGaming](https://github.com/DelayedGaming) - [@&#8203;erenkarakal](https://github.com/erenkarakal) - [@&#8203;Fusezion](https://github.com/Fusezion) - [@&#8203;kiip1](https://github.com/kiip1) - [@&#8203;MihirKohli](https://github.com/MihirKohli) - [@&#8203;Moderocky](https://github.com/Moderocky) - [@&#8203;Noteult](https://github.com/Noteult) - [@&#8203;nylhus](https://github.com/nylhus) - [@&#8203;Pikachu920](https://github.com/Pikachu920) - [@&#8203;ShaneBeee](https://github.com/ShaneBeee) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) - [@&#8203;UnderscoreTud](https://github.com/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>. ### [`v2.7.3`](https://github.com/SkriptLang/Skript/releases/tag/2.7.3): Patch 2.7.3 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.7.2...2.7.3) ##### Skript 2.7.3 Skript 2.7.3 is here to end off the year with a few bug fixes. This will be the **final** release for Skript 2.7 versions. As per the [new release model](https://stable.skriptlang.org/clockwork-release-model), Skript 2.8 will release after the new year on January 15th. We are immensely appreciative of all of the support we have received this year. Happy Holidays and Happy Skripting! ##### Changelog ##### Bug Fixes - [#&#8203;6123](https://github.com/SkriptLang/Skript/pull/6123) Fixed a priority issue that could cause the "sets" expression to match over other, better-fitting possibilities. - [#&#8203;6171](https://github.com/SkriptLang/Skript/pull/6171) Fixed an issue that caused accessing inventories in death events as well as checking the type of a spawner to be impossible. - [#&#8203;6205](https://github.com/SkriptLang/Skript/pull/6205) Location comparisons have been improved to significantly reduce the possibility of false negative results. ##### API Changes - [#&#8203;6201](https://github.com/SkriptLang/Skript/pull/6201) This is a behavioral change for the asynchronous execution API that was added to SkriptEvent (`SkriptEvent#canExecuteAsynchronously`). The `SkriptEvent#check` method may now be called asynchronously if the SkriptEvent can execute asynchronously. While we will not typically include behavioral changes like this in patch releases, this change was to address major performance issues that could occur from locking threads. ##### Notices ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. We're currently testing a new version of skript-reflect and we would love some more testers! ##### Compatibility Warning Due to the major internal changes within the 2.7 update, some addons may no longer work properly. Please be patient as addon developers work to update their addons. We have published a new release of our [Addon Patcher](https://github.com/SkriptLang/AddonPatcher/releases/tag/2.7.0-dev1), but be aware that it cannot fix all issues. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) 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.7.2`](https://github.com/SkriptLang/Skript/releases/tag/2.7.2): Patch 2.7.2 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.7.1...2.7.2) ##### Skript 2.7.2 As per the [new release model](https://stable.skriptlang.org/clockwork-release-model), the first of the month brings with it a new Skript release! This release includes several bug fixes for issues that have been reported. Thank you all for your continued support. Happy Skripting! ##### Changelog ##### Bug Fixes - [#&#8203;5765](https://github.com/SkriptLang/Skript/pull/5765) Fixed an error with non-finite vectors - [#&#8203;6038](https://github.com/SkriptLang/Skript/pull/6038) Fixed the JavaDocs name and title elements - [#&#8203;6078](https://github.com/SkriptLang/Skript/pull/6078) Updated documentation links to the new Minecraft wiki - [#&#8203;6080](https://github.com/SkriptLang/Skript/pull/6080) Fixed issues with language nodes in command help - [#&#8203;6090](https://github.com/SkriptLang/Skript/pull/6090) Fixed the fake player count syntax for Paper - [#&#8203;6102](https://github.com/SkriptLang/Skript/pull/6102) Fixed an error when sorting lists - [#&#8203;6103](https://github.com/SkriptLang/Skript/pull/6103) Fixed UTF-8 encoding when building Skript - [#&#8203;6106](https://github.com/SkriptLang/Skript/pull/6106) Fixed reloading a directory with the script file effect - [#&#8203;6117](https://github.com/SkriptLang/Skript/pull/6117) Fixed an error when printing block inventories - [#&#8203;6121](https://github.com/SkriptLang/Skript/pull/6121) Fixed an issue where Skript options would not work in functions in some cases - [#&#8203;6126](https://github.com/SkriptLang/Skript/pull/6126) Fixed permission messages not showing for Skript commands - [#&#8203;6128](https://github.com/SkriptLang/Skript/pull/6128) Fixed issue when checking if Minecraft time is between two values that span across midnight - [#&#8203;6130](https://github.com/SkriptLang/Skript/pull/6130) Fixed issues with changing in the drops expression not setting all items and possibly causing an error - [#&#8203;6132](https://github.com/SkriptLang/Skript/pull/6132) Fixed floating point error that could occur when trying to loop with "x times" - [#&#8203;6150](https://github.com/SkriptLang/Skript/pull/6150) Fixed the message when reloading multiple scripts in a directory - [#&#8203;6154](https://github.com/SkriptLang/Skript/pull/6154) Fixed an issue with changing the durability of an item [Click here to view the full list of commits made since 2.7.1](https://github.com/SkriptLang/Skript/compare/2.7.1...2.7.2) ##### Notices ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Compatibility Warning Due to the major internal changes within the 2.7 update, some addons may no longer work properly. Please be patient as addon developers work to update their addons. We have published a new release of our [Addon Patcher](https://github.com/SkriptLang/AddonPatcher/releases/tag/2.7.0-dev1), but be aware that it cannot fix all issues. ##### Thank You Special thanks to the contributors whose work was included in this version: - [@&#8203;3meraldK](https://github.com/3meraldK) - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) - [@&#8203;MihirKohli](https://github.com/MihirKohli) - [@&#8203;Spongecade](https://github.com/Spongecade) - [@&#8203;UnderscoreTud](https://github.com/UnderscoreTud) - [@&#8203;AyhamAl-Ali](https://github.com/AyhamAl-Ali) - [@&#8203;Moderocky](https://github.com/Moderocky) - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;sovdeeth](https://github.com/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>. ### [`v2.7.1`](https://github.com/SkriptLang/Skript/releases/tag/2.7.1): Patch 2.7.1 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.7.0...2.7.1) ##### Skript 2.7.1 In this release, we have patched many of the current known issues of Skript 2.7.0. We have also added support for Minecraft 1.20.2 and most its aliases. Thank you all again for your continued support. Happy Skripting! ##### Changelog ##### Bug Fixes - [#&#8203;5658](https://github.com/SkriptLang/Skript/pull/5658) Fixed `keep inventory` in a death event and related issues - [#&#8203;5952](https://github.com/SkriptLang/Skript/pull/5952) Fixed bugs with removing from vector length, setting components of multiple vectors, and issues when running with debug verbosity. - [#&#8203;5965](https://github.com/SkriptLang/Skript/pull/5965) Fixed event values in chunk enter event - [#&#8203;5966](https://github.com/SkriptLang/Skript/pull/5966) Fixed the registration (and logging) of Skript commands - [#&#8203;5997](https://github.com/SkriptLang/Skript/pull/5997) Fixed potion durations being locked to 15 seconds - [#&#8203;6004](https://github.com/SkriptLang/Skript/pull/6004) Added missing event-item for the book sign event - [#&#8203;6021](https://github.com/SkriptLang/Skript/pull/6021) Fixed inability to change the remaining time of a command cooldown - [#&#8203;6022](https://github.com/SkriptLang/Skript/pull/6022) Fixed an issue generating random numbers on older versions of Java - [#&#8203;6023](https://github.com/SkriptLang/Skript/pull/6023) Fixed an exception when attempting to use an attribute that an entity does not support - [#&#8203;6026](https://github.com/SkriptLang/Skript/pull/6026) Fixed a casting error when using a pre-set variable for command cooldown storage - [#&#8203;6027](https://github.com/SkriptLang/Skript/pull/6027) Corrected some missing versions in the documentation - [#&#8203;6033](https://github.com/SkriptLang/Skript/pull/6033) Fixed local variables in the spawn effect section - [#&#8203;6047](https://github.com/SkriptLang/Skript/pull/6047) Fixed an issue when using two or more 'variables' sections - [#&#8203;6050](https://github.com/SkriptLang/Skript/pull/6050) Fixed an issue when using two or more 'aliases' sections - [#&#8203;6067](https://github.com/SkriptLang/Skript/pull/6067) Fixed an issue when using the 'stop all sounds' effect - [#&#8203;6072](https://github.com/SkriptLang/Skript/pull/6072) Fixed the spawn section not working on Minecraft 1.20.2 - [#&#8203;6081](https://github.com/SkriptLang/Skript/pull/6081) Fixed duplicate logging issues that could occur due to recent API changes [Click here to view the full list of commits made since 2.7.0](https://github.com/SkriptLang/Skript/compare/2.7.0...2.7.1) ##### Notices ##### New Release Model We have switched to a new release model starting with this version. New syntax, features, and quality-of-life changes will be saved for large `2.X` versions, released twice per year. \ Bug fixes will be released monthly in smaller `2.7.X` versions. The full details of this model are available [here](https://stable.skriptlang.org/clockwork-release-model). ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### Compatibility Warning Due to the major internal changes within the 2.7 update, some addons may no longer work properly. Please be patient as addon developers work to update their addons. We have published a new release of our [Addon Patcher](https://github.com/SkriptLang/AddonPatcher/releases/tag/2.7.0-dev1), but be aware that it cannot fix all issues. ##### Thank You We have continued to see an increase in new contributors recently, and we would like to thank all who have contributed to this version of Skript. :star: :slightly\_smiling\_face: Special thanks to the team members and contributors whose work was included in this version: - [@&#8203;AyhamAl-Ali](https://github.com/AyhamAl-Ali) - [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) - [@&#8203;UnderscoreTud](https://github.com/UnderscoreTud) - [@&#8203;Pikachu920](https://github.com/Pikachu920) - [@&#8203;DelayedGaming](https://github.com/DelayedGaming) - [@&#8203;sovdeeth](https://github.com/sovdeeth) - [@&#8203;APickledWalrus](https://github.com/APickledWalrus) - [@&#8203;Moderocky](https://github.com/Moderocky) 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.7.0`](https://github.com/SkriptLang/Skript/releases/tag/2.7.0) [Compare Source](https://github.com/SkriptLang/Skript/compare/2.6.4...2.7.0) ##### 🚀 Skript 2.7.0 ##### 📢 We are proud to finally say that 2.7.0 is here! Our last stable release was 2.6.4 nearly a year ago, and a *lot* has happened since then. In this release, we have implemented over 80 new features along with nearly 70 bug fixes. Beyond that, a significant portion of this time has been spent on overhauling Skript's codebase. This update includes some of the biggest internal enhancements in years. Almost every part of Skript should run faster, and as we continue to build upon these improvements, the benefits will only grow. We realize that this update has taken much longer than expected. Our development cycle has been rather flawed, and we are committed to making changes that will result in a clearer release schedule. We will have more to share about that soon when we finalize a new process. 🎉 We are also very excited to welcome a new member, [@&#8203;sovdeeth](https://github.com/sovdeeth) to our team. Thank you all again for your continued support. Happy Skripting! ⚡ ##### 📢 End of 1.12.2 Support As mentioned in the previous releases, we have decided to drop support for 1.12 and lower (legacy versions). This means that this version will only work on versions 1.13 and higher. Only critical fixes will be backported to 2.6.X. ##### ⚠ Compatibility Warning Due to the major internal changes within this update, some addons may no longer work properly. Please be patient as addon developers work to update their addons. We have published a new release of our [AddonPatcher](https://github.com/SkriptLang/AddonPatcher/releases/tag/2.7.0-dev1), but be aware that it cannot fix all issues. ##### ⚠ Breaking Changes - Scripts in subdirectories will now load before those in the main directory. - List parsing order has changed to function in a clearer manner: ``` # Here is an example list declaration set {_l::*} to "abc", length of "def", "ghi" # Previous Behavior Interpretation: "abc", length of ("def", "ghi") Result: "abc", 3, 3 # New Behavior Interpretation: "abc", length of ("def"), "ghi" Result: "abc", 3, "ghi" ``` - Removed the expression for obtaining the numerical ID of an item - The durability expression has changed. Durability now works counter to damage. That is, as the damage of an item increases, its durability decreases. Here is an example: ``` set {_item} to <some item with 1000 durability> add 5 to the damage of {_item} # durability is now 995/1000 add 5 to the durability of {_item} # durability is now 1000/1000 again ``` ##### ⭐️ 2.7.0 Changelog ##### [Click here to view the full list of commits made since 2.6.4](https://github.com/SkriptLang/Skript/compare/2.6.4...2.7.0) Click below to view the entire changelog for this release (all changes since 2.6.4). <details> <summary> <i>Full changelog</i> </summary> ##### Notable Additions 📃 All new syntax can be viewed on [docs.skriptlang.org](https://docs.skriptlang.org/docs.html?isNew). - Language support for French, Polish, Simplified Chinese, and Japanese has been added. - We have significantly overhauled the default examples. The goal of these new examples is to display most of Skript's feature set with a better range of difficulties. - Multiline conditionals has been added. These work on an if-then based structure. <details> <summary> <i>Multiline Conditional Example</i> </summary> ``` # all conditions must pass if: condition 1 condition 2 then: do stuff # at least one condition must pass if any: condition 1 condition 2 then: do stuff # it can also be used in else-if statements if 1 + 1 = 3: do stuff that will never actually be done else if: condition 1 condition 2 then: do stuff else: do stuff ``` </details> - Local Functions that can only be used in the script that they are declared have been added. <details> <summary> <i>Local Function Example</i> </summary> ``` # in script1.sk local function welcome(): broadcast "Welcome!" # in script2.sk on script load: welcome() # this will error as `welcome()` is only available in script1.sk ``` </details> - The Options section has been expanded to support nesting. <details> <summary> <i>Nested Options Example</i> </summary> ``` options: price: apple: 1000 orange: 100 # {@&#8203;price.apple} and {@&#8203;price.orange} are now valid options ``` </details> ##### Additions - Added syntax support for obtaining and modifying the age of blocks (e.g. crops) and entities (closes #&#8203;3068, #&#8203;4534) - Added support for providing multiple players in the played before condition - Added syntax support for the freezing mechanics introduced in 1.18 - Added support for `the last struck lightning` (this only applies to lighting strikes created by Skript) (closes #&#8203;3872) - Added syntax for forcing entities to pathfind to a location (closes #&#8203;2334) - Added syntax for obtaining a list of the names of all loaded plugins (closes #&#8203;4189) - Added syntax for obtaining the bed location of offline players (closes #&#8203;4659) - Added syntax for modifying the *unsafe* bed location of players, meaning they will respawn there even if the location is obstructed - Added events and event values for when an anvil is damaged (requires Paper) and when an item is placed in an anvil (e.g. preparing for a repair) (closes #&#8203;4456) - Added additional event values for the player and entity move events (closes #&#8203;4890) - Added a new configuration option for printing warnings for script lines that take too long to parse (closes #&#8203;4759) > Look for `long parse time warning threshold` in your `config.sk`! - Added an expression for obtaining the raw content of a string (no parsing or stripping of formatting) (closes #&#8203;4102) - Added support for spawning a wolf with a specific collar color (closes #&#8203;1760) - Added support for obtaining the amplifier of an entity's potion effect (thanks @&#8203;Ankoki) - Added complete support for the "player egg throw event" - Added French language support (thanks @&#8203;Romitou) - Added support for multiple entities in the equip syntax (closes #&#8203;5083) - Added the player trade event with support for obtaining the involved entity (thanks @&#8203;AbeTGT) - Added case sensitivty support for the join and split syntax > Note that these expressions will now take into account the case sensitivity config option (closes #&#8203;4886) - Added support for lang files to automatically update when changes are detected > Note that when a change is detected, existing lang files will be moved into a backups folder - Added the ability for creating sectioned options (closes #&#8203;4032) - Added support for obtaining and modifying the pickup delay of a dropped item - Added Polish language support - Added support for `the last launched firework` (this only applies to fireworks launched by Skript) (closes #&#8203;4942) - Added syntax for obtaining the environment (overworld, nether, end) of a world (closes #&#8203;3673) - Added a condition for checking whether an entity is gliding (thanks @&#8203;Ankoki) (closes #&#8203;5145) - Added syntax for modifying and checking whether an entity is invisible (thanks @&#8203;D4isDAVID) - Added an event for when an entity jumps (thanks @&#8203;AbeTGT) - Added syntax for obtaining and modifying the duration of an entity burning (closes #&#8203;923) - Added support for creating local functions (closes #&#8203;2188, #&#8203;5167) - Added syntax for obtaining the nearest entity relative to another entity or location (closes #&#8203;4674) - Added syntax for checking whether a location is within a certain radius of another location (closes #&#8203;5201) - Added syntax for obtaining the list of all banned players or IP addresses - Added syntax for checking if a location is within two other locations - Added syntax for obtaining the current moon phase of a world (closes #&#8203;746) - Added past, present, and future event values for the block place event - Added block data support to the `type of` expression - Added syntax for obtaining the text input of an anvil - Added the ability to set a block to a specific skull (e.g. the player's skull) (closes #&#8203;1789) - Added syntax for obtaining, modifying, and checking for server operators (closes #&#8203;4910) - Added support for multiline conditions (closes #&#8203;5152) - Added syntax for forcing an entity to look at another entity - Added syntax for allowing modification of the *actual* maximum player count (thanks @&#8203;kiip1) - Added events for when a player starts/stops/swaps spectating another entity - Added modification support to the book pages expression - Added support for using `a`/`an` in inventory types > That is, you can now write `set {_var} to a shulker box inventory`. - Added syntax for respawn anchors (thanks @&#8203;hotpocket184) (closes #&#8203;4726) - Added a literal representing pi (thanks @&#8203;kiip1) (closes #&#8203;5288) - Added a new command entry for changing the command prefix > The command prefix is used when there may be command name conflicts with another plugin (this is the `skript:` part of `skript:mycustomcommand`). - Added support for worlds in the `name of` syntax (thanks @&#8203;DelayedGaming) - Added support for determining whether an entity is valid > An entity will be considered invalid if it has died or despawned. - Added an event for when an entity drops an item (thanks @&#8203;ShaneBeee) - Added support for determining whether an entity is an enemy (thanks @&#8203;ShaneBeee) > Note that this is only available on Minecraft 1.19.3 and newer. - Added support for obtaining the source block in a block spread event (thanks @&#8203;GodModed) (closes #&#8203;5346) - Added the loot generate event and support for modifying the loot - Added syntax for obtaining and modifying the number of sea pickles at a block - Added support for unequipping items from an entity (thanks @&#8203;colton-boi) (closes #&#8203;5360) - Added Simplified Chinese language support (thanks @&#8203;CJYKK) - Added Japanese language support (thanks @&#8203;faketuna and @&#8203;rilyhugu) - Added a chat component tag for copying to the clipboard (closes #&#8203;5351) > Example: `send "<copy:text to copy>text to display" - Added syntax for determining whether a tool is the preferred tool for harvesting a block - Added syntax for determining whether an item is stackable (max stack size > 1) (thanks @&#8203;cooffeeRequired) - Re-enabled support for the the player view distance on newer versions where it functions (thanks @&#8203;ShaneBeee) - Added syntax for obtaining all values of a specific type (closes #&#8203;5065, #&#8203;5082, #&#8203;5235) > Examples include `all colors`, `all potion effect types`, etc. - Added syntax for obtaining how fast a player can break block at a given moment - Alias names can now be used for parsing block data (previously only Minecraft IDs were valid) - Added a `value within` syntax for modifying the values of a variable rather than the variable itself > Example: `delete the entity within {_entity}` # deletes the entity rather than the variable - Added syntax for applying knockback to an entity - Added support for rounding to a specific decimal point in the round function (closes #&#8203;3579) - Added an event and event values for when a change occurs in a player's inventory slot - Added an event for when a player has slept long enough to count as passing the night/storm (thanks @&#8203;DelayedGaming) - Added an event for when a player enters a chunk (thanks @&#8203;DelayedGaming) (closes #&#8203;5441) - Added an event for when a player's experience changes (closes #&#8203;2858) - Added syntax for checking if a location is within an entity, chunk, world, or block - Added support for modifying the Skript prefix in the language files (thanks @&#8203;Fusezion) (closes #&#8203;5424) - Added a chat component tag for translating game strings based on the player's locale (closes #&#8203;4875) > Example: `send "<translate:block.minecraft.diamond_block>"` prints `Block of Diamond` - Added support for reseting the target of an entity - Added an event for when a falling block starts falling (thanks @&#8203;DelayedGaming) - Added support for serial (Oxford) commas in lists (thanks @&#8203;Mr-Darth) - Added support for the inventory drag event (closes #&#8203;3744) - Added support for using formatting in the book pages syntax - Added InventoryDragEvent (closes #&#8203;3744) ##### Tweaks and Removals - Countless internal optimizations and improvements - Many minor syntax tweaks - Updated the random vector expression to return positive and negative components (closes #&#8203;3135) - Removed support for WorldGuard 6 - Fixed and improved some errors and exceptions (closes #&#8203;4234) - Enhanced support for obtaining the target location of additional mobs - Scripts in subdirectories will now load before those in the main directory (closes #&#8203;466) - The date formatting expression now supports the usage of variables in custom formats - Significantly improved asynchronous script loading - Significantly improved the tab completion of the `/skript` command (specifically for enabling/reloading/disabling scripts) (closes #&#8203;4666) - Enhanced the "command already defined" error message to include the source of the error (closes #&#8203;1329) - Improved modification of the spawn point (greater accuracy) (closes #&#8203;4955) - Events listeners will now be unregistered when the last occurence of that event is removed from loaded scripts (closes #&#8203;5141) - Renamed the `subtext` expression to `substring` (thanks @&#8203;Kanvi1) (closes #&#8203;5196) - Removed the operator entity data (syntax was added to replace this) - Completely rewrote the default example scripts to better represent best practices of Skript (closes #&#8203;2252) - Reworked the event values for the edit book event (now includes a future event value) - Completely rewrote the Comparator system (closes #&#8203;4928) - Completely rewrote the Converter system (closes #&#8203;1747, #&#8203;5045, #&#8203;5302) - Improved parsing speeds, especially for larger scripts (closes #&#8203;1117, #&#8203;1783, #&#8203;4905) - Optimized and reworked list parsing (closes #&#8203;4025, #&#8203;5122, #&#8203;5243) - Overhauled the quality of code in the variables package (closes #&#8203;5398) - Removed the expression for obtaining the numerical ID of an item - The durability expression no longer functions the same as damage (now, as damage increases, durability decreases) (closes #&#8203;4692) - Rewrote internal math functions to improve their performance (thanks @&#8203;kiip1) - Improved the error message for when a left click event on an entity is used (thanks @&#8203;oskarkk) - Improved the performance of aliases (thanks @&#8203;bluelhf) - Prevents Skript from enabling Timings support for Paper versions 1.19.4 or greater (closes #&#8203;5726) ##### Bug Fixes - Fixed an issue where variables are loaded after Skript loads which breaks the usage of variables in `on skript start` (closes #&#8203;5882) - Fixed an issue where some syntax could be used in unintended events causing an exception (closes #&#8203;4872) - Fixed an issue where the same error may be printed multiple times for incorrect function definitions (closes #&#8203;4771) - Fixed an issue with function return values failed to properly convert to the expected type (closes #&#8203;4524) - Fixed an issue where plural arguments could be passed in singular function parameters (closes #&#8203;4859) - Fixed an exception that could occur when formatting a date - Fixed an exception that could occur if a location did not contain a world for the teleport effect - Fixed an exception that could occur when spawning a falling block without specifying the type (closes #&#8203;5042) - Fixed an issue that could occur where some events would not register if related events were already registered (thanks @&#8203;TFSMads) (closes #&#8203;4705) - Fixed an issue where options did not work in function declarations (closes #&#8203;2492) - Addressed mutliple exceptions that could occur when using parallel (multithreaded) script loading (closes #&#8203;4579) > Please understand that for the moment, parallel loading is not performed for most script loading, and therefore will have little effect. Significant improvements are expected for the future. - Fixed numerous issues that could occur when trying to reload script files using different cases on operating systems where file names are case insensitive (e.g. Windows) (closes #&#8203;4459) - Fixed an issue where adding aliases to commands would not properly sync with clients (meaning it appeared as if the alias was not registered in game) (closes #&#8203;4307) - Fixed an issue where function (re)loading would often incorrectly error if asynchrounous script reloading is enabled (closes #&#8203;4246) - Fixed an issue where an exception could occur when disabling a script that disables another one (using `on stop`) (closes #&#8203;4916) - Fixed an issue where the replace syntax would erroneously modify all used variables (closes #&#8203;5232) - Fixed an issue where `target falling block` did not work (closes #&#8203;5223) - Fixed an issue where block data could not be compared (closes #&#8203;5251) - Fixed an issue where the parse expression would have the incorrect return type when used with a pattern (closes #&#8203;5274) - Fixed an exception that could occur when setting the time of a SimpleExpression and providing a null default expression > Note that a SkriptAPIException will now occur instead as this in incorrect API usage. - Improved rounding accuracy (closes #&#8203;4235) - Fixed an issue where the event values for the block spread event returned the same value (thanks @&#8203;ShaneBeee) - Fixed a few cases where some syntax could be used in unintended events - Fixed an issue where obtaining a random element out of a list of literals would only randomize during parse time (rather than during runtime) (closes #&#8203;5345) - Fixed an issue where ghost items may remain in the inventory after cancelling an inventory interaction event (closes #&#8203;5342) - Fixed a few issues with integer division and multiplication (closes #&#8203;4445) - Fixed an issue where some expressions could erroneously modify the values of another (closes #&#8203;5322) - Fixed an issue where the uncolored expression failed to handle nested tags (closes #&#8203;5224) - Fixed an issue where goat horn variants did not work (closes #&#8203;4882) - Fixed an issue where negated conditions could erroneously fail on lists - Fixed several issues with default variables, including them not working for any expression type that wasn't an object (closes #&#8203;2174, #&#8203;4567) - Fixed an issue where the drop syntax would overwrite the experience amount for merged experience orbs (closes #&#8203;5490) - Fixed an exception that occured when getting a random number between two numbers that only differ by decimal - Fixed several bugs that could occur when using the `all blocks` syntax (closes #&#8203;5565) - Fixed an issue where random vectors were not unit and not true random generations (thanks @&#8203;DelayedGaming) - Fixed an issue where deleting the target of a player would not function as expected (closes #&#8203;4221) - Fixed an issue where the falling block land event was also called when a block started falling (thanks @&#8203;DelayedGaming) - Fixed an issue where the color of some messages (e.g. warnings, errors) was missing - Fixed an exception that could occur when attempting to serialize a location with an unloaded world - Fixed an issue where entity data was not properly applied before running the spawn effect section (closes #&#8203;5711) - Fixed many issues where comparisons could fail when using literals that match multiple types (closes #&#8203;2711, #&#8203;4773, #&#8203;5497, #&#8203;5556, #&#8203;5675) - Fixed an exception that could occur when using an invalid message for the action bar syntax (closes #&#8203;5776) - Fixed an exception that could occur when executing certain syntax in asynchronous events (closes #&#8203;5689) - Fixed an issue where book pages can't be set (closes #&#8203;5709) - Fixed `target of` expression throwing an exception in some cases when deleting an entity (closes #&#8203;5761) - Fixed an issue with `all blocks` expression throwing an exception when used with directions only (closes #&#8203;5787) - Fixed an issue with ExprRawString using a Java 9 feature instead of Java 8 (closes #&#8203;5794) - Fixed an issue where an exception is thrown when using `stop all sounds` effect (closes #&#8203;5756) - Fixed an issue where chained multiline else-ifs errors when first if is not multiline (closes #&#8203;5866) - Fixed an issue where you can't enchant multiple players tools (closes #&#8203;5530) ##### API Changes - We want to bring attention to the usage of ParserInstance#isCurrentEvent. When using this method to restrict your syntax to a specific event during init, you should also be performing a runtime instanceof check on the Event object. For further details, review PR #&#8203;4884. - Parse tags can now also be expanded onto optional pattern elements. That is, `:[abc|def]` is now equivalent to `[:abc|:def]` (this was already the case for `:(abc|def)` and `(:abc|:def)`) - Added a utility class for easily creating Enum-based ClassInfos (see #&#8203;5129) - Added a utility method or deleting a variable in the Variables class (see #&#8203;5217) - Added support for registering plural event values (see #&#8203;5168) - The Comparator system has been completely rewritten. Please review the javadoc as many classes and methods have been deprecated. These will continue to function for now - The Converter system has been completely rewritten. Please review the javadoc as many classes and methods have been deprecated. These will continue to function for now - SelfRegisteringSkriptEvent has been deprecated (see #&#8203;5140) - Added support for registering a property expression with default expressions (see #&#8203;5272) - The `final` modifier on PropertyExpression has been removed, allowing them to return multiple items per element if overriden (see #&#8203;5455) (closes #&#8203;5521) - Added support for registering custom VariableStorage implementations (see #&#8203;4873) Credit to the team on this release: [@&#8203;APickledWalrus](https://github.com/APickledWalrus) [@&#8203;TheLimeGlass](https://github.com/TheLimeGlass) [@&#8203;TPGamesNL](https://github.com/TPGamesNL) [@&#8203;AyhamAl-Ali](https://github.com/AyhamAl-Ali) [@&#8203;sovdeeth](https://github.com/sovdeeth) [@&#8203;Pikachu920](https://github.com/Pikachu920) [@&#8203;UnderscoreTud](https://github.com/UnderscoreTud) [@&#8203;Moderocky](https://github.com/Moderocky) </details> ##### 📝 Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### ⭐️ Thank You We saw a large increase in new contributors recently, and we just wanted to thank all who have contributed to this version of Skript. Lots of issues and suggestions arise and we could not have made it here without the help of the community. 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.6.4`](https://github.com/SkriptLang/Skript/releases/tag/2.6.4): Bug fixes for legacy versions [Compare Source](https://github.com/SkriptLang/Skript/compare/2.6.3...2.6.4) ##### Hello Skripters 👋 Today we're releasing version 2.6.4 which brings out a couple fixes towards Minecraft versions below 1.14 ##### 📢 End of 1.12.2 Support As mentioned in the previous releases, we have decided to drop support for 1.12 and lower (legacy versions) in **Skript 2.7**. This means that **Skript 2.6.X** is the last version that will work with the legacy versions. *Only critical fixes will be backported to 2.6.X.* ##### ⭐️ 2.6.4 Changelog Click below to view the entire changelog for this release. <details> <summary> <i>Full changelog</i> </summary> ##### Bug Fixes - Fixed a bug where if the lifetime value of a firework launch was greater than 127 or less than 0, it would throw an error. (thanks @&#8203;DelayedGaming) - Fixed a bug where the offhand tool of player was incorrect in the PlayerHeldItem event. (https://github.com/SkriptLang/Skript/issues/5094 thanks @&#8203;TUCAOEVER) - Fixed variable names with long numbers either taking long parsing time, or not being able to compare with another similar number. (https://github.com/SkriptLang/Skript/issues/4729, https://github.com/SkriptLang/Skript/pull/3929) - Fixed ExprTimePlayed not working on versions 1.13-1.14 (https://github.com/SkriptLang/Skript/issues/4929) - Fixed VariableString#isQuoted to work correctly, should be returning false for the input string " (with withQuotes=true). (#&#8203;5149) - Fixed a bug where the component type of the returned array from ExprEntities not being the return type (e.g. Player), but a generic Entity instead, in the case that the syntax was used with radius, and no entities matched the query. (#&#8203;5124) - Fixed a bunch of issues relating to conversion for list-modifying expressions. - Fixed an issue with how EffPotion interacted with patterns for `potioneffects` and `potioneffecttypes` (#&#8203;5117) (thanks @&#8203;Fusezion) - Fixed EffBroadcast not working on 1.9.4 (#&#8203;5019) - Fixed a bug where you couldn't use colons in the ExprParse syntax (thanks @&#8203;Mr-Darth) - Fixed a NPE from happening when spawning a falling block without specifying the block type and will default to Stone (https://github.com/SkriptLang/Skript/issues/5042) (thanks @&#8203;UnderscoreTud) - Fixed `[on] silverfish enter` and `[on] silverfish exit` events not actually working. - Changed item serialization with blocks to properly serialize. **This means you cannot downgrade your Skript version after this version without losing those variables storing block value data!** - Changed some event-values to return as an ItemStack rather than Skript's own ItemType to avoid some issues. (https://github.com/SkriptLang/Skript/issues/4109) - Fixed a bug where Skript couldn't spawn lingering potions in 1.9-1.13 (https://github.com/SkriptLang/Skript/issues/4933) - Fixed a bug where Skript might not start on 1.11.2 due to enchantment sweeping edge not being registered (https://github.com/SkriptLang/Skript/issues/4933) - Fixed a bug where Skript wouldn't register sound syntaxes on 1.10.2 due to sound category not existing (https://github.com/SkriptLang/Skript/issues/4933) - Fixed a NPE when using `of %itemtype%` syntax in preparing craft event (https://github.com/SkriptLang/Skript/issues/4959) - Fixed an issue where EffConnect would error due to Bukkit#getOnlinePlayers not returning anything, yet a player instance was provided. ([#&#8203;5189](https://github.com/SkriptLang/Skript/issues/5187)) [Click here to view the full list of commits made since 2.6.3](https://github.com/SkriptLang/Skript/compare/2.6.3...2.6.4) </details> ##### Help Us Test We have an [official Discord community](https://discord.gg/ZPsZAg6ygu) for beta testing Skript's new features and releases. ##### ⭐️ Thank you We saw a large increase in new contributors recently, and we just wanted to thank all those who have contributed to this version of Skript, lots of issues and suggestions arise and we couldn't have done it all without the help of the community. As always, if you encounter any issues or suggestions please report them at <https://github.com/SkriptLang/Skript/issues> If you have any ideas or input for the future development of Skript, you can share those too at <https://github.com/SkriptLang/Skript/discussions> ### [`v2.6.3`](https://github.com/SkriptLang/Skript/releases/tag/2.6.3): 🚀 The 1.19 Update [Compare Source](https://github.com/SkriptLang/Skript/compare/2.6.2...2.6.3) ##### Hello Skripters 👋 Today we're releasing version 2.6.3 which brings out Minecraft 1.19 Support and some critical fixes towards UnparsedLiterals aka your itemtype being parsed as something totally different! ##### 📢 End of 1.12.2 Support As mentioned in the previous releases, we have decided to drop support for 1.12 and lower (legacy versions) in **Skript 2.7**. This means that **Skript 2.6.X** is the last version that will work with the legacy versions. *Only critical fixes will be backported to 2.6.X.* ##### ⭐️ 2.6.3 Changelog Click below to view the entire changelog for this release. <details> <summary> <i>Full changelog</i> </summary> ##### Additions / Improvements - Updated to **Minecraft 1.19** (closes #&#8203;4850) - Added support for all new chested boats aside from mangrove. Spigot forgot to include mangrove boats for now, they're currently working on it. (#&#8203;4834) - Added support for the new frogs (#&#8203;4834) - Added support for the new particles (#&#8203;4834) - **Note:** _Goat Horn variations will not work as expected due to a kind-of bug in Bukkit, they will always return Ponder Goat Horn, see #&#8203;4882_ - Cleaned up the visual effect area pattern for area particles (#&#8203;4851) - Added missing event values for crafting events `event-inventory` & `event-itemtype` (#&#8203;4409) - Added tutorials link in `/sk info` (they are soon to come) (#&#8203;4838) ##### Fixes - Fixed Skript crashing on startup for Spigot only in 1.19 (#&#8203;4849) - Fixed a major issue with UnparsedLiterals, where sometimes things like items would be incorrectly interpreted as something else, causing parsing errors. (#&#8203;4776 closes #&#8203;3465, #&#8203;4769, #&#8203;4774 and #&#8203;4841) - Fixed dropping of air causing an error (#&#8203;4795 closes #&#8203;4757) (Thanks @&#8203;TFSMads) - Fixed a locale issue when converting from lower/upper case (#&#8203;4822 closes #&#8203;4712 and #&#8203;4821) - Fixed an issue where if the visual display range was not defined on a visual effect, the range would default to 1 block radius and not 32 (#&#8203;4843 closes #&#8203;4806) (Thanks @&#8203;kiip1) - Fixed an issue where the event-slot of the prepare crafting event would return the incorrect slot. The initial plan was for event-slot to return the result slot when the user has already placed the ingredients in the grid and the result item is being displayed. Use inventory click event for checking the slots the user used in the recipe (#&#8203;4852 closes #&#8203;4747) (Thanks @&#8203;hotpocket184) - Fixes an IllegalArgumentException from happening when attempting to set the player's experience level to a negative number. (#&#8203;4805 closes #&#8203;4804) - Fixes a few issues with the title effect (#&#8203;4362) (Thanks @&#8203;oskarkk) - Fixed `on preparing craft:` event not firing at the right time (#&#8203;4409) - Fixed some Skript command arguments were case sensitive (#&#8203;4838) - Updated documentation link in `/sk info` (#&#8203;4838) - Fixed looping entities in chunks returning wrong amount of actual entities amount (#&#8203;4608) - Fixed script command named arguments not working as expected (#&#8203;4796) (Thanks @&#8203;TFSMads) - Fixed a CCE when using `hanging entity` expression in non-hanging-events (e.g. breaking a stone) (#&#8203;4874) [Click here to view the full list of commits made since 2.6.2](https://github.com/SkriptLang/Skript/compare/2.6.2...2.6.3) </details> ##### ⭐️ Thank you We saw a large increase in new contributors recently, and we just wanted to thank all those who have contributed to this version of Skript, lots of issues and suggestions arise and we couldn't have done it all without the help of the community. As always, if you encounter any issues or suggestions please report them at <https://github.com/SkriptLang/Skript/issues> If you have any ideas or input for the future development of Skript, you can share those too at <https://github.com/SkriptLang/Skript/discussions> ### [`v2.6.2`](https://github.com/SkriptLang/Skript/releases/tag/2.6.2): Cleaning Up 2.6 [Compare Source](https://github.com/SkriptLang/Skript/compare/2.6.1...2.6.2) It's been some time since our last release, but we're finally ready and able to release Skript 2.6.2 today. This version mainly contains bug fixes and improvements, but there are also a few minor additions. For full details, you can check out the update's full changelog below. I'd also like to welcome our newest team member, [@&#8203;AyhamAl-Ali](https://github.com/AyhamAl-Ali)! They have become a crucial part of this project with their awesome feature and bug patches, but more importantly, their terrific web experience and contributions. The docs have never looked better! I'm truly looking forward to everything they'll continue to offer this project. Thank you again for your contributions! ##### End of 1.12.2 Support As mentioned in the previous releases, we have decided to drop support for 1.12 and lower (legacy versions). This is likely to be the last 2.6.x release, making this the **last version** to support 1.12 and lower. If necessary, we will backport critical fixes. ##### ⭐️ Changes ##### [Click here to view the full list of commits made since 2.6.1](https://github.com/SkriptLang/Skript/compare/2.6.1...master) <details> <summary> <i>Click here to view the full list of fixes, improvements, and additions</i> </summary> ##### Fixes * Fixed an error with the language expression that could occur on legacy versions (https://github.com/SkriptLang/Skript/pull/4616) (Thanks @&#8203;Matocolotoe) * Improved error messages from the new Pattern Compiler (https://github.com/SkriptLang/Skript/pull/4546, closes https://github.com/SkriptLang/Skript/issues/4541) * Fixed an issue where hex colors didn't parse where they should (https://github.com/SkriptLang/Skript/pull/4529, closes https://github.com/SkriptLang/Skript/issues/4527) (Thanks @&#8203;Sorbon-CH) * Fixed a parsing issue where unrelated errors would be mistakenly printed (https://github.com/SkriptLang/Skript/pull/4530) * Fixed an issue where the "no scripts found" error mistakenly displayed with a config file line (https://github.com/SkriptLang/Skript/pull/4549) * Fixed an issue where parsing could mistakenly fail with literals (https://github.com/SkriptLang/Skript/pull/4242, closes https://github.com/SkriptLang/Skript/issues/3465) * Fixed a few issues with function parsing, notably issues with default values (https://github.com/SkriptLang/Skript/pull/4244, closes https://github.com/SkriptLang/Skript/issues/4049) * Fixes to parsing, also fixing the "all armor stands" expression (https://github.com/SkriptLang/Skript/pull/4260, closes https://github.com/SkriptLang/Skript/issues/2370, https://github.com/SkriptLang/Skript/issues/2723, https://github.com/SkriptLang/Skript/issues/4239) * Fixed an issue where the enchantment level expression could incorrectly remove enchantments (https://github.com/SkriptLang/Skript/pull/4393, closes https://github.com/SkriptLang/Skript/issues/4391) * Fixed an issue with block comparisons (https://github.com/SkriptLang/Skript/pull/4390, closes https://github.com/SkriptLang/Skript/issues/4340) * Fixed an issue with "type of" expression being used with items/blocks (https://github.com/SkriptLang/Skript/pull/4405) * Fixed an issue with looping blocks below y=0 (https://github.com/SkriptLang/Skript/pull/4647, closes https://github.com/SkriptLang/Skript/issues/4645) * Improved the behavior of `or` in lists (https://github.com/SkriptLang/Skript/pull/4545, closes https://github.com/SkriptLang/Skript/issues/4543) > Please note that with this change, `or` lists will no longer always pick a set value, meaning in something like: > ``` > set {_x} to 10 > set {_y} to {_x} or {_not-set-variable} > ``` > {_y} will be set to `10` or set to nothing (whereas it would always be set to `10` before) * Fixed issues with the saturation expression (https://github.com/SkriptLang/Skript/pull/4554, closes https://github.com/SkriptLang/Skript/issues/4552) > Please note that this change removes the ability to use `saturation` as a default expression. This breaks scripts that do something like: > ``` > on hunger bar change: > broadcast "%saturation%" > ``` * Re-added error messages that were mistakenly removed from the change effects (https://github.com/SkriptLang/Skript/pull/4555) * Fixed a severe error caused by event value selection (https://github.com/SkriptLang/Skript/pull/4570, closes https://github.com/SkriptLang/Skript/issues/4565) * Added a converter from strings to regions to combat region parsing issues (https://github.com/SkriptLang/Skript/pull/4699, closes https://github.com/SkriptLang/Skript/issues/4684) * Fixed calculation issues for the pitch of locations of blocks (https://github.com/SkriptLang/Skript/pull/4710, closes https://github.com/SkriptLang/Skript/issues/4708) * Fixed an issue with spawning falling blocks (https://github.com/SkriptLang/Skript/pull/4717, closes https://github.com/SkriptLang/Skript/issues/4716) * Fixed some broken item comparisons on legacy versions (https://github.com/SkriptLang/Skript/pull/4646, closes https://github.com/SkriptLang/Skript/issues/4643) * Fixed an issue with looping with single variables (https://github.com/SkriptLang/Skript/pull/4627, closes https://github.com/SkriptLang/Skript/issues/4672) * Fixed an issue where the using the replace expression to replace items used incorrect comparison methods (https://github.com/SkriptLang/Skript/pull/4627) * Fixed errors that could occur when changing yaw and pitch of vectors (https://github.com/SkriptLang/Skript/pull/4701) * Fixed incorrect coloring of error messages by user input (https://github.com/SkriptLang/Skript/pull/4630) * Fixed a typo in the empty folder warning (https://github.com/SkriptLang/Skript/pull/4711) * Fixed an issue with damage cause comparisons (https://github.com/SkriptLang/Skript/pull/4735, closes https://github.com/SkriptLang/Skript/issues/4709) * Fixed an issue with colors displaying in console (https://github.com/SkriptLang/Skript/pull/4728, closes https://github.com/SkriptLang/Skript/issues/4723) * Fixed an error that could occur when reloading a script during event execution (https://github.com/SkriptLang/Skript/pull/4138, closes https://github.com/SkriptLang/Skript/issues/3685) * Fixed the player event value in item pickup events (https://github.com/SkriptLang/Skript/pull/4615, closes https://github.com/SkriptLang/Skript/issues/1322) * Fixed an error that could occur when creating chest inventories (with ExprChestInventory) above the size limit (https://github.com/SkriptLang/Skript/pull/4739, closes https://github.com/SkriptLang/Skript/issues/4736) * Fixed an error where aliases data was exponentially duplicated during startup (https://github.com/SkriptLang/Skript/pull/4649, fixes https://github.com/SkriptLang/Skript/issues/4514) * Fixed the `clicked enchantment button` expression and improved its documentation (https://github.com/SkriptLang/Skript/pull/4688, closes https://github.com/SkriptLang/Skript/issues/4686) * Fixed an issue with getting the location of a double chest (https://github.com/SkriptLang/Skript/pull/4683, closes https://github.com/SkriptLang/Skript/issues/4681) * Added an error when using the spawn effect section on 1.9.4 as it is not supported (fixes an exception) (https://github.com/SkriptLang/Skript/pull/4753) ##### Additions / Improvements * Made improvements to the issue templates (https://github.com/SkriptLang/Skript/pull/4511) * The filter expression no longer accepts single values/expressions (https://github.com/SkriptLang/Skript/pull/4395, fixes https://github.com/SkriptLang/Skript/issues/4306) * Added a config file option for player name regex (https://github.com/SkriptLang/Skript/pull/4396, closes https://github.com/SkriptLang/Skript/issues/4374) > This is useful for plugins like Geyser where some usernames are prefixed by a specific character. * Allow variable strings to be converted (https://github.com/SkriptLang/Skript/pull/4408, closes https://github.com/SkriptLang/Skript/issues/1144, https://github.com/SkriptLang/Skript/issues/1940, https://github.com/SkriptLang/Skript/issues/4272) * Added a converter for strings to worlds (https://github.com/SkriptLang/Skript/pull/4408) * Added default expression and time state support to the biome expression (https://github.com/SkriptLang/Skript/pull/4539) * Entity event values are now excluded from death events (https://github.com/SkriptLang/Skript/pull/4540) > This change forces users to use `attacker/victim` to avoid confusion as to why they're not getting a message or why their code isn't erroring. * Improved comparisons between slots and numbers (https://github.com/SkriptLang/Skript/pull/4550, closes https://github.com/SkriptLang/Skript/issues/4548) * Re-added `all` to the indices expression (https://github.com/SkriptLang/Skript/pull/4551, closes https://github.com/SkriptLang/Skript/issues/4547) * Added an expression to get the protocol version of a player (https://github.com/SkriptLang/Skript/pull/4569) (Thanks @&#8203;bilektugrul) * Addon Developers: Skript will now only accept registrations if enabled. This will make it easier for addon developers to tell if they've accidentally included Skript in their plugin jar (https://github.com/SkriptLang/Skript/pull/4575) * Added an expression to get the hanging entity and remover in hanging break and place events (https://github.com/SkriptLang/Skript/pull/4592, closes https://github.com/SkriptLang/Skript/issues/4359, https://github.com/SkriptLang/Skript/issues/892) * [EffectCommandEvent](https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/command/EffectCommandEvent.java) is now a Bukkit event, meaning plugins and addons can listen for it (https://github.com/SkriptLang/Skript/pull/4532, closes https://github.com/SkriptLang/Skript/issues/4360) * Fixed an issue where some syntax elements were missing `[the]` prefixes (https://github.com/SkriptLang/Skript/pull/4604) * Fixed vector length reset when adding or setting pitch and yaw (https://github.com/SkriptLang/Skript/pull/4626, closes https://github.com/SkriptLang/Skript/issues/4610) (Thanks @&#8203;sovdeeth) * Improved the validation checks for hex codes (https://github.com/SkriptLang/Skript/pull/4628) * Added an error for when hooks are disabled after Skript has loaded (https://github.com/SkriptLang/Skript/pull/4702) * Added a player event value to the item drop event (https://github.com/SkriptLang/Skript/pull/4615) * Updated skript-aliases. This mainly just adds the `otherside` music disc introduced in 1.18 (https://github.com/SkriptLang/Skript/pull/4742) ([click here to see the full changes](https://github.com/SkriptLang/skript-aliases/compare/ec7a536e7acefee4357141d5b02252b6b7257c4a...adaf5cbd9baab8dbcd34a1ab75923912d6941a7e#diff-1dba1de7724c660dcdca33cba53f82bc01c05254c632489e390a5195d2433abc)) </details> ##### ⭐️ Thanks for Reading As always, if you encounter any issues please report them at <https://github.com/SkriptLang/Skript/issues>. If you have any ideas or input for the future development of Skript, you can share those too at <https://github.com/SkriptLang/Skript/discussions>. </details> --- ### Configuration 📅 **Schedule**: 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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4xMC41IiwidXBkYXRlZEluVmVyIjoiNDIuMTAuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
renovate-bot changed title from Update dependency com.github.SkriptLang:Skript to v2.13.1 to Update dependency com.github.SkriptLang:Skript to v2.13.2 2025-12-02 06:08:16 +01:00
renovate-bot force-pushed renovate/com.github.skriptlang-skript-2.x from ea67e49032
Some checks failed
Java CI with Gradle / build (push) Failing after 2s
Java CI with Gradle / build (pull_request) Failing after 2s
to e28d8eb5e3
Some checks failed
Java CI with Gradle / build (push) Failing after 4s
Java CI with Gradle / build (pull_request) Failing after 2s
2025-12-02 06:08:16 +01:00
Compare
boiscljo approved these changes 2025-12-02 15:09:18 +01:00
renovate-bot force-pushed renovate/com.github.skriptlang-skript-2.x from e28d8eb5e3
Some checks failed
Java CI with Gradle / build (push) Failing after 4s
Java CI with Gradle / build (pull_request) Failing after 2s
to 24d6cf39ce
Some checks failed
Java CI with Gradle / build (push) Failing after 2s
Java CI with Gradle / build (pull_request) Failing after 3s
2025-12-29 15:08:24 +01:00
Compare
renovate-bot changed title from Update dependency com.github.SkriptLang:Skript to v2.13.2 to Update dependency com.github.SkriptLang:Skript to v2.14.0-pre1 2026-01-02 03:08:11 +01:00
renovate-bot force-pushed renovate/com.github.skriptlang-skript-2.x from 24d6cf39ce
Some checks failed
Java CI with Gradle / build (push) Failing after 2s
Java CI with Gradle / build (pull_request) Failing after 3s
to 787e46006a
Some checks failed
Java CI with Gradle / build (push) Failing after 3s
Java CI with Gradle / build (pull_request) Failing after 3s
2026-01-02 03:08:13 +01:00
Compare
renovate-bot force-pushed renovate/com.github.skriptlang-skript-2.x from 787e46006a
Some checks failed
Java CI with Gradle / build (push) Failing after 3s
Java CI with Gradle / build (pull_request) Failing after 3s
to 65c4b53aa3 2026-01-11 03:08:24 +01:00
Compare
renovate-bot changed title from Update dependency com.github.SkriptLang:Skript to v2.14.0-pre1 to Update dependency com.github.SkriptLang:Skript to v2.14.0-pre2 2026-01-11 03:08:40 +01:00
renovate-bot force-pushed renovate/com.github.skriptlang-skript-2.x from 65c4b53aa3 to 57a4df1d0d 2026-01-15 21:08:28 +01:00 Compare
renovate-bot changed title from Update dependency com.github.SkriptLang:Skript to v2.14.0-pre2 to Update dependency com.github.SkriptLang:Skript to v2.14.0 2026-01-15 21:08:46 +01:00
renovate-bot force-pushed renovate/com.github.skriptlang-skript-2.x from 57a4df1d0d to 2138ac68b1 2026-02-02 00:08:31 +01:00 Compare
renovate-bot changed title from Update dependency com.github.SkriptLang:Skript to v2.14.0 to Update dependency com.github.SkriptLang:Skript to v2.14.1 2026-02-02 00:08:50 +01:00
renovate-bot force-pushed renovate/com.github.skriptlang-skript-2.x from 2138ac68b1 to 83373b3d09 2026-03-02 06:08:56 +01:00 Compare
renovate-bot changed title from Update dependency com.github.SkriptLang:Skript to v2.14.1 to Update dependency com.github.SkriptLang:Skript to v2.14.2 2026-03-02 06:09:15 +01:00
renovate-bot changed title from Update dependency com.github.SkriptLang:Skript to v2.14.2 to Update dependency com.github.SkriptLang:Skript to v2.14.3 2026-03-05 21:09:03 +01:00
renovate-bot force-pushed renovate/com.github.skriptlang-skript-2.x from 83373b3d09 to 860c880888 2026-03-05 21:09:05 +01:00 Compare
renovate-bot changed title from Update dependency com.github.SkriptLang:Skript to v2.14.3 to Update dependency com.github.SkriptLang:Skript to v2.15.0-pre1 2026-04-02 00:09:19 +02:00
renovate-bot force-pushed renovate/com.github.skriptlang-skript-2.x from 860c880888 to 0eecc0ae6b 2026-04-02 00:09:19 +02:00 Compare
renovate-bot changed title from Update dependency com.github.SkriptLang:Skript to v2.15.0-pre1 to Update dependency com.github.SkriptLang:Skript to v2.15.0-pre2 2026-04-12 06:10:29 +02:00
renovate-bot force-pushed renovate/com.github.skriptlang-skript-2.x from 0eecc0ae6b to b5359ba621 2026-04-12 06:10:31 +02:00 Compare
renovate-bot force-pushed renovate/com.github.skriptlang-skript-2.x from b5359ba621 to 221133c3cf 2026-04-16 00:12:13 +02:00 Compare
renovate-bot changed title from Update dependency com.github.SkriptLang:Skript to v2.15.0-pre2 to Update dependency com.github.SkriptLang:Skript to v2.15.0 2026-04-16 00:12:35 +02:00
renovate-bot changed title from Update dependency com.github.SkriptLang:Skript to v2.15.0 to Update dependency com.github.SkriptLang:Skript to v2.15.2 2026-05-02 00:11:13 +02:00
renovate-bot force-pushed renovate/com.github.skriptlang-skript-2.x from 221133c3cf to 4f43cd250a 2026-05-02 00:11:14 +02:00 Compare
renovate-bot changed title from Update dependency com.github.SkriptLang:Skript to v2.15.2 to Update dependency com.github.SkriptLang:Skript to v2.16.0-feature-docs-overhaul 2026-05-21 00:13:05 +02:00
renovate-bot force-pushed renovate/com.github.skriptlang-skript-2.x from 4f43cd250a to 82a7702896 2026-05-21 00:13:06 +02:00 Compare
renovate-bot force-pushed renovate/com.github.skriptlang-skript-2.x from 82a7702896 to b0d11d914b 2026-06-02 00:12:29 +02:00 Compare
renovate-bot changed title from Update dependency com.github.SkriptLang:Skript to v2.16.0-feature-docs-overhaul to Update dependency com.github.SkriptLang:Skript to v2.15.3 2026-06-02 00:12:51 +02:00
renovate-bot force-pushed renovate/com.github.skriptlang-skript-2.x from b0d11d914b to 5e3c6fe41e 2026-06-04 21:11:26 +02:00 Compare
renovate-bot changed title from Update dependency com.github.SkriptLang:Skript to v2.15.3 to Update dependency com.github.SkriptLang:Skript to v2.16.0-feature-docs-overhaul 2026-06-04 21:11:46 +02:00
renovate-bot force-pushed renovate/com.github.skriptlang-skript-2.x from 5e3c6fe41e to 89908a7a40 2026-07-01 21:12:09 +02:00 Compare
renovate-bot changed title from Update dependency com.github.SkriptLang:Skript to v2.16.0-feature-docs-overhaul to Update dependency com.github.SkriptLang:Skript to v2.15.4 2026-07-01 21:12:32 +02:00
renovate-bot changed title from Update dependency com.github.SkriptLang:Skript to v2.15.4 to Update dependency com.github.SkriptLang:Skript to v2.16.0-pre1 2026-07-02 00:11:19 +02:00
renovate-bot force-pushed renovate/com.github.skriptlang-skript-2.x from 89908a7a40 to ad0c96221c 2026-07-02 00:11:21 +02:00 Compare
renovate-bot force-pushed renovate/com.github.skriptlang-skript-2.x from ad0c96221c to 1c1895c950 2026-07-13 18:11:50 +02:00 Compare
renovate-bot changed title from Update dependency com.github.SkriptLang:Skript to v2.16.0-pre1 to Update dependency com.github.SkriptLang:Skript to v2.17.0-feature-docs-overhaul 2026-07-13 18:12:13 +02:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin renovate/com.github.skriptlang-skript-2.x:renovate/com.github.skriptlang-skript-2.x
git switch renovate/com.github.skriptlang-skript-2.x

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff renovate/com.github.skriptlang-skript-2.x
git switch renovate/com.github.skriptlang-skript-2.x
git rebase main
git switch main
git merge --ff-only renovate/com.github.skriptlang-skript-2.x
git switch renovate/com.github.skriptlang-skript-2.x
git rebase main
git switch main
git merge --no-ff renovate/com.github.skriptlang-skript-2.x
git switch main
git merge --squash renovate/com.github.skriptlang-skript-2.x
git switch main
git merge --ff-only renovate/com.github.skriptlang-skript-2.x
git switch main
git merge renovate/com.github.skriptlang-skript-2.x
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ObsidianMakerDevelopment/ObsidianMaterial!14
No description provided.