mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Fixes inventory changes getting the wrong window, closes #2187
This commit is contained in:
parent
05f71691fc
commit
245e9b4f18
@ -388,8 +388,6 @@ abstract class BaseInventory implements Inventory{
|
||||
for($i = 0; $i < $this->getSize(); ++$i){
|
||||
$pk->slots[$i] = $this->getItem($i);
|
||||
}
|
||||
$pk->isEncoded = true;
|
||||
$pk->encode();
|
||||
|
||||
foreach($target as $player){
|
||||
if(($id = $player->getWindowId($this)) === -1 or $player->spawned !== true){
|
||||
@ -413,8 +411,6 @@ abstract class BaseInventory implements Inventory{
|
||||
$pk = new ContainerSetSlotPacket;
|
||||
$pk->slot = $index;
|
||||
$pk->item = clone $this->getItem($index);
|
||||
$pk->encode();
|
||||
$pk->isEncoded = true;
|
||||
|
||||
foreach($target as $player){
|
||||
if(($id = $player->getWindowId($this)) === -1){
|
||||
|
Loading…
x
Reference in New Issue
Block a user