Fix redundant Stream.of usage
This commit is contained in:
parent
e4353e489f
commit
204f9d2e31
@ -194,9 +194,9 @@ public class BaritoneChatControl implements Helper, AbstractGameEventListener {
|
||||
if (setting.getValueClass() == Boolean.class) {
|
||||
TabCompleteHelper helper = new TabCompleteHelper();
|
||||
if ((Boolean) setting.value) {
|
||||
helper.append(Stream.of("true", "false"));
|
||||
helper.append("true", "false");
|
||||
} else {
|
||||
helper.append(Stream.of("false", "true"));
|
||||
helper.append("false", "true");
|
||||
}
|
||||
return helper.filterPrefix(argc.getString()).stream();
|
||||
} else {
|
||||
|
@ -63,7 +63,7 @@ public class GoalCommand extends Command {
|
||||
protected Stream<String> tabCompleted(String label, ArgConsumer args) throws CommandException {
|
||||
TabCompleteHelper helper = new TabCompleteHelper();
|
||||
if (args.hasExactlyOne()) {
|
||||
helper.append(Stream.of("reset", "clear", "none", "~"));
|
||||
helper.append("reset", "clear", "none", "~");
|
||||
} else {
|
||||
if (args.hasAtMost(3)) {
|
||||
while (args.has(2)) {
|
||||
|
@ -207,9 +207,9 @@ public class SetCommand extends Command {
|
||||
if (setting.getType() == Boolean.class) {
|
||||
TabCompleteHelper helper = new TabCompleteHelper();
|
||||
if ((Boolean) setting.value) {
|
||||
helper.append(Stream.of("true", "false"));
|
||||
helper.append("true", "false");
|
||||
} else {
|
||||
helper.append(Stream.of("false", "true"));
|
||||
helper.append("false", "true");
|
||||
}
|
||||
return helper.filterPrefix(args.getString()).stream();
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user