AdvancedServerListAPI¶
Core class of the API for AdvancedServerList.
Use get()
to retrieve the instance currently used.
Method Summary
Modifier and Type | Method | Description |
---|---|---|
static AdvancedServerListAPI |
get()
|
Retrieve the instance used of this API. |
void |
addPlaceholderProvider(PlaceholderProvider)
|
Adds the provided PlaceholderProvider to the list, if it passes the following checks: |
nullable PlaceholderProvider |
retrievePlaceholderProvider(String)
|
Retrieves the PlaceholderProvider associated with the provided identifier, or null should no such entry exist. |
Method Detail
AdvancedServerListAPI
get()
¶
Retrieve the instance used of this API.
If no instance has been made so far will a new one be created.
Returns:¶
Instance of this API.
void
addPlaceholderProvider(PlaceholderProvider)
¶
Adds the provided PlaceholderProvider
to the list, if it passes the following checks:
- Provided PlaceholderProvider instance is not null.
- The identifier is not null nor empty.
- The identifier does not contain any spaces.
- A PlaceholderProvider with the same identifier doesn't exist already.
InvalidPlaceholderProviderException
being thrown.
Parameters:¶
-
PlaceholderProvider: placeholderProvider
- ThePlaceholderProvider
to add.
Throws:¶
-
InvalidPlaceholderProviderException
- When the providedPlaceholderProvider
instance is null, has a null or empty identifier, the identifier contains spaces, or another PlaceholderProvider with the same identifier is already in use.
PlaceholderProvider
retrievePlaceholderProvider(String)
¶
Retrieves the PlaceholderProvider
associated with the provided identifier, or null
should no such entry exist.
Parameters:¶
-
String: identifier
- The identifier to find a matchingPlaceholderProvider
for.
Returns:¶
Possibly-null PlaceholderProvider
instance.