mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-26 12:35:28 +01:00
Lets perform correct level actions when adding exp
This commit is contained in:
parent
d47c059ef1
commit
d967985325
@ -67,7 +67,9 @@ public class exp implements Cmd {
|
||||
|
||||
switch (action) {
|
||||
case Add:
|
||||
prog.addExperience(amount);
|
||||
int oldLevel = prog.getLevel();
|
||||
if (prog.addExperience(amount))
|
||||
Jobs.getPlayerManager().performLevelUp(jPlayer, prog.getJob(), oldLevel);
|
||||
break;
|
||||
case Set:
|
||||
prog.setExperience(amount);
|
||||
@ -81,8 +83,8 @@ public class exp implements Cmd {
|
||||
|
||||
Player player = jPlayer.getPlayer();
|
||||
if (player != null)
|
||||
player.sendMessage(Jobs.getLanguage().getMessage("command.exp.output.target", "%jobname%", job.getChatColor() + job.getName(), "%level%", prog.getLevel(), "%exp%", prog.getExperience()));
|
||||
|
||||
player.sendMessage(Jobs.getLanguage().getMessage("command.exp.output.target", "%jobname%", job.getChatColor() + job.getName(), "%level%", prog.getLevel(), "%exp%", prog
|
||||
.getExperience()));
|
||||
sender.sendMessage(Jobs.getLanguage().getMessage("general.admin.success"));
|
||||
} else
|
||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.exp.error.nojob"));
|
||||
|
@ -7,6 +7,7 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.event.server.ServerCommandEvent;
|
||||
|
||||
import com.gamingmesh.jobs.Jobs;
|
||||
import com.gamingmesh.jobs.stuff.Debug;
|
||||
|
||||
public class QuestProgression {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user