Package dev.boze.api.render
Class ClientColor
java.lang.Object
dev.boze.api.render.ClientColor
Represents a color provided by the client.
Concrete instances wrap client-side color implementations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidchoose(ClientColorBinding binding) Binds the given consumer to this color.abstract ClientColorcopy()abstract voiddelete()Deletes the underlying color if possible.abstract Stringabstract voidunchoose(ClientColorBinding binding) Removes the given consumer binding from this color.
-
Constructor Details
-
ClientColor
public ClientColor()
-
-
Method Details
-
getIdentifier
- Returns:
- Identifier for this color.
Registered colors return their entry name. Defaults use
_defaultfor static/changing selections and_default_<gradient id>for gradients.
-
copy
- Returns:
- Lightweight copy referencing the same underlying client color
-
choose
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
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.
-