public interface Island extends java.lang.Comparable<Island>, IMissionsHolder, IPersistentDataHolder, IDatabaseBridgeHolder
Modifier and Type | Method and Description |
---|---|
void |
addCoop(SuperiorPlayer superiorPlayer)
Add a player to the island as a co-op member.
|
void |
addMember(SuperiorPlayer superiorPlayer,
PlayerRole playerRole)
Add a player to the island.
|
void |
applyEffects(SuperiorPlayer superiorPlayer)
Give all the island effects to a player.
|
void |
banMember(SuperiorPlayer superiorPlayer)
Ban a member from the island.
|
void |
banMember(SuperiorPlayer superiorPlayer,
SuperiorPlayer whom)
Ban a member from the island.
|
void |
calcIslandWorth(SuperiorPlayer asker)
Recalculate the island's worth value.
|
void |
calcIslandWorth(SuperiorPlayer asker,
java.lang.Runnable callback)
Recalculate the island's worth value.
|
void |
clearBlockCounts()
Clear all the block counts of the island.
|
void |
clearBlockLimits()
Clear all the block limits of the island.
|
void |
clearEffects()
Remove all the effects from the island.
|
void |
clearEntitiesLimits()
Clear all the entities limits from the island.
|
void |
clearGeneratorAmounts(org.bukkit.World.Environment environment)
Clear all the custom generator amounts for this island.
|
IslandWarp |
createWarp(java.lang.String name,
org.bukkit.Location location,
WarpCategory warpCategory)
Create a warp for the island.
|
WarpCategory |
createWarpCategory(java.lang.String name)
Create a new warp category.
|
void |
deleteCategory(WarpCategory warpCategory)
Delete a warp category.
|
void |
deleteWarp(java.lang.String name)
Delete a warp from the island.
|
void |
deleteWarp(SuperiorPlayer superiorPlayer,
org.bukkit.Location location)
Delete a warp from the island.
|
void |
disableSettings(IslandFlag islandFlag)
Disable an island settings.
|
void |
disbandIsland()
Disband the island.
|
void |
enableSettings(IslandFlag islandFlag)
Enable an island settings.
|
void |
executeCommand(java.lang.String command,
boolean onlyOnlineMembers,
java.util.UUID... ignoredMembers)
Execute a command on all the members of the island.
|
Key |
generateBlock(org.bukkit.Location location,
boolean optimizeCobblestone)
Generate a block at a specified location.
|
Key |
generateBlock(org.bukkit.Location location,
org.bukkit.World.Environment environment,
boolean optimizeCobblestone)
Generate a block at a specified location.
|
java.util.List<org.bukkit.Chunk> |
getAllChunks()
Get all the chunks of the island from all the environments.
|
java.util.List<org.bukkit.Chunk> |
getAllChunks(boolean onlyProtected)
Get all the chunks of the island from all the environments.
|
java.util.List<org.bukkit.Chunk> |
getAllChunks(org.bukkit.World.Environment environment)
Get all the chunks of the island.
|
java.util.List<org.bukkit.Chunk> |
getAllChunks(org.bukkit.World.Environment environment,
boolean onlyProtected)
Get all the chunks of the island, including empty ones.
|
java.util.List<org.bukkit.Chunk> |
getAllChunks(org.bukkit.World.Environment environment,
boolean onlyProtected,
boolean noEmptyChunks)
Get all the chunks of the island.
|
java.util.List<java.util.concurrent.CompletableFuture<org.bukkit.Chunk>> |
getAllChunksAsync(org.bukkit.World.Environment environment,
boolean onlyProtected,
boolean noEmptyChunks,
java.util.function.Consumer<org.bukkit.Chunk> onChunkLoad)
Get all the chunks of the island asynchronized.
|
java.util.List<java.util.concurrent.CompletableFuture<org.bukkit.Chunk>> |
getAllChunksAsync(org.bukkit.World.Environment environment,
boolean onlyProtected,
java.util.function.Consumer<org.bukkit.Chunk> onChunkLoad)
Get all the chunks of the island asynchronized, including empty chunks.
|
java.util.List<SuperiorPlayer> |
getAllPlayersInside()
Get the list of all the players that are on the island.
|
java.util.Map<IslandFlag,java.lang.Byte> |
getAllSettings()
Get all the settings of the island.
|
java.math.BigDecimal |
getBankLimit()
Get the limit of the bank.
|
java.math.BigDecimal |
getBankLimitRaw()
Get the limit of the bank that was set using a command.
|
java.util.List<SuperiorPlayer> |
getBannedPlayers()
Get the list of all banned players.
|
org.bukkit.block.Biome |
getBiome()
The current biome of the island.
|
java.math.BigInteger |
getBlockCountAsBigInteger(Key key)
Get the amount of blocks that are on the island.
|
java.util.Map<Key,java.math.BigInteger> |
getBlockCountsAsBigInteger()
Get all the blocks that are on the island.
|
int |
getBlockLimit(Key key)
Get the block limit of a block.
|
Key |
getBlockLimitKey(Key key)
Get the block key used as a limit for another block key.
|
java.util.Map<Key,java.lang.Integer> |
getBlocksLimits()
Get all the blocks limits for the island.
|
IslandBlocksTrackerAlgorithm |
getBlocksTracker()
Get the blocks-tracker used by this island.
|
java.math.BigDecimal |
getBonusLevel()
Get the bonus level of the island.
|
java.math.BigDecimal |
getBonusWorth()
Get the bonus worth of the island.
|
IslandCalculationAlgorithm |
getCalculationAlgorithm()
Get the calculation algorithm used by this island.
|
org.bukkit.Location |
getCenter(org.bukkit.World.Environment environment)
Get the center location of the island, depends on the world environment.
|
IslandChest[] |
getChest()
Get the island chest.
|
int |
getChestSize()
Get the amount of pages the island chest has.
|
int |
getCoopLimit()
Get the coop players limit of the island.
|
int |
getCoopLimitRaw()
Get the coop players limit of the island that was set using a command.
|
java.util.List<SuperiorPlayer> |
getCoopPlayers()
Get the list of all co-op players.
|
long |
getCreationTime()
Get the creation time of the island.
|
java.lang.String |
getCreationTimeDate()
Get the creation time of the island, in a formatted string.
|
double |
getCropGrowthMultiplier()
Get the crop-growth multiplier for the island.
|
double |
getCropGrowthRaw()
Get the crop-growth multiplier for the island that was set using a command.
|
java.util.Map<Key,java.lang.Integer> |
getCustomBlocksLimits()
Get all the custom blocks limits for the island.
|
java.util.Map<Key,java.lang.Integer> |
getCustomEntitiesLimits()
Get all the custom entities limits for the island.
|
java.util.Map<Key,java.lang.Integer> |
getCustomGeneratorAmounts(org.bukkit.World.Environment environment)
Get the custom amounts of the materials for the cobblestone generator in the island.
|
java.util.Map<PlayerRole,java.lang.Integer> |
getCustomRoleLimits()
Get all the custom role limits for the island.
|
java.lang.String |
getDescription()
Get the description of the island.
|
java.lang.String |
getDiscord()
Get the discord that is associated with the island.
|
java.util.Map<Key,java.lang.Integer> |
getEntitiesLimitsAsKeys()
Get all the entities limits for the island.
|
IslandEntitiesTrackerAlgorithm |
getEntitiesTracker()
Get the entities tracker used by the island.
|
int |
getEntityLimit(org.bukkit.entity.EntityType entityType)
Get the entity limit of an entity.
|
int |
getEntityLimit(Key key)
Get the entity limit of an entity.
|
java.math.BigInteger |
getExactBlockCountAsBigInteger(Key key)
Get the amount of blocks that are on the island.
|
int |
getExactBlockLimit(Key key)
Get the block limit of a block.
|
int |
getGeneratedSchematicsFlag()
Get the generated schematics flag.
|
int |
getGeneratorAmount(Key key,
org.bukkit.World.Environment environment)
Get the amount of a specific key in a specific world.
|
java.util.Map<java.lang.String,java.lang.Integer> |
getGeneratorAmounts(org.bukkit.World.Environment environment)
Get the amounts of the materials for the cobblestone generator in the island.
|
int |
getGeneratorPercentage(Key key,
org.bukkit.World.Environment environment)
Get the percentage for a specific key in a specific world.
|
java.util.Map<java.lang.String,java.lang.Integer> |
getGeneratorPercentages(org.bukkit.World.Environment environment)
Get the percentages of the materials for the cobblestone generator in the island for a specific world.
|
int |
getGeneratorTotalAmount(org.bukkit.World.Environment environment)
Get the total amount of all the generator keys together.
|
java.util.List<SuperiorPlayer> |
getInvitedPlayers()
Get all the invited players of the island.
|
IslandBank |
getIslandBank()
Get the bank of the island.
|
org.bukkit.Location |
getIslandHome(org.bukkit.World.Environment environment)
Get the members' home location of the island, depends on the world environment.
|
java.util.Map<org.bukkit.World.Environment,org.bukkit.Location> |
getIslandHomes()
Get all the home locations of the island.
|
java.math.BigDecimal |
getIslandLevel()
Get the level of the island.
|
java.util.List<SuperiorPlayer> |
getIslandMembers(boolean includeOwner)
Get the list of members of the island.
|
java.util.List<SuperiorPlayer> |
getIslandMembers(PlayerRole... playerRoles)
Get the list of members of the island with specific roles.
|
int |
getIslandSize()
Get the island radius of the island.
|
int |
getIslandSizeRaw()
Get the island radius of the island that was set with a command.
|
java.util.List<SuperiorPlayer> |
getIslandVisitors()
Get the list of all visitors that are on the island, including vanished ones.
|
java.util.List<SuperiorPlayer> |
getIslandVisitors(boolean vanishPlayers)
Get the list of all visitors that are on the island.
|
java.util.Map<java.lang.String,IslandWarp> |
getIslandWarps()
Get all the warps of the island.
|
long |
getLastInterestTime()
Get the last time that the bank interest was given.
|
long |
getLastTimeUpdate()
Get the last time the island was updated.
|
long |
getLastTimeUpgrade()
Get the last time the island was upgraded.
|
java.util.List<org.bukkit.Chunk> |
getLoadedChunks(boolean onlyProtected,
boolean noEmptyChunks)
Get all the loaded chunks of the island.
|
java.util.List<org.bukkit.Chunk> |
getLoadedChunks(org.bukkit.World.Environment environment,
boolean onlyProtected,
boolean noEmptyChunks)
Get all the loaded chunks of the island.
|
org.bukkit.Location |
getMaximum()
Get the maximum location of the island.
|
org.bukkit.Location |
getMaximumProtected()
Get the minimum protected location of the island.
|
org.bukkit.Location |
getMinimum()
Get the minimum location of the island.
|
org.bukkit.Location |
getMinimumProtected()
Get the minimum protected location of the island.
|
double |
getMobDropsMultiplier()
Get the mob-drops multiplier for the island.
|
double |
getMobDropsRaw()
Get the mob-drops multiplier for the island that was set using a command.
|
java.lang.String |
getName()
Get the name of the island.
|
long |
getNextInterest()
Get the duration until the bank interest will be given again, in seconds
|
SuperiorPlayer |
getOwner()
Get the owner of the island.
|
java.lang.String |
getPaypal()
Get the paypal that is associated with the island.
|
PermissionNode |
getPermissionNode(SuperiorPlayer superiorPlayer)
Get the permission-node of a player.
|
java.util.Map<SuperiorPlayer,PermissionNode> |
getPlayerPermissions()
Get all the custom player permissions of the island.
|
int |
getPosition(SortingType sortingType) |
int |
getPotionEffectLevel(org.bukkit.potion.PotionEffectType type)
Get the level of an island effect.
|
java.util.Map<org.bukkit.potion.PotionEffectType,java.lang.Integer> |
getPotionEffects()
Get a list of all active island effects with their levels.
|
Rating |
getRating(SuperiorPlayer superiorPlayer)
Get the rating that a player has given the island.
|
int |
getRatingAmount()
Get the amount of ratings that have have been given to the island.
|
java.util.Map<java.util.UUID,Rating> |
getRatings()
Get all the ratings of the island.
|
java.math.BigDecimal |
getRawLevel()
Get the level value of the island, excluding the bonus level.
|
java.lang.String |
getRawName()
Get the name of the island, unformatted.
|
java.math.BigDecimal |
getRawWorth()
Get the worth value of the island, excluding bonus worth and the money in the bank.
|
PlayerRole |
getRequiredPlayerRole(IslandPrivilege islandPrivilege)
Get the required role for a specific permission.
|
int |
getRoleLimit(PlayerRole playerRole)
Get the limit of players that can have the same role at a time.
|
int |
getRoleLimitRaw(PlayerRole playerRole)
Get the limit of players that can have the same role at a time that was set using a command.
|
java.util.Map<PlayerRole,java.lang.Integer> |
getRoleLimits()
Get all the role limits for the island.
|
java.util.Map<IslandPrivilege,PlayerRole> |
getRolePermissions()
Get the permissions and their required roles.
|
java.lang.String |
getSchematicName()
Get the schematic that was used to create the island.
|
double |
getSpawnerRatesMultiplier()
Get the spawner-rates multiplier for the island.
|
double |
getSpawnerRatesRaw()
Get the spawner-rates multiplier for the island that was set using a command.
|
int |
getTeamLimit()
Get the team limit of the island.
|
int |
getTeamLimitRaw()
Get the team limit of the island that was set with a command.
|
org.bukkit.Location |
getTeleportLocation(org.bukkit.World.Environment environment)
Get the members' teleport location of the island, depends on the world environment.
|
java.util.Map<org.bukkit.World.Environment,org.bukkit.Location> |
getTeleportLocations()
Get all the teleport locations of the island.
|
double |
getTotalRating()
Get the total rating of the island.
|
java.util.UUID |
getUniqueId()
Get the unique-id of the island.
|
java.util.List<SuperiorPlayer> |
getUniqueVisitors()
Get all the visitors that visited the island until now.
|
java.util.List<Pair<SuperiorPlayer,java.lang.Long>> |
getUniqueVisitorsWithTimes()
Get all the visitors that visited the island until now, with the time they last visited.
|
int |
getUnlockedWorldsFlag()
Get the unlocked worlds flag.
|
UpgradeLevel |
getUpgradeLevel(Upgrade upgrade)
Get the level of an upgrade for the island.
|
java.util.Map<java.lang.String,java.lang.Integer> |
getUpgrades()
Get all the upgrades with their levels.
|
org.bukkit.Location |
getVisitorsLocation()
Get the visitors' teleport location of the island.
|
IslandWarp |
getWarp(org.bukkit.Location location)
Get an island warp in a specific location.
|
IslandWarp |
getWarp(java.lang.String name)
Get an island warp by it's name..
|
java.util.Map<java.lang.String,WarpCategory> |
getWarpCategories()
Get all the warp categories of the island.
|
WarpCategory |
getWarpCategory(int slot)
Get a warp category by the slot inside the manage menu.
|
WarpCategory |
getWarpCategory(java.lang.String name)
Get a warp category.
|
int |
getWarpsLimit()
Get the warps limit of the island.
|
int |
getWarpsLimitRaw()
Get the warps limit of the island that was set using a command.
|
java.math.BigDecimal |
getWorth()
Get the worth value of the island, including the money in the bank.
|
boolean |
giveInterest(boolean checkOnlineOwner)
Give the bank interest to this island.
|
void |
handleBlockBreak(org.bukkit.block.Block block)
Handle a break of a block.
|
void |
handleBlockBreak(org.bukkit.block.Block block,
int amount)
Handle a break of a block with a specific amount.
|
void |
handleBlockBreak(org.bukkit.block.Block block,
int amount,
boolean save)
Handle a break of a block with a specific amount.
|
void |
handleBlockBreak(Key key,
java.math.BigInteger amount,
boolean save)
Handle a break of a block with a specific amount.
|
void |
handleBlockBreak(Key key,
int amount)
Handle a break of a block's key with a specific amount.
|
void |
handleBlockBreak(Key key,
int amount,
boolean save)
Handle a break of a block with a specific amount.
|
void |
handleBlockPlace(org.bukkit.block.Block block)
Handle a placement of a block.
|
void |
handleBlockPlace(org.bukkit.block.Block block,
int amount)
Handle a placement of a block with a specific amount.
|
void |
handleBlockPlace(org.bukkit.block.Block block,
int amount,
boolean save)
Handle a placement of a block with a specific amount.
|
void |
handleBlockPlace(Key key,
java.math.BigInteger amount,
boolean save)
Handle a placement of a block's key with a specific amount.
|
void |
handleBlockPlace(Key key,
java.math.BigInteger amount,
boolean save,
boolean updateLastTimeStatus)
Handle a placement of a block's key with a specific amount.
|
void |
handleBlockPlace(Key key,
int amount)
Handle a placement of a block's key with a specific amount.
|
void |
handleBlockPlace(Key key,
int amount,
boolean save)
Handle a placement of a block's key with a specific amount.
|
void |
handleBlocksPlace(java.util.Map<Key,java.lang.Integer> blocks)
Handle placements of many blocks in one time.
|
boolean |
hasActiveUpgradeCooldown()
Check if the island has an active upgrade cooldown.
|
boolean |
hasPermission(org.bukkit.command.CommandSender sender,
IslandPrivilege islandPrivilege)
Check if a CommandSender has a permission.
|
boolean |
hasPermission(PlayerRole playerRole,
IslandPrivilege islandPrivilege)
Check if a role has a permission.
|
boolean |
hasPermission(SuperiorPlayer superiorPlayer,
IslandPrivilege islandPrivilege)
Check if a player has a permission.
|
boolean |
hasReachedBlockLimit(Key key)
A method to check if a specific block has reached the limit.
|
boolean |
hasReachedBlockLimit(Key key,
int amount)
A method to check if a specific block has reached the limit.
|
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
hasReachedEntityLimit(org.bukkit.entity.EntityType entityType)
A method to check if a specific entity has reached the limit.
|
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
hasReachedEntityLimit(org.bukkit.entity.EntityType entityType,
int amount)
A method to check if a specific entity has reached the limit.
|
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
hasReachedEntityLimit(Key key)
A method to check if a specific entity has reached the limit.
|
java.util.concurrent.CompletableFuture<java.lang.Boolean> |
hasReachedEntityLimit(Key key,
int amount)
A method to check if a specific entity has reached the limit.
|
boolean |
hasSettingsEnabled(IslandFlag islandFlag)
Check whether a settings is enabled or not.
|
void |
inviteMember(SuperiorPlayer superiorPlayer)
Invite a player to the island.
|
boolean |
isBanned(SuperiorPlayer superiorPlayer)
Checks whether a player is banned from the island.
|
boolean |
isBeingRecalculated()
Checks whether the island is being recalculated currently.
|
boolean |
isCoop(SuperiorPlayer superiorPlayer)
Check whether a player is a co-op member of the island.
|
boolean |
isEndEnabled()
Is the end world enabled for the island?
|
boolean |
isIgnored()
Checks whether the island is ignored in the top islands.
|
boolean |
isInside(org.bukkit.Location location)
Check if the location is inside the island's area.
|
boolean |
isInsideRange(org.bukkit.Chunk chunk)
Check if the chunk is inside the island's protected area.
|
boolean |
isInsideRange(org.bukkit.Location location)
Check if the location is inside the island's protected area.
|
boolean |
isInsideRange(org.bukkit.Location location,
int extraRadius)
Check if the location is inside the island's protected area.
|
boolean |
isInvited(SuperiorPlayer superiorPlayer)
Checks whether the player has been invited to the island.
|
boolean |
isLocked()
Check whether the island is locked to visitors.
|
boolean |
isMember(SuperiorPlayer superiorPlayer)
Check whether a player is a member of the island.
|
boolean |
isNetherEnabled()
Is the nether world enabled for the island?
|
boolean |
isNormalEnabled()
Is the normal world enabled for the island?
|
boolean |
isSpawn()
Checks whether the island is the spawn island.
|
boolean |
isVisitor(SuperiorPlayer superiorPlayer,
boolean checkCoopStatus)
Check whether a player is a visitor of the island or not.
|
void |
kickMember(SuperiorPlayer superiorPlayer)
Kick a member from the island.
|
void |
removeBlockLimit(Key key)
Remove the limit of a block.
|
void |
removeCoop(SuperiorPlayer superiorPlayer)
Remove a player from being a co-op member.
|
void |
removeEffects()
Remove all the island effects from the players inside the island.
|
void |
removeEffects(SuperiorPlayer superiorPlayer)
Remove all the island effects from a player.
|
void |
removeGeneratorAmount(Key key,
org.bukkit.World.Environment environment)
Remove a rate for a specific key in a specific world.
|
void |
removePotionEffect(org.bukkit.potion.PotionEffectType type)
Remove a potion effect from the island.
|
void |
removeRating(SuperiorPlayer superiorPlayer)
Remove a rating of a player.
|
void |
removeRatings()
Remove all the ratings of the island.
|
void |
removeRoleLimit(PlayerRole playerRole)
Remove the limit of the amount of players that can have the role in the island.
|
void |
renameCategory(WarpCategory warpCategory,
java.lang.String newName)
Rename a category.
|
void |
renameWarp(IslandWarp islandWarp,
java.lang.String newName)
Rename a warp.
|
void |
replacePlayers(SuperiorPlayer originalPlayer,
SuperiorPlayer newPlayer)
Replace a player with a new player.
|
void |
resetChunks(boolean onlyProtected)
Reset all the chunks of the island from all the worlds (will make all chunks empty).
|
void |
resetChunks(boolean onlyProtected,
java.lang.Runnable onFinish)
Reset all the chunks of the island from all the worlds (will make all chunks empty).
|
void |
resetChunks(org.bukkit.World.Environment environment,
boolean onlyProtected)
Reset all the chunks of the island (will make all chunks empty).
|
void |
resetChunks(org.bukkit.World.Environment environment,
boolean onlyProtected,
java.lang.Runnable onFinish)
Reset all the chunks of the island (will make all chunks empty).
|
void |
resetPermissions()
Reset the roles permissions to default values.
|
void |
resetPermissions(SuperiorPlayer superiorPlayer)
Reset player permissions to default values.
|
void |
revokeInvite(SuperiorPlayer superiorPlayer)
Revoke an invitation of a player.
|
void |
sendMessage(java.lang.String message,
java.util.UUID... ignoredMembers)
Send a plain message to all the members of the island.
|
void |
sendTitle(java.lang.String title,
java.lang.String subtitle,
int fadeIn,
int duration,
int fadeOut,
java.util.UUID... ignoredMembers)
Send a plain message to all the members of the island.
|
void |
setBankLimit(java.math.BigDecimal bankLimit)
Set a new limit for the bank.
|
void |
setBiome(org.bukkit.block.Biome biome)
Change the biome of the island's area.
|
void |
setBiome(org.bukkit.block.Biome biome,
boolean updateBlocks)
Change the biome of the island's area.
|
void |
setBlockLimit(Key key,
int limit)
Set the block limit of a block.
|
void |
setBonusLevel(java.math.BigDecimal bonusLevel)
Set a bonus level for the island.
|
void |
setBonusWorth(java.math.BigDecimal bonusWorth)
Set a bonus worth for the island.
|
void |
setChestRows(int index,
int rows)
Set the amount of rows for the chest in a specific index.
|
void |
setCoopLimit(int coopLimit)
Set the coop players limit of the island.
|
void |
setCropGrowthMultiplier(double cropGrowth)
Set the crop-growth multiplier for the island.
|
void |
setCurrentlyActive()
Flag the island as a currently active island.
|
void |
setDescription(java.lang.String description)
Set the description of the island.
|
void |
setDiscord(java.lang.String discord)
Set the discord that will be associated with the island.
|
void |
setEndEnabled(boolean enabled)
Enable/disable the end world for the island.
|
void |
setEntityLimit(org.bukkit.entity.EntityType entityType,
int limit)
Set the entity limit of an entity.
|
void |
setEntityLimit(Key key,
int limit)
Set the entity limit of an entity.
|
void |
setGeneratorAmount(Key key,
int amount,
org.bukkit.World.Environment environment)
Set an amount for a specific key in a specific world.
|
void |
setGeneratorPercentage(Key key,
int percentage,
org.bukkit.World.Environment environment)
Set a percentage for a specific key in a specific world.
|
boolean |
setGeneratorPercentage(Key key,
int percentage,
org.bukkit.World.Environment environment,
SuperiorPlayer caller,
boolean callEvent)
Set a percentage for a specific key in a specific world.
|
void |
setIgnored(boolean ignored)
Set whether the island should be ignored in the top islands.
|
void |
setIslandHome(org.bukkit.Location homeLocation)
Set the members' teleport location of the island.
|
void |
setIslandHome(org.bukkit.World.Environment environment,
org.bukkit.Location homeLocation)
Set the members' teleport location of the island.
|
void |
setIslandSize(int islandSize)
Set the radius of the island.
|
void |
setLastInterestTime(long lastInterest)
Set the last time that the bank interest was given.
|
void |
setLastTimeUpdate(long lastTimeUpdate)
Set the last time the island was updated.
|
void |
setLocked(boolean locked)
Lock or unlock the island to visitors.
|
void |
setMobDropsMultiplier(double mobDrops)
Set the mob-drops multiplier for the island.
|
void |
setName(java.lang.String islandName)
Set the name of the island.
|
void |
setNetherEnabled(boolean enabled)
Enable/disable the nether world for the island.
|
void |
setNormalEnabled(boolean enabled)
Enable/disable the normal world for the island.
|
void |
setPaypal(java.lang.String paypal)
Get the paypal that will be associated with the island.
|
void |
setPermission(PlayerRole playerRole,
IslandPrivilege islandPrivilege)
Set a permission to a specific role.
|
void |
setPermission(PlayerRole playerRole,
IslandPrivilege islandPrivilege,
boolean value)
Deprecated.
|
void |
setPermission(SuperiorPlayer superiorPlayer,
IslandPrivilege islandPrivilege,
boolean value)
Set a permission to a specific player.
|
void |
setPlayerInside(SuperiorPlayer superiorPlayer,
boolean inside)
Update status of a player if he's inside the island or not.
|
void |
setPotionEffect(org.bukkit.potion.PotionEffectType type,
int level)
Add a potion effect to the island.
|
void |
setRating(SuperiorPlayer superiorPlayer,
Rating rating)
Set a rating of a player.
|
void |
setRoleLimit(PlayerRole playerRole,
int limit)
Set the limit of the amount of players that can have the role in the island.
|
void |
setSchematicGenerate(org.bukkit.World.Environment environment)
Set schematic generated flag to true.
|
void |
setSchematicGenerate(org.bukkit.World.Environment environment,
boolean generated)
Set schematic generated flag.
|
void |
setSpawnerRatesMultiplier(double spawnerRates)
Set the spawner-rates multiplier for the island.
|
void |
setTeamLimit(int teamLimit)
Set the team limit of the island.
|
void |
setTeleportLocation(org.bukkit.Location teleportLocation)
Set the members' teleport location of the island.
|
void |
setTeleportLocation(org.bukkit.World.Environment environment,
org.bukkit.Location teleportLocation)
Set the members' teleport location of the island.
|
void |
setUpgradeLevel(Upgrade upgrade,
int level)
Set the level of an upgrade for the island.
|
void |
setVisitorsLocation(org.bukkit.Location visitorsLocation)
Set the visitors' teleport location of the island.
|
void |
setWarpsLimit(int warpsLimit)
Set the warps limit for the island.
|
void |
syncUpgrades()
Sync all the upgrade values again.
|
boolean |
transferIsland(SuperiorPlayer superiorPlayer)
Transfer the island's leadership to another player.
|
void |
unbanMember(SuperiorPlayer superiorPlayer)
Unban a player from the island.
|
void |
updateBorder()
Update the border of all the players inside the island.
|
void |
updateDatesFormatter()
Re-sync the island with a new dates formatter.
|
void |
updateIslandFly(SuperiorPlayer superiorPlayer)
Update the fly status for a player on this island.
|
void |
updateLastTime()
Update the last time the island was used.
|
void |
updateUpgrades()
Update the upgrade values from default values of config & upgrades file.
|
void |
warpPlayer(SuperiorPlayer superiorPlayer,
java.lang.String warp)
Teleport a player to a warp.
|
boolean |
wasSchematicGenerated(org.bukkit.World.Environment environment)
Checks if a schematic was generated already.
|
canCompleteMissionAgain, completeMission, getAmountMissionCompleted, getCompletedMissions, getCompletedMissionsWithAmounts, hasCompletedMission, resetMission
getPersistentDataContainer
getDatabaseBridge
SuperiorPlayer getOwner()
java.util.UUID getUniqueId()
long getCreationTime()
java.lang.String getCreationTimeDate()
void updateDatesFormatter()
java.util.List<SuperiorPlayer> getIslandMembers(boolean includeOwner)
includeOwner
- Whether the owner should be returned.java.util.List<SuperiorPlayer> getIslandMembers(PlayerRole... playerRoles)
playerRoles
- The roles to filter with.java.util.List<SuperiorPlayer> getBannedPlayers()
java.util.List<SuperiorPlayer> getIslandVisitors()
java.util.List<SuperiorPlayer> getIslandVisitors(boolean vanishPlayers)
vanishPlayers
- Should vanish players be included?java.util.List<SuperiorPlayer> getAllPlayersInside()
java.util.List<SuperiorPlayer> getUniqueVisitors()
java.util.List<Pair<SuperiorPlayer,java.lang.Long>> getUniqueVisitorsWithTimes()
void inviteMember(SuperiorPlayer superiorPlayer)
superiorPlayer
- The player to invite.void revokeInvite(SuperiorPlayer superiorPlayer)
superiorPlayer
- The player to revoke his invite.boolean isInvited(SuperiorPlayer superiorPlayer)
java.util.List<SuperiorPlayer> getInvitedPlayers()
void addMember(SuperiorPlayer superiorPlayer, PlayerRole playerRole)
superiorPlayer
- The player to add.playerRole
- The role to give to the player.void kickMember(SuperiorPlayer superiorPlayer)
superiorPlayer
- The player to kick.boolean isMember(SuperiorPlayer superiorPlayer)
superiorPlayer
- The player to check.void banMember(SuperiorPlayer superiorPlayer)
superiorPlayer
- The player to ban.void banMember(SuperiorPlayer superiorPlayer, @Nullable SuperiorPlayer whom)
superiorPlayer
- The player to ban.whom
- The player that executed the ban command.
If null, CONSOLE will be chosen as the banner.void unbanMember(SuperiorPlayer superiorPlayer)
superiorPlayer
- The player to unban.boolean isBanned(SuperiorPlayer superiorPlayer)
superiorPlayer
- The player to check.void addCoop(SuperiorPlayer superiorPlayer)
superiorPlayer
- The player to add.void removeCoop(SuperiorPlayer superiorPlayer)
superiorPlayer
- The player to remove.boolean isCoop(SuperiorPlayer superiorPlayer)
superiorPlayer
- The player to check.java.util.List<SuperiorPlayer> getCoopPlayers()
int getCoopLimit()
int getCoopLimitRaw()
void setCoopLimit(int coopLimit)
coopLimit
- The coop players limit to set.void setPlayerInside(SuperiorPlayer superiorPlayer, boolean inside)
superiorPlayer
- The player to add.boolean isVisitor(SuperiorPlayer superiorPlayer, boolean checkCoopStatus)
superiorPlayer
- The player to check.checkCoopStatus
- Whether to check for coop status or not.
If enabled, coops will not be considered as visitors.org.bukkit.Location getCenter(org.bukkit.World.Environment environment)
environment
- The environment.@Nullable org.bukkit.Location getTeleportLocation(org.bukkit.World.Environment environment)
getIslandHome(World.Environment)
environment
- The environment.java.util.Map<org.bukkit.World.Environment,org.bukkit.Location> getTeleportLocations()
getIslandHomes()
void setTeleportLocation(org.bukkit.Location teleportLocation)
setIslandHome(Location)
teleportLocation
- The new teleport location.void setTeleportLocation(org.bukkit.World.Environment environment, @Nullable org.bukkit.Location teleportLocation)
setIslandHome(org.bukkit.World.Environment, Location)
environment
- The environment to change teleport location for.teleportLocation
- The new teleport location.@Nullable org.bukkit.Location getIslandHome(org.bukkit.World.Environment environment)
environment
- The environment.java.util.Map<org.bukkit.World.Environment,org.bukkit.Location> getIslandHomes()
void setIslandHome(org.bukkit.Location homeLocation)
homeLocation
- The new home location.void setIslandHome(org.bukkit.World.Environment environment, @Nullable org.bukkit.Location homeLocation)
environment
- The environment to change teleport location for.homeLocation
- The new home location.@Nullable org.bukkit.Location getVisitorsLocation()
void setVisitorsLocation(@Nullable org.bukkit.Location visitorsLocation)
visitorsLocation
- The new visitors location.org.bukkit.Location getMinimum()
org.bukkit.Location getMinimumProtected()
org.bukkit.Location getMaximum()
org.bukkit.Location getMaximumProtected()
java.util.List<org.bukkit.Chunk> getAllChunks()
java.util.List<org.bukkit.Chunk> getAllChunks(boolean onlyProtected)
onlyProtected
- Whether only chunks inside the protected area should be returned.java.util.List<org.bukkit.Chunk> getAllChunks(org.bukkit.World.Environment environment)
environment
- The environment to get the chunks from.java.util.List<org.bukkit.Chunk> getAllChunks(org.bukkit.World.Environment environment, boolean onlyProtected)
environment
- The environment to get the chunks from.onlyProtected
- Whether only chunks inside the protected area should be returned.java.util.List<org.bukkit.Chunk> getAllChunks(org.bukkit.World.Environment environment, boolean onlyProtected, boolean noEmptyChunks)
environment
- The environment to get the chunks from.onlyProtected
- Whether only chunks inside the protected area should be returned.noEmptyChunks
- Should empty chunks be loaded or not?java.util.List<org.bukkit.Chunk> getLoadedChunks(boolean onlyProtected, boolean noEmptyChunks)
onlyProtected
- Whether only chunks inside the protected area should be returned.noEmptyChunks
- Should empty chunks be loaded or not?java.util.List<org.bukkit.Chunk> getLoadedChunks(org.bukkit.World.Environment environment, boolean onlyProtected, boolean noEmptyChunks)
environment
- The environment to get the chunks from.onlyProtected
- Whether only chunks inside the protected area should be returned.noEmptyChunks
- Should empty chunks be loaded or not?java.util.List<java.util.concurrent.CompletableFuture<org.bukkit.Chunk>> getAllChunksAsync(org.bukkit.World.Environment environment, boolean onlyProtected, @Nullable java.util.function.Consumer<org.bukkit.Chunk> onChunkLoad)
environment
- The environment to get the chunks from.onlyProtected
- Whether only chunks inside the protected area should be returned.onChunkLoad
- A consumer that will be ran when the chunk is loaded. Can be null.java.util.List<java.util.concurrent.CompletableFuture<org.bukkit.Chunk>> getAllChunksAsync(org.bukkit.World.Environment environment, boolean onlyProtected, boolean noEmptyChunks, @Nullable java.util.function.Consumer<org.bukkit.Chunk> onChunkLoad)
environment
- The environment to get the chunks from.onlyProtected
- Whether only chunks inside the protected area should be returned.noEmptyChunks
- Should empty chunks be loaded or not?onChunkLoad
- A consumer that will be ran when the chunk is loaded. Can be null.void resetChunks(org.bukkit.World.Environment environment, boolean onlyProtected)
environment
- The environment to reset chunks in.onlyProtected
- Whether only chunks inside the protected area should be reset.void resetChunks(org.bukkit.World.Environment environment, boolean onlyProtected, @Nullable java.lang.Runnable onFinish)
environment
- The environment to reset chunks in.onlyProtected
- Whether only chunks inside the protected area should be reset.onFinish
- Callback runnable.void resetChunks(boolean onlyProtected)
onlyProtected
- Whether only chunks inside the protected area should be reset.void resetChunks(boolean onlyProtected, @Nullable java.lang.Runnable onFinish)
onlyProtected
- Whether only chunks inside the protected area should be reset.onFinish
- Callback runnable.boolean isInside(org.bukkit.Location location)
location
- The location to check.boolean isInsideRange(org.bukkit.Location location)
location
- The location to check.boolean isInsideRange(org.bukkit.Location location, int extraRadius)
location
- The location to check.extraRadius
- Add extra radius to the protected range.boolean isInsideRange(org.bukkit.Chunk chunk)
chunk
- The chunk to check.boolean isNormalEnabled()
void setNormalEnabled(boolean enabled)
boolean isNetherEnabled()
void setNetherEnabled(boolean enabled)
boolean isEndEnabled()
void setEndEnabled(boolean enabled)
int getUnlockedWorldsFlag()
boolean hasPermission(org.bukkit.command.CommandSender sender, IslandPrivilege islandPrivilege)
sender
- The command-sender to check.islandPrivilege
- The permission to check.boolean hasPermission(SuperiorPlayer superiorPlayer, IslandPrivilege islandPrivilege)
superiorPlayer
- The player to check.islandPrivilege
- The permission to check.boolean hasPermission(PlayerRole playerRole, IslandPrivilege islandPrivilege)
playerRole
- The role to check.islandPrivilege
- The permission to check.@Deprecated void setPermission(PlayerRole playerRole, IslandPrivilege islandPrivilege, boolean value)
setPermission(PlayerRole, IslandPrivilege)
playerRole
- The role to set the permission to.islandPrivilege
- The permission to set.value
- The value to give the permission (Unused)void setPermission(PlayerRole playerRole, IslandPrivilege islandPrivilege)
playerRole
- The role to set the permission to.islandPrivilege
- The permission to set.void resetPermissions()
void setPermission(SuperiorPlayer superiorPlayer, IslandPrivilege islandPrivilege, boolean value)
superiorPlayer
- The player to set the permission to.islandPrivilege
- The permission to set.value
- The value to give the permission.void resetPermissions(SuperiorPlayer superiorPlayer)
PermissionNode getPermissionNode(SuperiorPlayer superiorPlayer)
superiorPlayer
- The player to check.PlayerRole getRequiredPlayerRole(IslandPrivilege islandPrivilege)
islandPrivilege
- The permission to check.java.util.Map<SuperiorPlayer,PermissionNode> getPlayerPermissions()
java.util.Map<IslandPrivilege,PlayerRole> getRolePermissions()
boolean isSpawn()
java.lang.String getName()
void setName(java.lang.String islandName)
islandName
- The name to set.java.lang.String getRawName()
java.lang.String getDescription()
void setDescription(java.lang.String description)
description
- The description to set.void disbandIsland()
boolean transferIsland(SuperiorPlayer superiorPlayer)
superiorPlayer
- The player to transfer the leadership to.void replacePlayers(SuperiorPlayer originalPlayer, SuperiorPlayer newPlayer)
originalPlayer
- The old player to be replaced.newPlayer
- The new player.void calcIslandWorth(@Nullable SuperiorPlayer asker)
asker
- The player who makes the operation.void calcIslandWorth(@Nullable SuperiorPlayer asker, @Nullable java.lang.Runnable callback)
asker
- The player who makes the operation.callback
- Runnable which will be ran when process is finished.IslandCalculationAlgorithm getCalculationAlgorithm()
void updateBorder()
void updateIslandFly(SuperiorPlayer superiorPlayer)
superiorPlayer
- The player to update.int getIslandSize()
void setIslandSize(int islandSize)
islandSize
- The radius for the island.int getIslandSizeRaw()
java.lang.String getDiscord()
void setDiscord(java.lang.String discord)
java.lang.String getPaypal()
void setPaypal(java.lang.String paypal)
org.bukkit.block.Biome getBiome()
void setBiome(org.bukkit.block.Biome biome)
void setBiome(org.bukkit.block.Biome biome, boolean updateBlocks)
updateBlocks
- Whether the blocks get updated or not.boolean isLocked()
void setLocked(boolean locked)
locked
- Whether the island should be locked to visitors.boolean isIgnored()
void setIgnored(boolean ignored)
void sendMessage(java.lang.String message, java.util.UUID... ignoredMembers)
message
- The message to sendignoredMembers
- An array of ignored members.void sendTitle(@Nullable java.lang.String title, @Nullable java.lang.String subtitle, int fadeIn, int duration, int fadeOut, java.util.UUID... ignoredMembers)
title
- The main title to send.subtitle
- The sub title to send.fadeIn
- The fade-in duration in ticks.duration
- The title duration in ticks.fadeOut
- The fade-out duration in ticks.ignoredMembers
- An array of ignored members.void executeCommand(java.lang.String command, boolean onlyOnlineMembers, java.util.UUID... ignoredMembers)
command
- The command to execute.onlyOnlineMembers
- Whether the command should be executed only for online members.ignoredMembers
- An array of ignored members.boolean isBeingRecalculated()
void updateLastTime()
void setCurrentlyActive()
long getLastTimeUpdate()
void setLastTimeUpdate(long lastTimeUpdate)
lastTimeUpdate
- The last time the island was updated.IslandBank getIslandBank()
java.math.BigDecimal getBankLimit()
void setBankLimit(java.math.BigDecimal bankLimit)
bankLimit
- The limit to set. Use -1 to remove the limit.java.math.BigDecimal getBankLimitRaw()
boolean giveInterest(boolean checkOnlineOwner)
checkOnlineOwner
- Check if the island-owner was online recently.long getLastInterestTime()
void setLastInterestTime(long lastInterest)
lastInterest
- The time it was given.long getNextInterest()
void handleBlockPlace(org.bukkit.block.Block block)
block
- The block that was placed.void handleBlockPlace(org.bukkit.block.Block block, int amount)
block
- The block that was placed.amount
- The amount of the block.void handleBlockPlace(org.bukkit.block.Block block, int amount, boolean save)
block
- The block that was placed.amount
- The amount of the block.save
- Whether the block counts should be saved into database.void handleBlockPlace(Key key, int amount)
key
- The block's key that was placed.amount
- The amount of the block.void handleBlockPlace(Key key, int amount, boolean save)
key
- The block's key that was placed.amount
- The amount of the block.save
- Whether the block counts should be saved into database.void handleBlockPlace(Key key, java.math.BigInteger amount, boolean save)
key
- The block's key that was placed.amount
- The amount of the block.save
- Whether the block counts should be saved into database.void handleBlockPlace(Key key, java.math.BigInteger amount, boolean save, boolean updateLastTimeStatus)
key
- The block's key that was placed.amount
- The amount of the block.save
- Whether the block counts should be saved into database.updateLastTimeStatus
- Whether to update last time island was updated or not.void handleBlocksPlace(java.util.Map<Key,java.lang.Integer> blocks)
blocks
- All the blocks to place.void handleBlockBreak(org.bukkit.block.Block block)
block
- The block that was broken.void handleBlockBreak(org.bukkit.block.Block block, int amount)
block
- The block that was broken.amount
- The amount of the block.void handleBlockBreak(org.bukkit.block.Block block, int amount, boolean save)
block
- The block that was broken.amount
- The amount of the block.save
- Whether the block counts should be saved into the database.void handleBlockBreak(Key key, int amount)
key
- The block's key that was broken.amount
- The amount of the block.void handleBlockBreak(Key key, int amount, boolean save)
key
- The block's key that was broken.amount
- The amount of the block.save
- Whether the block counts should be saved into the database.void handleBlockBreak(Key key, java.math.BigInteger amount, boolean save)
key
- The block's key that was broken.amount
- The amount of the block.save
- Whether the block counts should be saved into the database.java.math.BigInteger getBlockCountAsBigInteger(Key key)
key
- The block's key to check.java.util.Map<Key,java.math.BigInteger> getBlockCountsAsBigInteger()
java.math.BigInteger getExactBlockCountAsBigInteger(Key key)
key
- The block's key to check.void clearBlockCounts()
IslandBlocksTrackerAlgorithm getBlocksTracker()
java.math.BigDecimal getWorth()
java.math.BigDecimal getRawWorth()
java.math.BigDecimal getBonusWorth()
void setBonusWorth(java.math.BigDecimal bonusWorth)
bonusWorth
- The bonus to give.java.math.BigDecimal getBonusLevel()
void setBonusLevel(java.math.BigDecimal bonusLevel)
bonusLevel
- The bonus to give.java.math.BigDecimal getIslandLevel()
java.math.BigDecimal getRawLevel()
UpgradeLevel getUpgradeLevel(Upgrade upgrade)
upgrade
- The upgrade to check.void setUpgradeLevel(Upgrade upgrade, int level)
upgrade
- The upgrade to set the level.level
- The level to set.java.util.Map<java.lang.String,java.lang.Integer> getUpgrades()
void syncUpgrades()
void updateUpgrades()
long getLastTimeUpgrade()
boolean hasActiveUpgradeCooldown()
double getCropGrowthMultiplier()
void setCropGrowthMultiplier(double cropGrowth)
cropGrowth
- The multiplier to set.double getCropGrowthRaw()
double getSpawnerRatesMultiplier()
void setSpawnerRatesMultiplier(double spawnerRates)
spawnerRates
- The multiplier to set.double getSpawnerRatesRaw()
double getMobDropsMultiplier()
void setMobDropsMultiplier(double mobDrops)
mobDrops
- The multiplier to set.double getMobDropsRaw()
int getBlockLimit(Key key)
key
- The block's key to check.int getExactBlockLimit(Key key)
key
- The block's key to check.Key getBlockLimitKey(Key key)
key
- The block's key to check.java.util.Map<Key,java.lang.Integer> getBlocksLimits()
java.util.Map<Key,java.lang.Integer> getCustomBlocksLimits()
void clearBlockLimits()
void setBlockLimit(Key key, int limit)
key
- The block's key to set the limit to.limit
- The limit to set.void removeBlockLimit(Key key)
key
- The block's key to remove it's limit.boolean hasReachedBlockLimit(Key key)
key
- The block's key to check.boolean hasReachedBlockLimit(Key key, int amount)
key
- The block's key to check.amount
- Amount of the block to be placed.int getEntityLimit(org.bukkit.entity.EntityType entityType)
entityType
- The entity's type to check.int getEntityLimit(Key key)
key
- The key of the entity to check.java.util.Map<Key,java.lang.Integer> getEntitiesLimitsAsKeys()
java.util.Map<Key,java.lang.Integer> getCustomEntitiesLimits()
void clearEntitiesLimits()
void setEntityLimit(org.bukkit.entity.EntityType entityType, int limit)
entityType
- The entity's type to set the limit to.limit
- The limit to set.void setEntityLimit(Key key, int limit)
key
- The key of the entity to set the limit to.limit
- The limit to set.java.util.concurrent.CompletableFuture<java.lang.Boolean> hasReachedEntityLimit(org.bukkit.entity.EntityType entityType)
entityType
- The entity's type to check.java.util.concurrent.CompletableFuture<java.lang.Boolean> hasReachedEntityLimit(Key key)
key
- The key of the entity to check.java.util.concurrent.CompletableFuture<java.lang.Boolean> hasReachedEntityLimit(org.bukkit.entity.EntityType entityType, int amount)
amount
- The amount of entities that were added.entityType
- The entity's type to check.java.util.concurrent.CompletableFuture<java.lang.Boolean> hasReachedEntityLimit(Key key, int amount)
amount
- The amount of entities that were added.key
- The key of the entity to check.IslandEntitiesTrackerAlgorithm getEntitiesTracker()
int getTeamLimit()
void setTeamLimit(int teamLimit)
teamLimit
- The team limit to set.int getTeamLimitRaw()
int getWarpsLimit()
void setWarpsLimit(int warpsLimit)
warpsLimit
- The limit to set.int getWarpsLimitRaw()
void setPotionEffect(org.bukkit.potion.PotionEffectType type, int level)
type
- The potion effect to add.level
- The level of the potion effect.
If the level is 0 or below, then the effect will be removed.void removePotionEffect(org.bukkit.potion.PotionEffectType type)
type
- The potion effect to remove.int getPotionEffectLevel(org.bukkit.potion.PotionEffectType type)
type
- The potion to check.java.util.Map<org.bukkit.potion.PotionEffectType,java.lang.Integer> getPotionEffects()
void applyEffects(SuperiorPlayer superiorPlayer)
superiorPlayer
- The player to give the effect to.void removeEffects(SuperiorPlayer superiorPlayer)
superiorPlayer
- The player to remove the effects to.void removeEffects()
void clearEffects()
void setRoleLimit(PlayerRole playerRole, int limit)
playerRole
- The role to set the limit to.limit
- The limit to set.void removeRoleLimit(PlayerRole playerRole)
playerRole
- The role to remove the limit.int getRoleLimit(PlayerRole playerRole)
playerRole
- The role to check.int getRoleLimitRaw(PlayerRole playerRole)
playerRole
- The role to check.java.util.Map<PlayerRole,java.lang.Integer> getRoleLimits()
java.util.Map<PlayerRole,java.lang.Integer> getCustomRoleLimits()
WarpCategory createWarpCategory(java.lang.String name)
name
- The name of the category.@Nullable WarpCategory getWarpCategory(java.lang.String name)
name
- The name of the category.@Nullable WarpCategory getWarpCategory(int slot)
slot
- The slot to check.void renameCategory(WarpCategory warpCategory, java.lang.String newName)
warpCategory
- The category to rename.newName
- A new name to set.void deleteCategory(WarpCategory warpCategory)
warpCategory
- The category to delete.java.util.Map<java.lang.String,WarpCategory> getWarpCategories()
IslandWarp createWarp(java.lang.String name, org.bukkit.Location location, @Nullable WarpCategory warpCategory)
name
- The name of the warp.location
- The location of the warp.warpCategory
- The category to add the island.void renameWarp(IslandWarp islandWarp, java.lang.String newName)
islandWarp
- The warp to rename.newName
- A new name to set.@Nullable IslandWarp getWarp(org.bukkit.Location location)
location
- The location to check.@Nullable IslandWarp getWarp(java.lang.String name)
name
- The name to check.void warpPlayer(SuperiorPlayer superiorPlayer, java.lang.String warp)
superiorPlayer
- The player to teleport.warp
- The warp's name to teleport the player to.void deleteWarp(@Nullable SuperiorPlayer superiorPlayer, org.bukkit.Location location)
superiorPlayer
- The player who requested the operation.location
- The location of the warp.void deleteWarp(java.lang.String name)
name
- The warp's name to delete.java.util.Map<java.lang.String,IslandWarp> getIslandWarps()
Rating getRating(SuperiorPlayer superiorPlayer)
superiorPlayer
- The player to check.void setRating(SuperiorPlayer superiorPlayer, Rating rating)
superiorPlayer
- The player that sets the rating.rating
- The rating to set.void removeRating(SuperiorPlayer superiorPlayer)
superiorPlayer
- The player to remove the rating of.double getTotalRating()
int getRatingAmount()
java.util.Map<java.util.UUID,Rating> getRatings()
void removeRatings()
boolean hasSettingsEnabled(IslandFlag islandFlag)
islandFlag
- The settings to check.java.util.Map<IslandFlag,java.lang.Byte> getAllSettings()
void enableSettings(IslandFlag islandFlag)
islandFlag
- The settings to enable.void disableSettings(IslandFlag islandFlag)
islandFlag
- The settings to disable.void setGeneratorPercentage(Key key, int percentage, org.bukkit.World.Environment environment)
This function sets the amount of the key using the following formula: amount = (percentage * total_amount) / (1 - percentage)
If the percentage is 100, the rest of the amounts will be cleared and the material's amount will be set to 1.
The amount is rounded to ensure a smaller loss, and currently it's 1%~ loss.
key
- The block to change the generator rate of.percentage
- The percentage to set the new rate.environment
- The world to change the rates in.boolean setGeneratorPercentage(Key key, int percentage, org.bukkit.World.Environment environment, @Nullable SuperiorPlayer caller, boolean callEvent)
This function sets the amount of the key using the following formula: amount = (percentage * total_amount) / (1 - percentage)
If the percentage is 100, the rest of the amounts will be cleared and the material's amount will be set to 1.
The amount is rounded to ensure a smaller loss, and currently it's 1%~ loss.
key
- The block to change the generator rate of.percentage
- The percentage to set the new rate.environment
- The world to change the rates in.caller
- The player that changes the percentages (used for the event).
If null, it means the console did the operation.callEvent
- Whether to call the IslandChangeGeneratorRateEvent
int getGeneratorPercentage(Key key, org.bukkit.World.Environment environment)
key
- The material keyenvironment
- The world environment.java.util.Map<java.lang.String,java.lang.Integer> getGeneratorPercentages(org.bukkit.World.Environment environment)
void setGeneratorAmount(Key key, int amount, org.bukkit.World.Environment environment)
void removeGeneratorAmount(Key key, org.bukkit.World.Environment environment)
int getGeneratorAmount(Key key, org.bukkit.World.Environment environment)
int getGeneratorTotalAmount(org.bukkit.World.Environment environment)
java.util.Map<java.lang.String,java.lang.Integer> getGeneratorAmounts(org.bukkit.World.Environment environment)
java.util.Map<Key,java.lang.Integer> getCustomGeneratorAmounts(org.bukkit.World.Environment environment)
void clearGeneratorAmounts(org.bukkit.World.Environment environment)
@Nullable Key generateBlock(org.bukkit.Location location, boolean optimizeCobblestone)
getGeneratorAmounts(World.Environment)
.
It doesn't look for any conditions for generating it - lava, water, etc are not required.
The method will fail if there are no valid generator rates for the environment.location
- The location to generate block at.optimizeCobblestone
- When set to true and cobblestone needs to be generated, the plugin will
not play effects, count the block towards the block counts or set the block.
This is useful when calling the method from BlockFromToEvent, and instead of letting
the player do the logic of vanilla, the plugin lets the game do it.@Nullable Key generateBlock(org.bukkit.Location location, org.bukkit.World.Environment environment, boolean optimizeCobblestone)
getGeneratorAmounts(World.Environment)
.
It doesn't look for any conditions for generating it - lava, water, etc are not required.
The method will fail if there are no valid generator rates for the environment.location
- The location to generate block at.environment
- The world to get generator rates from.optimizeCobblestone
- When set to true and cobblestone needs to be generated, the plugin will
not play effects, count the block towards the block counts or set the block.
This is useful when calling the method from BlockFromToEvent, and instead of letting
the player do the logic of vanilla, the plugin lets the game do it.boolean wasSchematicGenerated(org.bukkit.World.Environment environment)
environment
- The environment to check.void setSchematicGenerate(org.bukkit.World.Environment environment)
environment
- The environment to set.void setSchematicGenerate(org.bukkit.World.Environment environment, boolean generated)
environment
- The environment to set.generated
- The flag to set.int getGeneratedSchematicsFlag()
java.lang.String getSchematicName()
int getPosition(SortingType sortingType)
IslandChest[] getChest()
int getChestSize()
void setChestRows(int index, int rows)
index
- The index of the page (0 or above)rows
- The amount of rows for that page.