mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-14 00:14:05 +00:00
Slight cleanup and better support for server reloads
This commit is contained in:
1 parent
50f4a84d04
commit
20f34d9b45
6 files changed
+33
-13
No files matched your search
@@ -48,6 +48,7 @@ public abstract class Datastore {
|
||||
These methods will block the thread that they're ran on.
|
||||
*/
|
||||
public abstract void init(DatastoreConfiguration configuration);
|
||||
public abstract void shutdown();
|
||||
public abstract boolean loadOrCreateUser(UUID uuid, String username);
|
||||
public abstract boolean loadUser(UUID uuid);
|
||||
public abstract boolean saveUser(User user);
|
||||
|
||||
@@ -104,6 +104,13 @@ public class HikariDatastore extends Datastore {
|
||||
setupTables();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shutdown() {
|
||||
if (hikari != null) {
|
||||
hikari.shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean loadUser(UUID uuid) {
|
||||
User user = plugin.getUserManager().makeUser(uuid);
|
||||
|
||||
Reference in new issue
Block a user