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, String newWorldName,
@Optional @Optional
@Syntax("") // TODO @Syntax(/* TODO */ "")
@Description("{@@mv-core.regen.other.description}") @Description("{@@mv-core.regen.other.description}")
String[] flags) { String[] flags) {
ParsedCommandFlags parsedFlags = parseFlags(flags); ParsedCommandFlags parsedFlags = parseFlags(flags);

View File

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

View File

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

View File

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

View File

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

View File

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