Added a handy update for changing an occupant's name.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5575 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2008-12-05 01:31:30 +00:00
parent c116f93a7b
commit 0942566fc3
@@ -67,6 +67,22 @@ public class OccupantInfo extends SimpleStreamableObject
public boolean update (T info);
}
/** An update to dispatch when an occupant's name changes. */
public static class NameUpdate implements Updater<OccupantInfo>
{
public NameUpdate (Name name) {
_name = name;
}
public boolean update (OccupantInfo info) {
if (info.username.equals(_name)) {
return false;
}
info.username = _name;
return true;
}
protected Name _name;
}
/** The body object id of this occupant (and our entry key). */
public Integer bodyOid;