Misc code fixes

This commit is contained in:
nossr50
2020-07-13 11:39:03 -07:00
parent 428c093ae4
commit 7eae59a0b3
153 changed files with 1139 additions and 1474 deletions

View File

@ -21,7 +21,7 @@ import java.util.ArrayList;
import java.util.List;
public abstract class ChatCommand implements TabExecutor {
private ChatMode chatMode;
private final ChatMode chatMode;
protected ChatManager chatManager;
public ChatCommand(ChatMode chatMode) {
@ -89,12 +89,10 @@ public abstract class ChatCommand implements TabExecutor {
@Override
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
switch (args.length) {
case 1:
return StringUtil.copyPartialMatches(args[0], CommandUtils.TRUE_FALSE_OPTIONS, new ArrayList<String>(CommandUtils.TRUE_FALSE_OPTIONS.size()));
default:
return ImmutableList.of();
if (args.length == 1) {
return StringUtil.copyPartialMatches(args[0], CommandUtils.TRUE_FALSE_OPTIONS, new ArrayList<String>(CommandUtils.TRUE_FALSE_OPTIONS.size()));
}
return ImmutableList.of();
}
protected String buildChatMessage(String[] args, int index) {