More stuff including a small amount of cleanup

This commit is contained in:
libraryaddict
2013-12-02 02:36:42 +13:00
parent 25a6e713af
commit a969811c64
9 changed files with 90 additions and 24 deletions

View File

@@ -46,6 +46,14 @@ public class DisguiseUtilities {
libsDisguises = disguises;
}
public static boolean isDisguiseInUse(Disguise disguise) {
if (getDisguises().containsKey(disguise.getEntity().getEntityId())
&& getDisguises().get(disguise.getEntity().getEntityId()).contains(disguise)) {
return true;
}
return false;
}
/**
* @param Resends
* the entity to all the watching players, which is where the magic begins
@@ -242,11 +250,12 @@ public class DisguiseUtilities {
return false;
}
@Deprecated
public static TargettedDisguise getDisguise(int entityId) {
TargettedDisguise toReturn = null;
if (getDisguises().containsKey(entityId)) {
for (TargettedDisguise disguise : getDisguises().get(entityId)) {
if (disguise.getTargetType() == TargetType.HIDE_FROM_THESE) {
if (disguise.getTargetType() == TargetType.HIDE_FROM_THESE && disguise.getObservers().isEmpty()) {
return disguise;
}
if (toReturn == null) {