Class DataImportManager

java.lang.Object
org.mvplugins.multiverse.inventories.dataimport.DataImportManager
All Implemented Interfaces:
org.bukkit.event.Listener

@Service public final class DataImportManager extends Object implements org.bukkit.event.Listener
Manager class for importing data from other inventory plugins or similar, e.g. PerWorldInventory.
  • Method Details

    • register

      public void register(DataImporter dataImporter, boolean tryEnable)
      Register a Data Importer and optionally try to enable to it as well.
      Parameters:
      dataImporter - The Data Importer to register.
      tryEnable - Whether to try and DataImporter.enable(Plugin) the Data Importer.
    • register

      public void register(DataImporter dataImporter)
      Register a Data Importer and try to enable to it as well.
      Parameters:
      dataImporter - The Data Importer to register.
    • getImporter

      public org.mvplugins.multiverse.external.vavr.control.Option<DataImporter> getImporter(String pluginName)
      Gets a DataImporter based on an importable plugin name.
      Parameters:
      pluginName - The plugin name you want to import data from.
      Returns:
      The DataImporter if Data Importer present for that plugin, else null.
    • getImporter

      public org.mvplugins.multiverse.external.vavr.control.Option<DataImporter> getImporter(org.bukkit.plugin.Plugin plugin)
      Gets a DataImporter based on an importable Plugin.
      Parameters:
      plugin - The plugin you want to import data from.
      Returns:
      The DataImporter if Data Importer present for that plugin, else null.
    • getEnabledImporterNames

      public Collection<String> getEnabledImporterNames()
      Gets all the Data Importer names that are enabled.
      Returns:
      A collection of Data Importer names that are enabled.