From 8283a5a71d0687955b02831f6e94be19b8872ff7 Mon Sep 17 00:00:00 2001 From: KanekiLeChomeur <52374013+KanekiLeChomeur@users.noreply.github.com> Date: Sun, 26 Jan 2025 19:28:33 +0100 Subject: [PATCH] Reload Command Patch Patched my own mistake on the reload command(my bad) --- src/shelly7w7/HealthTag/HealthTagCommand.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/shelly7w7/HealthTag/HealthTagCommand.php b/src/shelly7w7/HealthTag/HealthTagCommand.php index 66fe804..e487124 100644 --- a/src/shelly7w7/HealthTag/HealthTagCommand.php +++ b/src/shelly7w7/HealthTag/HealthTagCommand.php @@ -54,9 +54,8 @@ public function execute(CommandSender $sender, string $commandLabel, array $args $sender->sendMessage(TextFormat::RED . "Successfully changed the custom format for healthtag," . TextFormat::YELLOW . " reload the file to update the changes '/healthtag reload'."); } } else if($action === "reload") { - Main::getInstance()->getConfig()->setAll(Main::getInstance()->configdata); - Main::getInstance()->getConfig()->save(); Main::getInstance()->getConfig()->reload(); + Main::getInstance()->configdata = Main::getInstance()->getConfig()->getAll(); $sender->sendMessage(TextFormat::RED . "Successfully reloaded configuration file."); } else { $sender->sendMessage(TextFormat::RED . "Invalid arguments," . TextFormat::YELLOW . " use '/healthtag help' for more information.");