public interface Contextual
Contexts determined.
Used primarily by ContextualServices.
| Modifier and Type | Method and Description |
|---|---|
Set<Context> |
getActiveContexts()
Calculates the objects active contexts at the given moment, using the
ContextCalculators held by the ContextualService. |
default Optional<String> |
getFriendlyIdentifier()
Returns the friendly identifier associated with this Contextual.
|
String |
getIdentifier()
Returns the identifier associated with this Contextual.
|
String getIdentifier()
The identifier of each distinct Contextual within a collection of contextuals should be unique.
Not guaranteed to be human-readable. Use
getFriendlyIdentifier() for a more readable alternative.
default Optional<String> getFriendlyIdentifier()
Unlike getIdentifier(), this value is not guaranteed to be
unique.
If the friendly identifier is equal to the normal identifier,
this method should return Optional.empty().
Contextuals which represent a Player or a User should return the username here, if available.
Set<Context> getActiveContexts()
ContextCalculators held by the ContextualService.
"Active" contexts refers to the contexts currently applicable to the contextual.
The result of these calculations may be cached.