Fix main not being initialized in PermissionGetter
This commit is contained in:
@@ -12,13 +12,14 @@ public class PermissionGetter {
|
||||
|
||||
private final List<PermissionHook> hooks;
|
||||
|
||||
private QueueMain main;
|
||||
private final QueueMain main;
|
||||
public PermissionGetter(QueueMain main) {
|
||||
hooks = Arrays.asList(
|
||||
new BuiltIn(main),
|
||||
new LuckPermsHook(main),
|
||||
new UltraPermissionsHook(main)
|
||||
);
|
||||
this.main = main;
|
||||
}
|
||||
|
||||
private PermissionHook selected;
|
||||
@@ -32,6 +33,9 @@ public class PermissionGetter {
|
||||
selected = hook;
|
||||
}
|
||||
}
|
||||
if(selected == null) {
|
||||
throw new IllegalStateException("All hooks are unusable!");
|
||||
}
|
||||
main.getLogger().info("Using "+selected.getName()+" for permissions.");
|
||||
return selected;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user