Interface KonquestRuin
- All Superinterfaces:
KonquestTerritory
A ruin territory with critical blocks and optional ruin golem spawn points.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addCriticalLocation
(Set<org.bukkit.Location> locs) Adds a set of critical blocks to this ruin.boolean
addCriticalLocation
(org.bukkit.Location loc) Adds a new critical block to this ruin.boolean
addSpawnLocation
(Set<org.bukkit.Location> locs) Adds a set of spawn points to this ruin.boolean
addSpawnLocation
(org.bukkit.Location loc) Adds a new Ruin Golem spawn point to this ruin.void
Remove all critical blocks of this ruin.void
Remove all spawn points of this ruin.Set<org.bukkit.Location>
Gets a set of all critical block locations in this ruin.int
Gets the remaining number of unbroken critical blocks.Set<org.bukkit.Location>
Gets a set of all ruin golem spawn locations in this ruin.boolean
Checks whether this ruin is able to be captured.boolean
isEmpty()
Checks if there are any online players inside of this ruin.Methods inherited from interface com.github.rumsfield.konquest.api.model.KonquestTerritory
getCenterLoc, getChunkPoints, getKingdom, getName, getSpawnLoc, getTerritoryType, getWorld, isLocAdjacent, isLocInside
-
Method Details
-
isCaptureDisabled
boolean isCaptureDisabled()Checks whether this ruin is able to be captured. Ruins are captured when all critical blocks are destroyed. Capturing the ruin is disabled after it has been captured for a time duration based on the Konquest configuration.- Returns:
- True when this ruin cannot be captured, else false
-
addCriticalLocation
boolean addCriticalLocation(org.bukkit.Location loc) Adds a new critical block to this ruin. The location must be inside of the ruin's claimed chunks. The block at the location must match the Material type specified in the Konquest configuration for ruin critical blocks.- Parameters:
loc
- The location within the ruin to make a critical block- Returns:
- True when the location was successfully added, else false
-
addCriticalLocation
Adds a set of critical blocks to this ruin. This has the same constraints as addCriticalLocation(Location loc).- Parameters:
locs
- The locations within the ruin to make into critical blocks- Returns:
- True when all locations were successfully added, else false (some locations may have been added)
-
clearCriticalLocations
void clearCriticalLocations()Remove all critical blocks of this ruin. This does not remove the blocks from the world, but rather the ruin no longer keeps track of any critical blocks. -
getCriticalLocations
Set<org.bukkit.Location> getCriticalLocations()Gets a set of all critical block locations in this ruin.- Returns:
- The set of locations
-
addSpawnLocation
boolean addSpawnLocation(org.bukkit.Location loc) Adds a new Ruin Golem spawn point to this ruin. The given location will be the spawn point for a single Ruin Golem. When the Ruin Golem dies, it will respawn at its spawn point. Each spawn point location in the ruin will yield a single Ruin Golem. The location must be within the ruin's claimed chunks.- Parameters:
loc
- The location within the ruin to make a spawn point- Returns:
- True when the location was successfully added, else false
-
addSpawnLocation
Adds a set of spawn points to this ruin. This has the same constraints as addSpawnLocation(Location loc).- Parameters:
locs
- The locations within the ruin to make into spawn points- Returns:
- True when all locations were successfully added, else false (some locations may have been added)
-
clearSpawnLocations
void clearSpawnLocations()Remove all spawn points of this ruin. This also removes any Ruin Golems in the world. -
getSpawnLocations
Set<org.bukkit.Location> getSpawnLocations()Gets a set of all ruin golem spawn locations in this ruin.- Returns:
- The set of locations
-
getRemainingCriticalHits
int getRemainingCriticalHits()Gets the remaining number of unbroken critical blocks. When all critical blocks are broken, the ruin is captured temporarily.- Returns:
- The amount of unbroken critical blocks.
-
isEmpty
boolean isEmpty()Checks if there are any online players inside of this ruin.- Returns:
- True when there are no players inside of this ruin, else false
-