Skip to content

Commit

Permalink
Fixes 345 (#346)
Browse files Browse the repository at this point in the history
Use the object's name if it already has a display name
  • Loading branch information
tastybento authored Jun 15, 2024
1 parent 7fb20e7 commit e424560
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/world/bentobox/challenges/utils/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,13 @@ public static String prettifyObject(@Nullable ItemStack object, User user)
{
return "";
}
// Return the display name if it already has one
if (object.hasItemMeta()) {
ItemMeta im = object.getItemMeta();
if (im.hasDisplayName()) {
return im.getDisplayName();
}
}

// Find addon structure with:
// [addon]:
Expand Down

0 comments on commit e424560

Please sign in to comment.