Skip to content

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.
Not passing any of the above checks results in a InvalidPlaceholderProviderException being thrown.

Parameters:

Throws:

  • InvalidPlaceholderProviderException - When the provided PlaceholderProvider 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:

Returns:

Possibly-null PlaceholderProvider instance.