Class AttributeManager

java.lang.Object
net.minestom.server.attribute.AttributeManager

public final class AttributeManager extends Object
  • Constructor Details

    • AttributeManager

      public AttributeManager()
  • Method Details

    • register

      public void register(Attribute attribute)
      Register this attribute.
      See Also:
    • fromKey

      @Nullable public @Nullable Attribute fromKey(@NotNull @NotNull String key)
      Retrieves an attribute by its key.
      Parameters:
      key - the key of the attribute
      Returns:
      the attribute for the key or null if not any
    • values

      @NotNull public @NotNull Collection<@NotNull Attribute> values()
      Retrieves all registered attributes.
      Returns:
      an array containing all registered attributes