Skip to content
This repository was archived by the owner on Jan 25, 2024. It is now read-only.

Commit 57c4fab

Browse files
committed
Add click prompts to item icon hover
1 parent 333b097 commit 57c4fab

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/main/java/net/william278/huskhomes/gui/SavedPositionMenu.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,12 @@ private StaticGuiElement getPositionButton(@NotNull SavedPosition position) {
110110
},
111111
getLegacyText("[" + position.meta.name + "](#00fb9a)"),
112112
getLegacyText("&7ℹ " + (position.meta.description.isBlank()
113-
? getLocale("item_no_description").orElse("N/A")
114-
: position.meta.description)));
113+
? huskHomesAPI.getRawLocale("item_no_description").orElse("N/A")
114+
: position.meta.description)),
115+
" ",
116+
getLegacyText("[Left Click:](#00fb9a) [Teleport](gray)"),
117+
getLegacyText("[Right Click:](#00fb9a) [Edit](gray)"),
118+
getLegacyText("[Shift Click:](#00fb9a) [Set icon](gray)"));
115119
}
116120

117121
/**
@@ -127,6 +131,13 @@ private Optional<Material> getPositionMaterial(@NotNull SavedPosition position)
127131
return Optional.empty();
128132
}
129133

134+
/**
135+
* Set the material to use for a {@link SavedPosition} and update it in the database
136+
*
137+
* @param position The saved position
138+
* @param material The {@link Material} to use
139+
* @return A future that completes when the saved position has been updated
140+
*/
130141
private CompletableFuture<SavedPositionManager.SaveResult> setPositionMaterial(@NotNull SavedPosition position,
131142
@NotNull Material material) {
132143
final PositionMeta meta = position.meta;

0 commit comments

Comments
 (0)