Uso este código para criar inventários GUI, para min é o mais fácil que tem:
Tente usá-lo '-'
package me.zmathi.GUI;
public class GUI extends JavaPlugin implements CommandExecutor, Listener{
public void onEnable(){
Bukkit.getServer().getPluginManager().registerEvents(this, this);
}
public void onDisable(){
}
public boolean onCommand(CommandSender sender, Command command, String label, String[] args)
{
Player p = (Player) sender;
if (command.getName().equalsIgnoreCase("youtubers")){
Inventory Youtubers = Bukkit.getServer().createInventory(p, 54, ("Nome do Inventário aqui"));
ItemStack teste = new ItemStack(Material.BEDROCK);
Youtubers.setItem(0, teste);
p.openInventory(Youtubers);
return true;
}
return false;
}
}