SPIGOT-4911: Cannot add firework rocket as charged projectile in crossbow
This commit is contained in:
parent
8ad02cd9c7
commit
21dbe8ab2a
@ -141,7 +141,7 @@ public class CraftMetaCrossbow extends CraftMetaItem implements CrossbowMeta {
|
|||||||
@Override
|
@Override
|
||||||
public void addChargedProjectile(ItemStack item) {
|
public void addChargedProjectile(ItemStack item) {
|
||||||
Preconditions.checkArgument(item != null, "item");
|
Preconditions.checkArgument(item != null, "item");
|
||||||
Preconditions.checkArgument(CraftMagicNumbers.getItem(item.getType()) instanceof ItemArrow, "Item %s is not an arrow", item);
|
Preconditions.checkArgument(item.getType() == Material.FIREWORK_ROCKET || CraftMagicNumbers.getItem(item.getType()) instanceof ItemArrow, "Item %s is not an arrow or firework rocket", item);
|
||||||
|
|
||||||
if (chargedProjectiles == null) {
|
if (chargedProjectiles == null) {
|
||||||
chargedProjectiles = new ArrayList<>();
|
chargedProjectiles = new ArrayList<>();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user