From a30851c7d2f7042cfb89f3f638659564d0962ae9 Mon Sep 17 00:00:00 2001 From: Indyuce Date: Tue, 21 Dec 2021 19:34:51 +0100 Subject: [PATCH] compatibility with ML 1.2 --- pom.xml | 16 ++++++++-------- src/main/java/net/Indyuce/mmocore/MMOCore.java | 2 +- .../net/Indyuce/mmocore/api/PlayerActionBar.java | 2 +- .../mmocore/api/player/stats/StatType.java | 2 +- .../mmocore/comp/mythicmobs/MythicSkill.java | 6 ++++-- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index 20bc2089..2a4ba6a4 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 net.Indyuce MMOCore - 1.8.2 + 1.8.3 MMOCore Offer your players a brand new RPG experience!! @@ -72,6 +72,11 @@ + + lumine + https://mvn.lumine.io/repository/maven/ + + placeholderapi https://repo.extendedclip.com/content/repositories/placeholderapi/ @@ -82,11 +87,6 @@ https://jitpack.io - - lumine - https://mvn.lumine.io/repository/maven/ - - spigot-repo https://hub.spigotmc.org/nexus/content/repositories/snapshots/ @@ -124,8 +124,8 @@ io.lumine - MythicLib - 1.1.6 + MythicLib-dist + 1.2-0 provided diff --git a/src/main/java/net/Indyuce/mmocore/MMOCore.java b/src/main/java/net/Indyuce/mmocore/MMOCore.java index 0867bb97..039c0fa7 100644 --- a/src/main/java/net/Indyuce/mmocore/MMOCore.java +++ b/src/main/java/net/Indyuce/mmocore/MMOCore.java @@ -76,7 +76,7 @@ public class MMOCore extends LuminePlugin { public final PartyManager partyManager = new PartyManager(); public final QuestManager questManager = new QuestManager(); public final ProfessionManager professionManager = new ProfessionManager(); - public final ExperienceManager experience = new ExperienceManager(); + public final net.Indyuce.mmocore.manager.ExperienceManager experience = new net.Indyuce.mmocore.manager.ExperienceManager(); public final LootChestManager lootChests = new LootChestManager(); /* diff --git a/src/main/java/net/Indyuce/mmocore/api/PlayerActionBar.java b/src/main/java/net/Indyuce/mmocore/api/PlayerActionBar.java index eb04b3c4..0611453a 100644 --- a/src/main/java/net/Indyuce/mmocore/api/PlayerActionBar.java +++ b/src/main/java/net/Indyuce/mmocore/api/PlayerActionBar.java @@ -21,7 +21,7 @@ public class PlayerActionBar extends BukkitRunnable { public void reload(ConfigurationSection cfg) { config = new ActionBarConfig(cfg); - digit = new DecimalFormat(config.digit, MythicLib.plugin.getMMOConfig().formatSymbols); + digit = MythicLib.plugin.getMMOConfig().newDecimalFormat(config.digit); if(!initialized && config.enabled) { runTaskTimer(MMOCore.plugin, 0, config.ticks); diff --git a/src/main/java/net/Indyuce/mmocore/api/player/stats/StatType.java b/src/main/java/net/Indyuce/mmocore/api/player/stats/StatType.java index 99c0c245..eaf8ce72 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/stats/StatType.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/stats/StatType.java @@ -154,7 +154,7 @@ public enum StatType { FileConfiguration config = new ConfigFile("stats").getConfig(); for (StatType stat : values()) { stat.defaultInfo = config.contains("default." + stat.name()) ? new LinearValue(config.getConfigurationSection("default." + stat.name())) : new LinearValue(0, 0); - stat.format = MythicLib.plugin.getMMOConfig().newFormat(config.contains("decimal-format." + stat.name()) ? config.getString("decimal-format." + stat.name()) : "0.#"); + stat.format = MythicLib.plugin.getMMOConfig().newDecimalFormat(config.contains("decimal-format." + stat.name()) ? config.getString("decimal-format." + stat.name()) : "0.#"); } } } diff --git a/src/main/java/net/Indyuce/mmocore/comp/mythicmobs/MythicSkill.java b/src/main/java/net/Indyuce/mmocore/comp/mythicmobs/MythicSkill.java index 1d862301..72cbbaf8 100644 --- a/src/main/java/net/Indyuce/mmocore/comp/mythicmobs/MythicSkill.java +++ b/src/main/java/net/Indyuce/mmocore/comp/mythicmobs/MythicSkill.java @@ -1,8 +1,10 @@ package net.Indyuce.mmocore.comp.mythicmobs; +import io.lumine.mythic.lib.api.player.EquipmentSlot; +import io.lumine.mythic.lib.api.stat.modifier.ModifierSource; import io.lumine.mythic.lib.api.util.EnumUtils; import io.lumine.mythic.lib.player.cooldown.CooldownInfo; -import io.lumine.mythic.lib.skill.metadata.TriggerMetadata; +import io.lumine.mythic.lib.skill.trigger.TriggerMetadata; import io.lumine.mythic.lib.skill.trigger.PassiveSkill; import io.lumine.mythic.lib.skill.trigger.TriggerType; import io.lumine.mythic.lib.skill.trigger.TriggeredSkill; @@ -78,7 +80,7 @@ public class MythicSkill extends Skill implements TriggeredSkill { Optional passiveType = EnumUtils.getIfPresent(TriggerType.class, config.getString("passive-type").toUpperCase()); Validate.isTrue(passiveType.isPresent(), "Invalid passive skill type"); setPassive(); - mythicLibSkill = new PassiveSkill("MMOCorePassiveSkill", passiveType.get(), this); + mythicLibSkill = new PassiveSkill("MMOCorePassiveSkill", passiveType.get(), this, EquipmentSlot.OTHER, ModifierSource.OTHER); } else mythicLibSkill = null; }