Skip to content

Commit

Permalink
Check is the command with the plugin name exist if not add it as the …
Browse files Browse the repository at this point in the history
…old system
  • Loading branch information
TonimatasDEV committed Sep 10, 2024
1 parent a1b3c73 commit cd2bfd2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ public void onCommandPreProcess(PlayerCommandPreprocessEvent event) {
commandStr = Why.whyPlugin(plugin) + ":" + commandString;
}

possibleCommands.add(commandStr);
if (CommandManager.getCommands().get(commandStr) == null) {
possibleCommands.add(commandString);
} else {
possibleCommands.add(commandStr);
}
}

for (Command defaultCommand : CommandManager.defaultCommands) {
Expand Down

0 comments on commit cd2bfd2

Please sign in to comment.