Checks markerAPIInitialized during dynmap initialization

This commit is contained in:
2024-01-20 16:11:07 +01:00
parent d975666154
commit a4d4864bdd
2 changed files with 3 additions and 1 deletions

View File

@@ -30,7 +30,7 @@ public final class DynmapManager {
* @throws NullPointerException <p>If dynmap has an invalid state</p> * @throws NullPointerException <p>If dynmap has an invalid state</p>
*/ */
public static void initialize(DynmapAPI dynmapAPI) throws NullPointerException { public static void initialize(DynmapAPI dynmapAPI) throws NullPointerException {
if (dynmapAPI == null || dynmapAPI.getMarkerAPI() == null) { if (dynmapAPI == null || !dynmapAPI.markerAPIInitialized() || dynmapAPI.getMarkerAPI() == null) {
markerSet = null; markerSet = null;
portalIcon = null; portalIcon = null;
} else { } else {

View File

@@ -106,6 +106,8 @@ public final class StargateConfig {
//Set up vault economy if vault has been loaded //Set up vault economy if vault has been loaded
setupVaultEconomy(); setupVaultEconomy();
//Set up dynmap
DynmapAPI dynmapAPI = (DynmapAPI) Bukkit.getPluginManager().getPlugin("dynmap"); DynmapAPI dynmapAPI = (DynmapAPI) Bukkit.getPluginManager().getPlugin("dynmap");
if (dynmapAPI != null) { if (dynmapAPI != null) {
try { try {