This commit is contained in:
Brianna 2019-08-06 20:06:33 -04:00
parent 552e16e115
commit c300c8b8fb
40 changed files with 48 additions and 40 deletions

View File

@ -46,6 +46,7 @@ public class FileManager extends Manager<String, FileConfiguration> {
of("enchants/legendary/Gears.yml", false),
of("enchants/legendary/LifeSteal.yml", false),
of("enchants/legendary/Overload.yml", false),
of("enchants/legendary/Resist.yml", false),
of("enchants/legendary/SkillSwipe.yml", false),
of("enchants/simple/Aquatic.yml", false),
@ -60,12 +61,16 @@ public class FileManager extends Manager<String, FileConfiguration> {
of("enchants/ultimate/Blind.yml", false),
of("enchants/ultimate/Dodge.yml", false),
of("enchants/ultimate/Fly.yml", false),
of("enchants/ultimate/FoodSteal.yml", false),
of("enchants/ultimate/IceAspect.yml", false),
of("enchants/ultimate/StormFall.yml", false),
of("enchants/unique/Berserk.yml", false),
of("enchants/unique/Decapitation.yml", false),
of("enchants/unique/Explosive.yml", false),
of("enchants/unique/FeatherWeight.yml", false),
of("enchants/unique/Inquisitive.yml", false),
of("enchants/unique/ObsidianDestroyer.yml", false),
of("enchants/unique/PlagueCarrier.yml", false),
of("enchants/unique/Ragdoll.yml", false),
@ -110,6 +115,7 @@ public class FileManager extends Manager<String, FileConfiguration> {
});
instance.getConfig().set("System.First Load", false);
instance.saveConfig();
instance.getSettingsManager().reloadConfig();
}

View File

@ -23,6 +23,7 @@ import static com.songoda.epicenchants.utils.single.GeneralUtils.color;
public class ConfigParser {
public static Enchant parseEnchant(EpicEnchants instance, FileConfiguration config) throws Exception {
return Enchant.builder()
.author("author")
.identifier(config.getString("identifier"))
.group(instance.getGroupManager().getValue(config.getString("group").toUpperCase()).orElseThrow(() -> new IllegalArgumentException("Invalid group: " + config.getString("group"))))
.maxLevel(config.getInt("max-level"))

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: AntiGravity

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: Frozen

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: Poison

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: RocketEscape

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: Shockwave

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: Wither

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: DeathBringer

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: DeathGod

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: Enlightened

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: Gears

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: LifeSteal

View File

@ -1,7 +1,8 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: Overload
# The max level for this enchant.
max-level: 3

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: SuchLow
author: SuchLow
# The enchant identifier must be unique.
identifier: Resist

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: SkillSwipe

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: Aquatic

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: Confusion

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: Experience

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: Glowing

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: Haste

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: Insomnia

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: Lightning

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: Obliterate

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: Oxygenate

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: Blind

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: Dodge

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Hipopotofobia
author: Hipopotofobia
# The enchant identifier must be unique.
identifier: Fly

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: SuchLow
author: SuchLow
# The enchant identifier must be unique.
identifier: FoodSteal

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: IceAspect

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: StormFall

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: Berserk

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Hipopotofobia
author: Hipopotofobia
# The enchant identifier must be unique.
identifier: Decapitation

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: Explosive

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: FeatherWeight

View File

@ -1,8 +1,8 @@
# The person who made this enchant.
Author: Tin
author: Tin
# The enchant identifier must be unique.
identifier: Inquistive
identifier: Inquisitive
# The max level for this enchant.
max-level: 5

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: ObsidianDestroyer

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: "PlagueCarrier"

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: Ragdoll

View File

@ -1,5 +1,5 @@
# The person who made this enchant.
Author: Songoda
author: Songoda
# The enchant identifier must be unique.
identifier: "SelfDestruct"