[SPIGOT-1633] API for Gamerules Created: 20/Feb/16 Updated: 26/Dec/18 Resolved: 26/Dec/18 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | New Feature | Priority: | Minor |
Reporter: | Vinetos | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 2 |
Labels: | Bukkit, Craftbukkit, JavaPlugin, Spigot |
Description |
Hello, Bukkit.getWorlds().get(0).setGameRuleValue("gamerule", "value"); But we could simplify it with a class like this: http://pastebin.com/mbbrePsk Bukkit.getWorlds().get(0).setGameRuleValue(GameRules.DO_DAY_LIGHT_CYCLE, false);
Bonjour, De base, nous faisons: Bukkit.getWorlds().get(0).setGameRuleValue("gamerule", "value"); Mais nous pourrions simplifier ça avec une classe dans ce genre: http://pastebin.com/mbbrePsk Ainsi, nous aurons: Bukkit.getWorlds().get(0).setGameRuleValue(GameRules.DO_DAY_LIGHT_CYCLE, false);
Vinetos |
Comments |
Comment by md_5 [ 26/Dec/18 ] |
This was added https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/GameRule.html |
Comment by Hex [ 15/Jul/18 ] |
New PR: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/259 |
Comment by Martin | MiniDigger [ 26/May/17 ] |
there is a open PR for this here: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/144/overview |
Comment by Vinetos [ 20/Feb/16 ] |
English: Bukkit.getWorlds().get(0).setGameRuleValue("gamerule", "value"); But we could simplify it with a class like this: http://pastebin.com/mbbrePsk Bukkit.getWorlds().get(0).setGameRuleValue(GameRules.DO_DAY_LIGHT_CYCLE, false);
Vinetos |