mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-09-12 01:48:07 +02:00
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();
|
||||
}
|
||||
}
|
||||
|
@ -263,7 +263,7 @@ public class DisguiseUtilities {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public static TargetedDisguise getDisguise(Player observer, Entity entity) {
|
||||
UUID entityId = entity.getUniqueId();
|
||||
if (futureDisguises.containsKey(entity.getEntityId())) {
|
||||
@ -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