aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/cowtipper/cowlection/command/MooCommand.java
diff options
context:
space:
mode:
authorOlli <olli@olli.eu>2020-08-04 19:42:30 +0200
committerOlli <olli@olli.eu>2020-08-04 19:42:30 +0200
commit48859f131195e6bff837fc103a39528b61b491fe (patch)
tree901b5efb39c0d7e40f5c850a4bfd356b9ccb8b08 /src/main/java/de/cowtipper/cowlection/command/MooCommand.java
parentf8c8c5a4c16338349a5a9e38608cdfcd603d339b (diff)
downloadCowlection-48859f131195e6bff837fc103a39528b61b491fe.tar.gz
Cowlection-48859f131195e6bff837fc103a39528b61b491fe.tar.bz2
Cowlection-48859f131195e6bff837fc103a39528b61b491fe.zip
Added optional initial search query parameter to /moo search
+ minor text fixes
Diffstat (limited to 'src/main/java/de/cowtipper/cowlection/command/MooCommand.java')
-rw-r--r--src/main/java/de/cowtipper/cowlection/command/MooCommand.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/de/cowtipper/cowlection/command/MooCommand.java b/src/main/java/de/cowtipper/cowlection/command/MooCommand.java
index 9f5d004..0c784eb 100644
--- a/src/main/java/de/cowtipper/cowlection/command/MooCommand.java
+++ b/src/main/java/de/cowtipper/cowlection/command/MooCommand.java
@@ -79,8 +79,12 @@ public class MooCommand extends CommandBase {
} else if (args[0].equalsIgnoreCase("list")) {
handleListBestFriends();
} else if (args[0].equalsIgnoreCase("online")) {
- main.getChatHelper().sendMessage(EnumChatFormatting.GRAY, "Checking online status of " + EnumChatFormatting.WHITE + main.getFriendsHandler().getBestFriends().size() + EnumChatFormatting.GRAY + " best friends. This may take a few seconds.");
- main.getFriendsHandler().runBestFriendsOnlineCheck(true);
+ if (main.getFriendsHandler().getBestFriends().size() > 0) {
+ main.getChatHelper().sendMessage(EnumChatFormatting.GRAY, "Checking online status of " + EnumChatFormatting.WHITE + main.getFriendsHandler().getBestFriends().size() + EnumChatFormatting.GRAY + " best friends. This may take a few seconds.");
+ main.getFriendsHandler().runBestFriendsOnlineCheck(true);
+ } else {
+ main.getChatHelper().sendMessage(EnumChatFormatting.RED, "You haven't added anyone to your best friends list yet. Do so with " + EnumChatFormatting.WHITE + "/moo add <playerName>");
+ }
} else if (args[0].equalsIgnoreCase("nameChangeCheck")) {
handleNameChangeCheck(args);
}
@@ -105,7 +109,7 @@ public class MooCommand extends CommandBase {
else if (args[0].equalsIgnoreCase("config") || args[0].equalsIgnoreCase("toggle")) {
displayGuiScreen(new MooGuiConfig(null));
} else if (args[0].equalsIgnoreCase("search")) {
- displayGuiScreen(new GuiSearch(main.getConfigDirectory()));
+ displayGuiScreen(new GuiSearch(main.getConfigDirectory(), CommandBase.buildString(args, 1)));
} else if (args[0].equalsIgnoreCase("guiscale")) {
handleGuiScale(args);
} else if (args[0].equalsIgnoreCase("rr")) {