mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-26 12:43:09 +00:00
Cleanup & multiple small fixes
This commit is contained in:
1 parent
1870893fe1
commit
a413c0a50a
53 files changed
+452
-371
No files matched your search
@@ -1,11 +1,13 @@
|
||||
package me.lucko.luckperms.groups;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import me.lucko.luckperms.LuckPermsPlugin;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
public class GroupManager {
|
||||
private final LuckPermsPlugin plugin;
|
||||
|
||||
@@ -15,10 +17,6 @@ public class GroupManager {
|
||||
@Getter
|
||||
private final Map<String, Group> groups = new ConcurrentHashMap<>();
|
||||
|
||||
public GroupManager(LuckPermsPlugin plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a group object by name
|
||||
* @param name The name to search by
|
||||
@@ -75,19 +73,6 @@ public class GroupManager {
|
||||
groups.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* Load all groups from the datastore
|
||||
*/
|
||||
public void loadAllGroups() {
|
||||
plugin.getDatastore().loadAllGroups(success -> {
|
||||
String defaultGroup = plugin.getConfiguration().getDefaultGroupName();
|
||||
|
||||
if (!groups.keySet().contains(defaultGroup)) {
|
||||
plugin.getDatastore().createAndLoadGroup(defaultGroup, success1 -> {});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes a new group object
|
||||
* @param name The name of the group
|
||||
|
||||
Reference in new issue
Block a user