mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 16:49:53 +00:00
Fixed effect entity id
This commit is contained in:
parent
5796784442
commit
ef738ef299
@ -1228,7 +1228,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
|
|
||||||
public function setDataProperty($id, $type, $value){
|
public function setDataProperty($id, $type, $value){
|
||||||
if(parent::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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -238,7 +238,7 @@ class Effect{
|
|||||||
public function add(Entity $entity, $modify = false){
|
public function add(Entity $entity, $modify = false){
|
||||||
if($entity instanceof Player){
|
if($entity instanceof Player){
|
||||||
$pk = new MobEffectPacket();
|
$pk = new MobEffectPacket();
|
||||||
$pk->eid = $entity->getId();
|
$pk->eid = 0;
|
||||||
$pk->effectId = $this->getId();
|
$pk->effectId = $this->getId();
|
||||||
$pk->amplifier = $this->getAmplifier();
|
$pk->amplifier = $this->getAmplifier();
|
||||||
$pk->particles = $this->isVisible();
|
$pk->particles = $this->isVisible();
|
||||||
@ -261,7 +261,7 @@ class Effect{
|
|||||||
public function remove(Entity $entity){
|
public function remove(Entity $entity){
|
||||||
if($entity instanceof Player){
|
if($entity instanceof Player){
|
||||||
$pk = new MobEffectPacket();
|
$pk = new MobEffectPacket();
|
||||||
$pk->eid = $entity->getId();
|
$pk->eid = 0;
|
||||||
$pk->eventId = MobEffectPacket::EVENT_REMOVE;
|
$pk->eventId = MobEffectPacket::EVENT_REMOVE;
|
||||||
$pk->effectId = $this->getId();
|
$pk->effectId = $this->getId();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user