Added a clearCustomAware method

This commit is contained in:
Obique PSWG
2016-05-25 20:33:39 -05:00
parent d33c8fe271
commit b7283cad0c
2 changed files with 13 additions and 0 deletions
+12
View File
@@ -799,6 +799,18 @@ public abstract class SWGObject extends BaselineObject implements Comparable<SWG
destroyObject(aware.getOwner());
}
public void clearCustomAware(boolean sendUpdates) {
synchronized (customAware) {
if (sendUpdates) {
for (SWGObject aware : customAware) {
if (aware.getOwner() != null)
destroyObject(aware.getOwner());
}
}
customAware.clear();
}
}
public Set<SWGObject> getObservers() {
Player owner = getOwner();
SWGObject parent = getParent();