1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-29 22:13:25 +01:00

Fixed issue when the player is not online and sent to him the payment (#686)

- Fix issue when sending an invalid page sender on playerinfo command.
This commit is contained in:
Brian 2020-03-03 17:56:50 -03:00 committed by GitHub
parent f8d9862a8b
commit 381253eaf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -983,7 +983,7 @@ public class PlayerManager {
public Boost getFinalBonus(JobsPlayer player, Job prog, Entity ent, LivingEntity victim, boolean force, boolean getall) {
Boost boost = new Boost();
if (player == null || prog == null)
if (player == null || !player.isOnline() || prog == null)
return boost;
if (HookManager.getMcMMOManager().mcMMOPresent || HookManager.getMcMMOManager().mcMMOOverHaul)
@ -1026,7 +1026,6 @@ public class PlayerManager {
// boost.add(BoostOf.Item, Jobs.getPlayerManager().getItemBoost(player.getPlayer(), prog));
boost.add(BoostOf.Item, getItemBoostNBT(player.getPlayer(), prog));
boost.add(BoostOf.Area, new BoostMultiplier().add(Jobs.getRestrictedAreaManager().getRestrictedMultiplier(player.getPlayer())));
return boost;
}

View File

@ -309,7 +309,7 @@ public class JobsCommands implements CommandExecutor {
PageInfo pi = new PageInfo(15, message.size(), page);
if (page > pi.getTotalPages()) {
player.getPlayer().sendMessage(Jobs.getLanguage().getMessage("general.info.invalidPage"));
sender.sendMessage(Jobs.getLanguage().getMessage("general.info.invalidPage"));
return;
}