Fix exception on home markers with same faction name in different universe
This commit is contained in:
parent
f91fab7bd3
commit
1d71852a81
@ -512,7 +512,7 @@ public class DynmapFactionsPlugin extends JavaPlugin {
|
|||||||
/* Now, add marker for home location */
|
/* Now, add marker for home location */
|
||||||
PS homeloc = fact.getHome();
|
PS homeloc = fact.getHome();
|
||||||
if(homeloc != null) {
|
if(homeloc != null) {
|
||||||
String markid = factname + "__home";
|
String markid = fc.getUniverse() + "_" + factname + "__home";
|
||||||
MarkerIcon ico = getMarkerIcon(factname, fact);
|
MarkerIcon ico = getMarkerIcon(factname, fact);
|
||||||
if(ico != null) {
|
if(ico != null) {
|
||||||
Marker home = resmark.remove(markid);
|
Marker home = resmark.remove(markid);
|
||||||
@ -526,8 +526,10 @@ public class DynmapFactionsPlugin extends JavaPlugin {
|
|||||||
home.setLabel(lbl); /* Update label */
|
home.setLabel(lbl); /* Update label */
|
||||||
home.setMarkerIcon(ico);
|
home.setMarkerIcon(ico);
|
||||||
}
|
}
|
||||||
home.setDescription(formatInfoWindow(fact)); /* Set popup */
|
if (home != null) {
|
||||||
newmark.put(markid, home);
|
home.setDescription(formatInfoWindow(fact)); /* Set popup */
|
||||||
|
newmark.put(markid, home);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user