1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-26 04:25:15 +01:00

Bukkit#getPlayerUniqueId isint present in spigot builds

This commit is contained in:
Zrips 2022-02-07 15:02:33 +02:00
parent 55a0705826
commit 5f57d4aa95
5 changed files with 10 additions and 10 deletions

View File

@ -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());
}

View File

@ -64,7 +64,7 @@ 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;

View File

@ -64,7 +64,7 @@ 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;

View File

@ -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");