Merge pull request #92 from CanardConfit/1.6.x

Fix issue #84
This commit is contained in:
Driftay 2020-04-13 20:26:17 -04:00 committed by GitHub
commit 03886aa84e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 8 deletions

View File

@ -60,14 +60,11 @@ public class CmdInvite extends FCommand {
// 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(context.fPlayer.describeTo(target, true))
FancyMessage message = new FancyMessage(TL.COMMAND_INVITE_INVITEDYOU.toString()
.replace("%1$s", context.fPlayer.describeTo(target, true))
.replace("%2$s", context.faction.getTag())
.replaceAll("&", "§"))
.tooltip(TL.COMMAND_INVITE_CLICKTOJOIN.toString())
.command("/" + Conf.baseCommandAliases.get(0) + " join " + context.faction.getTag())
.then(TL.COMMAND_INVITE_INVITEDYOU.toString())
.color(ChatColor.YELLOW)
.tooltip(TL.COMMAND_INVITE_CLICKTOJOIN.toString())
.command("/" + Conf.baseCommandAliases.get(0) + " join " + context.faction.getTag())
.then(context.faction.describeTo(target)).tooltip(TL.COMMAND_INVITE_CLICKTOJOIN.toString())
.command("/" + Conf.baseCommandAliases.get(0) + " join " + context.faction.getTag());
message.send(target.getPlayer());
}

View File

@ -470,7 +470,7 @@ public enum TL {
COMMAND_INVITE_TOINVITE("to invite someone"),
COMMAND_INVITE_FORINVITE("for inviting someone"),
COMMAND_INVITE_CLICKTOJOIN("Click to join!"),
COMMAND_INVITE_INVITEDYOU(" &chas invited you to join "),
COMMAND_INVITE_INVITEDYOU("&l[!]&7 &c%1$s&7 has invited you to join &c%2$s&7"),
COMMAND_INVITE_INVITED("&c&l[!]&7 &c%1$s&7 invited &c%2$s&7 to your faction."),
COMMAND_ALTINVITE_INVITED_ALT("&c&l[!]&7 &c%1$s&7 invited &c%2$s&7 to your faction as an alt."),