From ab38705422614bd0b1141a7e5759bc93eaec7dee Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 8 Aug 2018 15:09:06 +0100 Subject: [PATCH] Fix compression not being clickable --- .../src/mineplex/core/friend/FriendManager.java | 2 +- .../core/friend/command/FriendsDisplay.java | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/friend/FriendManager.java b/Plugins/Mineplex.Core/src/mineplex/core/friend/FriendManager.java index e53d3a4f8..84a7d8bdc 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/friend/FriendManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/friend/FriendManager.java @@ -527,7 +527,7 @@ public class FriendManager extends MiniDbClientPlugin> TextComponent compressed = new TextComponent(C.cGray + "Sent: " + F.count(sent) + " Pending: " + F.count(pending)); compressed.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("Shows all friends.") .create())); - compressed.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/")); + compressed.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/" + FriendsDisplay.COMMAND + " chest")); } // Use a LinkedHashMap so we maintain insertion order diff --git a/Plugins/Mineplex.Core/src/mineplex/core/friend/command/FriendsDisplay.java b/Plugins/Mineplex.Core/src/mineplex/core/friend/command/FriendsDisplay.java index 21d1b15b5..38c169a1f 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/friend/command/FriendsDisplay.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/friend/command/FriendsDisplay.java @@ -18,7 +18,14 @@ public class FriendsDisplay extends CommandBase @Override public void Execute(Player caller, final String[] args) - { - Plugin.showFriends(caller, true); - } + { + if (args.length > 0) + { + Plugin.showFriendsInUI(caller); + } + else + { + Plugin.showFriends(caller, true); + } + } } \ No newline at end of file