public function setGameRule($name, $value) { $this->gamerules->setOrCreateGameRule($name, $value); return $this->gamerules->hasRule($name); }