mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-24 10:34:24 +00:00
Cleanup subscription updates & UserManager#loadAllUsers
This commit is contained in:
5 files changed
+33
-29
No files matched your search
@@ -207,16 +207,14 @@ public class SpongeUserManager implements UserManager, LPSubjectCollection {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAllUsers() {
|
||||
plugin.doSync(() -> {
|
||||
Set<UUID> players = plugin.getOnlinePlayers();
|
||||
plugin.doAsync(() -> {
|
||||
for (UUID uuid : players) {
|
||||
UUID internal = plugin.getUuidCache().getUUID(uuid);
|
||||
plugin.getStorage().loadUser(internal, "null").join();
|
||||
}
|
||||
});
|
||||
});
|
||||
public CompletableFuture<Void> updateAllUsers() {
|
||||
return CompletableFuture.supplyAsync(plugin::getOnlinePlayers, plugin.getScheduler().sync())
|
||||
.thenAcceptAsync(players -> {
|
||||
for (UUID uuid : players) {
|
||||
UUID internal = plugin.getUuidCache().getUUID(uuid);
|
||||
plugin.getStorage().loadUser(internal, "null").join();
|
||||
}
|
||||
}, plugin.getScheduler().async());
|
||||
}
|
||||
|
||||
/* ------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user