diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index f0fd0f0b3..527cacc90 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -1228,7 +1228,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade public function setDataProperty($id, $type, $value){ if(parent::setDataProperty($id, $type, $value)){ - $this->sendData([$this], [$id => $this->dataProperties[$id]]); + $this->sendData($this, [$id => $this->dataProperties[$id]]); return true; } diff --git a/src/pocketmine/entity/Effect.php b/src/pocketmine/entity/Effect.php index b5dac33b2..9626f317c 100644 --- a/src/pocketmine/entity/Effect.php +++ b/src/pocketmine/entity/Effect.php @@ -238,7 +238,7 @@ class Effect{ public function add(Entity $entity, $modify = false){ if($entity instanceof Player){ $pk = new MobEffectPacket(); - $pk->eid = $entity->getId(); + $pk->eid = 0; $pk->effectId = $this->getId(); $pk->amplifier = $this->getAmplifier(); $pk->particles = $this->isVisible(); @@ -261,7 +261,7 @@ class Effect{ public function remove(Entity $entity){ if($entity instanceof Player){ $pk = new MobEffectPacket(); - $pk->eid = $entity->getId(); + $pk->eid = 0; $pk->eventId = MobEffectPacket::EVENT_REMOVE; $pk->effectId = $this->getId();