/** * Tries to create a portal link with another world currently available. * * @see #tryCreatePortalLink(WorldConfig, WorldConfig) */ public void tryCreatePortalLink() { // Try to detect a possible portal link between worlds for (WorldConfig otherConfig : WorldConfig.all()) { if (otherConfig != this) { WorldConfig.tryCreatePortalLink(this, otherConfig); } } }
public static Position[] getSpawnPoints() { Collection<WorldConfig> all = WorldConfig.all(); Position[] pos = new Position[all.size()]; int i = 0; for (WorldConfig wc : all) { pos[i] = wc.spawnPoint; i++; } return pos; }