mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
fix: inconsistencies with Pl3xMap loading, close #570
This commit is contained in:
4 files changed
+39
-10
No files matched your search
@@ -176,37 +176,43 @@ public abstract class MapHook extends Hook {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected static DynmapHook.MarkerInformationPopup warp(@NotNull Warp warp, @NotNull String thumbnail) {
|
||||
return MarkerInformationPopup.create(warp.getName())
|
||||
protected static MarkerInformationPopup warp(@NotNull Warp warp, @NotNull String thumbnail) {
|
||||
final MarkerInformationPopup popup = MarkerInformationPopup.create(warp.getName())
|
||||
.thumbnail(thumbnail)
|
||||
.field("Description", warp.getMeta().getDescription())
|
||||
.field("Location", warp.toString())
|
||||
.field("Command", "/warp " + warp.getSafeIdentifier());
|
||||
if (!warp.getMeta().getDescription().isBlank()) {
|
||||
popup.field("Description", warp.getMeta().getDescription());
|
||||
}
|
||||
return popup;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected static DynmapHook.MarkerInformationPopup publicHome(@NotNull Home home, @NotNull String thumbnail) {
|
||||
return MarkerInformationPopup.create(home.getName())
|
||||
protected static MarkerInformationPopup publicHome(@NotNull Home home, @NotNull String thumbnail) {
|
||||
final MarkerInformationPopup popup = MarkerInformationPopup.create(home.getName())
|
||||
.thumbnail(thumbnail)
|
||||
.field("Owner", home.getOwner().getUsername())
|
||||
.field("Description", home.getMeta().getDescription())
|
||||
.field("Location", home.toString())
|
||||
.field("Command", "/phome " + home.getSafeIdentifier());
|
||||
if (!home.getMeta().getDescription().isBlank()) {
|
||||
popup.field("Description", home.getMeta().getDescription());
|
||||
}
|
||||
return popup;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected static DynmapHook.MarkerInformationPopup create(@NotNull String title) {
|
||||
protected static MarkerInformationPopup create(@NotNull String title) {
|
||||
return new MarkerInformationPopup(title);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected DynmapHook.MarkerInformationPopup thumbnail(@NotNull String thumbnail) {
|
||||
protected MarkerInformationPopup thumbnail(@NotNull String thumbnail) {
|
||||
this.thumbnail = thumbnail;
|
||||
return this;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected DynmapHook.MarkerInformationPopup field(@NotNull String key, @NotNull String value) {
|
||||
protected MarkerInformationPopup field(@NotNull String key, @NotNull String value) {
|
||||
fields.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user