Package be.seeseemelk.mockbukkit
Class RaidMock
java.lang.Object
be.seeseemelk.mockbukkit.RaidMock
- All Implemented Interfaces:
io.papermc.paper.persistence.PersistentDataViewHolder,org.bukkit.persistence.PersistentDataHolder,org.bukkit.Raid
Mock implementation of a
Raid.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.Raid
org.bukkit.Raid.RaidStatus -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongint@NotNull org.bukkit.boss.BossBarintgetId()@NotNull org.bukkit.Location@NotNull org.bukkit.persistence.PersistentDataContainer@NotNull List<org.bukkit.entity.Raider> int@NotNull org.bukkit.Raid.RaidStatusintfloatintbooleanvoidsetActiveTicks(long activeTicks) Set the amount of time in ticks this raid has existed.voidsetBadOmenLevel(int badOmenLevel) voidSet theUUIDof all heroes in this raid.voidsetRaiders(List<org.bukkit.entity.Raider> raiders) Set all the remainingRaiderin the current wave.voidsetSpawnedGroups(int spawnedGroups) Set the number of raider groups which have already spawned.voidsetStarted(boolean started) Sets whether this raid has started or not.voidsetStatus(org.bukkit.Raid.RaidStatus status) Set the current status of the raid.voidsetWaves(int waves) Set the number of waves in this raid (excluding the additional waves).voidsetWaves(org.bukkit.Difficulty difficulty) Set the number of waves in this raid based on a difficulty level.
-
Constructor Details
-
RaidMock
public RaidMock(int id, org.bukkit.Location location)
-
-
Method Details
-
isStarted
public boolean isStarted()- Specified by:
isStartedin interfaceorg.bukkit.Raid
-
setStarted
public void setStarted(boolean started) Sets whether this raid has started or not.- Parameters:
started- Is raid started?
-
getActiveTicks
public long getActiveTicks()- Specified by:
getActiveTicksin interfaceorg.bukkit.Raid
-
setActiveTicks
public void setActiveTicks(long activeTicks) Set the amount of time in ticks this raid has existed.- Parameters:
activeTicks- ticks since start.
-
getBadOmenLevel
public int getBadOmenLevel()- Specified by:
getBadOmenLevelin interfaceorg.bukkit.Raid
-
setBadOmenLevel
public void setBadOmenLevel(int badOmenLevel) - Specified by:
setBadOmenLevelin interfaceorg.bukkit.Raid
-
getLocation
@NotNull public @NotNull org.bukkit.Location getLocation()- Specified by:
getLocationin interfaceorg.bukkit.Raid
-
getStatus
@NotNull public @NotNull org.bukkit.Raid.RaidStatus getStatus()- Specified by:
getStatusin interfaceorg.bukkit.Raid
-
setStatus
public void setStatus(org.bukkit.Raid.RaidStatus status) Set the current status of the raid.- Parameters:
status- raid status
-
getSpawnedGroups
public int getSpawnedGroups()- Specified by:
getSpawnedGroupsin interfaceorg.bukkit.Raid
-
setSpawnedGroups
public void setSpawnedGroups(int spawnedGroups) Set the number of raider groups which have already spawned.- Parameters:
spawnedGroups- the number of groups.
-
getTotalGroups
public int getTotalGroups()- Specified by:
getTotalGroupsin interfaceorg.bukkit.Raid
-
getTotalWaves
public int getTotalWaves()- Specified by:
getTotalWavesin interfaceorg.bukkit.Raid
-
setWaves
public void setWaves(int waves) Set the number of waves in this raid (excluding the additional waves).- Parameters:
waves- number waves.
-
setWaves
public void setWaves(org.bukkit.Difficulty difficulty) Set the number of waves in this raid based on a difficulty level.- When difficulty is EASY the wave count is 3.
- When difficulty is NORMAL the wave count is 5.
- When difficulty is HARD the wave count is 7.
- Any other difficulty wave count is 0.
- Parameters:
difficulty- the difficulty level
-
getTotalHealth
public float getTotalHealth()- Specified by:
getTotalHealthin interfaceorg.bukkit.Raid
-
getHeroes
- Specified by:
getHeroesin interfaceorg.bukkit.Raid
-
setHeroes
Set theUUIDof all heroes in this raid.- Parameters:
heroes- a set containing heroes ids
-
getRaiders
- Specified by:
getRaidersin interfaceorg.bukkit.Raid
-
setRaiders
Set all the remainingRaiderin the current wave.- Parameters:
raiders- a list of current raiders.
-
getId
public int getId()- Specified by:
getIdin interfaceorg.bukkit.Raid
-
getBossBar
@NotNull public @NotNull org.bukkit.boss.BossBar getBossBar()- Specified by:
getBossBarin interfaceorg.bukkit.Raid
-
getPersistentDataContainer
@NotNull public @NotNull org.bukkit.persistence.PersistentDataContainer getPersistentDataContainer()- Specified by:
getPersistentDataContainerin interfaceorg.bukkit.persistence.PersistentDataHolder- Specified by:
getPersistentDataContainerin interfaceio.papermc.paper.persistence.PersistentDataViewHolder
-