use of pl.themolka.arcade.map.MapContainerFillEvent 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.");
}
Aggregations