I want to give back the items the player had before a match so that there's no need to clear inventory, i have saved the contents of the inventory in an array but sometimes setting the player's inventory in PlayerDeathEvent never occurs, i dont understand why? whats the alternative to this? please any help is appreciated!
You can make it that way: public Function onDeath (PlayerDeathEvent $event){ $event->setkeepInventory(true); }