Hello. I have seen some servers use this plugin, but have not found it. It changes your chat color with the simple command /color For example you may do /color &a, and they now chat in that color, or they can change it and do /color &c, and they now chat in that color. If someone knows of this plugin, please post a link or download to it below. Details if someone is willing to code one like it: Name: ChatColor Commands: /color (displays the message: Usage: /color <color code> ) /color <color code> : changes the color the players chat shows in to that color, so they can do /color &a and chat in light green until they change it. /color reset : resets their chat color to &f, white. /color <player> <color>: Changes the chat color of the specified player to the specified color code. Example: /color notch &a will make 'notch' chat in light green. Permissions: chatcolor.change - allows the user to change their chat color. defaultp chatcolor.reset - allows the user to reset their chat color. default: op chatcolor.others - allows the player to change other players chat color. default: op Thank you to anyone who could find a plugin similar to this or generously code one!
MacDev Done! <Edit by Moderator: Redacted mediafire url> EDIT: The permissions are chatcolor.change and chatcolor.others! To reset the chatcolor you just do /color &r Enjoy! - Jack
TheWolfBadger I took a look at the source and I saw that it doesn't save the player's chat color. Perhaps MacDev would like something like that?
The Gaming Grunts Works the same. Apparently there is no way to actually make a ChatColor variable from a string even with translating alternate color codes. It still works none the less...
TheWolfBadger ChatColor is an enum, enums have names, names are strings, enums have a method valueOf, pretty much string->enum
TheWolfBadger You could do something like this if you wanted: Code:java getConfig().set("some.path", "&4"); Depends on how you want to do it. You could do it with MySQL if you wanted, for example PHP: UPDATE sometable SET color='&4' WHERE player='someplayer';
timtower I'll try that out. Tell you how it goes. timtower The Gaming Grunts MacDev Ahh fixed! More efficient now! <Edit by Moderator: Redacted mediafire url> EDIT by Moderator: merged posts, please use the edit button instead of double posting.
TheWolfBadger what causes these errors? Code:java org.bukkit.command.CommandException: Unhandled exception executing command 'color' in plugin ChatColour v1.0 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[craft.jar:git-Bukkit-1.7.9-R0.2-10-ge6cd8c0-b3096jnks] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180) ~[craft.jar:git-Bukkit-1.7.9-R0.2-10-ge6cd8c0-b3096jnks] at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchCommand(CraftServer.java:742) ~[craft.jar:git-Bukkit-1.7.9-R0.2-10-ge6cd8c0-b3096jnks] at net.minecraft.server.v1_7_R3.PlayerConnection.handleCommand(PlayerConnection.java:956) [craft.jar:git-Bukkit-1.7.9-R0.2-10-ge6cd8c0-b3096jnks] at net.minecraft.server.v1_7_R3.PlayerConnection.a(PlayerConnection.java:817) [craft.jar:git-Bukkit-1.7.9-R0.2-10-ge6cd8c0-b3096jnks] at net.minecraft.server.v1_7_R3.PacketPlayInChat.a(PacketPlayInChat.java:28) [craft.jar:git-Bukkit-1.7.9-R0.2-10-ge6cd8c0-b3096jnks] at net.minecraft.server.v1_7_R3.PacketPlayInChat.handle(PacketPlayInChat.java:47) [craft.jar:git-Bukkit-1.7.9-R0.2-10-ge6cd8c0-b3096jnks] at net.minecraft.server.v1_7_R3.NetworkManager.a(NetworkManager.java:157) [craft.jar:git-Bukkit-1.7.9-R0.2-10-ge6cd8c0-b3096jnks] at net.minecraft.server.v1_7_R3.ServerConnection.c(SourceFile:134) [craft.jar:git-Bukkit-1.7.9-R0.2-10-ge6cd8c0-b3096jnks] at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:667) [craft.jar:git-Bukkit-1.7.9-R0.2-10-ge6cd8c0-b3096jnks] at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:260) [craft.jar:git-Bukkit-1.7.9-R0.2-10-ge6cd8c0-b3096jnks] at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:558) [craft.jar:git-Bukkit-1.7.9-R0.2-10-ge6cd8c0-b3096jnks] at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:469) [craft.jar:git-Bukkit-1.7.9-R0.2-10-ge6cd8c0-b3096jnks] at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [craft.jar:git-Bukkit-1.7.9-R0.2-10-ge6cd8c0-b3096jnks]Caused by: java.lang.IllegalArgumentException: No enum constant org.bukkit.ChatColor.&5 at java.lang.Enum.valueOf(Unknown Source) ~[?:1.7.0_60] at org.bukkit.ChatColor.valueOf(ChatColor.java:13) ~[craft.jar:git-Bukkit-1.7.9-R0.2-10-ge6cd8c0-b3096jnks] at com.core.wolfbadger.chat.colour.enjoy.Main.onCommand(Main.java:46) ~[?:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[craft.jar:git-Bukkit-1.7.9-R0.2-10-ge6cd8c0-b3096jnks] ... 13 more
TheWolfBadger currently it does'nt creat errors anymore but when I tried to chat still no colors and the "&" are presented with the chat..
TheWolfBadger Code: e.setMessage((String)this.cManager.get(p.getUniqueId()) + "" + e.getMessage()); here you are just appending the message to the String you get from your map. you should do: Code: e.setMessage(ChatColor.translateAlternateColorCodes('&',(String)this.cManager.get(p.getUniqueId()) + "" + e.getMessage())); Also you are still not saving anything to the config. EDIT: Actually this is a bad idea, as it will allow players to use color codes within their messages, which is not what was wanted I think...
CGA1123 Oh actually it's bc I tried to change the hashmap to store color codes and it didn't work so I reverted, but I forgot to revert that code back to it's original... Sorry KenoVincent. I will fix when I am on my computer though ! <Edit by Moderator: Redacted mediafire url> EDIT by Moderator: merged posts, please use the edit button instead of double posting.