Skip to content

AlonsoTagsAPI

AlonsoAliaga edited this page Aug 31, 2023 · 3 revisions

Access the API package:

com.alonsoaliaga.alonsotags.api.AlonsoTagsAPI

Available methods:

List getAvailableTags()

Get available tags identifiers.

boolean isLoaded(@Nonnull UUID uuid) [🔰 Added in 2.1-BETA-PRO]

Returns if player is loaded or not.

String getTag(String tagIdentifier)

Get display tag associated to the give tag identifier.

boolean hasTag(Player player)

Returns whether or not the player has a tag enabled or not. Returns false if player is null or offline.

boolean hasTag(Player player, String tagIdentifier)

Returns whether or not the player has the given tag identifier enabled. Returns false if player is null, offline or identifier is not valid.

String getTag(Player player)

Get player display tag. Returns null if player is null, offline or doesn't have any tag enabled.

String getRecognitionTitle(Player player) [🔰 PREMIUM ONLY - Added in 2.1-BETA-PRO]

Get player recognition title. Returns null if player is null, offline or doesn't have any tag enabled.

String getTagIdentifier(Player player)

Get player tag identifier. Returns null if player is null, offline or doesn't have any tag enabled.

boolean clearTag(Player player)

Clear player tag. Returns false if player is null, offline or doesn't have any tag enabled. Returns true if success.

boolean setTag(Player player, String tagIdentifier)

Set player tag. Returns false if player is null, offline or tag identifier is not valid.

Available events:

TagSelectEvent

When player selects a new tag. Fired also if player clears the current tag.