Skip to content

Commit

Permalink
Add a component parse step to shop title
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Nov 25, 2023
1 parent 7073beb commit ffedf7c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions main/src/main/java/net/citizensnpcs/trait/ShopTrait.java
Expand Up @@ -712,7 +712,8 @@ public NPCShopSettings(ShopTrait trait, NPCShop shop) {
@Override
public void initialise(MenuContext ctx) {
this.ctx = ctx;
ctx.getSlot(2).setDescription("<f>Edit shop view permission<br>" + shop.getRequiredPermission());
ctx.getSlot(2)
.setDescription("<f>Edit permission required to view shop<br>" + shop.getRequiredPermission());
ctx.getSlot(6).setDescription("<f>Edit shop title<br>" + shop.title);
if (trait != null) {
ctx.getSlot(8).setDescription(
Expand Down Expand Up @@ -818,8 +819,8 @@ public void changePage(int newPage) {

@Override
public Inventory createInventory(String title) {
return Bukkit.createInventory(null, 45,
shop.title == null || shop.title.isEmpty() ? "Shop" : Placeholders.replace(shop.title, player));
return Bukkit.createInventory(null, 45, shop.title == null || shop.title.isEmpty() ? "Shop"
: Messaging.parseComponents(Placeholders.replace(shop.title, player)));
}

@Override
Expand Down

0 comments on commit ffedf7c

Please sign in to comment.