mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2025-01-10 02:07:43 +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,
|
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);
|
||||||
|
@ -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);
|
||||||
|
@ -49,18 +49,14 @@ 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);
|
issuer.sendInfo(MVCorei18n.DELETE_SUCCESS, "{world}", deletedWorldName);
|
||||||
issuer.sendInfo(MVCorei18n.DELETE_SUCCESS, "{world}", deletedWorldName);
|
}).onFailure(failure -> {
|
||||||
}).onFailure(failure -> {
|
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,
|
||||||
|
@ -78,13 +78,14 @@ 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 -> {
|
})
|
||||||
Logging.fine("World import failure: " + failure);
|
.onFailure(failure -> {
|
||||||
issuer.sendError(failure.getFailureMessage());
|
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;
|
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());
|
||||||
|
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
package com.onarandombox.MultiverseCore.utils.result;
|
Loading…
Reference in New Issue
Block a user