mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 18:59:00 +00:00
This commit is contained in:
parent
09720a2d90
commit
2e0ef645fa
@ -222,7 +222,7 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
|
||||
|
||||
|
||||
if(!($this instanceof Player)){
|
||||
$this->server->updatePlayerListData($this->getUniqueId(), $this->getId(), $this->getName(), $this->isSlim, $this->skin, $player);
|
||||
$this->server->updatePlayerListData($this->getUniqueId(), $this->getId(), $this->getName(), $this->isSlim, $this->skin, [$player]);
|
||||
}
|
||||
|
||||
$pk = new AddPlayerPacket();
|
||||
@ -237,18 +237,14 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
|
||||
$pk->speedZ = $this->motionZ;
|
||||
$pk->yaw = $this->yaw;
|
||||
$pk->pitch = $this->pitch;
|
||||
$item = $this->getInventory()->getItemInHand();
|
||||
$pk->item = $item->getId();
|
||||
$pk->meta = $item->getDamage();
|
||||
$pk->skin = $this->skin;
|
||||
$pk->slim = $this->isSlim;
|
||||
$pk->item = $this->getInventory()->getItemInHand();
|
||||
$pk->metadata = $this->dataProperties;
|
||||
$player->dataPacket($pk->setChannel(Network::CHANNEL_ENTITY_SPAWNING));
|
||||
|
||||
$this->inventory->sendArmorContents($player);
|
||||
|
||||
if(!($this instanceof Player)){
|
||||
$this->server->removePlayerListData($this->getUniqueId(), $player);
|
||||
$this->server->removePlayerListData($this->getUniqueId(), [$player]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -257,8 +253,8 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
|
||||
if(isset($this->hasSpawned[$player->getLoaderId()])){
|
||||
|
||||
$pk = new RemovePlayerPacket();
|
||||
$pk->eid = $this->getUniqueId();
|
||||
$pk->clientID = $this->getId();
|
||||
$pk->eid = $this->getId();
|
||||
$pk->clientId = $this->getUniqueId();
|
||||
$player->dataPacket($pk->setChannel(Network::CHANNEL_ENTITY_SPAWNING));
|
||||
unset($this->hasSpawned[$player->getLoaderId()]);
|
||||
}
|
||||
|
@ -25,9 +25,7 @@ use pocketmine\entity\Entity;
|
||||
use pocketmine\entity\Item as ItemEntity;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\network\protocol\AddEntityPacket;
|
||||
use pocketmine\network\protocol\AddPlayerPacket;
|
||||
use pocketmine\network\protocol\RemoveEntityPacket;
|
||||
use pocketmine\network\protocol\RemovePlayerPacket;
|
||||
|
||||
class FloatingTextParticle extends Particle{
|
||||
//TODO: HACK!
|
||||
|
Loading…
x
Reference in New Issue
Block a user