Package org.spongepowered.api.raid
Interface RaidWave
-
public interface RaidWave
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
addRaider(Raider raider, boolean addToRaidHealth)
Adds aRaider
to this wave.boolean
isBonus()
Determines if this wave was a bonus of theRaid
.boolean
isFinal()
Determines if this wave was the final wave of theRaid
.java.util.Optional<Raider>
leader()
Gets theleader
of this wave.Raid
raid()
Gets theRaid
this wave is a part of.boolean
removeRaider(Raider raider)
Removes aRaider
from this wave.
-
-
-
Method Detail
-
isBonus
boolean isBonus()
Determines if this wave was a bonus of theRaid
.Bonus waves are always spawned after the final wave.
Bonus waves exist because
PotionEffectTypes.BAD_OMEN
had a level greater than 1.- Returns:
- True if bonus, false if not
-
isFinal
boolean isFinal()
Determines if this wave was the final wave of theRaid
.Whether a wave is final depends on the
Difficulty
of the world.If this wave is final, there may be bonus waves after the wave finishes.
- Returns:
- True if the final wave, false if not
-
leader
java.util.Optional<Raider> leader()
Gets theleader
of this wave.- Returns:
- The leader or
Optional.empty()
if not present
-
addRaider
boolean addRaider(Raider raider, boolean addToRaidHealth)
Adds aRaider
to this wave.- Parameters:
raider
- The raideraddToRaidHealth
- Whether to add on to aRaid's
health- Returns:
- True if raider was added, false if not
-
-