From 1d71852a81ef5ce9de87d138f32c3354af5d21f6 Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Sun, 25 Aug 2013 10:23:04 -0500 Subject: [PATCH] Fix exception on home markers with same faction name in different universe --- .../java/org/dynmap/factions/DynmapFactionsPlugin.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/dynmap/factions/DynmapFactionsPlugin.java b/src/main/java/org/dynmap/factions/DynmapFactionsPlugin.java index cb919c3..847d706 100644 --- a/src/main/java/org/dynmap/factions/DynmapFactionsPlugin.java +++ b/src/main/java/org/dynmap/factions/DynmapFactionsPlugin.java @@ -512,7 +512,7 @@ public class DynmapFactionsPlugin extends JavaPlugin { /* Now, add marker for home location */ PS homeloc = fact.getHome(); if(homeloc != null) { - String markid = factname + "__home"; + String markid = fc.getUniverse() + "_" + factname + "__home"; MarkerIcon ico = getMarkerIcon(factname, fact); if(ico != null) { Marker home = resmark.remove(markid); @@ -526,8 +526,10 @@ public class DynmapFactionsPlugin extends JavaPlugin { home.setLabel(lbl); /* Update label */ home.setMarkerIcon(ico); } - home.setDescription(formatInfoWindow(fact)); /* Set popup */ - newmark.put(markid, home); + if (home != null) { + home.setDescription(formatInfoWindow(fact)); /* Set popup */ + newmark.put(markid, home); + } } } }