Fixed no confirmation message when inviting offline players

This commit is contained in:
Svenja Reissaus 2018-08-02 11:55:47 -03:00
parent d6d8031804
commit ea861d304d
1 changed files with 15 additions and 17 deletions

View File

@ -65,10 +65,8 @@ public class CmdInvite extends FCommand {
}
myFaction.invite(target);
if (!target.isOnline()) {
return;
}
// Send the invitation to the target player when online, otherwise just ignore
if (target.isOnline()) {
// Tooltips, colors, and commands only apply to the string immediately before it.
FancyMessage message = new FancyMessage(fme.describeTo(target, true))
.tooltip(TL.COMMAND_INVITE_CLICKTOJOIN.toString())
@ -81,8 +79,8 @@ public class CmdInvite extends FCommand {
.command("/" + Conf.baseCommandAliases.get(0) + " join " + myFaction.getTag());
message.send(target.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), target.describeTo(myFaction));
}