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:
@@ -79,9 +79,13 @@ 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){
|
||||||
|
try {
|
||||||
|
Long.parseLong(args[i]);
|
||||||
|
} catch (NumberFormatException ignored){
|
||||||
return List.of();
|
return List.of();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return List.of(
|
return List.of(
|
||||||
"100ms",
|
"100ms",
|
||||||
"15s", // some sample completions for duration
|
"15s", // some sample completions for duration
|
||||||
|
|||||||
Reference in New Issue
Block a user