if (info == null) {
LOGGER.warning("no PresenceInfo for " + username);
return;
}
CellTransform desiredTransform = generateGoToPosition(info.getCellID());
// attach cover screen
String prop = System.getProperty("UserList.CoverScreen");
if(prop == null) {
prop="";
}
if(!prop.equalsIgnoreCase("off")) {
//if(coverScreenListener==null) {
if(!(ClientContextJME.getViewManager()
.getPrimaryViewCell().getWorldTransform().getTranslation(null).x==desiredTransform.getTranslation(null).x &&
ClientContextJME.getViewManager()
.getPrimaryViewCell().getWorldTransform().getTranslation(null).z==desiredTransform.getTranslation(null).z)) {
CoverScreenData csd = new CoverScreenData();
GoToCoverScreenInfo info1 = getGoToCoverScreenInfo();
if(info1!=null) {
csd.setBackgroundColor(info1.getBackgroundColor());
csd.setImageURL(info1.getImageURL());
csd.setMessage(info1.getMessage());
csd.setTextColor(info1.getTextColor());
}
//cell status change listener for removing cover screen
new CoverScreenListener(desiredTransform.getTranslation(null),csd);
}
//}
}
// get the current look direction of the avatar
// go to the new location
try {
ClientContextJME.getClientMain().gotoLocation(null,
desiredTransform.getTranslation(null),
desiredTransform.getRotation(null));
} catch (IOException ioe) {
LOGGER.log(Level.WARNING, "Error going to location", ioe);
}
}
}