public function onPlayerQuitEvent(PlayerQuitEvent $e)
 {
     $pl = MPMU::iName($e->getPlayer());
     if (isset($this->state[$pl])) {
         unset($this->state[$pl]);
     }
 }
 public function onQuit(PlayerQuitEvent $ev)
 {
     $n = MPMU::iName($ev->getPlayer());
     if (isset($this->state[$n])) {
         if (isset($this->state[$n]["trade-inv"])) {
             $this->restoreInv($ev->getPlayer());
         }
         unset($this->state[$n]);
     }
 }