Skip to content

Commit

Permalink
added reload command
Browse files Browse the repository at this point in the history
  • Loading branch information
UwUAroze committed Jul 23, 2022
1 parent 51f0deb commit 82351e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package me.aroze.chatminigames.command;

import me.aroze.chatminigames.ChatMinigames;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
Expand All @@ -24,6 +25,8 @@ public boolean onCommand(CommandSender sender, Command command, String label, St

if (args.length == 1 && (args[0].equals("reload") || args[0].equals("rl"))) {
// reload logic
instance.reloadConfig();
sender.sendMessage(color(instance.getConfig().getString("messages.other.reload")));
return true;
}

Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ messages:
too-many-args: "&#ff6e6e⚠ &#ff7f6eThat's too many args weirdo."
# Message to be sent if a player enters just "/cmg"
info: "&#ff6e6e⚠ &#ff7f6eSyntax: /cmg <forcestart | reload>"
# Message to be sent on config reload
reload: "&#ff6e6e✔ &#ff7f6eChatMinigames: Config reloaded!"

misc:
# Should a noteblock pling (minecraft:block.note_block.pling) play to players who correctly complete a minigame?
Expand Down

0 comments on commit 82351e2

Please sign in to comment.