mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
Use internal yaml resource for unsafe blocks by key, remove caching, fixes
This commit is contained in:
1 parent
c4b16db9a9
commit
a3ea62a85c
11 files changed
+215
-269
No files matched your search
@@ -86,13 +86,11 @@ public class HuskHomesCommand extends CommandBase implements ConsoleExecutable,
|
||||
.ifPresent(onlineUser::sendMessage);
|
||||
return;
|
||||
}
|
||||
plugin.reload().thenAccept(reloaded -> {
|
||||
if (!reloaded) {
|
||||
onlineUser.sendMessage(new MineDown("[Error:](#ff3300) [Failed to reload the plugin. Check console for errors.](#ff7e5e)"));
|
||||
return;
|
||||
}
|
||||
onlineUser.sendMessage(new MineDown("[HuskHomes](#00fb9a bold) �fb9a&| Reloaded config & message files."));
|
||||
});
|
||||
if (!plugin.reload()) {
|
||||
onlineUser.sendMessage(new MineDown("[Error:](#ff3300) [Failed to reload the plugin. Check console for errors.](#ff7e5e)"));
|
||||
return;
|
||||
}
|
||||
onlineUser.sendMessage(new MineDown("[HuskHomes](#00fb9a bold) �fb9a&| Reloaded config & message files."));
|
||||
}
|
||||
case "update" -> {
|
||||
if (!onlineUser.hasPermission(Permission.COMMAND_HUSKHOMES_UPDATE.node)) {
|
||||
@@ -135,13 +133,13 @@ public class HuskHomesCommand extends CommandBase implements ConsoleExecutable,
|
||||
(command.command.length() < 16 ? " ".repeat(16 - command.command.length()) : "")
|
||||
+ " - " + command.getDescription()));
|
||||
}
|
||||
case "reload" -> plugin.reload().thenAccept(reloaded -> {
|
||||
if (!reloaded) {
|
||||
case "reload" -> {
|
||||
if (!plugin.reload()) {
|
||||
plugin.getLoggingAdapter().log(Level.SEVERE, "Failed to reload the plugin.");
|
||||
return;
|
||||
}
|
||||
plugin.getLoggingAdapter().log(Level.INFO, "Reloaded config & message files.");
|
||||
});
|
||||
}
|
||||
case "update" -> plugin.getLatestVersionIfOutdated().thenAccept(newestVersion ->
|
||||
newestVersion.ifPresentOrElse(newVersion -> plugin.getLoggingAdapter().log(Level.WARNING,
|
||||
"An update is available for HuskHomes, v" + newVersion
|
||||
|
||||
Reference in new issue
Block a user