mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2025-01-09 17:57:36 +01:00
Fix some checkstyle issues.
This commit is contained in:
parent
99846b5567
commit
8ffd716190
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
@ -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());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -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());
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
package com.onarandombox.MultiverseCore.utils.result;
|
Loading…
Reference in New Issue
Block a user