1
mirror of https://github.com/Shiewk/SModeration.git synced 2026-04-28 05:54:16 +02:00

Fixed buggy tab completion

This commit is contained in:
Shy
2024-06-08 11:35:25 +02:00
parent 667305bb81
commit e36dcacc9d
@@ -79,7 +79,11 @@ public class MuteCommand implements CommandExecutor, TabCompleter {
} else { } else {
for (int i = 1; i < args.length; i++) { for (int i = 1; i < args.length; i++) {
if (TimeUtil.parseDurationMillisSafely(args[i]) == -1){ if (TimeUtil.parseDurationMillisSafely(args[i]) == -1){
return List.of(); try {
Long.parseLong(args[i]);
} catch (NumberFormatException ignored){
return List.of();
}
} }
} }
return List.of( return List.of(