🇮🇹
zMenu
Italian
Italian
  • Inizio
  • Plugin Supportati
  • Configurations
    • Informazioni
    • Comandi e Permessi
    • PlaceHolder
    • Come creare un menu passo passo
    • Menu
    • Bottoni/Tasti
      • Requisiti
      • Azioni
    • Oggetti
    • Schemi
    • Comandi
    • Dati dei giocatori
    • Config.json
  • API
    • Informazioni
    • Crea bottone/tasto
    • Crea Loader del Materiale
    • Crea ButtonOption
    • Carica Inventario/Menu
    • Eventi Veloci
  • Lista Files
  • Esempi Menus
Powered by GitBook
On this page
  1. API

Carica Inventario/Menu

To load an inventory you have many methods present in the InventoryManager interface. But I advise you to use the loadInventoryOrSaveResource method. It allows you to retrieve the file in the resources of your plugin and save it.

try {
    // Attempt to load or save a custom inventory configuration from a YAML file
    this.inventoryManager.loadInventoryOrSaveResource(this.plugin, "inventories/paginate_inventory.yml");
} catch (InventoryException exception) {
    // Log any exceptions that occur during inventory loading
    exception.printStackTrace();
}
PreviousCrea ButtonOptionNextEventi Veloci

Last updated 1 year ago