From a0fa3863d4dfc6168c69a277ce0f66936fca1e57 Mon Sep 17 00:00:00 2001 From: Brettflan Date: Wed, 22 Feb 2012 23:52:39 -0600 Subject: [PATCH] Hopeful fix for rare errors where location world somehow changes in the middle of trying to show a smoke effect --- src/com/massivecraft/factions/zcore/util/SmokeUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/massivecraft/factions/zcore/util/SmokeUtil.java b/src/com/massivecraft/factions/zcore/util/SmokeUtil.java index f0f627c0..05f718ef 100644 --- a/src/com/massivecraft/factions/zcore/util/SmokeUtil.java +++ b/src/com/massivecraft/factions/zcore/util/SmokeUtil.java @@ -34,7 +34,7 @@ public class SmokeUtil public static void spawnSingle(Location location, int direction) { if (location == null) return; - location.getWorld().playEffect(location, Effect.SMOKE, direction); + location.getWorld().playEffect(location.clone(), Effect.SMOKE, direction); } public static void spawnSingle(Location location) @@ -70,7 +70,7 @@ public class SmokeUtil int singles = (int) Math.floor(thickness*9); for (int i = 0; i < singles; i++) { - spawnSingleRandom(location); + spawnSingleRandom(location.clone()); } }