I don't post all release, so this post also includes the 2.1.1.
Changes
- The all-around expression now accepts the scope the be a string. As such, you can do branched-in scopes.
- The scopes will also allow for scoreboard tags to act. It's mostyly useful with Citizens plugin.
- Example: if you tag a Citizens NPC with monster, then the monsters scope will include it.
- Thus, Citizens NPCs are not "players" anymore
New functions
- get_health(Entity) -> Number : Get the current health of an entity.
- get_max_health(Entity) -> Number : Get the maximum health of an entity.
- heal(Entity, number) -> Number : Heal the entity by a certain amount. Returns the new health of the entity.
- loc_to_list(Location) -> Number[] : transforms a location to a list containing the X, Y and Z coordinates.
- Allows for easy extractions like: %y = loc_to_list(position of %caster)[1]
Fixes
- The knockback function allows for proper list of number as input vector.
API changes
Exposed a way for external plugin to :
- Create a SpellRuntime instance,
- "compile" a USS statement or expression.
- With this, an external plugin can evaluate any USS string.
Miscellaneous
- The "send" evaluation will be proceeded synchronously. Don't worry, the execution will still be asynchronous.
- The example plugin contains a proper conditional SpellCaster trait. It will probably be integrated into the main plugin in a future date.