Add tooltips and ability to click to warp when you list faction warps.

This commit is contained in:
drtshock 2014-11-14 09:46:28 -06:00
parent c4f4036e1d
commit 656dc90b33
1 changed files with 5 additions and 3 deletions

View File

@ -4,6 +4,8 @@ import com.massivecraft.factions.FPlayer;
import com.massivecraft.factions.P;
import com.massivecraft.factions.integration.Econ;
import com.massivecraft.factions.struct.Permission;
import mkremins.fanciful.FancyMessage;
import org.bukkit.ChatColor;
public class CmdFWarp extends FCommand {
@ -22,11 +24,11 @@ public class CmdFWarp extends FCommand {
public void perform() {
//TODO: check if in combat.
if (args.size() == 0) {
StringBuilder sb = new StringBuilder();
FancyMessage msg = new FancyMessage("Warps: ").color(ChatColor.GOLD);
for (String s : myFaction.getWarps().keySet()) {
sb.append(s + " ");
msg.then(s + " ").tooltip("Click to warp!").command("f warp " + s).color(ChatColor.WHITE);
}
fme.msg("<i>Warps: <a>" + sb.toString().trim());
sendFancyMessage(msg);
} else if (args.size() > 1) {
fme.msg("<i>/f warp <warpname>");
} else {