Don't spawn fireworks under the player if they're in a vehicle

This commit is contained in:
TfT_02
2013-10-06 12:08:22 +02:00
parent 3f9c98d72e
commit 5a6bb363cf
2 changed files with 6 additions and 1 deletions

View File

@ -85,7 +85,11 @@ public final class ParticleEffectUtils {
private static void fireworkParticleShower(Player player, Color color) {
Location location = player.getLocation();
location.setY(location.getY() - 1.0);
if (!player.isInsideVehicle()) {
location.setY(location.getY() - 1.0);
}
location.setPitch(-90);
Firework firework = (Firework) player.getWorld().spawnEntity(location, EntityType.FIREWORK);