[CHAT] Colors v2.0.2 (2.0.3b4) - Adds color to your chat [1.6.4-R2.0] [Permissions/bPermissions/PEX]

Discussion in 'Archived: Plugin Releases' started by tyzoid, Apr 23, 2011.

  1. Offline

    tyzoid

    [​IMG]
    Latest version:
    Dev Build:
    All Downloads:​

    Announcements:
    Beta 2.0.3b4 needs more extensive testing. It works fine on bPermissions/bPermissions nano
    Description: (open)

    Allows users to color their chat by using a configurable character (By default, the ampersand "&" and the carat "^") followed by a hexadecimal number (0-F). I recieved a request to post this plugin after someone used it on my server.

    Rainbow mode is toggled by a configurable command (by default "/colors" and "/colours"). This can be disabled in the settings.

    Admin can use the admin command (by default "/ca") to set and reset players' and groups' prefixes/suffixes. If you don't have permissions installed, the admin command will default to Op, and the two groups that will exist are: "Op" and "Default"

    Users can change their own prefixes and suffixes using configurable commands (by default "/prefix" and "/suffix").

    A small note about version numbers: x.y.z
    • X.Y represents the Minecraft version number that was out when the update was released.
    • The Z represents the release number.
    So the version 1.7.2 would indicate that it is the second release of the plugin, on minecraft 1.7

    Starting with version 2.0.0,
    The version number is unrelated to the minecraft version. It goes by major.minor.release
    Any questions, comments, suggestions, or plugin breaks (I'm not always on the latest version of CB), please post here.
    Video:
    Example: (open)

    Hello &9there.
    results in:
    Hello there.

    /colors Hello there.
    results in:
    [​IMG]
    (If the image isn't loading, click here.)
    List of Color Codes (open)

    [​IMG]
    The Admin Command: (open)

    Syntax
    /<colorsadmin> [set/get/remove/reset] [prefix/suffix] [p:/g:] <name> (<prefix/suffix>)

    Command breakdown:
    • [Set/get/remove/reset]
      • Required
      • Remove and reset are alises
      • Remove and reset removes the prefix/suffix
      • Set sets a prefix/suffix
      • Get tells the admin what the current prefix/suffix is
    • [prefix/suffix]
      • Required
      • Self explanatory
    • [p:/g:]
      • Required
      • p: tells the plugin you are setting the player's prefix/suffix
      • g: tells the plugin you are setting the group's prefix/suffix
    • <name>
      • Required
      • Fill it in with either the group, or player name, depending on what you put for [p:/g:]
    • (<prefix/suffix>)
      • Required in certain contexts
      • Only use if you are setting a username [set]
      • Just type in the prefix/suffix you want to set here.
    To color a name, just set a prefix with the last 2 characters be the hex code for the color (using the character set in the properties file).

    Example:
    /ca set prefix p: tyzoid &cAdmin &a
    When tyzoid (me) talks, it will look like this:
    <Admin Tyzoid> Hello.
    Permissions nodes: (open)

    Permissions nodes:
    • colors.hex
      • This is the node that allows people to use (or not use) the "&" or "^" character (or a different one, depending on your configuration) followed by a hexadecimal code.
    • colors.rainbow
      • This is the node that allows people to use (or not use) rainbow mode. (Use with care - can create an eyesore)
    • colors.admin
      • This is the node that allows people to use the admin commands. (Setting/resetting prefixes and suffixes) Use with care.
    • colors.prefix
      • This node allows users to change their own prefix.
    • colors.suffix
      • This node allows users to change their own suffix.
    • colors.reload
      • This node allows people to reload the settings in-game.
    Changelog: (open)

    Version 1.7.4
    • Added support for superperms
    • Added ability to reload configuration files in-game (Default command: /creload and /cr)
    • New permissions node
      • colors.reload
    • Added crash protection (If the server crashes, prefix/suffix data will not be lost.
    Version 1.7.3
    • Fixed bug #5
    Version 1.7.2
    • Added ability for players to color their own names.
    • added two new permissions nodes
      • colors.prefix
      • colors.suffix
    • The suffix no longer needs to be colored white.
    Version 1.7.1
    • Minor bugfixs
    • Player names are no longer case sensitive. (Group names still are)
    Version 1.6.2
    • Fixed bug #2
    • Fixed bug #3
    • Fixed bug #4
    Version 1.6.1
    • Build with a newer version of permissions
    • Fixed bug #1
    Version 1.5.5
    • Added admin commands.
    • Added a permissions node:
      • colors.admin
    • Added a few more configuration options.
    • Added Prefixes and suffixes.
    Version 1.5.4
    • Added permissions support.
    • Added two permissions nodes:
      • colors.hex
      • colors.rainbow
    Version 1.5.3
    • Added a configuration file.
    Version 1.5.2
    • Releasing my plugin by request.
    Bugs and Todo: (open)

    Bugs:
    1. Prefixes and suffixes clear if the server crashes.(Fixed in 1.6.1)
    2. Incompatibility with defaultCommands.(Fixed in 1.6.2)
    3. Individual suffix not setting.(Fixed in 1.6.2)
    4. Permissions nodes not working.(Fixed in 1.6.2)
    5. Bug with superperms not having groups.(Fixed in 1.7.3)
    6. Double chat with some chat plugins.(Fixed in 1.7.5)
    7. Player's name as "null"(Fixed in 2.0.0)
    8. Fix regex error.(Fixed in 2.0.1)
    9. Fix another permissions glitch.(Fixed in 2.0.1)
    10. Fix NPE when the person is offline.(Fixed in 2.0.1)
    Todo:
    • Add a configuration file.(Added in 1.5.3)
    • Add Permissions Support(Added in 1.5.4)
    • Add an admin command (by default "/ca") to allow prefixing names.(Added in 1.5.5)
    • Add ability of players (with permissions) to be able to color their own names.(Added in 1.7.2)
    • Support bukkit's new internal permissions manager.(Added in 1.7.4)
    • Add chat formatting. (Toggle-able)(Added in 2.0.0)
    • Add rainbow prefixes.(Added in 2.0.0)
    • Add color lock for messages.(Added in 2.0.0)
    • Implement support for PEX and bPermissions for groups.
     

    Attached Files:

  2. Offline

    insertt

    Ive try numerous times, running permissions 3.1.4, i just want to color prefix groups and i cant :s
    for example:
    [ADMIN] nick -
    [PLAYER] nick -
    Can anyone send me the groups.yml so i can take a look and apply? :|
     
  3. Offline

    tyzoid

    @insertt
    The files should be groups.list and players.list.
    They are located in the /plugins/Colors/ directory.

    In game, you want to type:
    /ca set prefix g: <groupname> &c[Admin] &f
    -or-
    /ca set prefix g: <groupname> &b[Player] &f

    Remember the group names are case-sensitive. The names for the groups come from permissions.

    @Joy
    I'll have to take a look at the problem. Does the double chat still occur?
     
  4. Nope :)
     
  5. Offline

    tyzoid

    That is INCREDIBLY odd... all I did is change the prefix loader, and compile with a newer version of permissions.

    I didn't even touch the chat portion of the code :)

    @Joy
    look at the configs again. I did the same thing, fixed the permissions config files, and it worked!

    in users.yaml,
    make sure the format is like this:
    Code:
    users:
        TheNo1Yeti:
            groups:
                - Admins
            permissions:
        Herpina:
            groups:
                - Moderator
            permissions:
                - 'herp.derp'
        Derpina:
            groups:
                - Admins
            info:
                prefix: '&4'
            permissions:
                - '-derp.derp'
    
    (Taken from the permissions example file)

    notice the plural groups: and notice the groups (- Admins) are on a new line

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2016
  6. I haven't even touched or tried prefixes.

    I simply asked a user with the colors.hex node to type "&3test" in local chat, and it shows " test" uncolored.
     
  7. Offline

    tyzoid

    It is working correctly for me... can you send me a zip of your /plugins/permissions/ folder and the /plugins/Colors/ folder?
     
  8. Well if it matters, I use PEX. But it's backwards compatible with PR 2.7 API, I presume you aren't directly reading permissions flatfiles :p
     
  9. Offline

    tyzoid

    Ill take a look at that.

    Edit: Post #42!
    YEAH!!!

    @Joy does the colors admin command work for non-ops?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2016
  10. Offline

    tyzoid

    @Joy
    Did the new recommended build solve the problem?
     
  11. Well I was running 858...I will test it again, but if nothing has changed to how this plugin handles permissions...
     
  12. Offline

    tyzoid

    @Joy
    I fixed your problem. Download 1.6.2
     
  13. Offline

    Darkskybandit52

    this is sort of a stupid question, but where can I find a list of the letters that correspond to a color?
     
  14. Offline

    tyzoid

  15. Offline

    Darkskybandit52

    Thank you very much for that link.
     
  16. Offline

    tyzoid

    No problem, and enjoy the plugin :)
     
  17. Offline

    tyzoid

    Can anyone verify that this works for the latest RB?

    I'm on vacation right now.

    Edit: Works fine!
     
  18. Offline

    Partyboi

    Hey tyzoid, i love your plugin, but i need to know. Can this plugin let me add color to someone's name? And if so does it work with display names from displaynamechanger plugin? Please reply. Thanks! [creeper]
     
  19. Offline

    tyzoid

    You can color usernames by setting the prefix to a color. It should work with the plugin, but I am not sure because I couldn't find it.
     
  20. Offline

    SpaceManiac

    @tyzoid Hey! As you may know the new Superperms system is out and a user wanted to know if you supported it. I checked the thread and you don't, so I wanted to let you know how you can adapt your plugin to support the new built-in Bukkit permissions. Here's what I posted regarding iChat and Simple Suffix:
     
  21. Offline

    AbsolutePolak

    Code:
    [SEVERE] Could not pass event PLAYER_COMMAND_PREPROCESS to Colors
    java.lang.ArrayIndexOutOfBoundsException: 0
    	at com.tyzoid.bukkit.colors.colorsPListener.getGroup(colorsPListener.java:340)
    	at com.tyzoid.bukkit.colors.colorsPListener.resetIxes(colorsPListener.java:322)
    	at com.tyzoid.bukkit.colors.colorsPListener.onPlayerCommandPreprocess(colorsPListener.java:117)
    	at org.bukkit.plugin.java.JavaPluginLoader$5.execute(JavaPluginLoader.java:272)
    	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
    	at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:706)
    	at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:677)
    	at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:670)
    	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:85)
    	at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    	at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Code:
    20:33:22 [SEVERE] Could not pass event PLAYER_JOIN to Colors
    java.lang.ArrayIndexOutOfBoundsException: 0
    	at com.tyzoid.bukkit.colors.colorsPListener.getGroup(colorsPListener.java:340)
    	at com.tyzoid.bukkit.colors.colorsPListener.resetIxes(colorsPListener.java:322)
    	at com.tyzoid.bukkit.colors.colorsPListener.onPlayerJoin(colorsPListener.java:314)
    	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:244)
    	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
    	at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:124)
    	at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:97)
    	at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:33)
    	at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
    	at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    running bukkit 1000 with superperms
     
  22. Offline

    tyzoid

    @AbsolutePolak
    I will look into it.

    @SpaceManiac
    Do you mean use the new system for prefixes/suffixes? or use it for permissions nodes?
     
  23. Offline

    SpaceManiac

    Both would be great! Check out how mChat is doing it as far as prefixes/suffixes, and take a look at PermissionsBukkit's plugin.yml for an example of permissions nodes. In fact, it looks like AbsolutePolak's problem is coming from his use of Superperms; you're trying to get the user's group, which is something SuperpermsBridge doesn't support - you should use an mChat-style setup for that too.
     
  24. Offline

    tyzoid

    My plugin saves the prefixes/suffixes independent of any permission system. When I looked into it earlier, it was the best way to do this. This method still works best in maintaining compatibility with different permissions systems - old and new.

    I looked into it, and it appears that bukkit's permissions doesn't support user groups. Would there be an alternative? or am I missing something.
     
  25. Offline

    SpaceManiac

    Ah, I see. Helpful! User groups aren't built-in to the system, but this was an intentional design decision. Instead of determining what group a user is in, check if they have a permission corresponding to any of the group names defined in the configuration (e.g. colors.group.admin for the admin colors or colors.group.guest for the guest colors).
     
  26. Download link is broken
     
  27. Offline

    Dothackking

    My admins are having the problem that their typing comes up twice.


    Also, can I make rainbow colored names with this, or not?
    Edit: I have narrowed it down to OPs.
     
  28. Offline

    tyzoid

    Just the OPs?

    What errors are returned? What CB build? What other plugins do you have?

    @Anthon Fredriksson
    DL link is up.

    @AbsolutePolak
    Did 1.7.3 fix your problem?

    There should be two groups on your server. Default and OP.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2016
  29. Offline

    KcHappy

    I have 3 groups: Admins, Moderator, and Builder. Admins is colored no issue.. but Moderator and Builder refuse to keep their color. I have it set as &d and &2 respectively, and every time I reset the server, it reverts back to %d and %2. What am I doing wrong here?
     
  30. Offline

    tyzoid

    so, you type
    then when they chat, it says
    If something else occurs please let me know. I'm not sure I got your post 100%.

    Edit 1: Remember, group names are case-sensitive.
    Edit 2: What permissions/group plugin are you using?
     
  31. Offline

    tyzoid

    I recommend updating to 1.7.4
     

Share This Page