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:
parent
f8d9862a8b
commit
381253eaf3
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user