congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
MapLoader.getLoaderForListedMap
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: jsettlers/settlers-remake

@Override
public synchronized void foundMap(IListedMap map) {
  MapLoader loader;
  try {
    loader = MapLoader.getLoaderForListedMap(map);
  } catch (Exception e) {
    System.err.println("Cought exception while loading header for " + map.getFileName());
    e.printStackTrace();
    return;
  }
  MapFileHeader mapHead = loader.getFileHeader();
  // - if the map can't be load (e.g. caused by wrong format) the mapHead gets NULL! -> hide/ignore this map from user
  if (mapHead != null) {
    MapType type = loader.getFileHeader().getType();
    if ((type == MapType.SAVED_SINGLE)) {
      savedMaps.add((RemakeMapLoader) loader);
    } else {
      freshMaps.add(loader);
    }
  }
}
origin: jsettlers/settlers-remake

  /**
   * Main entry point
   * 
   * @param args
   */
  public static void main(String[] args) {

    try {
      ExceptionHandler.setupDefaultExceptionHandler();

      final File file = new File(args[0]);

      JSettlersGame game = new JSettlersGame(MapLoader.getLoaderForListedMap(new DirectoryMapLister.ListedMapFile(file)),
          123456L, (byte) 0, null);
      game.start();

    } catch (Exception e) {
      ExceptionHandler.displayError(e, "Error launching game");
    }

  }
}
origin: jsettlers/settlers-remake

IStartingGame game;
if (loadableReplayFile == null) {
  MapLoader mapLoader = MapLoader.getLoaderForListedMap(new DirectoryMapLister.ListedMapFile(new File(mapFile)));
  if (mapLoader.getFileHeader().getType() == MapFileHeader.MapType.NORMAL) {
    byte playerId = 0;
jsettlers.logic.map.loadingMapLoadergetLoaderForListedMap

Popular methods of MapLoader

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

Popular in Java

  • Creating JSON documents from java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setContentView (Activity)
  • scheduleAtFixedRate (Timer)
  • Path (java.nio.file)
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top plugins for WebStorm
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