mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Tidy debug messages
This commit is contained in:
@ -164,7 +164,7 @@ class InventoryManager implements InventoryListener{
|
||||
private function add(int $id, InventoryWindow $window) : void{
|
||||
$k = spl_object_id($window->getInventory());
|
||||
if(isset($this->entries[$k])){
|
||||
throw new \InvalidArgumentException("Inventory " . get_class($window) . " is already tracked");
|
||||
throw new \InvalidArgumentException("Inventory " . get_class($window->getInventory()) . " is already tracked (open in two different windows?)");
|
||||
}
|
||||
$this->entries[$k] = new InventoryManagerEntry($window);
|
||||
$window->getInventory()->getListeners()->add($this);
|
||||
|
@ -2832,7 +2832,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
if(($inventoryManager = $this->getNetworkSession()->getInvManager()) === null){
|
||||
throw new \InvalidArgumentException("Player cannot open inventories in this state");
|
||||
}
|
||||
$this->logger->debug("Opening inventory " . get_class($window) . "#" . spl_object_id($window));
|
||||
$this->logger->debug("Opening inventory window " . get_class($window) . "#" . spl_object_id($window));
|
||||
$inventoryManager->onCurrentWindowChange($window);
|
||||
$window->onOpen();
|
||||
$this->currentWindow = $window;
|
||||
@ -2843,7 +2843,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
$this->doCloseInventory();
|
||||
if($this->currentWindow !== null){
|
||||
$currentWindow = $this->currentWindow;
|
||||
$this->logger->debug("Closing inventory " . get_class($this->currentWindow) . "#" . spl_object_id($this->currentWindow));
|
||||
$this->logger->debug("Closing inventory window " . get_class($this->currentWindow) . "#" . spl_object_id($this->currentWindow));
|
||||
$this->currentWindow->onClose();
|
||||
if(($inventoryManager = $this->getNetworkSession()->getInvManager()) !== null){
|
||||
$inventoryManager->onCurrentWindowRemove();
|
||||
|
Reference in New Issue
Block a user