mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-24 03:05:28 +01:00
Add fix for changing marker set for areas, circles, lines
This commit is contained in:
parent
bc51a14006
commit
bf67de2ab6
@ -2323,7 +2323,7 @@ public class MarkerAPIImpl implements MarkerAPI, Event.Listener<DynmapWorld> {
|
||||
}
|
||||
|
||||
private static boolean processUpdateArea(DynmapCore plugin, DynmapCommandSender sender, String cmd, String commandLabel, String[] args) {
|
||||
String id, label, setid, newlabel, markup;
|
||||
String id, label, setid, newlabel, markup, newset;
|
||||
if(args.length > 1) {
|
||||
/* Parse arguements */
|
||||
Map<String,String> parms = parseArgs(args, sender);
|
||||
@ -2366,6 +2366,15 @@ public class MarkerAPIImpl implements MarkerAPI, Event.Listener<DynmapWorld> {
|
||||
else if(markup != null) {
|
||||
marker.setLabel(marker.getLabel(), "true".equals(markup));
|
||||
}
|
||||
newset = parms.get(ARG_NEWSET);
|
||||
if (newset != null) {
|
||||
MarkerSet ms = api.getMarkerSet(newset);
|
||||
if(ms == null) {
|
||||
sender.sendMessage("Error: invalid new marker set - " + newset);
|
||||
return true;
|
||||
}
|
||||
marker.setMarkerSet(ms);
|
||||
}
|
||||
if(!processAreaArgs(sender,marker, parms))
|
||||
return true;
|
||||
sender.sendMessage("Updated area id:" + marker.getMarkerID() + " (" + marker.getLabel() + ")");
|
||||
@ -2524,7 +2533,7 @@ public class MarkerAPIImpl implements MarkerAPI, Event.Listener<DynmapWorld> {
|
||||
return true;
|
||||
}
|
||||
private static boolean processUpdateLine(DynmapCore plugin, DynmapCommandSender sender, String cmd, String commandLabel, String[] args) {
|
||||
String id, setid, label, newlabel, markup;
|
||||
String id, setid, label, newlabel, markup, newset;
|
||||
if(args.length > 1) {
|
||||
/* Parse arguements */
|
||||
Map<String,String> parms = parseArgs(args, sender);
|
||||
@ -2567,6 +2576,15 @@ public class MarkerAPIImpl implements MarkerAPI, Event.Listener<DynmapWorld> {
|
||||
else if(markup != null) {
|
||||
marker.setLabel(marker.getLabel(), "true".equals(markup));
|
||||
}
|
||||
newset = parms.get(ARG_NEWSET);
|
||||
if (newset != null) {
|
||||
MarkerSet ms = api.getMarkerSet(newset);
|
||||
if(ms == null) {
|
||||
sender.sendMessage("Error: invalid new marker set - " + newset);
|
||||
return true;
|
||||
}
|
||||
marker.setMarkerSet(ms);
|
||||
}
|
||||
if(!processPolyArgs(sender,marker, parms))
|
||||
return true;
|
||||
sender.sendMessage("Updated line id:" + marker.getMarkerID() + " (" + marker.getLabel() + ")");
|
||||
@ -2742,7 +2760,7 @@ public class MarkerAPIImpl implements MarkerAPI, Event.Listener<DynmapWorld> {
|
||||
return true;
|
||||
}
|
||||
private static boolean processUpdateCircle(DynmapCore plugin, DynmapCommandSender sender, String cmd, String commandLabel, String[] args) {
|
||||
String id, setid, label, newlabel, markup;
|
||||
String id, setid, label, newlabel, markup, newset;
|
||||
if(args.length > 1) {
|
||||
/* Parse arguements */
|
||||
Map<String,String> parms = parseArgs(args, sender);
|
||||
@ -2785,6 +2803,15 @@ public class MarkerAPIImpl implements MarkerAPI, Event.Listener<DynmapWorld> {
|
||||
else if(markup != null) {
|
||||
marker.setLabel(marker.getLabel(), "true".equals(markup));
|
||||
}
|
||||
newset = parms.get(ARG_NEWSET);
|
||||
if (newset != null) {
|
||||
MarkerSet ms = api.getMarkerSet(newset);
|
||||
if(ms == null) {
|
||||
sender.sendMessage("Error: invalid new marker set - " + newset);
|
||||
return true;
|
||||
}
|
||||
marker.setMarkerSet(ms);
|
||||
}
|
||||
if(!processCircleArgs(sender,marker, parms))
|
||||
return true;
|
||||
sender.sendMessage("Updated circle id:" + marker.getMarkerID() + " (" + marker.getLabel() + ")");
|
||||
|
Loading…
Reference in New Issue
Block a user