mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-25 20:16:13 +01:00
parent
958329778a
commit
4491966934
6
pom.xml
6
pom.xml
@ -18,7 +18,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spigotmc</groupId>
|
<groupId>org.spigotmc</groupId>
|
||||||
<artifactId>spigot-api</artifactId>
|
<artifactId>spigot-api</artifactId>
|
||||||
<version>1.16.1-R0.1-SNAPSHOT</version>
|
<version>1.16.2-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Boss -->
|
<!-- Boss -->
|
||||||
@ -33,7 +33,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>de.keyle</groupId>
|
<groupId>de.keyle</groupId>
|
||||||
<artifactId>mypet</artifactId>
|
<artifactId>mypet</artifactId>
|
||||||
<version>3.9</version>
|
<version>3.10</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- McMMO -->
|
<!-- McMMO -->
|
||||||
@ -156,7 +156,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>me.clip</groupId>
|
<groupId>me.clip</groupId>
|
||||||
<artifactId>placeholderapi</artifactId>
|
<artifactId>placeholderapi</artifactId>
|
||||||
<version>2.10.8</version>
|
<version>2.10.9</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
|
@ -20,7 +20,6 @@ package com.gamingmesh.jobs;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map.Entry;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
@ -140,11 +139,11 @@ public class PermissionManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Double amount = 0D;
|
Double amount = 0D;
|
||||||
for (Entry<String, Boolean> uno : permissions.entrySet()) {
|
for (String uno : permissions.keySet()) {
|
||||||
if (uno.getKey().startsWith(perm)) {
|
if (uno.startsWith(perm)) {
|
||||||
double t = 0d;
|
double t = 0d;
|
||||||
try {
|
try {
|
||||||
t = Double.parseDouble(uno.getKey().replace(perm, ""));
|
t = Double.parseDouble(uno.replace(perm, ""));
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -519,11 +519,6 @@ public class Placeholder {
|
|||||||
return "";
|
return "";
|
||||||
Title title = Jobs.gettitleManager().getTitle(j.getLevel(), j.getJob().getName());
|
Title title = Jobs.gettitleManager().getTitle(j.getLevel(), j.getJob().getName());
|
||||||
return title == null ? "" : title.getChatColor() + title.getName();
|
return title == null ? "" : title.getChatColor() + title.getName();
|
||||||
|
|
||||||
case maxjobs:
|
|
||||||
Double max = Jobs.getPermissionManager().getMaxPermission(user, "jobs.max");
|
|
||||||
max = max == 0D ? Jobs.getGCManager().getMaxJobs() : max;
|
|
||||||
return Double.toString(max);
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -533,10 +528,9 @@ public class Placeholder {
|
|||||||
if (user.isOnline()) {
|
if (user.isOnline()) {
|
||||||
Player player = user.getPlayer();
|
Player player = user.getPlayer();
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
List<String> values;
|
|
||||||
switch (placeHolder) {
|
switch (placeHolder) {
|
||||||
case user_canjoin_$1:
|
case user_canjoin_$1:
|
||||||
values = placeHolder.getComplexValues(value);
|
List<String> values = placeHolder.getComplexValues(value);
|
||||||
if (values.isEmpty())
|
if (values.isEmpty())
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
@ -560,6 +554,11 @@ public class Placeholder {
|
|||||||
|
|
||||||
return convert(true);
|
return convert(true);
|
||||||
|
|
||||||
|
case maxjobs:
|
||||||
|
int max = Jobs.getPermissionManager().getMaxPermission(user, "jobs.max").intValue();
|
||||||
|
max = max == 0 ? Jobs.getGCManager().getMaxJobs() : max;
|
||||||
|
return Integer.toString(max);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user