From b051b20471814a44fd7b6ce01f90ac35f4027012 Mon Sep 17 00:00:00 2001 From: Zrips Date: Wed, 14 Mar 2018 16:17:22 +0200 Subject: [PATCH] Perform commands on promotion --- src/main/java/com/gamingmesh/jobs/container/JobsPlayer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gamingmesh/jobs/container/JobsPlayer.java b/src/main/java/com/gamingmesh/jobs/container/JobsPlayer.java index fbb0cd8d..e7a940af 100644 --- a/src/main/java/com/gamingmesh/jobs/container/JobsPlayer.java +++ b/src/main/java/com/gamingmesh/jobs/container/JobsPlayer.java @@ -501,7 +501,8 @@ public class JobsPlayer { return; if (levels <= 0) return; - int newLevel = prog.getLevel() + levels; + int oldLevel = prog.getLevel(); + int newLevel = oldLevel + levels; int maxLevel = job.getMaxLevel(this); @@ -509,6 +510,7 @@ public class JobsPlayer { newLevel = maxLevel; } setLevel(job, newLevel); + Jobs.getPlayerManager().performCommandOnLevelUp(this, job, newLevel - 1); // } }