diff --git a/src/main/java/carpet/settings/CarpetSettings.java b/src/main/java/carpet/settings/CarpetSettings.java index ce410019..2b93a1ba 100644 --- a/src/main/java/carpet/settings/CarpetSettings.java +++ b/src/main/java/carpet/settings/CarpetSettings.java @@ -278,10 +278,25 @@ public String description() @Rule( desc = "HUD Logger update interval", + options = {"2", "5", "20", "100", "1200"}, + validate = ValidateHUDLoggerUpdateInterval.class, category = FEATURE ) public static int HUDLoggerUpdateInterval = 20; + private static class ValidateHUDLoggerUpdateInterval extends Validator + { + @Override + public Integer validate(CommandSource source, ParsedRule currentRule, Integer newValue, String string) + { + return 1 <= newValue && newValue <= 1200 ? newValue : null; + } + public String description() + { + return "You must choose a integer from 1 to 1200"; + } + } + @Rule( desc = "Disable some command to prevent accidentally cheating", extra = "Affects command list: /gamemode, /tp, /teleport, /give, /setblock, /summon",