mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 01:09:44 +00:00
InventoryManager: remove redundant cyclic dependency
This commit is contained in:
parent
9bebc6c69d
commit
26178b4435
@ -132,7 +132,7 @@ class InventoryManager{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function syncAll() : void{
|
public function syncAll() : void{
|
||||||
foreach($this->player->getAllWindows() as $inventory){
|
foreach($this->windowMap as $inventory){
|
||||||
$this->syncContents($inventory);
|
$this->syncContents($inventory);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2677,17 +2677,6 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
|
|||||||
$this->permanentWindows = [];
|
$this->permanentWindows = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Inventory[]
|
|
||||||
*/
|
|
||||||
public function getAllWindows() : array{
|
|
||||||
$windows = $this->permanentWindows;
|
|
||||||
if($this->currentWindow !== null){
|
|
||||||
$windows[] = $this->currentWindow;
|
|
||||||
}
|
|
||||||
return $windows;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setMetadata(string $metadataKey, MetadataValue $newMetadataValue) : void{
|
public function setMetadata(string $metadataKey, MetadataValue $newMetadataValue) : void{
|
||||||
$this->server->getPlayerMetadata()->setMetadata($this, $metadataKey, $newMetadataValue);
|
$this->server->getPlayerMetadata()->setMetadata($this, $metadataKey, $newMetadataValue);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user