diff --git a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java index 5b770865..20db1fb1 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java @@ -24,9 +24,12 @@ import net.Indyuce.mmocore.api.util.Closable; import net.Indyuce.mmocore.api.util.MMOCoreUtils; import net.Indyuce.mmocore.experience.EXPSource; import net.Indyuce.mmocore.experience.ExperienceObject; +import net.Indyuce.mmocore.experience.ExperienceTableClaimer; +import net.Indyuce.mmocore.experience.PlayerProfessions; import net.Indyuce.mmocore.experience.droptable.ExperienceItem; import net.Indyuce.mmocore.experience.droptable.ExperienceTable; import net.Indyuce.mmocore.guild.provided.Guild; +import net.Indyuce.mmocore.loot.chest.particle.SmallParticleEffect; import net.Indyuce.mmocore.manager.data.mysql.MySQLTableEditor; import net.Indyuce.mmocore.party.AbstractParty; import net.Indyuce.mmocore.party.provided.Party; @@ -36,9 +39,6 @@ import net.Indyuce.mmocore.skill.RegisteredSkill; import net.Indyuce.mmocore.skill.cast.SkillCastingHandler; import net.Indyuce.mmocore.waypoint.Waypoint; import net.Indyuce.mmocore.waypoint.WaypointOption; -import net.Indyuce.mmocore.experience.ExperienceTableClaimer; -import net.Indyuce.mmocore.experience.PlayerProfessions; -import net.Indyuce.mmocore.loot.chest.particle.SmallParticleEffect; import net.md_5.bungee.api.ChatMessageType; import net.md_5.bungee.api.chat.TextComponent; import org.apache.commons.lang.Validate; @@ -589,8 +589,8 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc * * @param value Experience to give the player * @param source How the player earned experience - * @param hologramLocation Location used to display the hologram. If it's null, no - * hologram will be displayed + * @param hologramLocation Location used to display the hologram. + * If it's null, no hologram will be displayed * @param splitExp Should the exp be split among party members */ public void giveExperience(double value, EXPSource source, @Nullable Location hologramLocation, boolean splitExp) { diff --git a/src/main/java/net/Indyuce/mmocore/listener/option/RedirectVanillaExp.java b/src/main/java/net/Indyuce/mmocore/listener/option/RedirectVanillaExp.java index 68df53bd..b7d37027 100644 --- a/src/main/java/net/Indyuce/mmocore/listener/option/RedirectVanillaExp.java +++ b/src/main/java/net/Indyuce/mmocore/listener/option/RedirectVanillaExp.java @@ -1,23 +1,20 @@ package net.Indyuce.mmocore.listener.option; +import net.Indyuce.mmocore.api.player.PlayerData; import net.Indyuce.mmocore.experience.EXPSource; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerExpChangeEvent; -import net.Indyuce.mmocore.api.player.PlayerData; - public class RedirectVanillaExp implements Listener { - private final double ratio; + private final double ratio; - public RedirectVanillaExp(double ratio) { - this.ratio = ratio; - } + public RedirectVanillaExp(double ratio) { + this.ratio = ratio; + } - @EventHandler - public void a(PlayerExpChangeEvent event) { - double a = (event.getAmount() * ratio); - if (a > 0) - PlayerData.get(event.getPlayer()).giveExperience(a, EXPSource.VANILLA); - } + @EventHandler + public void a(PlayerExpChangeEvent event) { + PlayerData.get(event.getPlayer()).giveExperience(event.getAmount() * ratio, EXPSource.VANILLA); + } } diff --git a/src/main/java/net/Indyuce/mmocore/player/playerclass/ClassTrigger.java b/src/main/java/net/Indyuce/mmocore/player/playerclass/ClassTrigger.java index a18649f8..4d5183f2 100644 --- a/src/main/java/net/Indyuce/mmocore/player/playerclass/ClassTrigger.java +++ b/src/main/java/net/Indyuce/mmocore/player/playerclass/ClassTrigger.java @@ -12,7 +12,6 @@ import io.lumine.mythic.lib.skill.result.SkillResult; import io.lumine.mythic.lib.skill.trigger.TriggerMetadata; import io.lumine.mythic.lib.skill.trigger.TriggerType; import io.lumine.mythic.lib.util.configobject.ConfigObject; -import io.lumine.mythic.lib.util.configobject.LineConfigObject; import net.Indyuce.mmocore.listener.ClassTriggers; import org.apache.commons.lang.Validate; @@ -43,7 +42,7 @@ public class ClassTrigger { type = ClassTriggerType.valueOf(UtilityMethods.enumName(triggerTypeString)); for (String key : mechanicStringList) { - ConfigObject config = new LineConfigObject(new MMOLineConfig(key)); + ConfigObject config = new MMOLineConfig(key); Mechanic mechanic = MythicLib.plugin.getSkills().loadMechanic(config); skill.getMechanics().add(mechanic); }