udayz.cs

give me a minecraft plugin with below things: give me 10message colors. Matlab jab koi player message krta ha to uska chat me jo color ata ha wo. all the 10chat colors must have 10different permission and commands to select. Add a status plaeholder to see which color is selected like "Selected:"

Kodari AI
KodariAug 5 at 5:27 am 1
ChatColorSelector
A Minecraft plugin that lets players customize their chat message colors. Features 10 distinct chat colors, each with its own permission and command to select. Players can choose from colors like red, blue, green, gold, aqua, yellow, light purple, dark red, dark green, and white. Each selection is stored per-player and applied automatically when they send chat messages. Includes a status placeholder showing the currently selected color, displayed as "Selected: [ColorName]" for easy reference. Commands are intuitive like /chatcolor red or /cc red, with proper permission checks. The plugin integrates with PlaceholderAPI for the status placeholder and uses Adventure API for modern text components.

I’ll create a Paper/Spigot plugin with:

  1. Ten selectable chat colors.

  2. Ten separate permissions and dedicated commands.

  3. /chatcolor management and status commands.

  4. Persistent player selections.

  5. PlaceholderAPI placeholder %chatcolors_selected%.

udayz.cs

do it like i can add specific color codes from config

Kodari AI
KodariAug 5 at 5:37 am 1
  1. Move all ten chat color values into config.yml.

  2. Read and apply each configured code when formatting chat messages.

  3. Keep the ten commands, permissions, status command, and PlaceholderAPI status placeholder unchanged.

  4. Support standard & codes and hex-style &x&... values from the config.

Implemented configurable chat colors.

Add or change these values in config.yml:

YAML
colors:
  red: '&c'
  blue: '&9'
  green: '&a'
  yellow: '&e'
  gold: '&6'
  aqua: '&b'
  light_purple: '&d'
  white: '&f'
  gray: '&7'
  dark_red: '&4'

The plugin now:

  • Uses the configured color for each player’s chat messages.

  • Supports normal color codes such as &c, &6, and &x.

  • Supports hex colors using &#RRGGBB, for example:

YAML
colors:
  red: '&#FF5555'
  blue: '&#5555FF'
  • Keeps all ten separate permissions and commands.

  • Keeps /chatcolor status and /cc status.

  • Keeps the PlaceholderAPI placeholders:

    • %chatcolors_selected%

    • %chatcolors_status%

After changing the config, restart the server or reload the plugin for the colors to update.

udayz.cs

do it like i can change their names from configt like if i don't want gold then i can rename it pink for example.

Kodari AI
KodariAug 5 at 5:45 am 1
  1. Make each of the ten color slots configurable with a display/name value and color code.

  2. Use configured names in selection, status, placeholder, invalid-color text, and tab completion.

  3. Keep the ten fixed permissions and dedicated commands stable, since Bukkit plugin.yml commands cannot be renamed dynamically from config.

Updated it so each color slot now has a configurable display name and code.

Example in config.yml:

YAML
colors:
  gold:
    name: 'Pink'
    code: '&d'

This changes:

  • /chatcolor gold selection to display Pink

  • Status to show Selected: Pink

  • Placeholder %chatcolors_selected% to show Selected: Pink

  • Tab completion to show Pink

  • The actual chat color to &d

You can configure all ten names:

YAML
colors:
  red:
    name: 'Red'
    code: '&c'
  blue:
    name: 'Blue'
    code: '&9'
  green:
    name: 'Green'
    code: '&a'
  yellow:
    name: 'Yellow'
    code: '&e'
  gold:
    name: 'Pink'
    code: '&d'
  aqua:
    name: 'Aqua'
    code: '&b'
  light_purple:
    name: 'Purple'
    code: '&5'
  white:
    name: 'White'
    code: '&f'
  gray:
    name: 'Gray'
    code: '&7'
  dark_red:
    name: 'Dark Red'
    code: '&4'

The internal IDs, permissions, and dedicated commands remain unchanged. For example, the gold slot still uses:

Plain Text
/chatgold
chatcolors.color.gold

Only its visible name can be changed to Pink.

udayz.cs

give me all the chatcolors command

Kodari AI
KodariAug 6 at 4:27 pm 1

All available commands:

Main command

Plain Text
/chatcolor <color>
/chatcolor status
/chatcolor selected

Alias:

Plain Text
/cc <color>
/cc status
/cc selected

Dedicated color commands

Command
Permission
/chatred
chatcolors.color.red
/chatblue
chatcolors.color.blue
/chatgreen
chatcolors.color.green
/chatyellow
chatcolors.color.yellow
/chatgold
chatcolors.color.gold
/chataqua
chatcolors.color.aqua
/chatlightpurple
chatcolors.color.light_purple
/chatwhite
chatcolors.color.white
/chatgray
chatcolors.color.gray
/chatdarkred
chatcolors.color.dark_red

Status permission

Plain Text
chatcolors.status

Example:

Plain Text
/chatcolor status

Output:

Plain Text
Selected: Pink

If you rename gold in the config:

YAML
colors:
  gold:
    name: 'Pink'
    code: '&d'

Then this will work:

Plain Text
/chatcolor pink

But the dedicated command remains:

Plain Text
/chatgold

The internal color ID and permission stay unchanged, so chatcolors.color.gold is still required.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
10 591
src/main/java/com/kodari/chatcolors/ChatColorsPlugin.java
package com.kodari.chatcolors;

import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

public final class ChatColorsPlugin extends JavaPlugin {
    private ChatColorManager chatColorManager;
    private ChatColorsPlaceholder placeholder;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        chatColorManager = new ChatColorManager(this);
        chatColorManager.load();

        ChatColorCommand commandExecutor = new ChatColorCommand(this, chatColorManager);
        String[] commandNames = {
                "chatcolor",
                "chatred",
                "chatblue",
                "chatgreen",
                "chatyellow",
                "chatgold",
                "chataqua",
                "chatlightpurple",
                "chatwhite",
                "chatgray",
                "chatdarkred"
        };

        for (String commandName : commandNames) {
            PluginCommand command = getCommand(commandName);

            if (command != null) {
                command.setExecutor(commandExecutor);
                command.setTabCompleter(commandExecutor);
            }
        }

        getServer().getPluginManager().registerEvents(new ChatColorListener(chatColorManager), this);

        if (getServer().getPluginManager().isPluginEnabled("PlaceholderAPI")) {
            placeholder = new ChatColorsPlaceholder(this, chatColorManager);
            placeholder.register();
            getLogger().info("PlaceholderAPI support enabled.");
        }

        getLogger().info("ChatColors enabled with 10 chat colors.");
    }

    @Override
    public void onDisable() {
        if (placeholder != null) {
            placeholder.unregister();
        }

        if (chatColorManager != null) {
            chatColorManager.save();
        }
    }
}