mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2025-01-23 21:52:34 +01:00
Fix Lunar's problems with a quick collections shallow copy
This commit is contained in:
parent
01af19b5aa
commit
e03135a1ba
@ -22,6 +22,7 @@ import org.bukkit.entity.Entity;
|
|||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
public class PacketListenerSounds extends SimplePacketListenerAbstract {
|
public class PacketListenerSounds extends SimplePacketListenerAbstract {
|
||||||
@ -68,8 +69,8 @@ public class PacketListenerSounds extends SimplePacketListenerAbstract {
|
|||||||
Vector3i loc = soundEffect.getEffectPosition();
|
Vector3i loc = soundEffect.getEffectPosition();
|
||||||
|
|
||||||
loop:
|
loop:
|
||||||
for (Set<TargetedDisguise> disguises : DisguiseUtilities.getDisguises().values()) {
|
for (Set<TargetedDisguise> disguises : new ArrayList<>(DisguiseUtilities.getDisguises().values())) {
|
||||||
for (TargetedDisguise entityDisguise : disguises) {
|
for (TargetedDisguise entityDisguise : new ArrayList<>(disguises)) {
|
||||||
Entity entity = entityDisguise.getEntity();
|
Entity entity = entityDisguise.getEntity();
|
||||||
|
|
||||||
if (entity == null || entity.getWorld() != observer.getWorld()) {
|
if (entity == null || entity.getWorld() != observer.getWorld()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user