Merge remote-tracking branch 'origin/main'

This commit is contained in:
cherryhikari committed 2025-08-01 14:55:13 +08:00
commit c8c4c8b9d7
1 file changed
+5 -5
@@ -45,11 +45,11 @@ public class CommandFabric implements Command<ServerCommandSource>, Predicate<Se
@Override
public CompletableFuture<Suggestions> getSuggestions(CommandContext<ServerCommandSource> context, SuggestionsBuilder builder) {
var item = context.getSource();
ServerCommandSource item = context.getSource();
var input = context.getInput();
var temp = input.split(" ");
var arg = new String[input.endsWith(" ") ? temp.length : temp.length - 1];
String input = context.getInput();
String[] temp = input.split(" ");
String[] arg = new String[input.endsWith(" ") ? temp.length : temp.length - 1];
System.arraycopy(temp, 1, arg, 0, temp.length - 1);
builder = builder.createOffset(builder.getInput().lastIndexOf(32) + 1);
@@ -66,4 +66,4 @@ public class CommandFabric implements Command<ServerCommandSource>, Predicate<Se
return builder.buildFuture();
}
}
}