From 3ff3e61dd9145f73a848f75e17beb98a2d789fc3 Mon Sep 17 00:00:00 2001 From: Brettflan Date: Wed, 22 Feb 2012 23:52:38 -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()); } }