A log of changes since the 10.0.0 Minr Scripts 2 + 1.13 update.

## Upcoming

11.0 - Everything And The Kitchen Sink (releasing sometime in 2020)
12.0 - Commands Overhaul

## 10.6 - Scripts 2.2

### 10.6.4 (2020/10/01)

#### Bugfixes

Re-calculate player display names on rank change.
Fix crash when calling toString() on a default Position variable (one without a value).
Fix calling toString() on a default Location variable returning 'null null null null' instead of 'null'.
Fix obj == null where obj is set to null or uninitialized not functioning properly.

### 10.6.3 (2020/09/23)

#### Bugfixes

Fix portal scaling when going from an overworld to a nether being 64:1 instead of 8:1.

### 10.6.1 (2020/08/29)

#### Hardcore

Bumped Hardcore version to 10.1.
Add 10.0 -> 10.1 Hardcore checkpoint conversion.
Add support for forcing a player to respawn at their Hardcore checkpoint upon conversion, even if it hasn't moved.

### 10.6.0 (2020/08/18)

#### Scripts

Position(Double x, Double y, Double z, Float yaw, Float pitch, String world)
Location(Double x, Double y, Double z, String world)
Vector3(Double x, Double y, Double z)
Vector2(Double x, Double z)
BlockLocation(Int x, Int y, Int z, String world)
BlockVector3(Int x, Int y, Int z)
BlockVector2(Int x, Int z)
Region(String id, String world, String type, X points, Boolean transient)
These all have methods, too innumerable to mention here.
See this forum post for a short overview.
Added Location player.getLocation(), Position player.getPosition() and BlockLocation block.getLocation().
Added Player.teleport(Position destination) and Entity.teleport(Position destination).

#### Commands

/prefix now shows <colour> when setting a prefix consisting of only a colour, i.e. /prefix set rickyboy320 10m &6

#### Chat

Player names are now stored in proper text components.
As a consequence, keeping the colon colour of player names in chat consistent with the name colour was disproportionately difficult, so it is now white. (i.e. rickyboy320: hello world).

## 10.5 - The Bakery

### 10.5.5 (2020/07/30)

#### Commands

Added /challenge modifier set <player> <modifier> <value> to set a player's modifier value mid-challenge.
Added /challenge modifier add <player> <modifier> <value> to add a value to a player's modifier (i.e. life challenge).

#### Bugfixes

Fixed @chatscript timeout resetting newer instances of the same group (even when the timeout shouldn't trigger).
Fixed an issue where sometimes a value would be rejected due to 'self-cycle', even though there was none.

### 10.5.4 (2020/07/24)

#### Scripts

Added Boolean util::executeAndQuerySuccess(String command) and Int util::executeAndQueryResult(String command).
Added String util::randomUUID() to randomly generate an UUID.
format::formatDate now uses a timezone of UTC, so you can use more formats.

### 10.5.3 (2020/07/24)

#### Server Configuration

Updated to 1.16.1.

### 10.5.2 (2020/07/06)

#### Privacy

Messages are now sent to the (private) #zero_archive channel as well, allowing for periodic wipes of the public #zero channel.

#### Bugfixes

Fixed a bug where certain player settings would not be saved if modifed while the player was offline (e.g. from discord).
Fix potential data loss if an error occurred during start up.

### 10.5.1 (2020/06/16)

#### Bugfixes

Fixed a bug where logout messages would show even when they were supposed to be hidden.

### 10.5.0 (2020/06/15)

#### Scripts

Scripts are no longer triggered while the player is in spectator mode.

#### Commands

/players now sorts by rank, and player names are now coloured by their rank.
Disabled certain functionality on the test server, for privacy and secrecy reasons. Greens will be unaffected by this.

#### Hardcore

Players now retain their Hardcore checkpoint at Hall of Fame (HC-END) on conversion, rather than being removed.
Players now are blocked from entering Hardcore if their Hardcore checkpoint is at Hall of Fame, or if they have no Hardcore checkpoint but have completed Jiga's Claymaze.

#### Chat

The format of player join and quit messages has been changed to match Vanilla (the exclamation point has been replaced with a full stop).
The player's rank is now displayed during first-time join messages.
First-time join messages will no longer be shown if they are not of default rank, even if they have no existing player data.

## 10.4 - Scripts 2.1

### 10.4.13 (2020/06/14)

#### Bugfixes

Fixed players being set to Blue on map complete if they satisified the blue requirements, regardless of their rank.

### 10.4.12 (2020/06/14)

#### Ranks

Blue now requires 100 points (up from 35).
Blue now requires at least 5 or more maps completed of Moderate or greater difficulty.

#### Hardcore

Incremented Hardcore version from 9.0 -> 10.0.
Implemented Hardcore checkpoint conversion for 9.0 -> 10.0.
Improved conversion of checkpoints from 7.0, 8.0 and 8.1.

#### Commands

Added /checkpoint remplayercp <player> <mode>, to remove a player's checkpoint.
Updated /help ranks to reflect the new blue requirements and better convery rank-up requirements.

### 10.4.11 (2020/06/05)

#### Bugfixes

Fixed array initializers of 2 or more elements failing to parse inline (as an argument for a function calls or within a subexpression).
Fixed 'silent' error when a script line containing a '%' contains an error.
Fixed pi being accepted as a variable name: it should have been a keyword.
Fixed error message saying 'missing right-side operator', while actually the left side was missing.

### 10.4.10 (2020/05/19)

#### Commands

/creative is now accessible by moderators.
/tps is now available for greens+.

#### Bugfixes

Fixed an issue where variables in a namespace A using a type from namespace B sometimes fail to load their fields. (If namespace A was loaded before namespace B).

### 10.4.9 (2020/05/14)

#### Maps

Global Points have been renamed to Speedrun Score in an effort to make the name more intuitive.
You may also call it Minr Clout. You know who you are.

#### Scripts

Added @fast and @slow script operators.
By default, the @command, @bypass or @console script operators have a one-tick delay (like @delay 1).
@fast will remove that delay for all subsequent command operators.
Having either one multiple times in a row without the other is legal.
Note that this effect only applies to the local execution context - other functions called will be unaffected.
Added player.getSpeedrunScore(). player.getGlobalPoints() is now deprecated.

### 10.4.8 (2020/05/02)

#### Challenges

Added the Monthly challenge, containing from 8 to 25 maps, to cycle every month. The reward calculation is done the same as dailies and weeklies.

#### Commands

Added /checkpoint uncompleted which shows the maps the player yet has to complete (excluding valley/HC/board maps).

#### Scripts

Added String Player.getBedLocationWorld(), which returns a String containing the world where the player has set their bed.
Added String[] String.split(String separator), which splits the string based on the separator into a list of pieces around the separator. For example: "hi world".split(" ") would yield: ["hi", "world"].
Added Double[] system::getTPS() which returns a list of size 3, containing the average TPS over the last 1 minute, 5 minutes and 15 minutes.

#### Bugfixes

Fixed nested @for loops erroneously failing to compile.
Fixed setting max health using player.setMaxHealth() resulting in errors when joining a map, setting a checkpoint and in other arbitrary scenarios.
Fixed the left-hand sides of a @var assignment incorrectly parsing if the target expression was a field of an array.

### 10.4.7 (2020/04/19)

#### Bugfixes

Fixed an issue where removal of food was not saved, if this was the only action on a map.
Fixed an issue where having multiple constructors for one type would result in only one of the constructors remaining after server restart.

### 10.4.6 (2020/04/12)

#### Bugfixes

Fixed an issue where Player variables were not loaded correctly (resulting in null).

#### Cosmetics

Hats
Added "Bunny" hat, which requires finding 10% of the eggs in the open world of Egghunt 2.0.
Added "Compeggitor" hat, which requires participating in the Egghunt 2.0 Compeggition.
Added "Golden Egg" hat, which requires finding 50% of the eggs in the open world of Egghunt 2.0.
Titles
Rebranded the title "The Eggman" to "The Egglord", now requiring the victory of any Egghunt Compeggition.
Added "Eggspert" title, which requires finding all the eggs in the open world of Egghunt 2.0.

### 10.4.5 (2020/04/04)

#### Challenges

/spawn is now allowed during challenges.
Players can no longer use the Hardcore start sign whilst in a challenge.

#### Commands

Removed /sethome <player>. Note other variations of this command are unaffected.
/listhomes <page> now has priority over /listhomes <player>.

#### Scripts

Added literals pi and π (both equal to 3.14159265358979323846)
Added the following functions to the math namespace:
sin(), cos(), tan()
arcsin(), arccos(), arctan()
deg()

#### Discord

Minr Bot will no longer use markdown in messages.

#### Bugfixes

Visiting another player's home would set the target player's checkpoint mode to home, instead of the executor's.
Fixed /checkpoint times <page> checking for map codes before map names.
Fixed Float/Double values with the literal xxxE-xxx failing to parse.
Fixed various commands that take namespaces requiring the same namespace specifier. (/variable define casino_lb DBtable db would fail even though DBtable is a type in casino_lb)
Fixed an issue where in some cases Int(someList[0]) (or similar) would fail to compile.
Fixed @for loops within a @if statement failing to execute in special cases.
Fixed @done not showing a parse-error when it was put on the wrong depth level.

### 10.4.4 (2020/02/21)

#### Bugfixes

Fixed paged commands' paging arrows failing to work.

### 10.4.3 (2020/02/11)

#### Commands

/home
Homes are now listed alphabetically and shown in pages.
Mods can now set homes using coordinates.
Ops can now set and remove others' homes.

/whois
whois <player> is now usable by everyone.
whois <player> is now usable on Discord.

### 10.4.2 (2020/01/10)

#### Bugfixes

Fixed 100% not being attainable, due to aliased maps counting twice to total points.

### 10.4.1 (2020/01/06)

#### Bugfixes

Fixed default values of relative variables not being loaded (and therefore being lost after a restart).

### 10.4.0 (2019/12/20) - Scripts 2.1

#### Scripts

Lists
They are automatically created for every non-list type.
Lists are defined using X[], where X[] is a list of type X (e.g. Int[]).
Lists can be initialised with X[a, b, ..., z]. (Where a, b, ..., z are zero, one, or more instances of X)
Values can be retrieved using X[index]; to set a value simply assign to this (e.g. X[0] = 1).
List indicies are zero-based.
To append to a list, simply assign a value to an index one greater than the last item in the list.
e.g., if @define Int[] x = Int[1, 2, 3], append to x with @var x[x.length()] = 4.
Accessing an out of bound index will yield an IndexOutOfBoundsException (which will terminate the script).
Lists have the following methods:
List.length(), which reports the number of items in the list.
List.remove(Int index), which removes the item at the specified index from the list.
List.clear(), which removes all items from the list.
List.reverse(), which reveres the order of the items in the list.
List.shuffle(), which will randomise the order of the items in the list.

List Namespace
A range() function was added to a new list namespace as a convenience.
Int[] range(Int start, Int end) will generate a list of numbers from start (inclusive) to end (exclusive).
This allows you to iterate through every index in a list with @for Int i in range(0, list.length())

Loops
Added for-in loops, to iterate over any iterable.
Lists are the only iterable at this time.
Loops are defined with @for X item in X[], and terminated with @done
This example loop will print 1, 2, 3, 4 and 5 to the player (on separate lines).
@for Int i in Int[1, 2, 3, 4, 5]
@player {{i}}
@done
To loop through a range of numbers (like for (int i = 0; i < 10; i++)), use list::range().
@for Int i in range(0, 10)

Relative Variables
It is now possible to retrieve the value of a relative variable for specific players.
Simply use relativeVar[Player]. (Where Player is an instance of a Player type: e.g., Player("rickyboy320"))
Note that as this requires a Player instance, UUIDs will be required for retrieving values when players are offline. (Will fail otherwise)
Like lists, assigning to relativeVar[Player] will set their value.

Formatting
Whitespace will now be preserved when importing from Hastebin, and will be exported as well.

Script Creation
When creating a script, the co-ordinates of the script will be displayed. If you accidentally misplace a script this will allow you to easily remove the script.

Math Namespace
Added Int floor(Double x) and Int ceil(Double x), which floor and ceiling a number respectively.

Player Type
Added sendMessage(String message) to send a raw message directly to a player.

#### Commands

Added /challenge join <challenge> <player> and /challenge finish <challenge> <player> for administrators.
Fixed /checkpoint removealltimes not working on maps.

#### Discord

/discord verify now correctly instructs the player to post their verification code in #verify_here, instead of #general_discussion.

#### Server Configuration

Updated to 1.15.1 (Paper #15)

#### Bugfixes

Fixed c_dric's bug, where setting a field would spawn multiple script runners (causing delays to be skipped).
Fixed tab-completion of namespaces only showing namespaces that begin with lowercase letters.

## 10.3 - Cosmetics Part 2

### 10.3.6 (2019/10/30)

#### Bugfixes

Fixed a player's map timer being saved as invalid if their challenge timer was invalid.

### 10.3.5 (2019/09/01)

#### Hardcore

Updated checkpoints to Hardcore 9.0.
Old checkpoints will automatically be converted.

#### Scripts

Display names of items are now accessible.
Use Boolean Item.hasDisplayName() and String Item.getDisplayName().

#### Commands

Self-targetting /rocket is now restricted to mods and ops due to abuse.
Using /rocket as a non-operator no longer invalidates runs.

### 10.3.4 (2019/08/23)

#### Team Chat

Added /teamchat (aliases are /teammsg, /tchat, /tm and /t).
Overrides the vanilla command for better Minr-specific support.
/teamchat <message> will send a message to everyone on your team.
Players must be on a team that isn't a rank team to send or receive a message.
Subscribing
Alternatively, one can subscribe to a team channel for a team they aren't on.
Subscribers can send and receive messages in any channel they are subscribed to, regardless of the team.
The syntax is: /teamchat <team> <message>.
Subscribers are not preserved between restarts.
Subscribers can be added with /teamchat subscribe <team> <player>.
Subscribers can be removed with /teamchat unsubscribe <team> <player>.
Subscribers can be listed with /teamchat subscribe <team>.

#### Cosmetics

Hats now support player heads with custom skins.
Cosmetic GUI items now also support player heads with skins.

### 10.3.3 (2019/07/22)

#### Features

Addition of the /spectator command for Moderators.
Player names in many places (notably in the in-game player list and nameplates above other players) are now coloured by the player's rank.
The in-game player list is now sorted by rank.

#### Server Configuration

Updated to 1.14.4 (Paper #137)

#### Bugfixes

Command Block Minecarts no longer break when trying to execute Minr commands.

### 10.3.2 (2019/06/21)

#### Maps

Added announcements and special effects when obtaining 10%, 25%, 50%, 75% and 100% of all points.

#### Hardcore

Updated HC checkpoint converter to HC 8.1.
HC checkpoint converter is now more verbose and informs the player of the change.

#### Commands

Added expiration feedback to the call request.

#### Scripts

Added support for coloured player and objective names in the MSC Scoreboard API.

#### Server Configuration

All schematics have been converted to the 1.13 schematic format (.schem), which should fix irregularities in blocks and crashes (such as in Inaros).
Updated to Paper 1.13.2 #632

#### Bugfixes

Fixed issue with the command '/prefix reset' not taking arguments as intended.
Fixed command usage of the /type constructor define command: removed <returnType>.
Fixed 'This person has not requested a teleport to you within the last 5 minutes' message in /call: it now reflects the actual 1 minute expiration time.
Fixed adding of maps to a Challenge failing, but the message saying it succeeded: added more checks on the command to inform of failure.
Fixed removal of empty namespaces displaying a failing message, while the action succeeded.
Fixed attempts of removing a built-in namespace throwing a console exception.

### 10.3.1 (2019/05/24)

#### Bugfixes

Players can no longer see their own titles on occasion, which prevented interaction with the environment.

### 10.3.0 (2019/05/18)

#### Particle Trails

Adjusted the vertical offset for particle spawns (0.8 -> 1.2).
Adjusted the vertical offset for particle spawns when swimming or gliding (0 -> 0.2).
The period for particle spawns can now be customised.
Particle trails now have rarities.
Fixed particle trails now being applied on join.

#### Hats

Hats are cosmetic items, where various blocks appear on the player's head.
They can be deactivated easily by clicking on them while inside the inventory screen.

#### Prefixes

Prefixes are now time-based. They will be automatically removed are the period expires.
Removing prefixes has been simplified significantly (no longer requires magic word).
Commands are now: /prefix set <player>

#### Cosmetics GUI

Expanded the GUI to 27 slots.
Rearranged item positions slightly.
The item icons can now be customised.
Items now have a coloured name derived from their rarity.
Item lore has been significantly reformatted, and now displays requirements, rarity and multi-line descriptions.
Items can now be properly unobtainable.
Items are now sorted, first by rarity then alphabetically.
Items are now enchanted in the shop when active.

#### Rarity

Split rarities from Titles, so they can now be used by anything.
Renamed RARE to UNCOMMON.
Swapped the colours of UNCOMMON and HEROIC.
Rarity names are now displayed in game.

#### Commands

Cosmetic commands now have unified syntax, and are now ops-only.
They also all now support targetting other players, and all have "current" subcommands.
Additionally, cosmetic names within said commands are now displayed in colour.
Cosmetics can now be reloaded without a server restart, though this is not guaranteed to be safe.
Going to /spawn now resets you like entering a map does (triggering scripts when this happens in the future?).

## 10.2 - Cosmetics Update and Valentine Event

### 10.2.3 (2019/04/20)

#### Bugfixes

Fixed issue where an area script would crash the server on load when the region was deleted.
Fixed issue where User Types would break when default values were not set.

### 10.2.2 (2019/03/21)

#### Scoreboard Namespace

Added a new built-in namespace for manipulating scoreboards.
You can add or remove objectives and scores, and set the display slots of objectives.
Unlike using vanilla commands, there is no one-tick delay when using these functions.

#### Global Points

Updated global points to be somewhat more representative of top times.
Renewed formula is:
${\displaystyle base=1/{\sqrt {rank}}}$
. Everyone's score for this map is then rescaled according to the amount of completions:
${\displaystyle gpoints_{map}=(100/|F_{map}|)*base}$

${\displaystyle |F_{map}|={\sqrt {\sum base^{2}}}}$
Everyone can now use /checkpoint gpoints <player> <map>.

#### Events

Removed references to Valentines event.

#### Bugfixes

Fixed an error when deverifying a deleted Discord account.
Fixed an issue where tabbing did not work for /checkpoint gpoints.
Mapnames can now be used for /checkpoint gpoints

### 10.2.1 (2019/02/15)

#### Bugfixes

Valentine Leaderboard is now sorted by each couple's love points total.
Valentine Leaderboard now no longer opens the Challenge Leaderboard when pressing next page.

### 10.2.0 (2019/02/14)

#### Challenges

Use /marry <player> to link yourself with another player.
If one player dies, the linked player will also die.
Soul Link challenges reward Love Points as well as Challenge Points.
Use /divorce do decouple yourself from another player.
Soul Link is fully compatible with other challenge modifiers.

#### Cosmetics

Particle Trails.
Added particle trails. When you move, a trail of particles will be left behind you.
Added "Love Trail" particle trail, which requires 300 Love Points.
Added "Completionist" particle trail, which requires 100% of all points obtained.
Cosmetics GUI
Added new GUI for managing cosmetics, openable with /cosmetics (alias: /shop).

#### Events

A special Valentines event is running from Febuary 14th to March 14th, centred around Soul Link challenges. The top five couples with the most Love Points at the end of the event will unlock an exclusive title. Gain 300 Love Points to unlock the "Love Trail" particle trail.

#### Commands

/cosmetics
Alias: /shop
Opens the Cosmetic GUI.

/trail
Alias: /trails
Operators Only:
/trail give <player> <trail> gives a player a particle trail.
/trail take <player> <trail> takes a particle trail from a player.

The following commands were also added for everyone, but may be removed at a later date.
/trail set <trail> enables a particle trail.
/trail list shows all your particle trails.
/trail clear disables your currently active particle trail.

/titles
/titles list was changed to be similar to /trail list.

/valentine
/valentine ranks shows the current event leaderboard.
/valentine completed <player> shows the current event leaderboard.

/marry <player> to link with another player.

/hide
/hide <player> hides a player from you.
If a player relogs they will become visible again.

#### Bugfixes

Titles no longer persist after logout in a vehicle.

Titles have more debug measures such that it is easier to track the cause of persisting titles.

Fix valid Scripts throwing OutdatedException when slay (and others) is used as a parameter in @bypass​.

## 10.1 - Difficulty Rework

### 10.1.5 (2019/01/08)

#### Bugfix

Fixed repeating challenges subtracting challenge points.

### 10.1.4 (2019/01/08)

#### Bugfix

Fixed repeating challenges having an extreme reward.

### 10.1.3 (2019/01/07)

#### Bugfixes

Fixed recent invalid times overwriting valid times.

Fixed leaderboards not updating on removal of completions.

### 10.1.2 (2019/01/04)

#### Bugfixes

Fixed force joining challenges skipping requirements check.

Invalid but legitimate times on maps are now saved.

Fixed /whois showing the executor's points instead of the target's.

### 10.1.1 (2019/01/02)

#### Commands

A breakdown of where challenge points have been otained is now shown in /c points.

#### Bugfix

Fixed an error when regenerating a challenge before the leaderboard is setup.

### 10.1.0 (2018/12/31)

#### Difficulty Brackets

Added new difficulty brackets, white and black. Rebalanced the number of points awarded by each bracket. Renamed some of the brackets.

The difficulty spectrum is now as follows:

• White, "Very Easy" - awards 1 point
• Blue, "Easy" - awards 2 point
• Green, "Novice" - awards 4 point
• Yellow, "Moderate" - awards 7 point
• Orange, "Hard" - awards 12 point
• Red, "Very Hard" - awards 18 point
• Black, "Very Expert" - awards 25 point

Completions of black maps are now announced in chat like red maps. FFA Points have now been renamed to Points.

#### Hardcore

Whities are now automatically promoted to Blue once they meet the Hardcore point threshold, before entering Hardcore.

Entry to Hardcore now requires 35 points plus completion of the FAQ Quiz.

Completions of individual Hardcore maps are now announced.

#### Scripts

Local variables have been reworked internally. Chat scripts should behave properly now as a result.

Improved error messages when an exception occurs while importing a script.

If an exception occurs when adding or importing a script, the script will not be modified.

#### Bugfixes

Fixed issues when redefining or removing regions with scripts bound to them.

Methods now work on fields.

/type constructors and /type methods can now be used on built-in types.

## Prior to 10.0.0

Please consult the announcements forum. https://forums.minr.org/forums/news-announcements.18/