Class EnvironmentAttributeSupplier<V>

java.lang.Object
dev.wyck.wrapper.environment.attribute.EnvironmentAttributeSupplier<V>
Type Parameters:
V - the type of the attribute value
All Implemented Interfaces:
Keyed
Direct Known Subclasses:
FriendlyColorSupplier

@NullMarked @AsOf("2.1.0") public sealed class EnvironmentAttributeSupplier<V> extends Object implements Keyed permits FriendlyColorSupplier
A supplier for WrappedEnvironmentAttribute instances.
Since:
1.1.0
  • Constructor Details

    • EnvironmentAttributeSupplier

      @AsOf("1.1.0") public EnvironmentAttributeSupplier(EnvironmentAttribute<V> environmentAttribute)
      Creates a new WrappedEnvironmentAttributeSupplier with the given WrappedEnvironmentAttribute.
      Parameters:
      environmentAttribute - the WrappedEnvironmentAttribute to supply
  • Method Details

    • get

      @AsOf("1.1.0") public EnvironmentAttribute<V> get()
      Gets the WrappedEnvironmentAttribute from the supplier.
      Returns:
      the WrappedEnvironmentAttribute
    • unbox

      @AsOf("2.1.0") public EnvironmentAttribute<V> unbox(V value)
      Unboxes the value into a WrappedEnvironmentAttribute.
      Parameters:
      value - the value to unbox
      Returns:
      the WrappedEnvironmentAttribute
      Since:
      2.1.0
    • key

      @AsOf("3.0.0") public ResourceKey key()
      Gets the key of the attribute.
      Specified by:
      key in interface Keyed
      Returns:
      the key of the attribute
      Since:
      3.0.0