public function __construct(LegionPE $main) { parent::__construct($main); $this->main = $main; $this->spleefChan = $this->getMain()->getChannelManager()->joinChannel($main, "spleef", Channel::CLASS_MODULAR); $this->getMain()->getServer()->getPluginManager()->registerEvents($this, $main); $this->getMain()->getServer()->getScheduler()->scheduleDelayedRepeatingTask($this, 1, 1); for ($id = 1; $id <= Settings::spleef_arenaCnt(); $id++) { $this->arenas[$id] = new SpleefArena($this, $id); $this->arenas[$id]->reset(); } $this->spleefWorld = $this->getMain()->getServer()->getLevelByName("world_spleef"); $this->getMain()->getServer()->getScheduler()->scheduleRepeatingTask(new CallbackPluginTask($this->getMain(), function () { for ($id = 1; $id <= Settings::spleef_arenaCnt(); $id++) { Settings::spleef_updateArenaSigns($this->arenas[$id]); } }), 40); }