From a54f518faf6d79be4bfd5ec218d251734bb123f1 Mon Sep 17 00:00:00 2001 From: Cow Date: Wed, 1 Jul 2020 02:14:58 +0200 Subject: Added item age tooltips --- src/main/java/eu/olli/cowmoonication/command/MooCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/eu/olli/cowmoonication/command') diff --git a/src/main/java/eu/olli/cowmoonication/command/MooCommand.java b/src/main/java/eu/olli/cowmoonication/command/MooCommand.java index c926939..4467167 100644 --- a/src/main/java/eu/olli/cowmoonication/command/MooCommand.java +++ b/src/main/java/eu/olli/cowmoonication/command/MooCommand.java @@ -290,12 +290,12 @@ public class MooCommand extends CommandBase { .setChatHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ChatComponentText(EnumChatFormatting.YELLOW + "Run " + EnumChatFormatting.GOLD + "/profile " + slothStalking.getPlayerName()))))) .appendSibling(new ChatComponentText(" while you're in a lobby (tooltip of the player head on the top left).").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.YELLOW)))); } else if (slothStalking.hasNeverLoggedOut()) { - Pair lastOnline = Utils.getLastOnlineWords(slothStalking.getLastLogin()); + Pair lastOnline = Utils.getDurationAsWords(slothStalking.getLastLogin()); main.getChatHelper().sendMessage(EnumChatFormatting.YELLOW, slothStalking.getPlayerNameFormatted() + EnumChatFormatting.YELLOW + " was last online " + EnumChatFormatting.GOLD + lastOnline.first() + EnumChatFormatting.YELLOW + " ago" + (lastOnline.second() != null ? " (" + EnumChatFormatting.GOLD + lastOnline.second() + EnumChatFormatting.YELLOW + ")" : "") + "."); } else { - Pair lastOnline = Utils.getLastOnlineWords(slothStalking.getLastLogout()); + Pair lastOnline = Utils.getDurationAsWords(slothStalking.getLastLogout()); main.getChatHelper().sendMessage(EnumChatFormatting.YELLOW, slothStalking.getPlayerNameFormatted() + EnumChatFormatting.YELLOW + " is " + EnumChatFormatting.GOLD + "offline" + EnumChatFormatting.YELLOW + " for " + EnumChatFormatting.GOLD + lastOnline.first() + EnumChatFormatting.YELLOW + ((lastOnline.second() != null || slothStalking.getLastGame() != null) ? (" (" -- cgit