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

    DQuaN

  3. Offline

    clownarthur

    i wasnt asking you but thanks this might help
     
  4. Offline

    Iso

    How do I add this "+displayname" into a plugin?
     
  5. Offline

    Drakia

    @clownarthur There is nothing I can do to help you as you haven't read the first post

    @DQuaN That error doesn't appear to be from iChat, but again, I can't do anything to help until you read the first post.

    @Iso I have no clue what you mean.

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

    Iso

    @Drakia I mean what to add into my plugin code, so i can use displayname
     
  7. Offline

    Drakia

    @Iso Getting? Setting? Displayname is just a part of Bukkit...
     
  8. Offline

    GoSox2525

    Download link isnt working for me :/
     
  9. Offline

    Drakia

    Server is moving, as stated in my signature. Downloads are offline for ~12 hours.
     
  10. Offline

    Craigdb

    OK sorry, I just knew that both these plugins broke on the same bukkit build... please excuse my ignorance, I'm not a coder, I'm a Network Engineer
     
  11. Offline

    Jäsef

    just to be clear, does any version of iChat support PermissionsEX?
     
  12. Offline

    wassilij

    I had iChat 2.3.3 for Permissions 3.* and now i updated to iChat 2.4.1
    All Prefixes are away (yes i reconfigured all ..), i think iChat dont get the Prefixes from the permissions group.yml file anymore?
    why? :(

    Edit:// okay no problem, i get it! :D
    i like the variables.yml
     
  13. Offline

    Drakia

    I do not offer any support for PermissionsEx.
     
    wassilij likes this.
  14. Offline

    tomomsius

    hello so i installed bpermissions set everything and upgraded ichat to newest but now when i set in variables groups:
    Server Owner:
    name: Server Owner
    prefix: '&e'
    suffix: '&e'
    it doesent change my group colore in game it just show like this [G] [Server Owner] exty: [] exty : hmm
    as u can see i wrote hmm
    what should i change to fix this?

    ok fixed the 2 names and [] but there is still no colore

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

    Jack_Miller

    Hi Guyz, i have a big big problem :c
    I use Permissionsbukkit (for 1185)
    it shows the prefix....but random
    pls help me :(

    EDIT: ive forget the sentence i must add this to the childrens...but how?


    heres my config.yml of permissionsbukkit:

    Code:
    users:
    groups:
        default:
            permissions:
                permissions.build: false
                group.default: true
                group.moderator: false
                group.admin: false
                group.bewohner: false
        bewohner:
            permissions:
                permissions.build: true
                iConomy.holdings: true
                iConomy.help: true
                iConomy.payment: true
                group.bewohner: true
                group.admin: false
                group.moderator: false
                group.default: false
            inheritance:
            - default
        moderator:
            permissions:
                group.moderator: true
                group.admin: false
                group.default: false
                group.bewohner: false
            inheritance:
            - bewohner
        admin:
            permissions:
                group.admin: true
                group.moderator: false
                group.bewohner: false
                group.default: false
            inheritance:
            - moderator
    messages:
        build: '&cyou dont have any permission.'
    debug: true
    
     
  16. Offline

    DQuaN

    Ok I'm still getting the same []DQuaN: <Message>

    I did breifly get the [ADMIN]DQuan: <Message> While fiddling around with the groups setting in PermissionsBukkit but it's gone again (and it didn't have color.

    Config files are as follows.

    Variables - http://pastebin.com/kEThiT35
    Config - http://pastebin.com/3kTNj4de
    PermissionsBukkit - http://pastebin.com/EFwvCT5W

    Thanks

    Also note that I have just moved from permissions 3.x to PermissionsBukkit and am struggling to get to grips with it so this is probably where my problem lies!


    *edit*
    It is something to do with the permissions. After fiddling about a bit I now get what the guy above has. Groups are randombly given to users. This changes when I reload or when we go to a different world.
     
  17. Offline

    GoSox2525

    oh okay, sorry im impatient :/. got it now
     
  18. Offline

    Jack_Miller



    I've tried to use it with superperms like u....but dont work....it shows me the prefix only as []
     
  19. Offline

    G4meM0ment

    I've got a problem, iam using PermissionsEx, as I'm informed PermEx uses Permissions 2.x, but iChat tells me, their wouldnt be any Perm Plugin, so it would use SuperPerms...
     
  20. Offline

    Undearius

    Why can't there just be a collaboration of permissions systems and unify them into one? Life would be easier for many.
    either way, I have both Perms 3.1.6 and SuperPerms, the console is telling me the iChat is connecting with SuperPerms instead of (as you say) the preferred Perms 3.x.
    1. Is there anyway to make it so that Perms 3.1.6 takes priority over SuperPerms when looking for one to hook into.
    2. Just for clarification, the groups.node thing. In the variables folder is the list of groups and their 'fixes. Do I add the group.<group name in Variables> to the group in the permissions config?
     
  21. Offline

    FIX94

    Hi Drakia, could you add a feature that we can choose which permission should be used? I have PermissionsEx and I can't get it to work with the latest iChat, so I still use iChat 2.3.3, that uses the Permissions 2 bridge created by PermissionsEx without problems. It would be great if you could do it, thanks for this great plugin!
     
    Undearius likes this.
  22. Offline

    Ajax_killer

    does this work with permissions ex?
     
  23. Offline

    Bonzobaker

    I still cannot set my messages to colored and my name and group colored.

    I cannot fix the prefixes and suffixes to change the color on my server.


    Admins:
    default: false
    info
    :
    prefix
    : '&4'
    suffix
    : '&f'



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


     
  24. Offline

    DeVil.DeMonde

    I just wanted to say that I've used iChat in the past and it worked great. I have a feeling a lot od the issues people are having has to do with being confused about the various permissions systems. That said it no longer meets my needs, nor does any other. If you were to add CraftIRC support I'd be back in a heartbeat. As it is now i have to use one heavy and broken system, and one small and lightweight system for ranks and colors. I miss iChat.
     
  25. Offline

    Drakia

    Honestly, you can blame the Bukkit devs for f*cking this one up. They royally screwed over plugins such as iChat with their "SuperPerms". Now instead of having one standard API (The Perms 2/3 API that EVERY SINGLE PLUGIN shared) we now have the standard "SuperPerm" API for permissions, then every plugin implementing its own way of doing every other thing possible.
     
  26. Offline

    Justappeard

    @Drakia Hey I love your plugin! but I was thinking of a future that shows the player online time on the current server in the chat, Like [+ptime]
    so it shows Up like this:
    [1337Min]Justappeard: I leed'd
    I know Im full of stupid idea's And I dont know if it's a nice idea but.. Think about it :p
     
  27. Offline

    Firecraft123

    @Drakia Hey Drakia I want to make with some friends a support service for permission 3.x but there are also some contents are posted by them, so my question would be whether that's okay =?
     
  28. Offline

    Undearius

    Glad people can read.
     
  29. Offline

    supericanothink

    Hey Drakia,
    When I went To start up my server using iChat v2.4.1 it came up with this error message
     

    Attached Files:

  30. Offline

    Silarn

    How exactly are your permissions handled? They're based on SuperPerms permissions, no? I realize you dislike PEX for some reason (and I'd admit it has rough edges), but every other plugin I've seen that has only SuperPerms permission nodes works with PEX.

    config:
    Code:
    message-format: '+{donortag} +{chform}'
    me-format: '+{meform}'
    variables groups:
    Code:
    groups:
        me:
            meform: "[+world] * +n +message *"
        Admins:
            name: Admins
            prefix: '&c'
            suffix: ''
            chform: "[+world] +prefix+n&7: +suffix+message"
        Overlord:
            name: Overlord
            prefix: '&c'
            suffix: ''
            chform: "&8+prefix+group&8 +prefix+name&7: +suffix+message"
        Peasants:
            name: Peasant
            prefix: '&9'
            suffix: '&7'
            chform: "&e{+healthbar&f:&8+health&e} +prefix+d&7: +suffix+message"
        Builders:
            name: Builder
            prefix: '&9'
            suffix: '&7'
            chform: "[+world]&8[+prefix+group&8] +prefix+d&7: +suffix+message"
        Lords:
            name: Lord
            prefix: '&2'
            suffix: '&7'
        Regulars:
            name: Regular
            prefix: '&b'
        Regents:
            name: Regent
            prefix: '&6'
            suffix: '&f'
        Privileged:
            name: Privileged
            prefix: '&e'
            suffix: '&7'
        VIPs:
            name: VIP
            prefix: '&2'
            suffix: '&7'
        Deputies:
            name: Deputy
            prefix: '&a'
            suffix: '&f'
        Mods:
            name: Mod
            prefix: '&6'
            suffix: '&f'
        Museum:
            chform: "[+world] +d: &a+message"
            meform: "[+world] * &a+n +message &f*"
        Donors:
            donortag: "[&aD&f]"
    That is my config, and yet giving all of the groups their own permissions for group.<groupname>, I see only the +{donortag}s defined in the users section, which is not posted.
     
  31. Offline

    Moparx

    For those wondering how to do it with PEX here is an example.

    Code:
    groups:
        Guest:
            default: true
            permissions:
            - group.guest
     
Thread Status:
Not open for further replies.

Share This Page