2.6 is finally here
⭐️ Changes
Because the full changelog is quite long, we've put it at the bottom of this release. Here are the most important changes of this release:
Minecraft 1.17 support
Skript now supports 1.17, including item and block aliases, entities, most particles and biomes.
Dynamic enum support for aliases.
This will improve the compatibility with platforms such as Magma or Mohist, although they remain unsupported.
For addon developers: the Section API
This API allows addon developers to create their own sections, like the loop or conditional sections in Skript.
Fixed various parsing issues
This includes Skript's math order, issues with string expressions, issues using variables within variables and issues with quotes within expressions in strings or variables.
Full changelog
Additions
- New event value to the server load/stop and script load/unload events
- Event value to get the recipe key in craft events
- Past world and location event values in teleportation events
- New getter for the current SkriptEvent in ScriptLoader
- Bring back the correct usage message
- Inventory type support to the open inventory effect
- Add missing documentation to the launch firework effect
- Add
lower than
as an option forsmaller than
in the comparison condition - Add
on leave
as an option for the quit event - Automatic module name for modules in Java 9+
- Dynamic enum support for aliases
This makes platforms such as Magma or Mohist more compatible but they're not yet supported by our project.
- Command info and all commands expressions
- Add condition to check if a command is a script command
- Rework of visual effects
The RGB literal has been changed from
RED: %integer%, GREEN: %integer%, BLUE: %integer%
to(rgb|RGB) %integer%, %integer%, %integer%
Color support has been added to the note particle effectnote [(of|with) [colo[u]r] %number%]
- Improve the string output of a block to include more helpful information
- Add support for any object, not just strings, to be sent in the message and broadcast effects
- Add a chat code for font support (
font, f
, example:<font:uniform>uniform text
) - Add per-event priority
Event priorities can be read about here: EventPriority
For most users, you will not need to worry about this. However, it is useful in cases where you want to be sure that
Skript is determining the outcome of the event. Keep in mind that LOWEST priority events are called first and MONITOR priority events called last.
To change the event priority of a listener, addwith priority <event priority>
to the end of the event, before:
.
- The
log player commands
value in the config is now marked asfalse
by default, as servers already default to logging command usage - Add an entity move event. Please note that this event may cause performance impacts. Be sure to read the event's documentation before usage
- Add a condition to check whether a plugin is enabled or disabled
- Add creation of temporary aliases when aliases for materials are missing
If you were missing an alias for
minecraft:basalt
, the aliasbasalt
(plural form just hass
on the end) would be created.
- Display the name of the function involved in a nonexistent function warning
- Updated the aliases for 1.17
- Add support for using BlockData in the block events
- Add an expression to determine the hardness of a block
- Merge ExprTool with ExprOffTool
Section API
- This release adds a long-awaited Section API. Many addon developers are familiar with the somewhat hacky sections provided by Tuke_Nuke (we are of course still grateful to have had this!) Addon developers are welcome to upgrade their addons to use this new system, along with providing feedback, suggestions, and reporting any issues you may find. There is no official tutorial for this API yet, but you can look at the Javadocs for Section and EffectSection, and you may find it useful to reference the existing sections in the sections package, or PRs #4020 and #4147.
- Removed JUnit tests as we have a better testing system now
- Add 1.17 features
Please note that the
dust_color_transition
andvibration
particles are currently missing and will be added in a future update.
- Only print stacktrace in debug mode for missing blockstates
- Added a new type of conditional:
parse if conditional
This condition is just like the
if statement
, but it is prefixed with the wordparse
. If the condition does not pass in aparse if statement
, the code in its section will not be loaded. Example:on load: parse if plugin "SkBee" is enabled: # SkBee addon stuff here
- Added a new type of while loop:
do while loop
This is just like the while loop, but it will always run at least one time. Example:
on load: set {_x} to 0 while {_x} > 5: add 1 to {_x} # {_x} = 0 set {_x} to 0 do while {_x} > 5: add 1 to {_x} # {_x} = 1
- Added an expression to get the last color of a string
- Added support to get and set the name of blocks (chests, hoppers, etc.)
- Documentation site improvements
- Added missing aliases and improved upon current groupings
Fixes
- Added spawn reasons to german locale
- Apply new line literal correctly in lore
- Remove dependency warning from Bukkit due to GriefPrevention
- Correct encoding of the config.sk file
- Overall cleanup urls in documentation and build scripts
- Cleanup and update of gradle to 6.8
- Made PreScriptLoadEvent asynchronous when necessary
- Call getter of world of location only once
- Update ceil function description in documentation
- Change pattern for offline player parsing
- Fix link to contribution.md in README
- Correct typo in the
applied enchantments
effect documentation - Switch order of parameters in Noun's toString method
- Fix parsing of strings at the start and end of an expression
- Remove UnresolvedOfflinePlayer class
- Adapt example scripts to new versions
- Catch SOE in more places
- Handle cancellation of server command event properly
- Removed legacy projectile code
- Fix javadoc of SkriptColor
- Show right amount of loaded commands
- Correct error for raw name expression
- Handle null properly in last attacker expression
- Call damage event only once
- Handle teleportation properly in move event
- Update PatcherTool for Java 11+
- Blocks of region expression now properly returns the blocks inside the region
- Place bisected blocks properly
- Remove "advanced syntax" feature
- Expressions not always being converted when parsing
- Support for Java 12+
- Fix various issues with the difference expression
- Handle setting of world difficulty properly
- Properly handle expression conversion in expressions with dynamic return type
- Fix math order. Skript is now a better mathematician!
- Fix blocks in chunk expression returning a larger cuboid than expected
- Fix issues with expression parsing order
- Fix an issue where changing something to
<none>
was not functional - Fix variable names with numbers containing leading zeros
- Fix an issue where lore was incorrectly being changed on items
- Add missing entries/parts in lang files
- Fix quote parsing. This change allows singular double quotes to be used in variables and (expressions within strings), instead of doubled double quotes
- Fix expression parsing not checking plurality in some cases
- Fix issues with functions not being called in some cases
- Fix an issue where list variables returned nothing/the incorrect size
- Fix an issue where dyeing potions and map did not work
- Fix more issues with item comparisons
This fix also adds a new expression, ExprPlain. A plain item is an item with no modifications. It can be used to convert items to their default state or to match with other default items. This is to provide a replacement for using
if player's tool is a diamond named ""
(you would instead useif the player's tool is a plain diamond
)
- Fix gliding not working on livingentities
- Fix issues with the return types of some list related expressions
- Fix function parsing when multiple functions are used together/compared (e.g.
myFunction() + otherFunction()
) - Fix an issue where converting a double chest to a string caused an error
- Fix an issue where the named item expression caused an error
- Fix setting multiple lists in one effect. Setting multiple lists in one effect will now set each of the lists to the given values
- Fix an issue with parsing aliases with custom JSON
- Fix any issues where Skript may have attempted to register a task while already disabled
- Fix an issue where enchantment checks were not sensitive to the enchantment's level
- Add a missing entry for the piglin zombification spawn reason (it is `piglin zombification)
- Concurrency updates to improve the AsyncEffect
- Fix an issue where EffDoIf would incorrectly stop the whole trigger
- Rework of the contains condition
NOTICE: This rework removes the following syntaxes:
[the] list [of] %objects% (doesn't|does not|do not|don't) contain %objects%
[the] list [of] %objects% contain[s] %objects%
(all|any|none) of %strings% contain[s] %strings%
- Fixed a memory leak with loops
- Fix not being able to set the world of a location
This change removes the vector yaw/pitch expression, it is now replaced by the normal yaw/pitch expression. This does mean that the word 'vector' was removed from the syntax, so if you use this syntax, you may have to change your scripts to adjust for this.
- Fix issues with teleporting asynchronously
This also [re]adds the ability to teleport synchronously by prefacing the effect with
force
(e.g.force teleport the attacker to the victim
)
Please note that the keyword 'force' indicates that the effect will not be delayed. This may cause lag spikes or server crashes when teleporting entities to unloaded chunks.
- Fix an issue with variable parsing in variables/effects
- Fix issues with the damage effect
Please note that this fix removes the ability to damage an entity with a custom damage cause. This only worked because of a bug that has been fixed for a long time. If you still wish to use a custom damage cause (retain this functionality) you can use the last damage cause expression.
- Fix an issue with setting the yaw or pitch of a location stored in a variable
- Fix an issue with errors on server stop by disabling scripts before addons are disabled
- Removed some older code that caused more issues than it solved
- Added config options to disable the registration of hooks
Addons may also choose to disable hooks in
JavaPlugin#onLoad
by callingSkript#disableHookRegistration
. They may also check whether a hook is enabled throughSkript#isHookEnabled
.
- Fix replace effect escaping characters when not needed
- Fix an issue where EffContinue would cause a stack overflow
- Fix an issue where the slime chunk condition was not always correct
- Fixed a bug where the magma damage cause didn't work
- Fixed a bug where the raw name expression could include extraneous dashes
- Fixed false positive 32-bit warnings that could occur
- Improved handling of numbers internally
- Fixed an issue with rabbit entity comparisons
- Skript will now ignore hidden files and folders in more cases
- Fixed an issue with getting blocks using directions
- Fixed an error that could occur when using players and the console together (for example, sending messages to both)
- Skript will now handle and log errors relating to illegal color changes of blocks
- Fixed an issue where offline players that haven't joined the server would print as
null
in string form - Fixed an issue with quote parsing in command entries
- Fixed an issue where the me expression would not properly work for players
With this change, the
me
expression will no longer work in console. To refer to the console using effect commands, simply useconsole
.
- Fixed several issues with lenient link parsing
- Fixed chat color stripping issues when used with expressions/variables
- Fixed an error that could occur in the 'x of' expression
- Fixed several issues with the aliases
- Fixed dropping in a cancelled death event
- Fixed an issue where the experience event would incorrectly fire or return an incorrect amount of experience
- Fixed an issue with getting blocks with directions
- Fixed ambiguity between stepping events and possible accidental triggers for the move on event
- Fixed using math with the element expression
⭐️ Organisation stuff
End of 1.12 support
After a lot of discussion, we have decided to drop support for 1.12 and lower, as it stops us from adding a lot of features and focusing on other parts of Skript. 2.6.x
will be the last version working with 1.12 and lower. Security patches and other kind of fixes might be ported to this version, but keep in mind that features won't be added.
Breaking addons
Due to the merge of #3924, many addons might be broken by this release. If you want to make them compatible, you may use SkriptAddonPatcher or its plugin version.
The family is growing
I am glad to announce two new team members to the organization, @TPGamesNL who has been greatly contributing to the project with amazing patches and @TheLimeGlass who has always been a mindful part of the overall community and has also made great contributions in the past.
We're moving!
Another thing to note for addon developers and people who wish to contribute to the project, we have moved the main discussion area to the skUnity discord. While Skript-chat was good enough we need to reflect our rapidly growing community's needs and we will achieve this by taking it to the largest Skript community in place.
This doesn't mean skUnity documentation/forums are handled by the SkriptLang organization as they take part of their own service. We'll still maintain our own documentation at https://skriptlang.github.io/Skript and support any other services such as SkriptHub/Skript-MC to continue taking part of this community!
Documentation
We have restyled our documentation site! A big thanks to @AyhamAl-Ali for this awesome redesign. You can look at the new documentation site here.
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.