Fix redundant Stream.of usage

This commit is contained in:
Brady 2019-09-21 17:25:20 -05:00
parent e4353e489f
commit 204f9d2e31
No known key found for this signature in database
GPG Key ID: 73A788379A197567
3 changed files with 5 additions and 5 deletions

View File

@ -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 {

View File

@ -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)) {

View File

@ -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 {