support for color codes in gui names

This commit is contained in:
Indyuce 2019-08-31 15:04:53 +02:00
parent dbf5dea4dd
commit e3db48d64a

View File

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.inventory.Inventory;
@ -53,7 +54,7 @@ public abstract class GeneratedInventory extends PluginInventory {
@Override
public Inventory getInventory() {
Inventory inv = Bukkit.createInventory(this, editable.getSlots(), calculateName());
Inventory inv = Bukkit.createInventory(this, editable.getSlots(), ChatColor.translateAlternateColorCodes('&', calculateName()));
for (InventoryItem item : editable.getItems())
if (item.canDisplay(this))