From 349735395e2997ae4f0d4fdc77b0b0be2ddadead Mon Sep 17 00:00:00 2001 From: Indyuce Date: Sat, 4 Jul 2020 15:35:35 +0200 Subject: [PATCH] Moved ExpCurve to exp package --- src/main/java/net/Indyuce/mmocore/MMOCore.java | 7 ++++--- .../mmocore/api/{player => experience}/ExpCurve.java | 2 +- .../Indyuce/mmocore/api/experience/PlayerProfessions.java | 2 +- .../net/Indyuce/mmocore/api/experience/Profession.java | 1 - .../Indyuce/mmocore/api/player/profess/PlayerClass.java | 2 +- .../net/Indyuce/mmocore/manager/ExperienceManager.java | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) rename src/main/java/net/Indyuce/mmocore/api/{player => experience}/ExpCurve.java (94%) diff --git a/src/main/java/net/Indyuce/mmocore/MMOCore.java b/src/main/java/net/Indyuce/mmocore/MMOCore.java index 6db4049d..c3646c6c 100644 --- a/src/main/java/net/Indyuce/mmocore/MMOCore.java +++ b/src/main/java/net/Indyuce/mmocore/MMOCore.java @@ -393,6 +393,10 @@ public class MMOCore extends JavaPlugin { // experience must be loaded before professions and classes experience.reload(); + + // drop tables must be loaded before professions + dropTableManager.clear(); + dropTableManager.reload(); professionManager.clear(); professionManager.reload(); @@ -402,9 +406,6 @@ public class MMOCore extends JavaPlugin { inventoryManager = new InventoryManager(); - dropTableManager.clear(); - dropTableManager.reload(); - questManager.clear(); questManager.reload(); diff --git a/src/main/java/net/Indyuce/mmocore/api/player/ExpCurve.java b/src/main/java/net/Indyuce/mmocore/api/experience/ExpCurve.java similarity index 94% rename from src/main/java/net/Indyuce/mmocore/api/player/ExpCurve.java rename to src/main/java/net/Indyuce/mmocore/api/experience/ExpCurve.java index 9f8a66e7..798d8b49 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/ExpCurve.java +++ b/src/main/java/net/Indyuce/mmocore/api/experience/ExpCurve.java @@ -1,4 +1,4 @@ -package net.Indyuce.mmocore.api.player; +package net.Indyuce.mmocore.api.experience; import java.io.BufferedReader; import java.io.File; diff --git a/src/main/java/net/Indyuce/mmocore/api/experience/PlayerProfessions.java b/src/main/java/net/Indyuce/mmocore/api/experience/PlayerProfessions.java index 10969db6..42904ccc 100644 --- a/src/main/java/net/Indyuce/mmocore/api/experience/PlayerProfessions.java +++ b/src/main/java/net/Indyuce/mmocore/api/experience/PlayerProfessions.java @@ -161,7 +161,7 @@ public class PlayerProfessions { if (check) { Bukkit.getPluginManager().callEvent(new PlayerLevelUpEvent(playerData, profession, oldLevel, level)); new SmallParticleEffect(playerData.getPlayer(), Particle.SPELL_INSTANT); - new ConfigMessage("profession-level-up").addPlaceholders("level", "" + (level), "profession", profession.getName()) + new ConfigMessage("profession-level-up").addPlaceholders("level", "" + level, "profession", profession.getName()) .send(playerData.getPlayer()); playerData.getPlayer().playSound(playerData.getPlayer().getLocation(), Sound.ENTITY_PLAYER_LEVELUP, 1, 2); playerData.getStats().updateStats(); diff --git a/src/main/java/net/Indyuce/mmocore/api/experience/Profession.java b/src/main/java/net/Indyuce/mmocore/api/experience/Profession.java index 46317d6f..e535c4b4 100644 --- a/src/main/java/net/Indyuce/mmocore/api/experience/Profession.java +++ b/src/main/java/net/Indyuce/mmocore/api/experience/Profession.java @@ -11,7 +11,6 @@ import org.bukkit.potion.PotionType; import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.api.load.PostLoadObject; -import net.Indyuce.mmocore.api.player.ExpCurve; import net.Indyuce.mmocore.api.util.math.formula.LinearValue; import net.mmogroup.mmolib.MMOLib; import net.mmogroup.mmolib.api.MMOLineConfig; diff --git a/src/main/java/net/Indyuce/mmocore/api/player/profess/PlayerClass.java b/src/main/java/net/Indyuce/mmocore/api/player/profess/PlayerClass.java index dac45a54..2ba25795 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/profess/PlayerClass.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/profess/PlayerClass.java @@ -24,9 +24,9 @@ import com.mojang.authlib.GameProfile; import com.mojang.authlib.properties.Property; import net.Indyuce.mmocore.MMOCore; +import net.Indyuce.mmocore.api.experience.ExpCurve; import net.Indyuce.mmocore.api.experience.source.type.ExperienceSource; import net.Indyuce.mmocore.api.load.PostLoadObject; -import net.Indyuce.mmocore.api.player.ExpCurve; import net.Indyuce.mmocore.api.player.profess.event.EventTrigger; import net.Indyuce.mmocore.api.player.profess.resource.ManaDisplayOptions; import net.Indyuce.mmocore.api.player.profess.resource.PlayerResource; diff --git a/src/main/java/net/Indyuce/mmocore/manager/ExperienceManager.java b/src/main/java/net/Indyuce/mmocore/manager/ExperienceManager.java index 6b2c1566..cd98c02a 100644 --- a/src/main/java/net/Indyuce/mmocore/manager/ExperienceManager.java +++ b/src/main/java/net/Indyuce/mmocore/manager/ExperienceManager.java @@ -10,7 +10,7 @@ import java.util.logging.Level; import org.apache.commons.lang.Validate; import net.Indyuce.mmocore.MMOCore; -import net.Indyuce.mmocore.api.player.ExpCurve; +import net.Indyuce.mmocore.api.experience.ExpCurve; import net.Indyuce.mmoitems.MMOItems; public class ExperienceManager {