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

    H4ck3r93

    In your Variables.yml just set the name of your group with EXACT match with the permission file called [yourworld].yml

    Exemple:

    Variables.yml

    Code:
    # iChat Variable Config
    # This is now the only method for defining variables
    users:
    groups:
        Guest:
            name: Guest
            prefix: '&6'
            suffix: ''
            
    world.yml (Your permission file)

    Code:
    groups:
        Roi:
            default: false
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
            permissions:
                - '*'
    users:
        (your name):
            group: Guest
            permissions:
            
    IMPORTANT ! : Each time that your group name appear it MUST BE the SAME

    NOTE : if you use the groups.yml and user.yml with permissions, just copy them into one file and delete others files. Rename the created file by the name of your world. Your file must be in the permissions file don't drag it into another file like Permissions/World/world.yml because it will not work !

    I hope this helped you.

    H4ck3r93
     
  3. Offline

    Drakia

    [Version 2.4.2]
    - Fixed issue with inheritance in Permissions
    - Implemented start of online time variable. Need output format.

    This should fix the issues with group inheritance. Thanks dfyx
     
  4. Offline

    FFS2309

    That a very nice plugin. It's that plugin a Nijikokun bridge ? i have in my superperms a Nijikokun Bridge option
     
  5. Offline

    tyde456

    I changed the name of the group to be the same and it still doesn't work. I will attach a copy of my permissions config file and my ichat file.
     

    Attached Files:

  6. Offline

    G4meM0ment

    I tested it now and it don't works :( When I start the server a error message appears, there wouldn't be any permissions plugin defaultign to op..., I just installed it and changed rename-me, to my worldname.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 17, 2016
  7. Offline

    H4ck3r93

    Humm you didn't changed anythings in your Variables.yml this is the reasons why doesn't work ...
    Put you in the group Member in your permissions.yml and the make this in your Variables.yml

    Code:
    # iChat Variable Config
    # This is now the only method for defining variables
    users:
    groups:
        Member:
            name: Member
            prefix: '&6'
            suffix: ''
    
    After you just have to add the others groups like I did for the Member group. Test it you'll see how it works

    Remember this is a solution for the permissions 3.x pluggin can't help anyone using another permission plugin.
     
  8. Offline

    Drakia

    @tyde456 You did not put any information in variables.yml, please re-read the first post. If you are using a plugin besides Permissions 2.x/3.x (Bridges DO NOT COUNT) then you will also need to define group.{name} nodes for each group.
    @G4meM0ment Server log

    Everyone else who posted before I uploaded 2.4.2, test with the new version, if it still doesn't work post your configs AND YOUR SERVER LOG. Nobody has been posting their server log, and it is a key piece of information I need in helping you.
     
  9. Offline

    Maeyrl

    Can you make this easily accessible with the /broadcast command? It would help out a lot.
     
  10. Offline

    Drakia

    @i ThRoW sToNeZx iChat and Factions are not compatible as Factions cancels the chat event and sends its own chat messages.

    CraftBukkit does not have a /broadcast command
     
  11. Offline

    i ThRoW sToNeZx

    Alright, so if I removed factions, PEX would work with iChat?
     
  12. Offline

    Drakia

    As I have said time and time again, PEX may or may not work. I however will not offer support if you use it.
     
  13. Offline

    Edam

    new update fixed everything for me with inheritance, thanks so much!
     
  14. Offline

    Drakia

    Indeed, sorry about the bug in the first place. Superperms is a dumb system.
     
  15. Offline

    i ThRoW sToNeZx

    Alright, Well I'll test it on my test server. I'll post the results
     
  16. Offline

    tyde456

    @Drakia it still won't work the server log says "[INFO] [iChat] Permissions not found, using SuperPerms" but i have permissions installed. i gave the Member group the node group.tyde456 and group.Member in permissions but it still just does
    []tyde456: hi
    and also it doesn't censor the words i set it to censor.

    EDIT: ok now it works but it just says [Default] tyde456: blah blah blah in white even tho i configured it to say something else.
     
  17. Offline

    i ThRoW sToNeZx

    Alright, it doesnt work for PEX
     
  18. Offline

    KO_FU_MATT

    Wow cool. Ichat now has prefixes! That is so cool but on the variables how do i have more than one user with a custom prefix because it won't let me add another name it come up with error messages in console saying this: 2011-10-09 22:17:36 [SEVERE] Error occurred while enabling iChat v2.4.2 (Is it up to date?): while scanning for the next token; found character '\t' that cannot start any token
    while scanning for the next token
    found character '\t' that cannot start any token
    in "<reader>", line 6, column 1:
    ^

    at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:360)
    at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:183)
    at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:564)
    at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:163)
    at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
    at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:228)
    at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
    at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230)
    at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
    at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230)
    at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
    at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:122)
    at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
    at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:124)
    at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
    at org.bukkit.util.config.Configuration.load(Configuration.java:82)
    at net.TheDgtl.iChat.VariableHandler.checkConfig(VariableHandler.java:113)
    at net.TheDgtl.iChat.VariableHandler.<init>(VariableHandler.java:24)
    at net.TheDgtl.iChat.iChat.onEnable(iChat.java:84)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:920)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:278)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:173)
    at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:156)
    at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:410)
    at org.bukkit.Bukkit.reload(Bukkit.java:173)
    at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:22)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:163)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:353)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:349)
    at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:499)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:478)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)


    Please could someone help me
     
  19. Offline

    zawmbee42

    For some reason, my tags don't want to appear. The brackets are there, but the text such as Admin or Owner does not appear. Simply [] appears.
    There are NO errors in the console whatsoever, but seeing as this most likely will help, here's my iChat config.

    EDIT:
    This is the only thing shown in console for iChat
    09.10 17:35:13 [Server] INFO [iChat] Found Permissions Bridge. Using SuperPerms
    I have PermissionsBukkit, just fyi

    iChat variables and Config
    Code:
    # iChat Variable Config
    # This is now the only method for defining variables
    users:
        zawmbee:
            prefix: '&e'
    groups:
        admin:
            name: Admin
            prefix: '&c'
            suffix: ''
        default:
            name: Guest
            prefix: ''
            suffix: ''
    Code:
    handle-me: true
    date-format: HH:mm:ss
    message-format: '+iname: +message'
    me-format: '* +name +message'
    iname-format: '[+prefix+group+suffix&f] +displayname'
    

    If you still need my server log, I can paste it but NO errors are shown.
     
  20. Offline

    ZachBora

    You used a tab (\t == TAB) in your file. Replace it with spaces.

    @Drakia mind if I look in a way to make it work with PEX? Or is it you don't want to support it at all.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 17, 2016
  21. Offline

    Drakia

    I personally do not offer support. I have no idea whether it works or not, and have no intention of finding out. PEX has the parse order of the permissions file completely backwards.
     
  22. Offline

    ZachBora

    If I find how to make it work and do a pull request?
     
  23. Offline

    sajjad

    dose this work with permissionsEX?
     
  24. Offline

    Drakia

    I swear users just get lazier by the day.

    Again, I do NOT offer support, PEX has the most idiotic parsing order of any plugin handler I've used. I am not looking to offer support. And I will not accept pull requests aimed at PEX.
     
  25. Offline

    1n5aN1aC

    so can you no longer define Group/Player Prefix/Suffix in the Permissions file? do i have to do that in the variables.yml now?
     
  26. Offline

    sajjad

    so dose it!!!!!!!!!!!!!!!!!!!!
     
  27. Offline

    Drakia

    What in the hell, are you mentally challenged? In that response I CLEARLY STATED I DO NOT KNOW OR CARE. Fuuuu- users piss me off.

    Variables (Prefixes, suffixes, group names, etc) are defined in variables.yml. What group a user is in is defined via your chosen permissions handler. If you're using Perms 2.x/3.x then it will be the group name, otherwise it will be defined via the "group.{name}" permissions node.
     
  28. Offline

    KO_FU_MATT

    Ohhh Thank You! :)
     
  29. Offline

    JohnPulse

    Hi Drakia.
    Just to let you know that the version 2.4.2 resolved all my issues with PermissionsBukkit 1.2k. Thank you for the update!
    On a side note, and I don't know if this is something that your plugin can do, I have 2 small requests:
    - When I do "/list" (CommandBook) in console, I only see the Nicknames. This way I don't know quickly of what group is the player X or Y. Can you add this? I ask you this because I was using the plugin "SimplePrefix" and it shows somehow, and also in DynMap.
    - It has been talked here I guess, but color codes on the GroupName while "/list" ingame is also a must have. Is it possible to add this?
    Once again, thank you for your work.
    Regards,
    John
     
  30. Offline

    Drakia

    @JohnPulse iChat does not modify the DisplayName attribute, these other plugins do.
     
  31. Offline

    ZachBora

Thread Status:
Not open for further replies.

Share This Page