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

Commit

Permalink
Add click prompts to item icon hover
Browse files Browse the repository at this point in the history
  • Loading branch information
WiIIiam278 committed Sep 5, 2022
1 parent 333b097 commit 57c4fab
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/main/java/net/william278/huskhomes/gui/SavedPositionMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,12 @@ private StaticGuiElement getPositionButton(@NotNull SavedPosition position) {
},
getLegacyText("[" + position.meta.name + "](#00fb9a)"),
getLegacyText("&7ℹ " + (position.meta.description.isBlank()
? getLocale("item_no_description").orElse("N/A")
: position.meta.description)));
? huskHomesAPI.getRawLocale("item_no_description").orElse("N/A")
: position.meta.description)),
" ",
getLegacyText("[Left Click:](#00fb9a) [Teleport](gray)"),
getLegacyText("[Right Click:](#00fb9a) [Edit](gray)"),
getLegacyText("[Shift Click:](#00fb9a) [Set icon](gray)"));
}

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

/**
* Set the material to use for a {@link SavedPosition} and update it in the database
*
* @param position The saved position
* @param material The {@link Material} to use
* @return A future that completes when the saved position has been updated
*/
private CompletableFuture<SavedPositionManager.SaveResult> setPositionMaterial(@NotNull SavedPosition position,
@NotNull Material material) {
final PositionMeta meta = position.meta;
Expand Down

0 comments on commit 57c4fab

Please sign in to comment.