public class ASkyBlockAPI
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
boolean |
calculateIslandLevel(java.util.UUID playerUUID)
Calculates the island level.
|
java.util.LinkedHashMap<java.lang.String,java.util.List<java.lang.String>> |
getAllChallenges()
Get all the challenges
|
java.util.Map<java.lang.String,java.lang.Boolean> |
getChallengeStatus(java.util.UUID playerUUID) |
java.util.Map<java.lang.String,java.lang.Integer> |
getChallengeTimes(java.util.UUID playerUUID) |
java.util.Set<org.bukkit.Location> |
getCoopIslands(org.bukkit.entity.Player player)
Find out which coop islands player is a part of
|
org.bukkit.Location |
getHomeLocation(java.util.UUID playerUUID) |
static ASkyBlockAPI |
getInstance() |
com.wasteofplastic.askyblock.Island |
getIslandAt(org.bukkit.Location location)
Returns the Island object for an island at this location or null if one does not exist
|
int |
getIslandCount() |
int |
getIslandLevel(java.util.UUID playerUUID)
Deprecated.
Island level is now a long and the int value may not be accurate for very large values.
Use getLongIslandLevel(UUID playerUUID) instead.
Returns the island level from the last time it was calculated. Note this
does not calculate the island level.
|
org.bukkit.Location |
getIslandLocation(java.util.UUID playerUUID)
Provides the location of the player's island, either the team island or
their own
|
java.lang.String |
getIslandName(java.util.UUID owner)
Get name of the island owned by owner
|
com.wasteofplastic.askyblock.Island |
getIslandOwnedBy(java.util.UUID playerUUID)
Obtains a copy of the island object owned by playerUUID
|
org.bukkit.World |
getIslandWorld()
Get the island overworld
|
long |
getLongIslandLevel(java.util.UUID playerUUID)
Returns the island level from the last time it was calculated.
|
java.util.Map<java.util.UUID,java.lang.Long> |
getLongTopTen()
Get the top ten list
|
org.bukkit.World |
getNetherWorld()
Get the nether world
|
java.util.HashMap<java.util.UUID,com.wasteofplastic.askyblock.Island> |
getOwnedIslands()
Get a copy of the ownership map of islands
|
java.util.UUID |
getOwner(org.bukkit.Location location)
Returns the owner of an island from the location.
|
int |
getResetsLeft(java.util.UUID playerUUID)
Get the number of resets left for this player
|
org.bukkit.Location |
getSpawnLocation()
Provides spawn location
|
int |
getSpawnRange()
Provides the spawn range
|
java.util.UUID |
getTeamLeader(java.util.UUID playerUUID)
Get Team Leader
|
java.util.List<java.util.UUID> |
getTeamMembers(java.util.UUID playerUUID)
Get a list of team members.
|
java.util.Map<java.util.UUID,java.lang.Integer> |
getTopTen()
Deprecated.
Island levels are now stored as longs, so the int value may not be accurate
Get the top ten list
|
org.bukkit.Location |
getWarp(java.util.UUID playerUUID)
Provides location of the player's warp sign
|
java.lang.String |
getWarpOwner(org.bukkit.Location location)
Get the owner of the warp at location
|
boolean |
hasIsland(java.util.UUID playerUUID)
Status of island ownership.
|
boolean |
inTeam(java.util.UUID playerUUID) |
boolean |
isAtSpawn(org.bukkit.Location location)
Checks if a location is at spawn or not
|
boolean |
isCoop(org.bukkit.entity.Player player)
Player is in a coop or not
|
boolean |
islandAtLocation(org.bukkit.Location location)
Determines if an island is at a location in this area location.
|
boolean |
isLeader(java.util.UUID playerUUID)
Find out if this player is a team leader or not.
|
boolean |
isNewNether()
Whether the new nether is being used or not
|
boolean |
isOnIsland(org.bukkit.entity.Player owner,
org.bukkit.entity.Player target)
Checks to see if a player is trespassing on another player's island.
|
java.util.Set<java.util.UUID> |
listWarps()
Lists all the known warps.
|
boolean |
locationIsOnIsland(org.bukkit.entity.Player player,
org.bukkit.Location location)
Checks if a specific location is within the protected range of an island
owned by the player
|
org.bukkit.Location |
locationIsOnIsland(java.util.Set<org.bukkit.Location> islandTestLocations,
org.bukkit.Location loc)
Finds out if location is within a set of island locations and returns the
one that is there or null if not.
|
boolean |
playerIsOnIsland(org.bukkit.entity.Player player)
Checks if an online player is on their island, on a team island or on a
coop island
|
boolean |
setIslandBiome(org.bukkit.Location islandLoc,
org.bukkit.block.Biome biomeType)
Sets all blocks in an island to a specified biome type
|
void |
setIslandLevel(java.util.UUID playerUUID,
int level)
Sets the player's island level.
|
void |
setIslandName(java.util.UUID owner,
java.lang.String name)
Set the island name
|
boolean |
setMessage(java.util.UUID playerUUID,
java.lang.String message)
Sets a message for the player to receive next time they login
|
void |
setResetsLeft(java.util.UUID playerUUID,
int resets)
Set the number of resets left for this player
|
void |
tellOfflineTeam(java.util.UUID playerUUID,
java.lang.String message)
Sends a message to every player in the team that is offline If the player
is not in a team, nothing happens.
|
void |
updateWarpPanel()
Forces the warp panel to update and the warp list event to fire so that
the warps can be sorted how you like.
|
public static ASkyBlockAPI getInstance()
public java.util.Map<java.lang.String,java.lang.Boolean> getChallengeStatus(java.util.UUID playerUUID)
playerUUID
- - the player's UUID - player's UUIDpublic java.util.Map<java.lang.String,java.lang.Integer> getChallengeTimes(java.util.UUID playerUUID)
playerUUID
- - the player's UUID - player's UUIDpublic org.bukkit.Location getHomeLocation(java.util.UUID playerUUID)
public int getIslandLevel(java.util.UUID playerUUID)
playerUUID
- - the player's UUID - player's UUIDpublic long getLongIslandLevel(java.util.UUID playerUUID)
playerUUID
- - the player's UUID - player's UUIDpublic void setIslandLevel(java.util.UUID playerUUID, int level)
playerUUID
- - the player's UUID - player's UUIDlevel
- - level to setpublic boolean calculateIslandLevel(java.util.UUID playerUUID)
playerUUID
- - the player's UUID - player's UUIDpublic org.bukkit.Location getIslandLocation(java.util.UUID playerUUID)
playerUUID
- - the player's UUID - players UUIDpublic java.util.UUID getOwner(org.bukkit.Location location)
location
- - location to checkpublic java.util.UUID getTeamLeader(java.util.UUID playerUUID)
playerUUID
- - the player's UUID - player's UUIDpublic java.util.List<java.util.UUID> getTeamMembers(java.util.UUID playerUUID)
playerUUID
- - the player's UUID - player's UUIDpublic org.bukkit.Location getWarp(java.util.UUID playerUUID)
playerUUID
- - the player's UUID - player's UUIDpublic java.lang.String getWarpOwner(org.bukkit.Location location)
location
- - location of the warppublic boolean hasIsland(java.util.UUID playerUUID)
playerUUID
- - the player's UUID - player's UUIDpublic boolean inTeam(java.util.UUID playerUUID)
playerUUID
- - the player's UUID - player's UUIDpublic boolean islandAtLocation(org.bukkit.Location location)
location
- - location to checkpublic boolean isOnIsland(org.bukkit.entity.Player owner, org.bukkit.entity.Player target)
owner
- - player owner or team member of an islandtarget
- - player who may be doing the trespassingpublic java.util.Set<java.util.UUID> listWarps()
public void updateWarpPanel()
public boolean locationIsOnIsland(org.bukkit.entity.Player player, org.bukkit.Location location)
player
- - player objectlocation
- - location to checkpublic org.bukkit.Location locationIsOnIsland(java.util.Set<org.bukkit.Location> islandTestLocations, org.bukkit.Location loc)
islandTestLocations
- - Set of island locations to checkloc
- - location to checkpublic boolean playerIsOnIsland(org.bukkit.entity.Player player)
player
- - the player who is being checkedpublic boolean setIslandBiome(org.bukkit.Location islandLoc, org.bukkit.block.Biome biomeType)
islandLoc
- - island locationbiomeType
- - biome typepublic boolean setMessage(java.util.UUID playerUUID, java.lang.String message)
playerUUID
- - the player's UUID - player's UUIDmessage
- - message to setpublic void tellOfflineTeam(java.util.UUID playerUUID, java.lang.String message)
playerUUID
- - the player's UUID - player's UUIDmessage
- - message to sendpublic boolean isCoop(org.bukkit.entity.Player player)
player
- - player object to checkpublic java.util.Set<org.bukkit.Location> getCoopIslands(org.bukkit.entity.Player player)
player
- - player object to checkpublic org.bukkit.Location getSpawnLocation()
public int getSpawnRange()
public boolean isAtSpawn(org.bukkit.Location location)
location
- - location to checkpublic org.bukkit.World getIslandWorld()
public org.bukkit.World getNetherWorld()
public boolean isNewNether()
public java.util.Map<java.util.UUID,java.lang.Integer> getTopTen()
public java.util.Map<java.util.UUID,java.lang.Long> getLongTopTen()
public com.wasteofplastic.askyblock.Island getIslandOwnedBy(java.util.UUID playerUUID)
playerUUID
- - the player's UUID - player's UUIDpublic com.wasteofplastic.askyblock.Island getIslandAt(org.bukkit.Location location)
location
- - location requestedpublic int getIslandCount()
public java.util.HashMap<java.util.UUID,com.wasteofplastic.askyblock.Island> getOwnedIslands()
public java.lang.String getIslandName(java.util.UUID owner)
owner
- - player's UUIDpublic void setIslandName(java.util.UUID owner, java.lang.String name)
owner
- - player's UUIDname
- - name to setpublic java.util.LinkedHashMap<java.lang.String,java.util.List<java.lang.String>> getAllChallenges()
public int getResetsLeft(java.util.UUID playerUUID)
playerUUID
- - the player's UUID - player's UUIDpublic void setResetsLeft(java.util.UUID playerUUID, int resets)
playerUUID
- - the player's UUID - player's UUIDresets
- - number to setpublic boolean isLeader(java.util.UUID playerUUID)
playerUUID
- - the player's UUID - player's UUID