1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-02-18 05:11:32 +01:00

Sump up boost permissions if we have more boosts in one job

Closes #469
This commit is contained in:
montlikadani 2020-07-25 18:33:27 +02:00
parent 2a9c72ea7c
commit f61fbfeea8

View File

@ -137,7 +137,7 @@ public class PermissionManager {
return 0D;
}
Double amount = null;
Double amount = 0D;
for (Entry<String, Boolean> uno : permissions.entrySet()) {
if (uno.getKey().startsWith(perm)) {
double t = 0d;
@ -147,12 +147,11 @@ public class PermissionManager {
continue;
}
amount = t;
break;
amount += t;
}
}
return amount == null ? 0D : amount;
return amount;
}
public boolean hasPermission(JobsPlayer jPlayer, String perm) {