Cleanup parts of the sponge service implementation
This commit is contained in:
@@ -45,7 +45,7 @@ public final class BukkitMigrationUtils {
|
||||
}
|
||||
}
|
||||
if (uuid == null) {
|
||||
log.logErr("Unable to get a UUID for user identifier: " + s);
|
||||
log.logError("Unable to get a UUID for user identifier: " + s);
|
||||
}
|
||||
return uuid;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ public class MigrationBPermissions extends SubCommand<Object> {
|
||||
|
||||
WorldManager worldManager = WorldManager.getInstance();
|
||||
if (worldManager == null) {
|
||||
log.logErr("Plugin not loaded.");
|
||||
log.logError("Plugin not loaded.");
|
||||
return CommandResult.STATE_ERROR;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ public class MigrationBPermissions extends SubCommand<Object> {
|
||||
|
||||
Set<String> users = configSection.getKeys(false);
|
||||
if (users == null) {
|
||||
log.logErr("Couldn't get a list of users.");
|
||||
log.logError("Couldn't get a list of users.");
|
||||
return CommandResult.FAILURE;
|
||||
}
|
||||
AtomicInteger userLoadCount = new AtomicInteger(0);
|
||||
|
||||
@@ -74,14 +74,14 @@ public class MigrationGroupManager extends SubCommand<Object> {
|
||||
log.log("Starting.");
|
||||
|
||||
if (!args.get(0).equalsIgnoreCase("true") && !args.get(0).equalsIgnoreCase("false")) {
|
||||
log.logErr("Was expecting true/false, but got " + args.get(0) + " instead.");
|
||||
log.logError("Was expecting true/false, but got " + args.get(0) + " instead.");
|
||||
return CommandResult.STATE_ERROR;
|
||||
}
|
||||
final boolean migrateAsGlobal = Boolean.parseBoolean(args.get(0));
|
||||
final Function<String, String> worldMappingFunc = s -> migrateAsGlobal ? null : s;
|
||||
|
||||
if (!Bukkit.getPluginManager().isPluginEnabled("GroupManager")) {
|
||||
log.logErr("Plugin not loaded.");
|
||||
log.logError("Plugin not loaded.");
|
||||
return CommandResult.STATE_ERROR;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ public class MigrationPermissionsBukkit extends SubCommand<Object> {
|
||||
log.log("Starting.");
|
||||
|
||||
if (!Bukkit.getPluginManager().isPluginEnabled("PermissionsBukkit")) {
|
||||
log.logErr("Plugin not loaded.");
|
||||
log.logError("Plugin not loaded.");
|
||||
return CommandResult.STATE_ERROR;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -99,7 +99,7 @@ public class MigrationPermissionsEx extends SubCommand<Object> {
|
||||
log.log("Starting.");
|
||||
|
||||
if (!Bukkit.getPluginManager().isPluginEnabled("PermissionsEx")) {
|
||||
log.logErr("Plugin not loaded.");
|
||||
log.logError("Plugin not loaded.");
|
||||
return CommandResult.STATE_ERROR;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -85,7 +85,7 @@ public class MigrationPowerfulPerms extends SubCommand<Object> {
|
||||
log.log("Starting.");
|
||||
|
||||
if (!Bukkit.getPluginManager().isPluginEnabled("PowerfulPerms")) {
|
||||
log.logErr("Plugin not loaded.");
|
||||
log.logError("Plugin not loaded.");
|
||||
return CommandResult.STATE_ERROR;
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ public class MigrationPowerfulPerms extends SubCommand<Object> {
|
||||
}
|
||||
|
||||
if (uuids.isEmpty()) {
|
||||
log.logErr("Unable to find any UUIDs to migrate.");
|
||||
log.logError("Unable to find any UUIDs to migrate.");
|
||||
return CommandResult.FAILURE;
|
||||
}
|
||||
|
||||
|
||||
@@ -76,12 +76,12 @@ public class MigrationZPermissions extends SubCommand<Object> {
|
||||
log.log("Starting.");
|
||||
|
||||
if (!Bukkit.getPluginManager().isPluginEnabled("zPermissions")) {
|
||||
log.logErr("Plugin not loaded.");
|
||||
log.logError("Plugin not loaded.");
|
||||
return CommandResult.STATE_ERROR;
|
||||
}
|
||||
|
||||
if (!Bukkit.getServicesManager().isProvidedFor(ZPermissionsService.class)) {
|
||||
log.logErr("Plugin not loaded.");
|
||||
log.logError("Plugin not loaded.");
|
||||
return CommandResult.STATE_ERROR;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user