diff --git a/mcmmo-core/src/main/java/com/gmail/nossr50/commands/skills/SkillGuideCommand.java b/mcmmo-core/src/main/java/com/gmail/nossr50/commands/skills/SkillGuideCommand.java index a65447a75..b7b0e0ead 100644 --- a/mcmmo-core/src/main/java/com/gmail/nossr50/commands/skills/SkillGuideCommand.java +++ b/mcmmo-core/src/main/java/com/gmail/nossr50/commands/skills/SkillGuideCommand.java @@ -17,10 +17,10 @@ public class SkillGuideCommand implements CommandExecutor { private final mcMMO pluginRef; public SkillGuideCommand(PrimarySkillType primarySkillType, mcMMO pluginRef) { + this.pluginRef = pluginRef; header = pluginRef.getLocaleManager().getString("Guides.Header", pluginRef.getSkillTools().getLocalizedSkillName(primarySkillType)); guide = getGuide(primarySkillType); invalidPage = pluginRef.getLocaleManager().getString("Guides.Page.Invalid"); - this.pluginRef = pluginRef; } @Override diff --git a/mcmmo-core/src/main/java/com/gmail/nossr50/config/ConfigManager.java b/mcmmo-core/src/main/java/com/gmail/nossr50/config/ConfigManager.java index ff8cb0bb4..0bbedea78 100644 --- a/mcmmo-core/src/main/java/com/gmail/nossr50/config/ConfigManager.java +++ b/mcmmo-core/src/main/java/com/gmail/nossr50/config/ConfigManager.java @@ -52,6 +52,7 @@ import com.gmail.nossr50.datatypes.party.PartyFeature; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.properties.DamageProperty; import com.gmail.nossr50.datatypes.skills.properties.MaxBonusLevel; +import com.gmail.nossr50.datatypes.skills.subskills.taming.CallOfTheWildType; import com.gmail.nossr50.datatypes.skills.subskills.taming.TamingSummon; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.skills.salvage.salvageables.Salvageable; @@ -251,6 +252,7 @@ public final class ConfigManager { customSerializers.registerType(new TypeToken() {}, new CustomEnumValueSerializer()); customSerializers.registerType(new TypeToken() {}, new CustomEnumValueSerializer()); customSerializers.registerType(new TypeToken() {}, new CustomEnumValueSerializer()); + customSerializers.registerType(new TypeToken() {}, new CustomEnumValueSerializer()); // customSerializers.registerType(new TypeToken>() {}, new ItemStackSerializer()); customSerializers.registerType(new TypeToken>() {}, new SetSerializer()); diff --git a/mcmmo-core/src/main/java/com/gmail/nossr50/config/skills/mining/ConfigMining.java b/mcmmo-core/src/main/java/com/gmail/nossr50/config/skills/mining/ConfigMining.java index e12716193..109c8acde 100644 --- a/mcmmo-core/src/main/java/com/gmail/nossr50/config/skills/mining/ConfigMining.java +++ b/mcmmo-core/src/main/java/com/gmail/nossr50/config/skills/mining/ConfigMining.java @@ -53,7 +53,7 @@ public class ConfigMining { @Setting(value = ConfigConstants.SUB_SKILL_NODE) private ConfigMiningSubskills miningSubskills = new ConfigMiningSubskills(); - public ConfigMiningSubskills getMiningSubskills() { + public ConfigMiningSubskills getMiningSubSkills() { return miningSubskills; } diff --git a/mcmmo-core/src/main/java/com/gmail/nossr50/config/skills/mining/ConfigMiningBlastMining.java b/mcmmo-core/src/main/java/com/gmail/nossr50/config/skills/mining/ConfigMiningBlastMining.java index 059fa8b40..deb501442 100644 --- a/mcmmo-core/src/main/java/com/gmail/nossr50/config/skills/mining/ConfigMiningBlastMining.java +++ b/mcmmo-core/src/main/java/com/gmail/nossr50/config/skills/mining/ConfigMiningBlastMining.java @@ -2,7 +2,6 @@ package com.gmail.nossr50.config.skills.mining; import ninja.leaping.configurate.objectmapping.Setting; import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; -import org.bukkit.Material; import java.util.ArrayList; import java.util.HashMap; @@ -12,18 +11,18 @@ public class ConfigMiningBlastMining { private static final ArrayList DETONATORS_DEFAULT; private static final HashMap DAMAGE_DECREASE_RANK_MAP; - private static final HashMap OREBONUS_RANK_MAP; + private static final HashMap ORE_BONUS_RANK_MAP; private static final HashMap DEBRIS_REDUCTION_MAP; private static final HashMap DROP_MULTIPLIER_MAP; private static final HashMap RADIUS_MAP; static { DETONATORS_DEFAULT = new ArrayList<>(); - DETONATORS_DEFAULT.add(Material.FLINT_AND_STEEL.getKey().toString()); - DETONATORS_DEFAULT.add(Material.DIAMOND_PICKAXE.getKey().toString()); - DETONATORS_DEFAULT.add(Material.GOLDEN_PICKAXE.getKey().toString()); - DETONATORS_DEFAULT.add(Material.IRON_PICKAXE.getKey().toString()); - DETONATORS_DEFAULT.add(Material.WOODEN_PICKAXE.getKey().toString()); + DETONATORS_DEFAULT.add("flint_and_steel"); + DETONATORS_DEFAULT.add("diamond_pickaxe"); + DETONATORS_DEFAULT.add("golden_pickaxe"); + DETONATORS_DEFAULT.add("iron_pickaxe"); + DETONATORS_DEFAULT.add("wooden_pickaxe"); DAMAGE_DECREASE_RANK_MAP = new HashMap<>(); DAMAGE_DECREASE_RANK_MAP.put(1, 5.0); @@ -35,15 +34,15 @@ public class ConfigMiningBlastMining { DAMAGE_DECREASE_RANK_MAP.put(7, 75.0); DAMAGE_DECREASE_RANK_MAP.put(8, 100.0); - OREBONUS_RANK_MAP = new HashMap<>(); - OREBONUS_RANK_MAP.put(1, 35.0); - OREBONUS_RANK_MAP.put(2, 40.0); - OREBONUS_RANK_MAP.put(3, 45.0); - OREBONUS_RANK_MAP.put(4, 50.0); - OREBONUS_RANK_MAP.put(5, 55.0); - OREBONUS_RANK_MAP.put(6, 60.0); - OREBONUS_RANK_MAP.put(7, 65.0); - OREBONUS_RANK_MAP.put(8, 70.0); + ORE_BONUS_RANK_MAP = new HashMap<>(); + ORE_BONUS_RANK_MAP.put(1, 35.0); + ORE_BONUS_RANK_MAP.put(2, 40.0); + ORE_BONUS_RANK_MAP.put(3, 45.0); + ORE_BONUS_RANK_MAP.put(4, 50.0); + ORE_BONUS_RANK_MAP.put(5, 55.0); + ORE_BONUS_RANK_MAP.put(6, 60.0); + ORE_BONUS_RANK_MAP.put(7, 65.0); + ORE_BONUS_RANK_MAP.put(8, 70.0); DEBRIS_REDUCTION_MAP = new HashMap<>(); DEBRIS_REDUCTION_MAP.put(1, 5.0); @@ -83,7 +82,7 @@ public class ConfigMiningBlastMining { private HashMap damageDecreaseMap = DAMAGE_DECREASE_RANK_MAP; @Setting(value = "Ore-Bonus-Per-Rank") - private HashMap orebonusMap = OREBONUS_RANK_MAP; + private HashMap orebonusMap = ORE_BONUS_RANK_MAP; @Setting(value = "Debris-Decrease-Per-Rank") private HashMap debrisReductionMap = DEBRIS_REDUCTION_MAP; diff --git a/mcmmo-core/src/main/java/com/gmail/nossr50/mcMMO.java b/mcmmo-core/src/main/java/com/gmail/nossr50/mcMMO.java index bbef38448..75ad07e5d 100644 --- a/mcmmo-core/src/main/java/com/gmail/nossr50/mcMMO.java +++ b/mcmmo-core/src/main/java/com/gmail/nossr50/mcMMO.java @@ -153,6 +153,12 @@ public class mcMMO extends JavaPlugin { //Init Skill Tools skillTools = new SkillTools(this); + //Init Item Tools + itemTools = new ItemTools(this); + + //Misc Tools Init + miscTools = new MiscTools(this); + //Init DST registerDynamicSettings(); //Do this after configs are loaded @@ -280,18 +286,12 @@ public class mcMMO extends JavaPlugin { //Init Block Tools blockTools = new BlockTools(this); - //Init Item Tools - itemTools = new ItemTools(this); - //Init MOTD Utils messageOfTheDayUtils = new MessageOfTheDayUtils(this); //Init Sound Manager soundManager = new SoundManager(this); - //Misc Tools Init - miscTools = new MiscTools(this); - //Init HardcoreManager hardcoreManager = new HardcoreManager(this); diff --git a/mcmmo-core/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java b/mcmmo-core/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java index 2743d0216..999774cf5 100644 --- a/mcmmo-core/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java +++ b/mcmmo-core/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java @@ -95,7 +95,7 @@ public class MiningManager extends SkillManager { boolean silkTouch = player.getInventory().getItemInMainHand().containsEnchantment(Enchantment.SILK_TOUCH); - if (silkTouch && !pluginRef.getConfigManager().getConfigMining().getMiningSubskills().getDoubleDrops().isAllowSilkTouchDoubleDrops()) + if (silkTouch && !pluginRef.getConfigManager().getConfigMining().getMiningSubSkills().getDoubleDrops().isAllowSilkTouchDoubleDrops()) return; //TODO: Make this readable