Interface IChatColorNMS


public interface IChatColorNMS
NMS abstraction interface for converting Bukkit ChatColor instances to AWT Color objects.

This interface provides version-specific implementations to handle the conversion between Minecraft's chat color system and Java's color representation.

  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable Color
    getColor(ChatColor chatColor)
    Converts a Bukkit ChatColor to an AWT Color object.
  • Method Details

    • getColor

      @Nullable @Nullable Color getColor(ChatColor chatColor)
      Converts a Bukkit ChatColor to an AWT Color object.

      This method attempts to map the given chat color to its corresponding RGB color value. Not all chat colors have direct color representations (such as formatting codes like BOLD, ITALIC, etc.).

      Parameters:
      chatColor - the ChatColor to convert
      Returns:
      the corresponding Color object, or null if the chat color cannot be converted to a color (e.g., formatting codes)