Pre-process permissions and apply immediately on login events
This commit is contained in:
@@ -41,12 +41,12 @@ abstract class FlatfileDatastore extends Datastore {
|
||||
private final Logger actionLogger = Logger.getLogger("lp_actions");
|
||||
private Map<String, String> uuidCache = new ConcurrentHashMap<>();
|
||||
|
||||
final File pluginDir;
|
||||
private final File pluginDir;
|
||||
private File uuidData;
|
||||
private File actionLog;
|
||||
File usersDir;
|
||||
File groupsDir;
|
||||
File tracksDir;
|
||||
File uuidData;
|
||||
File actionLog;
|
||||
|
||||
FlatfileDatastore(LuckPermsPlugin plugin, String name, File pluginDir) {
|
||||
super(plugin, name);
|
||||
|
||||
@@ -70,7 +70,9 @@ public class AbstractListener {
|
||||
final UuidCache cache = plugin.getUuidCache();
|
||||
|
||||
final User user = plugin.getUserManager().get(cache.getUUID(uuid));
|
||||
plugin.getUserManager().unload(user);
|
||||
if (user != null) {
|
||||
plugin.getUserManager().unload(user);
|
||||
}
|
||||
|
||||
// Unload the user from memory when they disconnect;
|
||||
cache.clearCache(uuid);
|
||||
|
||||
Reference in New Issue
Block a user