mirror of
https://github.com/songoda/UltimateKits.git
synced 2024-11-08 11:41:28 +01:00
Fix for concurrent modification exception.
This commit is contained in:
parent
a19ea735fa
commit
c02d14dd43
@ -7,6 +7,7 @@ import com.songoda.ultimatekits.settings.Settings;
|
|||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -35,7 +36,7 @@ public class ParticleHandler {
|
|||||||
|
|
||||||
private void applyParticles() {
|
private void applyParticles() {
|
||||||
Map<Location, KitBlockData> kitBlocks = plugin.getKitManager().getKitLocations();
|
Map<Location, KitBlockData> kitBlocks = plugin.getKitManager().getKitLocations();
|
||||||
for (KitBlockData kitBlockData : kitBlocks.values()) {
|
for (KitBlockData kitBlockData : new ArrayList<>(kitBlocks.values())) {
|
||||||
if (kitBlockData.getLocation().getWorld() == null || !kitBlockData.hasParticles()) continue;
|
if (kitBlockData.getLocation().getWorld() == null || !kitBlockData.hasParticles()) continue;
|
||||||
|
|
||||||
Location location = kitBlockData.getLocation();
|
Location location = kitBlockData.getLocation();
|
||||||
|
Loading…
Reference in New Issue
Block a user