public function __construct(LegionPE $main) { $this->main = $main; $this->pvpChannel = $this->main->getChannelManager()->joinChannel($main, "kitpvp", Channel::CLASS_MODULAR); $this->main->getServer()->getPluginManager()->registerEvents($this, $this->main); Entity::registerEntity(PvpBowHolder::class, true); Entity::registerEntity(PvpKitModel::class, true); Entity::registerEntity(PvpUpgradeDummyShop::class, true); $this->getMain()->getServer()->getPluginManager()->registerEvents($this->chunkListener = $cl = new PvpGameChunkListener($this), $this->getMain()); for ($id = 1; $id <= 5; $id++) { $loc = Settings::kitpvp_getNpcLocation($this->getMain()->getServer(), $id); $this->chunkListener->addModel($loc, $id); } foreach (Settings::kitpvp_getShopLocations($this->getMain()->getServer()) as $col => $loc) { $cl->addShop($loc, $col); } }