loadChunk(World world, int chunkX, int chunkZ);
}
================================================
FILE: API/src/main/java/com/bgsoftware/superiorskyblock/api/hooks/EconomyProvider.java
================================================
package com.bgsoftware.superiorskyblock.api.hooks;
import com.bgsoftware.common.annotations.Nullable;
import com.bgsoftware.superiorskyblock.api.wrappers.SuperiorPlayer;
import java.math.BigDecimal;
public interface EconomyProvider {
/**
* Get the amount of money a specific user has in his bank.
*
* @param superiorPlayer The player to check.
*/
BigDecimal getBalance(SuperiorPlayer superiorPlayer);
/**
* Deposit money into a player's bank.
*
* @param superiorPlayer The player to deposit money to.
* @param amount The amount to deposit.
* @return A result object for the transaction.
*/
EconomyResult depositMoney(SuperiorPlayer superiorPlayer, double amount);
/**
* Withdraw money from a player's bank.
*
* @param superiorPlayer The player to withdraw money from.
* @param amount The amount to withdraw.
* @return A result object for the transaction.
*/
EconomyResult withdrawMoney(SuperiorPlayer superiorPlayer, double amount);
class EconomyResult {
@Nullable
private final String errorMessage;
private final double transactionMoney;
public EconomyResult(String errorMessage) {
this(errorMessage, 0);
}
public EconomyResult(double transactionMoney) {
this("", transactionMoney);
}
public EconomyResult(@Nullable String errorMessage, double transactionMoney) {
this.errorMessage = errorMessage;
this.transactionMoney = transactionMoney;
}
/**
* Get the error that occurred.
*/
@Nullable
public String getErrorMessage() {
return errorMessage;
}
/**
* Get the amount of money involved in the transaction.
*/
public double getTransactionMoney() {
return transactionMoney;
}
/**
* Check if the transaction has failed.
*/
public boolean hasFailed() {
return errorMessage != null && !errorMessage.isEmpty();
}
}
}
================================================
FILE: API/src/main/java/com/bgsoftware/superiorskyblock/api/hooks/EntitiesProvider.java
================================================
package com.bgsoftware.superiorskyblock.api.hooks;
import org.bukkit.entity.Entity;
public interface EntitiesProvider {
/**
* Should the plugin track the entity {@param entity}?
* This is relevant for spawning, de-spawning and entity limits.
*
* Please note: The entity provided to this function may be in unloaded chunks.
* Do not attempt to change its attributes in this method in any way.
*
* @param entity The entity to check.
*/
boolean shouldTrackEntity(Entity entity);
}
================================================
FILE: API/src/main/java/com/bgsoftware/superiorskyblock/api/hooks/LazyWorldsProvider.java
================================================
package com.bgsoftware.superiorskyblock.api.hooks;
import com.bgsoftware.common.annotations.Nullable;
import com.bgsoftware.superiorskyblock.api.island.Island;
import com.bgsoftware.superiorskyblock.api.world.Dimension;
import com.bgsoftware.superiorskyblock.api.world.WorldInfo;
import org.bukkit.World;
public interface LazyWorldsProvider extends WorldsProvider {
/**
* Prepare world for teleportation.
*
* @param island The target island.
* @param environment The environment of the world to prepare.
* @param finishCallback Callback function after the preparation is finished.
*/
@Deprecated
default void prepareWorld(Island island, World.Environment environment, Runnable finishCallback) {
prepareWorld(island, Dimension.getByName(environment.name()), finishCallback);
}
/**
* Prepare world for teleportation.
*
* @param island The target island.
* @param dimension The dimension of the world to prepare.
* @param finishCallback Callback function after the preparation is finished.
*/
void prepareWorld(Island island, Dimension dimension, Runnable finishCallback);
/**
* Get the {@link WorldInfo} of the world of an island by the environment.
* The world does not have to be loaded.
*
* @param island The island to check.
* @param environment The world environment.
* @return The world info for the given environment, or null if this environment is not enabled.
*/
@Deprecated
@Nullable
default WorldInfo getIslandsWorldInfo(Island island, World.Environment environment) {
return getIslandsWorldInfo(island, Dimension.getByName(environment.name()));
}
/**
* Get the {@link WorldInfo} of the world of an island by the dimension.
* The world does not have to be loaded.
*
* @param island The island to check.
* @param dimension The world dimension.
* @return The world info for the given dimension, or null if this dimension is not enabled.
*/
@Nullable
WorldInfo getIslandsWorldInfo(Island island, Dimension dimension);
/**
* Get the {@link WorldInfo} of the world of an island by its name.
* The world does not have to be loaded.
*
* @param island The island to check.
* @param worldName The name of the world.
* @return The world info for the given name, or null if this name is not an islands world.
*/
@Nullable
WorldInfo getIslandsWorldInfo(Island island, String worldName);
}
================================================
FILE: API/src/main/java/com/bgsoftware/superiorskyblock/api/hooks/MenusProvider.java
================================================
package com.bgsoftware.superiorskyblock.api.hooks;
import com.bgsoftware.common.annotations.Nullable;
import com.bgsoftware.superiorskyblock.api.island.Island;
import com.bgsoftware.superiorskyblock.api.island.IslandFlag;
import com.bgsoftware.superiorskyblock.api.island.IslandPrivilege;
import com.bgsoftware.superiorskyblock.api.island.PlayerRole;
import com.bgsoftware.superiorskyblock.api.island.SortingType;
import com.bgsoftware.superiorskyblock.api.island.warps.IslandWarp;
import com.bgsoftware.superiorskyblock.api.island.warps.WarpCategory;
import com.bgsoftware.superiorskyblock.api.menu.ISuperiorMenu;
import com.bgsoftware.superiorskyblock.api.menu.MenuIslandCreationConfig;
import com.bgsoftware.superiorskyblock.api.missions.MissionCategory;
import com.bgsoftware.superiorskyblock.api.schematic.Schematic;
import com.bgsoftware.superiorskyblock.api.wrappers.SuperiorPlayer;
public interface MenusProvider {
/**
* Initialize the menus.
*/
void initializeMenus();
/**
* Open the bank-logs menu.
* Used to display all logs of bank transactions.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetIsland The island to display bank logs for.
*/
void openBankLogs(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, Island targetIsland);
/**
* Refresh the bank-logs menu for a specific island.
*
* @param island The island to refresh the menus for.
*/
void refreshBankLogs(Island island);
/**
* Open the biomes-menu.
* Used to display and choose biomes for the island.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetIsland The island to change biomes for.
*/
void openBiomes(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, Island targetIsland);
/**
* Open the border-color menu.
* Used to change the color of the world border for a player.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
*/
void openBorderColor(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu);
/**
* Open the confirm-ban menu.
* Used to confirm a ban of an island member.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetIsland The island to ban the player from.
* @param bannedPlayer The player that will be banned.
*/
void openConfirmBan(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, Island targetIsland, SuperiorPlayer bannedPlayer);
/**
* Open the confirm-disband menu.
* Used to confirm disband of an island.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetIsland The island to disband.
*/
void openConfirmDisband(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, Island targetIsland);
/**
* Open the confirm-kick menu.
* Used to confirm a kick of an island member.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetIsland The island to kick the player from.
* @param kickedPlayer The player that will be kicked.
*/
void openConfirmKick(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, Island targetIsland, SuperiorPlayer kickedPlayer);
/**
* Open the confirm-leave menu.
* Used to confirm leaving of an island.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
*/
void openConfirmLeave(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu);
/**
* Open the confirm-transfer menu.
* Used to confirm the transfer of an island.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetIsland The island to ban the player from.
* @param newOwner The player that will be banned.
*/
void openConfirmTransfer(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, Island targetIsland, SuperiorPlayer newOwner);
/**
* Open the control-panel menu.
* Used when opening the control panel of an island.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetIsland The island to open the control panel of.
*/
void openControlPanel(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, Island targetIsland);
/**
* Open the coops menu.
* Used when opening the coops menu of an island.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetIsland The island to get coop-members from.
*/
void openCoops(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, Island targetIsland);
/**
* Refresh the coops-menu for a specific island.
*
* @param island The island to refresh the menus for.
*/
void refreshCoops(Island island);
/**
* Open the block-counts menu.
* Used when opening the counts menu of an island (using /is counts, for example)
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetIsland The island to get block counts from.
*/
void openCounts(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, Island targetIsland);
/**
* Refresh the counts-menu for a specific island.
*
* @param island The island to refresh the menus for.
*/
void refreshCounts(Island island);
/**
* Open the global-warps menu.
* Used when running the /is warp command.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
*/
void openGlobalWarps(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu);
/**
* Refresh the global-warps menu.
*/
void refreshGlobalWarps();
/**
* Open the island-bank menu.
* Used when running the /is bank command.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetIsland The island to open the bank for.
*/
void openIslandBank(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, Island targetIsland);
/**
* Refresh the island bank menu for a specific island.
*
* @param island The island to refresh the menus for.
*/
void refreshIslandBank(Island island);
/**
* Open the island-banned-players menu.
* Used when running the /is ban command.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetIsland The island to open the menu for.
*/
void openIslandBannedPlayers(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, Island targetIsland);
/**
* Refresh the banned-players menu for a specific island.
*
* @param island The island to refresh the menus for.
*/
void refreshIslandBannedPlayers(Island island);
/**
* Open the island-chests menu.
* Used to open the shared chests menu of an island.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetIsland The island to open the shared-chests menu for.
*/
void openIslandChest(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, Island targetIsland);
/**
* Refresh the island-chests menu for a specific island.
*
* @param island The island to refresh the menus for.
*/
void refreshIslandChest(Island island);
/**
* Get island creation config for specific schematic.
*
* @param schematic The schematic to get the creation config for.
*/
MenuIslandCreationConfig getIslandCreationConfig(Schematic schematic);
/**
* Open the islands-creation menu.
* Used when creating a new island.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param islandName The desired name of the new island.
*/
void openIslandCreation(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, String islandName);
/**
* Open the rate-menu.
* Used when giving a rating for an island.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetIsland The island to give a rating.
*/
void openIslandRate(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, Island targetIsland);
/**
* Open the ratings-menu.
* Used when checking given ratings of an island.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetIsland The island to get ratings from.
*/
void openIslandRatings(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, Island targetIsland);
/**
* Refresh the ratings-menu for a specific island.
*
* @param island The island to refresh the menus for.
*/
void refreshIslandRatings(Island island);
/**
* Open the member-manage menu.
* Used when managing an island member.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param islandMember The island member to manage.
*/
void openMemberManage(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, SuperiorPlayer islandMember);
/**
* Destroy the member-manage menus for a specific island member.
*
* @param islandMember The island member to close menus of.
*/
void destroyMemberManage(SuperiorPlayer islandMember);
/**
* Used to open the member-role menu.
* Used when changing a role of an island member.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param islandMember The island member to change role for.
*/
void openMemberRole(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, SuperiorPlayer islandMember);
/**
* Destroy the member-role menus for a specific island member.
*
* @param islandMember The island member to close menus of.
*/
void destroyMemberRole(SuperiorPlayer islandMember);
/**
* Open the members-menu.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetIsland The island to check the members of.
*/
void openMembers(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, Island targetIsland);
/**
* Refresh the members-menu for a specific island.
*
* @param island The island to refresh the menus for.
*/
void refreshMembers(Island island);
/**
* Open the missions-menu.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
*/
void openMissions(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu);
/**
* Open the missions-menu of a specific category.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param missionCategory The category to get missions from.
*/
void openMissionsCategory(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, MissionCategory missionCategory);
/**
* Refresh the missions-menu for a specific category.
*
* @param missionCategory The category to refresh the menus for.
*/
void refreshMissionsCategory(MissionCategory missionCategory);
/**
* Open the permissions-menu.
* Used when changing island-permissions of a player on an island.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetIsland The island to change permissions in.
* @param permissiblePlayer The player to change permissions for.
*/
void openPermissions(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu,
Island targetIsland, SuperiorPlayer permissiblePlayer);
/**
* Open the permissions-menu.
* Used when changing island-permissions of an island-role on an island.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetIsland The island to change permissions in.
* @param permissibleRole The island-role to change permissions for.
*/
void openPermissions(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu,
Island targetIsland, PlayerRole permissibleRole);
/**
* Refresh the permissions-menu for a specific island.
*
* @param island The island to refresh the menus for.
*/
void refreshPermissions(Island island);
/**
* Refresh the permissions-menu of a player for a specific island.
*
* @param island The island to refresh the menus for.
* @param permissiblePlayer The player to change permissions.
*/
void refreshPermissions(Island island, SuperiorPlayer permissiblePlayer);
/**
* Refresh the permissions-menu of an island role for a specific island.
*
* @param island The island to refresh the menus for.
* @param permissibleRole The island role to change permissions for.
*/
void refreshPermissions(Island island, PlayerRole permissibleRole);
/**
* Update the island permission in the menu.
*
* @param islandPrivilege The permission to update.
*/
void updatePermission(IslandPrivilege islandPrivilege);
/**
* Open the player-language menu.
* Used when a player changes his language.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
*/
void openPlayerLanguage(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu);
/**
* Open the island-settings menu.
* Used when changing island-settings.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetIsland The island to change settings for.
*/
void openSettings(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, Island targetIsland);
/**
* Refresh the island-settings menu for a specific island.
*
* @param island The island to refresh the menus for.
*/
void refreshSettings(Island island);
/**
* Update the island settings in the menu.
*
* @param islandFlag The settings to update.
*/
void updateSettings(IslandFlag islandFlag);
/**
* Open the top-islands menu.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param sortingType The type of sorting of islands to use.
*/
void openTopIslands(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, SortingType sortingType);
/**
* Refresh the top-islands menu for a specific sorting type.
*
* @param sortingType The sorting type to refresh.
*/
void refreshTopIslands(SortingType sortingType);
/**
* Open the unique-visitors menu.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetIsland The island to get visitors from.
*/
void openUniqueVisitors(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, Island targetIsland);
/**
* Refresh the unique-visitors menu for a specific island.
*
* @param island The island to refresh the menus for.
*/
void refreshUniqueVisitors(Island island);
/**
* Open the upgrades-menu.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetIsland The island to get upgrade levels from.
*/
void openUpgrades(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, Island targetIsland);
/**
* Refresh the upgrades-menu for a specific island.
*
* @param island The island to refresh the menus for.
*/
void refreshUpgrades(Island island);
/**
* Open the values-menu.
* Used when right-clicking an island in the top-islands menu.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetIsland The island to get values from.
*/
void openValues(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, Island targetIsland);
/**
* Refresh the values-menu for a specific island.
*
* @param island The island to refresh the menus for.
*/
void refreshValues(Island island);
/**
* Open the visitors-menu.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetIsland The island to get visitors from.
*/
void openVisitors(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, Island targetIsland);
/**
* Refresh the visitors-menu for a specific island.
*
* @param island The island to refresh the menus for.
*/
void refreshVisitors(Island island);
/**
* Open the warp categories menu
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetIsland The island to get warp categories from.
*/
void openWarpCategories(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, Island targetIsland);
/**
* Refresh the warp categories menu for a specific island.
*
* @param island The island to refresh the menus for.
*/
void refreshWarpCategories(Island island);
/**
* Destroy the warp-categories menus for a specific island.
*
* @param island The island to close menus of.
*/
void destroyWarpCategories(Island island);
/**
* Open the warp-category icon edit menu.
* Used when editing an icon of a warp category.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetCategory The warp category to edit the icon for.
*/
void openWarpCategoryIconEdit(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, WarpCategory targetCategory);
/**
* Open the warp category manage menu.
* Used when managing a warp category.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetCategory The warp category to manage.
*/
void openWarpCategoryManage(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, WarpCategory targetCategory);
/**
* Refresh the warp category manage menu for a specific warp category.
*
* @param warpCategory The warp category to refresh the menus for.
*/
void refreshWarpCategoryManage(WarpCategory warpCategory);
/**
* Open the warp icon edit menu.
* Used when editing an icon of a warp.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetWarp The warp to edit the icon for.
*/
void openWarpIconEdit(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, IslandWarp targetWarp);
/**
* Open the warp manage menu.
* Used when managing a warp.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetWarp The warp to manage.
*/
void openWarpManage(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, IslandWarp targetWarp);
/**
* Refresh the warp manage menu for a specific warp.
*
* @param islandWarp The warp to refresh the menus for.
*/
void refreshWarpManage(IslandWarp islandWarp);
/**
* Open the warps-menu.
* Used to look for all warps in a category.
*
* @param targetPlayer The player to open the menu for.
* @param previousMenu The previous menu that was opened, if exists.
* @param targetCategory The category to get warps from.
*/
void openWarps(SuperiorPlayer targetPlayer, @Nullable ISuperiorMenu previousMenu, WarpCategory targetCategory);
/**
* Refresh the warps-menu for a specific island.
*
* @param warpCategory The warp category to refresh the menus for.
*/
void refreshWarps(WarpCategory warpCategory);
/**
* Destroy the warp-categories menus for a specific warp category.
*
* @param warpCategory The warp category to close menus of.
*/
void destroyWarps(WarpCategory warpCategory);
}
================================================
FILE: API/src/main/java/com/bgsoftware/superiorskyblock/api/hooks/PermissionsProvider.java
================================================
package com.bgsoftware.superiorskyblock.api.hooks;
import org.bukkit.entity.Player;
public interface PermissionsProvider {
/**
* Check whether a player has permission.
*
* @param player The player to check permissions for.
* @param permission The permission to check.
* @return whether the player has permission excluding his operator status.
* This means that the permission must be given explicitly to the player for the method to return true.
*/
boolean hasPermission(Player player, String permission);
}
================================================
FILE: API/src/main/java/com/bgsoftware/superiorskyblock/api/hooks/PricesProvider.java
================================================
package com.bgsoftware.superiorskyblock.api.hooks;
import com.bgsoftware.common.annotations.Nullable;
import com.bgsoftware.superiorskyblock.api.key.Key;
import java.math.BigDecimal;
import java.util.concurrent.CompletableFuture;
public interface PricesProvider {
/**
* Get price of a block/item.
*
* @param key The key of the block or the item.
* @return The price of that block/item.
*/
BigDecimal getPrice(Key key);
/**
* Get the correct block-key for a price.
* Mostly used for legacy-versions where data values of blocks can be ignored.
*
* @param blockKey The original block-key.
* @return The correct-block key for a price.
*/
@Nullable
Key getBlockKey(Key blockKey);
/**
* Get a CompletableFuture that is completed when all prices and data of this provider are ready.
*/
default CompletableFuture getWhenPricesAreReady() {
return CompletableFuture.completedFuture(null);
}
}
================================================
FILE: API/src/main/java/com/bgsoftware/superiorskyblock/api/hooks/SpawnersProvider.java
================================================
package com.bgsoftware.superiorskyblock.api.hooks;
import com.bgsoftware.common.annotations.Nullable;
import com.bgsoftware.superiorskyblock.api.objects.Pair;
import org.bukkit.Location;
import org.bukkit.inventory.ItemStack;
public interface SpawnersProvider {
/**
* Get a pair that represents information about a spawner in a specific location.
* This method is called async first, and if the string in the pair is null, it will be called synced later.
* The integer represents the amount of spawners in that location, and the string represents the entity type.
*
* @param location The location to check.
*/
Pair getSpawner(Location location);
/**
* Get the spawner type from an item.
* May return null in-case the spawner has no entity inside it.
*
* @param itemStack The item to check.
*/
@Nullable
String getSpawnerType(ItemStack itemStack);
}
================================================
FILE: API/src/main/java/com/bgsoftware/superiorskyblock/api/hooks/SpawnersSnapshotProvider.java
================================================
package com.bgsoftware.superiorskyblock.api.hooks;
import org.bukkit.Chunk;
import org.bukkit.World;
/**
* SpawnersProvider based on snapshots, similar concept to ChunkSnapshot from Bukkit.
* The plugin will take a snapshot when calculating a chunk, and will release it once it's done
* calculation of that chunk. Snapshots are taken sync, however reading them is done async.
* Thread-safety must be implemented in order to not get weird issues.
*/
public interface SpawnersSnapshotProvider extends SpawnersProvider {
/**
* Take a snapshot of a chunk.
*
* @param chunk The chunk to take a snapshot of.
*/
void takeSnapshot(Chunk chunk);
/**
* Release a snapshot of a chunk.
*
* @param world The world of the chunk.
* @param chunkX The x-coords of the chunk.
* @param chunkZ The z-coords of the chunk.
*/
void releaseSnapshot(World world, int chunkX, int chunkZ);
}
================================================
FILE: API/src/main/java/com/bgsoftware/superiorskyblock/api/hooks/StackedBlocksProvider.java
================================================
package com.bgsoftware.superiorskyblock.api.hooks;
import com.bgsoftware.superiorskyblock.api.key.Key;
import com.bgsoftware.superiorskyblock.api.objects.Pair;
import org.bukkit.World;
import java.util.Collection;
public interface StackedBlocksProvider {
/**
* Get all stacked blocks in a chunk.
*
* @param world The world of the chunk.
* @param chunkX The x-coords of the chunk.
* @param chunkZ The z-coords of the chunk.
* @return Collection of pairs representing the stacked blocks.
* The key of the pair is a Key object of the block.
* The value of the pair is the amount of the block.
*/
Collection> getBlocks(World world, int chunkX, int chunkZ);
}
================================================
FILE: API/src/main/java/com/bgsoftware/superiorskyblock/api/hooks/StackedBlocksSnapshotProvider.java
================================================
package com.bgsoftware.superiorskyblock.api.hooks;
import org.bukkit.Chunk;
import org.bukkit.World;
/**
* StackedBlocksProvider based on snapshots, similar concept to ChunkSnapshot from Bukkit.
* The plugin will take a snapshot when calculating a chunk, and will release it once it's done
* calculation of that chunk. Snapshots are taken sync, however reading them is done async.
* Thread-safety must be implemented in order to not get weird issues.
*/
public interface StackedBlocksSnapshotProvider extends StackedBlocksProvider {
/**
* Take a snapshot of a chunk.
*
* @param chunk The chunk to take a snapshot of.
*/
void takeSnapshot(Chunk chunk);
/**
* Release a snapshot of a chunk.
*
* @param world The world of the chunk.
* @param chunkX The x-coords of the chunk.
* @param chunkZ The z-coords of the chunk.
*/
void releaseSnapshot(World world, int chunkX, int chunkZ);
}
================================================
FILE: API/src/main/java/com/bgsoftware/superiorskyblock/api/hooks/VanishProvider.java
================================================
package com.bgsoftware.superiorskyblock.api.hooks;
import org.bukkit.entity.Player;
public interface VanishProvider {
/**
* Check whether a player is vanished from online players.
*
* @param player The player to check
*/
boolean isVanished(Player player);
}
================================================
FILE: API/src/main/java/com/bgsoftware/superiorskyblock/api/hooks/WorldsProvider.java
================================================
package com.bgsoftware.superiorskyblock.api.hooks;
import com.bgsoftware.common.annotations.Nullable;
import com.bgsoftware.superiorskyblock.api.SuperiorSkyblockAPI;
import com.bgsoftware.superiorskyblock.api.hooks.listener.IWorldLoadListener;
import com.bgsoftware.superiorskyblock.api.island.Island;
import com.bgsoftware.superiorskyblock.api.world.Dimension;
import com.bgsoftware.superiorskyblock.api.wrappers.BlockPosition;
import org.bukkit.Location;
import org.bukkit.World;
import java.util.UUID;
public interface WorldsProvider {
/**
* Prepare all the island worlds on startup.
*/
void prepareWorlds();
/**
* Get the world of an island by the dimension.
* If the world is not loaded, this method should load the world before returning.
*
* @param dimension The world dimension.
* @param island The island to check.
*/
@Nullable
World getIslandsWorld(Island island, Dimension dimension);
/**
* Get the world of an island by the environment.
* If the world is not loaded, this method should load the world before returning.
*
* @param environment The world environment.
* @param island The island to check.
*/
@Deprecated
@Nullable
default World getIslandsWorld(Island island, World.Environment environment) {
return getIslandsWorld(island, Dimension.getByName(environment.name()));
}
/**
* Get the dimension of an islands world.
* If the island is not an islands world, null will be returned.
*
* @param world The world to check.
*/
@Nullable
Dimension getIslandsWorldDimension(World world);
/**
* Checks if the given world is an islands world.
*
* @param world The world to check.
*/
boolean isIslandsWorld(World world);
/**
* Get the location for a new island that is created.
*
* @param previousLocation The location of the previous island that was created.
* @param islandsHeight The default islands height.
* @param maxIslandSize The default maximum island size.
* @param islandOwner The owner of the island.
* @param islandUUID The UUID of the island.
* @deprecated See {@link #getNextLocation(BlockPosition, int, int, UUID, UUID)}
*/
default Location getNextLocation(Location previousLocation, int islandsHeight, int maxIslandSize, UUID islandOwner, UUID islandUUID) {
return getNextLocation(SuperiorSkyblockAPI.getFactory().createBlockPosition(previousLocation),
islandsHeight, maxIslandSize, islandOwner, islandUUID);
}
/**
* Get the location for a new island that is created.
*
* @param previousPosition The position of the previous island that was created.
* @param islandsHeight The default islands height.
* @param maxIslandSize The default maximum island size.
* @param islandOwner The owner of the island.
* @param islandUUID The UUID of the island.
*/
Location getNextLocation(BlockPosition previousPosition, int islandsHeight, int maxIslandSize, UUID islandOwner, UUID islandUUID);
/**
* Callback upon finishing of creation of islands.
*
* @param islandLocation The location of the new island.
* @param islandOwner The owner of the island.
* @param islandUUID The UUID of the island.
*/
void finishIslandCreation(Location islandLocation, UUID islandOwner, UUID islandUUID);
/**
* Prepare teleportation of an entity to an island.
*
* @param island The target island.
* @param location The location that the entity will be teleported to.
* @param finishCallback Callback function after the preparation is finished.
*/
void prepareTeleport(Island island, Location location, Runnable finishCallback);
/**
* Check whether or not normal worlds are enabled.
*/
default boolean isNormalEnabled() {
return isDimensionEnabled(Dimension.getByName("NORMAL"));
}
/**
* Check whether or not normal worlds are unlocked for islands by default.
*/
default boolean isNormalUnlocked() {
return isDimensionUnlocked(Dimension.getByName("NORMAL"));
}
/**
* Check whether or not nether worlds are enabled.
*/
default boolean isNetherEnabled() {
return isDimensionEnabled(Dimension.getByName("NETHER"));
}
/**
* Check whether or not nether worlds are unlocked for islands by default.
*/
default boolean isNetherUnlocked() {
return isDimensionUnlocked(Dimension.getByName("NETHER"));
}
/**
* Check whether or not end worlds are enabled.
*/
default boolean isEndEnabled() {
return isDimensionEnabled(Dimension.getByName("THE_END"));
}
/**
* Check whether or not end worlds are unlocked for islands by default.
*/
default boolean isEndUnlocked() {
return isDimensionUnlocked(Dimension.getByName("THE_END"));
}
/**
* Check whether a dimension is enabled on the server.
*
* @param dimension The dimension to check.
*/
boolean isDimensionEnabled(Dimension dimension);
/**
* Check whether a dimension is unlocked for islands by default.
*/
boolean isDimensionUnlocked(Dimension dimension);
/**
* Add a listener to when worlds are loaded by the provider.
* This is called by the plugin to listen to changes and fix things within island worlds.
*
* @param worldLoadListener The callback to listener.
*/
default void addWorldLoadListener(IWorldLoadListener worldLoadListener) {
throw new UnsupportedOperationException("This operation is not supported by this WorldProvider.");
}
}
================================================
FILE: API/src/main/java/com/bgsoftware/superiorskyblock/api/hooks/listener/ISkinsListener.java
================================================
package com.bgsoftware.superiorskyblock.api.hooks.listener;
import com.bgsoftware.superiorskyblock.api.wrappers.SuperiorPlayer;
/**
* Listener for changes of skins of players.
*/
public interface ISkinsListener {
/**
* Update the skin of a player.
*
* @param superiorPlayer The player to update the skin for.
*/
void setSkinTexture(SuperiorPlayer superiorPlayer);
}
================================================
FILE: API/src/main/java/com/bgsoftware/superiorskyblock/api/hooks/listener/IStackedBlocksListener.java
================================================
package com.bgsoftware.superiorskyblock.api.hooks.listener;
import org.bukkit.OfflinePlayer;
import org.bukkit.block.Block;
/**
* Listener for changes of stacked-blocks
*/
public interface IStackedBlocksListener {
/**
* Record a block-action related to stacked-blocks.
*
* @param offlinePlayer The player that interacted with the stacked-block.
* @param block The stacked-block
* @param action The action that was performed.
*/
void recordBlockAction(OfflinePlayer offlinePlayer, Block block, Action action);
enum Action {
BLOCK_PLACE,
BLOCK_BREAK
}
}
================================================
FILE: API/src/main/java/com/bgsoftware/superiorskyblock/api/hooks/listener/IWorldLoadListener.java
================================================
package com.bgsoftware.superiorskyblock.api.hooks.listener;
import com.bgsoftware.superiorskyblock.api.hooks.WorldsProvider;
import com.bgsoftware.superiorskyblock.api.hooks.world.WorldLoadFlags;
import com.bgsoftware.superiorskyblock.api.world.Dimension;
import org.bukkit.World;
/**
* Listener used for {@link WorldsProvider#addWorldLoadListener(IWorldLoadListener)}
*/
public interface IWorldLoadListener {
/**
* The method to be called when a world is loaded.
*
* @param world The world that was loaded.
* @param worldDimension The dimension of the world.
* @param flags Flags to what the listener can do. More info at {@link WorldLoadFlags}
*/
void onWorldLoad(World world, Dimension worldDimension, @WorldLoadFlags int flags);
}
================================================
FILE: API/src/main/java/com/bgsoftware/superiorskyblock/api/hooks/listener/IWorldsListener.java
================================================
package com.bgsoftware.superiorskyblock.api.hooks.listener;
/**
* Listener for updates of worlds.
*/
public interface IWorldsListener {
/**
* Load a world.
*
* @param worldName the name of the world to load.
*/
void loadWorld(String worldName);
}
================================================
FILE: API/src/main/java/com/bgsoftware/superiorskyblock/api/hooks/world/WorldLoadFlags.java
================================================
package com.bgsoftware.superiorskyblock.api.hooks.world;
import com.bgsoftware.superiorskyblock.api.hooks.listener.IWorldLoadListener;
/**
* The integer value element annotated with {@link WorldLoadFlags} represents flags related to what to do
* when a world is loaded. It is mainly used within the default {@link IWorldLoadListener} interface of the plugin.
*/
public @interface WorldLoadFlags {
/**
* Enable dragon fights for end worlds.
*/
int END_DRAGON_FIGHT = 1 << 0;
/**
* Remove the anti-xray world patches.
*/
int REMOVE_ANTI_XRAY = 1 << 1;
/**
* Update the ocean level of the world to the configured islands-height.
*/
int UPDATE_OCEAN_LEVEL = 1 << 2;
/**
* Make the plugin listen to block neighbor changes and self-changing blocks.
*/
int LISTEN_BLOCK_CHANGES = 1 << 3;
}
================================================
FILE: API/src/main/java/com/bgsoftware/superiorskyblock/api/island/BlockChangeResult.java
================================================
package com.bgsoftware.superiorskyblock.api.island;
/**
* Result of one of the block change methods of {@link Island}
*/
public enum BlockChangeResult {
/**
* No blocks were available in the block counts map provided.
*/
NO_AVAILABLE_BLOCKS,
/**
* The block provided had no value configured for it and therefore was not tracked.
*/
MISSING_BLOCK_VALUE,
/**
* Tried to track a block change for the spawn island.
*/
SPAWN_ISLAND,
/**
* The block change was tracked successfully.
*/
SUCCESS
}
================================================
FILE: API/src/main/java/com/bgsoftware/superiorskyblock/api/island/DelegateIsland.java
================================================
package com.bgsoftware.superiorskyblock.api.island;
import com.bgsoftware.common.annotations.Nullable;
import com.bgsoftware.common.annotations.Size;
import com.bgsoftware.superiorskyblock.api.data.DatabaseBridge;
import com.bgsoftware.superiorskyblock.api.enums.MemberRemoveReason;
import com.bgsoftware.superiorskyblock.api.enums.Rating;
import com.bgsoftware.superiorskyblock.api.island.algorithms.IslandBlocksTrackerAlgorithm;
import com.bgsoftware.superiorskyblock.api.island.algorithms.IslandCalculationAlgorithm;
import com.bgsoftware.superiorskyblock.api.island.algorithms.IslandEntitiesTrackerAlgorithm;
import com.bgsoftware.superiorskyblock.api.island.bank.IslandBank;
import com.bgsoftware.superiorskyblock.api.island.cache.IslandCache;
import com.bgsoftware.superiorskyblock.api.island.warps.IslandWarp;
import com.bgsoftware.superiorskyblock.api.island.warps.WarpCategory;
import com.bgsoftware.superiorskyblock.api.key.Key;
import com.bgsoftware.superiorskyblock.api.missions.Mission;
import com.bgsoftware.superiorskyblock.api.objects.Pair;
import com.bgsoftware.superiorskyblock.api.persistence.PersistentDataContainer;
import com.bgsoftware.superiorskyblock.api.service.message.IMessageComponent;
import com.bgsoftware.superiorskyblock.api.upgrades.Upgrade;
import com.bgsoftware.superiorskyblock.api.upgrades.UpgradeLevel;
import com.bgsoftware.superiorskyblock.api.world.Dimension;
import com.bgsoftware.superiorskyblock.api.world.WorldInfo;
import com.bgsoftware.superiorskyblock.api.wrappers.BlockPosition;
import com.bgsoftware.superiorskyblock.api.wrappers.SuperiorPlayer;
import com.bgsoftware.superiorskyblock.api.wrappers.WorldPosition;
import org.bukkit.Chunk;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.block.Biome;
import org.bukkit.block.Block;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.EntityType;
import org.bukkit.potion.PotionEffectType;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
public class DelegateIsland implements Island {
protected final Island handle;
protected DelegateIsland(Island handle) {
this.handle = handle;
}
@Override
public SuperiorPlayer getOwner() {
return this.handle.getOwner();
}
@Override
public UUID getUniqueId() {
return this.handle.getUniqueId();
}
@Override
public long getCreationTime() {
return this.handle.getCreationTime();
}
@Override
public String getCreationTimeDate() {
return this.handle.getCreationTimeDate();
}
@Override
public void updateDatesFormatter() {
this.handle.updateDatesFormatter();
}
@Override
public IslandCache getCache() {
return this.handle.getCache();
}
@Override
public List getIslandMembers(boolean includeOwner) {
return this.handle.getIslandMembers(includeOwner);
}
@Override
public List getIslandMembers(PlayerRole... playerRoles) {
return this.handle.getIslandMembers(playerRoles);
}
@Override
public List getBannedPlayers() {
return this.handle.getBannedPlayers();
}
@Override
public List getIslandVisitors() {
return this.handle.getIslandVisitors();
}
@Override
public List getIslandVisitors(boolean vanishPlayers) {
return this.handle.getIslandVisitors(vanishPlayers);
}
@Override
public List getAllPlayersInside() {
return this.handle.getAllPlayersInside();
}
@Override
public List getUniqueVisitors() {
return this.handle.getUniqueVisitors();
}
@Override
public List> getUniqueVisitorsWithTimes() {
return this.handle.getUniqueVisitorsWithTimes();
}
@Override
public void inviteMember(SuperiorPlayer superiorPlayer) {
this.handle.inviteMember(superiorPlayer);
}
@Override
public void revokeInvite(SuperiorPlayer superiorPlayer) {
this.handle.revokeInvite(superiorPlayer);
}
@Override
public boolean isInvited(SuperiorPlayer superiorPlayer) {
return this.handle.isInvited(superiorPlayer);
}
@Override
public List getInvitedPlayers() {
return this.handle.getInvitedPlayers();
}
@Override
public void addMember(SuperiorPlayer superiorPlayer, PlayerRole playerRole) {
this.handle.addMember(superiorPlayer, playerRole);
}
@Override
@Deprecated
public void kickMember(SuperiorPlayer superiorPlayer) {
this.handle.kickMember(superiorPlayer);
}
@Override
public void removeMember(SuperiorPlayer superiorPlayer, MemberRemoveReason memberRemoveReason) {
this.handle.removeMember(superiorPlayer, memberRemoveReason);
}
@Override
public boolean isMember(SuperiorPlayer superiorPlayer) {
return this.handle.isMember(superiorPlayer);
}
@Override
public void banMember(SuperiorPlayer superiorPlayer) {
this.handle.banMember(superiorPlayer);
}
@Override
public void banMember(SuperiorPlayer superiorPlayer, @Nullable SuperiorPlayer whom) {
this.handle.banMember(superiorPlayer, whom);
}
@Override
public void unbanMember(SuperiorPlayer superiorPlayer) {
this.handle.unbanMember(superiorPlayer);
}
@Override
public boolean isBanned(SuperiorPlayer superiorPlayer) {
return this.handle.isBanned(superiorPlayer);
}
@Override
public void addCoop(SuperiorPlayer superiorPlayer) {
this.handle.addCoop(superiorPlayer);
}
@Override
public void removeCoop(SuperiorPlayer superiorPlayer) {
this.handle.removeCoop(superiorPlayer);
}
@Override
public boolean isCoop(SuperiorPlayer superiorPlayer) {
return this.handle.isCoop(superiorPlayer);
}
@Override
public List getCoopPlayers() {
return this.handle.getCoopPlayers();
}
@Override
public int getCoopLimit() {
return this.handle.getCoopLimit();
}
@Override
public int getCoopLimitRaw() {
return this.handle.getCoopLimitRaw();
}
@Override
public void setCoopLimit(int coopLimit) {
this.handle.setCoopLimit(coopLimit);
}
@Override
public void setPlayerInside(SuperiorPlayer superiorPlayer, boolean inside) {
this.handle.setPlayerInside(superiorPlayer, inside);
}
@Override
public boolean isVisitor(SuperiorPlayer superiorPlayer, boolean checkCoopStatus) {
return this.handle.isVisitor(superiorPlayer, checkCoopStatus);
}
@Override
public Location getCenter(Dimension dimension) {
return this.handle.getCenter(dimension);
}
@Override
public BlockPosition getCenterPosition() {
return this.handle.getCenterPosition();
}
@Override
public CompletableFuture accessIslandWorld(Dimension dimension) {
return this.handle.accessIslandWorld(dimension);
}
@Override
public Location getIslandHome(Dimension dimension) {
return this.handle.getIslandHome(dimension);
}
@Override
public WorldPosition getIslandHomePosition(Dimension dimension) {
return this.handle.getIslandHomePosition(dimension);
}
@Override
public Map getIslandHomesAsDimensions() {
return this.handle.getIslandHomesAsDimensions();
}
@Override
public Map getIslandHomes() {
return this.handle.getIslandHomes();
}
@Override
public void setIslandHome(Location homeLocation) {
this.handle.setIslandHome(homeLocation);
}
@Override
@Deprecated
public void setIslandHome(Dimension dimension, Location homeLocation) {
this.handle.setIslandHome(dimension, homeLocation);
}
@Override
public void setIslandHome(Dimension dimension, WorldPosition homePosition) {
this.handle.setIslandHome(dimension, homePosition);
}
@Override
public Location getVisitorsLocation(Dimension dimension) {
return this.handle.getVisitorsLocation(dimension);
}
@Override
public WorldPosition getVisitorsPosition(Dimension dimension) {
return this.handle.getVisitorsPosition(dimension);
}
@Override
public void setVisitorsLocation(@Nullable Location visitorsLocation) {
this.handle.setVisitorsLocation(visitorsLocation);
}
@Override
public void setVisitorsLocation(Dimension dimension, WorldPosition visitorsPosition) {
this.handle.setVisitorsLocation(dimension, visitorsPosition);
}
@Override
public Location getMinimum() {
return this.handle.getMinimum();
}
@Override
public BlockPosition getMinimumPosition() {
return this.handle.getMinimumPosition();
}
@Override
public Location getMinimumProtected() {
return this.handle.getMinimumProtected();
}
@Override
public BlockPosition getMinimumProtectedPosition() {
return this.handle.getMinimumProtectedPosition();
}
@Override
public Location getMaximum() {
return this.handle.getMaximum();
}
@Override
public BlockPosition getMaximumPosition() {
return this.handle.getMaximumPosition();
}
@Override
public Location getMaximumProtected() {
return this.handle.getMaximumProtected();
}
@Override
public BlockPosition getMaximumProtectedPosition() {
return this.handle.getMaximumProtectedPosition();
}
@Override
public List getAllChunks() {
return this.handle.getAllChunks();
}
@Override
public List getAllChunks(@IslandChunkFlags int flags) {
return this.handle.getAllChunks(flags);
}
@Override
public List getAllChunks(Dimension dimension) {
return this.handle.getAllChunks(dimension);
}
@Override
public List getAllChunks(Dimension dimension, @IslandChunkFlags int flags) {
return this.handle.getAllChunks(dimension, flags);
}
@Override
public List getLoadedChunks() {
return this.handle.getLoadedChunks();
}
@Override
public List getLoadedChunks(@IslandChunkFlags int flags) {
return this.handle.getLoadedChunks(flags);
}
@Override
public List getLoadedChunks(Dimension dimension) {
return this.handle.getLoadedChunks(dimension);
}
@Override
public List getLoadedChunks(Dimension dimension, @IslandChunkFlags int flags) {
return this.handle.getLoadedChunks(dimension, flags);
}
@Override
public List> getAllChunksAsync(Dimension dimension) {
return this.handle.getAllChunksAsync(dimension);
}
@Override
public List> getAllChunksAsync(Dimension dimension, @IslandChunkFlags int flags) {
return this.handle.getAllChunksAsync(dimension, flags);
}
@Override
public List> getAllChunksAsync(Dimension dimension, Consumer onChunkLoad) {
return this.handle.getAllChunksAsync(dimension, onChunkLoad);
}
@Override
public List> getAllChunksAsync(Dimension dimension,
@IslandChunkFlags int flags,
Consumer onChunkLoad) {
return this.handle.getAllChunksAsync(dimension, flags, onChunkLoad);
}
@Override
public void resetChunks() {
this.handle.resetChunks();
}
@Override
public void resetChunks(@Nullable Runnable onFinish) {
this.handle.resetChunks(onFinish);
}
@Override
public void resetChunks(Dimension dimension) {
this.handle.resetChunks(dimension);
}
@Override
public void resetChunks(Dimension dimension, Runnable onFinish) {
this.handle.resetChunks(dimension, onFinish);
}
@Override
public void resetChunks(@IslandChunkFlags int flags) {
this.handle.resetChunks(flags);
}
@Override
public void resetChunks(@IslandChunkFlags int flags, @Nullable Runnable onFinish) {
this.handle.resetChunks(flags, onFinish);
}
@Override
public void resetChunks(Dimension dimension, @IslandChunkFlags int flags) {
this.handle.resetChunks(dimension, flags);
}
@Override
public void resetChunks(Dimension dimension, @IslandChunkFlags int flags, Runnable onFinish) {
this.handle.resetChunks(dimension, flags, onFinish);
}
@Override
public boolean isInside(Location location) {
return this.handle.isInside(location);
}
@Override
public boolean isInside(Location location, int extraRadius) {
return this.handle.isInside(location, extraRadius);
}
@Override
public boolean isInside(Location location, double extraRadius) {
return this.handle.isInside(location, extraRadius);
}
@Override
public boolean isInside(BlockPosition blockPosition) {
return this.handle.isInside(blockPosition);
}
@Override
public boolean isInside(BlockPosition blockPosition, int extraRadius) {
return this.handle.isInside(blockPosition, extraRadius);
}
@Override
public boolean isInside(BlockPosition blockPosition, double extraRadius) {
return this.handle.isInside(blockPosition, extraRadius);
}
@Override
public boolean isInside(WorldPosition worldPosition) {
return this.handle.isInside(worldPosition);
}
@Override
public boolean isInside(WorldPosition worldPosition, int extraRadius) {
return this.handle.isInside(worldPosition, extraRadius);
}
@Override
public boolean isInside(WorldPosition worldPosition, double extraRadius) {
return this.handle.isInside(worldPosition, extraRadius);
}
@Override
public boolean isInside(Chunk chunk) {
return this.handle.isInside(chunk);
}
@Override
public boolean isInside(World world, int chunkX, int chunkZ) {
return this.handle.isInside(world, chunkX, chunkZ);
}
@Override
public boolean isInside(World world, int chunkX, int chunkZ, int extraRadius) {
return this.handle.isInside(world, chunkX, chunkZ, extraRadius);
}
@Override
public boolean isInside(World world, int chunkX, int chunkZ, double extraRadius) {
return this.handle.isInside(world, chunkX, chunkZ, extraRadius);
}
@Override
public boolean isInside(WorldInfo worldInfo, int chunkX, int chunkZ) {
return this.handle.isInside(worldInfo, chunkX, chunkZ);
}
@Override
public boolean isInside(WorldInfo worldInfo, int chunkX, int chunkZ, int extraRadius) {
return this.handle.isInside(worldInfo, chunkX, chunkZ, extraRadius);
}
@Override
public boolean isInside(WorldInfo worldInfo, int chunkX, int chunkZ, double extraRadius) {
return this.handle.isInside(worldInfo, chunkX, chunkZ, extraRadius);
}
@Override
public boolean isInside(int chunkX, int chunkZ) {
return this.handle.isInside(chunkX, chunkZ);
}
@Override
public boolean isInside(int chunkX, int chunkZ, int extraRadius) {
return this.handle.isInside(chunkX, chunkZ, extraRadius);
}
@Override
public boolean isInside(int chunkX, int chunkZ, double extraRadius) {
return this.handle.isInside(chunkX, chunkZ, extraRadius);
}
@Override
public boolean isInsideRange(Location location) {
return this.handle.isInsideRange(location);
}
@Override
public boolean isInsideRange(Location location, int extraRadius) {
return this.handle.isInsideRange(location, extraRadius);
}
@Override
public boolean isInsideRange(Location location, double extraRadius) {
return this.handle.isInsideRange(location, extraRadius);
}
@Override
public boolean isInsideRange(BlockPosition blockPosition) {
return this.handle.isInsideRange(blockPosition);
}
@Override
public boolean isInsideRange(BlockPosition blockPosition, int extraRadius) {
return this.handle.isInsideRange(blockPosition, extraRadius);
}
@Override
public boolean isInsideRange(BlockPosition blockPosition, double extraRadius) {
return this.handle.isInsideRange(blockPosition, extraRadius);
}
@Override
public boolean isInsideRange(WorldPosition worldPosition) {
return this.handle.isInsideRange(worldPosition);
}
@Override
public boolean isInsideRange(WorldPosition worldPosition, int extraRadius) {
return this.handle.isInsideRange(worldPosition, extraRadius);
}
@Override
public boolean isInsideRange(WorldPosition worldPosition, double extraRadius) {
return this.handle.isInsideRange(worldPosition, extraRadius);
}
@Override
public boolean isInsideRange(Chunk chunk) {
return this.handle.isInsideRange(chunk);
}
@Override
public boolean isInsideRange(World world, int chunkX, int chunkZ) {
return this.handle.isInsideRange(world, chunkX, chunkZ);
}
@Override
public boolean isInsideRange(World world, int chunkX, int chunkZ, int extraRadius) {
return this.handle.isInsideRange(world, chunkX, chunkZ, extraRadius);
}
@Override
public boolean isInsideRange(World world, int chunkX, int chunkZ, double extraRadius) {
return this.handle.isInsideRange(world, chunkX, chunkZ, extraRadius);
}
@Override
public boolean isInsideRange(WorldInfo worldInfo, int chunkX, int chunkZ) {
return this.handle.isInsideRange(worldInfo, chunkX, chunkZ);
}
@Override
public boolean isInsideRange(WorldInfo worldInfo, int chunkX, int chunkZ, int extraRadius) {
return this.handle.isInsideRange(worldInfo, chunkX, chunkZ, extraRadius);
}
@Override
public boolean isInsideRange(WorldInfo worldInfo, int chunkX, int chunkZ, double extraRadius) {
return this.handle.isInsideRange(worldInfo, chunkX, chunkZ, extraRadius);
}
@Override
public boolean isInsideRange(int chunkX, int chunkZ) {
return this.handle.isInsideRange(chunkX, chunkZ);
}
@Override
public boolean isInsideRange(int chunkX, int chunkZ, int extraRadius) {
return this.handle.isInsideRange(chunkX, chunkZ, extraRadius);
}
@Override
public boolean isInsideRange(int chunkX, int chunkZ, double extraRadius) {
return this.handle.isInsideRange(chunkX, chunkZ, extraRadius);
}
@Override
@Deprecated
public boolean isNormalEnabled() {
return this.handle.isNormalEnabled();
}
@Override
@Deprecated
public void setNormalEnabled(boolean enabled) {
this.handle.setNormalEnabled(enabled);
}
@Override
@Deprecated
public boolean isNetherEnabled() {
return this.handle.isNetherEnabled();
}
@Override
@Deprecated
public void setNetherEnabled(boolean enabled) {
this.handle.setNetherEnabled(enabled);
}
@Override
@Deprecated
public boolean isEndEnabled() {
return this.handle.isEndEnabled();
}
@Override
@Deprecated
public void setEndEnabled(boolean enabled) {
this.handle.setEndEnabled(enabled);
}
@Override
public boolean isDimensionEnabled(Dimension dimension) {
return this.handle.isDimensionEnabled(dimension);
}
@Override
public void setDimensionEnabled(Dimension dimension, boolean enabled) {
this.handle.setDimensionEnabled(dimension, enabled);
}
@Override
public Collection getUnlockedWorlds() {
return this.handle.getUnlockedWorlds();
}
@Override
public boolean hasPermission(CommandSender sender, IslandPrivilege islandPrivilege) {
return this.handle.hasPermission(sender, islandPrivilege);
}
@Override
public boolean hasPermission(SuperiorPlayer superiorPlayer, IslandPrivilege islandPrivilege) {
return this.handle.hasPermission(superiorPlayer, islandPrivilege);
}
@Override
public boolean hasPermission(PlayerRole playerRole, IslandPrivilege islandPrivilege) {
return this.handle.hasPermission(playerRole, islandPrivilege);
}
@Override
@Deprecated
public void setPermission(PlayerRole playerRole, IslandPrivilege islandPrivilege, boolean value) {
this.handle.setPermission(playerRole, islandPrivilege, value);
}
@Override
public void setPermission(PlayerRole playerRole, IslandPrivilege islandPrivilege) {
this.handle.setPermission(playerRole, islandPrivilege);
}
@Override
public void resetPermissions() {
this.handle.resetPermissions();
}
@Override
public void setPermission(SuperiorPlayer superiorPlayer, IslandPrivilege islandPrivilege, boolean value) {
this.handle.setPermission(superiorPlayer, islandPrivilege, value);
}
@Override
public void resetPermissions(SuperiorPlayer superiorPlayer) {
this.handle.resetPermissions(superiorPlayer);
}
@Override
public PermissionNode getPermissionNode(SuperiorPlayer superiorPlayer) {
return this.handle.getPermissionNode(superiorPlayer);
}
@Override
public PlayerRole getRequiredPlayerRole(IslandPrivilege islandPrivilege) {
return this.handle.getRequiredPlayerRole(islandPrivilege);
}
@Override
public Map getPlayerPermissions() {
return this.handle.getPlayerPermissions();
}
@Override
public Map getRolePermissions() {
return this.handle.getRolePermissions();
}
@Override
public boolean isSpawn() {
return this.handle.isSpawn();
}
@Override
public String getName() {
return this.handle.getName();
}
@Override
public void setName(String islandName) {
this.handle.setName(islandName);
}
@Override
@Deprecated
public String getRawName() {
return this.handle.getRawName();
}
@Override
public String getStrippedName() {
return this.handle.getStrippedName();
}
@Override
public String getFormattedName() {
return this.handle.getFormattedName();
}
@Override
public String getDescription() {
return this.handle.getDescription();
}
@Override
public void setDescription(String description) {
this.handle.setDescription(description);
}
@Override
public void disbandIsland() {
this.handle.disbandIsland();
}
@Override
public boolean transferIsland(SuperiorPlayer superiorPlayer) {
return this.handle.transferIsland(superiorPlayer);
}
@Override
public void replacePlayers(SuperiorPlayer originalPlayer, SuperiorPlayer newPlayer) {
this.handle.replacePlayers(originalPlayer, newPlayer);
}
@Override
public void calcIslandWorth(@Nullable SuperiorPlayer asker) {
this.handle.calcIslandWorth(asker);
}
@Override
public void calcIslandWorth(@Nullable SuperiorPlayer asker, @Nullable Runnable callback) {
this.handle.calcIslandWorth(asker, callback);
}
@Override
public IslandCalculationAlgorithm getCalculationAlgorithm() {
return this.handle.getCalculationAlgorithm();
}
@Override
public void updateBorder() {
this.handle.updateBorder();
}
@Override
public void updateIslandFly(SuperiorPlayer superiorPlayer) {
this.handle.updateIslandFly(superiorPlayer);
}
@Override
public int getIslandSize() {
return this.handle.getIslandSize();
}
@Override
public void setIslandSize(int islandSize) {
this.handle.setIslandSize(islandSize);
}
@Override
public int getIslandSizeRaw() {
return this.handle.getIslandSizeRaw();
}
@Override
public String getDiscord() {
return this.handle.getDiscord();
}
@Override
public void setDiscord(String discord) {
this.handle.setDiscord(discord);
}
@Override
public String getPaypal() {
return this.handle.getPaypal();
}
@Override
public void setPaypal(String paypal) {
this.handle.setPaypal(paypal);
}
@Override
public Biome getBiome() {
return this.handle.getBiome();
}
@Override
public void setBiome(Biome biome) {
this.handle.setBiome(biome);
}
@Override
public void setBiome(Biome biome, boolean updateBlocks) {
this.handle.setBiome(biome, updateBlocks);
}
@Override
public boolean isLocked() {
return this.handle.isLocked();
}
@Override
public void setLocked(boolean locked) {
this.handle.setLocked(locked);
}
@Override
public boolean isIgnored() {
return this.handle.isIgnored();
}
@Override
public void setIgnored(boolean ignored) {
this.handle.setIgnored(ignored);
}
@Override
public void sendMessage(String message) {
this.handle.sendMessage(message);
}
@Override
public void sendMessage(String message, UUID... ignoredMembers) {
this.handle.sendMessage(message, ignoredMembers);
}
@Override
public void sendMessage(IMessageComponent messageComponent) {
this.handle.sendMessage(messageComponent);
}
@Override
public void sendMessage(IMessageComponent messageComponent, Object... args) {
this.handle.sendMessage(messageComponent, args);
}
@Override
public void sendMessage(IMessageComponent messageComponent, List ignoredMembers) {
this.handle.sendMessage(messageComponent, ignoredMembers);
}
@Override
public void sendMessage(IMessageComponent messageComponent, List ignoredMembers, Object... args) {
this.handle.sendMessage(messageComponent, ignoredMembers, args);
}
@Override
public void sendTitle(@Nullable String title, @Nullable String subtitle, int fadeIn, int duration, int fadeOut) {
this.handle.sendTitle(title, subtitle, fadeIn, duration, fadeOut);
}
@Override
public void sendTitle(@Nullable String title, @Nullable String subtitle, int fadeIn, int duration, int fadeOut, UUID... ignoredMembers) {
this.handle.sendTitle(title, subtitle, fadeIn, duration, fadeOut, ignoredMembers);
}
@Override
public void executeCommand(String command, boolean onlyOnlineMembers) {
this.handle.executeCommand(command, onlyOnlineMembers);
}
@Override
public void executeCommand(String command, boolean onlyOnlineMembers, UUID... ignoredMembers) {
this.handle.executeCommand(command, onlyOnlineMembers, ignoredMembers);
}
@Override
public boolean isBeingRecalculated() {
return this.handle.isBeingRecalculated();
}
@Override
public void updateLastTime() {
this.handle.updateLastTime();
}
@Override
public void setCurrentlyActive() {
this.handle.setCurrentlyActive();
}
@Override
public void completeMission(Mission> mission) {
this.handle.completeMission(mission);
}
@Override
public void setCurrentlyActive(boolean active) {
this.handle.setCurrentlyActive(active);
}
@Override
public void resetMission(Mission> mission) {
this.handle.resetMission(mission);
}
@Override
public boolean isCurrentlyActive() {
return this.handle.isCurrentlyActive();
}
@Override
public boolean hasCompletedMission(Mission> mission) {
return this.handle.hasCompletedMission(mission);
}
@Override
public long getLastTimeUpdate() {
return this.handle.getLastTimeUpdate();
}
@Override
public boolean canCompleteMissionAgain(Mission> mission) {
return this.handle.canCompleteMissionAgain(mission);
}
@Override
public void setLastTimeUpdate(long lastTimeUpdate) {
this.handle.setLastTimeUpdate(lastTimeUpdate);
}
@Override
public int getAmountMissionCompleted(Mission> mission) {
return this.handle.getAmountMissionCompleted(mission);
}
@Override
public IslandBank getIslandBank() {
return this.handle.getIslandBank();
}
@Override
public void setAmountMissionCompleted(Mission> mission, int finishCount) {
this.handle.setAmountMissionCompleted(mission, finishCount);
}
@Override
public BigDecimal getBankLimit() {
return this.handle.getBankLimit();
}
@Override
public List> getCompletedMissions() {
return this.handle.getCompletedMissions();
}
@Override
public void setBankLimit(BigDecimal bankLimit) {
this.handle.setBankLimit(bankLimit);
}
@Override
public Map, Integer> getCompletedMissionsWithAmounts() {
return this.handle.getCompletedMissionsWithAmounts();
}
@Override
public BigDecimal getBankLimitRaw() {
return this.handle.getBankLimitRaw();
}
@Override
public DatabaseBridge getDatabaseBridge() {
return this.handle.getDatabaseBridge();
}
@Override
public boolean giveInterest(boolean checkOnlineOwner) {
return this.handle.giveInterest(checkOnlineOwner);
}
@Override
public PersistentDataContainer getPersistentDataContainer() {
return this.handle.getPersistentDataContainer();
}
@Override
public long getLastInterestTime() {
return this.handle.getLastInterestTime();
}
@Override
public boolean isPersistentDataContainerEmpty() {
return this.handle.isPersistentDataContainerEmpty();
}
@Override
public void setLastInterestTime(long lastInterest) {
this.handle.setLastInterestTime(lastInterest);
}
@Override
public void savePersistentDataContainer() {
this.handle.savePersistentDataContainer();
}
@Override
public long getNextInterest() {
return this.handle.getNextInterest();
}
@Override
public void handleBlockPlace(Block block) {
this.handle.handleBlockPlace(block);
}
@Override
public BlockChangeResult handleBlockPlaceWithResult(Block block) {
return this.handle.handleBlockPlaceWithResult(block);
}
@Override
public void handleBlockPlace(Key key) {
this.handle.handleBlockPlace(key);
}
@Override
public BlockChangeResult handleBlockPlaceWithResult(Key key) {
return this.handle.handleBlockPlaceWithResult(key);
}
@Override
public void handleBlockPlace(Block block, @Size int amount) {
this.handle.handleBlockPlace(block, amount);
}
@Override
public BlockChangeResult handleBlockPlaceWithResult(Block block, @Size int amount) {
return this.handle.handleBlockPlaceWithResult(block, amount);
}
@Override
public void handleBlockPlace(Key key, @Size int amount) {
this.handle.handleBlockPlace(key, amount);
}
@Override
public BlockChangeResult handleBlockPlaceWithResult(Key key, @Size int amount) {
return this.handle.handleBlockPlaceWithResult(key, amount);
}
@Override
public void handleBlockPlace(Block block, @Size int amount, @IslandBlockFlags int flags) {
this.handle.handleBlockPlace(block, amount, flags);
}
@Override
public BlockChangeResult handleBlockPlaceWithResult(Block block, @Size int amount, @IslandBlockFlags int flags) {
return this.handle.handleBlockPlaceWithResult(block, amount, flags);
}
@Override
public void handleBlockPlace(Key key, @Size int amount, @IslandBlockFlags int flags) {
this.handle.handleBlockPlace(key, amount, flags);
}
@Override
public BlockChangeResult handleBlockPlaceWithResult(Key key, @Size int amount, @IslandBlockFlags int flags) {
return this.handle.handleBlockPlaceWithResult(key, amount, flags);
}
@Override
@Deprecated
public void handleBlockPlace(Block block, @Size int amount, boolean save) {
this.handle.handleBlockPlace(block, amount, save);
}
@Override
@Deprecated
public void handleBlockPlace(Key key, @Size int amount, boolean save) {
this.handle.handleBlockPlace(key, amount, save);
}
@Override
@Deprecated
public void handleBlockPlace(Key key, BigInteger amount, boolean save) {
this.handle.handleBlockPlace(key, amount, save);
}
@Override
@Deprecated
public void handleBlockPlace(Key key, BigInteger amount, boolean save, boolean updateLastTimeStatus) {
this.handle.handleBlockPlace(key, amount, save, updateLastTimeStatus);
}
@Override
public void handleBlocksPlace(Map blocks) {
this.handle.handleBlocksPlace(blocks);
}
@Override
public Map handleBlocksPlaceWithResult(Map blocks) {
return this.handle.handleBlocksPlaceWithResult(blocks);
}
@Override
public void handleBlocksPlace(Map blocks, @IslandBlockFlags int flags) {
this.handle.handleBlocksPlace(blocks, flags);
}
@Override
public Map handleBlocksPlaceWithResult(Map blocks, @IslandBlockFlags int flags) {
return this.handle.handleBlocksPlaceWithResult(blocks, flags);
}
@Override
public void handleBlockBreak(Block block) {
this.handle.handleBlockBreak(block);
}
@Override
public BlockChangeResult handleBlockBreakWithResult(Block block) {
return this.handle.handleBlockBreakWithResult(block);
}
@Override
public void handleBlockBreak(Key key) {
this.handle.handleBlockBreak(key);
}
@Override
public BlockChangeResult handleBlockBreakWithResult(Key key) {
return this.handle.handleBlockBreakWithResult(key);
}
@Override
public void handleBlockBreak(Block block, @Size int amount) {
this.handle.handleBlockBreak(block, amount);
}
@Override
public BlockChangeResult handleBlockBreakWithResult(Block block, @Size int amount) {
return this.handle.handleBlockBreakWithResult(block, amount);
}
@Override
public void handleBlockBreak(Key key, @Size int amount) {
this.handle.handleBlockBreak(key, amount);
}
@Override
public BlockChangeResult handleBlockBreakWithResult(Key key, @Size int amount) {
return this.handle.handleBlockBreakWithResult(key, amount);
}
@Override
public void handleBlockBreak(Block block, @Size int amount, @IslandBlockFlags int flags) {
this.handle.handleBlockBreak(block, amount, flags);
}
@Override
public BlockChangeResult handleBlockBreakWithResult(Block block, @Size int amount, @IslandBlockFlags int flags) {
return this.handle.handleBlockBreakWithResult(block, amount, flags);
}
@Override
public void handleBlockBreak(Key key, @Size int amount, @IslandBlockFlags int flags) {
this.handle.handleBlockBreak(key, amount, flags);
}
@Override
public BlockChangeResult handleBlockBreakWithResult(Key key, @Size int amount, @IslandBlockFlags int flags) {
return this.handle.handleBlockBreakWithResult(key, amount, flags);
}
@Override
@Deprecated
public void handleBlockBreak(Block block, @Size int amount, boolean save) {
this.handle.handleBlockBreak(block, amount, save);
}
@Override
@Deprecated
public void handleBlockBreak(Key key, @Size int amount, boolean save) {
this.handle.handleBlockBreak(key, amount, save);
}
@Override
@Deprecated
public void handleBlockBreak(Key key, BigInteger amount, boolean save) {
this.handle.handleBlockBreak(key, amount, save);
}
@Override
public void handleBlocksBreak(Map blocks) {
this.handle.handleBlocksBreak(blocks);
}
@Override
public Map handleBlocksBreakWithResult(Map blocks) {
return this.handle.handleBlocksBreakWithResult(blocks);
}
@Override
public void handleBlocksBreak(Map blocks, @IslandBlockFlags int flags) {
this.handle.handleBlocksBreak(blocks, flags);
}
@Override
public Map handleBlocksBreakWithResult(Map blocks, @IslandBlockFlags int flags) {
return this.handle.handleBlocksBreakWithResult(blocks, flags);
}
@Override
public boolean isChunkDirty(World world, int chunkX, int chunkZ) {
return this.handle.isChunkDirty(world, chunkX, chunkZ);
}
@Override
public boolean isChunkDirty(String worldName, int chunkX, int chunkZ) {
return this.handle.isChunkDirty(worldName, chunkX, chunkZ);
}
@Override
public boolean isChunkDirty(WorldInfo worldInfo, int chunkX, int chunkZ) {
return this.handle.isChunkDirty(worldInfo, chunkX, chunkZ);
}
@Override
public void markChunkDirty(World world, int chunkX, int chunkZ, boolean save) {
this.handle.markChunkDirty(world, chunkX, chunkZ, save);
}
@Override
public void markChunkDirty(WorldInfo worldInfo, int chunkX, int chunkZ, boolean save) {
this.handle.markChunkDirty(worldInfo, chunkX, chunkZ, save);
}
@Override
public void markChunkEmpty(World world, int chunkX, int chunkZ, boolean save) {
this.handle.markChunkEmpty(world, chunkX, chunkZ, save);
}
@Override
public void markChunkEmpty(WorldInfo worldInfo, int chunkX, int chunkZ, boolean save) {
this.handle.markChunkEmpty(worldInfo, chunkX, chunkZ, save);
}
@Override
public BigInteger getBlockCountAsBigInteger(Key key) {
return this.handle.getBlockCountAsBigInteger(key);
}
@Override
public Map getBlockCountsAsBigInteger() {
return this.handle.getBlockCountsAsBigInteger();
}
@Override
public BigInteger getExactBlockCountAsBigInteger(Key key) {
return this.handle.getExactBlockCountAsBigInteger(key);
}
@Override
public void clearBlockCounts() {
this.handle.clearBlockCounts();
}
@Override
public IslandBlocksTrackerAlgorithm getBlocksTracker() {
return this.handle.getBlocksTracker();
}
@Override
public BigDecimal getWorth() {
return this.handle.getWorth();
}
@Override
public BigDecimal getRawWorth() {
return this.handle.getRawWorth();
}
@Override
public BigDecimal getBonusWorth() {
return this.handle.getBonusWorth();
}
@Override
public void setBonusWorth(BigDecimal bonusWorth) {
this.handle.setBonusWorth(bonusWorth);
}
@Override
public BigDecimal getBonusLevel() {
return this.handle.getBonusLevel();
}
@Override
public void setBonusLevel(BigDecimal bonusLevel) {
this.handle.setBonusLevel(bonusLevel);
}
@Override
public BigDecimal getIslandLevel() {
return this.handle.getIslandLevel();
}
@Override
public BigDecimal getRawLevel() {
return this.handle.getRawLevel();
}
@Override
public UpgradeLevel getUpgradeLevel(Upgrade upgrade) {
return this.handle.getUpgradeLevel(upgrade);
}
@Override
public void setUpgradeLevel(Upgrade upgrade, int level) {
this.handle.setUpgradeLevel(upgrade, level);
}
@Override
public Map getUpgrades() {
return this.handle.getUpgrades();
}
@Override
public void syncUpgrades() {
this.handle.syncUpgrades();
}
@Override
public void updateUpgrades() {
this.handle.updateUpgrades();
}
@Override
public long getLastTimeUpgrade() {
return this.handle.getLastTimeUpgrade();
}
@Override
public boolean hasActiveUpgradeCooldown() {
return this.handle.hasActiveUpgradeCooldown();
}
@Override
public double getCropGrowthMultiplier() {
return this.handle.getCropGrowthMultiplier();
}
@Override
public void setCropGrowthMultiplier(double cropGrowth) {
this.handle.setCropGrowthMultiplier(cropGrowth);
}
@Override
public double getCropGrowthRaw() {
return this.handle.getCropGrowthRaw();
}
@Override
public double getSpawnerRatesMultiplier() {
return this.handle.getSpawnerRatesMultiplier();
}
@Override
public void setSpawnerRatesMultiplier(double spawnerRates) {
this.handle.setSpawnerRatesMultiplier(spawnerRates);
}
@Override
public double getSpawnerRatesRaw() {
return this.handle.getSpawnerRatesRaw();
}
@Override
public double getMobDropsMultiplier() {
return this.handle.getMobDropsMultiplier();
}
@Override
public void setMobDropsMultiplier(double mobDrops) {
this.handle.setMobDropsMultiplier(mobDrops);
}
@Override
public double getMobDropsRaw() {
return this.handle.getMobDropsRaw();
}
@Override
public int getBlockLimit(Key key) {
return this.handle.getBlockLimit(key);
}
@Override
public int getExactBlockLimit(Key key) {
return this.handle.getExactBlockLimit(key);
}
@Override
public Key getBlockLimitKey(Key key) {
return this.handle.getBlockLimitKey(key);
}
@Override
public Map getBlocksLimits() {
return this.handle.getBlocksLimits();
}
@Override
public Map getCustomBlocksLimits() {
return this.handle.getCustomBlocksLimits();
}
@Override
public void clearBlockLimits() {
this.handle.clearBlockLimits();
}
@Override
public void setBlockLimit(Key key, int limit) {
this.handle.setBlockLimit(key, limit);
}
@Override
public void removeBlockLimit(Key key) {
this.handle.removeBlockLimit(key);
}
@Override
public boolean hasReachedBlockLimit(Key key) {
return this.handle.hasReachedBlockLimit(key);
}
@Override
public boolean hasReachedBlockLimit(Key key, @Size int amount) {
return this.handle.hasReachedBlockLimit(key, amount);
}
@Override
public int getEntityLimit(EntityType entityType) {
return this.handle.getEntityLimit(entityType);
}
@Override
public int getEntityLimit(Key key) {
return this.handle.getEntityLimit(key);
}
@Override
public Map getEntitiesLimitsAsKeys() {
return this.handle.getEntitiesLimitsAsKeys();
}
@Override
public Map getCustomEntitiesLimits() {
return this.handle.getCustomEntitiesLimits();
}
@Override
public void clearEntitiesLimits() {
this.handle.clearEntitiesLimits();
}
@Override
public void setEntityLimit(EntityType entityType, int limit) {
this.handle.setEntityLimit(entityType, limit);
}
@Override
public void setEntityLimit(Key key, int limit) {
this.handle.setEntityLimit(key, limit);
}
@Override
public void removeEntityLimit(Key key) {
this.handle.removeEntityLimit(key);
}
@Override
public CompletableFuture hasReachedEntityLimit(EntityType entityType) {
return this.handle.hasReachedEntityLimit(entityType);
}
@Override
public CompletableFuture hasReachedEntityLimit(Key key) {
return this.handle.hasReachedEntityLimit(key);
}
@Override
public CompletableFuture hasReachedEntityLimit(EntityType entityType, @Size int amount) {
return this.handle.hasReachedEntityLimit(entityType, amount);
}
@Override
public CompletableFuture hasReachedEntityLimit(Key key, @Size int amount) {
return this.handle.hasReachedEntityLimit(key, amount);
}
@Override
public IslandEntitiesTrackerAlgorithm getEntitiesTracker() {
return this.handle.getEntitiesTracker();
}
@Override
public int getTeamLimit() {
return this.handle.getTeamLimit();
}
@Override
public void setTeamLimit(int teamLimit) {
this.handle.setTeamLimit(teamLimit);
}
@Override
public int getTeamLimitRaw() {
return this.handle.getTeamLimitRaw();
}
@Override
public int getWarpsLimit() {
return this.handle.getWarpsLimit();
}
@Override
public void setWarpsLimit(int warpsLimit) {
this.handle.setWarpsLimit(warpsLimit);
}
@Override
public int getWarpsLimitRaw() {
return this.handle.getWarpsLimitRaw();
}
@Override
public void setPotionEffect(PotionEffectType type, int level) {
this.handle.setPotionEffect(type, level);
}
@Override
public void removePotionEffect(PotionEffectType type) {
this.handle.removePotionEffect(type);
}
@Override
public int getPotionEffectLevel(PotionEffectType type) {
return this.handle.getPotionEffectLevel(type);
}
@Override
public Map getPotionEffects() {
return this.handle.getPotionEffects();
}
@Override
public Map getCustomPotionEffects() {
return this.handle.getCustomPotionEffects();
}
@Override
public void applyEffects(SuperiorPlayer superiorPlayer) {
this.handle.applyEffects(superiorPlayer);
}
@Override
public void applyEffects() {
this.handle.applyEffects();
}
@Override
public void removeEffects(SuperiorPlayer superiorPlayer) {
this.handle.removeEffects(superiorPlayer);
}
@Override
public void removeEffects() {
this.handle.removeEffects();
}
@Override
public void clearEffects() {
this.handle.clearEffects();
}
@Override
public void setRoleLimit(PlayerRole playerRole, int limit) {
this.handle.setRoleLimit(playerRole, limit);
}
@Override
public void removeRoleLimit(PlayerRole playerRole) {
this.handle.removeRoleLimit(playerRole);
}
@Override
public int getRoleLimit(PlayerRole playerRole) {
return this.handle.getRoleLimit(playerRole);
}
@Override
public int getRoleLimitRaw(PlayerRole playerRole) {
return this.handle.getRoleLimitRaw(playerRole);
}
@Override
public Map getRoleLimits() {
return this.handle.getRoleLimits();
}
@Override
public Map getCustomRoleLimits() {
return this.handle.getCustomRoleLimits();
}
@Override
public WarpCategory createWarpCategory(String name) {
return this.handle.createWarpCategory(name);
}
@Nullable
@Override
public WarpCategory getWarpCategory(String name) {
return this.handle.getWarpCategory(name);
}
@Nullable
@Override
public WarpCategory getWarpCategory(int slot) {
return this.handle.getWarpCategory(slot);
}
@Override
public void renameCategory(WarpCategory warpCategory, String newName) {
this.handle.renameCategory(warpCategory, newName);
}
@Override
public void deleteCategory(WarpCategory warpCategory) {
this.handle.deleteCategory(warpCategory);
}
@Override
public Map getWarpCategories() {
return this.handle.getWarpCategories();
}
@Override
public IslandWarp createWarp(String name, Location location, @Nullable WarpCategory warpCategory) {
return this.handle.createWarp(name, location, warpCategory);
}
@Override
public IslandWarp createWarp(String name, WorldInfo worldInfo, WorldPosition position, WarpCategory warpCategory) {
return this.handle.createWarp(name, worldInfo, position, warpCategory);
}
@Override
public void renameWarp(IslandWarp islandWarp, String newName) {
this.handle.renameWarp(islandWarp, newName);
}
@Nullable
@Override
public IslandWarp getWarp(Location location) {
return this.handle.getWarp(location);
}
@Nullable
@Override
public IslandWarp getWarp(String name) {
return this.handle.getWarp(name);
}
@Override
public void warpPlayer(SuperiorPlayer superiorPlayer, String warpName) {
this.handle.warpPlayer(superiorPlayer, warpName);
}
@Override
public void warpPlayer(SuperiorPlayer superiorPlayer, String warpName, boolean force) {
this.handle.warpPlayer(superiorPlayer, warpName, force);
}
@Override
public void deleteWarp(@Nullable SuperiorPlayer superiorPlayer, Location location) {
this.handle.deleteWarp(superiorPlayer, location);
}
@Override
public void deleteWarp(String name) {
this.handle.deleteWarp(name);
}
@Override
public Map getIslandWarps() {
return this.handle.getIslandWarps();
}
@Override
public Rating getRating(SuperiorPlayer superiorPlayer) {
return this.handle.getRating(superiorPlayer);
}
@Override
public void setRating(SuperiorPlayer superiorPlayer, Rating rating) {
this.handle.setRating(superiorPlayer, rating);
}
@Override
public void removeRating(SuperiorPlayer superiorPlayer) {
this.handle.removeRating(superiorPlayer);
}
@Override
public double getTotalRating() {
return this.handle.getTotalRating();
}
@Override
public int getRatingAmount() {
return this.handle.getRatingAmount();
}
@Override
public Map getRatings() {
return this.handle.getRatings();
}
@Override
public void removeRatings() {
this.handle.removeRatings();
}
@Override
public boolean hasSettingsEnabled(IslandFlag islandFlag) {
return this.handle.hasSettingsEnabled(islandFlag);
}
@Override
public Map getAllSettings() {
return this.handle.getAllSettings();
}
@Override
public void enableSettings(IslandFlag islandFlag) {
this.handle.enableSettings(islandFlag);
}
@Override
public void disableSettings(IslandFlag islandFlag) {
this.handle.disableSettings(islandFlag);
}
@Override
public void resetSettings() {
this.handle.resetSettings();
}
@Override
public void setGeneratorPercentage(Key key, int percentage, Dimension dimension) {
this.handle.setGeneratorPercentage(key, percentage, dimension);
}
@Override
public boolean setGeneratorPercentage(Key key, int percentage, Dimension dimension,
@Nullable SuperiorPlayer caller, boolean callEvent) {
return this.handle.setGeneratorPercentage(key, percentage, dimension, caller, callEvent);
}
@Override
public int getGeneratorPercentage(Key key, Dimension dimension) {
return this.handle.getGeneratorPercentage(key, dimension);
}
@Override
public Map getGeneratorPercentages(Dimension dimension) {
return this.handle.getGeneratorPercentages(dimension);
}
@Override
public void setGeneratorAmount(Key key, int amount, Dimension dimension) {
this.handle.setGeneratorAmount(key, amount, dimension);
}
@Override
public void removeGeneratorAmount(Key key, Dimension dimension) {
this.handle.removeGeneratorAmount(key, dimension);
}
@Override
public int getGeneratorAmount(Key key, Dimension dimension) {
return this.handle.getGeneratorAmount(key, dimension);
}
@Override
public int getGeneratorTotalAmount(Dimension dimension) {
return this.handle.getGeneratorTotalAmount(dimension);
}
@Override
public Map getGeneratorAmounts(Dimension dimension) {
return this.handle.getGeneratorAmounts(dimension);
}
@Override
public Map getCustomGeneratorAmounts(Dimension dimension) {
return this.handle.getCustomGeneratorAmounts(dimension);
}
@Override
public void clearGeneratorAmounts(Dimension dimension) {
this.handle.clearGeneratorAmounts(dimension);
}
@Nullable
@Override
public Key generateBlock(Location location, boolean optimizeDefaultBlock) {
return this.handle.generateBlock(location, optimizeDefaultBlock);
}
@Override
public Key generateBlock(Location location, Dimension dimension, boolean optimizeDefaultBlock) {
return this.handle.generateBlock(location, dimension, optimizeDefaultBlock);
}
@Override
public boolean wasSchematicGenerated(Dimension dimension) {
return this.handle.wasSchematicGenerated(dimension);
}
@Override
public void setSchematicGenerate(Dimension dimension) {
this.handle.setSchematicGenerate(dimension);
}
@Override
public void setSchematicGenerate(Dimension dimension, boolean generated) {
this.handle.setSchematicGenerate(dimension, generated);
}
@Override
public Collection getGeneratedSchematics() {
return this.handle.getGeneratedSchematics();
}
@Override
public String getSchematicName() {
return this.handle.getSchematicName();
}
@Override
public int getPosition(SortingType sortingType) {
return this.handle.getPosition(sortingType);
}
@Override
public IslandChest[] getChest() {
return this.handle.getChest();
}
@Override
public int getChestSize() {
return this.handle.getChestSize();
}
@Override
public void setChestRows(int index, int rows) {
this.handle.setChestRows(index, rows);
}
@Override
public int compareTo(Island o) {
return this.handle.compareTo(o);
}
}
================================================
FILE: API/src/main/java/com/bgsoftware/superiorskyblock/api/island/DelegateIslandChest.java
================================================
package com.bgsoftware.superiorskyblock.api.island;
import com.bgsoftware.superiorskyblock.api.wrappers.SuperiorPlayer;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
public class DelegateIslandChest implements IslandChest {
protected final IslandChest handle;
protected DelegateIslandChest(IslandChest handle) {
this.handle = handle;
}
@Override
public Island getIsland() {
return this.handle.getIsland();
}
@Override
public int getIndex() {
return this.handle.getIndex();
}
@Override
public int getRows() {
return this.handle.getRows();
}
@Override
public void setRows(int rows) {
this.handle.setRows(rows);
}
@Override
public ItemStack[] getContents() {
return this.handle.getContents();
}
@Override
public void openChest(SuperiorPlayer superiorPlayer) {
this.handle.openChest(superiorPlayer);
}
@Override
public Inventory getInventory() {
return this.handle.getInventory();
}
}
================================================
FILE: API/src/main/java/com/bgsoftware/superiorskyblock/api/island/DelegateIslandPreview.java
================================================
package com.bgsoftware.superiorskyblock.api.island;
import com.bgsoftware.superiorskyblock.api.wrappers.SuperiorPlayer;
import org.bukkit.GameMode;
import org.bukkit.Location;
public class DelegateIslandPreview implements IslandPreview {
protected final IslandPreview handle;
protected DelegateIslandPreview(IslandPreview handle) {
this.handle = handle;
}
@Override
public SuperiorPlayer getPlayer() {
return this.handle.getPlayer();
}
@Override
public Location getLocation() {
return this.handle.getLocation();
}
@Override
public Location getLocation(Location location) {
return this.handle.getLocation(location);
}
@Override
public String getSchematic() {
return this.handle.getSchematic();
}
@Override
public String getIslandName() {
return this.handle.getIslandName();
}
@Override
public GameMode getPreviousGameMode() {
return this.handle.getPreviousGameMode();
}
@Override
public void handleConfirm() {
this.handle.handleConfirm();
}
@Override
public void handleCancel() {
this.handle.handleCancel();
}
@Override
public void handleEscape() {
this.handle.handleEscape();
}
}
================================================
FILE: API/src/main/java/com/bgsoftware/superiorskyblock/api/island/DelegatePermissionNode.java
================================================
package com.bgsoftware.superiorskyblock.api.island;
import java.util.Map;
public class DelegatePermissionNode implements PermissionNode {
protected final PermissionNode handle;
protected DelegatePermissionNode(PermissionNode handle) {
this.handle = handle;
}
@Override
public boolean hasPermission(IslandPrivilege islandPrivilege) {
return this.handle.hasPermission(islandPrivilege);
}
@Override
public void setPermission(IslandPrivilege islandPrivilege, boolean value) {
this.handle.setPermission(islandPrivilege, value);
}
@Override
public Map getCustomPermissions() {
return this.handle.getCustomPermissions();
}
}
================================================
FILE: API/src/main/java/com/bgsoftware/superiorskyblock/api/island/Island.java
================================================
package com.bgsoftware.superiorskyblock.api.island;
import com.bgsoftware.common.annotations.Nullable;
import com.bgsoftware.common.annotations.Size;
import com.bgsoftware.superiorskyblock.api.SuperiorSkyblockAPI;
import com.bgsoftware.superiorskyblock.api.data.IDatabaseBridgeHolder;
import com.bgsoftware.superiorskyblock.api.enums.MemberRemoveReason;
import com.bgsoftware.superiorskyblock.api.enums.Rating;
import com.bgsoftware.superiorskyblock.api.enums.SyncStatus;
import com.bgsoftware.superiorskyblock.api.events.IslandChangeGeneratorRateEvent;
import com.bgsoftware.superiorskyblock.api.island.algorithms.IslandBlocksTrackerAlgorithm;
import com.bgsoftware.superiorskyblock.api.island.algorithms.IslandCalculationAlgorithm;
import com.bgsoftware.superiorskyblock.api.island.algorithms.IslandEntitiesTrackerAlgorithm;
import com.bgsoftware.superiorskyblock.api.island.bank.BankTransaction;
import com.bgsoftware.superiorskyblock.api.island.bank.IslandBank;
import com.bgsoftware.superiorskyblock.api.island.cache.IslandCache;
import com.bgsoftware.superiorskyblock.api.island.warps.IslandWarp;
import com.bgsoftware.superiorskyblock.api.island.warps.WarpCategory;
import com.bgsoftware.superiorskyblock.api.key.Key;
import com.bgsoftware.superiorskyblock.api.key.KeyMap;
import com.bgsoftware.superiorskyblock.api.missions.IMissionsHolder;
import com.bgsoftware.superiorskyblock.api.missions.Mission;
import com.bgsoftware.superiorskyblock.api.objects.Pair;
import com.bgsoftware.superiorskyblock.api.persistence.IPersistentDataHolder;
import com.bgsoftware.superiorskyblock.api.service.message.IMessageComponent;
import com.bgsoftware.superiorskyblock.api.upgrades.Upgrade;
import com.bgsoftware.superiorskyblock.api.upgrades.UpgradeLevel;
import com.bgsoftware.superiorskyblock.api.world.Dimension;
import com.bgsoftware.superiorskyblock.api.world.WorldInfo;
import com.bgsoftware.superiorskyblock.api.wrappers.BlockPosition;
import com.bgsoftware.superiorskyblock.api.wrappers.SuperiorPlayer;
import com.bgsoftware.superiorskyblock.api.wrappers.WorldPosition;
import org.bukkit.Chunk;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.block.Biome;
import org.bukkit.block.Block;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.EntityType;
import org.bukkit.inventory.ItemStack;
import org.bukkit.potion.PotionEffectType;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
public interface Island extends Comparable, IMissionsHolder, IPersistentDataHolder, IDatabaseBridgeHolder {
/*
* General methods
*/
/**
* Get the owner of the island.
*/
SuperiorPlayer getOwner();
/**
* Get the unique-id of the island.
*/
UUID getUniqueId();
/**
* Get the creation time of the island.
*/
long getCreationTime();
/**
* Get the creation time of the island, in a formatted string.
*/
String getCreationTimeDate();
/**
* Re-sync the island with a new dates formatter.
*/
void updateDatesFormatter();
/**
* Get the island cache.
*/
IslandCache getCache();
/*
* Player related methods
*/
/**
* Get the list of members of the island.
*
* @param includeOwner Whether the owner should be returned.
*/
List getIslandMembers(boolean includeOwner);
/**
* Get the list of members of the island with specific roles.
*
* @param playerRoles The roles to filter with.
*/
List getIslandMembers(PlayerRole... playerRoles);
/**
* Get the list of all banned players.
*/
List getBannedPlayers();
/**
* Get the list of all visitors that are on the island, including vanished ones.
*/
List getIslandVisitors();
/**
* Get the list of all visitors that are on the island.
*
* @param vanishPlayers Should vanish players be included?
*/
List getIslandVisitors(boolean vanishPlayers);
/**
* Get the list of all the players that are on the island.
*/
List getAllPlayersInside();
/**
* Get all the visitors that visited the island until now.
*/
List getUniqueVisitors();
/**
* Get all the visitors that visited the island until now, with the time they last visited.
*/
List> getUniqueVisitorsWithTimes();
/**
* Invite a player to the island.
*
* @param superiorPlayer The player to invite.
*/
void inviteMember(SuperiorPlayer superiorPlayer);
/**
* Revoke an invitation of a player.
*
* @param superiorPlayer The player to revoke his invite.
*/
void revokeInvite(SuperiorPlayer superiorPlayer);
/**
* Checks whether the player has been invited to the island.
*/
boolean isInvited(SuperiorPlayer superiorPlayer);
/**
* Get all the invited players of the island.
*/
List getInvitedPlayers();
/**
* Add a player to the island.
*
* @param superiorPlayer The player to add.
* @param playerRole The role to give to the player.
*/
void addMember(SuperiorPlayer superiorPlayer, PlayerRole playerRole);
/**
* Kick a member from the island.
*
* @param superiorPlayer The player to kick.
* @deprecated See {@link #removeMember(SuperiorPlayer, MemberRemoveReason)}
*/
@Deprecated
void kickMember(SuperiorPlayer superiorPlayer);
/**
* Remove a member from the island.
*
* @param superiorPlayer The player to remove.
* @param memberRemoveReason The reason for removal.
*/
void removeMember(SuperiorPlayer superiorPlayer, MemberRemoveReason memberRemoveReason);
/**
* Check whether a player is a member of the island.
*
* @param superiorPlayer The player to check.
*/
boolean isMember(SuperiorPlayer superiorPlayer);
/**
* Ban a member from the island.
*
* @param superiorPlayer The player to ban.
*/
void banMember(SuperiorPlayer superiorPlayer);
/**
* Ban a member from the island.
*
* @param superiorPlayer The player to ban.
* @param whom The player that executed the ban command.
* If null, CONSOLE will be chosen as the banner.
*/
void banMember(SuperiorPlayer superiorPlayer, @Nullable SuperiorPlayer whom);
/**
* Unban a player from the island.
*
* @param superiorPlayer The player to unban.
*/
void unbanMember(SuperiorPlayer superiorPlayer);
/**
* Checks whether a player is banned from the island.
*
* @param superiorPlayer The player to check.
*/
boolean isBanned(SuperiorPlayer superiorPlayer);
/**
* Add a player to the island as a co-op member.
*
* @param superiorPlayer The player to add.
*/
void addCoop(SuperiorPlayer superiorPlayer);
/**
* Remove a player from being a co-op member.
*
* @param superiorPlayer The player to remove.
*/
void removeCoop(SuperiorPlayer superiorPlayer);
/**
* Check whether a player is a co-op member of the island.
*
* @param superiorPlayer The player to check.
*/
boolean isCoop(SuperiorPlayer superiorPlayer);
/**
* Get the list of all co-op players.
*/
List getCoopPlayers();
/**
* Get the coop players limit of the island.
*/
int getCoopLimit();
/**
* Get the coop players limit of the island that was set using a command.
*/
int getCoopLimitRaw();
/**
* Set the coop players limit of the island.
*
* @param coopLimit The coop players limit to set.
*/
void setCoopLimit(int coopLimit);
/**
* Update status of a player if he's inside the island or not.
*
* @param superiorPlayer The player to add.
*/
void setPlayerInside(SuperiorPlayer superiorPlayer, boolean inside);
/**
* Check whether a player is a visitor of the island or not.
*
* @param superiorPlayer The player to check.
* @param checkCoopStatus Whether to check for coop status or not.
* If enabled, coops will not be considered as visitors.
*/
boolean isVisitor(SuperiorPlayer superiorPlayer, boolean checkCoopStatus);
/*
* Location related methods
*/
/**
* Get the center location of the island, depends on the world dimension.
*
* @param dimension The dimension.
*/
Location getCenter(Dimension dimension);
/**
* Get the center position of the island.
*/
BlockPosition getCenterPosition();
/**
* Access the island's world.
* This method will load the world safely if it is not loaded.
*
* @param dimension The dimension of the island world.
*/
CompletableFuture accessIslandWorld(Dimension dimension);
/**
* Get the members' home location of the island, depends on the world dimension.
*
* @param dimension The dimension.
*/
@Nullable
Location getIslandHome(Dimension dimension);
/**
* Get the members' home location of the island, depends on the world dimension.
*
* @param dimension The dimension.
*/
@Nullable
WorldPosition getIslandHomePosition(Dimension dimension);
/**
* Get all the home locations of the island.
* If the world is not loaded, the location's getWorld will return null.
*/
Map getIslandHomesAsDimensions();
/**
* Get all the home positions of the island.
*/
Map getIslandHomes();
/**
* Set the home location of the island.
* The location will be set for the world provided in {@param homeLocation}
*
* @param homeLocation The new home location.
*/
void setIslandHome(Location homeLocation);
/**
* Set the home position of the island.
* The world of {@param homeLocation} is ignored.
*
* @param dimension The dimension to change home position for.
* @param homeLocation The new home location.
* @deprecated See {@link #setIslandHome(Dimension, WorldPosition)}
*/
@Deprecated
void setIslandHome(Dimension dimension, @Nullable Location homeLocation);
/**
* Set the home position of the island.
*
* @param dimension The dimension to change home position for.
* @param homePosition The new home position.
*/
void setIslandHome(Dimension dimension, @Nullable WorldPosition homePosition);
/**
* Get the visitors' teleport location of the island.
* If the world is unloaded, the location's getWorld method will return null.
*
* @param dimension The dimension to get the visitors-location from.
* Currently unused, it has no effect.
*/
@Nullable
Location getVisitorsLocation(Dimension dimension);
/**
* Get the visitors' teleport position of the island.
*
* @param dimension The dimension to get the visitors-position from.
* Currently unused, it has no effect.
*/
@Nullable
WorldPosition getVisitorsPosition(Dimension dimension);
/**
* Set the visitors' teleport location of the island.
*
* @param visitorsLocation The new visitors location.
*/
void setVisitorsLocation(@Nullable Location visitorsLocation);
/**
* Set the visitors' teleport position of the island.
*
* @param dimension The dimension to change the visitors-position.
* Currently unused, it has no effect.
* @param visitorsPosition The new visitors position.
*/
void setVisitorsLocation(Dimension dimension, @Nullable WorldPosition visitorsPosition);
/**
* Get the minimum location of the island.
* If the world is unloaded, the location's getWorld will return null.
*/
Location getMinimum();
/**
* Get the minimum location of the island.
*/
BlockPosition getMinimumPosition();
/**
* Get the minimum protected location of the island.
* If the world is unloaded, the location's getWorld will return null.
*/
Location getMinimumProtected();
/**
* Get the minimum location of the island.
*/
BlockPosition getMinimumProtectedPosition();
/**
* Get the maximum location of the island.
* If the world is unloaded, the location's getWorld will return null.
*/
Location getMaximum();
/**
* Get the maximum location of the island.
*/
BlockPosition getMaximumPosition();
/**
* Get the minimum protected location of the island.
* If the world is unloaded, the location's getWorld will return null.
*/
Location getMaximumProtected();
/**
* Get the minimum protected location of the island.
*/
BlockPosition getMaximumProtectedPosition();
/**
* Get all the chunks of the island from all the environments.
* Similar to {@link #getAllChunks(int)} with 0 as flags parameter.
*/
List getAllChunks();
/**
* Get all the chunks of the island from all the environments.
*
* @param flags See {@link IslandChunkFlags}
*/
List getAllChunks(@IslandChunkFlags int flags);
/**
* Get all the chunks of the island.
* Similar to {@link #getAllChunks(Dimension, int)} with 0 as flags parameter.
*
* @param dimension The environment to get the chunks from.
*/
List getAllChunks(Dimension dimension);
/**
* Get all the chunks of the island.
*
* @param dimension The dimension to get the chunks from.
* @param flags See {@link IslandChunkFlags}
*/
List getAllChunks(Dimension dimension, @IslandChunkFlags int flags);
/**
* Get all the loaded chunks of the island.
* Similar to {@link #getLoadedChunks(int)} with 0 as flags parameter.
*/
List getLoadedChunks();
/**
* Get all the loaded chunks of the island.
*
* @param flags See {@link IslandChunkFlags}
*/
List getLoadedChunks(@IslandChunkFlags int flags);
/**
* Get all the loaded chunks of the island.
* Similar to {@link #getLoadedChunks(Dimension, int)} with 0 as flags parameter.
*
* @param dimension The environment to get the chunks from.
*/
List getLoadedChunks(Dimension dimension);
/**
* Get all the loaded chunks of the island.
*
* @param dimension The dimension to get the chunks from.
* @param flags See {@link IslandChunkFlags}
*/
List getLoadedChunks(Dimension dimension, @IslandChunkFlags int flags);
/**
* Get all the chunks of the island asynchronized, including empty chunks.
* Similar to {@link #getAllChunksAsync(Dimension, int, Consumer)}, with 0 as flags parameter.
*
* @param dimension The dimension to get the chunks from.
*/
List> getAllChunksAsync(Dimension dimension);
/**
* Get all the chunks of the island asynchronized, including empty chunks.
*
* @param dimension The dimension to get the chunks from.
* @param flags See {@link IslandChunkFlags}
*/
List> getAllChunksAsync(Dimension dimension, @IslandChunkFlags int flags);
/**
* Get all the chunks of the island asynchronized, including empty chunks.
* Similar to {@link #getAllChunksAsync(Dimension, int, Consumer)}, with 0 as flags parameter.
*
* @param dimension The dimension to get the chunks from.
* @param onChunkLoad A consumer that will be ran when the chunk is loaded. Can be null.
*/
List> getAllChunksAsync(Dimension dimension, @Nullable Consumer onChunkLoad);
/**
* Get all the chunks of the island asynchronized, including empty chunks.
*
* @param dimension The dimension to get the chunks from.
* @param flags See {@link IslandChunkFlags}
* @param onChunkLoad A consumer that will be ran when the chunk is loaded. Can be null.
*/
List> getAllChunksAsync(Dimension dimension, @IslandChunkFlags int flags,
@Nullable Consumer onChunkLoad);
/**
* Reset all the chunks of the island from all the worlds (will make all chunks empty).
* Similar to {@link #resetChunks(int)}, with 0 as flags parameter.
*/
void resetChunks();
/**
* Reset all the chunks of the island from all the worlds (will make all chunks empty).
* Similar to {@link #resetChunks(int, Runnable)}, with 0 as flags parameter.
*
* @param onFinish Callback runnable.
*/
void resetChunks(@Nullable Runnable onFinish);
/**
* Reset all the chunks of the island (will make all chunks empty).
* Similar to {@link #resetChunks(Dimension, int)}, with 0 as flags parameter.
*
* @param dimension The dimension to reset chunks in.
*/
void resetChunks(Dimension dimension);
/**
* Reset all the chunks of the island (will make all chunks empty).
*
* @param dimension The dimension to reset chunks in.
* @param onFinish Callback runnable.
*/
void resetChunks(Dimension dimension, @Nullable Runnable onFinish);
/**
* Reset all the chunks of the island from all the worlds (will make all chunks empty).
*
* @param flags See {@link IslandChunkFlags}
*/
void resetChunks(@IslandChunkFlags int flags);
/**
* Reset all the chunks of the island from all the worlds (will make all chunks empty).
*
* @param flags See {@link IslandChunkFlags}
* @param onFinish Callback runnable.
*/
void resetChunks(@IslandChunkFlags int flags, @Nullable Runnable onFinish);
/**
* Reset all the chunks of the island (will make all chunks empty).
*
* @param dimension The dimension to reset chunks in.
* @param flags See {@link IslandChunkFlags}
*/
void resetChunks(Dimension dimension, @IslandChunkFlags int flags);
/**
* Reset all the chunks of the island (will make all chunks empty).
*
* @param dimension The dimension to reset chunks in.
* @param flags See {@link IslandChunkFlags}
* @param onFinish Callback runnable.
*/
void resetChunks(Dimension dimension, @IslandChunkFlags int flags, @Nullable Runnable onFinish);
/**
* Check if the location is inside the island's area.
* Similar to {@link #isInside(Location, int)} or {@link #isInside(Location, double)} with extraRadius set to 0.
*
* @param location The location to check.
*/
boolean isInside(Location location);
/**
* Check if the location is inside the island's area.
*
* @param location The location to check.
* @param extraRadius Add extra radius to the range.
*/
boolean isInside(Location location, int extraRadius);
/**
* Check if the location is inside the island's area.
*
* @param location The location to check.
* @param extraRadius Add extra radius to the range.
*/
boolean isInside(Location location, double extraRadius);
/**
* Check if the location is inside the island's area.
* The world is ignored in this case.
* Similar to {@link #isInside(BlockPosition, int)} or {@link #isInside(BlockPosition, double)} with extraRadius set to 0.
*
* @param blockPosition The position to check.
*/
boolean isInside(BlockPosition blockPosition);
/**
* Check if the position is inside the island's area.
* The world is ignored in this case.
*
* @param blockPosition The position to check.
* @param extraRadius Add extra radius to the range.
*/
boolean isInside(BlockPosition blockPosition, int extraRadius);
/**
* Check if the position is inside the island's area.
*
* @param blockPosition The position to check.
* @param extraRadius Add extra radius to the range.
*/
boolean isInside(BlockPosition blockPosition, double extraRadius);
/**
* Check if the location is inside the island's area.
* The world is ignored in this case.
* Similar to {@link #isInside(WorldPosition, int)} or {@link #isInside(WorldPosition, double)} with extraRadius set to 0.
*
* @param worldPosition The position to check.
*/
boolean isInside(WorldPosition worldPosition);
/**
* Check if the position is inside the island's area.
* The world is ignored in this case.
*
* @param worldPosition The position to check.
* @param extraRadius Add extra radius to the range.
*/
boolean isInside(WorldPosition worldPosition, int extraRadius);
/**
* Check if the position is inside the island's area.
*
* @param worldPosition The position to check.
* @param extraRadius Add extra radius to the range.
*/
boolean isInside(WorldPosition worldPosition, double extraRadius);
/**
* Check if a chunk is inside the island's area.
* Similar to {@link #isInside(World, int, int)}
*
* @param chunk The chunk to check.
*/
boolean isInside(Chunk chunk);
/**
* Check if a chunk location is inside the island's area.
* Similar to {@link #isInside(World, int, int, int)} or {@link #isInside(World, int, int, double)} with extraRadius set to 0.
*
* @param world The world of the chunk.
* @param chunkX The x-coords of the chunk.
* @param chunkZ The z-coords of the chunk.
*/
boolean isInside(World world, int chunkX, int chunkZ);
/**
* Check if a chunk location is inside the island's area.
*
* @param world The world of the chunk.
* @param chunkX The x-coords of the chunk.
* @param chunkZ The z-coords of the chunk.
* @param extraRadius Add extra radius to the range.
*/
boolean isInside(World world, int chunkX, int chunkZ, int extraRadius);
/**
* Check if a chunk location is inside the island's area.
*
* @param world The world of the chunk.
* @param chunkX The x-coords of the chunk.
* @param chunkZ The z-coords of the chunk.
* @param extraRadius Add extra radius to the range.
*/
boolean isInside(World world, int chunkX, int chunkZ, double extraRadius);
/**
* Check if a chunk location is inside the island's area.
* Similar to {@link #isInside(WorldInfo, int, int, int)} or {@link #isInside(WorldInfo, int, int, double)} with extraRadius set to 0.
*
* @param worldInfo The world of the chunk.
* @param chunkX The x-coords of the chunk.
* @param chunkZ The z-coords of the chunk.
*/
boolean isInside(WorldInfo worldInfo, int chunkX, int chunkZ);
/**
* Check if a chunk location is inside the island's area.
*
* @param worldInfo The world of the chunk.
* @param chunkX The x-coords of the chunk.
* @param chunkZ The z-coords of the chunk.
* @param extraRadius Add extra radius to the range.
*/
boolean isInside(WorldInfo worldInfo, int chunkX, int chunkZ, int extraRadius);
/**
* Check if a chunk location is inside the island's area.
*
* @param worldInfo The world of the chunk.
* @param chunkX The x-coords of the chunk.
* @param chunkZ The z-coords of the chunk.
* @param extraRadius Add extra radius to the range.
*/
boolean isInside(WorldInfo worldInfo, int chunkX, int chunkZ, double extraRadius);
/**
* Check if a chunk position is inside the island's area.
* The world in this case is ignored.
* Similar to {@link #isInside(int, int, int)} or {@link #isInside(int, int, double)} with extraRadius set to 0.
*
* @param chunkX The x-coords of the chunk.
* @param chunkZ The z-coords of the chunk.
*/
boolean isInside(int chunkX, int chunkZ);
/**
* Check if a chunk position is inside the island's area.
* The world in this case is ignored.
*
* @param chunkX The x-coords of the chunk.
* @param chunkZ The z-coords of the chunk.
* @param extraRadius Add extra radius to the range.
*/
boolean isInside(int chunkX, int chunkZ, int extraRadius);
/**
* Check if a chunk position is inside the island's area.
* The world in this case is ignored.
*
* @param chunkX The x-coords of the chunk.
* @param chunkZ The z-coords of the chunk.
* @param extraRadius Add extra radius to the range.
*/
boolean isInside(int chunkX, int chunkZ, double extraRadius);
/**
* Check if the location is inside the island's protected area.
*
* @param location The location to check.
*/
boolean isInsideRange(Location location);
/**
* Check if the location is inside the island's protected area.
*
* @param location The location to check.
* @param extraRadius Add extra radius to the protected range.
*/
boolean isInsideRange(Location location, int extraRadius);
/**
* Check if the location is inside the island's protected area.
*
* @param location The location to check.
* @param extraRadius Add extra radius to the protected range.
*/
boolean isInsideRange(Location location, double extraRadius);
/**
* Check if the position is inside the island's protected area.
* The world in this case is ignored.
*
* @param blockPosition The position to check.
*/
boolean isInsideRange(BlockPosition blockPosition);
/**
* Check if the position is inside the island's protected area.
* The world in this case is ignored.
*
* @param blockPosition The position to check.
* @param extraRadius Add extra radius to the protected range.
*/
boolean isInsideRange(BlockPosition blockPosition, int extraRadius);
/**
* Check if the position is inside the island's protected area.
* The world in this case is ignored.
*
* @param blockPosition The position to check.
* @param extraRadius Add extra radius to the protected range.
*/
boolean isInsideRange(BlockPosition blockPosition, double extraRadius);
/**
* Check if the position is inside the island's protected area.
* The world in this case is ignored.
*
* @param worldPosition The position to check.
*/
boolean isInsideRange(WorldPosition worldPosition);
/**
* Check if the position is inside the island's protected area.
* The world in this case is ignored.
*
* @param worldPosition The position to check.
* @param extraRadius Add extra radius to the protected range.
*/
boolean isInsideRange(WorldPosition worldPosition, int extraRadius);
/**
* Check if the position is inside the island's protected area.
* The world in this case is ignored.
*
* @param worldPosition The position to check.
* @param extraRadius Add extra radius to the protected range.
*/
boolean isInsideRange(WorldPosition worldPosition, double extraRadius);
/**
* Check if the chunk is inside the island's protected area.
*
* @param chunk The chunk to check.
*/
boolean isInsideRange(Chunk chunk);
/**
* Check if a chunk location is inside the island's protected area.
* Similar to {@link #isInside(World, int, int, int)} or {@link #isInside(World, int, int, double)} with extraRadius set to 0.
*
* @param world The world of the chunk.
* @param chunkX The x-coords of the chunk.
* @param chunkZ The z-coords of the chunk.
*/
boolean isInsideRange(World world, int chunkX, int chunkZ);
/**
* Check if a chunk location is inside the island's protected area.
*
* @param world The world of the chunk.
* @param chunkX The x-coords of the chunk.
* @param chunkZ The z-coords of the chunk.
* @param extraRadius Add extra radius to the protected range.
*/
boolean isInsideRange(World world, int chunkX, int chunkZ, int extraRadius);
/**
* Check if a chunk location is inside the island's protected area.
*
* @param world The world of the chunk.
* @param chunkX The x-coords of the chunk.
* @param chunkZ The z-coords of the chunk.
* @param extraRadius Add extra radius to the protected range.
*/
boolean isInsideRange(World world, int chunkX, int chunkZ, double extraRadius);
/**
* Check if a chunk location is inside the island's protected area.
* Similar to {@link #isInside(WorldInfo, int, int, int)} or {@link #isInside(WorldInfo, int, int, double)} with extraRadius set to 0.
*
* @param worldInfo The world of the chunk.
* @param chunkX The x-coords of the chunk.
* @param chunkZ The z-coords of the chunk.
*/
boolean isInsideRange(WorldInfo worldInfo, int chunkX, int chunkZ);
/**
* Check if a chunk location is inside the island's protected area.
*
* @param worldInfo The world of the chunk.
* @param chunkX The x-coords of the chunk.
* @param chunkZ The z-coords of the chunk.
* @param extraRadius Add extra radius to the protected range.
*/
boolean isInsideRange(WorldInfo worldInfo, int chunkX, int chunkZ, int extraRadius);
/**
* Check if a chunk location is inside the island's protected area.
*
* @param worldInfo The world of the chunk.
* @param chunkX The x-coords of the chunk.
* @param chunkZ The z-coords of the chunk.
* @param extraRadius Add extra radius to the protected range.
*/
boolean isInsideRange(WorldInfo worldInfo, int chunkX, int chunkZ, double extraRadius);
/**
* Check if a chunk position is inside the island's protected area.
* The world in this case is ignored.
* Similar to {@link #isInside(int, int, int)} or {@link #isInside(int, int, double)} with extraRadius set to 0.
*
* @param chunkX The x-coords of the chunk.
* @param chunkZ The z-coords of the chunk.
*/
boolean isInsideRange(int chunkX, int chunkZ);
/**
* Check if a chunk position is inside the island's protected area.
* The world in this case is ignored.
*
* @param chunkX The x-coords of the chunk.
* @param chunkZ The z-coords of the chunk.
* @param extraRadius Add extra radius to the protected range.
*/
boolean isInsideRange(int chunkX, int chunkZ, int extraRadius);
/**
* Check if a chunk position is inside the island's protected area.
* The world in this case is ignored.
*
* @param chunkX The x-coords of the chunk.
* @param chunkZ The z-coords of the chunk.
* @param extraRadius Add extra radius to the protected range.
*/
boolean isInsideRange(int chunkX, int chunkZ, double extraRadius);
/**
* Is the normal world enabled for the island?
*
* @deprecated See {@link #isDimensionEnabled(Dimension)}
*/
@Deprecated
boolean isNormalEnabled();
/**
* Enable/disable the normal world for the island.
*
* @deprecated See {@link #setDimensionEnabled(Dimension, boolean)}
*/
@Deprecated
void setNormalEnabled(boolean enabled);
/**
* Is the nether world enabled for the island?
*
* @deprecated See {@link #isDimensionEnabled(Dimension)}
*/
@Deprecated
boolean isNetherEnabled();
/**
* Enable/disable the nether world for the island.
*
* @deprecated See {@link #setDimensionEnabled(Dimension, boolean)}
*/
@Deprecated
void setNetherEnabled(boolean enabled);
/**
* Is the end world enabled for the island?
*
* @deprecated See {@link #isDimensionEnabled(Dimension)}
*/
@Deprecated
boolean isEndEnabled();
/**
* Enable/disable the end world for the island.
*
* @deprecated See {@link #setDimensionEnabled(Dimension, boolean)}
*/
@Deprecated
void setEndEnabled(boolean enabled);
/**
* Checks if a specific dimension is enabled for the island
*
* @param dimension The dimension to check.
*/
boolean isDimensionEnabled(Dimension dimension);
/**
* Enable/disable a world for the island.
*
* @param dimension The dimension to enable/disable.
* @param enabled Status.
*/
void setDimensionEnabled(Dimension dimension, boolean enabled);
/**
* Get the unlocked worlds.
*/
Collection getUnlockedWorlds();
/*
* Permissions related methods
*/
/**
* Check if a CommandSender has a permission.
*
* @param sender The command-sender to check.
* @param islandPrivilege The permission to check.
*/
boolean hasPermission(CommandSender sender, IslandPrivilege islandPrivilege);
/**
* Check if a player has a permission.
*
* @param superiorPlayer The player to check.
* @param islandPrivilege The permission to check.
*/
boolean hasPermission(SuperiorPlayer superiorPlayer, IslandPrivilege islandPrivilege);
/**
* Check if a role has a permission.
*
* @param playerRole The role to check.
* @param islandPrivilege The permission to check.
*/
boolean hasPermission(PlayerRole playerRole, IslandPrivilege islandPrivilege);
/**
* Set a permission to a specific role.
*
* @param playerRole The role to set the permission to.
* @param islandPrivilege The permission to set.
* @param value The value to give the permission (Unused)
* @deprecated See {@link #setPermission(PlayerRole, IslandPrivilege)}
*/
@Deprecated
void setPermission(PlayerRole playerRole, IslandPrivilege islandPrivilege, boolean value);
/**
* Set a permission to a specific role.
*
* @param playerRole The role to set the permission to.
* @param islandPrivilege The permission to set.
*/
void setPermission(PlayerRole playerRole, IslandPrivilege islandPrivilege);
/**
* Reset the roles permissions to default values.
*/
void resetPermissions();
/**
* Set a permission to a specific player.
*
* @param superiorPlayer The player to set the permission to.
* @param islandPrivilege The permission to set.
* @param value The value to give the permission.
*/
void setPermission(SuperiorPlayer superiorPlayer, IslandPrivilege islandPrivilege, boolean value);
/**
* Reset player permissions to default values.
*/
void resetPermissions(SuperiorPlayer superiorPlayer);
/**
* Get the permission-node of a player.
*
* @param superiorPlayer The player to check.
*/
PermissionNode getPermissionNode(SuperiorPlayer superiorPlayer);
/**
* Get the required role for a specific permission.
*
* @param islandPrivilege The permission to check.
*/
PlayerRole getRequiredPlayerRole(IslandPrivilege islandPrivilege);
/**
* Get all the custom player permissions of the island.
*/
Map getPlayerPermissions();
/**
* Get the permissions and their required roles.
*/
Map getRolePermissions();
/*
* General methods
*/
/**
* Checks whether the island is the spawn island.
*/
boolean isSpawn();
/**
* Set the name of the island.
*
* @param islandName The name to set.
*/
void setName(String islandName);
/**
* Get the name of the island in respect to color-support.
* This method will call {@link #getFormattedName()} or {@link #getStrippedName()}, depends on color-support.
*/
String getName();
/**
* Get the name of the island in its stripped form.
*
* @deprecated See {@link #getStrippedName()}
*/
@Deprecated
String getRawName();
/**
* Get the name of the island in its stripped form.
* Unlike {@link #getName()}, this method will always return the stripped form of the name.
*/
String getStrippedName();
/**
* Get the name of the island in its color-formatted form.
* Unlike {@link #getName()}, this method will always return the color-formatted form of the name.
*/
String getFormattedName();
/**
* Get the description of the island.
*/
String getDescription();
/**
* Set the description of the island.
*
* @param description The description to set.
*/
void setDescription(String description);
/**
* Disband the island.
*/
void disbandIsland();
/**
* Transfer the island's leadership to another player.
*
* @param superiorPlayer The player to transfer the leadership to.
* @return True if the transfer was succeed, otherwise false.
*/
boolean transferIsland(SuperiorPlayer superiorPlayer);
/**
* Replace a player with a new player.
*
* @param originalPlayer The old player to be replaced.
* @param newPlayer The new player.
* If null, the original player should just be removed.
* If this is the owner of the island, the island will be disbanded.
*/
void replacePlayers(SuperiorPlayer originalPlayer, @Nullable SuperiorPlayer newPlayer);
/**
* Recalculate the island's worth value.
*
* @param asker The player who makes the operation.
*/
void calcIslandWorth(@Nullable SuperiorPlayer asker);
/**
* Recalculate the island's worth value.
*
* @param asker The player who makes the operation.
* @param callback Runnable which will be ran when process is finished.
*/
void calcIslandWorth(@Nullable SuperiorPlayer asker, @Nullable Runnable callback);
/**
* Get the calculation algorithm used by this island.
*/
IslandCalculationAlgorithm getCalculationAlgorithm();
/**
* Update the border of all the players inside the island.
*/
void updateBorder();
/**
* Update the fly status for a player on this island.
*
* @param superiorPlayer The player to update.
*/
void updateIslandFly(SuperiorPlayer superiorPlayer);
/**
* Get the island radius of the island.
*/
int getIslandSize();
/**
* Set the radius of the island.
*
* @param islandSize The radius for the island.
*/
void setIslandSize(int islandSize);
/**
* Get the island radius of the island that was set with a command.
*/
int getIslandSizeRaw();
/**
* Get the discord that is associated with the island.
*/
String getDiscord();
/**
* Set the discord that will be associated with the island.
*/
void setDiscord(String discord);
/**
* Get the paypal that is associated with the island.
*/
String getPaypal();
/**
* Get the paypal that will be associated with the island.
*/
void setPaypal(String paypal);
/**
* The current biome of the island.
*/
Biome getBiome();
/**
* Change the biome of the island's area.
*/
void setBiome(Biome biome);
/**
* Change the biome of the island's area.
*
* @param updateBlocks Whether the blocks get updated or not.
*/
void setBiome(Biome biome, boolean updateBlocks);
/**
* Check whether the island is locked to visitors.
*/
boolean isLocked();
/**
* Lock or unlock the island to visitors.
*
* @param locked Whether the island should be locked to visitors.
*/
void setLocked(boolean locked);
/**
* Checks whether the island is ignored in the top islands.
*/
boolean isIgnored();
/**
* Set whether the island should be ignored in the top islands.
*/
void setIgnored(boolean ignored);
/**
* Send a plain message to all the members of the island.
*
* @param message The message to send
*/
void sendMessage(String message);
/**
* Send a plain message to all the members of the island.
*
* @param message The message to send
* @param ignoredMembers An array of ignored members.
*/
void sendMessage(String message, UUID... ignoredMembers);
/**
* Send a message to all the members of the island.
*
* @param messageComponent The message to send
*/
void sendMessage(IMessageComponent messageComponent);
/**
* Send a message to all the members of the island.
*
* @param messageComponent The message to send
* @param args Arguments for the component.
*/
void sendMessage(IMessageComponent messageComponent, Object... args);
/**
* Send a message to all the members of the island.
*
* @param messageComponent The message to send
* @param ignoredMembers An array of ignored members.
*/
void sendMessage(IMessageComponent messageComponent, List ignoredMembers);
/**
* Send a message to all the members of the island.
*
* @param messageComponent The message to send
* @param ignoredMembers An array of ignored members.
* @param args Arguments for the component.
*/
void sendMessage(IMessageComponent messageComponent, List ignoredMembers, Object... args);
/**
* Send a plain message to all the members of the island.
*
* @param title The main title to send.
* @param subtitle The sub title to send.
* @param fadeIn The fade-in duration in ticks.
* @param duration The title duration in ticks.
* @param fadeOut The fade-out duration in ticks.
*/
void sendTitle(@Nullable String title, @Nullable String subtitle, int fadeIn, int duration, int fadeOut);
/**
* Send a plain message to all the members of the island.
*
* @param title The main title to send.
* @param subtitle The sub title to send.
* @param fadeIn The fade-in duration in ticks.
* @param duration The title duration in ticks.
* @param fadeOut The fade-out duration in ticks.
* @param ignoredMembers An array of ignored members.
*/
void sendTitle(@Nullable String title, @Nullable String subtitle, int fadeIn, int duration, int fadeOut, UUID... ignoredMembers);
/**
* Execute a command on all the members of the island.
* You can use {player-name} as a placeholder for the member's name.
*
* @param command The command to execute.
* @param onlyOnlineMembers Whether the command should be executed only for online members.
*/
void executeCommand(String command, boolean onlyOnlineMembers);
/**
* Execute a command on all the members of the island.
* You can use {player-name} as a placeholder for the member's name.
*
* @param command The command to execute.
* @param onlyOnlineMembers Whether the command should be executed only for online members.
* @param ignoredMembers An array of ignored members.
*/
void executeCommand(String command, boolean onlyOnlineMembers, UUID... ignoredMembers);
/**
* Checks whether the island is being recalculated currently.
*/
boolean isBeingRecalculated();
/**
* Update the last time the island was used.
*/
void updateLastTime();
/**
* Flag the island as a currently active island.
*/
void setCurrentlyActive();
/**
* Set whether the island is currently active.
* Active islands are islands that have at least one island member online.
*
* @param active Whether the island is active.
*/
void setCurrentlyActive(boolean active);
/**
* Check whether the island is currently active.
* Active islands are islands that have at least one island member online.
*/
boolean isCurrentlyActive();
/**
* Get the last time the island was updated.
* In case the island is active, -1 will be returned.
*/
long getLastTimeUpdate();
/**
* Set the last time the island was updated.
*
* @param lastTimeUpdate The last time the island was updated.
*/
void setLastTimeUpdate(long lastTimeUpdate);
/*
* Bank related methods
*/
/**
* Get the bank of the island.
*/
IslandBank getIslandBank();
/**
* Get the limit of the bank.
*/
BigDecimal getBankLimit();
/**
* Set a new limit for the bank.
*
* @param bankLimit The limit to set. Use -1 to remove the limit.
*/
void setBankLimit(BigDecimal bankLimit);
/**
* Get the limit of the bank that was set using a command.
*/
BigDecimal getBankLimitRaw();
/**
* Give the bank interest to this island.
*
* @param checkOnlineOwner Check if the island-owner was online recently.
* @return Whether the money was given.
*/
boolean giveInterest(boolean checkOnlineOwner);
/**
* Get the last time that the bank interest was given.
*/
long getLastInterestTime();
/**
* Set the last time that the bank interest was given.
*
* @param lastInterest The time it was given.
*/
void setLastInterestTime(long lastInterest);
/**
* Get the duration until the bank interest will be given again, in seconds
*/
long getNextInterest();
/*
* Worth related methods
*/
/**
* Handle a placement of a block.
* This will save the block counts and update the last time status of the island.
*
* @param block The block that was placed.
*/
void handleBlockPlace(Block block);
/**
* Handle a placement of a block.
* This will save the block counts and update the last time status of the island.
*
* @param block The block that was placed.
* @return The result of the block place.
*/
BlockChangeResult handleBlockPlaceWithResult(Block block);
/**
* Handle a placement of a block's key.
* This will save the block counts and update the last time status of the island.
*
* @param key The block's key that was placed.
*/
void handleBlockPlace(Key key);
/**
* Handle a placement of a block's key.
* This will save the block counts and update the last time status of the island.
*
* @param key The block's key that was placed.
* @return The result of the block place.
*/
BlockChangeResult handleBlockPlaceWithResult(Key key);
/**
* Handle a placement of a block with a specific amount.
* This will save the block counts and update the last time status of the island.
*
* @param block The block that was placed.
* @param amount The amount of the block.
*/
void handleBlockPlace(Block block, @Size int amount);
/**
* Handle a placement of a block with a specific amount.
* This will save the block counts and update the last time status of the island.
*
* @param block The block that was placed.
* @param amount The amount of the block.
* @return The result of the block place.
*/
BlockChangeResult handleBlockPlaceWithResult(Block block, @Size int amount);
/**
* Handle a placement of a block's key with a specific amount.
* This will save the block counts and update the last time status of the island.
*
* @param key The block's key that was placed.
* @param amount The amount of the block.
*/
void handleBlockPlace(Key key, @Size int amount);
/**
* Handle a placement of a block's key with a specific amount.
* This will save the block counts and update the last time status of the island.
*
* @param key The block's key that was placed.
* @param amount The amount of the block.
* @return The result of the block place.
*/
BlockChangeResult handleBlockPlaceWithResult(Key key, @Size int amount);
/**
* Handle a placement of a block with a specific amount.
*
* @param block The block that was placed.
* @param amount The amount of the block.
* @param flags See {@link IslandBlockFlags}
*/
void handleBlockPlace(Block block, @Size int amount, @IslandBlockFlags int flags);
/**
* Handle a placement of a block with a specific amount.
*
* @param block The block that was placed.
* @param amount The amount of the block.
* @param flags See {@link IslandBlockFlags}
* @return The result of the block place.
*/
BlockChangeResult handleBlockPlaceWithResult(Block block, @Size int amount, @IslandBlockFlags int flags);
/**
* Handle a placement of a block's key with a specific amount.
*
* @param key The block's key that was placed.
* @param amount The amount of the block.
* @param flags See {@link IslandBlockFlags}
*/
void handleBlockPlace(Key key, @Size int amount, @IslandBlockFlags int flags);
/**
* Handle a placement of a block's key with a specific amount.
*
* @param key The block's key that was placed.
* @param amount The amount of the block.
* @param flags See {@link IslandBlockFlags}
* @return The result of the block place.
*/
BlockChangeResult handleBlockPlaceWithResult(Key key, @Size int amount, @IslandBlockFlags int flags);
/**
* Handle a placement of a block with a specific amount.
* This will update the last time status of the island.
*
* @param block The block that was placed.
* @param amount The amount of the block.
* @param save Whether the block counts should be saved into database.
* @deprecated See {@link #handleBlockPlace(Block, int, int)}
*/
@Deprecated
void handleBlockPlace(Block block, @Size int amount, boolean save);
/**
* Handle a placement of a block's key with a specific amount.
* This will update the last time status of the island.
*
* @param key The block's key that was placed.
* @param amount The amount of the block.
* @param save Whether the block counts should be saved into database.
* @deprecated See {@link #handleBlockPlace(Key, int, int)}
*/
@Deprecated
void handleBlockPlace(Key key, @Size int amount, boolean save);
/**
* Handle a placement of a block's key with a specific amount.
* This will update the last time status of the island.
*
* @param key The block's key that was placed.
* @param amount The amount of the block.
* @param save Whether the block counts should be saved into database.
* @deprecated See {@link #handleBlockPlace(Key, int, int)}
*/
@Deprecated
void handleBlockPlace(Key key, @Size BigInteger amount, boolean save);
/**
* Handle a placement of a block's key with a specific amount.
*
* @param key The block's key that was placed.
* @param amount The amount of the block.
* @param save Whether the block counts should be saved into database.
* @param updateLastTimeStatus Whether to update last time island was updated or not.
* @deprecated See {@link #handleBlockPlace(Key, int, int)}
*/
@Deprecated
void handleBlockPlace(Key key, @Size BigInteger amount, boolean save, boolean updateLastTimeStatus);
/**
* Handle placements of many blocks in one time.
* This will save the block counts and update the last time status of the island.
*
* @param blocks All the blocks to place.
*/
void handleBlocksPlace(Map blocks);
/**
* Handle placements of many blocks in one time.
* This will save the block counts and update the last time status of the island.
*
* @param blocks All the blocks to place.
* @return Results per block key. Only non-successful results will be returned.
*/
Map handleBlocksPlaceWithResult(Map blocks);
/**
* Handle placements of many blocks in one time.
*
* @param blocks All the blocks to place.
* @param flags See {@link IslandBlockFlags}
*/
void handleBlocksPlace(Map blocks, @IslandBlockFlags int flags);
/**
* Handle placements of many blocks in one time.
*
* @param blocks All the blocks to place.
* @param flags See {@link IslandBlockFlags}
* @return Results per block key. Only non-successful results will be returned.
*/
Map