T
- The type of key.public static interface NucleusUserPreferenceService.PreferenceKey<T>
NucleusUserPreferenceService.PreferenceKey
Keys will only be accepted by the Nucleus system that are generated by it.
Modifier and Type | Method and Description |
---|---|
boolean |
canAccess(org.spongepowered.api.entity.living.player.User user)
Tests whether a user can change their preference.
|
Optional<T> |
getDefaultValue()
The default value for a preference, if any.
|
String |
getDescription()
The description of the preference.
|
String |
getID()
The ID of the key.
|
Class<T> |
getValueClass()
The type of value.
|
String getID()
Optional<T> getDefaultValue()
boolean canAccess(org.spongepowered.api.entity.living.player.User user)
user
- The user to checkString getDescription()