Add tooltips and ability to click to warp when you list faction warps.
This commit is contained in:
parent
c4f4036e1d
commit
656dc90b33
@ -4,6 +4,8 @@ import com.massivecraft.factions.FPlayer;
|
|||||||
import com.massivecraft.factions.P;
|
import com.massivecraft.factions.P;
|
||||||
import com.massivecraft.factions.integration.Econ;
|
import com.massivecraft.factions.integration.Econ;
|
||||||
import com.massivecraft.factions.struct.Permission;
|
import com.massivecraft.factions.struct.Permission;
|
||||||
|
import mkremins.fanciful.FancyMessage;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
|
||||||
public class CmdFWarp extends FCommand {
|
public class CmdFWarp extends FCommand {
|
||||||
|
|
||||||
@ -22,11 +24,11 @@ public class CmdFWarp extends FCommand {
|
|||||||
public void perform() {
|
public void perform() {
|
||||||
//TODO: check if in combat.
|
//TODO: check if in combat.
|
||||||
if (args.size() == 0) {
|
if (args.size() == 0) {
|
||||||
StringBuilder sb = new StringBuilder();
|
FancyMessage msg = new FancyMessage("Warps: ").color(ChatColor.GOLD);
|
||||||
for (String s : myFaction.getWarps().keySet()) {
|
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) {
|
} else if (args.size() > 1) {
|
||||||
fme.msg("<i>/f warp <warpname>");
|
fme.msg("<i>/f warp <warpname>");
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user