Fix compression not being clickable

This commit is contained in:
Sam 2018-08-08 15:09:06 +01:00 committed by Alexander Meech
parent fcd3b95fff
commit ab38705422
2 changed files with 11 additions and 4 deletions

View File

@ -527,7 +527,7 @@ public class FriendManager extends MiniDbClientPlugin<List<FriendStatus>>
TextComponent compressed = new TextComponent(C.cGray + "Sent: " + F.count(sent) + " Pending: " + F.count(pending)); 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.") compressed.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("Shows all friends.")
.create())); .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 // Use a LinkedHashMap so we maintain insertion order

View File

@ -18,7 +18,14 @@ public class FriendsDisplay extends CommandBase<FriendManager>
@Override @Override
public void Execute(Player caller, final String[] args) public void Execute(Player caller, final String[] args)
{ {
Plugin.showFriends(caller, true); if (args.length > 0)
} {
Plugin.showFriendsInUI(caller);
}
else
{
Plugin.showFriends(caller, true);
}
}
} }