Actually remove the unknown entity id. Not the known entity ids..
This commit is contained in:
parent
239bc6d645
commit
87c0cb4a78
@ -420,10 +420,11 @@ public abstract class Disguise {
|
||||
}
|
||||
} else {
|
||||
// Loop through the disguises because it could be used with a unknown entity id.
|
||||
Iterator<UUID> itel = disguises.keySet().iterator();
|
||||
HashMap<Integer, HashSet<TargetedDisguise>> future = DisguiseUtilities.getFutureDisguises();
|
||||
Iterator<Integer> itel = DisguiseUtilities.getFutureDisguises().keySet().iterator();
|
||||
while (itel.hasNext()) {
|
||||
UUID id = itel.next();
|
||||
if (disguises.get(id).remove(this) && disguises.get(id).isEmpty()) {
|
||||
int id = itel.next();
|
||||
if (future.get(id).remove(this) && future.get(id).isEmpty()) {
|
||||
itel.remove();
|
||||
}
|
||||
}
|
||||
|
@ -293,6 +293,10 @@ public class DisguiseUtilities {
|
||||
return new TargetedDisguise[0];
|
||||
}
|
||||
|
||||
public static HashMap<Integer, HashSet<TargetedDisguise>> getFutureDisguises() {
|
||||
return futureDisguises;
|
||||
}
|
||||
|
||||
public static Object getGameProfile(String playerName) {
|
||||
return gameProfiles.get(playerName);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user