Minecraft plugin: trigger gamerules?

Fl
- in Plugins
1

After I have only recently started programming, I don't quite know how to make a gamerule from Minecraft in the script (java 1.8) either true or false.

For example, when you write / natoff in the chat, I want the natural regeneration to switch off. I've already created the command, so I just need help on how to do it with the gamerule.

cl

Bukkit.getWorld ("name of the world"). SetGameRuleValue ("GameRule", "value");

Note that you don't pass the value as a boolean but as a string, e.g. The RandomTickSpeed needs an integer as a value.