mirror of
https://github.com/TotalFreedomMC/PlayerParticles.git
synced 2024-12-29 02:44:17 +00:00
Fixed ParticlePair owner not getting set with /pp group load
This commit is contained in:
parent
5288d669e4
commit
df7162637c
1 changed files with 5 additions and 4 deletions
|
@ -16,7 +16,6 @@ import java.util.Comparator;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.StringUtil;
|
||||
|
||||
public class GroupCommandModule implements CommandModule {
|
||||
|
@ -160,8 +159,11 @@ public class GroupCommandModule implements CommandModule {
|
|||
// Empty out the active group and fill it with clones from the target group
|
||||
ParticleGroup activeGroup = pplayer.getActiveParticleGroup();
|
||||
activeGroup.getParticles().clear();
|
||||
for (ParticlePair particle : group.getParticles().values())
|
||||
activeGroup.getParticles().put(particle.getId(), particle.clone());
|
||||
for (ParticlePair particle : group.getParticles().values()) {
|
||||
ParticlePair clonedParticle = particle.clone();
|
||||
clonedParticle.setOwner(pplayer);
|
||||
activeGroup.getParticles().put(clonedParticle.getId(), clonedParticle);
|
||||
}
|
||||
|
||||
// Update group and notify player
|
||||
PlayerParticlesAPI.getInstance().savePlayerParticleGroup(pplayer.getPlayer(), activeGroup);
|
||||
|
@ -262,7 +264,6 @@ public class GroupCommandModule implements CommandModule {
|
|||
List<ParticleGroup> groups = new ArrayList<>(pplayer.getParticleGroups().values());
|
||||
groups.sort(Comparator.comparing(ParticleGroup::getName));
|
||||
|
||||
Player player = pplayer.getPlayer();
|
||||
StringBuilder groupsList = new StringBuilder();
|
||||
for (ParticleGroup group : groups)
|
||||
if (!group.getName().equals(ParticleGroup.DEFAULT_NAME))
|
||||
|
|
Loading…
Reference in a new issue