mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +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