Inactive [CHAT] iChat 2.4.4 - Custom Chat Formatting [1337]

Discussion in 'Inactive/Unsupported Plugins' started by Drakia, Feb 24, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Drakia

    iChat 2.x - Custom Chat Formatting
    Version: 2.4.4
    CraftBukkit: 1337

    Plugin Support:
    PermissionsBukkit
    bPermissions
    Permissions 2.x
    Permissions 3.x

    If you are requesting help, post your entire server log (From the time it opens, until somebody talks), your entire Permission config file (As well as what it's named), and iChat config files. This information is REQUIRED for me to help you.
    http://pastebin.com/ <-- Post configs there when asking for help

    =============
    Description
    =============
    Custom chat formatting.
    Based on the idea of iChat v1.5 by Nijikokun.
    Includes code and concepts from mChat by MiracleM4n <https://github.com/MiracleM4n/mChat/>

    Before downloading: iChat 2.4.x has quite a few changes over the 2.3.x branches. All permissions plugins are handled in one plugin, and they all operate in relatively the same way now. This means you WILL need to redo your configs.
    Download (Direct JAR): http://thedgtl.net/bukkit/iChat.jar
    Source: https://github.com/TheDgtl/iChat

    =============
    Features
    =============
    Supports Permissions (Both 2.0 and 2.1), and SuperPerms handlers (PermissionsBukkit, bPermissions, and PermissionsEx).
    Allows you to specify a prefix/suffix/variable for users and groups on a per-world or global basis.
    A user-specific prefix/suffix/variable will take priority over a group prefix/suffix/variable, a world-based prefix/suffix/variable will take priority over a global prefix/suffix/variable.
    Unlimited amount of custom variables for use in chat format.
    Colors are supported in all parts of the formatting and chat text.
    Usable health bar and health amount in the formatting.
    Support for formatting of /me

    =============
    Formatting
    =============
    Message formatting is defined in the file plugins/iChat/config.yml
    The message formats can contain characters, color codes, and variables.
    To use colors use the standard Minecraft color codes found here: http://www.minecraftwiki.net/wiki/Classic_Server_Protocol#Color_Codes

    Available variables:
    +prefix - The prefix for this user, or this users group if they don't have one defined.
    +suffix - The suffix for this user, or this users group if they don't have one defined.
    +name - The users name
    +displayname - The users display name (Set by plugins such as Towny)
    +iname - The iChat formatted player name (Defined by iname-format)
    +group - The users group
    +healthbar - A visual health bar for this user
    +health - The users current health value (Between 0 and 20)
    +message - The message the player typed
    +world - What world the player is currently in
    +time - Timestamp, configurable in config.yml. Uses the format for SimpleDateFormat - http://bit.ly/dscw40

    Example (Default):
    Code:
    iname-format: '[+prefix+group+suffix&f] +displayname'
    message-format: '+iname: +message'
    me-format: '* +name +message'
    date-format: 'HH:mm:ss'
    handle-me: true
    Example date-format (Default):
    date-format: 'HH:mm:ss'

    As of iChat 2.4.0 there have been a few changes in the way variables and groups are handled.

    ==========
    Groups
    ==========
    As of iChat 2.4.3 native groups are supported in Permissions 2.x/3.x, PermissionsBukkit, bPermissions, and PermissionsEx.

    ==========
    Variables
    ==========
    Variables are now defined in variables.yml in the iChat directory. This includes prefixes, suffixes, and custom variables.
    You can define an unlimited number of custom variables for groups and users, if these variables contain the static variables such as +prefix,
    +suffix, +health, etc then those variables will be replaced with their respective values.
    If a variable does not exist then it will be replaced with a blank string.

    As of iChat 2.4.4 you can now specify world-specific variables. To specify a per-world group or user variable (Prefix, suffix, or variable) you just specify it under the world as shown in the 'world' example in the default variables.yml below. Anything specified in the parent 'users' or 'groups' nodes will be considered global for all worlds.

    Default variables.yml:
    ---------------------
    Code:
    # iChat Variable Config
    # This is now the only method for defining variables
    users:
        Drakia:
            prefix: '&e'
    groups:
        Admin:
            prefix: '&c'
            suffix: ''
        Default:
            prefix: ''
            suffix: ''
    world:
      users:
        Drakia:
          prefix: '&a'
    Default config.yml:
    ---------------------
    Code:
    handle-me: true
    date-format: HH:mm:ss
    message-format: '+iname: +message'
    me-format: '* +name +message'
    iname-format: '[+prefix+group+suffix&f] +displayname'
    =============
    Examples
    =============
    To make a group colored:
    variables.yml:
    Code:
    groups:
        Default:
            prefix: '&4'
            suffix: ''
    config.yml:
    Code:
    message-format: '[+prefix+group&f] +name: +message'
    To make a single username colored:
    variables.yml:
    Code:
    users:
        Drakia:
            prefix: ''
            suffix: '&1'
    Config:
    Code:
    message-format: '[+prefix+group&f] +suffix+name&f: +message'
    As you can see, suffixes and prefixes can be used anywhere, in any combination. In this example we use prefix as a method for coloring group names, while suffix is used to color individual users. On our server we have prefixes such as "&f[&2Mod&f] " so that we can have custom tags per group instead of just the groups name. There is no end to the combination of things you can do, please TRY things before you come asking for someone else to do it for you. There are too many combinations of things for me to answer every question about how to color specific things.
    I will not be offering answers to questions such as "How do I color names?" or really anything else to do with specifics of formatting. It's pretty straightforward what you can do, and if you can't take the time to experiment then I'm not going to take the time to answer your questions.

    =============
    Configuration
    =============
    iname-format - The format used for +iname (Default: '[+prefix+group+suffix&f] +displayname')
    message-format - The format used for basic chat (Default: '+iname: +message')
    date-format - The format used for +date (Default: 'HH:mm:ss')
    me-format - The format used for /me commands (Default: '* +name +message')
    handle-me - Whether to handle /me commands (Default: true)

    =============
    Permissions
    =============
    ichat.color - Allow this group/user to use color in their chat messages.
    ichat.reload - Allow this group/user to use "/ichat reload"

    =============
    Commands
    =============
    /ichat reload - Reload the iChat config file

    =============
    F.A.Q.
    =============
    Q) Why is my custom message format not working? I just get the default output. Or output with no variables filled in.
    A) If you're using Permissions 2.1, make sure your Permissions config file is named "{worldname}.yml" where {worldname} is the name of your world. If you're using Permissions 2.0, make sure your Permissions config is named config.yml

    Q) How do I set the brackets color to the same as the group?
    A) Normally you have the brackets in the message-format variable, but you can just as easily move them into prefix/suffix and that way they can be per-group colored!

    Q) Why is my entire string colored? I just put a color code beside +name!
    A) A color code will persists until another color code is encountered, or the end of the line is reached. To change the line back to white use &f after the variable/string you want colored.

    Q) Why are my OPs names red?
    A) Essentials has this functionality built in. Change "ops-name-color" to 'none' in your Essentials config file.

    Q) Why does {PluginX} not work with iChat?
    A) There's a good chance it does, but you need to use +displayname instead of +name.

    Q) Why does Towny not work with iChat?
    A) iChat no longer uses %1$s for the player name, it uses player.getName() and player.getDisplayName(), until such a time that Towny is updated to use the proper method of setting a players name (Set their displayName) it will not work with iChat.

    =============
    Changes
    =============
    [Version 2.4.4]
    - Updated to new FileConfiguration class
    - Fixed bypass exploit for colors in messages
    - Multi-world support for variables.yml
    - Resolved an issue with /me not reloading player variables
    [Version 2.4.3]
    - Permissions overhaul. No longer require group.{name} node unless not using a permissions handler
    [Version 2.4.2]
    - Fixed issue with inheritance in Permissions
    - Implemented start of online time variable. Need output format.
    [Version 2.4.1]
    - Remove plugin-specific group referencing. All groups are now managed via group.* nodes,
    the exception being pure Permissions 2.x/3.x
    - Fixed /ichat reload not reloading variables.yml
    - Updated /me to use BroadcastMessage
    [Version 2.4.0-final]
    - Took out variable caching, there's no hook for PermissionChange.
    - Updated README to include info on group.* nodes
    [Version 2.4.0-beta]
    - Merged all branches into one
    - Supports Perms 2.x/3.x, SuperPerms, GroupManager
    - Added a more advanded API based on the mChat API
    - Massive thanks to MiracleM4n for code and concepts
    - All variables are now retrieved from variables.yml instead of Permissions
    - Removed censor code
    [Version 2.3.2-p3]
    - Set Permissions as a dependency in plugin.yml
    - Added Permissions 3 support to the -p3 jar
    [Version 2.3.1]
    - Added iChat.ichat.parseChat(Player, String, Format) API
    - Added hook for /me chat formatting using the "me-format" config option
    [Version 2.3.0]
    - Added external iChat.ichat.parseChat(Player, String) API
    [Version 2.2.3]
    - Added +displayname/+d for player.getDisplayName()
    [Version 2.2.2]
    - Updated to latest RB
    [Version 2.2.1]
    - Updated how Permissions is loaded
    [Version 2.2.0]
    - Added the ability to have an unlimited amount of variables in message-format
    - Changed versioning scheme
    [Version 2.11]
    - Now uses per-world permissions information
    [Version 2.10]
    - Allow admins to enable color on a permissions basis
    [Version 2.09]
    - Another small update to Permissions (Returned false when I should have returned true)
    [Version 2.08]
    - Pushes PacketCollisions PermVersion change. Fixes issues with 2.5.2
    [Version 2.07]
    - Added +time tag
    [Version 2.06]
    - Added +world tag
    [Version 2.05]
    - Ignore whether the plugin is GM, just treat everything as Permissions! Means you need FakePermissions.
    [Version 2.04]
    - Added the ability to use variables in the suffix and prefix (More customizeable messages)
    [Version 2.03]
    - Verify that all available variables aren't null before calling parse
    - Fixed crash caused by color code at end of message (Basic fix, added a space)
    [Version 2.02]
    - Fix for possible NPE
    [Version 2.01]
    - There's a bug in Permissions 2.1 in getPermissionString, switched to getUserPermissionString
    [Version 2.00]
    - Initial re-write of Niji's plugin.
    - Added Permissions 2.0/2.1, and GroupManager support.[/b]
     
    FFS2309, Lolmewn, wassilij and 12 others like this.
  2. Offline

    Puremin0rez

    Is the censor system ever going to be improved? I really hate how putting ! after censored words and stuff like that just makes them not censor...
     
  3. Offline

    Drakia

    There's no way to "improve" it without censoring words such as assassin, or brass. If you want to go and write a new one feel free and I'll add it.

    As for colored names, or groups, or whatever, just use a fancy combination of +suffix, +prefix and message-format.
     
  4. Offline

    Thenaz

    Thanks awesome plugin btw!

    But could you post a way to do colored names its confusing me [​IMG]
    I want it so certain peoples names are certain colors I don't want all the players names to be the same colors is there a way?
     
  5. Offline

    woodzy

    i know this has been coverd befor but i just cant get it =(
    in trying to have my diffrent gropes have there grope name and there color.
    but all i get is the hp-bar(green-want red) grope name(white-want diffrent) myname(white) and the message(white)
    come out. as u can see i have it set up to diffrent ways and nether is working. any ideas?

    http://pastebin.com/en4ff8Kj

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 10, 2016
  6. Offline

    Drakia

    I have edited the first post with a few basic examples of coloring things such as groups and users. I will not be offering support for figuring out a specific format unless it is extremely advanced, as there are too many combinations, and 90% of what people are asking is so basic that if they had spent any time even trying they would have figured it out.
    If you can't take the time to try and figure it out yourself, I won't take the time to help you.
     
  7. Offline

    awesom03

    Having a problem, after downloading the plugin and restarting the server the config file is nowhere to be seen. What's going on?
     
  8. Offline

    woodzy

    i spent 3 hours on it..... but reading ur now posting now, ok got that working!!! but how do i change the players name per grope to a diffrent color and there message per grope to a diffrent color? i got the grope name to change per grope.
     
  9. Offline

    Drakia

    It's along the same lines, you can only have two "variables" in the format, prefix and postfix, but you can do something like this:
    prefix: '&f[&4+group&f]&6'
    suffix: '&5'
    than have the message format as:
    message-format: '+prefix +name: +suffix+message'

    However this is far more complicated, since you can only have two variables. EVERY group would require a prefix that includes their group, since the group is no longer in the message format. This would set the group color to &4, the username to &6, and the message color to &5.
    Again, this is something you can easily come up with if you look over the examples and try things out. It's basic variable replacement.
     
  10. Offline

    thegodsend

    Hey so I've been trying this out and i cant get it the way i want. I have 5 groups i need to have all separate colors for. The closest i can get is it looking like this
    [Admins]TheGodSend: Hey (this is white of coarse)
    When i just want it to look like this:
    TheGodSend: Hey

    Heres my codes
    Permissions
    Code:
        Admins:
            default: false
            info:
                prefix: '&c[Admins]&c'
                suffix: ''
                build: true
            inheritance:
            permissions:
                - '*'
    iChat
    Code:
    censor-list: []
    censor-color: '&f'
    date-format: HH:mm:ss
    message-format: '+prefix+name+suffix: +message'
    censor-char: '*'
    censor-string-color: '&f'
    censor-colored: false
    I went through like 4 pages trying all sorts of things but never to the way wanted. I cant use essentials due to that and nethergate not playing well.
     
  11. Offline

    Drakia

    ... Your prefix is set to '&c[Admins]&c' and you can't figure out why '+prefix+name+suffix: +message' adds a red '[Admins]' before your name...?
    A) Your prefix has [Admins] in it
    B) Color codes are from that point onward, to set it back to white use &f (There's a link in the first post to color codes)
    C) I'm pretty sure I explained this exact situation in my first post.

    All of the stuff you're asking about is answered IN THE FIRST POST
     
  12. Offline

    xMasterPiecesx

    Hey

    I got a problem with iChat. I want to set a prefix, but the only thing it sets is: [] xMasterPiecesx:
    My codes are this:

    Permissions:

    Code:
            Admins:
                default: false
                info:
                    prefix: '&6Founder'
                    suffix: ''
                    build: true
                inheritance:
                permissions:
                    - '*'
        users:
            xMasterPiecesx:
                group: Admins
                info:
                    prefix: ''
                    suffix: ''
                permissions: 
    iChat:

    Code:
    censor-list: []
    censor-color: '&f'
    date-format: HH:mm:ss
    message-format: '[+prefix+group&f] +name: +message'
    censor-char: '*'
    censor-string-color: '&f'
    censor-colored: false

    I tried to fix it and I tried hundreds of things, but I still get nothing. I think iChat isn't corresponding with Permissions.
     
  13. Offline

    Drakia

    What plugin are you using for permissions? Do your permissions work for other things such as commands in other plugins?
     
  14. Offline

    xMasterPiecesx

    I use Essentials and Lockette with Permissions and those two plugins are just working
     
  15. Offline

    Drakia

    What version of Permissions?
     
  16. Offline

    thegodsend

    A) Take a midol
    B) I know this is hard for you to wrap your head around but not everyone has been using coding for years. Some people ARE NEW to this.
    C) Chill.
     
  17. Offline

    Drakia

    I take that as you fixed your problem by actually reading then?

    And before doing something such as calling me a jerk, I've never claimed not to be one, I've actually stated many times on these forums that I am rude, I am harsh, and I am a jerk.
    But that's how I deal with people who can't bother to read how to use things, who expect to be spoon-fed throughout the entire process of setting up a server.

    It's really not that hard to comprehend how the message format will turn out. +prefix is replaced with whatever is in the prefix: line of your permissions, +suffix is the same for suffix: +name is, wait for it, the players name. &[0-9a-f] is replaced with the respective color code. The other + variables are replaced as their respective information. There are an infinite number of message format/prefix/suffix combinations you can use to get things how you want. You just need to be able to grasp basic search/replace.
     
  18. Offline

    monir

    i cant find wiki or any commands where do i find it?
     
  19. Offline

    Drakia

    There is no wiki, everything is documented in the first post.
     
  20. Offline

    thegodsend

    Sorry I'm trying to learn through example rather than make my players suffer through more trail and error while i learn this. I can't just read something and know exactly how to do it. You didn't when it came to learning how to make your addon or anything else. And no, i didn't get it exactly how i wanted it but its close enough. Have fun with life being a jerk. Your not gonna like it.
     
  21. Offline

    Drakia

    Actually I did learn all of my programming skill via reading/trial and error, nice try with that one though ;)
    There are plenty of examples throughout this topic, if you would have bothered to look through it.
     
  22. Offline

    xMasterPiecesx

    I use Permissions 2.5.4
     
  23. Offline

    Drakia

    Oh jeeze, I see your problem. You have a prefix and suffix defined for your user, you need to delete those two lines, as they are overwriting your group prefix/suffix. One thing I can't figure out though is you have +group in there, but it's not being replaced with the group.
     
  24. Offline

    marktech

    I get this. The plugins I have installed that I think interfere with the chat is EssetialsChat.

    Screen shot 2011-03-20 at 12.42.40 PM.png
     
  25. Offline

    Drakia

    @marktech Yes, you're using two different chat formatting plugins.
     
  26. Offline

    marktech

    Would there be any way for me to use both of them at the same time? Thanks.
     
  27. Offline

    Drakia

    Umm... Why exactly would you want to use both? As you can see, running both causes things like that to happen...
     
  28. Offline

    cyborax

    I like this pluging.
    good work Drakia!
     
  29. Offline

    angus22397

    I love this plugin, but i want my name to be seperate colour from my writing, but when i set it to do so it colours both. when you respond to this message make sure I'm quoted so bukkit will tell me when you respond.

    censor-list: []
    censor-color: '&f'
    date-format: HH:mm:ss
    message-format: '[+prefix+group+suffix&f] &b+name: +message'
    censor-char: '*'
    censor-string-color: '&f'
    censor-colored: false
     
  30. Offline

    Darcion

    i have a small bug... i see every time the worldname in my messages, whithout the +world config. i dont wand to see it.
     
  31. Offline

    Drakia

    As stated in the first post, color codes are from the point forward. Just put a &f after +name

    @Darcion And you're not going to get any help unless you go read the first post that tells me what I need to help you.
     
Thread Status:
Not open for further replies.

Share This Page