Closed CyberSecGuy closed 8 years ago
Hi! I love Fanciful, and currently use it in a plugin of mine.
I'm using the following code to run a multi-lined reply, while keeping them all wrapped as 1 long line.
public FancyMessage linkNMS(Player player, String platform) { String line1 = ChatColor.STRIKETHROUGH + " " + ChatColor.RESET + " " + Main.Tag + ChatColor.RESET + " " + ChatColor.STRIKETHROUGH + " "; String line2 = "+ " + ChatColor.BLUE + "Update your URL using the command:"; String line3 = "+ " + ChatColor.GREEN + "/yt " + ChatColor.RED + platform + ChatColor.GOLD + " <your link> " + ChatColor.AQUA + "[Click Me!]"; String lb = "\n"; String cmd = ""; String tooltip = ""; if (Main.Strummer.containsKey(player.getName())) { Streamer strum = Main.Strummer.get(player.getName()); if (platform.equals("youtube")) { tooltip = "Current Link: " + strum.youtube; cmd = "/yt " + platform + " http://www.youtube.com/"; } if (platform.equals("twitch")) { tooltip = "Current Link: " + strum.twitch; cmd = "/yt " + platform + " http://www.twitch.tv/"; } if (platform.equals("twitter")) { tooltip = "Current Link: " + strum.twitter; cmd = "/yt " + platform + " http://www.twitter.com/"; } } return new FancyMessage(line1).suggest(cmd).tooltip(tooltip).then(lb).then(line2).suggest(cmd).tooltip(tooltip).then(lb).then(line3).suggest(cmd).tooltip(tooltip); }
and it works just fine.
Whoops duplicate!
Hi! I love Fanciful, and currently use it in a plugin of mine.
I'm using the following code to run a multi-lined reply, while keeping them all wrapped as 1 long line.
and it works just fine.