mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-02 14:29:07 +01:00
Properly performing all commands on each level in any case
This commit is contained in:
parent
f119c1fa29
commit
7970b15d02
@ -702,7 +702,7 @@ public class PlayerManager {
|
|||||||
|
|
||||||
jPlayer.reloadHonorific();
|
jPlayer.reloadHonorific();
|
||||||
Jobs.getPermissionHandler().recalculatePermissions(jPlayer);
|
Jobs.getPermissionHandler().recalculatePermissions(jPlayer);
|
||||||
performCommandOnLevelUp(jPlayer, prog, oldLevel);
|
performCommandOnLevelUp(jPlayer, prog, oldLevel, prog.getLevel());
|
||||||
Jobs.getSignUtil().updateAllSign(job);
|
Jobs.getSignUtil().updateAllSign(job);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -848,7 +848,7 @@ public class PlayerManager {
|
|||||||
|
|
||||||
jPlayer.reloadHonorific();
|
jPlayer.reloadHonorific();
|
||||||
Jobs.getPermissionHandler().recalculatePermissions(jPlayer);
|
Jobs.getPermissionHandler().recalculatePermissions(jPlayer);
|
||||||
performCommandOnLevelUp(jPlayer, prog, oldLevel);
|
performCommandOnLevelUp(jPlayer, prog, oldLevel, prog.getLevel());
|
||||||
Jobs.getSignUtil().updateAllSign(job);
|
Jobs.getSignUtil().updateAllSign(job);
|
||||||
|
|
||||||
if (player != null && !job.getMaxLevelCommands().isEmpty() && prog.getLevel() == jPlayer.getMaxJobLevelAllowed(prog.getJob())) {
|
if (player != null && !job.getMaxLevelCommands().isEmpty() && prog.getLevel() == jPlayer.getMaxJobLevelAllowed(prog.getJob())) {
|
||||||
@ -898,6 +898,7 @@ public class PlayerManager {
|
|||||||
if ((command.getLevelFrom() == 0 && command.getLevelUntil() == 0) || (newLevel >= command.getLevelFrom() && newLevel <= command.getLevelUntil())) {
|
if ((command.getLevelFrom() == 0 && command.getLevelUntil() == 0) || (newLevel >= command.getLevelFrom() && newLevel <= command.getLevelUntil())) {
|
||||||
for (String commandString : new ArrayList<>(command.getCommands())) {
|
for (String commandString : new ArrayList<>(command.getCommands())) {
|
||||||
commandString = commandString.replace("[player]", jPlayer.getName())
|
commandString = commandString.replace("[player]", jPlayer.getName())
|
||||||
|
.replace("[playerName]", jPlayer.getName())
|
||||||
.replace("[oldlevel]", Integer.toString(newLevel - 1))
|
.replace("[oldlevel]", Integer.toString(newLevel - 1))
|
||||||
.replace("[newlevel]", Integer.toString(newLevel))
|
.replace("[newlevel]", Integer.toString(newLevel))
|
||||||
.replace("[jobname]", prog.getJob().getName());
|
.replace("[jobname]", prog.getJob().getName());
|
||||||
|
Loading…
Reference in New Issue
Block a user