mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +00:00
Block API typehints
This commit is contained in:
@ -40,11 +40,11 @@ class StoneSlab extends WoodenSlab{
|
||||
|
||||
protected $doubleId = self::DOUBLE_STONE_SLAB;
|
||||
|
||||
public function getHardness(){
|
||||
public function getHardness() : float{
|
||||
return 2;
|
||||
}
|
||||
|
||||
public function getName(){
|
||||
public function getName() : string{
|
||||
static $names = [
|
||||
self::STONE => "Stone",
|
||||
self::SANDSTONE => "Sandstone",
|
||||
@ -58,7 +58,7 @@ class StoneSlab extends WoodenSlab{
|
||||
return (($this->meta & 0x08) > 0 ? "Upper " : "") . $names[$this->meta & 0x07] . " Slab";
|
||||
}
|
||||
|
||||
public function getToolType(){
|
||||
public function getToolType() : int{
|
||||
return Tool::TYPE_PICKAXE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user