From e4191129a9a3624b4d69862e4bd5f498827e08c8 Mon Sep 17 00:00:00 2001 From: Cow Date: Wed, 29 Apr 2020 19:23:24 +0200 Subject: Simplified command handling with Tab-completable usernames - Replaced having just one command with several aliases for each supported command with having one command for each supported command - Fixes chat components with run_command click events to be executed (e.g. join a party) --- src/main/java/eu/olli/cowmoonication/util/PlayerCache.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main/java/eu/olli/cowmoonication/util') diff --git a/src/main/java/eu/olli/cowmoonication/util/PlayerCache.java b/src/main/java/eu/olli/cowmoonication/util/PlayerCache.java index 1b5251a..383ca03 100644 --- a/src/main/java/eu/olli/cowmoonication/util/PlayerCache.java +++ b/src/main/java/eu/olli/cowmoonication/util/PlayerCache.java @@ -3,7 +3,7 @@ package eu.olli.cowmoonication.util; import com.google.common.collect.EvictingQueue; import eu.olli.cowmoonication.Cowmoonication; -import java.util.Set; +import java.util.SortedSet; import java.util.TreeSet; public class PlayerCache { @@ -33,8 +33,9 @@ public class PlayerCache { bestFriendCache.remove(name); } - public Set getAllNamesSorted() { - Set nameList = new TreeSet<>(bestFriendCache); + public SortedSet getAllNamesSorted() { + SortedSet nameList = new TreeSet<>(String.CASE_INSENSITIVE_ORDER); + nameList.addAll(bestFriendCache); nameList.addAll(nameCache); return nameList; } -- cgit