hello, i was working on a minigame plugin and i need to clear Mobs entity(beside Slappers entities) in a world, i stored their's edit in an array. So how would i kill/clear those mobs?
PHP: foreach($yourEntityArray as $ent){if(!in_array($ent, $this->getServer()->getPluginManager()->getPlugin("Slapper")->exemptedEntities)) $ent->close();}// I use close, because it removes the entity instead of kill(), which kills the entity And about exemptedEntities, its an array by Slapper which includes the entities from Slapper. When the the in_array function doesnt work, then try to check for Slapper NBT tags like Slapper_Version or other Slapper exclusive NBT tags. For more help, ask @jojoe77777
... Slapper doesn't have an array for that. !$entity instanceof SlapperEntity && !$entity instanceof SlapperHuman Read the code again: PHP: $clearLagg = $this->getServer()->getPluginManager()->getPlugin("ClearLagg"); if ($clearLagg !== null) { $clearLagg->exemptEntity($entity); }