Changed a List to reset each time its registered to prevent stats copying to the next game, automatic string escaping, party colour name changed to original colour
This commit is contained in:
parent
b9d44d9a24
commit
40d913beaf
@ -35,20 +35,22 @@ import nautilus.game.arcade.game.Game.GameState;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.managers.chat.ChatStatData;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.json.simple.JSONObject;
|
||||
import org.jooq.tools.json.JSONObject;
|
||||
|
||||
public class GameChatManager implements Listener
|
||||
{
|
||||
|
||||
private ArcadeManager _manager;
|
||||
|
||||
private LinkedList<ChatStatData> _chatStats = new LinkedList<ChatStatData>();
|
||||
private LinkedList<ChatStatData> _chatStats;
|
||||
|
||||
public GameChatManager(ArcadeManager manager)
|
||||
{
|
||||
_manager = manager;
|
||||
|
||||
_manager.getPluginManager().registerEvents(this, _manager.getPlugin());
|
||||
|
||||
_chatStats = new LinkedList<ChatStatData>();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -144,8 +146,8 @@ public class GameChatManager implements Listener
|
||||
event.setFormat(levelStr + C.cDPurple + C.Bold + "Party " + C.cWhite + C.Bold + senderName + " " + C.cPurple + "%2$s");
|
||||
|
||||
format = event.getFormat().split(sender.getName())[0];
|
||||
name = _manager.GetColor(sender) + sender.getName();
|
||||
message = event.getFormat().split(sender.getName())[1].replace("%2$s", "") + JSONObject.escape(event.getMessage());
|
||||
name = C.cWhite + C.Bold + sender.getName() + C.Reset;
|
||||
message = event.getFormat().split(sender.getName())[1].replace("%2$s", "") + JSONObject.escape(_manager.GetChat().getFilteredMessage(sender, event.getMessage()));
|
||||
|
||||
if(!_manager.GetGame().IsLive())
|
||||
{
|
||||
@ -195,7 +197,7 @@ public class GameChatManager implements Listener
|
||||
name = _manager.GetColor(sender) + sender.getName();
|
||||
}
|
||||
|
||||
message = event.getFormat().split(sender.getName())[1].replace("%2$s", "") + JSONObject.escape(event.getMessage());
|
||||
message = event.getFormat().split(sender.getName())[1].replace("%2$s", "") + JSONObject.escape(_manager.GetChat().getFilteredMessage(sender, event.getMessage()));
|
||||
}
|
||||
|
||||
if (globalMessage)
|
||||
|
Loading…
Reference in New Issue
Block a user