mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Fix CombatUtils NPE due to arrows from unloaded players
This commit is contained in:
parent
8094be46c8
commit
dceee5554d
@ -381,12 +381,15 @@ public class EntityListener implements Listener {
|
||||
}
|
||||
|
||||
//Deflect checks
|
||||
UnarmedManager unarmedManager = UserManager.getPlayer(defendingPlayer).getUnarmedManager();
|
||||
final McMMOPlayer mcMMOPlayer = UserManager.getPlayer(defendingPlayer);
|
||||
if (mcMMOPlayer != null) {
|
||||
UnarmedManager unarmedManager = mcMMOPlayer.getUnarmedManager();
|
||||
|
||||
if (unarmedManager.canDeflect()) {
|
||||
if(unarmedManager.deflectCheck()) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
if (unarmedManager.canDeflect()) {
|
||||
if (unarmedManager.deflectCheck()) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user