Player: catch more specific exceptions for transactions

This commit is contained in:
Dylan K. Taylor 2019-01-03 17:57:37 +00:00
parent 0f941410f6
commit 5e0c3333cf

View File

@ -2268,7 +2268,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
if($action !== null){ if($action !== null){
$actions[] = $action; $actions[] = $action;
} }
}catch(\Exception $e){ }catch(\UnexpectedValueException $e){
$this->server->getLogger()->debug("Unhandled inventory action from " . $this->getName() . ": " . $e->getMessage()); $this->server->getLogger()->debug("Unhandled inventory action from " . $this->getName() . ": " . $e->getMessage());
$this->sendAllInventories(); $this->sendAllInventories();
return false; return false;