Skip to content

Patch Release 2.11.1

Latest
Compare
Choose a tag to compare
@APickledWalrus APickledWalrus released this 01 May 17:40
f271ff6

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.

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.