mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Implemented Channeled packet sending
This commit is contained in:
@ -25,6 +25,7 @@ use pocketmine\entity\Entity;
|
||||
use pocketmine\event\entity\EntityInventoryChangeEvent;
|
||||
use pocketmine\event\inventory\InventoryOpenEvent;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\network\Network;
|
||||
use pocketmine\network\protocol\ContainerSetContentPacket;
|
||||
use pocketmine\network\protocol\ContainerSetSlotPacket;
|
||||
use pocketmine\Player;
|
||||
@ -412,7 +413,7 @@ abstract class BaseInventory implements Inventory{
|
||||
continue;
|
||||
}
|
||||
$pk->windowid = $id;
|
||||
$player->dataPacket($pk);
|
||||
$player->dataPacket($pk->setChannel(Network::CHANNEL_WORLD_EVENTS));
|
||||
}
|
||||
}
|
||||
|
||||
@ -435,7 +436,7 @@ abstract class BaseInventory implements Inventory{
|
||||
continue;
|
||||
}
|
||||
$pk->windowid = $id;
|
||||
$player->dataPacket($pk);
|
||||
$player->dataPacket($pk->setChannel(Network::CHANNEL_WORLD_EVENTS));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user