Index: applications/editors/josm/plugins/CommandLine/build.xml
===================================================================
--- applications/editors/josm/plugins/CommandLine/build.xml	(revision 32309)
+++ applications/editors/josm/plugins/CommandLine/build.xml	(revision 32329)
@@ -4,5 +4,5 @@
     <property name="commit.message" value="JOSM/CommandLine: fix exception after JOSM update"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="9170"/>
+    <property name="plugin.main.version" value="10279"/>
 
     <!-- Configure these properties (replace "..." accordingly).
Index: applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandLine.java
===================================================================
--- applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandLine.java	(revision 32309)
+++ applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandLine.java	(revision 32329)
@@ -369,8 +369,8 @@
                 break;
             case IMAGERYURL:
-                Layer layer = Main.map.mapView.getActiveLayer();
+                Layer layer = Main.getLayerManager().getActiveLayer();
                 if (layer != null) {
                     if (!(layer instanceof ImageryLayer)) {
-                        List<ImageryLayer> imageryLayers = Main.map.mapView.getLayersOfType(ImageryLayer.class);
+                        List<ImageryLayer> imageryLayers = Main.getLayerManager().getLayersOfType(ImageryLayer.class);
                         if (imageryLayers.size() == 1) {
                             layer = imageryLayers.get(0);
@@ -389,8 +389,8 @@
                 break;
             case IMAGERYOFFSET:
-                Layer olayer = Main.map.mapView.getActiveLayer();
+                Layer olayer = Main.getLayerManager().getActiveLayer();
                 if (olayer != null) {
                     if (!(olayer instanceof ImageryLayer)) {
-                        List<ImageryLayer> imageryLayers = Main.map.mapView.getLayersOfType(ImageryLayer.class);
+                        List<ImageryLayer> imageryLayers = Main.getLayerManager().getLayersOfType(ImageryLayer.class);
                         if (imageryLayers.size() == 1) {
                             olayer = imageryLayers.get(0);
@@ -597,5 +597,5 @@
                         GpxFilter gpxFilter = new GpxFilter();
                         gpxFilter.initBboxFilter(bbox);
-                        List<GpxLayer> gpxLayers = Main.map.mapView.getLayersOfType(GpxLayer.class);
+                        List<GpxLayer> gpxLayers = Main.getLayerManager().getLayersOfType(GpxLayer.class);
                         for (GpxLayer gpxLayer : gpxLayers) {
                             gpxFilter.addGpxData(gpxLayer.data);
