mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
Better clear armor
This commit is contained in:
parent
72dc07458c
commit
7c852f6750
1 changed files with 9 additions and 0 deletions
|
|
@ -881,10 +881,19 @@ class Player{
|
|||
}
|
||||
if($player instanceof Player){
|
||||
if($player === $this){
|
||||
if($this->PROTOCOL < ProtocolInfo12::CURRENT_PROTOCOL_12 && !($this->armor[0]->getID() & $this->armor[1]->getID() & $this->armor[2]->getID() & $this->armor[3]->getID()) && isset($this->isOre[DIAMOND_HELMET])){
|
||||
for($i = 0 ; $i < 19 ; $i++){
|
||||
$pk = new HurtArmorPacket();
|
||||
$pk->health = 127;
|
||||
$this->entityQueueDataPacket($pk);
|
||||
}
|
||||
unset($this->isOre[DIAMOND_HELMET]);
|
||||
}else{
|
||||
$pk = new ContainerSetContentPacket;
|
||||
$pk->windowid = 0x78; //Armor window id
|
||||
$pk->slots = $this->armor;
|
||||
$this->entityQueueDataPacket($pk);
|
||||
}
|
||||
}else{
|
||||
$pk = new PlayerArmorEquipmentPacket;
|
||||
$pk->eid = $this->eid;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue