Add tooltips and click commands to f deinvite.
This commit is contained in:
parent
03b8f11646
commit
2aa7d7f98d
@ -34,7 +34,7 @@ public class CmdMod extends FCommand {
|
||||
String s = player.getName();
|
||||
msg.then(s + " ").color(ChatColor.WHITE).tooltip("Click to promote " + s).command("f mod " + s);
|
||||
}
|
||||
|
||||
|
||||
sendFancyMessage(msg);
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,8 @@ package com.massivecraft.factions.cmd;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.FPlayers;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import mkremins.fanciful.FancyMessage;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
public class CmdShowInvites extends FCommand {
|
||||
|
||||
@ -17,11 +19,17 @@ public class CmdShowInvites extends FCommand {
|
||||
|
||||
@Override
|
||||
public void perform() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
FancyMessage msg = new FancyMessage("Players with pending invites: ").color(ChatColor.GOLD);
|
||||
for (String id : myFaction.getInvites()) {
|
||||
FPlayer fp = FPlayers.getInstance().getById(id);
|
||||
sb.append(fp != null ? fp.getName() : id).append(" ");
|
||||
String name = fp != null ? fp.getName() : id;
|
||||
msg.then(name + " ").color(ChatColor.WHITE).tooltip("Click to revoke invite for " + name).command("f deinvite " + name);
|
||||
}
|
||||
msg("<a>Players with pending invites: <i> %s", sb.toString().trim());
|
||||
|
||||
sendFancyMessage(msg);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user