diff options
| author | Cow <cow@volloeko.de> | 2020-03-29 18:38:54 +0200 |
|---|---|---|
| committer | Cow <cow@volloeko.de> | 2020-03-29 18:38:54 +0200 |
| commit | b0403a905f6abffb44d1bf3502ae4616f2cf68a9 (patch) | |
| tree | 19d9dd6d9839b82f5ba440f42b186608a50707b4 /src/main/java/eu/olli/cowmoonication/command | |
| parent | f831d34ab792fc234dae2be3e879a5aaa0354149 (diff) | |
| download | Cowlection-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.java | 6 |
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)."); } |
