mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 03:43:40 +01:00
Prevent NPE when setting tempt target to null
By: chickeneer <emcchickeneer@gmail.com>
This commit is contained in:
parent
f25ad2b556
commit
7b45ff54ad
1 changed files with 1 additions and 1 deletions
|
@ -34,7 +34,7 @@
|
||||||
+ if (event.isCancelled()) {
|
+ if (event.isCancelled()) {
|
||||||
+ return false;
|
+ return false;
|
||||||
+ }
|
+ }
|
||||||
+ this.target = ((CraftLivingEntity) event.getTarget()).getHandle();
|
+ this.target = (event.getTarget() == null) ? null : ((CraftLivingEntity) event.getTarget()).getHandle();
|
||||||
+ }
|
+ }
|
||||||
+ return tempt;
|
+ return tempt;
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
|
|
Loading…
Reference in a new issue