Revert "Remove Fanciful, fix compilation (part 1/2)"

This reverts commit fc1d08e507.
We have users on builds before this was included in Spigot. We don't want to break those servers.
This commit is contained in:
drtshock
2015-05-25 15:46:18 -05:00
parent 1481d604d4
commit de57060819
11 changed files with 132 additions and 170 deletions

View File

@@ -5,10 +5,8 @@ import com.massivecraft.factions.FPlayer;
import com.massivecraft.factions.FPlayers;
import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.zcore.util.TL;
import net.md_5.bungee.api.chat.BaseComponent;
import net.md_5.bungee.api.chat.ClickEvent;
import net.md_5.bungee.api.chat.HoverEvent;
import net.md_5.bungee.api.chat.TextComponent;
import mkremins.fanciful.FancyMessage;
import org.bukkit.ChatColor;
public class CmdShowInvites extends FCommand {
@@ -23,19 +21,14 @@ public class CmdShowInvites extends FCommand {
@Override
public void perform() {
TextComponent component = new TextComponent(TL.COMMAND_SHOWINVITES_PENDING.toString());
component.setColor(net.md_5.bungee.api.ChatColor.GOLD);
FancyMessage msg = new FancyMessage(TL.COMMAND_SHOWINVITES_PENDING.toString()).color(ChatColor.GOLD);
for (String id : myFaction.getInvites()) {
FPlayer fp = FPlayers.getInstance().getById(id);
String name = fp != null ? fp.getName() : id;
TextComponent then = new TextComponent(name + " ");
then.setColor(net.md_5.bungee.api.ChatColor.WHITE);
then.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new BaseComponent[]{new TextComponent(TL.COMMAND_SHOWINVITES_CLICKTOREVOKE.format(name))}));
then.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, Conf.baseCommandAliases.get(0) + " deinvite " + name));
component.addExtra(then);
msg.then(name + " ").color(ChatColor.WHITE).tooltip(TL.COMMAND_SHOWINVITES_CLICKTOREVOKE.format(name)).command(Conf.baseCommandAliases.get(0) + " deinvite " + name);
}
fme.getPlayer().spigot().sendMessage(component);
sendFancyMessage(msg);
}
@Override