Package net.luckperms.api.node.metadata
Interface NodeMetadataKey<T>
-
- Type Parameters:
T- the metadata type
@NonExtendable public interface NodeMetadataKey<T>
Represents a key for a specific type of node metadata.It is intended that
NodeMetadataKeys are obtained and stored as follows.public static final NodeMetadataKey<SpecialMetadata> SPECIAL_METADATA_KEY = NodeMetadataKey.of("specialmetadata", SpecialMetadata.class);
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description @NonNull Stringname()Gets a name describing the key type.static <T> @NonNull NodeMetadataKey<T>of(@NonNull String name, @NonNull Class<T> type)Creates a newNodeMetadataKeyfor the given name and type.@NonNull Class<T>type()Gets the type of the key
-
-
-
Method Detail
-
of
static <T> @NonNull NodeMetadataKey<T> of(@NonNull String name, @NonNull Class<T> type)
Creates a newNodeMetadataKeyfor the given name and type.Note that the returned key implements object reference equality.
- Type Parameters:
T- the type parameter- Parameters:
name- the nametype- the type- Returns:
- the key
-
-