From 69765e472cd6cb8209f98db7443ab66bc343a39c Mon Sep 17 00:00:00 2001 From: CanardConfit Date: Tue, 14 Apr 2020 01:01:05 +0200 Subject: [PATCH] Fix issue #84 --- .../java/com/massivecraft/factions/cmd/CmdInvite.java | 11 ++++------- .../java/com/massivecraft/factions/zcore/util/TL.java | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdInvite.java b/src/main/java/com/massivecraft/factions/cmd/CmdInvite.java index e27a0444..f6656197 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdInvite.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdInvite.java @@ -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()); } diff --git a/src/main/java/com/massivecraft/factions/zcore/util/TL.java b/src/main/java/com/massivecraft/factions/zcore/util/TL.java index 5b07bd12..9b8b4262 100644 --- a/src/main/java/com/massivecraft/factions/zcore/util/TL.java +++ b/src/main/java/com/massivecraft/factions/zcore/util/TL.java @@ -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."),