fix issue with /reloading and permission registration
This commit is contained in:
parent
242672f49d
commit
4de8165c95
@ -301,7 +301,12 @@ public class LPBukkitPlugin extends JavaPlugin implements LuckPermsPlugin {
|
|||||||
scheduler.doAsyncRepeating(new CacheHousekeepingTask(this), 2400L);
|
scheduler.doAsyncRepeating(new CacheHousekeepingTask(this), 2400L);
|
||||||
|
|
||||||
// register permissions
|
// register permissions
|
||||||
|
try {
|
||||||
registerPermissions(getConfiguration().get(ConfigKeys.COMMANDS_ALLOW_OP) ? PermissionDefault.OP : PermissionDefault.FALSE);
|
registerPermissions(getConfiguration().get(ConfigKeys.COMMANDS_ALLOW_OP) ? PermissionDefault.OP : PermissionDefault.FALSE);
|
||||||
|
} catch (Exception e) {
|
||||||
|
// this throws an exception if the plugin is /reloaded, grr
|
||||||
|
}
|
||||||
|
|
||||||
if (!getConfiguration().get(ConfigKeys.OPS_ENABLED)) {
|
if (!getConfiguration().get(ConfigKeys.OPS_ENABLED)) {
|
||||||
scheduler.doSync(() -> getServer().getOperators().forEach(o -> o.setOp(false)));
|
scheduler.doSync(() -> getServer().getOperators().forEach(o -> o.setOp(false)));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user