Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public enum Gamerules {
- COMMAND_BLOCK_OUTPUT("commandBlockOutput"),
- DAY_LIGHT_CYCLE("doDaylightCycle"),
- ENTITY_DROPS("doEntityDrops"),
- BLOCK_BURN("doFireTick"),
- MOB_LOOT("doMobLoot"),
- MOB_SPAWNING("doMobSpawning"),
- TILE_BLOCK("doTileDrops"),
- KEEP_INVENTORY("keepInventory"),
- LOG_ADMIN_COMMAND("logAdminCommands"),
- MOB_GRIEFING("mobGriefing"),
- NATURAL_REGENERATION("naturalRegeneration"),
- RANDOM_TICK_SPEED("randomTickSpeed"),
- REDUCED_DEBUG_INFO("reducedDebugInfo"),
- SEND_COMMAND_FEEDBACK("sendCommandFeedback"),
- SHOW_DEATH_MESSAGES("showDeathMessages");
- private String name;
- Gamerules(String name){
- this.name = name;
- }
- public String getName(){ return this.name; }
- public void applyGamerule(World w, boolean args){
- //Check if Gamerule need boolean
- w.setGameRuleValue(name, args+"");
- }
- public void applyGamerule(World w, int args){
- //Check if Gamerule need int
- w.setGameRuleValue(name, args+"");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement