mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-04 14:38:53 +00:00
Fix wrong blue map icon path, missing public homes set
This commit is contained in:
1 parent
33cb19c088
commit
6903a705cd
2 files changed
+6
-6
No files matched your search
@@ -48,8 +48,8 @@ public class BlueMapHook extends MapHook {
|
|||||||
final MarkerSet warpsMarkers = MarkerSet.builder().label(getWarpsMarkerSetName()).build();
|
final MarkerSet warpsMarkers = MarkerSet.builder().label(getWarpsMarkerSetName()).build();
|
||||||
|
|
||||||
for (BlueMapMap map : mapWorld.getMaps()) {
|
for (BlueMapMap map : mapWorld.getMaps()) {
|
||||||
map.getMarkerSets().put(plugin.getKey(map.getId()).toString(), publicHomeMarkers);
|
map.getMarkerSets().put(getPublicHomesKey(), publicHomeMarkers);
|
||||||
map.getMarkerSets().put(plugin.getKey(map.getId()).toString(), warpsMarkers);
|
map.getMarkerSets().put(getWarpsKey(), warpsMarkers);
|
||||||
}
|
}
|
||||||
|
|
||||||
publicHomesMarkerSets.put(world.getName(), publicHomeMarkers);
|
publicHomesMarkerSets.put(world.getName(), publicHomeMarkers);
|
||||||
@@ -135,7 +135,7 @@ public class BlueMapHook extends MapHook {
|
|||||||
@Nullable
|
@Nullable
|
||||||
private String getIcon(@NotNull String iconName) {
|
private String getIcon(@NotNull String iconName) {
|
||||||
return BlueMapAPI.getInstance().map(api -> {
|
return BlueMapAPI.getInstance().map(api -> {
|
||||||
final Path icons = api.getWebApp().getWebRoot().resolve("icons");
|
final Path icons = api.getWebApp().getWebRoot().resolve("icons").resolve("huskhomes");
|
||||||
if (!icons.toFile().exists() && !icons.toFile().mkdirs()) {
|
if (!icons.toFile().exists() && !icons.toFile().mkdirs()) {
|
||||||
plugin.log(Level.WARNING, "Failed to create BlueMap icons directory");
|
plugin.log(Level.WARNING, "Failed to create BlueMap icons directory");
|
||||||
}
|
}
|
||||||
@@ -153,7 +153,7 @@ public class BlueMapHook extends MapHook {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return icons.resolve(iconFile.toPath()).toAbsolutePath().toString();
|
return "icons/huskhomes/" + iconFileName;
|
||||||
}).orElse(null);
|
}).orElse(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -95,12 +95,12 @@ public abstract class MapHook extends Hook {
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
protected final String getPublicHomesKey() {
|
protected final String getPublicHomesKey() {
|
||||||
return plugin.getKey(getName().toLowerCase(), "public_homes", "markers").toString();
|
return plugin.getKey(getName().toLowerCase(), "public_home_markers").toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
protected final String getWarpsKey() {
|
protected final String getWarpsKey() {
|
||||||
return plugin.getKey(getName().toLowerCase(), "warps", "markers").toString();
|
return plugin.getKey(getName().toLowerCase(), "warp_markers").toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|||||||
Reference in new issue
Block a user