Fix some checkstyle issues.

This commit is contained in:
Jeremy Wood 2023-09-10 13:34:36 -04:00
parent 99846b5567
commit 8ffd716190
No known key found for this signature in database
GPG Key ID: C5BAD04C77B91B4B
6 changed files with 24 additions and 25 deletions

View File

@ -63,7 +63,7 @@ public class CloneCommand extends MultiverseCommand {
String newWorldName,
@Optional
@Syntax("") // TODO
@Syntax(/* TODO */ "")
@Description("{@@mv-core.regen.other.description}")
String[] flags) {
ParsedCommandFlags parsedFlags = parseFlags(flags);

View File

@ -82,8 +82,7 @@ public class CreateCommand extends MultiverseCommand {
@Optional
@Syntax("--seed [seed] --generator [generator[:id]] --world-type [worldtype] --adjust-spawn --no-structures")
@Description("{@@mv-core.create.flags.description}")
String[] flags
) {
String[] flags) {
ParsedCommandFlags parsedFlags = parseFlags(flags);
issuer.sendInfo(MVCorei18n.CREATE_PROPERTIES, "{worldName}", worldName);

View File

@ -49,18 +49,14 @@ public class DeleteCommand extends MultiverseCommand {
issuer.getIssuer(),
() -> {
issuer.sendInfo(MVCorei18n.DELETE_DELETING, "{world}", worldName);
try {
worldManager.deleteWorld(worldName)
.onSuccess(deletedWorldName -> {
Logging.fine("World delete success: " + deletedWorldName);
issuer.sendInfo(MVCorei18n.DELETE_SUCCESS, "{world}", deletedWorldName);
}).onFailure(failure -> {
Logging.fine("World delete failure: " + failure);
issuer.sendError(failure.getFailureMessage());
});
} catch (Exception e) {
e.printStackTrace();
}
worldManager.deleteWorld(worldName)
.onSuccess(deletedWorldName -> {
Logging.fine("World delete success: " + deletedWorldName);
issuer.sendInfo(MVCorei18n.DELETE_SUCCESS, "{world}", deletedWorldName);
}).onFailure(failure -> {
Logging.fine("World delete failure: " + failure);
issuer.sendError(failure.getFailureMessage());
});
},
this.commandManager.formatMessage(
issuer,

View File

@ -78,13 +78,14 @@ public class ImportCommand extends MultiverseCommand {
worldManager.importWorld(ImportWorldOptions.worldName(worldName)
.environment(environment)
.generator(parsedFlags.flagValue("--generator", String.class))
.useSpawnAdjust(parsedFlags.hasFlag("--adjust-spawn"))
).onSuccess(newWorld -> {
Logging.fine("World import success: " + newWorld);
issuer.sendInfo(MVCorei18n.IMPORT_SUCCESS, "{world}", newWorld.getName());
}).onFailure(failure -> {
Logging.fine("World import failure: " + failure);
issuer.sendError(failure.getFailureMessage());
});
.useSpawnAdjust(parsedFlags.hasFlag("--adjust-spawn")))
.onSuccess(newWorld -> {
Logging.fine("World import success: " + newWorld);
issuer.sendInfo(MVCorei18n.IMPORT_SUCCESS, "{world}", newWorld.getName());
})
.onFailure(failure -> {
Logging.fine("World import failure: " + failure);
issuer.sendError(failure.getFailureMessage());
});
}
}

View File

@ -7,6 +7,8 @@ import com.onarandombox.MultiverseCore.utils.message.MessageReplacement;
import org.jetbrains.annotations.NotNull;
public enum MVCorei18n implements MessageKeyProvider {
// BEGIN CHECKSTYLE-SUPPRESSION: Javadoc
// config status
CONFIG_SAVE_FAILED,
CONFIG_NODE_NOTFOUND,
@ -140,9 +142,9 @@ public enum MVCorei18n implements MessageKeyProvider {
// generic
GENERIC_SUCCESS,
GENERIC_FAILURE
GENERIC_FAILURE;
;
// END CHECKSTYLE-SUPPRESSION: Javadoc
private final MessageKey key = MessageKey.of("mv-core." + this.name().replace('_', '.').toLowerCase());

View File

@ -0,0 +1 @@
package com.onarandombox.MultiverseCore.utils.result;