Selaa lähdekoodia

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

TfT_02 11 vuotta sitten
vanhempi
sitoutus
5a6bb363cf

+ 1 - 0
Changelog.txt

@@ -42,6 +42,7 @@ Version 1.4.07-dev
  = Fixed a bug where Combat XP was granted within 5 seconds for respawned players
  = Fixed a bug where wrong feedback messages were being send when using a command on an offline player
  = Fixed a bug where players were able to gain Herbalism XP in mine carts, even though Prevent_AFK_Leveling was enabled
+ = Fixed a bug where players would get hit by fireworks if they leveled up while in a boat
  ! Changed format of mod config files. (blocks.yml, tools.yml, armor.yml and entities.yml) **YOU WILL NEED TO UPDATE YOUR FILE TO THE NEW FORMAT**
  ! Changed format of treasures.yml. **YOU WILL NEED TO UPDATE YOUR FILE TO THE NEW FORMAT**
  ! Changed format of repair.vanilla.yml. **YOU WILL NEED TO UPDATE YOUR FILE TO THE NEW FORMAT**

+ 5 - 1
src/main/java/com/gmail/nossr50/util/skills/ParticleEffectUtils.java

@@ -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);