Fix: including "highestLimit" number (#4218)

Including "highestLimit" number
This commit is contained in:
RedstoneFuture 2023-10-29 10:55:01 +01:00 committed by GitHub
parent 15b4cbdb0f
commit 95c7f621fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -173,7 +173,7 @@ public final class TabCompletions {
return Collections.emptyList();
}
final List<String> commands = new ArrayList<>();
for (int i = offset; i < highestLimit && (offset - i + amountLimit) > 0; i++) {
for (int i = offset; i <= highestLimit && (offset - i + amountLimit) > 0; i++) {
commands.add(String.valueOf(i));
}
return asCompletions(commands.toArray(new String[0]));