Unicopia/src/main/java/com/minelittlepony/unicopia/Config.java

41 lines
2.1 KiB
Java
Raw Normal View History

package com.minelittlepony.unicopia;
2020-04-25 13:32:33 +02:00
import java.util.Set;
import com.google.gson.GsonBuilder;
2020-04-25 13:32:33 +02:00
import com.minelittlepony.common.util.GamePaths;
import com.minelittlepony.common.util.settings.*;
public class Config extends com.minelittlepony.common.util.settings.Config {
private static final Adapter ADAPTER = new HeirarchicalJsonConfigAdapter(new GsonBuilder()
.registerTypeAdapter(Race.class, RegistryTypeAdapter.of(Race.REGISTRY))
);
public final Setting<Set<Race>> speciesWhiteList = value("server", "speciesWhiteList", Set.<Race>of())
.addComment("A whitelist of races permitted on the server")
.addComment("Races added to this list can be used by anyone,")
.addComment("whilst any ones left off are not permitted")
.addComment("An empty list disables whitelisting entirely.");
public final Setting<Boolean> enableCheats = value("server", "enableCheats", false)
.addComment("Allows use of the /race, /disguise, and /gravity commands");
2022-10-11 17:19:50 +02:00
public final Setting<Race> preferredRace = value("client", "preferredRace", Race.EARTH)
.addComment("The default preferred race")
.addComment("This is the race a client requests when first joining a game")
.addComment("It is the default used both when Mine Little Pony is not installed")
.addComment("and when they respond with a human race.");
public final Setting<Boolean> ignoreMineLP = value("client", "ignoreMineLP", false)
.addComment("If true Mine Little Pony will not be considered when determining the race to use")
.addComment("The result will always be what is set by this config file.");
public final Setting<Boolean> disableWaterPlantsFix = value("compatibility", "disableWaterPlantsFix", false)
.addComment("Disables this mod's built in fix for making sea plants waterlogged")
.addComment("Turn this ON if you're using another mod that does something similar of if you encounter copatibility issues with other mods.");
public Config() {
super(ADAPTER, GamePaths.getConfigDirectory().resolve("unicopia.json"));
}
}