mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
Add support for BlueMap
This commit is contained in:
1 parent
36703c55f5
commit
25d90530d3
13 files changed
+148
-8
No files matched your search
@@ -13,6 +13,7 @@ import net.william278.huskhomes.config.Spawn;
|
||||
import net.william278.huskhomes.database.Database;
|
||||
import net.william278.huskhomes.database.MySqlDatabase;
|
||||
import net.william278.huskhomes.database.SqLiteDatabase;
|
||||
import net.william278.huskhomes.hook.BlueMapHook;
|
||||
import net.william278.huskhomes.hook.DynMapHook;
|
||||
import net.william278.huskhomes.hook.PluginHook;
|
||||
import net.william278.huskhomes.hook.VaultEconomyHook;
|
||||
@@ -168,6 +169,11 @@ public class BukkitHuskHomes extends JavaPlugin implements HuskHomes {
|
||||
pluginHooks.add(new DynMapHook(this, dynmapPlugin));
|
||||
}
|
||||
}
|
||||
case BLUEMAP -> {
|
||||
if (Bukkit.getPluginManager().getPlugin("BlueMap") != null) {
|
||||
pluginHooks.add(new BlueMapHook(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
getMapHook().ifPresent(mapHook -> savedPositionManager.setMapHook(mapHook));
|
||||
}
|
||||
|
||||
@@ -24,9 +24,6 @@ import java.util.logging.Level;
|
||||
*/
|
||||
public class DynMapHook extends MapHook {
|
||||
|
||||
private static final String WARP_MARKER_IMAGE_NAME = "warp";
|
||||
private static final String PUBLIC_HOME_MARKER_IMAGE_NAME = "public-home";
|
||||
|
||||
@NotNull
|
||||
private final DynmapAPI dynmapAPI;
|
||||
|
||||
@@ -45,7 +42,7 @@ public class DynMapHook extends MapHook {
|
||||
.findFirst()
|
||||
.ifPresent(markerIcon -> markerAPI.getMarkerIcons().remove(markerIcon));
|
||||
markerAPI.createMarkerIcon(PUBLIC_HOME_MARKER_IMAGE_NAME, "Public Home",
|
||||
((BukkitHuskHomes) plugin).getResource("markers/" + PUBLIC_HOME_MARKER_IMAGE_NAME + ".png"));
|
||||
((BukkitHuskHomes) plugin).getResource("markers/16x/" + PUBLIC_HOME_MARKER_IMAGE_NAME + ".png"));
|
||||
markerAPI.createMarkerSet(PUBLIC_HOMES_MARKER_SET_ID,
|
||||
"Public Homes", dynmapAPI.getMarkerAPI().getMarkerIcons(), false);
|
||||
}
|
||||
@@ -55,7 +52,7 @@ public class DynMapHook extends MapHook {
|
||||
.findFirst()
|
||||
.ifPresent(markerIcon -> markerAPI.getMarkerIcons().remove(markerIcon));
|
||||
markerAPI.createMarkerIcon(WARP_MARKER_IMAGE_NAME, "Warp",
|
||||
((BukkitHuskHomes) plugin).getResource("markers/" + WARP_MARKER_IMAGE_NAME + ".png"));
|
||||
((BukkitHuskHomes) plugin).getResource("markers/16x/" + WARP_MARKER_IMAGE_NAME + ".png"));
|
||||
markerAPI.createMarkerSet(WARPS_MARKER_SET_ID,
|
||||
"Warps", dynmapAPI.getMarkerAPI().getMarkerIcons(), false);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user