Interface uSkyBlockAPI

All Superinterfaces:
org.bukkit.command.CommandExecutor, org.bukkit.plugin.Plugin, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor

public interface uSkyBlockAPI extends org.bukkit.plugin.Plugin
The public API of the uSkyBlock plugin. This API will not be changed without prior notice - allowing other plugins a way to access data from the uSkyBlock plugin. To get hold of an API object, make sure your plugin depends on uSkyBlock, and then do:

     uSkyBlockAPI api = Bukkit.getPluginManager().getPlugin("uSkyBlock");
     if (api != null && api.isEnabled()) {
         // Access the api here...
     } else {
         // Complain here
     }
 
Since:
v2.1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    getIslandInfo(org.bukkit.entity.Player player)
    Returns the island-information for the player, or null if none exist.
    getIslandInfo(org.bukkit.Location location)
    Returns the island-information for the supplied location, or null if none exist.
    double
    getIslandLevel(org.bukkit.entity.Player player)
    Returns the currently registered score for the given player.
    getIslandRank(org.bukkit.entity.Player player)
    Returns the current rank of the island of the supplied player.
    getIslandRank(org.bukkit.Location location)
    Returns the island (or null) of the location supplied.
    getPlayerInfo(org.bukkit.entity.Player player)
    Returns a PlayerInfo object for the player.
    getRanks(int offset, int length)
    Returns the rank-list.
    Convenience method for #getRanks(0, 10).
    boolean
    isGTE(String versionNumber)
    Convenience method to test the API version.

    Methods inherited from interface org.bukkit.command.CommandExecutor

    onCommand

    Methods inherited from interface org.bukkit.plugin.Plugin

    getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getLogger, getName, getPluginLoader, getResource, getServer, isEnabled, isNaggable, onDisable, onEnable, onLoad, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setNaggable

    Methods inherited from interface org.bukkit.command.TabCompleter

    onTabComplete
  • Method Details

    • getIslandLevel

      double getIslandLevel(org.bukkit.entity.Player player)
      Returns the currently registered score for the given player.
      Parameters:
      player - The player to check.
      Returns:
      The score, if available.
      Since:
      v2.1.0
    • getIslandRank

      IslandRank getIslandRank(org.bukkit.entity.Player player)
      Returns the current rank of the island of the supplied player.
      Parameters:
      player - The player to query for
      Returns:
      A rank-object for the given player, or null if none exist.
      Since:
      v2.3-HF2d
    • getRanks

      List<IslandLevel> getRanks(int offset, int length)
      Returns the rank-list.
      Parameters:
      offset - A 0-based offset.
      length - The max number of records to return.
      Returns:
      A list (possibly empty) of the entries within the designated range.
      Since:
      v2.1.0
    • getTopTen

      List<IslandLevel> getTopTen()
      Convenience method for #getRanks(0, 10).
      Returns:
      The top-ten list of islands.
      Since:
      v2.1.0
    • getIslandRank

      IslandRank getIslandRank(org.bukkit.Location location)
      Returns the island (or null) of the location supplied.
      Parameters:
      location - A location in the skyworld.
      Returns:
      The IslandRank or null of the given location.
      Since:
      v2.5.5
    • getIslandInfo

      IslandInfo getIslandInfo(org.bukkit.entity.Player player)
      Returns the island-information for the player, or null if none exist.
      Parameters:
      player - The player to query island-info for.
      Returns:
      the island-information for the player, or null if none exist.
      Since:
      2.6.2
    • isGTE

      boolean isGTE(String versionNumber)
      Convenience method to test the API version. Note: This will ofc. NOT work, if the deployed version is < 2.6.2 :) Usage:
      
           uSkyBlockAPI api = Bukkit.getPluginManager().getPlugin("uSkyBlock");
           if (api != null && api.isEnabled() && api.isGTE("2.6.2")) {
               // Access the api here...
           } else {
               // Complain here
           }
       
      Parameters:
      versionNumber - The version number to test against.
      Returns:
      Whether or not this version is Greather-Than-or-Equal to the version supplied.
      Since:
      2.6.2
    • getIslandInfo

      IslandInfo getIslandInfo(org.bukkit.Location location)
      Returns the island-information for the supplied location, or null if none exist.
      Parameters:
      location - The location to test for the existence of an island.
      Returns:
      the island-information for the supplied location, or null if none exist.
      Since:
      2.6.4
    • getPlayerInfo

      PlayerInfo getPlayerInfo(org.bukkit.entity.Player player)
      Returns a PlayerInfo object for the player.
      Parameters:
      player - The player to get a PlayerInfo for.
      Returns:
      a PlayerInfo object for the player.
      Since:
      2.7.0