use of de.dytanic.cloudnetcore.permissions.config.ConfigPermissions in project CloudNet by Dytanic.
the class PermissionModule method onBootstrap.
@Override
public void onBootstrap() {
try {
configPermission = new ConfigPermissions();
} catch (Exception e) {
e.printStackTrace();
}
permissionPool = new PermissionPool();
permissionPool.setAvailable(configPermission.isEnabled0());
NetworkUtils.addAll(permissionPool.getGroups(), configPermission.loadAll0());
getCloud().getNetworkManager().getModuleProperties().append("permissionPool", permissionPool);
getCloud().getEventManager().registerListener(this, new PlayerInitListener());
getCloud().getEventManager().registerListener(this, new UpdateAllListener());
getCloud().getCommandManager().registerCommand(new CommandPermissions());
getCloud().getPacketManager().registerHandler(PacketRC.CN_CORE + 1, PacketInUpdatePermissionGroup.class);
}
Aggregations