mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 02:38:54 +00:00
SlotChangeAction: fix feedback loop
This commit is contained in:
parent
8551d1e282
commit
44be2179c4
@ -110,7 +110,9 @@ class SlotChangeAction extends InventoryAction{
|
||||
*/
|
||||
public function onExecuteSuccess(Player $source) : void{
|
||||
foreach($this->inventory->getViewers() as $viewer){
|
||||
$viewer->getNetworkSession()->syncInventorySlot($this->inventory, $this->inventorySlot);
|
||||
if($viewer !== $source){
|
||||
$viewer->getNetworkSession()->syncInventorySlot($this->inventory, $this->inventorySlot);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user