mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
More PhpStorm inspections, import cleanup
This commit is contained in:
@ -118,7 +118,6 @@ use pocketmine\network\protocol\PlayerActionPacket;
|
||||
use pocketmine\network\protocol\PlayStatusPacket;
|
||||
use pocketmine\network\protocol\ResourcePacksInfoPacket;
|
||||
use pocketmine\network\protocol\RespawnPacket;
|
||||
use pocketmine\network\protocol\SetDifficultyPacket;
|
||||
use pocketmine\network\protocol\SetEntityMotionPacket;
|
||||
use pocketmine\network\protocol\SetHealthPacket;
|
||||
use pocketmine\network\protocol\SetPlayerGameTypePacket;
|
||||
@ -134,10 +133,7 @@ use pocketmine\permission\PermissibleBase;
|
||||
use pocketmine\permission\PermissionAttachment;
|
||||
use pocketmine\plugin\Plugin;
|
||||
use pocketmine\tile\ItemFrame;
|
||||
use pocketmine\tile\Sign;
|
||||
use pocketmine\tile\Spawnable;
|
||||
use pocketmine\tile\Tile;
|
||||
use pocketmine\utils\Binary;
|
||||
use pocketmine\utils\TextFormat;
|
||||
use pocketmine\utils\UUID;
|
||||
|
||||
@ -3612,27 +3608,4 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
||||
public function isLoaderActive(){
|
||||
return $this->isConnected();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $chunkX
|
||||
* @param int $chunkZ
|
||||
* @param string $payload
|
||||
*
|
||||
* @return DataPacket
|
||||
*/
|
||||
public static function getChunkCacheFromData($chunkX, $chunkZ, $payload){
|
||||
$pk = new FullChunkDataPacket();
|
||||
$pk->chunkX = $chunkX;
|
||||
$pk->chunkZ = $chunkZ;
|
||||
$pk->data = $payload;
|
||||
$pk->encode();
|
||||
|
||||
$batch = new BatchPacket();
|
||||
$batch->payload = zlib_encode(Binary::writeUnsignedVarInt(strlen($pk->getBuffer())) . $pk->getBuffer(), ZLIB_ENCODING_DEFLATE, Server::getInstance()->networkCompressionLevel);
|
||||
|
||||
$batch->encode();
|
||||
$batch->isEncoded = true;
|
||||
return $batch;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user