Changed some definitions of config options and increased limit of some duration options.

This commit is contained in:
2022-05-21 19:10:13 +01:00
parent 429459b96a
commit e1b5f638bb

View File

@ -75,7 +75,7 @@ public final class Config {
builder.comment("Settings for protecting players while they are joining.").push("login"); builder.comment("Settings for protecting players while they are joining.").push("login");
LOGIN_IGNORE_PLAYER_ENABLED = builder LOGIN_IGNORE_PLAYER_ENABLED = builder
.comment("Whether mobs will ignore a protected player. (They will not attack/aggro)") .comment("Whether mobs will ignore a protected player. (They will not attack/aggro)")
.define("mobsIgnorePlayerEnabled", true); .define("mobsIgnorePlayer", true);
builder.push("allowed_keys"); builder.push("allowed_keys");
LOGIN_KEY_ALLOW_LIST = builder LOGIN_KEY_ALLOW_LIST = builder
.comment("Allowed keys players can press without becoming active.\n" + .comment("Allowed keys players can press without becoming active.\n" +
@ -94,7 +94,7 @@ public final class Config {
.define("enabled", true); .define("enabled", true);
AFK_TIME_THRESHOLD = builder AFK_TIME_THRESHOLD = builder
.comment("How long a player needs to be afk to become protected. (seconds)") .comment("How long a player needs to be afk to become protected. (seconds)")
.defineInRange("timeThreshold", 600, 1, Integer.MAX_VALUE/40); .defineInRange("timeThreshold", 600, 1, Integer.MAX_VALUE);
AFK_APPLY_POST_EFFECTS = builder AFK_APPLY_POST_EFFECTS = builder
.comment("Whether to apply any post protection effects to afk players.") .comment("Whether to apply any post protection effects to afk players.")
.define("applyPostProtectionEffects", false); .define("applyPostProtectionEffects", false);
@ -115,40 +115,40 @@ public final class Config {
builder.push("grace_period"); builder.push("grace_period");
POST_GRACE_ENABLED = builder POST_GRACE_ENABLED = builder
.comment("Whether a player receives a grace period after becoming active or not.") .comment("Whether a player receives a grace period after becoming active or not.")
.define("graceEnabled", false); .define("enabled", false);
POST_GRACE_DURATION = builder POST_GRACE_DURATION = builder
.comment("Grace period duration in seconds.") .comment("Grace period duration in seconds.")
.defineInRange("graceDuration", 10, 1, Integer.MAX_VALUE/40); .defineInRange("duration", 10, 1, Integer.MAX_VALUE);
POST_GRACE_IGNORE_PLAYER_ENABLED = builder POST_GRACE_IGNORE_PLAYER_ENABLED = builder
.comment("Whether mobs will ignore a player during their grace period.") .comment("Whether mobs will ignore a player during their grace period.")
.define("graceIgnorePlayerEnabled", false); .define("mobsIgnorePlayer", false);
builder.pop(); builder.pop();
builder.push("water_protection"); builder.push("water_protection");
POST_DROWN_ENABLED = builder POST_DROWN_ENABLED = builder
.comment("Whether a player's air supply gets refilled.") .comment("Whether a player's air supply gets refilled.")
.define("drownEnabled", true); .define("refillAir", true);
POST_WATER_ENABLED = builder POST_WATER_ENABLED = builder
.comment("Whether a player receives water breating when in water.") .comment("Whether a player receives water breating when in water.")
.define("waterEnabled", false); .define("waterEnabled", false);
POST_WATER_DURATION = builder POST_WATER_DURATION = builder
.comment("Water breathing duration in seconds.") .comment("Water breathing duration in seconds.")
.defineInRange("waterDuration", 10, 1, Integer.MAX_VALUE/20); .defineInRange("waterDuration", 10, 1, Integer.MAX_VALUE);
builder.pop(); builder.pop();
builder.push("lava_protection"); builder.push("lava_protection");
POST_LAVA_ENABLED = builder POST_LAVA_ENABLED = builder
.comment("Whether a player receives fire resistance when in lava.") .comment("Whether a player receives fire resistance when in lava.")
.define("lavaEnabled", true); .define("enabled", true);
POST_LAVA_DURATION = builder POST_LAVA_DURATION = builder
.comment("Fire resistance duration in seconds.") .comment("Fire resistance duration in seconds.")
.defineInRange("lavaDuration", 10, 1, Integer.MAX_VALUE/20); .defineInRange("duration", 10, 1, Integer.MAX_VALUE);
builder.pop(); builder.pop();
builder.push("fire_protection"); builder.push("fire_protection");
POST_FIRE_ENABLED = builder POST_FIRE_ENABLED = builder
.comment("Whether a player receives fire resistance when on fire.") .comment("Whether a player receives fire resistance when on fire.")
.define("fireEnabled", false); .define("enabled", false);
POST_FIRE_DURATION = builder POST_FIRE_DURATION = builder
.comment("Fire resistance duration in seconds.") .comment("Fire resistance duration in seconds.")
.defineInRange("fireDuration", 10, 1, Integer.MAX_VALUE/20); .defineInRange("duration", 10, 1, Integer.MAX_VALUE);
builder.pop(); builder.pop();
builder.pop(); builder.pop();
} }