Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/BG-Software-LLC/SuperiorSkyblock2/llms.txt

Use this file to discover all available pages before exploring further.

The Island Warps API allows you to create, manage, and organize island warps for quick teleportation within islands.

Creating Warps

createWarp(String name, Location location, WarpCategory warpCategory)

Create a warp for the island.
name
String
required
The name of the warp
location
Location
required
The location of the warp
warpCategory
WarpCategory
The category for the warp, or null for no category
returns
IslandWarp
The newly created warp
import com.bgsoftware.superiorskyblock.api.island.Island;
import com.bgsoftware.superiorskyblock.api.island.warps.IslandWarp;
import org.bukkit.Location;

IslandWarp warp = island.createWarp(
    "spawn",
    player.getLocation(),
    null
);

createWarp(String name, WorldInfo worldInfo, WorldPosition position, WarpCategory warpCategory)

Create a warp using WorldInfo and WorldPosition.
name
String
required
The name of the warp
worldInfo
WorldInfo
required
The world of the warp
position
WorldPosition
required
The position of the warp
warpCategory
WarpCategory
The category for the warp, or null for no category
returns
IslandWarp
The newly created warp

Managing Warps

getWarp(String name)

Get a warp by its name.
name
String
required
The name of the warp
returns
IslandWarp
The warp, or null if not found
IslandWarp warp = island.getWarp("spawn");
if (warp != null) {
    // Warp exists
}

getWarp(Location location)

Get a warp at a specific location.
location
Location
required
The location to check
returns
IslandWarp
The warp at that location, or null if not found

getIslandWarps()

Get all warps on the island.
returns
Map<String, IslandWarp>
Map of warp names to warp objects
import java.util.Map;

Map<String, IslandWarp> warps = island.getIslandWarps();
for (Map.Entry<String, IslandWarp> entry : warps.entrySet()) {
    String name = entry.getKey();
    IslandWarp warp = entry.getValue();
    // Process warp
}

renameWarp(IslandWarp islandWarp, String newName)

Rename a warp.
islandWarp
IslandWarp
required
The warp to rename
newName
String
required
The new name for the warp
IslandWarp warp = island.getWarp("old-name");
if (warp != null) {
    island.renameWarp(warp, "new-name");
}

deleteWarp(String name)

Delete a warp by name.
name
String
required
The name of the warp to delete
island.deleteWarp("spawn");

deleteWarp(SuperiorPlayer superiorPlayer, Location location)

Delete a warp at a specific location.
superiorPlayer
SuperiorPlayer
The player requesting the operation, or null
location
Location
required
The location of the warp to delete

Warp Teleportation

warpPlayer(SuperiorPlayer superiorPlayer, String warpName)

Teleport a player to a warp.
superiorPlayer
SuperiorPlayer
required
The player to teleport
warpName
String
required
The name of the warp to teleport to
import com.bgsoftware.superiorskyblock.api.wrappers.SuperiorPlayer;

island.warpPlayer(superiorPlayer, "spawn");

warpPlayer(SuperiorPlayer superiorPlayer, String warpName, boolean force)

Teleport a player to a warp with force option.
superiorPlayer
SuperiorPlayer
required
The player to teleport
warpName
String
required
The name of the warp to teleport to
force
boolean
required
Whether to force the teleportation
// Force teleport (bypasses checks)
island.warpPlayer(superiorPlayer, "spawn", true);

Warp Categories

createWarpCategory(String name)

Create a new warp category.
name
String
required
The name of the category
returns
WarpCategory
The category (new or existing)
import com.bgsoftware.superiorskyblock.api.island.warps.WarpCategory;

WarpCategory category = island.createWarpCategory("public");

getWarpCategory(String name)

Get a warp category by name.
name
String
required
The name of the category
returns
WarpCategory
The category, or null if not found
WarpCategory category = island.getWarpCategory("public");

getWarpCategory(int slot)

Get a warp category by its slot in the manage menu.
slot
int
required
The menu slot
returns
WarpCategory
The category in that slot, or null
WarpCategory category = island.getWarpCategory(10);

getWarpCategories()

Get all warp categories.
returns
Map<String, WarpCategory>
Map of category names to category objects
Map<String, WarpCategory> categories = island.getWarpCategories();
for (WarpCategory category : categories.values()) {
    // Process category
}

renameCategory(WarpCategory warpCategory, String newName)

Rename a category.
warpCategory
WarpCategory
required
The category to rename
newName
String
required
The new name for the category
WarpCategory category = island.getWarpCategory("old-name");
if (category != null) {
    island.renameCategory(category, "new-name");
}

deleteCategory(WarpCategory warpCategory)

Delete a category and all its warps.
warpCategory
WarpCategory
required
The category to delete
WarpCategory category = island.getWarpCategory("unused");
if (category != null) {
    island.deleteCategory(category); // All warps in this category are deleted too
}

IslandWarp Interface

getIsland()

Get the island this warp belongs to.
returns
Island
The parent island

getName()

Get the name of the warp.
returns
String
The warp name

getLocation()

Get the location of the warp.
returns
Location
The warp location
Location warpLocation = warp.getLocation();

setLocation(Location location)

Set the location of the warp.
location
Location
required
The new location
warp.setLocation(player.getLocation());

hasPrivateFlag()

Check if the warp is private or public to visitors.
returns
boolean
True if the warp is private
if (warp.hasPrivateFlag()) {
    // Only island members can use this warp
}

setPrivateFlag(boolean privateFlag)

Set whether the warp is private.
privateFlag
boolean
required
True for private, false for public
warp.setPrivateFlag(true); // Make warp private

getRawIcon()

Get the icon of the warp without placeholder parsing.
returns
ItemStack
The raw icon, or null if no custom icon

getIcon(SuperiorPlayer superiorPlayer)

Get the icon after parsing placeholders.
superiorPlayer
SuperiorPlayer
The player to parse placeholders for, or null
returns
ItemStack
The parsed icon, or null if no custom icon
import org.bukkit.inventory.ItemStack;

ItemStack icon = warp.getIcon(superiorPlayer);

setIcon(ItemStack icon)

Set the icon of the warp.
icon
ItemStack
The icon to set, or null to remove
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;

ItemStack icon = new ItemStack(Material.ENDER_PEARL);
warp.setIcon(icon);

getCategory()

Get the category of the warp.
returns
WarpCategory
The warp’s category
WarpCategory category = warp.getCategory();

WarpCategory Interface

getIsland()

Get the island this category belongs to.
returns
Island
The parent island

getName()

Get the name of the category.
returns
String
The category name

getWarps()

Get all warps in this category.
returns
List<IslandWarp>
List of warps in the category
import java.util.List;

List<IslandWarp> warps = category.getWarps();
for (IslandWarp warp : warps) {
    // Process warp
}

getSlot()

Get the menu slot of the category.
returns
int
The slot number

setSlot(int slot)

Set the menu slot of the category.
slot
int
required
The slot to set
category.setSlot(10);

getRawIcon()

Get the icon without placeholder parsing.
returns
ItemStack
The raw icon

getIcon(SuperiorPlayer superiorPlayer)

Get the icon after parsing placeholders.
superiorPlayer
SuperiorPlayer
The player to parse placeholders for, or null
returns
ItemStack
The parsed icon

setIcon(ItemStack icon)

Set the icon of the category.
icon
ItemStack
The icon to set, or null for default

Example: Warp Management System

import com.bgsoftware.superiorskyblock.api.island.Island;
import com.bgsoftware.superiorskyblock.api.island.warps.IslandWarp;
import com.bgsoftware.superiorskyblock.api.island.warps.WarpCategory;
import com.bgsoftware.superiorskyblock.api.wrappers.SuperiorPlayer;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;

public class WarpManager {
    
    public void createPublicWarp(Island island, String name, Location location) {
        // Create public category if it doesn't exist
        WarpCategory publicCategory = island.getWarpCategory("public");
        if (publicCategory == null) {
            publicCategory = island.createWarpCategory("public");
            publicCategory.setSlot(0);
            publicCategory.setIcon(new ItemStack(Material.EMERALD));
        }
        
        // Create the warp
        IslandWarp warp = island.createWarp(name, location, publicCategory);
        warp.setPrivateFlag(false); // Make it public
        warp.setIcon(new ItemStack(Material.ENDER_PEARL));
    }
    
    public void createPrivateWarp(Island island, String name, Location location) {
        WarpCategory privateCategory = island.getWarpCategory("private");
        if (privateCategory == null) {
            privateCategory = island.createWarpCategory("private");
            privateCategory.setSlot(1);
            privateCategory.setIcon(new ItemStack(Material.REDSTONE));
        }
        
        IslandWarp warp = island.createWarp(name, location, privateCategory);
        warp.setPrivateFlag(true); // Make it private
    }
    
    public void teleportToWarp(Island island, SuperiorPlayer player, String warpName) {
        IslandWarp warp = island.getWarp(warpName);
        if (warp == null) {
            player.asPlayer().sendMessage("Warp not found!");
            return;
        }
        
        // Check if warp is private and player has permission
        if (warp.hasPrivateFlag() && !island.isMember(player)) {
            player.asPlayer().sendMessage("This warp is private!");
            return;
        }
        
        // Teleport
        island.warpPlayer(player, warpName);
    }
    
    public void listWarps(Island island, SuperiorPlayer player) {
        player.asPlayer().sendMessage("=== Island Warps ===");
        
        for (WarpCategory category : island.getWarpCategories().values()) {
            player.asPlayer().sendMessage("Category: " + category.getName());
            
            for (IslandWarp warp : category.getWarps()) {
                String privacy = warp.hasPrivateFlag() ? "Private" : "Public";
                player.asPlayer().sendMessage("  - " + warp.getName() + " (" + privacy + ")");
            }
        }
    }
    
    public void deleteAllWarpsInCategory(Island island, String categoryName) {
        WarpCategory category = island.getWarpCategory(categoryName);
        if (category != null) {
            island.deleteCategory(category);
        }
    }
}

Warp Limits

Warp limits are managed through the upgrade system:
// Get current warp limit
int warpsLimit = island.getWarpsLimit();

// Set warp limit
island.setWarpsLimit(10);

// Get raw warp limit (set via command)
int rawLimit = island.getWarpsLimitRaw();

// Check if can create more warps
if (island.getIslandWarps().size() >= island.getWarpsLimit()) {
    player.sendMessage("Warp limit reached!");
}

Build docs developers (and LLMs) love