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

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

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


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

    Plugin Support:
    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. <-- Post configs there when asking for help

    Custom chat formatting.
    Based on the idea of iChat v1.5 by Nijikokun.
    Includes code and concepts from mChat by MiracleM4n <>

    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):

    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

    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:

    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 -

    Example (Default):
    Code (Text):
    1. iname-format: '[+prefix+group+suffix&f] +displayname'
    2. message-format: '+iname: +message'
    3. me-format: '* +name +message'
    4. date-format: 'HH:mm:ss'
    5. 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.

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

    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 (Text):
    1. # iChat Variable Config
    2. # This is now the only method for defining variables
    3. users:
    4.     Drakia:
    5.         prefix: '&e'
    6. groups:
    7.     Admin:
    8.         prefix: '&c'
    9.         suffix: ''
    10.     Default:
    11.         prefix: ''
    12.         suffix: ''
    13. world:
    14.   users:
    15.     Drakia:
    16.       prefix: '&a'
    Default config.yml:
    Code (Text):
    1. handle-me: true
    2. date-format: HH:mm:ss
    3. message-format: '+iname: +message'
    4. me-format: '* +name +message'
    5. iname-format: '[+prefix+group+suffix&f] +displayname'
    To make a group colored:
    Code (Text):
    1. groups:
    2.     Default:
    3.         prefix: '&4'
    4.         suffix: ''
    Code (Text):
    1. message-format: '[+prefix+group&f] +name: +message'
    To make a single username colored:
    Code (Text):
    1. users:
    2.     Drakia:
    3.         prefix: ''
    4.         suffix: '&1'
    Code (Text):
    1. 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.

    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)

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

    /ichat reload - Reload the iChat config file

    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.

    [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


    Yay nice to see someone taking a dead plugin.
  3. Offline


    OMG worst plugin ever man you suck! :p
  4. Offline


    I'm not planning on implementing anything along those lines anon.

    Poke, you're a dick (I am the dev on the server he runs, so everybody knows, he's just kidding ;) )
  5. Offline


  6. Offline


    You'll need to give me more to go on that "can't seem to get it to work." In what way doesn't it work? Is it shooting lasers out of its eyes? Is it burning the moon?

    Looking over your configs there isn't anything that looks wrong off the top of my head.
  7. Offline


    Well I get this when I type something into chat on my server, And my name is plain old white no fancy name or nothing.

    Code (Text):
    1. 2011-02-24 22:20:48 [SEVERE] Could not pass event PLAYER_CHAT to iChat
    2. java.lang.NullPointerException
    3.         at com.nijiko.permissions.Control.getPermissionString(
    4.         at com.nijiko.permissions.Control.getPermissionString(
    6.         at net.TheDgtl.iChat.iChat.getPrefix(
    7.         at net.TheDgtl.iChat.playerListener.onPlayerChat(
    9.         at$7.execute(JavaPluginLoader.ja
    10. va:160)
    11.         at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    12. a:59)
    13.         at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    14. ava:225)
    15.         at
    17.         at net.minecraft.server.NetServerHandler.a(
    18.         at net.minecraft.server.Packet3Chat.a(SourceFile:24)
    19.         at net.minecraft.server.NetworkManager.a(SourceFile:230)
    20.         at net.minecraft.server.NetServerHandler.a(
    21.         at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    22.         at net.minecraft.server.MinecraftServer.h(
    23.         at
    24.         at
    25. 2011-02-24 22:20:48 [INFO] <0utbr3ak> test
  8. Offline


    Ah, there's a bug in Permissions 2.1, there is a || where there should be a &&
    Umm.... Give me a minute to work on a fix.
    --- merged: Feb 25, 2011 5:42 AM ---
    2.01 pushed and uploaded, that should hopefully fix that little issue :) It's odd it never showed up on my local test server o.o
  9. Offline


    Hmm Still not working for me, Here is a copy of my CMD line info from server start to current:

    Also a Screenshot =]
  10. Offline


    ... ichat 1.5 works for me with permissions 2.1 on 432.
  11. Offline


  12. Offline


    Weird, that should really not be causing an NPE :/ Threw in some checks to make it bypass that if there is a null value, just incase.
    Version 2.02 uploaded, fix for possible NPE
  13. Offline


    Dirk I am using the most up to date versions of well each plugin i have, I check daily for updates so its nothing on my side.
    --- merged: Feb 25, 2011 7:25 AM ---
    ok We are getting closer lmao, Not sure what is causing this one:
  14. Offline


    I threw up v2.03, it'll get rid of the +suffix +prefix, etc, but it's not going to fix the underlying issue. I honestly have no clue what that issue is :/ Will look into it some more.
  15. Offline


    Not quite sure, Gonna guess it is something with permissions conflicting because I took all other plugins off my server besides Permissions 2.1 and iChat 1.3, Below is the CMD dump, No errors from iChat but still have no change in the text in game, tis just plain white.
  16. Offline


    I just ran it on the exact same build, exact same iChat config, exact Permissions config, and I'm getting no problems. It may be one of your other plugins interfering?
    --- merged: Feb 25, 2011 7:36 AM ---
    And your Permissions config file is named "WyHigh4.yml" correct?
  17. Offline


    Ok I did not see anywhere when i upgraded that that was supposed to be changed =], That fixed the problem sir ;).

    +10 for the quick support!
  18. Offline


    obviously not, as it says you have essentialshome 211, and the essentials dev build 170. Might wanna recheck. The newest builds are 231+
  19. Offline


    Seems the thread where i first got my Essentials file from stopped at 225. Downloaded straight from the ESS website and got rid of some errors.
  20. Offline


    so Im running iChat 1.5 or 1.6 just fine(the latest, cant remeber which is it) from Nijijokun, so why should I upgrade to your iChat 2.03? Did you just start a parallel project thatll get updated in case iChat from Niji wont work at some point anymore?
  21. Offline


    Working great, only question is. What are the prefixes and suffixes for and how do we use them? What I'm looking to do is color-code the usernames based on group, is this where prefixes/suffixes come in?
  22. Offline


    I'm not getting any errors but, whenever I type into chat it looks like this: [] username: message instead of [Admin] username: message. I read all of the instructions, and changed the permissions file name to my world name.

    Any help would be greatly appreciated.
  23. Offline


    Please post your permissions config file please.
  24. Offline


    @Dreadreaver I started this because Niji stopped supporting iChat 1.5. There were also some bugs in it which could cause crashes (Color code at the end of a string, % bug, etc), and it had the old constructor.
    @DJ_Idol You would most definitely use this for what you want. If you just want to color-code the username, and not add their group to the message, then you'd set your message-format to something as such:
    message-format: '+prefix+name&f: +message'
    +prefix, +name, and +message are self-explanatory, the "&f" after the +name is to change the text back to white after your prefix sets the color of the name.
    And then set the prefix in the permissions config file for your world to (This goes under "info" for the specific user or group):
    prefix: '&4'
    to make their name a certain color (&4 is dark-red, the color codes are linked in the first post).
  25. Offline


    Here you go ^^
    Code (Text):
    1. # System is no longer used, but may become used in the future
    2. # Copies is for multiple-world support
    3. #   Put the name of the world you wish for it to be a clone of, otherwise leave it empty.
    4. #   Does not work for the default world.
    5. plugin:
    6.     permissions:
    7.         system: default
    8.         copies:
    10. ##
    11. # Groups can contain inheritance.
    12. #   To make a group inherit the permissions from another
    13. #   group simply place the groups name in the "inheritance:" like so:
    14. #
    15. #   Example:
    16. #       inheritance:
    17. #           - Default
    18. ##
    19. #   All permissions including the asterisks must be placed in single quotes.
    20. #   like so:
    21. #
    22. #       - 'general.spawn'
    23. #
    24. #   Otherwise errors will happen!
    25. ##
    26. #   Globalized Permission settings:
    27. #
    28. #       If a permission contains periods (.) you can denote a globalized parameter:
    29. #
    30. #           - 'general.*'
    31. #
    32. #       This will allow you to use all general commands.
    33. #
    34. ##
    35. #   Single Asterisk denotes all commands:
    36. #
    37. #       - '*'
    38. ##
    39. #   To exempt a node use the - prefix like so:
    40. #       - '-general.time'
    41. ##
    42. groups:
    43.     Default:
    44.         default: true
    45.         info:
    46.             prefix:
    47.             suffix:
    48.             build: false
    49.         inheritance:
    50.         permissions:
    51.             - 'general.spawn'
    52.             - 'general.items'
    53.             - 'general.spawn.set'
    54.             - 'iConomy.payment'
    55.             - 'iConomy.list'
    56.             - 'iConomy.rank'
    57.             - ''
    58.     Moderator:
    59.         default: false
    60.         info:
    61.             prefix: '&4'
    62.             suffix: '&4'
    63.             build: true
    64.         inheritance:
    65.             - Default
    66.         permissions:
    67.             - 'general.time'
    68.             - 'general.teleport'
    69.             - ''
    70.             - 'general.player-info'
    71.             - 'hg.inv'
    72.             - 'hg.list'
    73.             - 'hg.inv.other'
    74.             - 'hg.inv.other'
    75.             - 'hg.mobs'
    76.             - 'hg.loc'
    77.             - 'hg.time.set'
    78.             - 'hg.inv'
    79.     Admin:
    80.         default: false
    81.         info:
    82.             prefix: '&a'
    83.             suffix: '&a'
    84.             build: true
    85.         inheritance:
    86.             - Moderator
    87.         permissions:
    88.             - '*'
    90. ##
    91. # DarkGrave has control over all commands.
    92. ##
    93. users:
    94.     Jhoff:
    95.         group: Admin
    96.         permissions:
    97.             - '*'
    98.     Cmatt:
    99.         group: Moderator
    100.         permissions:
    101.             - 'general.time'
    102.             - 'general.teleport'
    103.             - ''
    104.             - 'general.player-info'
    105.             - 'hg.inv'
    106.             - 'hg.list'
    107.             - 'hg.inv.other'
    108.             - 'hg.inv.other'
    109.             - 'hg.mobs'
    110.             - 'hg.loc'
    111.             - 'hg.time.set'
    112.             - 'hg.inv'
    114.     DarkGrave:
    115.         group: Admin
    116.         permissions:
  26. Offline


    Post a screenshot of the terminal when you say something, and your config.yml for iChat
  27. Offline


    Code (Text):
    1. groups:
    2.     Default:
    3.         default: true
    4.         info:
    5.             prefix:
    6.             suffix:
    7.             build: false
    See where it says Prefix? after it add 'Default'
    like so:

    Code (Text):
    1.             prefix: 'Default'
    and do so for the other usergroups as well.
  28. Offline


    @Direct1221 The default message format adds the group name by default, so unless he's changed something he shouldn't need to do that. That's why I want him to add the output in the terminal and a copy of his config.yml
    Also make sure your Permissions filename is the EXACT same as your world name, it's case sensitive.
  29. Offline


    Oh, okay >.> Didnt know that, as I always change everything myself, Please ignore me.
  30. Offline


    My best guess is his permissions file isn't named right.
Thread Status:
Not open for further replies.

Share This Page