Commit 13db9561 authored by Nico Eckes's avatar Nico Eckes

Moved editor code to own module. Further editor code

parent b870062e
Pipeline #744 passed with stage
in 2 minutes and 58 seconds
......@@ -72,11 +72,11 @@ public enum Permissions implements IPermissions {
public void load() {
if (!Files.exists(Config.playersFile) && !Files.exists(Config.groupsFile)) {
Logger.info("It seems like you are starting for the first time. Default permission files will be created for you.");
createGroup(Config.defaultGroup);
} else if (!loadGroups() || !loadPlayers()) {
Logger.info("Failed to load. The server will be shut down to prevent unintended access.");
FMLCommonHandler.instance().getMinecraftServerInstance().initiateShutdown();
}
createGroup(Config.defaultGroup);
save();
}
......
......@@ -34,7 +34,7 @@ public class Player extends PermissionHolder implements IPlayer {
@Override
public Set<PermissionNode> getAllPermNodes() {
Set<PermissionNode> result = permissions.values();
Set<PermissionNode> result = new HashSet<>(permissions.values());
groups.forEach(g-> result.addAll(g.getAllPermNodes()));
return result;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment