mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-25 20:16:13 +01:00
Bukkit#getPlayerUniqueId isint present in spigot builds
This commit is contained in:
parent
55a0705826
commit
5f57d4aa95
@ -183,7 +183,7 @@ public class PlayerManager {
|
||||
* @return {@link PlayerInfo}
|
||||
*/
|
||||
public PlayerInfo getPlayerInfo(String name) {
|
||||
if (Version.isCurrentEqualOrLower(Version.v1_11_R1)) {
|
||||
if (Version.isCurrentEqualOrLower(Version.v1_11_R1) || !Version.isPaper()) {
|
||||
JobsPlayer jPlayer = playersNameCache.get(name.toLowerCase());
|
||||
if (jPlayer == null)
|
||||
return null;
|
||||
@ -376,7 +376,7 @@ public class PlayerManager {
|
||||
* @return {@link JobsPlayer} the player job info of the player
|
||||
*/
|
||||
public JobsPlayer getJobsPlayer(String playerName) {
|
||||
if (Version.isCurrentEqualOrLower(Version.v1_11_R1)) {
|
||||
if (Version.isCurrentEqualOrLower(Version.v1_11_R1) || !Version.isPaper()) {
|
||||
return playersNameCache.get(playerName.toLowerCase());
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ public class expboost implements Cmd {
|
||||
continue;
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!reset && rate == null || jobName == null) {
|
||||
Jobs.getCommandManager().sendUsage(sender, "expboost");
|
||||
|
@ -64,11 +64,11 @@ public class moneyboost implements Cmd {
|
||||
|
||||
if (!reset && jobName.equalsIgnoreCase("all")) {
|
||||
for (Job job : Jobs.getJobs()) {
|
||||
job.addBoost(CurrencyType.MONEY, rate, 0L);
|
||||
job.addBoost(CurrencyType.MONEY, rate, timeDuration);
|
||||
}
|
||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.moneyboost.output.boostalladded", "%boost%", rate));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (reset) {
|
||||
if (jobName.equalsIgnoreCase("all")) {
|
||||
|
@ -64,11 +64,11 @@ public class pointboost implements Cmd {
|
||||
|
||||
if (!reset && jobName.equalsIgnoreCase("all")) {
|
||||
for (Job job : Jobs.getJobs()) {
|
||||
job.addBoost(CurrencyType.POINTS, rate, 0L);
|
||||
job.addBoost(CurrencyType.POINTS, rate, timeDuration);
|
||||
}
|
||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.pointboost.output.boostalladded", "%boost%", rate));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (reset) {
|
||||
if (jobName.equalsIgnoreCase("all")) {
|
||||
|
@ -126,7 +126,7 @@ public class LanguageManager {
|
||||
|
||||
c.get("command.moneyboost.help.info", "Boosts money gain for all players");
|
||||
c.get("command.moneyboost.help.args", "[jobname]/all/reset [time]/[rate]");
|
||||
Jobs.getGCManager().getCommandArgs().put("moneyboost", Arrays.asList("[jobname]%%all%%reset", "[time]%%[rate]"));
|
||||
Jobs.getGCManager().getCommandArgs().put("moneyboost", Arrays.asList("[jobname]%%all%%reset", "[time]%%2", "%%2"));
|
||||
c.get("command.moneyboost.output.allreset", "All money boosts turned off");
|
||||
c.get("command.moneyboost.output.jobsboostreset", "Money boost has been turned off for %jobname%");
|
||||
c.get("command.moneyboost.output.nothingtoreset", "Nothing to reset");
|
||||
@ -136,7 +136,7 @@ public class LanguageManager {
|
||||
|
||||
c.get("command.pointboost.help.info", "Boosts point gain for all players");
|
||||
c.get("command.pointboost.help.args", "[jobname]/all/reset [time]/[rate]");
|
||||
Jobs.getGCManager().getCommandArgs().put("pointboost", Arrays.asList("[jobname]%%all%%reset", "[time]%%[rate]"));
|
||||
Jobs.getGCManager().getCommandArgs().put("pointboost", Arrays.asList("[jobname]%%all%%reset", "[time]%%2", "%%2"));
|
||||
c.get("command.pointboost.output.allreset", "All point boosts turned off");
|
||||
c.get("command.pointboost.output.jobsboostreset", "Point boost has been turned off for %jobname%");
|
||||
c.get("command.pointboost.output.nothingtoreset", "Nothing to reset");
|
||||
@ -146,7 +146,7 @@ public class LanguageManager {
|
||||
|
||||
c.get("command.expboost.help.info", "Boosts exp gain for all players");
|
||||
c.get("command.expboost.help.args", "[jobname]/all/reset [time]/[rate]");
|
||||
Jobs.getGCManager().getCommandArgs().put("expboost", Arrays.asList("[jobname]%%all%%reset", "[time]%%[rate]"));
|
||||
Jobs.getGCManager().getCommandArgs().put("expboost", Arrays.asList("[jobname]%%all%%reset", "[time]%%2", "%%2"));
|
||||
c.get("command.expboost.output.allreset", "All exp boosts turned off");
|
||||
c.get("command.expboost.output.jobsboostreset", "Exp boost has been turned off for %jobname%");
|
||||
c.get("command.expboost.output.nothingtoreset", "Nothing to reset");
|
||||
|
Loading…
Reference in New Issue
Block a user