Change PermissionService handling
This commit is contained in:
parent
aeeb2820f9
commit
f0ad32bc37
@ -210,13 +210,14 @@ public class LPSpongePlugin implements LuckPermsPlugin {
|
|||||||
|
|
||||||
// register the PermissionService with Sponge
|
// register the PermissionService with Sponge
|
||||||
getLog().info("Registering PermissionService...");
|
getLog().info("Registering PermissionService...");
|
||||||
|
service = new LuckPermsService(this);
|
||||||
|
|
||||||
if (game.getPluginManager().getPlugin("permissionsex").isPresent()) {
|
if (game.getPluginManager().getPlugin("permissionsex").isPresent()) {
|
||||||
getLog().warn("Detected PermissionsEx - assuming it's loaded for migration.");
|
getLog().warn("Detected PermissionsEx - assuming it's loaded for migration.");
|
||||||
getLog().warn("Delaying LuckPerms PermissionService registration.");
|
getLog().warn("Delaying LuckPerms PermissionService registration.");
|
||||||
lateLoad = true;
|
lateLoad = true;
|
||||||
} else {
|
} else {
|
||||||
game.getServiceManager().setProvider(this, PermissionService.class, (service = new LuckPermsService(this)));
|
game.getServiceManager().setProvider(this, PermissionService.class, service);
|
||||||
}
|
}
|
||||||
|
|
||||||
// register with the LP API
|
// register with the LP API
|
||||||
@ -246,7 +247,7 @@ public class LPSpongePlugin implements LuckPermsPlugin {
|
|||||||
public void onLateEnable(GamePreInitializationEvent event) {
|
public void onLateEnable(GamePreInitializationEvent event) {
|
||||||
if (lateLoad) {
|
if (lateLoad) {
|
||||||
getLog().info("Providing late registration of PermissionService...");
|
getLog().info("Providing late registration of PermissionService...");
|
||||||
game.getServiceManager().setProvider(this, PermissionService.class, (service = new LuckPermsService(this)));
|
game.getServiceManager().setProvider(this, PermissionService.class, service);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user