13
0
geforkt von Mirrors/Paper

SPIGOT-4911: Cannot add firework rocket as charged projectile in crossbow

By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2019-05-12 11:22:21 +10:00
Ursprung b407bebd8d
Commit f3e26f2572

Datei anzeigen

@ -141,7 +141,7 @@ public class CraftMetaCrossbow extends CraftMetaItem implements CrossbowMeta {
@Override
public void addChargedProjectile(ItemStack 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) {
chargedProjectiles = new ArrayList<>();