delete commandargumentexception and return usage instead

This commit is contained in:
spacerocket62
2022-02-06 19:53:35 -08:00
parent e328cf29e5
commit 282da7fdbb
9 changed files with 11 additions and 26 deletions

View File

@ -4,7 +4,6 @@ import com.google.common.collect.ImmutableList;
import dev.plex.command.PlexCommand;
import dev.plex.command.annotation.CommandParameters;
import dev.plex.command.annotation.CommandPermissions;
import dev.plex.command.exception.CommandArgumentException;
import dev.plex.rank.enums.Rank;
import dev.plex.util.PlexUtils;
import java.util.List;
@ -23,7 +22,7 @@ public class DeopCMD extends PlexCommand
{
if (args.length != 1)
{
throw new CommandArgumentException();
return usage(getUsage());
}
Player player = getNonNullPlayer(args[0]);
player.setOp(false);