MCPcopy Index your code
hub / github.com/VolmitSoftware/Adapt / AdaptConfig

Class AdaptConfig

src/main/java/com/volmit/adapt/AdaptConfig.java:35–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33import java.util.Map;
34
35@SuppressWarnings("ALL")
36@Getter
37public class AdaptConfig {
38 private static AdaptConfig config = null;
39 public boolean debug = false;
40 public boolean autoUpdateCheck = true;
41 public boolean autoUpdateLanguage = true;
42 public boolean splashScreen = true;
43 public boolean xpInCreative = false;
44 public boolean allowAdaptationsInCreative = false;
45 public String adaptActivatorBlock = "BOOKSHELF";
46 public String adaptActivatorBlockName = "a Bookshelf";
47 public List<String> blacklistedWorlds = List.of("some_world_adapt_should_not_run_in", "anotherWorldFolderName");
48 public int experienceMaxLevel = 1000;
49 boolean preventHunterSkillsWhenHungerApplied = true;
50 private ValueConfig value = new ValueConfig();
51 private boolean metrics = true;
52 private String language = "en_US";
53 private String fallbackLanguageDontChangeUnlessYouKnowWhatYouAreDoing = "en_US";
54 private Curves xpCurve = Curves.XL3L7;
55 private double playerXpPerSkillLevelUpBase = 489;
56 private double playerXpPerSkillLevelUpLevelMultiplier = 44;
57 private double powerPerLevel = 0.73;
58 private boolean hardcoreResetOnPlayerDeath = false;
59 private boolean hardcoreNoRefunds = false;
60 private boolean loginBonus = true;
61 private boolean advancements = true;
62 private boolean useSql = false;
63 private boolean useEnchantmentTableParticleForActiveEffects = true;
64 private boolean escClosesAllGuis = false;
65 private boolean guiBackButton = false;
66 private int learnUnlearnButtonDelayTicks = 14;
67 private int maxRecipeListPrecaution = 25;
68 private boolean actionbarNotifyXp = true;
69 private boolean actionbarNotifyLevel = true;
70 private boolean unlearnAllButton = false;
71 private SqlSettings sql = new SqlSettings();
72 private Protector protectorSupport = new Protector();
73 private Map<String, Map<String, Boolean>> protectionOverrides = Map.of(
74 "adaptation-name", Map.of(
75 "WorldGuard", true
76 )
77 );
78
79 @Setter
80 private boolean verbose = false;
81
82 public static AdaptConfig get() {
83 if (config == null) {
84 AdaptConfig dummy = new AdaptConfig();
85 File l = Adapt.instance.getDataFile("adapt", "adapt.json");
86
87
88 if (!l.exists()) {
89 try {
90 IO.writeAll(l, new JSONObject(new Gson().toJson(dummy)).toString(4));
91 } catch (IOException e) {
92 e.printStackTrace();

Callers

nothing calls this directly

Calls 1

ofMethod · 0.45

Tested by

no test coverage detected