mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Add Lazzy "Offline -> Offline Lowercase" conversion
This commit is contained in:
parent
74a6df1fa7
commit
7d11147836
@ -134,6 +134,26 @@ public abstract class UUIDHandlerImplementation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else if (Settings.UUID.FORCE_LOWERCASE && !this.unknown.isEmpty() && !name.value.equals(name.value.toLowerCase())) {
|
||||||
|
TaskManager.runTaskAsync(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
UUID offlineUpper = UUID.nameUUIDFromBytes(("OfflinePlayer:" + name.value).getBytes(Charsets.UTF_8));
|
||||||
|
if (UUIDHandlerImplementation.this.unknown.contains(offlineUpper) && offlineUpper != null && !offlineUpper.equals(uuid)) {
|
||||||
|
UUIDHandlerImplementation.this.unknown.remove(offlineUpper);
|
||||||
|
Set<Plot> plots = PS.get().getPlotsAbs(offlineUpper);
|
||||||
|
if (!plots.isEmpty()) {
|
||||||
|
for (Plot plot : plots) {
|
||||||
|
plot.owner = uuid;
|
||||||
|
}
|
||||||
|
DBFunc.replaceUUID(offlineUpper, uuid);
|
||||||
|
PS.debug("&cDetected invalid UUID stored for: " + name.value);
|
||||||
|
PS.debug("&7 - Did you recently switch to online-mode storage without running `uuidconvert`?");
|
||||||
|
PS.debug("&6PlotSquared will update incorrect entries when the user logs in, or you can reconstruct your database.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
UUID offline = this.uuidMap.put(name, uuid);
|
UUID offline = this.uuidMap.put(name, uuid);
|
||||||
|
Loading…
Reference in New Issue
Block a user