Fix chat
This commit is contained in:
parent
364a6d28fa
commit
55b0e4264a
@ -179,10 +179,6 @@ public class FactionsChatListener implements Listener {
|
|||||||
|
|
||||||
// Relation Colored?
|
// Relation Colored?
|
||||||
if (Conf.chatTagRelationColored) {
|
if (Conf.chatTagRelationColored) {
|
||||||
// Messages are sent to players individually
|
|
||||||
// This still leaves a chance for other plugins to pick it up
|
|
||||||
event.setCancelled(true);
|
|
||||||
|
|
||||||
for (Player listeningPlayer : event.getRecipients()) {
|
for (Player listeningPlayer : event.getRecipients()) {
|
||||||
FPlayer you = FPlayers.getInstance().getByPlayer(listeningPlayer);
|
FPlayer you = FPlayers.getInstance().getByPlayer(listeningPlayer);
|
||||||
String yourFormat = formatStart + me.getChatTag(you).trim() + formatEnd;
|
String yourFormat = formatStart + me.getChatTag(you).trim() + formatEnd;
|
||||||
@ -197,9 +193,9 @@ public class FactionsChatListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write to the log... We will write the non colored message.
|
// Messages are sent to players individually
|
||||||
String nonColoredMsg = ChatColor.stripColor(String.format(nonColoredMsgFormat, talkingPlayer.getDisplayName(), msg));
|
// This still leaves a chance for other plugins to pick it up
|
||||||
Bukkit.getLogger().log(Level.INFO, nonColoredMsg);
|
event.getRecipients().clear();
|
||||||
}
|
}
|
||||||
// Message with no relation color.
|
// Message with no relation color.
|
||||||
event.setFormat(nonColoredMsgFormat);
|
event.setFormat(nonColoredMsgFormat);
|
||||||
|
Loading…
Reference in New Issue
Block a user