Tabnine Logo
MapLoader.getMapId
Code IndexAdd Tabnine to your IDE (free)

How to use
getMapId
method
in
jsettlers.logic.map.loading.MapLoader

Best Java code snippets using jsettlers.logic.map.loading.MapLoader.getMapId (Showing top 9 results out of 315)

origin: jsettlers/settlers-remake

  @Override
  public String getMapId() {
    return mapLoader.getMapId();
  }
}
origin: jsettlers/settlers-remake

/**
 * Order the maps
 */
@Override
protected void sortMaps() {
  LastUsedHandler lastUsed = new LastUsedHandler();
  List<MapLoader> mapsCopy = maps;
  maps = new ArrayList<>();
  for (String id : lastUsed.getLastUsed()) {
    for (MapLoader m : mapsCopy) {
      if (m.getMapId() != null && m.getMapId().equals(id)) {
        maps.add(m);
        break;
      }
    }
  }
}
origin: jsettlers/settlers-remake

@Override
public MapLoader getMap(ReplayStartInformation replayStartInformation) throws MapLoadException {
  if (map.getMapId().equals(replayStartInformation.getMapId())) {
    return map;
  }
  throw new MapLoadException("No file found for " + replayStartInformation);
}
origin: jsettlers/settlers-remake

/**
 * Checks if a map matches the search criteria
 * 
 * @param m
 *            Map
 * @param search
 *            Criteria
 * @return true if yes, false if no
 */
private boolean matchesSearch(MapLoader m, String search) {
  if (m.getMapName().toLowerCase(Locale.ENGLISH).contains(search)) {
    return true;
  }
  if (m.getDescription().toLowerCase(Locale.ENGLISH).contains(search)) {
    return true;
  }
  return m.getMapId().toLowerCase(Locale.ENGLISH).contains(search);
}
origin: jsettlers/settlers-remake

/**
 * Checks if a map matches the search criteria
 *
 * @param m
 *            Map
 * @param search
 *            Criteria
 * @return true if yes, false if no
 */
private boolean matchesSearch(MapLoader m, String search) {
  if (search.isEmpty()) {
    return true;
  }
  if (m.getMapName().toLowerCase(Locale.ENGLISH).contains(search)) {
    return true;
  }
  if (m.getDescription().toLowerCase(Locale.ENGLISH).contains(search)) {
    return true;
  }
  return m.getMapId().toLowerCase(Locale.ENGLISH).contains(search);
}
origin: jsettlers/settlers-remake

/**
 * Gives the {@link MapLoader} for the map with the given id.
 * 
 * @param id
 *            The id of the map to be found.
 * @return Returns the corresponding {@link MapLoader}<br>
 *         or null if no map with the given id has been found.
 */
public MapLoader getMapById(String id) {
  ArrayList<MapLoader> maps = new ArrayList<>();
  maps.addAll(getFreshMaps().getItems());
  maps.addAll(getSavedMaps().getItems());
  for (MapLoader curr : maps) {
    if (curr.getMapId().equals(id)) {
      return curr;
    }
  }
  return null;
}
origin: jsettlers/settlers-remake

private static void createReplayOfRemainingTasks(MapLoader newSavegame, ReplayStartInformation replayStartInformation, String newReplayFile, IGameClock gameClock) throws IOException {
  System.out.println("Creating new jsettlers.integration.replay file (" + newReplayFile + ")...");
  ReplayStartInformation replayInfo = new ReplayStartInformation(0, newSavegame.getMapName(), newSavegame.getMapId(), replayStartInformation.getPlayerId(),
    replayStartInformation.getPlayerSettings()
  );
  DataOutputStream dos = new DataOutputStream(ResourceManager.writeUserFile(newReplayFile));
  replayInfo.serialize(dos);
  gameClock.saveRemainingTasks(dos);
  dos.close();
  System.out.println("New jsettlers.integration.replay file successfully created!");
}
origin: jsettlers/settlers-remake

lbMapId.setText(date + " / " + value.getMapId());
lbPlayerCount.setText("Player: " + value.getMinPlayers() + " - " + value.getMaxPlayers());
origin: jsettlers/settlers-remake

mapIdLabel.setText(date + " / " + value.getMapId());
playerCountLabel.setText("Player: " + value.getMinPlayers() + " - " + value.getMaxPlayers());
jsettlers.logic.map.loadingMapLoadergetMapId

Popular methods of MapLoader

  • getMaxPlayers
  • getCreationDate
  • getFileHeader
  • getLoaderForListedMap
  • getMapData
    Gets the map data for this loader, if the data is available.
  • getMapName
  • getDescription
  • getImage
  • getListedMap
  • getMinPlayers
  • loadMainGrid
  • checkExtention
  • loadMainGrid,
  • checkExtention,
  • getPlayers,
  • isExtensionKnown

Popular in Java

  • Updating database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • getSharedPreferences (Context)
  • getApplicationContext (Context)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Kernel (java.awt.image)
  • Permission (java.security)
    Legacy security code; do not use.
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now