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 0fae0302..3827cad3 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java @@ -532,6 +532,9 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc * @param splitExp Should the exp be split among party members */ public void giveExperience(double value, EXPSource source, @Nullable Location hologramLocation, boolean splitExp) { + if (value <= 0) + return; + if (hasReachedMaxLevel()) { setExperience(0); return; diff --git a/src/main/java/net/Indyuce/mmocore/experience/PlayerProfessions.java b/src/main/java/net/Indyuce/mmocore/experience/PlayerProfessions.java index f7dd9963..1c84c39e 100644 --- a/src/main/java/net/Indyuce/mmocore/experience/PlayerProfessions.java +++ b/src/main/java/net/Indyuce/mmocore/experience/PlayerProfessions.java @@ -157,6 +157,8 @@ public class PlayerProfessions { public void giveExperience(Profession profession, double value, EXPSource source, @Nullable Location hologramLocation) { Validate.isTrue(playerData.isOnline(), "Cannot give experience to offline player"); + if (value <= 0) + return; if (hasReachedMaxLevel(profession)) { setExperience(profession, 0);