public function whenplayerdie(EntityDeathEvent $ev){ $event = $ev->getEntity; if($event instanceof player){ if($ev instanceof ItemSpawnEvent){ $entity = $ev->getEntity(); $item = $entity->getItem(); $item1 = $entity->getItem(); $item2 = $entity->getItem(); if(!($entity instanceof Human)){ if($item->getid() == 260){ $entity->close($item); } if($item1->getid() == 288){ $entity->close($item1); } if($item2->getid() == 262){ $entity->close($item2); } } } } }
Okay so, already, put a title appropriate to your request, then explain your concern then paste your code in a code block and cleanly please because it is clearly illegible here and we have no idea what you want to do.
from my understanding he wants to get rid of the players drops on death which i can do that ,but i have no idea if thats right and i wont copy and paste in code if its not what is needed.
Doesn't sound like you tried. PHP: /** @var event PlayerDeathEvent */foreach(drops as drop) if(drop.id === xxx) unset(drops[drop.key]);event.setDrops(drop); Little did I.
Sorry ? For my thread I have an appropriate title. For the code he is in a code block. I don't see the problem. Just to warn in PHP there are $