color( ChatColor.RED ).underlined( true ). event( new HoverEvent( HoverEvent.Action.SHOW_TEXT, new ComponentBuilder( error.getMessage() ).color( ChatColor.RED ).create() ) ). create() );
private static void addRanked(ChatColor ccRank, ChatColor ccCurRank, ChatColor ccPossessive, ChatColor ccNumRanks, ComponentBuilder componentBuilder, int numRanks, int rank, int nextRank) { if (numRanks > 0) { //Rank: x componentBuilder.append(LocaleLoader.getString("JSON.Hover.Rank", String.valueOf(rank))).append("\n") .bold(false).italic(false).strikethrough(false).underlined(false); //Next Rank: x if(nextRank > rank) componentBuilder.append(LocaleLoader.getString("JSON.Hover.NextRank", String.valueOf(nextRank))).append("\n") .bold(false).italic(false).strikethrough(false).underlined(false); /*componentBuilder.append(" " + LocaleLoader.getString("JSON.RankPossesive") + " ").color(ccPossessive); componentBuilder.append(String.valueOf(numRanks)).color(ccNumRanks);*/ } }
color( ChatColor.RED ).underlined( true ). event( new HoverEvent( HoverEvent.Action.SHOW_TEXT, new ComponentBuilder( error.getMessage() ).color( ChatColor.RED ).create() ) ). create() );
public static void sendHoverTip(Player player) { player.sendMessage(""); player.spigot().sendMessage(new ComponentBuilder("TIP").color(ChatColor.YELLOW).bold(true) .append(" Try to ", FormatRetention.NONE).color(ChatColor.GRAY) .append("hover").color(ChatColor.WHITE).italic(true).underlined(true) .event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, TextComponent.fromLegacyText(ChatColor.LIGHT_PURPLE + "Hover on the commands to get info about them."))) .append(" or ", FormatRetention.NONE).color(ChatColor.GRAY) .append("click").color(ChatColor.WHITE).italic(true).underlined(true) .event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, TextComponent.fromLegacyText(ChatColor.LIGHT_PURPLE + "Click on the commands to insert them in the chat."))) .append(" on the commands!", FormatRetention.NONE).color(ChatColor.GRAY) .create()); }
ChatColor.GOLD).append("here").color( ChatColor.LIGHT_PURPLE). underlined(true).event( new ClickEvent(ClickEvent.Action.OPEN_URL, "http://www.spigotmc.org/resources/bungeetablistplus.313/")). ChatColor.GOLD).append("here").color( ChatColor.LIGHT_PURPLE). underlined(true).event( new ClickEvent(ClickEvent.Action.OPEN_URL, "http://ci.codecrafter47.dyndns.eu/job/BungeeTabListPlus/")).