You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keep FlatFile players unloaded when their data cannot be read at login
When a player's profile did not load at login, the loading task asked the
database for a new user. On FlatFile, newUser(Player) always returned a loaded
profile at starting levels, and saveUser writes over any row with that
player's UUID. A users file that could not be read at that moment, or a row
whose cooldowns could not be parsed, therefore wiped the player's stored
progress on the first save.
newUser(Player) now reads mcmmo.users and only returns a loaded profile when
the file was read and has no row with the player's UUID. Otherwise the profile
stays unloaded and the login keeps retrying the load, the same way the SQL
database behaves when its insert fails.
newUser(String, UUID) no longer appends a second row for a UUID that is
already stored. The load queries skip a row that fails to parse and use the
next row with the same UUID, so a fresh duplicate would be loaded in place of
a damaged original and then saved over both.
A row that fails to parse is now logged once per player, naming them, instead
of the exception being swallowed. Rows that end before the newer XP columns
load with those columns at zero, as the startup health check pads them,
instead of failing to load.
Copy file name to clipboardExpand all lines: Changelog.txt
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,17 @@
1
1
Version 2.3.002
2
2
Fixed mcMMO failing to start on Spigot 26.3 servers
3
3
Fixed a read error while updating the FlatFile database overwriting mcmmo.users with only the players read before the error (Thanks cyrne1-7208)
4
+
Fixed FlatFile players losing their progress when their data could not be read as they joined (See notes)
4
5
Fixed FlatFile database saves reporting success when mcmmo.users could not be written
5
6
Improved performance of repairing items on an anvil
6
7
Lowered the default Pale_Hanging_Moss XP for Herbalism in experience.yml (See notes)
7
-
(API) DatabaseManager.newUser(String, UUID) on the FlatFile database now returns an unloaded profile when mcmmo.users cannot be read, matching the SQL database
8
+
(API) DatabaseManager.newUser(Player) and newUser(String, UUID) on the FlatFile database now return an unloaded profile when mcmmo.users cannot be read or already has a row with that UUID
8
9
(Codebase) Crossbow ricochet reflection no longer modifies the arrow velocity and block face normal vectors it is given (Thanks cyrne1-7208)
9
10
10
11
NOTES:
11
12
We believe this is a bug in Spigot 26.3 rather than an intended API change, the error comes from Spigot itself whenever a plugin looks through the server's recipes. mcMMO now works around it on our side so it keeps running until Spigot fixes it.
12
13
If you run Spigot 26.3 you need this update, no config changes are required.
14
+
A FlatFile player no longer starts over with a new profile when mcmmo.users can't be read as they join, or when their row in it can't be loaded. mcMMO keeps retrying the load instead, and a damaged row is logged once with the player's name. Restarting the server repairs a damaged row by resetting the values that can't be read. This never affected SQL databases, SQL already keeps the player unloaded and retries the load in this situation.
13
15
To get the lower Pale_Hanging_Moss XP, set 'Experience_Values.Herbalism.Pale_Hanging_Moss' to 1 in experience.yml, or delete experience.yml to generate a new one.
0 commit comments