mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Added Player::getSlot() for consistency
This commit is contained in:
parent
bb9a6146fd
commit
f466e1f791
1 changed files with 6 additions and 0 deletions
|
|
@ -296,6 +296,12 @@ class Player{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getSlot($slot){
|
||||||
|
$slot = $this->inventory[(int) $slot];
|
||||||
|
return BlockAPI::getItem($slot[0], $slot[1], $slot[2]);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public function sendInventorySlot($s){
|
public function sendInventorySlot($s){
|
||||||
$s = (int) $s;
|
$s = (int) $s;
|
||||||
if(!isset($this->inventory[$s]) or $this->itemEnforcement === false){
|
if(!isset($this->inventory[$s]) or $this->itemEnforcement === false){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue