mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-12-16 15:38:14 +01:00
Tiny tiny code cleanup
This commit is contained in:
parent
38ee3dc983
commit
ad109b0cda
@ -119,7 +119,7 @@ public class DisguiseAPI {
|
|||||||
public static Disguise getDisguise(Entity disguised) {
|
public static Disguise getDisguise(Entity disguised) {
|
||||||
if (disguised == null)
|
if (disguised == null)
|
||||||
return null;
|
return null;
|
||||||
return DisguiseUtilities.getDisguise(disguised.getEntityId());
|
return DisguiseUtilities.getMainDisguise(disguised.getEntityId());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -161,18 +161,14 @@ public class DisguiseUtilities {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
public static TargetedDisguise getMainDisguise(int entityId) {
|
||||||
public static TargetedDisguise getDisguise(int entityId) {
|
|
||||||
TargetedDisguise toReturn = null;
|
TargetedDisguise toReturn = null;
|
||||||
if (getDisguises().containsKey(entityId)) {
|
if (getDisguises().containsKey(entityId)) {
|
||||||
for (TargetedDisguise disguise : getDisguises().get(entityId)) {
|
for (TargetedDisguise disguise : getDisguises().get(entityId)) {
|
||||||
if (disguise.getDisguiseTarget() == TargetType.SHOW_TO_EVERYONE_BUT_THESE_PLAYERS
|
if (disguise.getDisguiseTarget() == TargetType.SHOW_TO_EVERYONE_BUT_THESE_PLAYERS) {
|
||||||
&& disguise.getObservers().isEmpty()) {
|
|
||||||
return disguise;
|
return disguise;
|
||||||
}
|
}
|
||||||
if (toReturn == null) {
|
toReturn = disguise;
|
||||||
toReturn = disguise;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return toReturn;
|
return toReturn;
|
||||||
|
Loading…
Reference in New Issue
Block a user