{
final HashMap<String, Integer> map = new HashMap<String, Integer>();
for (Integer id : ids)
{
CelestialBody celestialBody = getReachableCelestialBodiesForDimensionID(id);
if (id > 0 && celestialBody == null)
{
celestialBody = GalacticraftCore.satelliteSpaceStation;
}
WorldProvider provider = WorldUtil.getProviderForDimension(id);
if (celestialBody != null && provider != null)
{
if (provider instanceof IGalacticraftWorldProvider && !(provider instanceof IOrbitDimension) || provider.dimensionId == 0)
{
map.put(celestialBody.getName(), provider.dimensionId);
}
else if (playerBase != null && provider instanceof IOrbitDimension)
{
final SpaceStationWorldData data = SpaceStationWorldData.getStationData(playerBase.worldObj, id, playerBase);
if (!ConfigManagerCore.spaceStationsRequirePermission || data.getAllowedPlayers().contains(playerBase.getGameProfile().getName()) || VersionUtil.isPlayerOpped(playerBase))
{
map.put(celestialBody.getName() + "$" + data.getOwner() + "$" + data.getSpaceStationName() + "$" + provider.dimensionId, provider.dimensionId);
}
}
}
}