From 38a66b6560d34a4f4ead456b2f9023f67cea8ea6 Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 6 Jul 2020 08:50:27 +1000 Subject: [PATCH] Fix crash involving fireballs --- nms-patches/IProjectile.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nms-patches/IProjectile.patch b/nms-patches/IProjectile.patch index 0f195b0bff..62a93b19f9 100644 --- a/nms-patches/IProjectile.patch +++ b/nms-patches/IProjectile.patch @@ -5,7 +5,7 @@ import javax.annotation.Nullable; +// CraftBukkit start -+import org.bukkit.entity.LivingEntity; ++import org.bukkit.projectiles.ProjectileSource; +// CraftBukkit end + public abstract class IProjectile extends Entity { @@ -15,7 +15,7 @@ this.shooter = entity.getUniqueID(); this.c = entity.getId(); } -+ this.projectileSource = entity == null ? null : (LivingEntity) entity.getBukkitEntity(); // CraftBukkit ++ this.projectileSource = (entity instanceof ProjectileSource) ? (ProjectileSource) entity.getBukkitEntity() : null; // CraftBukkit }