mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Added Player::getSlot() for consistency
This commit is contained in:
@ -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){
|
||||||
|
Reference in New Issue
Block a user