aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/eu/olli/cowmoonication/command
diff options
context:
space:
mode:
authorCow <cow@volloeko.de>2020-03-29 18:38:54 +0200
committerCow <cow@volloeko.de>2020-03-29 18:38:54 +0200
commitb0403a905f6abffb44d1bf3502ae4616f2cf68a9 (patch)
tree19d9dd6d9839b82f5ba440f42b186608a50707b4 /src/main/java/eu/olli/cowmoonication/command
parentf831d34ab792fc234dae2be3e879a5aaa0354149 (diff)
downloadCowlection-b0403a905f6abffb44d1bf3502ae4616f2cf68a9.tar.gz
Cowlection-b0403a905f6abffb44d1bf3502ae4616f2cf68a9.tar.bz2
Cowlection-b0403a905f6abffb44d1bf3502ae4616f2cf68a9.zip
Improved /moo stalk
- Fixed NullPointer - Improved mode output to be more human-readable
Diffstat (limited to 'src/main/java/eu/olli/cowmoonication/command')
-rw-r--r--src/main/java/eu/olli/cowmoonication/command/MooCommand.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/eu/olli/cowmoonication/command/MooCommand.java b/src/main/java/eu/olli/cowmoonication/command/MooCommand.java
index e933c30..f265d8a 100644
--- a/src/main/java/eu/olli/cowmoonication/command/MooCommand.java
+++ b/src/main/java/eu/olli/cowmoonication/command/MooCommand.java
@@ -146,7 +146,7 @@ public class MooCommand extends CommandBase {
main.getChatHelper().sendMessage(EnumChatFormatting.RED, "You haven't set your Hypixel API key yet. Use " + EnumChatFormatting.DARK_RED + "/api new" + EnumChatFormatting.RED + " to request a new API key from Hypixel or use " + EnumChatFormatting.DARK_RED + "/" + this.getCommandName() + " apikey <key>" + EnumChatFormatting.RED + " to manually set your existing API key.");
return;
}
- main.getChatHelper().sendMessage(EnumChatFormatting.YELLOW, "Stalking " + EnumChatFormatting.GOLD + playerName + EnumChatFormatting.YELLOW + ". This may take a few seconds.");
+ main.getChatHelper().sendMessage(EnumChatFormatting.GRAY, "Stalking " + EnumChatFormatting.WHITE + playerName + EnumChatFormatting.GRAY + ". This may take a few seconds.");
boolean isBestFriend = main.getFriends().isBestFriend(playerName, true);
if (isBestFriend) {
Friend stalkedPlayer = main.getFriends().getBestFriend(playerName);
@@ -172,7 +172,9 @@ public class MooCommand extends CommandBase {
if (hyStalking != null && hyStalking.isSuccess()) {
HyStalking.HySession session = hyStalking.getSession();
if (session.isOnline()) {
- main.getChatHelper().sendMessage(EnumChatFormatting.YELLOW, EnumChatFormatting.GOLD + stalkedPlayer.getName() + EnumChatFormatting.YELLOW + " is currently playing " + session.getGameType() + ": " + session.getMode() + (session.getMap() != null ? " (Map: " + session.getMap() + ")" : ""));
+ main.getChatHelper().sendMessage(EnumChatFormatting.YELLOW, EnumChatFormatting.GOLD + stalkedPlayer.getName() + EnumChatFormatting.YELLOW + " is currently playing " + EnumChatFormatting.GOLD + session.getGameType() + EnumChatFormatting.YELLOW
+ + (session.getMode() != null ? ": " + EnumChatFormatting.GOLD + session.getMode() : "")
+ + (session.getMap() != null ? EnumChatFormatting.YELLOW + " (Map: " + EnumChatFormatting.GOLD + session.getMap() + EnumChatFormatting.YELLOW + ")" : ""));
} else {
main.getChatHelper().sendMessage(EnumChatFormatting.YELLOW, EnumChatFormatting.GOLD + stalkedPlayer.getName() + EnumChatFormatting.YELLOW + " is currently " + EnumChatFormatting.RED + "offline" + EnumChatFormatting.YELLOW + " (or deactivated API access).");
}