use of pl.themolka.arcade.map.queue.MapQueueFillEvent in project Arcade2 by ShootGame.
the class SimpleGameManager method fillDefaultQueue.
@Override
public void fillDefaultQueue() {
Node node = this.plugin.getSettings().getData().child("queue");
if (node == null) {
node = Node.empty();
}
for (Node mapNode : node.children("map")) {
String directory = mapNode.propertyValue("directory");
String mapName = mapNode.getValue();
OfflineMap map = null;
if (directory != null) {
map = this.plugin.getMaps().getContainer().getMapByDirectory(directory);
} else if (mapName != null) {
map = this.plugin.getMaps().getContainer().getMap(mapName);
}
if (map != null) {
queue.addMap(map);
}
}
this.postEvent(new MapQueueFillEvent(this.plugin, this.getQueue()));
}
Aggregations