mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 10:14:42 +02:00
UUID cache changes
This commit is contained in:
@ -370,13 +370,16 @@ public class PS {
|
||||
@Override
|
||||
public void run() {
|
||||
UUIDHandler.add(new StringWrapper("*"), DBFunc.everyone);
|
||||
for (Plot plot : getPlots()) {
|
||||
if (plot.hasOwner() && plot.temp != -1) {
|
||||
if (UUIDHandler.getName(plot.owner) == null) {
|
||||
UUIDHandler.implementation.unknown.add(plot.owner);
|
||||
foreachPlotRaw(new RunnableVal<Plot>() {
|
||||
@Override
|
||||
public void run(Plot plot) {
|
||||
if (plot.hasOwner() && plot.temp != -1) {
|
||||
if (UUIDHandler.getName(plot.owner) == null) {
|
||||
UUIDHandler.implementation.unknown.add(plot.owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
startExpiryTasks();
|
||||
startPlotMeConversion();
|
||||
}
|
||||
|
@ -59,15 +59,18 @@ public class UUIDHandler {
|
||||
}
|
||||
|
||||
public static HashSet<UUID> getAllUUIDS() {
|
||||
HashSet<UUID> uuids = new HashSet<>();
|
||||
for (Plot plot : PS.get().getPlots()) {
|
||||
if (plot.hasOwner()) {
|
||||
uuids.add(plot.owner);
|
||||
uuids.addAll(plot.getTrusted());
|
||||
uuids.addAll(plot.getMembers());
|
||||
uuids.addAll(plot.getDenied());
|
||||
final HashSet<UUID> uuids = new HashSet<>();
|
||||
PS.get().foreachPlotRaw(new RunnableVal<Plot>() {
|
||||
@Override
|
||||
public void run(Plot plot) {
|
||||
if (plot.hasOwner()) {
|
||||
uuids.add(plot.owner);
|
||||
uuids.addAll(plot.getTrusted());
|
||||
uuids.addAll(plot.getMembers());
|
||||
uuids.addAll(plot.getDenied());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
return uuids;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user