fix config

This commit is contained in:
xGinko 2023-09-27 14:15:20 +02:00
parent 27529fede3
commit 36417798d5
3 changed files with 5 additions and 4 deletions

View File

@ -32,8 +32,8 @@ public class OptVillagersRadius implements VillagerOptimizerCommand, TabComplete
public OptVillagersRadius() { public OptVillagersRadius() {
Config config = VillagerOptimizer.getConfiguration(); Config config = VillagerOptimizer.getConfiguration();
this.maxRadius = config.getInt("optimization-methods.command.optimizevillagers.max-block-radius", 100); this.maxRadius = config.getInt("optimization-methods.commands.optimizevillagers.max-block-radius", 100);
this.cooldown = config.getInt("optimization-methods.command.optimizevillagers.cooldown-seconds", 600, """ this.cooldown = config.getInt("optimization-methods.commands.optimizevillagers.cooldown-seconds", 600, """
Cooldown in seconds until a villager can be optimized again using the command.\s Cooldown in seconds until a villager can be optimized again using the command.\s
Here for configuration freedom. Recommended to leave as is to not enable any exploitable behavior.""") * 1000L; Here for configuration freedom. Recommended to leave as is to not enable any exploitable behavior.""") * 1000L;
} }

View File

@ -29,7 +29,7 @@ public class UnOptVillagersRadius implements VillagerOptimizerCommand, TabComple
private final int maxRadius; private final int maxRadius;
public UnOptVillagersRadius() { public UnOptVillagersRadius() {
this.maxRadius = VillagerOptimizer.getConfiguration().getInt("optimization-methods.command.unoptimizevillagers.max-block-radius", 100); this.maxRadius = VillagerOptimizer.getConfiguration().getInt("optimization-methods.commands.unoptimizevillagers.max-block-radius", 100);
} }
@Override @Override

View File

@ -57,10 +57,11 @@ public class Config {
It is recommended to choose preferably one (no more than 2) of the below methods, as this can\s It is recommended to choose preferably one (no more than 2) of the below methods, as this can\s
get confusing and depending on your config exploitable otherwise. get confusing and depending on your config exploitable otherwise.
"""); """);
config.addDefault("optimization-methods.commands.unoptimizevillagers", null);
config.addDefault("optimization-methods.nametag-optimization.enable", true); config.addDefault("optimization-methods.nametag-optimization.enable", true);
createTitledSection("Villager Chunk Limit", "villager-chunk-limit"); createTitledSection("Villager Chunk Limit", "villager-chunk-limit");
createTitledSection("Gameplay", "gameplay"); createTitledSection("Gameplay", "gameplay");
config.addDefault("gameplay.villagers-spawn-as-adults", false); config.addDefault("gameplay.villagers-spawn-as-adults.enable", false);
config.addDefault("gameplay.prevent-trading-with-unoptimized.enable", false); config.addDefault("gameplay.prevent-trading-with-unoptimized.enable", false);
config.addDefault("gameplay.villager-leveling.enable", true); config.addDefault("gameplay.villager-leveling.enable", true);
config.addDefault("gameplay.trade-restocking.enable", true); config.addDefault("gameplay.trade-restocking.enable", true);