mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +00:00
Added Player::getSlot() for consistency
This commit is contained in:
parent
bb9a6146fd
commit
f466e1f791
@ -296,6 +296,12 @@ class Player{
|
||||
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){
|
||||
$s = (int) $s;
|
||||
if(!isset($this->inventory[$s]) or $this->itemEnforcement === false){
|
||||
|
Loading…
x
Reference in New Issue
Block a user