mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-12-17 22:27:57 +01:00
Hopeful fix for rare errors where location world somehow changes in the middle of trying to show a smoke effect
This commit is contained in:
parent
8607f1c22d
commit
a0fa3863d4
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user