Skip to content

Commit

Permalink
Don't check the commands
Browse files Browse the repository at this point in the history
  • Loading branch information
TonimatasDEV committed Mar 28, 2024
1 parent 3b1ecbc commit 644ddad
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public PrimaryCommand() {

@Override
public boolean execute(CommandSender sender, String commandLabel, String[] args) {
// If the command is PerWorldPlugins and has 1 argument, it executes.
if ((commandLabel.equalsIgnoreCase("perworldplugins") || commandLabel.equalsIgnoreCase("pwp")) && args.length == 1) {
// If the command has 1 argument, it executes.
if (args.length == 1) {
if (args[0].equalsIgnoreCase("version")) { // Detects if the argument is equal to "version".

// Detects if the sender has the permission "perworldplugins.version".
Expand All @@ -45,6 +45,7 @@ public boolean execute(CommandSender sender, String commandLabel, String[] args)
} else {
sender.sendMessage(getPrefix(ChatColor.DARK_RED) + "Please use: /perworldplugins reload | version");
}

return true;
}

Expand Down

0 comments on commit 644ddad

Please sign in to comment.