mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 06:25:32 +00:00
Fixes get and set armour
This commit is contained in:
parent
be948f99cc
commit
4f4a6e7446
@ -166,35 +166,35 @@ class PlayerInventory extends BaseInventory{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getHelmet(){
|
public function getHelmet(){
|
||||||
return $this->getItem($this->getSize() + 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getChestplate(){
|
|
||||||
return $this->getItem($this->getSize() + 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getLeggings(){
|
|
||||||
return $this->getItem($this->getSize() + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getBoots(){
|
|
||||||
return $this->getItem($this->getSize());
|
return $this->getItem($this->getSize());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getChestplate(){
|
||||||
|
return $this->getItem($this->getSize() + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLeggings(){
|
||||||
|
return $this->getItem($this->getSize() + 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBoots(){
|
||||||
|
return $this->getItem($this->getSize() + 3);
|
||||||
|
}
|
||||||
|
|
||||||
public function setHelmet(Item $helmet){
|
public function setHelmet(Item $helmet){
|
||||||
return $this->setItem($this->getSize() + 3, $helmet);
|
return $this->setItem($this->getSize(), $helmet);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setChestplate(Item $chestplate){
|
public function setChestplate(Item $chestplate){
|
||||||
return $this->setItem($this->getSize() + 2, $chestplate);
|
return $this->setItem($this->getSize() + 1, $chestplate);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setLeggings(Item $leggings){
|
public function setLeggings(Item $leggings){
|
||||||
return $this->setItem($this->getSize() + 1, $leggings);
|
return $this->setItem($this->getSize() + 2, $leggings);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setBoots(Item $boots){
|
public function setBoots(Item $boots){
|
||||||
return $this->setItem($this->getSize(), $boots);
|
return $this->setItem($this->getSize() + 3, $boots);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setItem($index, Item $item, $source = null){
|
public function setItem($index, Item $item, $source = null){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user