Fixed comparison order with flint & steel metadata

This commit is contained in:
Shoghi Cervantes 2013-09-06 17:50:01 +02:00
parent 215141d552
commit e5841e623e

View File

@ -270,7 +270,7 @@ class BlockAPI{
if($target->onBreak($item, $player) === false){
return $this->cancelAction($target, $player, false);
}
if($item->useOn($target) and ($player->gamemode & 0x01) === 0 and $item->getMetadata() >= $item->getMaxDurability()){
if(($player->gamemode & 0x01) === 0 and $item->useOn($target) and $item->getMetadata() >= $item->getMaxDurability()){
$player->setSlot($player->slot, new Item(AIR, 0, 0), false);
}
}else{