|
12 | 12 | import dev.kitteh.factions.plugin.AbstractFactionsPlugin; |
13 | 13 | import dev.kitteh.factions.tagresolver.FPlayerResolver; |
14 | 14 | import dev.kitteh.factions.tagresolver.FactionResolver; |
15 | | -import dev.kitteh.factions.util.TL; |
| 15 | +import dev.kitteh.factions.util.Mini; |
16 | 16 | import dev.kitteh.factions.util.TextUtil; |
17 | 17 | import dev.kitteh.factions.util.WorldUtil; |
18 | 18 | import net.kyori.adventure.text.Component; |
@@ -135,7 +135,7 @@ public void onPlayerChat(AsyncPlayerChatEvent event) { |
135 | 135 | if (!chatConf.getTagReplaceString().isEmpty() && eventFormat.contains(chatConf.getTagReplaceString())) { |
136 | 136 | // we're using the "replace" method of inserting the faction tags |
137 | 137 | if (eventFormat.contains("[FACTION_TITLE]")) { |
138 | | - eventFormat = eventFormat.replace("[FACTION_TITLE]", me.titleLegacy()); |
| 138 | + eventFormat = eventFormat.replace("[FACTION_TITLE]", Mini.toLegacy(me.title())); |
139 | 139 | } |
140 | 140 | InsertIndex = eventFormat.indexOf(chatConf.getTagReplaceString()); |
141 | 141 | eventFormat = eventFormat.replace(chatConf.getTagReplaceString(), ""); |
@@ -183,10 +183,14 @@ public void onPlayerChat(AsyncPlayerChatEvent event) { |
183 | 183 | } |
184 | 184 |
|
185 | 185 | private String chatTagLegacy(FPlayer me) { |
186 | | - return me.hasFaction() ? String.format(FactionsPlugin.instance().conf().factions().chat().spigot().getTagFormat(), me.role().getPrefix() + (me.hasFaction() ? me.faction().tag() : "")) : TL.NOFACTION_PREFIX.toString(); |
| 186 | + return me.hasFaction() ? |
| 187 | + String.format(FactionsPlugin.instance().conf().factions().chat().spigot().getTagFormat(), me.role().getPrefix() + (me.hasFaction() ? me.faction().tag() : "")) : |
| 188 | + FactionsPlugin.instance().conf().factions().chat().spigot().getTagNoFaction(); |
187 | 189 | } |
188 | 190 |
|
189 | 191 | private String chatTagLegacy(FPlayer me, FPlayer participator) { |
190 | | - return me.hasFaction() ? TextUtil.getLegacyString(me.relationTo(participator).color()) + chatTagLegacy(me) : TL.NOFACTION_PREFIX.toString(); |
| 192 | + return me.hasFaction() ? |
| 193 | + TextUtil.getLegacyString(me.relationTo(participator).color()) + chatTagLegacy(me) : |
| 194 | + FactionsPlugin.instance().conf().factions().chat().spigot().getTagNoFaction(); |
191 | 195 | } |
192 | 196 | } |
0 commit comments