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

    Drakia

    Thanks :) Glad to see some appreciation.
     
  3. Offline

    Luc97

    @Drakia I'm sorry , it's not all your fault...
     
  4. Offline

    Learath2

    I updated my server to 1185 today i updated iChat too but it seems that iChat cant get my prefixes from Permissions. In the old version it was able to get them can you have a look ? thanks :)
     
  5. Offline

    Tiremo

    now you have a variable.yml. there are now important for ichat.so go in to your plugins folder and search the ichat folder.open the folder and look in to the variable.yml and write in there all prefixes etc.
     
  6. Offline

    Jäsef

    why do you think permissionsEX is such a bad plugin? works perfectly and has every function you could need

    If your right, what do you recommend? PermissionsBukkit or bPermissions. i'm looking for something user-friendly with a permission similar to '*' this is kinda why i use permissionsEX :p
     
  7. Offline

    cartman-2000

    Would it be possible to make it so that it doesn't use Permissions 2.x/3.x, if it detects the SuperPermBridge plugin on the server(Permissions 2.x/3.x compatibility bridge for SuperPerms.), the bridge presents itself as permissions v 2.7.7(2.7.4 was the last released version of the 2.x permissions plugin.).
     
  8. Offline

    I_ndex

    could you add PermissionsEX support?
     
    Jäsef likes this.
  9. Offline

    jeexbit

    Hi Drakia, excellent plugin, thanks for making this! I have been looking for a chat plugin that allows for different colored names specifically based on the world that a player is in - so for example, if someone is in the world called "survival" their name appears green, if they are in the nether their name is red, etc.

    I have tried experimenting with the variables a bit to achieve this but have had no luck so far. Is it even possible with this plugin? Perhaps I am missing something (I'm using Multiverse to handle the different worlds, if that matters). I figured it couldn't hurt to put this question out there and see if it is even possible and if someone has found a way to make names colored based on the world they are on.

    Many thanks in advance for any tips/ideas along the lines of getting this sort of functionality to work. Cheers.
     
  10. Offline

    compwiz91

    Alright quick question. If you think PEX is such a shitty plugin, what permissions plugin would you reccomend? cause I LOVE iChat and its worth changing permission plugin for.
     
  11. Offline

    Drakia

    Personally I use PermissionsBukkit for my testing, but am still using Permissions 2.x on my live server. I don't have any clue as to which is "best", I just know I dislike PEX.
     
  12. Offline

    ZachBora

    I use permissions 2.x on my server too.
     
  13. Offline

    Adrenaline

    Have strange error :confused:

    @Edit
    Okay.. ichat dont work at build higher than #1190

    Can you fix it ? :D


    PHP:
    [SEVEREError occurred while enabling iChat v2.4.0-final (Is it up to date?): tried to access method org.bukkit.craftbukkit.command.ColouredConsoleSender.<init>(Lorg/bukkit/craftbukkit/CraftServer;)V from class net.TheDgtl.iChat.iChat
    java
    .lang.IllegalAccessErrortried to access method org.bukkit.craftbukkit.command.ColouredConsoleSender.<init>(Lorg/bukkit/craftbukkit/CraftServer;)V from class net.TheDgtl.iChat.iChat
        at net
    .TheDgtl.iChat.iChat.onEnable(iChat.java:80)
        
    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:280)
        
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:172)
        
    at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:155)
        
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:297)
        
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:284)
        
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:152)
        
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
        
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
     
  14. Offline

    ZachBora

    It's not a recommended build, no reason for him to support it. Bukkit could change between now and the next recommended build.
     
  15. Offline

    cartman-2000


    http://ci.bukkit.org/job/dev-CraftBukkit/1192/changes
    one before this should work, but they blocked ColouredConsoleSenders in this build.
     
  16. Offline

    brzavr

    /ichat reload is NOT work
    only restart server
     
  17. Offline

    Craigdb

    The following was posted to me regarding MineBackup. Both that and iChat broke. 1190 was the last working build... this appears to be the reason why... I can only assume both plugins use the same hook.



    Caught this off of the bukkit twitter feed earlier. I don't know which build this went in for, but I'm going to assume 1190. And I'm going to assume a goodly number of plugins are going to break:

    http://j.mp/qPHaQE - Added server.getConsoleSender, blocked access to create a ConsoleCommandSender - Dinnerbone​
     
  18. Offline

    Drakia

    I'm well aware of this change.
     
  19. Offline

    zenyl

    > "Bug" found: /ichat reload doesn't reload the variables.yml :p
     
  20. Offline

    Perling

    Anyone now where is the Dev link to all ichat version?

    Do you need long for a new dev version?
     
  21. Offline

    Drakia

    [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

    From this version onward, if you're not using Permissions 2.x/3.x you MUST use the group.{name} node to specify a users group. I'd rather not have it this way, but with the switch to "SuperPerms" all hell has broken loose with permission plugins, there is no longer a standard method of doing anything.

    Also, even if you are using Perms 2.x/3.x your variables must be defined in variables.yml. This is to ease conversion to a different permission plugin when the time comes.
     
  22. Offline

    matt4471

    I have a quick question. SO if I want the Admin group to be gold, I give them the 'ichat.admin' Node?

    Sorry I am a noob -,0
     
  23. Offline

    Rytis

    No :D
     
  24. Offline

    Drakia

    You need to give them a group (group.admin) and then specify that groups prefix/suffix/name in variables.yml. This is all explained in the first post.
     
  25. Offline

    clownarthur

    i cant find the download for the config.yml. please help

    i mean the folder that holds all the info

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

    DQuaN

    I keep getting...

    Code:
    21:18:29 [SEVERE] Could not pass event PLAYER_CHAT to iChat
    java.lang.UnsupportedOperationException: Unsupported operation
            at com.platymuus.bukkit.permcompat.PermissionHandler.getUserPermissionSt
    ring(PermissionHandler.java:134)
            at net.TheDgtl.iChat.iChat.getPrefix(iChat.java:277)
            at net.TheDgtl.iChat.iChat.parseChat(iChat.java:208)
            at net.TheDgtl.iChat.playerListener.onPlayerChat(playerListener.java:39)
    
            at org.bukkit.plugin.java.JavaPluginLoader$6.execute(JavaPluginLoader.ja
    va:279)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:338)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:726)
    
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:714)
            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:464)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    21:18:29 [SEVERE] Could not pass event PLAYER_CHAT to iChat
    java.lang.UnsupportedOperationException: Unsupported operation
            at com.platymuus.bukkit.permcompat.PermissionHandler.getUserPermissionSt
    ring(PermissionHandler.java:134)
            at net.TheDgtl.iChat.iChat.getPrefix(iChat.java:277)
            at net.TheDgtl.iChat.iChat.parseChat(iChat.java:208)
            at net.TheDgtl.iChat.playerListener.onPlayerChat(playerListener.java:39)
    
            at org.bukkit.plugin.java.JavaPluginLoader$6.execute(JavaPluginLoader.ja
    va:279)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:338)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:726)
    
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:714)
            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:464)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
     
  27. Offline

    Drakia

    This information is auto-generated on first run.

    @DQuaN I don't know what version you're running, but it's definitely not the latest. iChat.java hasn't been > 277 lines long since 2.4.x
     
  28. Offline

    DQuaN

    Yikes! I'm sure I downloaded it from the top of this page! Let me try again!
     
  29. Offline

    clownarthur

    drakia i think this is has to do with the reload bug because it is not generating
     
  30. Offline

    DQuaN

    Now I get...

    Code:
    21:43:16 [SEVERE] java.lang.NullPointerException
    21:43:16 [SEVERE]       at net.minecraft.server.NetworkListenThread.a(SourceFile
    :63)
    21:43:16 [SEVERE]       at net.minecraft.server.NetLoginHandler.a(NetLoginHandle
    r.java:146)
    21:43:16 [SEVERE]       at net.minecraft.server.Packet254GetInfo.a(SourceFile:16
    )
    21:43:16 [SEVERE]       at net.minecraft.server.NetworkManager.b(NetworkManager.
    java:226)
    21:43:16 [SEVERE]       at net.minecraft.server.NetLoginHandler.a(NetLoginHandle
    r.java:41)
    21:43:16 [SEVERE]       at net.minecraft.server.NetworkListenThread.a(SourceFile
    :94)
    21:43:16 [SEVERE]       at net.minecraft.server.MinecraftServer.h(MinecraftServe
    r.java:464)
    21:43:16 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftSer
    ver.java:374)
    21:43:16 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(Sour
    ceFile:417)
    I'm not sure if it's related to iChat but it didn't happen before and now all formatting is gone. When i speak it says..
    [] DQuaN: blah blah blah
     
  31. Offline

    clownarthur

    can you post your folder with all the info on here so i can download that?
     
Thread Status:
Not open for further replies.

Share This Page