Skip to content

Commit b776d9d

Browse files
committed
Fixed ghost armor
1 parent 5237867 commit b776d9d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Player.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,11 +1347,12 @@ public function handleDataPacket($pid, $data){
13471347
}
13481348
$this->craftingItems = array();
13491349
$this->toCraft = array();
1350+
13501351
$data["eid"] = $this->eid;
13511352
$data["player"] = $this;
13521353
for($i = 0; $i < 4; ++$i){
13531354
$s = $data["slot$i"];
1354-
if($s === 0){
1355+
if($s === 0 or $s === 255){
13551356
$s = BlockAPI::getItem(AIR, 0, 0);
13561357
}else{
13571358
$s = BlockAPI::getItem($s + 256, 0, 1);
@@ -1368,7 +1369,7 @@ public function handleDataPacket($pid, $data){
13681369
}
13691370

13701371
}
1371-
$this->server->handle("player.armor", $data);
1372+
$this->sendArmor();
13721373
if($this->entity->inAction === true){
13731374
$this->entity->inAction = false;
13741375
$this->entity->updateMetadata();

0 commit comments

Comments
 (0)