Interface Raid
public interface Raid
Represents a raid event.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionlongGets the amount of ticks this raid has existed.intGets the Bad Omen level of this raid.Get the UUID of all heroes in this raid.Gets the center location where the raid occurs.Gets all remainingRaiderin the present wave.intGets the number of raider groups which have spawned.Gets the current status of the raid.intGets the number of raider groups which would spawn.floatGets the sum of all raider's health.intGets the number of waves in this raid (exclude the additional wave).booleanGet whether this raid started.voidsetBadOmenLevel(int badOmenLevel) Sets the Bad Omen level.voidsetTotalWaves(int waves) Sets the total number of waves in this raid.voidstopRaid(boolean removeSpawnedRaiders) Stops this raid.
-
Method Details
-
isStarted
boolean isStarted()Get whether this raid started.- Returns:
- whether raid is started
-
stopRaid
void stopRaid(boolean removeSpawnedRaiders) Stops this raid.- Parameters:
removeSpawnedRaiders- whether to remove spawned raiders
-
getActiveTicks
long getActiveTicks()Gets the amount of ticks this raid has existed.- Returns:
- active ticks
-
getBadOmenLevel
int getBadOmenLevel()Gets the Bad Omen level of this raid.- Returns:
- Bad Omen level (between 0 and 5)
-
setBadOmenLevel
void setBadOmenLevel(int badOmenLevel) Sets the Bad Omen level.
If the level is higher than 1, there will be an additional wave that as strong as the final wave.- Parameters:
badOmenLevel- new Bad Omen level (from 0-5)- Throws:
IllegalArgumentException- if invalid Bad Omen level
-
getLocation
-
getStatus
Gets the current status of the raid.
Do not use this method to check if the raid has been started, callisStarted()instead.- Returns:
- Raids status
-
getSpawnedGroups
int getSpawnedGroups()Gets the number of raider groups which have spawned.- Returns:
- total spawned groups
-
getTotalGroups
int getTotalGroups()Gets the number of raider groups which would spawn.
This also includes the group which spawns in the additional wave (if present).- Returns:
- total groups
-
getTotalWaves
int getTotalWaves()Gets the number of waves in this raid (exclude the additional wave).- Returns:
- number of waves
-
setTotalWaves
void setTotalWaves(int waves) Sets the total number of waves in this raid.
Note: There is an automatic raid timeout that will cancel the raid entirely. At the time of writing, it is 48,000 ticks or 40 minutes. Please keep that in mind when changing the total number of waves, as your raid may be cut short without reward.- Parameters:
waves- new number of waves- Throws:
IllegalArgumentException- if total waves are less than 1
-
getTotalHealth
float getTotalHealth()Gets the sum of all raider's health.- Returns:
- total raiders health
-
getHeroes
-
getRaiders
-