AlonsoLeaguesAPI - AlonsoAliaga/AlonsoLeagues GitHub Wiki

AlonsoLeaguesAPI

AlonsoLeaguesAPI can be used to make some checks and modify player data easily.

com.alonsoaliaga.alonsoleagues.api.AlonsoLeaguesAPI

Available methods

List<String> getLeagues()

  • Returns available league identifiers. (Includes no ranked)

boolean isLoaded(UUID uuid)

  • Returns whether or not the player with that uuid is loaded.

boolean isRanked(UUID uuid)

  • Returns whether or not the player is ranked. (Is not in No Ranked league)

boolean isInLastRank(UUID uuid)

  • Returns whether or not the player is in last league.

boolean addPoints(UUID uuid, int points)

  • Add points to the player. Returns whether succes or not, returns false if player is not online or loaded.

boolean removePoints(UUID uuid, int points)

  • Remove points from player. Returns whether succes or not, returns false if player is not online or loaded.

boolean setPoints(UUID uuid, int points)

  • Set points for the player. Returns whether succes or not, returns false if player is not online or loaded.

int getPoints(UUID uuid)

  • Get player's points. Returns 0 if player is not online or loaded.

boolean setLeague(UUID uuid,@Nullable String newLeague)

  • Set player's league. Returns whether succes or not, returns false if player is not online, not loaded or is already in that league.

boolean String getLeague(UUID uuid)

  • Get player's league identifier.

Available events

PlayerLeagueChangeEvent

  • When player changes league.

PlayerRegisterEvent

  • When new player is registered.

ResetDataEvent

  • When player data is about to be deleted.
⚠️ **GitHub.com Fallback** ⚠️