diff --git a/pom.xml b/pom.xml index 9c4879adf..ddb8386f3 100755 --- a/pom.xml +++ b/pom.xml @@ -116,6 +116,8 @@ net.kyori:adventure-text-serializer-bungeecord net.kyori:adventure-text-serializer-craftbukkit co.aikar:acf-bukkit + com.neetgames:mcMMO-API + com.neetgames:jmal @@ -193,6 +195,16 @@ + + com.neetgames + mcMMO-API + 0.01.00-SNAPSHOT + + + com.neetgames + jmal + 0.01.00-SNAPSHOT + co.aikar acf-bukkit diff --git a/src/main/java/com/gmail/nossr50/datatypes/experience/ExperienceContextBuilder.java b/src/main/java/com/gmail/nossr50/datatypes/experience/ExperienceContextBuilder.java new file mode 100644 index 000000000..73d83c51b --- /dev/null +++ b/src/main/java/com/gmail/nossr50/datatypes/experience/ExperienceContextBuilder.java @@ -0,0 +1,18 @@ +package com.gmail.nossr50.datatypes.experience; + +import com.gmail.nossr50.datatypes.experience.context.NullExperienceContext; +import org.jetbrains.annotations.NotNull; + +public class ExperienceContextBuilder { + + private static final @NotNull NullExperienceContext nullExperienceContext = new NullExperienceContext(); + + /** + * Return a null experience context + * @return a null experience context + */ + public static NullExperienceContext nullContext() { + return nullExperienceContext; + } + +} diff --git a/src/main/java/com/gmail/nossr50/datatypes/experience/ExperienceGain.java b/src/main/java/com/gmail/nossr50/datatypes/experience/ExperienceGain.java new file mode 100644 index 000000000..91fd68e49 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/datatypes/experience/ExperienceGain.java @@ -0,0 +1,22 @@ +package com.gmail.nossr50.datatypes.experience; + +import com.gmail.nossr50.datatypes.skills.PrimarySkillType; +import org.bukkit.NamespacedKey; +import org.jetbrains.annotations.NotNull; + +import java.util.UUID; + +public interface ExperienceGain { + /** + * Get the target skill for this XP gain + * We define this by a String to allow for custom skills + * @return The target skill + */ + @NotNull UUID getTargetSkill(); + + /** + * Value of the experience gain, this is the raw value before any mutations are done via modifiers or otherwise + * @return the value of this {@link ExperienceGain} + */ + int getValue(); +} diff --git a/src/main/java/com/gmail/nossr50/datatypes/experience/ExperienceGainBuilder.java b/src/main/java/com/gmail/nossr50/datatypes/experience/ExperienceGainBuilder.java new file mode 100644 index 000000000..8307c9e85 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/datatypes/experience/ExperienceGainBuilder.java @@ -0,0 +1,5 @@ +package com.gmail.nossr50.datatypes.experience; + +public class ExperienceGainBuilder { + +} diff --git a/src/main/java/com/gmail/nossr50/datatypes/player/ExperienceManager.java b/src/main/java/com/gmail/nossr50/datatypes/experience/ExperienceManager.java similarity index 88% rename from src/main/java/com/gmail/nossr50/datatypes/player/ExperienceManager.java rename to src/main/java/com/gmail/nossr50/datatypes/experience/ExperienceManager.java index ce5eb5e9a..572d269de 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/player/ExperienceManager.java +++ b/src/main/java/com/gmail/nossr50/datatypes/experience/ExperienceManager.java @@ -1,4 +1,4 @@ -package com.gmail.nossr50.datatypes.player; +package com.gmail.nossr50.datatypes.experience; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.experience.ExperienceConfig; @@ -7,6 +7,8 @@ import com.gmail.nossr50.datatypes.experience.SkillXpGain; import com.gmail.nossr50.datatypes.experience.XPGainReason; import com.gmail.nossr50.datatypes.experience.XPGainSource; import com.gmail.nossr50.datatypes.party.Party; +import com.gmail.nossr50.datatypes.player.McMMOPlayer; +import com.gmail.nossr50.datatypes.player.PersistentPlayerData; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.party.ShareHandler; @@ -26,19 +28,24 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.Set; +import java.util.UUID; public class ExperienceManager { private boolean isUsingUnarmed = false; private final @NotNull PersistentPlayerData persistentPlayerDataRef; - private final @NotNull McMMOPlayer mmoPlayer; + private @Nullable McMMOPlayer mmoPlayer; public ExperienceManager(@NotNull McMMOPlayer mmoPlayer) { this.mmoPlayer = mmoPlayer; this.persistentPlayerDataRef = mmoPlayer.getPersistentPlayerData(); } + public ExperienceManager(@NotNull PersistentPlayerData persistentPlayerData) { + this.persistentPlayerDataRef = persistentPlayerData; + } + /** * Gets the power level of this player. * A power level is the sum of all skill levels for this player @@ -60,7 +67,7 @@ public class ExperienceManager { * @param primarySkillType target skill * @return the value of raw XP for target skill */ - public float getSkillXpLevelRaw(PrimarySkillType primarySkillType) { + public float getSkillXpLevelRaw(@NotNull PrimarySkillType primarySkillType) { return persistentPlayerDataRef.getSkillsExperienceMap().get(primarySkillType); } @@ -289,7 +296,7 @@ public class ExperienceManager { public float getRegisteredXpGain(@NotNull PrimarySkillType primarySkillType) { float xp = 0F; - if (rollingSkillsXp.get(primarySkillType) != null) { + if (get(primarySkillType) != null) { //?? xp = rollingSkillsXp.get(primarySkillType); } @@ -359,15 +366,18 @@ public class ExperienceManager { * @param xp Experience amount to add */ public void applyXpGain(@NotNull PrimarySkillType primarySkillType, float xp, @NotNull XPGainReason xpGainReason, @NotNull XPGainSource xpGainSource) { - if (!primarySkillType.getPermissions(mmoPlayer.getPlayer())) { - return; + //Only check for permissions if the player is online, otherwise just assume a command is being executed by an admin or some other means and add the XP + if(mmoPlayer != null) { + if (!primarySkillType.getPermissions(mmoPlayer.getPlayer())) { + return; + } } if (primarySkillType.isChildSkill()) { Set parentSkills = FamilyTree.getParents(primarySkillType); for (PrimarySkillType parentSkill : parentSkills) { - applyXpGain(mmoPlayer, parentSkill, xp / parentSkills.size(), xpGainReason, xpGainSource); + applyXpGain(parentSkill, xp / parentSkills.size(), xpGainReason, xpGainSource); } return; @@ -377,16 +387,22 @@ public class ExperienceManager { return; } - mmoPlayer.getExperienceManager().setUsingUnarmed(primarySkillType == PrimarySkillType.UNARMED); - updateLevelStats(mmoPlayer, primarySkillType, xpGainReason, xpGainSource); + setUsingUnarmed(primarySkillType == PrimarySkillType.UNARMED); + updateLevelStats(primarySkillType, xpGainReason, xpGainSource); } public void processPostXpEvent(@NotNull PrimarySkillType primarySkillType, @NotNull Plugin plugin, @NotNull XPGainSource xpGainSource) { + /* + * Everything in this method requires an online player, so if they aren't online we don't waste our time + */ + if(mmoPlayer == null) + return; + //Check if they've reached the power level cap just now - if(mmoPlayer.getExperienceManager().hasReachedPowerLevelCap()) { + if(hasReachedPowerLevelCap()) { NotificationManager.sendPlayerInformationChatOnly(mmoPlayer.getPlayer(), "LevelCap.PowerLevel", String.valueOf(Config.getInstance().getPowerLevelCap())); - } else if(mmoPlayer.getExperienceManager().hasReachedLevelCap(primarySkillType)) { + } else if(hasReachedLevelCap(primarySkillType)) { NotificationManager.sendPlayerInformationChatOnly(mmoPlayer.getPlayer(), "LevelCap.Skill", String.valueOf(Config.getInstance().getLevelCap(primarySkillType)), primarySkillType.getName()); } @@ -407,25 +423,24 @@ public class ExperienceManager { * @param primarySkillType The skill to check */ public void updateLevelStats(@NotNull PrimarySkillType primarySkillType, @NotNull XPGainReason xpGainReason, @NotNull XPGainSource xpGainSource) { - ExperienceManager em = mmoPlayer.getExperienceManager(); - if(em.hasReachedLevelCap(primarySkillType)) + if(hasReachedLevelCap(primarySkillType)) return; - if (em.getSkillXpLevelRaw(primarySkillType) < em.getXpToLevel(primarySkillType)) { - processPostXpEvent(mmoPlayer, primarySkillType, mcMMO.p, xpGainSource); + if (getSkillXpLevelRaw(primarySkillType) < getXpToLevel(primarySkillType)) { + processPostXpEvent(primarySkillType, mcMMO.p, xpGainSource); return; } int levelsGained = 0; float xpRemoved = 0; - while (em.getSkillXpLevelRaw(primarySkillType) >= em.getXpToLevel(primarySkillType)) { - if (em.hasReachedLevelCap(primarySkillType)) { - em.setSkillXpValue(primarySkillType, 0); + while (getSkillXpLevelRaw(primarySkillType) >= getXpToLevel(primarySkillType)) { + if (hasReachedLevelCap(primarySkillType)) { + setSkillXpValue(primarySkillType, 0); break; } - xpRemoved += em.levelUp(primarySkillType); + xpRemoved += levelUp(primarySkillType); levelsGained++; } @@ -441,10 +456,10 @@ public class ExperienceManager { * Check to see if the player unlocked any new skills */ - NotificationManager.sendPlayerLevelUpNotification(mmoPlayer, primarySkillType, levelsGained, em.getSkillLevel(primarySkillType)); + NotificationManager.sendPlayerLevelUpNotification(mmoPlayer, primarySkillType, levelsGained, getSkillLevel(primarySkillType)); //UPDATE XP BARS - processPostXpEvent(mmoPlayer, primarySkillType, mcMMO.p, xpGainSource); + processPostXpEvent(primarySkillType, mcMMO.p, xpGainSource); } diff --git a/src/main/java/com/gmail/nossr50/datatypes/experience/ExperienceProcessor.java b/src/main/java/com/gmail/nossr50/datatypes/experience/ExperienceProcessor.java new file mode 100644 index 000000000..80af5b56a --- /dev/null +++ b/src/main/java/com/gmail/nossr50/datatypes/experience/ExperienceProcessor.java @@ -0,0 +1,5 @@ +package com.gmail.nossr50.datatypes.experience; + +public class ExperienceProcessor { + +} diff --git a/src/main/java/com/gmail/nossr50/datatypes/experience/ExperienceVector.java b/src/main/java/com/gmail/nossr50/datatypes/experience/ExperienceVector.java new file mode 100644 index 000000000..3c746a0d5 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/datatypes/experience/ExperienceVector.java @@ -0,0 +1,6 @@ +package com.gmail.nossr50.datatypes.experience; + +public enum ExperienceVector { + ALL, + TARGETED, +} diff --git a/src/main/java/com/gmail/nossr50/datatypes/experience/PartyExperienceGain.java b/src/main/java/com/gmail/nossr50/datatypes/experience/PartyExperienceGain.java new file mode 100644 index 000000000..28f95b79c --- /dev/null +++ b/src/main/java/com/gmail/nossr50/datatypes/experience/PartyExperienceGain.java @@ -0,0 +1,11 @@ +package com.gmail.nossr50.datatypes.experience; + +public interface PartyExperienceGain extends ExperienceGain { + + /** + * The original value of this experience gain + * This is not equivalent to the amount of XP the players in party will get, but it was the value of the XP before it was distributed to party members + * @return the original value of the experience gain + */ + int originalValue(); +} diff --git a/src/main/java/com/gmail/nossr50/datatypes/experience/capture/ExperienceCapture.java b/src/main/java/com/gmail/nossr50/datatypes/experience/capture/ExperienceCapture.java new file mode 100644 index 000000000..4475d2d1e --- /dev/null +++ b/src/main/java/com/gmail/nossr50/datatypes/experience/capture/ExperienceCapture.java @@ -0,0 +1,26 @@ +package com.gmail.nossr50.datatypes.experience.capture; + +import com.gmail.nossr50.datatypes.experience.context.ExperienceContext; +import com.neetgames.mcmmo.skill.SkillIdentity; +import org.jetbrains.annotations.NotNull; + +import java.util.HashSet; + +public class ExperienceCapture { + private @NotNull ExperienceContext experienceContext; + private @NotNull HashSet affectedSkills; + + public ExperienceCapture(@NotNull ExperienceContext experienceContext, @NotNull HashSet affectedSkills) { + this.experienceContext = experienceContext; + this.affectedSkills = affectedSkills; + } + + /** + * Check whether or not a skill is targeted in this experience capture + * @param skillIdentity target skill + * @return true if this skill is targeted in this experience capture + */ + public boolean isSkillAffected(@NotNull SkillIdentity skillIdentity) { + return affectedSkills.contains(skillIdentity); + } +} diff --git a/src/main/java/com/gmail/nossr50/datatypes/experience/capture/ExperienceSnapshot.java b/src/main/java/com/gmail/nossr50/datatypes/experience/capture/ExperienceSnapshot.java new file mode 100644 index 000000000..0328be1aa --- /dev/null +++ b/src/main/java/com/gmail/nossr50/datatypes/experience/capture/ExperienceSnapshot.java @@ -0,0 +1,36 @@ +package com.gmail.nossr50.datatypes.experience.capture; + +import com.gmail.nossr50.datatypes.player.PlayerProfile; +import com.gmail.nossr50.datatypes.skills.PrimarySkillType; +import com.gmail.nossr50.datatypes.skills.SkillIdentity; +import org.jetbrains.annotations.NotNull; + +public interface ExperienceSnapshot { + /** + * Check whether or not a skill is targeted in this experience capture + * + * @param skillIdentity target skill + * @return true if this skill is targeted in this experience capture + */ + boolean isSkillAffected(@NotNull SkillIdentity skillIdentity); + + /** + * Check whether or not a skill is targeted in this experience capture + * + * @param skillId target skill + * @return true if this skill is targeted in this experience capture + */ + boolean isSkillAffected(@NotNull String skillId); + + /** + * Check whether or not a skill is targeted in this experience capture + * + * @param primarySkillType target skill + * @return true if this skill is targeted in this experience capture + * @deprecated the {@link PrimarySkillType} type is going to be phased out in favour of {@link SkillIdentity} at some point in the future + */ + @Deprecated + boolean isSkillAffected(@NotNull PrimarySkillType primarySkillType); + + @NotNull PlayerProfile[] getPlayers(); +} diff --git a/src/main/java/com/gmail/nossr50/datatypes/experience/capture/MultiExperienceCapture.java b/src/main/java/com/gmail/nossr50/datatypes/experience/capture/MultiExperienceCapture.java new file mode 100644 index 000000000..70fe8b833 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/datatypes/experience/capture/MultiExperienceCapture.java @@ -0,0 +1,31 @@ +package com.gmail.nossr50.datatypes.experience; + +import com.gmail.nossr50.datatypes.experience.capture.ExperienceCapture; +import com.gmail.nossr50.datatypes.experience.context.ExperienceContext; +import com.gmail.nossr50.datatypes.skills.SkillIdentity; +import org.jetbrains.annotations.NotNull; + +import java.util.HashSet; + +public class MultiExperienceCapture extends ExperienceCapture { + private @NotNull ExperienceContext experienceContext; + private @NotNull HashSet affectedSkills; + + public ExperienceCapture(@NotNull ExperienceContext experienceContext, @NotNull HashSet affectedSkills) { + this.experienceContext = experienceContext; + this.affectedSkills = affectedSkills; + } + + public MultiExperienceCapture(@NotNull ExperienceContext experienceContext, @NotNull HashSet affectedSkills) { + super(experienceContext, affectedSkills); + } + + /** + * Check whether or not a skill is targeted in this experience capture + * @param skillIdentity target skill + * @return true if this skill is targeted in this experience capture + */ + public boolean isSkillAffected(@NotNull SkillIdentity skillIdentity) { + return affectedSkills.contains(skillIdentity); + } +} diff --git a/src/main/java/com/gmail/nossr50/datatypes/experience/context/BlockExperienceContext.java b/src/main/java/com/gmail/nossr50/datatypes/experience/context/BlockExperienceContext.java new file mode 100644 index 000000000..15be63308 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/datatypes/experience/context/BlockExperienceContext.java @@ -0,0 +1,29 @@ +package com.gmail.nossr50.datatypes.experience.context; + +import org.bukkit.block.Block; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +public class BlockExperienceContext implements ExperienceContext { + + @NotNull Block blockExperienceContext; + + public BlockExperienceContext(@NotNull Block block) { + this.blockExperienceContext = block; + } + + @Nullable + @Override + public Object getContext() { + return blockExperienceContext; + } + + /** + * Get the Block involved in this experience context + * + * @return the {@link Block} involved in this experience context + */ + public @NotNull Block getBlockExperienceContext() { + return blockExperienceContext; + } +} diff --git a/src/main/java/com/gmail/nossr50/datatypes/experience/context/CombatContext.java b/src/main/java/com/gmail/nossr50/datatypes/experience/context/CombatContext.java new file mode 100644 index 000000000..97663f67b --- /dev/null +++ b/src/main/java/com/gmail/nossr50/datatypes/experience/context/CombatContext.java @@ -0,0 +1,29 @@ +package com.gmail.nossr50.datatypes.experience.context; + +import org.bukkit.entity.LivingEntity; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +public class CombatContext implements ExperienceContext { + + private final @NotNull LivingEntity livingEntity; + + public CombatContext(@NotNull LivingEntity livingEntity) { + this.livingEntity = livingEntity; + } + + @Nullable + @Override + public Object getContext() { + return livingEntity; + } + + /** + * Get the {@link LivingEntity} involved in this experience context + * + * @return the {@link LivingEntity} involved in this experience context + */ + public @NotNull LivingEntity getLivingEntity() { + return livingEntity; + } +} diff --git a/src/main/java/com/gmail/nossr50/datatypes/experience/context/ExperienceContext.java b/src/main/java/com/gmail/nossr50/datatypes/experience/context/ExperienceContext.java new file mode 100644 index 000000000..53bc372ec --- /dev/null +++ b/src/main/java/com/gmail/nossr50/datatypes/experience/context/ExperienceContext.java @@ -0,0 +1,12 @@ +package com.gmail.nossr50.datatypes.experience.context; + +import javax.annotation.Nullable; + +public interface ExperienceContext { + /** + * The source for this experience gain, can be anything from a block to an entity, etc + * Context is available as long as it can be + * @return the context (source) of this experience + */ + @Nullable Object getContext(); +} diff --git a/src/main/java/com/gmail/nossr50/datatypes/experience/context/NullExperienceContext.java b/src/main/java/com/gmail/nossr50/datatypes/experience/context/NullExperienceContext.java new file mode 100644 index 000000000..dd1ea77ce --- /dev/null +++ b/src/main/java/com/gmail/nossr50/datatypes/experience/context/NullExperienceContext.java @@ -0,0 +1,13 @@ +package com.gmail.nossr50.datatypes.experience.context; + +import org.jetbrains.annotations.Nullable; + +/** + * Represents an experience context with an undefined source + */ +public class NullExperienceContext implements ExperienceContext { + @Override + public @Nullable Object getContext() { + return null; + } +} diff --git a/src/main/java/com/gmail/nossr50/datatypes/experience/context/SharedExperienceContext.java b/src/main/java/com/gmail/nossr50/datatypes/experience/context/SharedExperienceContext.java new file mode 100644 index 000000000..aa4e4db86 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/datatypes/experience/context/SharedExperienceContext.java @@ -0,0 +1,13 @@ +package com.gmail.nossr50.datatypes.experience.context; + +import com.gmail.nossr50.datatypes.player.McMMOPlayer; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +public interface SharedExperienceContext { + /** + * The {@link McMMOPlayer} who originally gained the XP that was then shared + * @return the {@link McMMOPlayer} to which this experience context originates + */ + @NotNull McMMOPlayer getSharedContextSource(); +} diff --git a/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java b/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java index 05f4203d7..67f674236 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java +++ b/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java @@ -1,6 +1,7 @@ package com.gmail.nossr50.datatypes.player; import com.gmail.nossr50.datatypes.MobHealthBarType; +import com.gmail.nossr50.datatypes.experience.ExperienceManager; import com.gmail.nossr50.datatypes.party.Party; import com.gmail.nossr50.mcMMO; import org.bukkit.entity.Player; diff --git a/src/main/java/com/gmail/nossr50/datatypes/skills/PrimarySkill.java b/src/main/java/com/gmail/nossr50/datatypes/skills/PrimarySkill.java new file mode 100644 index 000000000..7d7fb5994 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/datatypes/skills/PrimarySkill.java @@ -0,0 +1,5 @@ +package com.gmail.nossr50.datatypes.skills; + +public interface PrimarySkill { + +} diff --git a/src/main/java/com/gmail/nossr50/datatypes/skills/SkillIdentity.java b/src/main/java/com/gmail/nossr50/datatypes/skills/SkillIdentity.java index 6c5464d28..afa59ae71 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/skills/SkillIdentity.java +++ b/src/main/java/com/gmail/nossr50/datatypes/skills/SkillIdentity.java @@ -18,6 +18,9 @@ import org.jetbrains.annotations.Nullable; * * Skills with parents do not gain experience, and instead their intended effects will be based on the strength of the parent skill (its level) * Skills are registered, no two skills can share the same fully qualified name (in this case, a combination of the namespace and skill name) + * + * A fully qualified name is generated based on the namespace and skill name + * @see #genFullyQualifiedName() */ public class SkillIdentity { @NotNull private final String nameSpace; diff --git a/src/main/java/com/gmail/nossr50/events/experience/ExperienceCaptureEvent.java b/src/main/java/com/gmail/nossr50/events/experience/ExperienceCaptureEvent.java new file mode 100644 index 000000000..86de2d320 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/events/experience/ExperienceCaptureEvent.java @@ -0,0 +1,24 @@ +package com.gmail.nossr50.events.experience; + +import org.bukkit.entity.Player; +import org.bukkit.event.HandlerList; +import org.bukkit.event.player.PlayerEvent; +import org.jetbrains.annotations.NotNull; + +public class ExperienceCaptureEvent extends PlayerEvent { + + public ExperienceCaptureEvent(@NotNull Player who) { + super(who); + } + + private static final HandlerList handlers = new HandlerList(); + + @Override + public @NotNull HandlerList getHandlers() { + return handlers; + } + + public static HandlerList getHandlerList() { + return handlers; + } +} diff --git a/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java b/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java index 815d3823f..4beb62102 100644 --- a/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java +++ b/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java @@ -258,7 +258,7 @@ public class HerbalismManager extends SkillManager { public void checkDoubleDropsOnBrokenPlants(Player player, Collection brokenPlants) { //Only proceed if skill unlocked and permission enabled - if (!RankUtils.hasUnlockedSubskill(player, SubSkillType.HERBALISM_DOUBLE_DROPS) + if (!RankUtils.hasUnlockedSubskill(mmoPlayer, SubSkillType.HERBALISM_DOUBLE_DROPS) || !Permissions.isSubSkillEnabled(player, SubSkillType.HERBALISM_DOUBLE_DROPS)) { return; } diff --git a/src/main/java/com/gmail/nossr50/util/experience/ExperienceUtils.java b/src/main/java/com/gmail/nossr50/util/experience/ExperienceUtils.java index 8204ac156..f3d6f0147 100644 --- a/src/main/java/com/gmail/nossr50/util/experience/ExperienceUtils.java +++ b/src/main/java/com/gmail/nossr50/util/experience/ExperienceUtils.java @@ -1,23 +1,12 @@ package com.gmail.nossr50.util.experience; -import com.gmail.nossr50.config.Config; -import com.gmail.nossr50.config.experience.ExperienceConfig; import com.gmail.nossr50.datatypes.experience.XPGainReason; import com.gmail.nossr50.datatypes.experience.XPGainSource; -import com.gmail.nossr50.datatypes.player.ExperienceManager; import com.gmail.nossr50.datatypes.player.McMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; -import com.gmail.nossr50.mcMMO; -import com.gmail.nossr50.skills.child.FamilyTree; -import com.gmail.nossr50.util.EventUtils; -import com.gmail.nossr50.util.player.NotificationManager; -import com.gmail.nossr50.util.sounds.SoundManager; -import com.gmail.nossr50.util.sounds.SoundType; import org.bukkit.plugin.Plugin; import org.jetbrains.annotations.NotNull; -import java.util.Set; - public class ExperienceUtils { private ExperienceUtils() {}