Fix NPE that occurs when repairing nextClaimID value
Very likely I was going to refactor this class, but then stopped since it's abstract and thus can't have any constructor... but apparently I forgot to revert that line. Closes #377
This commit is contained in:
parent
abd97b1f5a
commit
c04666b43d
|
|
@ -62,7 +62,6 @@ import java.util.regex.Pattern;
|
|||
//singleton class which manages all GriefPrevention data (except for config options)
|
||||
public abstract class DataStore
|
||||
{
|
||||
private GriefPrevention instance;
|
||||
|
||||
//in-memory cache for player data
|
||||
protected ConcurrentHashMap<UUID, PlayerData> playerNameToPlayerDataMap = new ConcurrentHashMap<UUID, PlayerData>();
|
||||
|
|
@ -141,9 +140,9 @@ public abstract class DataStore
|
|||
{
|
||||
if (claim.id >= nextClaimID)
|
||||
{
|
||||
instance.getLogger().severe("nextClaimID was lesser or equal to an already-existing claim ID!\n" +
|
||||
GriefPrevention.instance.getLogger().severe("nextClaimID was lesser or equal to an already-existing claim ID!\n" +
|
||||
"This usually happens if you ran out of storage space.");
|
||||
instance.AddLogEntry("Changing nextClaimID from " + nextClaimID + " to " + claim.id, CustomLogEntryTypes.Debug, false);
|
||||
GriefPrevention.AddLogEntry("Changing nextClaimID from " + nextClaimID + " to " + claim.id, CustomLogEntryTypes.Debug, false);
|
||||
nextClaimID = claim.id + 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user