mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 12:05:53 +01:00
Fix crash involving fireballs
This commit is contained in:
parent
4309566390
commit
38a66b6560
@ -5,7 +5,7 @@
|
|||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
+// CraftBukkit start
|
+// CraftBukkit start
|
||||||
+import org.bukkit.entity.LivingEntity;
|
+import org.bukkit.projectiles.ProjectileSource;
|
||||||
+// CraftBukkit end
|
+// CraftBukkit end
|
||||||
+
|
+
|
||||||
public abstract class IProjectile extends Entity {
|
public abstract class IProjectile extends Entity {
|
||||||
@ -15,7 +15,7 @@
|
|||||||
this.shooter = entity.getUniqueID();
|
this.shooter = entity.getUniqueID();
|
||||||
this.c = entity.getId();
|
this.c = entity.getId();
|
||||||
}
|
}
|
||||||
+ this.projectileSource = entity == null ? null : (LivingEntity) entity.getBukkitEntity(); // CraftBukkit
|
+ this.projectileSource = (entity instanceof ProjectileSource) ? (ProjectileSource) entity.getBukkitEntity() : null; // CraftBukkit
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user