SPIGOT-4870: Server crashes while charging crossbow

This commit is contained in:
md_5 2019-05-05 16:18:29 +10:00
parent c441dba815
commit 8deeeec0ac

View File

@ -18,7 +18,19 @@
}
@Override
@@ -203,11 +207,27 @@
@@ -88,6 +92,11 @@
itemstack1 = new ItemStack(Items.ARROW);
itemstack2 = itemstack1.cloneItemStack();
}
+ // CraftBukkit start - SPIGOT-4870, MC-150847
+ else if (itemstack1.isEmpty()) {
+ return;
+ }
+ // CraftBukkit end
a(entityliving, itemstack, itemstack1, k > 0, flag);
}
@@ -203,11 +212,27 @@
vector3fa.a(quaternion);
((IProjectile) object).shoot((double) vector3fa.a(), (double) vector3fa.b(), (double) vector3fa.c(), f1, f2);
}