From 0964e5b32b6f535f7271080078e1620ff7807bae Mon Sep 17 00:00:00 2001 From: Zrips Date: Mon, 8 Aug 2022 14:31:30 +0300 Subject: [PATCH] Picking higher permission node for jobs.maxquest --- src/main/java/com/gamingmesh/jobs/container/JobsPlayer.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/container/JobsPlayer.java b/src/main/java/com/gamingmesh/jobs/container/JobsPlayer.java index 00115bdd..25c4daae 100644 --- a/src/main/java/com/gamingmesh/jobs/container/JobsPlayer.java +++ b/src/main/java/com/gamingmesh/jobs/container/JobsPlayer.java @@ -404,9 +404,8 @@ public class JobsPlayer { public int getPlayerMaxQuest(String jobName) { int m1 = (int) Jobs.getPermissionManager().getMaxPermission(this, "jobs.maxquest.all", false, true); - if (m1 != 0) - return m1; - return (int) Jobs.getPermissionManager().getMaxPermission(this, "jobs.maxquest." + jobName, false, true); + int m2 = (int) Jobs.getPermissionManager().getMaxPermission(this, "jobs.maxquest." + jobName, false, true); + return m1 > m2 ? m1 : m2; } /**