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. Dear Drakia, Could you please add per group config? So i can change per group the text colour and not Everyones text colour..
     
  3. Offline

    Thunderclem

    I've the same problem, what can i do ?
     
  4. Offline

    Chao5bringer

    My issue lies with the fact that I have the exact same code written as Silarn, but my colors aren't working. I've read and re-read the post, and I'm aware you don't reply to questions about how to set color, but this really doesn't apply to that. This is more of a bug than anything, it worked fine on 1.7.3 but now that i'm using CB's 1185 it's just like "No color for you!"
     
  5. Offline

    Drakia

    Funny thing, barely anybody has actually posted their PERMISSIONS CONFIG, I'm not magic here.
     
  6. Offline

    Dilluexe

    i am confused how do u use the editing??
     
  7. Offline

    Drakia

    You are not giving any groups the group.{name} node.
     
  8. Offline

    Chao5bringer

    Here's the permission's config file:

    Code:
    users:
        ConspiracyWizard:
            permissions:
                permissions.example: true
            groups:
            - admin
        kodronnie:
            groups:
            - dl
        gooscar:
            groups:
            - dl
        chao5bringer:
            groups:
            - cl
        wnxtodorius:
            groups:
            - br
        klypto:
            groups:
            - dr
        xkancerxshockx:
            groups:
            - commoner
        cat_purrsboom:
            groups:
            - cr
        rukufuku:
            groups:
            - cr
        astrian:
            groups:
            - cr
        syniynk:
            groups:
            - cr
        gartous:
            groups:
            - dr
        ehemyo:
            groups:
            - commoner
    groups:
        default:
            permissions:
                permissions.build: true
                factions.participate: false
                factions.create: false
                group.default: true
        cr:
            permissions:
                permissions.build: true
                factions.participate: true
                factions.create: false
                group.cr: true
        dr:
            permissions:
                permissions.build: true
                factions.participate: true
                factions.create: false
                group.dr: true
        br:
            permissions:
                permissions.build: true
                factions.participate: true
                factions.create: false
                group.br: true
        cl:
            permissions:
                permissions.build: true
                factions.participate: true
                factions.create: true
                group.cl: true
        dl:
            permissions:
                permissions.build: true
                factions.participate: true
                factions.create: true
                group.dl: true
        bl:
            permissions:
                permissions.build: true
                factions.participate: true
                factions.create: true
                group.bl: true
        commoner:
            permissions:
                permissions.build: true
                factions.participate: true
                factions.create: false
                group.commoner: true
        admin:
            permissions:
                factions.*: true
                group.default: false
                group.admin: true
        lord:
            permissions:
                permissions.build: true
                factions.participate: true
                factions.create: true
                group.lord: true
    messages:
        factions.participate: '&cYou are not a Commoner!'
    Here's the variable's file:

    Code:
    users:
        drakia:
            prefix: '&e'
    groups:
        admin:
            name: Admin
            prefix: '&c'
            suffix: ''
        default:
            name: Peasant
            prefix: '&7'
            suffix: ''
        commoner:
            name: Commoner
            prefix: '&8'
            suffix: ''
        cr:
            name: Resident
            prefix: '&9'
            suffix: ''
        cl:
            name: Leader
            prefix: '&9'
            suffix: ''
        dr:
            name: Resident
            prefix: '&a'
            suffix: ''
        dl:
            name: Leader
            prefix: '&a'
            suffix: ''
        br:
            name: Resident
            prefix: '&6'
            suffix: ''
        bl:
            name: Leader
            prefix: '&6'
            suffix: ''
    
    For some reason, the only color that's working is Commoner's grey.
     
  9. Offline

    PaulScelus

    I'm not exactly new to this sort of thing, but it doesn't seem to matter what I do, I cannot get iChat to work anymore. It was working just fine before I decided to check out the new version, now I can't even go back to the old version properly. Here are the requested documentation for support:

    Permissions 3.x config.yml: http://pastebin.com/aMNktxdM
    iChat (old) config.yml: http://pastebin.com/PZPFtv7h
    iChat (new) config.yml: http://pastebin.com/VtphTZtP
    iChat variables.yml: http://pastebin.com/YDvaa5eE

    Regarding the position of the group.{name} node, that's just where it was when I decided to seek help. I've tried setting it in those positions to group.{name}: true, tried setting it under the "info:" section, even. It doesn't seem to make a lick of difference. Other than that, I have no idea why this isn't working as the config files and variable file looks sound to my eye.

    You'd think that the me-format would at least work regardless, but it doesn't even show up as the format I set for it. Suggestions?
     
  10. Offline

    Drakia

    Server log.
     
  11. Offline

    PaulScelus

  12. Offline

    Drakia

    A) You're running an old version of iChat (Latest is 2.4.1)
    B) What in the blue hell version of Permissions are you running? That's 2.x claiming to be 3.x, no wonder it's not working.
     
  13. Offline

    PaulScelus

    A) No. Throughout that log you'll notice I switch between the two versions (As stated in my last post, I tried to go back to the old version but with no luck)
    B) In the plugins list: Permissions (3.0a+MP) as provided by my service provider's (MultiPlay Clanforge) Bukkit Plugin's list.
     
  14. Offline

    Slayergold3

    would this work with groupmanager?
     
  15. Offline

    portalnik

    Please, permissionsEX support.
     
  16. Offline

    Learath2

    Its really sad that i have permissions on my mysql. I have to do all that mysql deleting and importing to variables.yml :(

    Drakia pls consider adding a config option to get prefixes and suffixes from permissions node :)
     
  17. Offline

    AstroNit

  18. Offline

    Drakia


    If the Bukkit team didn't royally fuck over the Permissions standards we had in place prior to "SuperPerms" there would be no issue, but because they did, you're stuck with variables.yml

    Server log.
     
  19. Offline

    Emiya Shirou

    I think it's not working with PermissionsEx :/ i get the output of name like

    [] Emiya_Shirou: your massage

    instead of

    [OP] Emiya_Shirou: your massage :/

    I've messed around with it for a while but no matter what i do it simply won't works...

    and more importantly this:
    Code:
    03.10 00:58:31 [Server] INFO iChat (v2.4.1) enabled
    03.10 00:58:31 [Server] INFO [iChat] Found Permissions Bridge. Using SuperPerms
    Why does it uses them when I've disabled them in PEX config ><# ?
     
  20. Offline

    Drakia

    For everyone having trouble, here is an example of converting a Permissions 2.x/iChat 2.3 config to a Perms 2.x/iChat 2.4 config: (This is with unneeded permission nodes stripped out. Also please node if this were anything besides Permissions 2.x/3.x you would REQUIRE the group.{name} node)
    Old world.yml for Permissions: http://pastebin.com/pKPnCc97
    New variables.yml: http://pastebin.com/AU1ahZ3t

    It's really REALLY not that hard, it's almost the exact same format as a Permissions config was, minus the 'info' subnode.

    I have no clue what you mean by "them" in regards to why does it uses them.
    Also, re-read the first post, you have given me zero information to help you.

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

    AstroNit

  22. Offline

    residntevl

    Hey, I've been trying since last night to get my iChat to function correctly. I did assign the permission nodes as required. The error is when I type into the chat, the group showed in chat is not what I assigned in the permissions. When I reload the plugins or just the permissions the group is now something else.
    So something like this:
    [Keeper]Residntevl: blah blah
    /permissions reload
    [Trader]Residntevl: derpa
    I assigned myself the group FRVMako in the files and I can't seem to get it to work.
    I'm using PermissionsBukkit and SuperPermsBridge for the Permissions plugins.
    Here is my Bukkit Permissions config. http://pastebin.com/AuK1xV79
    Here is my iChat Variables. http://pastebin.com/r1M2E6Fi
     
  23. Offline

    Drakia

    Server log.
     
  24. Offline

    residntevl

  25. Offline

    JSmoove98

    im sorry this plugin has gotten really complicated. could i have help setting this thing up with permissionsex?
     
  26. Offline

    Elfsovereign

    Ok having difficulties making the groups automatically kick in colors. Here's my config:
    Code:
    groups:
        default:
            name: 'Default'
            prefix: '&7'
            suffix: ''
        Citizen:
            name: 'Citizen'
            prefix: '&3'
            suffix: ''
        Admins:
            name: 'Admin'
            prefix: '&a'
            suffix: ''
        Owner:
            name: 'Owner'
            prefix: '&4'
            suffix: ''
        Moderator:
            name: 'Moderator'
            prefix: '&b'
            suffix: ''
        Prisoner:
            name: 'Prisoner'
            prefix: '&f'
            suffix: ''
        Trusted:
            name: 'Trusted'
            prefix: '&e'
            suffix: ''
    Yes those groups exist in the permissions config, yes I have experimented. I have to specifically designate player IDs before this plugin does anything more than add brackets before everything I do.
     
  27. Offline

    cullyn

    the only way i got it to work with pex was to remove all inheritance from the permissions.yml
    Code:
    groups:
        guest:
            default: true
            permissions:
            - general.spawn
            - general.playerlist
            - multiverse.access.newbie
            - multiverse.access.world
            - multiverse.portal.access.wtour
            - multiverse.portal.access.newwto
            - multiverse.portal.access.wtonew
            - multiverse.portal.access.wto2new
            - group.guest
            worlds:
                world:
                    permissions:
                    - -general.spawn
                    - -warpz0r.home
                    - -warpz0r.sethome
                    - -multiverse.world.spawn
            options:
                rank: '1000'
        Default:
            permissions:
            - AntiGuest.*
            - general.playerlist
            - general.away
            - general.getpos
            - general.tell
            - general.spawn
            - general.player-info
            - warpz0r.home
            - warpz0r.sethome
            - warpz0r.worldhome
            - warpz0r.compasshome
            - warpz0r.compassreset
            - modifyworld.*
            - multiverse.world.spawn
            - multiverse.access.newbie
            - multiverse.access.world
            - multiverse.portal.access.wto
            - multiverse.portal.access.newwto
            - multiverse.portal.access.wtonew
            - multiverse.portal.access.wto2new
            - group.new
            options:
                rank: '900'
            worlds:
                survival:
                    permissions:
                    - -general.spawn
                    - -warpz0r.home
                    - -warpz0r.sethome
                    - -multiverse.world.spawn
                world:
                    permissions:
                    - -general.spawn
                    - -warpz0r.home
                    - -warpz0r.sethome
                    - -multiverse.world.spawn
     
  28. Offline

    h0us3cat

    Code:
    2011-10-04 12:56:02 [SEVERE] Could not pass event PLAYER_CHAT to iChat
    java.lang.NullPointerException
        at com.nijiko.permissions.Control.getGroup(Control.java:535)
        at net.TheDgtl.iChat.iChatAPI.getPermissionsGroup(iChatAPI.java:207)
        at net.TheDgtl.iChat.iChatAPI.getRawInfo(iChatAPI.java:91)
        at net.TheDgtl.iChat.iChatAPI.getInfo(iChatAPI.java:112)
        at net.TheDgtl.iChat.iChatAPI.getGroup(iChatAPI.java:124)
        at net.TheDgtl.iChat.VariableHandler.addPlayer(VariableHandler.java:44)
        at net.TheDgtl.iChat.playerListener.onPlayerChat(playerListener.java:41)
        at org.bukkit.plugin.java.JavaPluginLoader$6.execute(JavaPluginLoader.java:279)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:727)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:715)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:92)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:471)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    Ichat 2.4.1 / cb #1240
     
  29. Offline

    Edam

    permissions - config.yml
    http://pastebin.com/K18JEs4C
    ichat variables:
    http://pastebin.com/BBgNQ1Mj
    ichat config:
    http://pastebin.com/r003vZPp

    as far as I can tell I have everything set up correctly, but colors set by groups seem to just change at random after reloads and at random points. Last night when I was trying to get it working with people on the server it was like some crazy disco. Colors set individually seem to work fine.

    I'm guessing its probably a bukkit thing? just updated to 1240 to see if it stopped the random changing but last night it was doing it on 1188 as well and neither of them are 1185! But just in case its me making some stupid mistake I thought I'd ask.

    thanks so much!
     
  30. Offline

    MrMag518

    u should make this support permissionsEX (PEX)
     
Thread Status:
Not open for further replies.

Share This Page