Placeholder support in gui names

This commit is contained in:
Indyuce 2022-02-26 11:41:17 +01:00
parent 8253113d33
commit 454c74996b
2 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ public class CraftingStationPreview extends PluginInventory {
public Inventory getInventory() {
// Create inventory of a nice size (5x6)
Inventory inv = Bukkit.createInventory(this, 45, Message.RECIPE_PREVIEW.formatRaw(ChatColor.RESET));
Inventory inv = Bukkit.createInventory(this, 45, MythicLib.plugin.getPlaceholderParser().parse(getPlayer(), Message.RECIPE_PREVIEW.formatRaw(ChatColor.RESET)));
ingredients.clear();
// Include each ingredient

View File

@ -62,7 +62,7 @@ public class CraftingStationView extends PluginInventory {
@Override
public Inventory getInventory() {
Inventory inv = Bukkit.createInventory(this, layout.getSize(),
station.getName().replace("#page#", "" + page).replace("#max#", "" + station.getMaxPage()));
MythicLib.plugin.getPlaceholderParser().parse(getPlayer(), station.getName().replace("#page#", "" + page).replace("#max#", "" + station.getMaxPage())));
int min = (page - 1) * layout.getRecipeSlots().size(), max = page * layout.getRecipeSlots().size();
for (int j = min; j < max; j++) {
if (j >= recipes.size()) {