Ensure that player data is removed even if a corresponding user doesn't exist

This commit is contained in:
Luck 2020-09-07 18:16:25 +01:00
parent 971bb67b51
commit 442c7d46f9
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -287,7 +287,13 @@ public class WebEditorResponse {
User user = this.plugin.getStorage().loadUser(uuid, null).join();
if (user == null) {
return false;
try {
this.plugin.getStorage().deletePlayerData(uuid).get();
} catch (Exception e) {
e.printStackTrace();
Message.DELETE_ERROR.send(this.sender, uuid.toString());
}
return true;
}
if (ArgumentPermissions.checkModifyPerms(this.plugin, this.sender, CommandPermission.APPLY_EDITS, user)) {