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/Gears.yml", false),
of("enchants/legendary/LifeSteal.yml", false), of("enchants/legendary/LifeSteal.yml", false),
of("enchants/legendary/Overload.yml", false), of("enchants/legendary/Overload.yml", false),
of("enchants/legendary/Resist.yml", false),
of("enchants/legendary/SkillSwipe.yml", false), of("enchants/legendary/SkillSwipe.yml", false),
of("enchants/simple/Aquatic.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/Blind.yml", false),
of("enchants/ultimate/Dodge.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/IceAspect.yml", false),
of("enchants/ultimate/StormFall.yml", false), of("enchants/ultimate/StormFall.yml", false),
of("enchants/unique/Berserk.yml", false), of("enchants/unique/Berserk.yml", false),
of("enchants/unique/Decapitation.yml", false),
of("enchants/unique/Explosive.yml", false), of("enchants/unique/Explosive.yml", false),
of("enchants/unique/FeatherWeight.yml", false), of("enchants/unique/FeatherWeight.yml", false),
of("enchants/unique/Inquisitive.yml", false),
of("enchants/unique/ObsidianDestroyer.yml", false), of("enchants/unique/ObsidianDestroyer.yml", false),
of("enchants/unique/PlagueCarrier.yml", false), of("enchants/unique/PlagueCarrier.yml", false),
of("enchants/unique/Ragdoll.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.getConfig().set("System.First Load", false);
instance.saveConfig();
instance.getSettingsManager().reloadConfig(); instance.getSettingsManager().reloadConfig();
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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