From 9d6768d53e4e3911c7ba2f5abbbb4a9772d46ee1 Mon Sep 17 00:00:00 2001 From: zml Date: Mon, 3 Nov 2014 11:40:29 -0800 Subject: [PATCH] Fix UUID convert command. Closes #1692 --- .../tehkode/permissions/bukkit/commands/UtilityCommands.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/ru/tehkode/permissions/bukkit/commands/UtilityCommands.java b/src/main/java/ru/tehkode/permissions/bukkit/commands/UtilityCommands.java index a5d9d9729..027ab8437 100644 --- a/src/main/java/ru/tehkode/permissions/bukkit/commands/UtilityCommands.java +++ b/src/main/java/ru/tehkode/permissions/bukkit/commands/UtilityCommands.java @@ -38,6 +38,7 @@ import java.io.File; import java.util.Collection; +import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; @@ -165,8 +166,8 @@ public void convertUUID(final PermissionsEx plugin, final CommandSender sender, return; } final ProfileRepository repo = new HttpProfileRepository("minecraft"); - final Collection userIdentifiers = backend.getUserIdentifiers(); - for (Iterator it = backend.getUserIdentifiers().iterator(); it.hasNext(); ) { + final Collection userIdentifiers = new HashSet<>(backend.getUserIdentifiers()); + for (Iterator it = userIdentifiers.iterator(); it.hasNext(); ) { try { UUID.fromString(it.next()); it.remove();