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.");