{
String var = player.getVar("backCoords");
if ((var != null) && !var.isEmpty())
{
Location loc = Location.parseLoc(var);
DomainArea domain = MapRegionManager.getInstance().getRegionData(DomainArea.class, loc);
if (domain != null)
{
return ResidenceHolder.getInstance().getResidence(Castle.class, domain.getId());
}
}
return super.getCastle();
}
return super.getCastle(player);