mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-28 13:36:33 +01:00
Delete corrupt saveplayer data
This commit is contained in:
parent
998dbe4873
commit
eccf82b733
@ -60,6 +60,8 @@ public class DSavePlayer {
|
||||
|
||||
public void reset() {
|
||||
Player onlinePlayer = p.getServer().getPlayer(this.playerName);
|
||||
|
||||
try{
|
||||
if (onlinePlayer != null) {
|
||||
/* Player is online */
|
||||
onlinePlayer.getInventory().setContents(this.oldInventory);
|
||||
@ -97,8 +99,13 @@ public class DSavePlayer {
|
||||
offlinePlayer.saveData();
|
||||
}
|
||||
}
|
||||
} catch (NullPointerException exception) {
|
||||
P.p.log("Corrupt playerdata detected and removed!");
|
||||
}
|
||||
|
||||
savePlayers.remove(this);
|
||||
save();
|
||||
|
||||
}
|
||||
|
||||
// Static
|
||||
|
Loading…
Reference in New Issue
Block a user