public interface GridManager extends IDatabaseBridgeHolder
Modifier and Type | Method and Description |
---|---|
void |
addIslandToPurge(Island island)
Make the island to be deleted when server stops.
|
void |
calcAllIslands()
Calculate the worth of all the islands on the server.
|
void |
calcAllIslands(java.lang.Runnable callback)
Calculate the worth of all the islands on the server.
|
void |
cancelAllIslandPreviews()
Cancel all active island previews.
|
void |
cancelIslandPreview(SuperiorPlayer superiorPlayer)
Cancel the island preview for a specific player.
|
void |
createIsland(SuperiorPlayer superiorPlayer,
java.lang.String schemName,
java.math.BigDecimal bonusWorth,
java.math.BigDecimal bonusLevel,
org.bukkit.block.Biome biome,
java.lang.String islandName,
boolean offset)
Create a new island.
|
void |
createIsland(SuperiorPlayer superiorPlayer,
java.lang.String schemName,
java.math.BigDecimal bonus,
org.bukkit.block.Biome biome,
java.lang.String islandName)
Create a new island.
|
void |
createIsland(SuperiorPlayer superiorPlayer,
java.lang.String schemName,
java.math.BigDecimal bonus,
org.bukkit.block.Biome biome,
java.lang.String islandName,
boolean offset)
Create a new island.
|
void |
deleteIsland(Island island)
Delete an island.
|
java.util.List<java.util.UUID> |
getAllIslands(SortingType sortingType)
Get all the islands ordered by a specific sorting type.
|
int |
getBlockAmount(org.bukkit.block.Block block)
Deprecated.
|
int |
getBlockAmount(org.bukkit.Location location)
Deprecated.
|
Island |
getIsland(int position,
SortingType sortingType)
Get the island in a specific position from one of the top lists.
|
Island |
getIsland(java.lang.String islandName)
Get an island by it's name.
|
Island |
getIsland(SuperiorPlayer superiorPlayer)
Get the island of a specific player.
|
Island |
getIsland(java.util.UUID uuid)
Get an island by it's owner uuid.
|
Island |
getIslandAt(org.bukkit.Chunk chunk)
Get an island from a chunk.
|
Island |
getIslandAt(org.bukkit.Location location)
Get an island at an exact position in the world.
|
Island |
getIslandByUUID(java.util.UUID uuid)
Get an island by it's uuid.
|
IslandCreationAlgorithm |
getIslandCreationAlgorithm()
Get the currently used island creation algorithm.
|
int |
getIslandPosition(Island island,
SortingType sortingType)
Get the position of an island.
|
IslandPreview |
getIslandPreview(SuperiorPlayer superiorPlayer)
Check if a player has an ongoing island preview task.
|
java.util.List<Island> |
getIslands()
Get all the islands unordered.
|
java.util.List<Island> |
getIslands(SortingType sortingType)
Get all the islands ordered by a specific sorting type.
|
IslandsContainer |
getIslandsContainer()
Get the islands container.
|
java.util.List<Island> |
getIslandsToPurge()
Get all the islands that will be deleted when the server stops.
|
org.bukkit.World |
getIslandsWorld(Island island,
org.bukkit.World.Environment environment)
Get the world of an island by the environment.
|
org.bukkit.Location |
getLastIslandLocation()
Get the location of the last island that was generated.
|
java.util.List<org.bukkit.World> |
getRegisteredWorlds()
Get all registered worlds.
|
int |
getSize()
Get the amount of islands.
|
Island |
getSpawnIsland()
Get the spawn island object.
|
java.util.List<org.bukkit.Location> |
getStackedBlocks()
Deprecated.
|
java.math.BigDecimal |
getTotalLevel()
Get the total level of all the islands.
|
java.math.BigDecimal |
getTotalWorth()
Get the total worth of all the islands.
|
boolean |
hasActiveCreateRequest(SuperiorPlayer superiorPlayer)
Checks if a player has an active request for creating an island.
|
boolean |
isIslandPurge(Island island)
Check if the island will be deleted when the server stops?
|
boolean |
isIslandsWorld(org.bukkit.World world)
Checks if the given world is an islands world.
|
void |
registerIslandWorld(org.bukkit.World world)
Register a world as a islands world.
|
void |
registerSortingType(SortingType sortingType)
Add a new sorting type to the registry of islands.
|
void |
removeIslandFromPurge(Island island)
Remove the island from being deleted when server stops.
|
void |
setBlockAmount(org.bukkit.block.Block block,
int amount)
Deprecated.
|
void |
setIslandCreationAlgorithm(IslandCreationAlgorithm islandCreationAlgorithm)
Set the creation algorithm of islands.
|
void |
setLastIslandLocation(org.bukkit.Location location)
Set the location of the last island.
|
void |
sortIslands(SortingType sortingType)
Sort the islands.
|
void |
sortIslands(SortingType sortingType,
java.lang.Runnable onFinish)
Sort the islands.
|
void |
startIslandPreview(SuperiorPlayer superiorPlayer,
java.lang.String schemName,
java.lang.String islandName)
Start the island preview task for a specific player.
|
void |
transferIsland(java.util.UUID oldOwner,
java.util.UUID newOwner)
Transfer an island's leadership to another owner.
|
getDatabaseBridge
void createIsland(SuperiorPlayer superiorPlayer, java.lang.String schemName, java.math.BigDecimal bonus, org.bukkit.block.Biome biome, java.lang.String islandName)
superiorPlayer
- The new owner for the island.schemName
- The schematic that should be used.bonus
- A starting worth for the island.biome
- A starting biome for the island.islandName
- The name of the new island.void createIsland(SuperiorPlayer superiorPlayer, java.lang.String schemName, java.math.BigDecimal bonus, org.bukkit.block.Biome biome, java.lang.String islandName, boolean offset)
superiorPlayer
- The new owner for the island.schemName
- The schematic that should be used.bonus
- A starting worth for the island.biome
- A starting biome for the island.islandName
- The name of the new island.offset
- Should the island have an offset for it's values? If disabled, the bonus will be given.void createIsland(SuperiorPlayer superiorPlayer, java.lang.String schemName, java.math.BigDecimal bonusWorth, java.math.BigDecimal bonusLevel, org.bukkit.block.Biome biome, java.lang.String islandName, boolean offset)
superiorPlayer
- The new owner for the island.schemName
- The schematic that should be used.bonusWorth
- A starting worth for the island.bonusLevel
- A starting level for the island.biome
- A starting biome for the island.islandName
- The name of the new island.offset
- Should the island have an offset for it's values? If disabled, the bonus will be given.void setIslandCreationAlgorithm(@Nullable IslandCreationAlgorithm islandCreationAlgorithm)
islandCreationAlgorithm
- The new algorithm to set.
If null, the default one will be used.IslandCreationAlgorithm getIslandCreationAlgorithm()
boolean hasActiveCreateRequest(SuperiorPlayer superiorPlayer)
superiorPlayer
- The player to check.void startIslandPreview(SuperiorPlayer superiorPlayer, java.lang.String schemName, java.lang.String islandName)
superiorPlayer
- The player to start preview for.schemName
- The schematic to preview.islandName
- The requested island name by the player.void cancelIslandPreview(SuperiorPlayer superiorPlayer)
superiorPlayer
- The player to cancel preview for.void cancelAllIslandPreviews()
@Nullable IslandPreview getIslandPreview(SuperiorPlayer superiorPlayer)
superiorPlayer
- The player to check.void deleteIsland(Island island)
island
- The island to delete.@Nullable Island getIsland(SuperiorPlayer superiorPlayer)
superiorPlayer
- The player to check.@Nullable Island getIsland(int position, SortingType sortingType)
position
- The position to check.sortingType
- The sorting type that should be considered.int getIslandPosition(Island island, SortingType sortingType)
island
- The island to check.sortingType
- The sorting type that should be considered.@Nullable Island getIsland(java.util.UUID uuid)
uuid
- The uuid of the owner.@Nullable Island getIslandByUUID(java.util.UUID uuid)
uuid
- The uuid of the island.@Nullable Island getIsland(java.lang.String islandName)
islandName
- The name to check.@Nullable Island getIslandAt(@Nullable org.bukkit.Location location)
location
- The position to check.@Nullable Island getIslandAt(@Nullable org.bukkit.Chunk chunk)
chunk
- The chunk to check.void transferIsland(java.util.UUID oldOwner, java.util.UUID newOwner)
oldOwner
- The old owner of the island.newOwner
- The new owner of the island.int getSize()
void sortIslands(SortingType sortingType)
sortingType
- The sorting type to use.void sortIslands(SortingType sortingType, @Nullable java.lang.Runnable onFinish)
sortingType
- The sorting type to use.onFinish
- Callback runnable.Island getSpawnIsland()
@Nullable org.bukkit.World getIslandsWorld(Island island, org.bukkit.World.Environment environment)
environment
- The world environment.island
- The island to check.boolean isIslandsWorld(org.bukkit.World world)
void registerIslandWorld(org.bukkit.World world)
world
- The world to register as an islands world.java.util.List<org.bukkit.World> getRegisteredWorlds()
java.util.List<java.util.UUID> getAllIslands(SortingType sortingType)
sortingType
- The sorting type to order the list by.java.util.List<Island> getIslands()
java.util.List<Island> getIslands(SortingType sortingType)
sortingType
- The sorting type to order the list by.@Deprecated int getBlockAmount(org.bukkit.block.Block block)
StackedBlocksManager
block
- The block to check.@Deprecated int getBlockAmount(org.bukkit.Location location)
StackedBlocksManager
location
- The location to check.@Deprecated void setBlockAmount(org.bukkit.block.Block block, int amount)
StackedBlocksManager
block
- The block to set the amount to.amount
- The new amount of the block.@Deprecated java.util.List<org.bukkit.Location> getStackedBlocks()
StackedBlocksManager
void calcAllIslands()
void calcAllIslands(@Nullable java.lang.Runnable callback)
callback
- Runnable that will be ran when process is finished.void addIslandToPurge(Island island)
island
- The island to delete.void removeIslandFromPurge(Island island)
island
- The island to keep.boolean isIslandPurge(Island island)
java.util.List<Island> getIslandsToPurge()
void registerSortingType(SortingType sortingType)
sortingType
- The new sorting type to register.java.math.BigDecimal getTotalWorth()
java.math.BigDecimal getTotalLevel()
org.bukkit.Location getLastIslandLocation()
void setLastIslandLocation(org.bukkit.Location location)
location
- The location to set.IslandsContainer getIslandsContainer()