Add tooltips and commands for f invite command as specified in issue #73.
This commit is contained in:
@@ -3,6 +3,8 @@ package com.massivecraft.factions.cmd;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import mkremins.fanciful.FancyMessage;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
public class CmdInvite extends FCommand {
|
||||
|
||||
@@ -43,7 +45,17 @@ public class CmdInvite extends FCommand {
|
||||
|
||||
myFaction.invite(you);
|
||||
|
||||
you.msg("%s<i> invited you to %s", fme.describeTo(you, true), myFaction.describeTo(you));
|
||||
// Tooltips, colors, and commands only apply to the string immediately before it.
|
||||
FancyMessage message = new FancyMessage(fme.describeTo(you, true))
|
||||
.tooltip("Click to join!").command("f join " + myFaction.getTag())
|
||||
.then(" has invited you to join ").color(ChatColor.YELLOW)
|
||||
.tooltip("Click to join!").command("f join " + myFaction.getTag())
|
||||
.then(myFaction.describeTo(you))
|
||||
.tooltip("Click to join!").command("f join " + myFaction.getTag());
|
||||
|
||||
message.send(you.getPlayer());
|
||||
|
||||
//you.msg("%s<i> invited you to %s", fme.describeTo(you, true), myFaction.describeTo(you));
|
||||
myFaction.msg("%s<i> invited %s<i> to your faction.", fme.describeTo(myFaction, true), you.describeTo(myFaction));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user