Compare commits

..
2 Commits
Author SHA1 Message Date
Ben Woo a41476de89 Merge pull request #3363 from Multiverse/fix/warning-spam
Revert throw an error when trying to set spawn-rate or spawn-limit if…
2025-10-15 22:30:32 +08:00
Ben Woo fe75e497e4 Revert throw an error when trying to set spawn-rate or spawn-limit if disabled by config 2025-10-15 22:26:31 +08:00
@@ -167,20 +167,12 @@ public final class SpawnCategoryConfig {
final ConfigNode<Integer> tickRate = node(ConfigNode.builder("tick-rate", Integer.class)
.defaultValue(-1)
.suggester(input -> List.of("-1", "10", "100", "400", "1000"))
.validator(input -> config.getApplyEntitySpawnRate()
? Try.success(null)
: Try.failure(new IllegalStateException("Cannot set tick rate as 'apply-entity-spawn-rate' is false in config. " +
"You can re-enable this option with '/mv config set apply-entity-spawn-rate true' command.")))
.onSetValue((oldValue, newValue) -> applyConfigToWorld())
.build());
final ConfigNode<Integer> spawnLimit = node(ConfigNode.builder("spawn-limit", Integer.class)
.defaultValue(-1)
.suggester(input -> List.of("-1", "10", "100", "400", "1000"))
.validator(input -> config.getApplyEntitySpawnLimit()
? Try.success(null)
: Try.failure(new IllegalStateException("Cannot set spawn limit as 'apply-entity-spawn-limit' is false in config. " +
"You can re-enable this option with '/mv config set apply-entity-spawn-limit true' command.")))
.onSetValue((oldValue, newValue) -> applyConfigToWorld())
.build());