Search in sources :

Example 1 with MapContainerLoader

use of pl.themolka.arcade.map.MapContainerLoader in project Arcade2 by ShootGame.

the class ArcadePlugin method loadMaps.

private void loadMaps() {
    this.maps = new MapManager(this);
    this.maps.setWorldContainer(this.settings.getWorldContainer().toFile());
    MapContainerFillEvent fillEvent = new MapContainerFillEvent(this);
    this.getEventBus().publish(fillEvent);
    MapManager maps = this.getMaps();
    for (MapContainerLoader loader : fillEvent.getMapLoaderList()) {
        maps.addMapLoader(loader);
    }
    maps.getContainer().register(maps.getLoaderListContainer());
    this.getLogger().info("Loaded " + maps.getContainer().getMaps().size() + " map(s) into the plugin.");
}
Also used : MapContainerLoader(pl.themolka.arcade.map.MapContainerLoader) MapContainerFillEvent(pl.themolka.arcade.map.MapContainerFillEvent) MapManager(pl.themolka.arcade.map.MapManager)

Aggregations

MapContainerFillEvent (pl.themolka.arcade.map.MapContainerFillEvent)1 MapContainerLoader (pl.themolka.arcade.map.MapContainerLoader)1 MapManager (pl.themolka.arcade.map.MapManager)1