Added Item->getBlockToolType()

This commit is contained in:
Dylan K. Taylor
2017-11-24 11:26:03 +00:00
parent 55d0684565
commit db31d13f96
6 changed files with 41 additions and 0 deletions

View File

@ -23,12 +23,18 @@ declare(strict_types=1);
namespace pocketmine\item;
use pocketmine\block\BlockToolType;
class Sword extends TieredTool{
public function isSword(){
return $this->tier;
}
public function getBlockToolType() : int{
return BlockToolType::TYPE_SWORD;
}
public function getAttackPoints() : int{
return self::getBaseDamageFromTier($this->tier);
}