Skip to content

Commit

Permalink
Fix Sefiraat#171 again, but this time do not break everything else
Browse files Browse the repository at this point in the history
  • Loading branch information
dentatar committed Dec 6, 2024
1 parent 51bf711 commit f40b06a
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ public void setVelocity(Location targetLocation, double speed) {
@ParametersAreNonnullByDefault
public void setVelocity(Vector vector, double speed) {
Projectile projectile = (Projectile) Bukkit.getEntity(projectileUUID);
// Fireball projectiles want to move wrongly :)
if (projectile instanceof Fireball) {
((Fireball) projectile).setDirection(vector);
if (projectile != null) {
// Fireball projectiles want to move wrongly :)
if (projectile instanceof Fireball) {
((Fireball) projectile).setDirection(vector);
}

projectile.setVelocity(vector.multiply(speed));
}
}
Expand Down

0 comments on commit f40b06a

Please sign in to comment.