Skip to main content

Overview

The SuperiorSkyblockAPI class is the main entry point for interacting with the SuperiorSkyblock2 plugin. It provides static methods to access various managers, retrieve player and island data, and perform core operations.

API Version

getAPIVersion()
int
Returns the current API version number. The version changes whenever modifications are made to the API.Current Version: 15

General Methods

getSuperiorSkyblock()
SuperiorSkyblock
Returns the plugin instance.

Player Methods

getPlayer(Player player)
SuperiorPlayer
Get the SuperiorPlayer wrapper from a Bukkit Player instance.Parameters:
  • player - The Bukkit player object
Returns: SuperiorPlayer object
getPlayer(String name)
@Nullable SuperiorPlayer
Get the SuperiorPlayer object by a player’s name.Parameters:
  • name - The player’s name
Returns: SuperiorPlayer object, or null if not found
getPlayer(UUID uuid)
SuperiorPlayer
Get the SuperiorPlayer object from a player’s UUID.Parameters:
  • uuid - The player’s UUID
Returns: SuperiorPlayer object, or null if doesn’t exist

Island Methods

createIsland(SuperiorPlayer, String, BigDecimal, Biome, String)
void
Create a new island.Parameters:
  • superiorPlayer - Owner of the island
  • schemName - The schematic of the island to be pasted
  • bonus - The default island bonus level
  • biome - The default island biome
  • islandName - The island name
createIsland(SuperiorPlayer, String, BigDecimal, Biome, String, boolean)
void
Create a new island with offset option.Parameters:
  • superiorPlayer - The new owner for the island
  • schemName - The schematic that should be used
  • bonus - A starting worth for the island
  • biome - A starting biome for the island
  • islandName - The name of the new island
  • offset - Should the island have an offset for its values? If disabled, the bonus will be given
createIsland(SuperiorPlayer, String, BigDecimal, BigDecimal, Biome, String, boolean)
void
Create a new island with separate worth and level bonuses.Parameters:
  • superiorPlayer - The new owner for the island
  • schemName - The schematic that should be used
  • bonusWorth - A starting worth for the island
  • bonusLevel - A starting level for the island
  • biome - A starting biome for the island
  • islandName - The name of the new island
  • offset - Should the island have an offset for its values? If disabled, the bonus will be given
deleteIsland(Island island)
void
Delete an island.Parameters:
  • island - The island to delete
getIsland(String islandName)
@Nullable Island
Get an island by its name.Parameters:
  • islandName - The name to check
Returns: The island with that name, or null if not found
getIslandByUUID(UUID uuid)
@Nullable Island
Get an island by its UUID.Parameters:
  • uuid - The UUID of the island
Returns: The island with that UUID, or null if not found
getSpawnIsland()
Island
Get the spawn island.Returns: The spawn island object
getIslandsWorld(Island, Dimension)
@Nullable World
Get the world of an island by the world’s dimension.Parameters:
  • island - The island to check
  • dimension - The world dimension
Returns: The world for that dimension, or null if disabled in config
getIslandAt(Location location)
@Nullable Island
Get an island at a specific location.Parameters:
  • location - The location to check
Returns: The island at that location, or null if none exists
calcAllIslands()
void
Calculate all island worths on the server.

Schematic Methods

getSchematic(String name)
@Nullable Schematic
Get a schematic object by its name.Parameters:
  • name - The schematic name
Returns: The schematic object, or null if not found

Provider Methods

setSpawnersProvider(SpawnersProvider)
void
Set custom spawners provider for the plugin.Parameters:
  • spawnersProvider - The spawner provider to set

Command Methods

registerCommand(SuperiorCommand)
void
Register a sub-command.Parameters:
  • superiorCommand - The sub command to register

Manager Access Methods

getGrid()
GridManager
Get the grid manager of the core.Returns: GridManager instance
getPlayers()
PlayersManager
Get the players manager of the core.Returns: PlayersManager instance
getSettings()
SettingsManager
Get the settings manager of the plugin.Returns: SettingsManager instance
getStackedBlocks()
StackedBlocksManager
Get the stacked-blocks manager of the core.
getBlockValues()
BlockValuesManager
Get the blocks manager of the core.
getSchematics()
SchematicManager
Get the schematics manager of the core.
getRoles()
RolesManager
Get the roles manager of the core.
getMissions()
MissionsManager
Get the missions manager of the core.
getMenus()
MenusManager
Get the menus manager of the core.
getKeys()
KeysManager
Get the keys manager of the core.
getProviders()
ProvidersManager
Get the providers manager of the core.
getUpgrades()
UpgradesManager
Get the upgrades manager of the core.
getCommands()
CommandsManager
Get the commands manager of the core.
getFactory()
FactoriesManager
Get the objects factory of the plugin.
getModules()
ModulesManager
Get the modules manager of the plugin.

Example Usage

import com.bgsoftware.superiorskyblock.api.SuperiorSkyblockAPI;
import com.bgsoftware.superiorskyblock.api.island.Island;
import com.bgsoftware.superiorskyblock.api.wrappers.SuperiorPlayer;
import org.bukkit.entity.Player;

public class Example {
    public void example(Player player) {
        // Get SuperiorPlayer wrapper
        SuperiorPlayer superiorPlayer = SuperiorSkyblockAPI.getPlayer(player);
        
        // Get player's island
        Island island = superiorPlayer.getIsland();
        
        // Get island at location
        Island islandAtLoc = SuperiorSkyblockAPI.getIslandAt(player.getLocation());
        
        // Access managers
        GridManager gridManager = SuperiorSkyblockAPI.getGrid();
        PlayersManager playersManager = SuperiorSkyblockAPI.getPlayers();
    }
}