Avoids some potential NullPointerExceptions related to dynmap integration
Some checks failed
EpicKnarvik97/Stargate/pipeline/head There was a failure building this commit
Some checks failed
EpicKnarvik97/Stargate/pipeline/head There was a failure building this commit
This commit is contained in:
parent
ce5f3ef52f
commit
524130c4e0
@ -34,7 +34,9 @@ public final class DynmapManager {
|
|||||||
portalIcon = null;
|
portalIcon = null;
|
||||||
} else {
|
} else {
|
||||||
markerSet = dynmapAPI.getMarkerAPI().createMarkerSet("stargate", "Stargate", null, false);
|
markerSet = dynmapAPI.getMarkerAPI().createMarkerSet("stargate", "Stargate", null, false);
|
||||||
|
if (markerSet != null) {
|
||||||
markerSet.setHideByDefault(Stargate.getStargateConfig().hideDynmapIcons());
|
markerSet.setHideByDefault(Stargate.getStargateConfig().hideDynmapIcons());
|
||||||
|
}
|
||||||
portalIcon = dynmapAPI.getMarkerAPI().getMarkerIcon("portal");
|
portalIcon = dynmapAPI.getMarkerAPI().getMarkerIcon("portal");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -99,8 +101,10 @@ public final class DynmapManager {
|
|||||||
portal.getDestinationName(), portal.getOwner().getName());
|
portal.getDestinationName(), portal.getOwner().getName());
|
||||||
marker.setDescription(markerDescription);
|
marker.setDescription(markerDescription);
|
||||||
marker.setLabel(portal.getName(), true);
|
marker.setLabel(portal.getName(), true);
|
||||||
|
if (portalIcon != null) {
|
||||||
marker.setMarkerIcon(portalIcon);
|
marker.setMarkerIcon(portalIcon);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes the portal marker for the given portal
|
* Removes the portal marker for the given portal
|
||||||
|
Loading…
x
Reference in New Issue
Block a user