mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 05:06:45 +01:00
Fixed bug where party chat broke if the display name contained special characters
Fixes #1676
This commit is contained in:
parent
7a08343304
commit
c9f1f8f662
@ -23,7 +23,8 @@ Version 1.4.08-dev
|
|||||||
= Fixed bug which prevented players from gaining Acrobatics XP when the setting 'Prevent_XP_After_Teleport' was set to false
|
= Fixed bug which prevented players from gaining Acrobatics XP when the setting 'Prevent_XP_After_Teleport' was set to false
|
||||||
= Fixed bug where cooldown donor perks were reducing more than expected
|
= Fixed bug where cooldown donor perks were reducing more than expected
|
||||||
= Fixed bug where disabling hardcore mode for specific skills didn't work
|
= Fixed bug where disabling hardcore mode for specific skills didn't work
|
||||||
= Fixed bug which caused the backup cleanup to delete old backups while it should've kept those
|
= Fixed bug which caused the backup cleanup to delete old backups while it should have kept those
|
||||||
|
= Fixed bug where party chat broke if the display name contained special characters
|
||||||
! Updated localization files
|
! Updated localization files
|
||||||
! Changed AxesCritical to CriticalHit in config file
|
! Changed AxesCritical to CriticalHit in config file
|
||||||
! Changed several secondary ability permissions(deprecated versions still exist)
|
! Changed several secondary ability permissions(deprecated versions still exist)
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package com.gmail.nossr50.chat;
|
package com.gmail.nossr50.chat;
|
||||||
|
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
@ -27,7 +29,7 @@ public class PartyChatManager extends ChatManager {
|
|||||||
@Override
|
@Override
|
||||||
protected void sendMessage() {
|
protected void sendMessage() {
|
||||||
if (Config.getInstance().getPartyChatColorLeaderName() && senderName.equalsIgnoreCase(party.getLeader())) {
|
if (Config.getInstance().getPartyChatColorLeaderName() && senderName.equalsIgnoreCase(party.getLeader())) {
|
||||||
message = message.replaceFirst(displayName, ChatColor.GOLD + displayName + ChatColor.RESET);
|
message = message.replaceFirst(Pattern.quote(displayName), ChatColor.GOLD + Pattern.quote(displayName) + ChatColor.RESET);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Player member : party.getOnlineMembers()) {
|
for (Player member : party.getOnlineMembers()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user