---
# System prepended metadata

title: 'Feature 2.8.0: 15/01/24'
tags: [release]

---

# 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 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
- [#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
- [#4593](https://github.com/SkriptLang/Skript/pull/4593) Added `raw index of slot` expression.
- [#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.
- [#4614](https://github.com/SkriptLang/Skript/pull/4614) Added the ability to only get certain item types when using the `items in inventory` expression.
- [#4617](https://github.com/SkriptLang/Skript/pull/4617) Added anvil repair cost expression.
- [#5098](https://github.com/SkriptLang/Skript/pull/5098) Added an expression to repeat a given string multiple times.
- [#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.
- [#5356](https://github.com/SkriptLang/Skript/pull/5356) Added an expression for getting and changing the portal cooldown of an entity.
- [#5357](https://github.com/SkriptLang/Skript/pull/5357) Added toggle pickup for items on living entities.
- [#5359](https://github.com/SkriptLang/Skript/pull/5359) Added `is jumping` for living entities condition. (Paper 1.15+)
- [#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.
- [#5366](https://github.com/SkriptLang/Skript/pull/5366) Added support for getting and modifying the inventories of items, like shulker boxes.
- [#5367](https://github.com/SkriptLang/Skript/pull/5367) Added syntax to check and set whether a sign has glowing text.
- [#5456](https://github.com/SkriptLang/Skript/pull/5456) Added the ability to get all armor pieces of an entity. 
- [#5460](https://github.com/SkriptLang/Skript/pull/5460) Added an event for when a player selects a stonecutting recipe.
- [#5462](https://github.com/SkriptLang/Skript/pull/5462) Added InventoryMoveItemEvent.
- [#5482](https://github.com/SkriptLang/Skript/pull/5482) Added an expression to get the vector projection of two vectors.
- [#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.
- [#5502](https://github.com/SkriptLang/Skript/pull/5502) Added syntax to create vectors from directions.
- [#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.
- [#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.
- [#5573](https://github.com/SkriptLang/Skript/pull/5573) Added a function to clamp a value between two others.
- [#5588](https://github.com/SkriptLang/Skript/pull/5588) Added player arrow pickup event.
- [#5589](https://github.com/SkriptLang/Skript/pull/5589) Added hit block of projectile.
- [#5618](https://github.com/SkriptLang/Skript/pull/5618) Added `is climbing` for living entities condition.
- [#5636](https://github.com/SkriptLang/Skript/pull/5636) Added `Free/Max/Total Server Memory` expression.
- [#5662](https://github.com/SkriptLang/Skript/pull/5662) Added expression to return the loaded chunks of worlds.
- [#5678](https://github.com/SkriptLang/Skript/pull/5678) Added item damage to the `damage` expression.
- [#5680](https://github.com/SkriptLang/Skript/pull/5680) Added inventory close reason in inventory close event.
- [#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`.
- [#5763](https://github.com/SkriptLang/Skript/pull/5763) Added Paper 1.16.5+ quit reason for finding out why a player disconnected.
- [#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. 
- [#5811](https://github.com/SkriptLang/Skript/pull/5811) Added the ability to execute a command as a bungeecord command like /alert.
- [#5814](https://github.com/SkriptLang/Skript/pull/5814) Added `returns` aliases for `function` definition.
- [#5845](https://github.com/SkriptLang/Skript/pull/5845) Added `player` and `offlineplayer` functions.
- [#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.
- [#5894](https://github.com/SkriptLang/Skript/pull/5894) Added support for keybind components in formatted messages (`<keybind:value>`).
- [#5898](https://github.com/SkriptLang/Skript/pull/5898) Added `apply bone meal` effect.
- [#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.
- [#5949](https://github.com/SkriptLang/Skript/pull/5949) Added an expression to get a percentage of one or more numbers. 
- [#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. 
- [#6101](https://github.com/SkriptLang/Skript/pull/6101) Adds an effect to copy the contents and indices of one variable into others.
- [#6146](https://github.com/SkriptLang/Skript/pull/6146) Multiple # signs at the beginning of a line now start a comment.
- [#6162](https://github.com/SkriptLang/Skript/pull/6162) Added a function `isNaN(number)` to check if a number is NaN.
- [#6180](https://github.com/SkriptLang/Skript/pull/6180) The syntax to get a location from a vector and a world has been re-added.
- [#6198](https://github.com/SkriptLang/Skript/pull/6198) Added Turkish translation. 


### Bug Fixes
- [#5308](https://github.com/SkriptLang/Skript/pull/5308) Fixed `cursor slot` not always returning the correct item in `inventory click` events.
- [#5406](https://github.com/SkriptLang/Skript/pull/5406) Fixed some order of operation issues with the `difference` expression.
- [#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.
- [#5815](https://github.com/SkriptLang/Skript/pull/5815) Improvements to comparators and converters.
- [#5878](https://github.com/SkriptLang/Skript/pull/5878) Fixed some issues with the `parsed as` expression returning arrays or throwing exceptions.
- [#6224](https://github.com/SkriptLang/Skript/pull/6224) Fixed the examples for applying potion effects.
- [#6229](https://github.com/SkriptLang/Skript/pull/6229) Fixed an exception when trying to get the text input of an anvil.
- [#6231](https://github.com/SkriptLang/Skript/pull/6231) Fixed an exception when trying to print a block state.
- [#6239](https://github.com/SkriptLang/Skript/pull/6239) Fixed an exception when removing items from `drops` in 1.20.2+.
- [#6266](https://github.com/SkriptLang/Skript/pull/6266) Fixed a bug that caused incorrect errors to be printed when comparing things.

### Removals
- [#5958](https://github.com/SkriptLang/Skript/pull/5958) Removed the projectile bounce state condition and expression. These had no function.

### Changes
- [#4281](https://github.com/SkriptLang/Skript/pull/4281) Rewrote the `furnace slot` expressions and fixes numerous issues with them.
- [#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.
- [#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.
- [#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.
- [#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
```
- [#5674](https://github.com/SkriptLang/Skript/pull/5674) Made the `case-insensitive variables` config option visible by default in the config file.
- [#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"
```
- [#5796](https://github.com/SkriptLang/Skript/pull/5796) Expanded the `block change` event and adds block and blockdata event values.
- [#5841](https://github.com/SkriptLang/Skript/pull/5841) Inventory titles now support hex colours and more.
- [#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.
- [#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.
- [#5900](https://github.com/SkriptLang/Skript/pull/5900) Improved how event parsing is handled internally.
- [#5976](https://github.com/SkriptLang/Skript/pull/5976) Added `decrease` as an alias for `reduce`, e.g. `decrease {_var} by 2`. 
- [#6010](https://github.com/SkriptLang/Skript/pull/6010) Allows the use of `and with` before `fade out` in the `title` effect.
- [#6024](https://github.com/SkriptLang/Skript/pull/6024) Allows `continue` to continue outer loops.
- [#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.
- [#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.
- [#6172](https://github.com/SkriptLang/Skript/pull/6172) Allows the plural "commands" in the execute command effect.
- [#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.
- [#6298](https://github.com/SkriptLang/Skript/pull/6298) Fixed the outdated website link in Skript's plugin description.

### API Changes
- [#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.
- [#5408](https://github.com/SkriptLang/Skript/pull/5408) Cleaned up the Yggsdrasil serialization code.
- [#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.
- [#5502](https://github.com/SkriptLang/Skript/pull/5502) Added method `Direction#getDirection` which returns a vector.
- [#5550](https://github.com/SkriptLang/Skript/pull/5550) The Skript profiler can now run for as long as the user wants.
- [#5874](https://github.com/SkriptLang/Skript/pull/5874) SimplePropertyExpression now automatically defends `%objects%` to avoid UnparsedLiterals.
- [#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.
- [#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`.
- [#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.
- [#6001](https://github.com/SkriptLang/Skript/pull/6001) Renamed the Slot classinfo from `Inventory Slot` to `Slot`.
- [#6054](https://github.com/SkriptLang/Skript/pull/6054) Replaced `MarkedForRemoval` annotations with `ApiStatus.ScheduledForRemoval`.
- [#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:
- @3meraldK
- @APickledWalrus
- @AyhamAl-Ali
- @DelayedGaming
- @erenkarakal
- @EquipableMC
- @Fusezion
- @kiip1
- @MihirKohli
- @Moderocky
- @Noteult
- @nylhus
- @Pikachu920
- @sovdeeth
- @TheLimeGlass
- @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.