BabelChat

Moved

Total Downloads: 656 - First Release: Jun 10, 2016 - Last Update: Nov 19, 2017

5/5, 3 likes
  1. I dont know if i want that... Not that important! the color codes are from BetterChat
    Code:
      {
        "GroupName": "default",
        "Priority": 1,
        "Title": {
          "Text": "[Player]",
          "Color": "#55aaff",
          "Size": 14,
          "Hidden": true,
          "HiddenIfNotPrimary": false
        },
        "Username": {
          "Color": "#55aaff",
          "Size": 14
        },
        "Message": {
          "Color": "white",
          "Size": 14
        },
        "Format": {
          "Chat": "{Title} {Username}: {Message}",
          "Console": "{Title} {Username}: {Message}"
        }
      },
     
    Last edited by a moderator: Dec 15, 2017
  2. I had to disable BetterChat and lost the tags then.
     
  3. Wulf

    Wulf Community Admin

    I'll look into a proper fix once I have some time.
     
  4. @Wulf I changed OnUserChat() to use the BetterChat hook... it works really good on my server right now. It's probably my favorite plugin!


    Code:
    private object OnBetterChat(Dictionary<string, object> data)
            {
               
                var player = (IPlayer)data["Player"];            foreach (var target in players.Connected)
                {                Action<string> callback = response =>
                    {
                        if ((string)data["Text"] != response)
                          SendMessage(target, (IPlayer)data["Player"], response);
                    };
                    Translate((string)data["Text"], target.Id, player.Id, callback);
                }            return data;
            }
    I'm not even sure if the typecasting is necessary, but it works. I might've edited some other parts a little, but that fix was a big one for me. I tried to post the full code, but I guess that is against the rules? In any case, thank you for the wonderful plugin! :D
     
  5. Wulf

    Wulf Community Admin

    It has used that in the past, but it doesn't use it right now as it needs to work with other plugins and not just BetterChat.
     

  6. I get this if I use your code: Error while compiling: BabelChat.cs(110,37): error CS0246: The type or namespace name `Dictionary' could not be found.
     
  7. Any progress on how to combine BetterChat and BabelChat.