mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-04 23:37:49 +01:00
New jobs.all.vipmaxlevel permission node
This commit is contained in:
parent
439665039b
commit
d0616e873b
@ -626,11 +626,14 @@ public class JobsPlayer {
|
||||
|
||||
public int getMaxJobLevelAllowed(Job job) {
|
||||
int maxLevel = 0;
|
||||
if (getPlayer() != null && getPlayer().hasPermission("jobs." + job.getName() + ".vipmaxlevel"))
|
||||
if (getPlayer() != null && (getPlayer().hasPermission("jobs." + job.getName() + ".vipmaxlevel") || getPlayer().hasPermission("jobs.all.vipmaxlevel")))
|
||||
maxLevel = job.getVipMaxLevel() > job.getMaxLevel() ? job.getVipMaxLevel() : job.getMaxLevel();
|
||||
else
|
||||
maxLevel = job.getMaxLevel();
|
||||
int tMax = Jobs.getPermissionManager().getMaxPermission(this, "jobs." + job.getName() + ".vipmaxlevel").intValue();
|
||||
if (tMax > maxLevel)
|
||||
maxLevel = tMax;
|
||||
tMax = Jobs.getPermissionManager().getMaxPermission(this, "jobs.all.vipmaxlevel").intValue();
|
||||
if (tMax > maxLevel)
|
||||
maxLevel = tMax;
|
||||
return maxLevel;
|
||||
|
Loading…
Reference in New Issue
Block a user