Skip to content

Commit

Permalink
Fix Sorcery giving XP when blocked or disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Archy-X committed Aug 10, 2023
1 parent 1c450f3 commit da0db32
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ public SorceryLeveler(AureliumSkills plugin) {
}

public void level(Player player, double manaUsed) {
if (!OptionL.isEnabled(Skills.SORCERY)) return;
if (blockXpGainLocation(player.getLocation(), player, Skills.SORCERY)) return;
if (blockXpGainPlayer(player)) return;

plugin.getLeveler().addXp(player, Skills.SORCERY, manaUsed * getAbilityXp(player, SorcerySource.MANA_ABILITY_USE));
}

Expand Down

0 comments on commit da0db32

Please sign in to comment.