diff --git a/src/main/java/com/gmail/nossr50/listeners/SelfListener.java b/src/main/java/com/gmail/nossr50/listeners/SelfListener.java index 39d995789..c9ab378e9 100644 --- a/src/main/java/com/gmail/nossr50/listeners/SelfListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/SelfListener.java @@ -1,5 +1,6 @@ package com.gmail.nossr50.listeners; +import com.gmail.nossr50.datatypes.skills.XPGainReason; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -44,9 +45,10 @@ public class SelfListener implements Listener { @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void onPlayerXpGain(McMMOPlayerXpGainEvent event) { + if (event.getXpGainReason() == XPGainReason.COMMAND) + return; SkillType skillType = event.getSkill(); int threshold = ExperienceConfig.getInstance().getDiminishedReturnsThreshold(skillType); - if (threshold <= 0 || !ExperienceConfig.getInstance().getDiminishedReturnsEnabled()) { // Diminished returns is turned off return;