Rewrote getOccupantInfo(Name) to take advantage of a method that now exists
in PlaceObject. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3951 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -108,19 +108,7 @@ public class OccupantDirector extends BasicDirector
|
|||||||
*/
|
*/
|
||||||
public OccupantInfo getOccupantInfo (Name username)
|
public OccupantInfo getOccupantInfo (Name username)
|
||||||
{
|
{
|
||||||
// make sure we're somewhere
|
return (_place == null) ? null : _place.getOccupantInfo(username);
|
||||||
if (_place == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
Iterator iter = _place.occupantInfo.iterator();
|
|
||||||
while (iter.hasNext()) {
|
|
||||||
OccupantInfo info = (OccupantInfo)iter.next();
|
|
||||||
if (info.username.equals(username)) {
|
|
||||||
return info;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// documentation inherited from interface
|
// documentation inherited from interface
|
||||||
|
|||||||
Reference in New Issue
Block a user