# Skript 2.11.0 Skript 2.11.0 is now available! This release is of a much more managable 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)! 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 - [#7006](https://github.com/SkriptLang/Skript/pull/7006) Adds full support for modifying players' world borders. - [#7270](https://github.com/SkriptLang/Skript/pull/7270) Adds additional syntax for interacting with dropped items. - [#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. - [#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. - [#7332](https://github.com/SkriptLang/Skript/pull/7332) Adds an event that is triggered at certain real-life times of day. - [#7351](https://github.com/SkriptLang/Skript/pull/7351) Adds an effect to zombify/dezombify villagers. - [#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. - [#7361](https://github.com/SkriptLang/Skript/pull/7361) Adds an effect and condition for whether axolotls are playing dead. - [#7362](https://github.com/SkriptLang/Skript/pull/7362) Updates sleeping related syntaxes to support bats, foxes and villagers. - [#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. - [#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. - [#7415](https://github.com/SkriptLang/Skript/pull/7415) Adds ability to get and change the simulation and view distances on Paper servers. - [#7453](https://github.com/SkriptLang/Skript/pull/7453) Adds support for specifying slots in the armor change event like `on helmet change`. - [#7479](https://github.com/SkriptLang/Skript/pull/7479) Adds syntax related to goats. - [#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. - [#7532](https://github.com/SkriptLang/Skript/pull/7532) Adds a config option for the number of variable changes required to trigger a save. - [#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) - [#7554](https://github.com/SkriptLang/Skript/pull/7554) Moves the "invulnerability time" expression to support timespans and deprecates the tick-based version. - [#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. - [#7586](https://github.com/SkriptLang/Skript/pull/7586) Adds spanish language option. - [#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. - [#7683](https://github.com/SkriptLang/Skript/pull/7683) Added support for fishing states and generic fishing state change event. - [#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::*}`. - [#7702](https://github.com/SkriptLang/Skript/pull/7702) Adds an expression to change phantom and slime entity sizes. - [#7709](https://github.com/SkriptLang/Skript/pull/7709) Adds `past event-item`, `future event-item`, and `event-slot` to the armor change event. - [#7714](https://github.com/SkriptLang/Skript/pull/7714) Adds the entity shoot bow event, as well as some expressions for it. - [#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)`. - [#7747](https://github.com/SkriptLang/Skript/pull/7747) Adds support for interacting with pandas. - [#7750](https://github.com/SkriptLang/Skript/pull/7750) Adds support for obtaining items with/without their tooltip. ### Changes - [#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. - [#7287](https://github.com/SkriptLang/Skript/pull/7287) Improves the check for what types Skript attempts to compare by comparing super classinfos. - [#7317](https://github.com/SkriptLang/Skript/pull/7317) Adds examples to the location type. - [#7440](https://github.com/SkriptLang/Skript/pull/7440) Enforces the use of `effect` when using the type `potion effect type`. - [#7442](https://github.com/SkriptLang/Skript/pull/7442) Merges ExprWeather and ExprPlayerWeather to resolve syntax conflicts. - [#7492](https://github.com/SkriptLang/Skript/pull/7492) Allows the use of minecraft ids to refer to items: `minecraft:oak_log`. - [#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"`. - [#7549](https://github.com/SkriptLang/Skript/pull/7549) Allows using `skript tag` as an alternative for `custom tag`. - [#7552](https://github.com/SkriptLang/Skript/pull/7552) Allows using multiple numbers in the rounding expression. - [#7602](https://github.com/SkriptLang/Skript/pull/7602) Adds support for using experience as a regular number, allowing for arithmetic like `5 xp + 10`. - [#7622](https://github.com/SkriptLang/Skript/pull/7622) Adds syntax that allows the user to improve the clarity of `using experiment`. - [#7694](https://github.com/SkriptLang/Skript/pull/7694) Allows `itemstack` as another way to reference the `item` type. - [#7704](https://github.com/SkriptLang/Skript/pull/7704) Adds support for `with all item flags`. - [#7708](https://github.com/SkriptLang/Skript/pull/7708) Adds support for using `armour` instead of `armor`. - [#7716](https://github.com/SkriptLang/Skript/pull/7716) Improves the errors for when a single value is passed, where multiple are expected. - [#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`. - [#7431](https://github.com/SkriptLang/Skript/pull/7431) Fixes the order of in which sections are printed in debug mode. - [#7483](https://github.com/SkriptLang/Skript/pull/7483) Fix conflicts with `any` in the player input event. - [#7566](https://github.com/SkriptLang/Skript/pull/7566) Improved condition classes and added missing method overrides. - [#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. - [#7656](https://github.com/SkriptLang/Skript/pull/7656) Fix event values not being null in docs created by the JSON generator. - [#7665](https://github.com/SkriptLang/Skript/pull/7665) Ensures EffSort's input expression always returns a single value. - [#7669](https://github.com/SkriptLang/Skript/pull/7669) Fixes issue when using player in entity move event. - [#7679](https://github.com/SkriptLang/Skript/pull/7679) Fixes some incorrectly configured documentation annotations for events. - [#7688](https://github.com/SkriptLang/Skript/pull/7688) Fixes an issue where damage component were added to undamaged items. - [#7696](https://github.com/SkriptLang/Skript/pull/7696) Fixes decorated pot and bookshelf item comparisons. - [#7697](https://github.com/SkriptLang/Skript/pull/7697) Improve error messages for event restricted syntaxes. - [#7713](https://github.com/SkriptLang/Skript/pull/7713) Fixes an issue with comparing inventory slots. - [#7717](https://github.com/SkriptLang/Skript/pull/7717) Fixes an issue when using integers in the radians expression. - [#7736](https://github.com/SkriptLang/Skript/pull/7736) Maintains the inventory of items when setting blocks. - [#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. - [#7754](https://github.com/SkriptLang/Skript/pull/7754) Fix name and example of ExprDisplayTeleportDuration on the docs. - [#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. - [#7773](https://github.com/SkriptLang/Skript/pull/7773) Fixes unintended claiming errors when using section expressions without sections. - [#7774](https://github.com/SkriptLang/Skript/pull/7774) Fixes crashes on Spigot due to the armor change event attempting to load a Paper class. - [#7776](https://github.com/SkriptLang/Skript/pull/7776) Adds lang entries for bundle inventory actions and for the bucket spawn reason. - [#7786](https://github.com/SkriptLang/Skript/pull/7786) Adds a missing 'since' annotation to ExprWithItemFlags. - [#7790](https://github.com/SkriptLang/Skript/pull/7790) Fixes bug where stored items in variables could change types between Minecraft versions. - [#7793](https://github.com/SkriptLang/Skript/pull/7793) Fixes errors for expression sections always saying 'cannot understand section' instead of the actual error. ### Removals - [#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 - [#7478](https://github.com/SkriptLang/Skript/pull/7478) Deprecates Skript's EquipSlot in favour of Bukkit's EquipmentSlot. - [#7512](https://github.com/SkriptLang/Skript/pull/7512) Adds changers for event-values. - [#7530](https://github.com/SkriptLang/Skript/pull/7530) Adds a utility entry data for nesting entries. - [#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. - [#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. - [#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: - [@Absolutionism](https://github.com/Absolutionism) - [@APickledWalrus](https://github.com/APickledWalrus) - [@Burbulinis](https://github.com/Burbulinis) - [@cheeezburga](https://github.com/cheeezburga) - [@Efnilite](https://github.com/Efnilite) - [@erenkarakal](https://github.com/erenkarakal) - [@Fusezion](https://github.com/Fusezion) - [@kiip1](https://github.com/kiip1) - [@milanjaros](https://github.com/milanjaros) - [@Moderocky](https://github.com/Moderocky) - [@Phill310](https://github.com/Phill310) - [@ShaneBeee](https://github.com/ShaneBeee) - [@sovdeeth](https://github.com/sovdeeth) - [@TheLimeGlass](https://github.com/TheLimeGlass) - [@TheMug06](https://github.com/TheMug06) - [@TPGamesNL](https://github.com/TPGamesNL) - [@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.