[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

    Jararered

    I actually learned a little more about the plugin last night, and yes, the player's name is actually null.

    Thanks for the feedback though, is there any current way to fix it? Like, restarting the server?

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

    tyzoid

    If the player logs off, and logs back in again, that typically solves the problem.
     
  4. Offline

    Jararered

    :D Thanks
     
  5. Offline

    tyzoid

    No problem :)

    I might not get to fix the problem until the weekend though :( I'm pretty busy with other things.

    A new update is out. It adds some features you have been looking for, including the color lock, rainbow prefixes and suffixes, and it allows you to change the default chat format.

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

    KoJoVe

    Hi, I'm Having some issues over here.
    I did not give permission for any group to use the colors plugin, but
    everyone still can set prefix, suffix and use the hex color scheme whenever they want!
    I just want to the admins to have access to the commands.
    What do I do?

    Can you help me? D:
     
  7. Offline

    tyzoid

    By default (unless you have permissions 2.x/3.x) players will be able to do those things. If you wanted to disable it, you'd have to explicitly set the permissions to false.
     
  8. Offline

    KoJoVe

    I'm using the bPermissions plugin. How do I set a permission to false?
    (colors.prefix: false did not worked)
     
  9. Offline

    codename_B

    NEVER but :true or :false after a node with bPermissions.

    To set a node to false it's "^colors.prefix"

    http://bpermissions.com
     
  10. Offline

    drowzzyy

    It would help ALOT if u made this plug in compatible with factions.
     
  11. Offline

    tyzoid

    I was unaware that this doesn't work with factions.

    Could you please elaborate on what exactly isn't working?
     
  12. Offline

    L24D

    Hey hey tyzoid
    I've got an unusual one for you.. :p

    So, It appears to be a regex error... formatting... or something of the sort...
    Happens whenever someone types something...

    Code:
    2012-01-22 13:07:53 [SEVERE] Could not pass event PLAYER_CHAT to Colors
    java.util.regex.PatternSyntaxException Unclosed character class near index 33
    [[Ljava.lang.String;@7da72267][Rr]
                                    ^
        at java.util.regex.Pattern.error(Unknown Source)
        at java.util.regex.Pattern.clazz(Unknown Source)
        at java.util.regex.Pattern.sequence(Unknown Source)
        at java.util.regex.Pattern.expr(Unknown Source)
        at java.util.regex.Pattern.compile(Unknown Source)
        at java.util.regex.Pattern.<init>(Unknown Source)
        at java.util.regex.Pattern.compile(Unknown Source)
        at java.lang.String.replaceAll(Unknown Source)
        at tk.tyzoid.plugins.colors.colorsPListener.onPlayerChat(colorsPListener.java:502)
        at org.bukkit.plugin.java.JavaPluginLoader$6.execute(JavaPluginLoader.java:300)
        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 org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:180)
        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:93)
        at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:550)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:527)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    I wish you the best of luck in finding the solution to the issue. :)
     
  13. Offline

    tyzoid

    Does the error occur if you give the user the permissions nodes "colors.hex" and "colors.rainbow"?
     
  14. Offline

    L24D

    tyzoid
    Nope... no error now. (only requires colors.hex) but the problem is, I don't want normal players to be able to use color codes in the chat :p
    That fixes that issue, but causes another....
    Maybe have a separate node for prefixes/suffixes? (colors.title or colors.prefix/suffix)
     
  15. Offline

    tyzoid

    We do have colors.prefix and colors.suffix

    They allow users to change their prefix/suffix with /prefix or /suffix
     
  16. Offline

    L24D

    Ah... ok..
    Nonetheless, i'm still stuck with the problem of being unable to limit the color codes for normal players, because of that error. :p
     
  17. Offline

    tyzoid

    I will do more testing, but I am not sure what is causing the error.

    Can you post your colors.properties file?

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

    L24D

    Of course :)

    Code:
    #
    #Fri Jan 27 15:44:04 EST 2012
    use-chat-formatting=true
    commands=/colors
    chat-formatting=*prefix*{*displayname*}*suffix* *message*
    suffix-commands=/suffix
    use-admin=true
    use-rainbow=true
    colorlock-commands=/cl,/color,/colorlock
    color-chars=&,\#
    prefix-commands=/prefix
    reload-commands=/creload,/cr
    admin-commands=/ca
    Its mostly unchanged... aside from the name label formatting...
    Only possible thing that would throw me a red flag, maybe the lack of a space between the asterisks... Other than that, I've no clue.
     
  19. Offline

    tyzoid

    L24D
    It appears you are missing a comma between the "\" and the "#" for the property color-chars
     
  20. Offline

    Gotomtom95

    [SEVERE] Could not pass event org.bukkit.event.player.PlayerChatEvent to Colors

    CB1830

    please fix this :(
     
  21. Offline

    tyzoid

    Can you please post the whole error?

    I've been able to replicate this issue.

    I will be working on a fix.

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

    tyzoid

    Update:
    I've fixed the issue, but now there is a bug that allows people to use the hex keys and rainbow regardless of permissions nodes. Once I fix this, I will post an update.
     
  23. Offline

    Gotomtom95

    awesome, thanks :)

    and, do you have any idea when you're going to support group prefixes for permissionsbukkit?
     
  24. Offline

    tyzoid

    I'm working on bPermissions first, but should be in a few weeks.
     
  25. Offline

    Trust518

    Im having problems with the plugin where i cant set other players prefixes like

    Example: /ca set prefix p: example &4[Example]-

    All that happends is = 0
    I can only set prefixes for players that are in the Admins group.. Problem :((?
     
  26. Offline

    tyzoid

    Does it give you any errors?
     
  27. Offline

    Trust518

    I dunno ive gone back to an older version of your plugin. (Ill try test it on a test server when i get back)

    Over and out.

    Its not doing the thing when im using it alone. Can it have something todo with permissions? And if it is
    Is it then a player that needs a node?

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

    tyzoid

    I believe the player needs to be online to use it.
     
  29. Offline

    Trust518

    Nono. My problem is

    NonOpPlayer: /ca set prefix p: 'name' 'prefix' (enter) then nothing appears to their prefix
    OpPlayer: same thing = has prefix

    I finaly noticed the error

    23:12:21 [SEVERE] Could not pass event org.bukkit.event.player.PlayerChatEvent t
    o Colors
    java.util.regex.PatternSyntaxException: Unclosed character class near index 33
    [[Ljava.lang.String;@641f89e1][Rr]
    ^
    at java.util.regex.Pattern.error(Unknown Source)
    at java.util.regex.Pattern.clazz(Unknown Source)
    at java.util.regex.Pattern.sequence(Unknown Source)
    at java.util.regex.Pattern.expr(Unknown Source)
    at java.util.regex.Pattern.compile(Unknown Source)
    at java.util.regex.Pattern.<init>(Unknown Source)
    at java.util.regex.Pattern.compile(Unknown Source)
    at java.lang.String.replaceAll(Unknown Source)
    at tk.tyzoid.plugins.colors.colorsPListener.onPlayerChat(colorsPListener
    .java:502)
    at org.bukkit.plugin.java.JavaPluginLoader$6.execute(JavaPluginLoader.ja
    va:305)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:57)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:453)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:742)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:725)
    at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:33)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:100)
    at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:7
    8)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:536)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:434)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)

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

    tyzoid

    Ok.
    I am aware of this problem.

    There should be an update soon.
     
  31. Offline

    Dominator1337

    I'm also using factions, and when I set "use-chat-formatting" to true, the prefixes/suffixes work, but it doesn't show anyone what faction they are in. When I set it to false, the prefixes/suffixes don't work, but it does show the factions. Is there a way to make it so that the prefixes and suffixes work as well as the factions? Or make this plugin work with factions?
     

Share This Page