mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-04 05:54:43 +01:00
SPIGOT-4870: Server crashes while charging crossbow
This commit is contained in:
parent
c441dba815
commit
8deeeec0ac
1 changed files with 13 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue