getRule() public method

Return the game rule as bool, int or string
public getRule ( $name ) : boolean | integer | string
return boolean | integer | string $rule
Example #1
0
 public function getGameRule($name)
 {
     return $this->gamerules->hasRule($name) ? $this->gamerules->getRule($name) : null;
 }