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

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