mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Item movement fix
This commit is contained in:
parent
5a2156c2bf
commit
1976e1c6f6
2 changed files with 8 additions and 5 deletions
|
|
@ -174,6 +174,9 @@ class Player{
|
|||
}
|
||||
|
||||
public function hasItem($type, $damage = false){
|
||||
if($type === 0){
|
||||
return true;
|
||||
}
|
||||
foreach($this->inventory as $s => $data){
|
||||
if($data[0] === $type and ($data[1] === $damage or $damage === false) and $data[2] > 0){
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue