Added Player::getSlot() for consistency

This commit is contained in:
Shoghi Cervantes Pueyo 2013-04-22 21:01:53 +02:00
parent bb9a6146fd
commit f466e1f791

View File

@ -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){