Skip to content

Pre-Release 2.9.0-pre1

Pre-release
Pre-release
Compare
Choose a tag to compare
@APickledWalrus APickledWalrus released this 02 Jul 00:53
· 184 commits to dev/feature since this release
1ac7681

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 ##1, baby!" -> "I'm #1, baby!"

# after
"<##aabbcc>I'm ##1, baby!" -> "I'm ##1, baby!"
"<#aabbcc>I'm #1, baby!" -> "I'm #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.