From 5f57d4aa953bfe15bd70a0ce46b8fa5ce7a06f7f Mon Sep 17 00:00:00 2001 From: Zrips Date: Mon, 7 Feb 2022 15:02:33 +0200 Subject: [PATCH] Bukkit#getPlayerUniqueId isint present in spigot builds --- src/main/java/com/gamingmesh/jobs/PlayerManager.java | 4 ++-- .../java/com/gamingmesh/jobs/commands/list/expboost.java | 2 +- .../java/com/gamingmesh/jobs/commands/list/moneyboost.java | 4 ++-- .../java/com/gamingmesh/jobs/commands/list/pointboost.java | 4 ++-- .../java/com/gamingmesh/jobs/config/LanguageManager.java | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/PlayerManager.java b/src/main/java/com/gamingmesh/jobs/PlayerManager.java index 135cc659..2ba46908 100644 --- a/src/main/java/com/gamingmesh/jobs/PlayerManager.java +++ b/src/main/java/com/gamingmesh/jobs/PlayerManager.java @@ -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()); } diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/expboost.java b/src/main/java/com/gamingmesh/jobs/commands/list/expboost.java index 7f8d279e..59caf9b8 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/expboost.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/expboost.java @@ -49,7 +49,7 @@ public class expboost implements Cmd { continue; } catch (Exception e) { } - } + } if (!reset && rate == null || jobName == null) { Jobs.getCommandManager().sendUsage(sender, "expboost"); diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/moneyboost.java b/src/main/java/com/gamingmesh/jobs/commands/list/moneyboost.java index 506bd6fc..42f01588 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/moneyboost.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/moneyboost.java @@ -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")) { diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/pointboost.java b/src/main/java/com/gamingmesh/jobs/commands/list/pointboost.java index da32b94b..0b9c99ea 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/pointboost.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/pointboost.java @@ -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")) { diff --git a/src/main/java/com/gamingmesh/jobs/config/LanguageManager.java b/src/main/java/com/gamingmesh/jobs/config/LanguageManager.java index 088e0be0..dca132c0 100644 --- a/src/main/java/com/gamingmesh/jobs/config/LanguageManager.java +++ b/src/main/java/com/gamingmesh/jobs/config/LanguageManager.java @@ -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");