The priority here isn't particularly important, we can allow ourselves
to overwrite early and still allow some injections from others take
place.
Fixes#4007
Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
Right now SpongeGameProfile.toMcProfile() converts all SpongeAPI GameProfiles
with empty UUIDs (= new UUID(0, 0)) to authlib GameProfiles with a null UUID.
This is fine in most cases but problematic for the sample/player list in
the status response. Empty UUIDs can be used there to create dummy entries,
to display custom messages in the server list instead of the online players.
(See e.g. https://github.com/Minecrell/ServerListPlus/wiki/Status-Configuration#player-hover-messages)
The Minecraft client completely rejects status responses that contain
GameProfiles with null UUIDs and/or null names. This is why it is
important that the empty UUID is not converted to a null UUID.
Prevent sending invalid responses to the client by making sure both
UUID and name are non-null in the player samples of the status response.
This fixes a regression in API 8 when using the ServerListPlus plugin
on Sponge. The problem was likely introduced in some GameProfile refactoring
(API 7 worked fine).
* Resolve date formatting error when expirationDate exists.
* Remove StoredUserListMixin.java
This actually causes a ClassCastException wherein it attempts to cast a String to a GameProfile
* Appease the checker
* revert changes for StoredUserListMixin
* Appease the checker
---------
Co-authored-by: Jesse <jessemckee97@gmail.com>
We were marking world unload as manual save, it should be explicitly asked for.
The documentation of ServerWorld#save states that it should return false on SerializationBehavior.NONE.
However still call the events to be consistent with how it works for other sources.
Make sure we set the isManualSave to false in case the save event is cancelled. Otherwise the next call would be errously marked as manual save.
Fixed that we did not do automatic saves on saves marked as manual, we should always on automatic behaviour.