HyperScript 1.5.9
Added
Addons
- Other plugins can now add to the language. An addon registers statements, values and events through
dev.hyperscript.api.HyperScriptAPI, and they work in every script like built-in ones. The first addon is HyperVelocity, for servers behind a Velocity proxy; see the Addons page. - Scripts are now loaded a moment after the server has finished starting, once every plugin is enabled, so that addons have added their syntax by then.
Language
<value> parsed as number, the same conversion asparse ... as numberwritten after the value. Alsointeger,textandplayer.- Text tests:
starts with,ends with, andmatchesfor a regular expression. chance of 25%, true about that often.- Lists:
shuffled <list>,unique <list>,sum of <list>,average of <list>. random player, andplayers within 10 blocks of <location>.- Dates:
%server.date%,%server.clock%,%server.weekday%,%server.hour%,%server.minute%, andnow formatted as "HH:mm"for any other form. on first join:for someone who has never played on the server before.
Finding mistakes
- Errors while a script runs are shown in chat to players with
hyperscript.admin, not only in the console; the same message at most once a minute. Switch it off withnotify-script-errors: false.
Documentation website
- The Docs page has simpler filters. Instead of a long list of topics there are seven kinds to choose from: Events, Conditions, Effects, Expressions, Types, Functions and Structures, each with a count. The topics are still there, in a drop-down.
- A "From" filter shows or hides what comes from HyperScript itself and from each addon, so the list can be only HyperScript, only HyperVelocity, or both.
- An Addons page: what each addon is, how to install it, its jar and its changelog.
- Search is better. It finds a word by its beginning (
bossfindssend bossbar), forgives a typo in longer words (telportfindsteleport), and shows results in groups: Docs, Scripts, Pages and guides, Examples. Each result says what kind of thing it is and which addon it is from. - A Guide page, "Writing scripts": what a script file contains, notes and
# Requires:, where files go, how to make a script easy to change, and how to find mistakes. - Script cards say what is inside: each command with its description and the permission it needs, the settings in its
options:block with what they are set to, the permissions it asks about, and the events it reacts to. A "How to use a script" box sits above the list. /api/latestversion?addon=HyperVelocityanswers for an addon.