mirror of
https://github.com/lucko/LuckPerms.git
synced 2025-09-03 03:12:46 +02:00
Implement locks to hopefully resolve race conditions with I/O - experimental
This commit is contained in:
@@ -24,8 +24,6 @@ package me.lucko.luckperms.users;
|
||||
|
||||
import me.lucko.luckperms.LuckPermsPlugin;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class StandaloneUserManager extends UserManager {
|
||||
private final LuckPermsPlugin plugin;
|
||||
|
||||
@@ -41,13 +39,12 @@ public class StandaloneUserManager extends UserManager {
|
||||
}
|
||||
|
||||
@Override
|
||||
public User make(UUID id) {
|
||||
return new StandaloneUser(id, plugin);
|
||||
}
|
||||
|
||||
@Override
|
||||
public User make(UUID uuid, String username) {
|
||||
return new StandaloneUser(uuid, username, plugin);
|
||||
public User apply(UserIdentifier id) {
|
||||
StandaloneUser user = id.getUsername() == null ?
|
||||
new StandaloneUser(id.getUuid(), plugin) :
|
||||
new StandaloneUser(id.getUuid(), id.getUsername(), plugin);
|
||||
giveDefaultIfNeeded(user, false);
|
||||
return user;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user