mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
Add @YamlKey specification to some fields in spawn and server files, fix #242
This commit is contained in:
1 parent
8663de2411
commit
98f812bcd9
6 files changed
+35
-19
No files matched your search
@@ -103,10 +103,10 @@ public class HuskHomesCommand extends CommandBase implements ConsoleExecutable,
|
||||
newestVersion.ifPresentOrElse(
|
||||
newVersion -> onlineUser.sendMessage(
|
||||
new MineDown("[HuskHomes](#00fb9a bold) [| A new version of HuskHomes is available!"
|
||||
+ " (v" + newVersion + " (Running: v" + plugin.getPluginVersion() + ")](#00fb9a)")),
|
||||
+ " (v" + newVersion + " (Running: v" + plugin.getPluginVersion() + ")](#00fb9a)")),
|
||||
() -> onlineUser.sendMessage(
|
||||
new MineDown("[HuskHomes](#00fb9a bold) [| HuskHomes is up-to-date."
|
||||
+ " (Running: v" + plugin.getPluginVersion() + ")](#00fb9a)"))));
|
||||
+ " (Running: v" + plugin.getPluginVersion() + ")](#00fb9a)"))));
|
||||
}
|
||||
case "migrate" -> plugin.getLocales().getLocale("error_console_command_only")
|
||||
.ifPresent(onlineUser::sendMessage);
|
||||
@@ -131,8 +131,8 @@ public class HuskHomesCommand extends CommandBase implements ConsoleExecutable,
|
||||
.stream().filter(command -> command instanceof ConsoleExecutable)
|
||||
.forEach(command -> plugin.getLoggingAdapter().log(Level.INFO,
|
||||
command.command +
|
||||
(command.command.length() < 16 ? " ".repeat(16 - command.command.length()) : "")
|
||||
+ " - " + command.getDescription()));
|
||||
(command.command.length() < 16 ? " ".repeat(16 - command.command.length()) : "")
|
||||
+ " - " + command.getDescription()));
|
||||
}
|
||||
case "reload" -> plugin.reload().thenAccept(reloaded -> {
|
||||
if (!reloaded) {
|
||||
@@ -144,10 +144,10 @@ public class HuskHomesCommand extends CommandBase implements ConsoleExecutable,
|
||||
case "update" -> plugin.getLatestVersionIfOutdated().thenAccept(newestVersion ->
|
||||
newestVersion.ifPresentOrElse(newVersion -> plugin.getLoggingAdapter().log(Level.WARNING,
|
||||
"An update is available for HuskHomes, v" + newVersion
|
||||
+ " (Running v" + plugin.getPluginVersion() + ")"),
|
||||
+ " (Running v" + plugin.getPluginVersion() + ")"),
|
||||
() -> plugin.getLoggingAdapter().log(Level.INFO,
|
||||
"HuskHomes is up to date" +
|
||||
" (Running v" + plugin.getPluginVersion() + ")")));
|
||||
" (Running v" + plugin.getPluginVersion() + ")")));
|
||||
case "migrate" -> {
|
||||
if (args.length < 2) {
|
||||
plugin.getLoggingAdapter().log(Level.INFO,
|
||||
@@ -177,7 +177,7 @@ public class HuskHomesCommand extends CommandBase implements ConsoleExecutable,
|
||||
}, () -> {
|
||||
plugin.getLoggingAdapter().log(Level.INFO,
|
||||
"Please specify a valid migrator.\n" +
|
||||
"If a migrator is not available, please verify that you meet the prerequisites to use it.");
|
||||
"If a migrator is not available, please verify that you meet the prerequisites to use it.");
|
||||
logMigratorsList();
|
||||
});
|
||||
}
|
||||
@@ -187,9 +187,9 @@ public class HuskHomesCommand extends CommandBase implements ConsoleExecutable,
|
||||
private void logMigratorsList() {
|
||||
plugin.getLoggingAdapter().log(Level.INFO,
|
||||
"List of available migrators:\nMigrator ID / Migrator Name:\n" +
|
||||
plugin.getMigrators().stream()
|
||||
.map(migrator -> migrator.getIdentifier() + " - " + migrator.getName())
|
||||
.collect(Collectors.joining("\n")));
|
||||
plugin.getMigrators().stream()
|
||||
.map(migrator -> migrator.getIdentifier() + " - " + migrator.getName())
|
||||
.collect(Collectors.joining("\n")));
|
||||
}
|
||||
|
||||
private void sendAboutMenu(@NotNull OnlineUser onlineUser) {
|
||||
|
||||
Reference in new issue
Block a user