mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 04:15:04 +00:00
Kill BatchPacket, clean up batching related things
DataPacketSendEvent and DataPacketReceiveEvent will no longer capture BatchPackets In most places strings are now used instead of DataPackets, to remove limitations on what data can be sent to a network interface Removed CraftingManager's cyclic dependency on Server There is a lot more work to do aside from this, but this commit is intended to clean up what is necessary to fix the handling of BatchPacket.
This commit is contained in:
@@ -26,7 +26,6 @@ declare(strict_types=1);
|
||||
*/
|
||||
namespace pocketmine\network;
|
||||
|
||||
use pocketmine\network\mcpe\protocol\DataPacket;
|
||||
use pocketmine\Player;
|
||||
|
||||
/**
|
||||
@@ -42,14 +41,14 @@ interface NetworkInterface{
|
||||
/**
|
||||
* Sends a DataPacket to the interface, returns an unique identifier for the packet if $needACK is true
|
||||
*
|
||||
* @param Player $player
|
||||
* @param DataPacket $packet
|
||||
* @param bool $needACK
|
||||
* @param bool $immediate
|
||||
* @param Player $player
|
||||
* @param string $payload
|
||||
* @param bool $needACK
|
||||
* @param bool $immediate
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function putPacket(Player $player, DataPacket $packet, bool $needACK = false, bool $immediate = true) : ?int;
|
||||
public function putPacket(Player $player, string $payload, bool $needACK = false, bool $immediate = true) : ?int;
|
||||
|
||||
/**
|
||||
* Terminates the connection
|
||||
|
Reference in New Issue
Block a user