Skip to content

Commit

Permalink
Prevent reload multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
HaHaWTH committed Mar 11, 2024
1 parent c9a44f6 commit 285776d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ public class ConstructCommandExecutor implements CommandExecutor {
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, String[] args) {
if (args.length == 1) {
if (args[0].equalsIgnoreCase("reload") && (sender.hasPermission("advancedsensitivewords.reload") || sender instanceof ConsoleCommandSender)) {
if (!isInitialized) {
return true;
}
settingsManager.reload();
messagesManager.reload();
AdvancedSensitiveWords.getInstance().doInitTasks();
Expand Down

0 comments on commit 285776d

Please sign in to comment.