Fix NPE of AbstractArrow#getWeapon (#10933)
This commit is contained in:
@@ -201,6 +201,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
@Override
|
||||
public boolean isInBlock() {
|
||||
@@ -0,0 +0,0 @@ public class CraftAbstractArrow extends AbstractProjectile implements AbstractAr
|
||||
|
||||
@Override
|
||||
public ItemStack getWeapon() {
|
||||
+ if (this.getHandle().getWeaponItem() == null) return null; // Paper - fix NPE
|
||||
return CraftItemStack.asBukkitCopy(this.getHandle().getWeaponItem());
|
||||
}
|
||||
|
||||
@@ -0,0 +0,0 @@ public class CraftAbstractArrow extends AbstractProjectile implements AbstractAr
|
||||
public String toString() {
|
||||
return "CraftArrow";
|
||||
|
||||
Reference in New Issue
Block a user