Class ClientColor

java.lang.Object
dev.boze.api.render.ClientColor

public abstract class ClientColor extends Object
Represents a color provided by the client.

Concrete instances wrap client-side color implementations.
  • Constructor Details

    • ClientColor

      public ClientColor()
  • Method Details

    • getIdentifier

      public abstract String getIdentifier()
      Returns:
      Identifier for this color.

      Registered colors return their entry name. Defaults use _default for static/changing selections and _default_<gradient id> for gradients.
    • copy

      public abstract ClientColor copy()
      Returns:
      Lightweight copy referencing the same underlying client color
    • choose

      public abstract void choose(ClientColorBinding binding)
      Binds the given consumer to this color. The concrete implementation is responsible for forwarding the binding to the underlying color system.
      Parameters:
      binding - Binding owner that should be notified about deletions
    • unchoose

      public abstract void unchoose(ClientColorBinding binding)
      Removes the given consumer binding from this color.
      Parameters:
      binding - Binding owner
    • delete

      public abstract void delete()
      Deletes the underlying color if possible. Implementations should follow the same semantics as the client color system.