mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
Prevent NPE when setting tempt target to null
This commit is contained in:
parent
10daedccdd
commit
fe3ca95c76
@ -34,7 +34,7 @@
|
||||
+ if (event.isCancelled()) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ this.target = ((CraftLivingEntity) event.getTarget()).getHandle();
|
||||
+ this.target = (event.getTarget() == null) ? null : ((CraftLivingEntity) event.getTarget()).getHandle();
|
||||
+ }
|
||||
+ return tempt;
|
||||
+ // CraftBukkit end
|
||||
|
Loading…
Reference in New Issue
Block a user