I want to remove dropped item in my server, but when i try the code, its kill all entity in the server. Need help
You don't need help. You juste need to Search. https://forums.pmmp.io/threads/clearing-dropped-items.2067/
Item is not an Entity juste check if is not a Creature PHP: foreach($this->getServer()->getLevels() as $level){foreach($level->getEntities() as $entity){if(!($entity instanceof Creature)){//check if is this not a Creature$entity->close();}}}