mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-11-16 10:55:39 +01:00
Fixup horrible formatting
This commit is contained in:
parent
46474fcd22
commit
0ea07d0e63
@ -45,16 +45,13 @@ public class ViaFabricPlusVLCommandHandler extends VLCommandHandler {
|
||||
mixin.viaFabricPlus$removeSubCommand("pps");
|
||||
}
|
||||
|
||||
public int execute(CommandContext<FabricClientCommandSource> ctx) {
|
||||
public int execute(final CommandContext<FabricClientCommandSource> ctx) {
|
||||
String[] args = new String[0];
|
||||
try {
|
||||
args = StringArgumentType.getString(ctx, "args").split(" ");
|
||||
} catch (IllegalArgumentException ignored) {
|
||||
}
|
||||
onCommand(
|
||||
new ViaFabricPlusViaCommandSender(ctx.getSource()),
|
||||
args
|
||||
);
|
||||
onCommand(new ViaFabricPlusViaCommandSender(ctx.getSource()), args);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -65,17 +62,15 @@ public class ViaFabricPlusVLCommandHandler extends VLCommandHandler {
|
||||
} catch (IllegalArgumentException ignored) {
|
||||
args = new String[]{""};
|
||||
}
|
||||
String[] pref = args.clone();
|
||||
final String[] pref = args.clone();
|
||||
pref[pref.length - 1] = "";
|
||||
String prefix = String.join(" ", pref);
|
||||
onTabComplete(new ViaFabricPlusViaCommandSender(ctx.getSource()), args)
|
||||
.stream()
|
||||
.map(it -> {
|
||||
SuggestionsBuilder b = new SuggestionsBuilder(builder.getInput(), prefix.length() + builder.getStart());
|
||||
b.suggest(it);
|
||||
return b;
|
||||
})
|
||||
.forEach(builder::add);
|
||||
|
||||
final String prefix = String.join(" ", pref);
|
||||
onTabComplete(new ViaFabricPlusViaCommandSender(ctx.getSource()), args).stream().map(it -> {
|
||||
final var b = new SuggestionsBuilder(builder.getInput(), prefix.length() + builder.getStart());
|
||||
b.suggest(it);
|
||||
return b;
|
||||
}).forEach(builder::add);
|
||||
return builder.buildFuture();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user