Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
Commands: add ban with one arg
Browse files Browse the repository at this point in the history
  • Loading branch information
TheFaser committed Jul 19, 2023
1 parent e6233c6 commit 65652dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/flectone/commands/CommandTempban.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command

FCommands fCommand = new FCommands(commandSender, command.getName(), s, strings);

if(fCommand.isInsufficientArgs(2)) return true;
if(fCommand.isInsufficientArgs(1)) return true;

String stringTime = strings[1];
String stringTime = strings.length > 1 ? strings[1] : "permanent";

if((!fCommand.isStringTime(stringTime) || !StringUtils.isNumeric(stringTime.substring(0, stringTime.length() - 1)))
&& !stringTime.equals("permanent")){
Expand Down

0 comments on commit 65652dd

Please sign in to comment.