HyperScript 1.7.49
Text in front of a player's face, CSV files, two more kinds of storage, and the addons in four languages.
Added
- Text in front of a player. Text that floats before one player's eyes, follows where they look, and is seen by nobody else. It goes when they leave.
show text "&6Welcome!%nl%&7Open the chest in front of you" in front of player until player is sneaking
show text "&aSaved." in front of player for 3 seconds
show text ["&6Shop", "&7Right-click to buy"] in front of player while player is in region "shop"
hide text in front of player
for <duration>gives it a time.until <condition>takes it away once the condition is true,while <condition>once it no longer is; the condition is looked at four times a second. Without any of these it stays untilhide text in front of <who>.at distance <n>says how many blocks in front of the eyes, from 0.5 to 16 (2.2 if it is not said).- Several lines:
%nl%in the text, or a list with a line for each element. - On Minecraft 1.19.4 and newer it is a text display; before that, name tags. Showing it to one player only needs 1.18: on 1.16 and 1.17 everybody nearby sees it.
- A new line in any text:
%nl%, also written%new line%or%newline%.send "&6Rules%nl%&71. Be kind". - CSV files.
set {_rows} to csv of file at "plugins/HyperScript/prices.csv" with headers
for each {_row} in {_rows}:
send "&e%{_row.item}% &7costs &f%{_row.price}%"
csv of file at <path>gives the rows as a list, each row a list of its cells, so a cell isitem 2 of item 1 of {_rows}.with headerstakes the first row as the names of the columns and gives each later row as a table:{_row.price}.column <number or name> of <rows>is one column, top to bottom.csv of <rows>writes rows out as CSV text, forset file at ... to.parse <text> as csvreads text that is not in a file.- Numbers are numbers, an empty cell is not set, quotes are handled the way spreadsheets write them, and files with semicolons or tabs between the cells are read too.
- Two more kinds of storage, so there are four that need no setting up, and MySQL:
storage.type: csvkeeps the variables indata.csv, a row for each, which a spreadsheet opens. Change it by hand only while the server is stopped.storage.type: h2keeps them in a local H2 database,data-h2.mv.db. The server downloads H2 by itself the first time, on Minecraft 1.17 and newer.jsonandsqliteare as they were;sqlitealso sets itself up.
json stays the default. While the server runs every variable is in memory, so no kind of storage makes a script faster or slower, and data.json is written in every mode as the copy HyperScript falls back on. Choose by what you want to open the data with.
- Addons in other languages. Every addon now brings the words for its own syntax in French, Spanish, Portuguese and German, and takes the language from
language:in this plugin'sconfig.yml. It needs the addon releases of today; each addon's page lists its words. - 33 more words in each language for HyperScript itself:
create,make,say,show,hide,exists,replace,fill,copy,move,save,line,page,group,region,server,ownerand others.
Changed
- Backups are kept in
plugins/HyperScript/Backups. A folder writtenbackupsby an older version is renamed, with the backups in it. - MySQL:
- A value can be up to 16 MB; it was 64 KB, which a long list could exceed. A table made by an older version is widened by itself.
- Text is kept as
utf8mb4, so every character fits. - MySQL 8 servers that refused the login with "Public Key Retrieval is not allowed" are logged into.
- The rows of a save are sent together, which is quicker on a database far away.
- With French, Spanish, Portuguese and German,
existe/existiertnow meanexists(si file at "x" existe:); they used to be another way of sayingis set. GermanServerandTagare the English words they are. - With another language set, what follows
permission:is left exactly as written. A permission such asserveur.adminused to have its words put into English.