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

@@ -4,7 +4,8 @@ import com.massivecraft.factions.Conf;
import com.massivecraft.factions.FPlayer;
import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.zcore.util.TL;
import net.md_5.bungee.api.chat.*;
import mkremins.fanciful.FancyMessage;
import org.bukkit.ChatColor;
public class CmdInvite extends FCommand {
@@ -49,13 +50,9 @@ public class CmdInvite extends FCommand {
}
// Tooltips, colors, and commands only apply to the string immediately before it.
TextComponent component = new TextComponent(fme.describeTo(you, true));
component.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new BaseComponent[]{new TextComponent(TL.COMMAND_INVITE_CLICKTOJOIN.toString())}));
component.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, Conf.baseCommandAliases.get(0) + " join " + myFaction.getTag()));
component.addExtra(new ComponentBuilder(TL.COMMAND_INVITE_INVITEDYOU.toString()).color(net.md_5.bungee.api.ChatColor.YELLOW).create()[0]);
component.addExtra(new ComponentBuilder(myFaction.describeTo(you)).color(net.md_5.bungee.api.ChatColor.YELLOW).create()[0]);
FancyMessage message = new FancyMessage(fme.describeTo(you, true)).tooltip(TL.COMMAND_INVITE_CLICKTOJOIN.toString()).command(Conf.baseCommandAliases.get(0) + " join " + myFaction.getTag()).then(TL.COMMAND_INVITE_INVITEDYOU.toString()).color(ChatColor.YELLOW).tooltip(TL.COMMAND_INVITE_CLICKTOJOIN.toString()).command(Conf.baseCommandAliases.get(0) + " join " + myFaction.getTag()).then(myFaction.describeTo(you)).tooltip(TL.COMMAND_INVITE_CLICKTOJOIN.toString()).command(Conf.baseCommandAliases.get(0) + " join " + myFaction.getTag());
you.getPlayer().spigot().sendMessage(component);
message.send(you.getPlayer());
//you.msg("%s<i> invited you to %s", fme.describeTo(you, true), myFaction.describeTo(you));
myFaction.msg(TL.COMMAND_INVITE_INVITED, fme.describeTo(myFaction, true), you.describeTo(myFaction));