Package net.luckperms.api.query
Interface OptionKey<T>
-
- Type Parameters:
T- the option type
@NonExtendable public interface OptionKey<T>
Represents a key for a custom option defined inQueryOptions.It is intended that
OptionKeys are created and defined as follows.public static final OptionKey<String> SPECIAL_OPTION = OptionKey.of("special", String.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 OptionKey<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 OptionKey<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
-
-