RaidManager 5.46.0
The raids of a world: turns Bad Omen into Raid Omen when a player enters a village, starts a raid when Raid Omen runs out, ticks the raids (Raid) and keeps them in RaidStore so that they survive restarts.
Constants
MIN_RAID_DISTANCE
public const MIN_RAID_DISTANCE = 96.0Two raids can't be closer than this (blocks between centres).
OMEN_CHECK_INTERVAL
public const OMEN_CHECK_INTERVAL = 20Ticks between two checks of whether players with Bad Omen are in a village.
Methods
__construct()
public function __construct(\pocketmine\world\World $world, ?\pocketmine\world\raid\RaidStore $store = null, ?bool $enabled = null)close()
public function close() : voidCalled when the world is unloaded: saves the raids and hides their bars.
getRaid()
public function getRaid(int $id) : ?\pocketmine\world\raid\RaidgetRaidAt()
public function getRaidAt(\pocketmine\math\Vector3 $pos, float $range = self::MIN_RAID_DISTANCE) : ?\pocketmine\world\raid\RaidReturns the ongoing raid whose village is around the position, if any.
getRaids()
public function getRaids() : arrayisEnabled()
public function isEnabled() : boolonRaidOmenExpired()
public function onRaidOmenExpired(\pocketmine\player\Player $player, int $amplifier) : voidCalled by RaidOmenEffect when a player's Raid Omen runs out.
onRaiderDeath()
public function onRaiderDeath(\pocketmine\entity\monster\Raider $raider, ?\pocketmine\player\Player $killer) : voidCalled when a raider taking part in a raid of this world dies.
save()
public function save() : voidstartRaid()
public function startRaid(\pocketmine\world\raid\Village $village, int $omenLevel = 1) : \pocketmine\world\raid\RaidStarts a raid on the village (as if a Raid Omen of the given level ran out there).
stopAll()
public function stopAll() : voidEnds every raid of the world at once (bars hidden, raiders back to normal).
tick()
public function tick(int $currentTick) : void