Starting the conversion to HOCON, splitting up configs, and more

This commit is contained in:
nossr50 2019-03-07 21:09:57 -08:00
parent 76472a2b9f
commit 493d6b0a67
40 changed files with 188 additions and 1 deletions

View File

@ -7,7 +7,6 @@ import com.gmail.nossr50.datatypes.skills.SubSkillType;
import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.skills.repair.ArcaneForging;
import com.gmail.nossr50.skills.repair.Repair;
import com.gmail.nossr50.skills.repair.RepairManager;
import com.gmail.nossr50.skills.repair.repairables.Repairable;
import com.gmail.nossr50.util.Permissions;

View File

@ -0,0 +1,7 @@
package com.gmail.nossr50.config.experience;
import com.gmail.nossr50.config.ConfigValidated;
public class HerbalismExperienceConfig extends ConfigValidated {
}

View File

@ -0,0 +1,7 @@
package com.gmail.nossr50.config.experience;
import com.gmail.nossr50.config.ConfigValidated;
public class MiningExperienceConfig extends ConfigValidated {
}

View File

@ -0,0 +1,7 @@
package com.gmail.nossr50.config.experience;
import com.gmail.nossr50.config.ConfigValidated;
public class WoodcuttingExperienceConfig extends ConfigValidated {
}

View File

@ -0,0 +1,7 @@
package com.gmail.nossr50.config.hocon;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class AntiExploit {
}

View File

@ -0,0 +1,7 @@
package com.gmail.nossr50.config.hocon;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class Backups {
}

View File

@ -0,0 +1,7 @@
package com.gmail.nossr50.config.hocon;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class Commands {
}

View File

@ -0,0 +1,10 @@
package com.gmail.nossr50.config.hocon;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class General {
}

View File

@ -0,0 +1,7 @@
package com.gmail.nossr50.config.hocon;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class Hardcore {
}

View File

@ -0,0 +1,7 @@
package com.gmail.nossr50.config.hocon;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class Items {
}

View File

@ -0,0 +1,7 @@
package com.gmail.nossr50.config.hocon;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class Language {
}

View File

@ -0,0 +1,7 @@
package com.gmail.nossr50.config.hocon;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class Leveling {
}

View File

@ -0,0 +1,7 @@
package com.gmail.nossr50.config.hocon;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class Metrics {
}

View File

@ -0,0 +1,7 @@
package com.gmail.nossr50.config.hocon;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class Particles {
}

View File

@ -0,0 +1,7 @@
package com.gmail.nossr50.config.hocon;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class Party {
}

View File

@ -0,0 +1,7 @@
package com.gmail.nossr50.config.hocon;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class PlayerNotifications {
}

View File

@ -0,0 +1,7 @@
package com.gmail.nossr50.config.hocon;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class Scoreboard {
}

View File

@ -0,0 +1,7 @@
package com.gmail.nossr50.config.hocon;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class SuperAbilities {
}

View File

@ -0,0 +1,20 @@
package com.gmail.nossr50.config.hocon.database;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class ConfigCategoryDatabase {
@Setting(value = "User_Name", comment = "The authorized user for your MySQL/MariaDB DB")
private String username;
@Setting(value = "User_Password", comment = "The password for your authorized user")
private String password;
@Setting(value = "Database_Name", comment = "The database name for your DB, this DB must already exist on the SQL server.")
private String databaseName;
@Setting(value = "Table_Prefix", comment = "The Prefix that will be used for tables in your DB")
private String tablePrefix;
}

View File

@ -0,0 +1,16 @@
package com.gmail.nossr50.config.hocon.database;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class ConfigCategoryMySQL {
@Setting(value = "Enabled", comment = "If set to true, mcMMO will use MySQL/MariaDB instead of FlatFile storage")
private boolean enabled;
@Setting(value = "Database", comment = "Database settings for MySQL/MariaDB")
private ConfigCategoryDatabase configCategoryDatabase;
}

View File

@ -0,0 +1,17 @@
package com.gmail.nossr50.config.hocon.database;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class ConfigCategoryServer {
@Setting(value = "Use_SSL", comment = "Enables SSL for MySQL/MariaDB connections, newer versions of MySQL will spam your console if you aren't using SSL")
private boolean useSSL;
@Setting(value = "Server_Port", comment = "Your MySQL/MariaDB server port")
private String serverPort;
@Setting(value = "Server_Address", comment = "The address for your MySQL/MariaDB server")
private String serverAddress;
}

View File

@ -0,0 +1,12 @@
package com.gmail.nossr50.config.hocon.database;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class ConfigDatabase {
@Setting(value = "MySQL", comment = "Settings for using MySQL or MariaDB database")
private ConfigCategoryMySQL configCategoryMySQL;
}

View File

@ -2,6 +2,7 @@ package com.gmail.nossr50.util;
import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
import com.gmail.nossr50.datatypes.skills.SubSkillType;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.skills.repair.Repair;
import com.gmail.nossr50.skills.salvage.Salvage;

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File