This commit is contained in:
gnembon committed 2020-02-08 18:17:55 -04:00
1 parent 13a8fbb6f2
commit e63dd15433
1 file changed
+5 -5
+5 -5
View File
@@ -50,24 +50,24 @@ public class CarpetSettings
public static boolean superSecretSetting = false;
@Rule(
desc = "Modify the amount of ticks for entering a Nether portal in creative",
desc = "Amount of delay ticks to use a nether portal in creative",
options = {"1", "40", "80", "72000"},
category = CREATIVE,
strict = false,
validate = NetherPortalDelayLimit.class
validate = OneHourMaxDelayLimit.class
)
public static int portalCreativeDelay = 1;
@Rule(
desc = "Modify the amount of ticks for entering a Nether portal in survival",
desc = "Amount of delay ticks to use a nether portal in survival",
options = {"1", "40", "80", "72000"},
category = SURVIVAL,
strict = false,
validate = NetherPortalDelayLimit.class
validate = OneHourMaxDelayLimit.class
)
public static int portalSurvivalDelay = 80;
private static class NetherPortalDelayLimit extends Validator<Integer> {
private static class OneHourMaxDelayLimit extends Validator<Integer> {
@Override public Integer validate(ServerCommandSource source, ParsedRule<Integer> currentRule, Integer newValue, String string) {
return (newValue > 0 && newValue <= 72000) ? newValue : null;
}