Class RaidMock

java.lang.Object
be.seeseemelk.mockbukkit.RaidMock
All Implemented Interfaces:
io.papermc.paper.persistence.PersistentDataViewHolder, org.bukkit.persistence.PersistentDataHolder, org.bukkit.Raid

public class RaidMock extends Object implements org.bukkit.Raid
Mock implementation of a Raid.
  • Constructor Details

    • RaidMock

      public RaidMock(int id, org.bukkit.Location location)
  • Method Details

    • isStarted

      public boolean isStarted()
      Specified by:
      isStarted in interface org.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:
      getActiveTicks in interface org.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:
      getBadOmenLevel in interface org.bukkit.Raid
    • setBadOmenLevel

      public void setBadOmenLevel(int badOmenLevel)
      Specified by:
      setBadOmenLevel in interface org.bukkit.Raid
    • getLocation

      @NotNull public @NotNull org.bukkit.Location getLocation()
      Specified by:
      getLocation in interface org.bukkit.Raid
    • getStatus

      @NotNull public @NotNull org.bukkit.Raid.RaidStatus getStatus()
      Specified by:
      getStatus in interface org.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:
      getSpawnedGroups in interface org.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:
      getTotalGroups in interface org.bukkit.Raid
    • getTotalWaves

      public int getTotalWaves()
      Specified by:
      getTotalWaves in interface org.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:
      getTotalHealth in interface org.bukkit.Raid
    • getHeroes

      @NotNull public @NotNull Set<UUID> getHeroes()
      Specified by:
      getHeroes in interface org.bukkit.Raid
    • setHeroes

      public void setHeroes(Set<UUID> heroes)
      Set the UUID of all heroes in this raid.
      Parameters:
      heroes - a set containing heroes ids
    • getRaiders

      @NotNull public @NotNull List<org.bukkit.entity.Raider> getRaiders()
      Specified by:
      getRaiders in interface org.bukkit.Raid
    • setRaiders

      public void setRaiders(List<org.bukkit.entity.Raider> raiders)
      Set all the remaining Raider in the current wave.
      Parameters:
      raiders - a list of current raiders.
    • getId

      public int getId()
      Specified by:
      getId in interface org.bukkit.Raid
    • getBossBar

      @NotNull public @NotNull org.bukkit.boss.BossBar getBossBar()
      Specified by:
      getBossBar in interface org.bukkit.Raid
    • getPersistentDataContainer

      @NotNull public @NotNull org.bukkit.persistence.PersistentDataContainer getPersistentDataContainer()
      Specified by:
      getPersistentDataContainer in interface org.bukkit.persistence.PersistentDataHolder
      Specified by:
      getPersistentDataContainer in interface io.papermc.paper.persistence.PersistentDataViewHolder