Updated method names: getMetadata() & setMetadata() to getDamage() & setDamage() on Block and Item classes

This commit is contained in:
Shoghi Cervantes
2014-05-22 18:37:28 +02:00
parent c1546aac9c
commit 0be679c9d5
29 changed files with 101 additions and 81 deletions

View File

@ -34,7 +34,7 @@ class FlintSteel extends Tool{
}
public function onActivate(Level $level, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
if(($player->gamemode & 0x01) === 0 and $this->useOn($block) and $this->getMetadata() >= $this->getMaxDurability()){
if(($player->gamemode & 0x01) === 0 and $this->useOn($block) and $this->getDamage() >= $this->getMaxDurability()){
$player->setSlot($player->getCurrentEquipment(), new Item(Item::AIR, 0, 0));
}