mirror of
https://github.com/TotalFreedomMC/PlayerParticles.git
synced 2025-07-04 04:51:26 +00:00
Make the plugin async where possible
This commit is contained in:
parent
621862a5be
commit
ddbfd5292e
14 changed files with 139 additions and 134 deletions
|
@ -16,12 +16,12 @@ import dev.esophose.playerparticles.particles.ParticlePair;
|
|||
import dev.esophose.playerparticles.styles.ParticleStyle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.stream.Collectors;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
|
@ -525,7 +525,7 @@ public final class PlayerParticlesAPI {
|
|||
Objects.requireNonNull(groupName);
|
||||
Objects.requireNonNull(particles);
|
||||
|
||||
Map<Integer, ParticlePair> mappedParticles = new HashMap<>();
|
||||
Map<Integer, ParticlePair> mappedParticles = new ConcurrentHashMap<>();
|
||||
particles.forEach(x -> mappedParticles.put(x.getId(), x));
|
||||
ParticleGroup particleGroup = new ParticleGroup(groupName.toLowerCase(), mappedParticles);
|
||||
return this.savePlayerParticleGroup(player, particleGroup);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue