Class DataImportManager
java.lang.Object
org.mvplugins.multiverse.inventories.dataimport.DataImportManager
- All Implemented Interfaces:
org.bukkit.event.Listener
Manager class for importing data from other inventory plugins or similar, e.g. PerWorldInventory.
-
Method Summary
Modifier and TypeMethodDescriptionGets all the Data Importer names that are enabled.org.mvplugins.multiverse.external.vavr.control.Option
<DataImporter> getImporter
(String pluginName) Gets aDataImporter
based on an importable plugin name.org.mvplugins.multiverse.external.vavr.control.Option
<DataImporter> getImporter
(org.bukkit.plugin.Plugin plugin) Gets aDataImporter
based on an importablePlugin
.void
register
(DataImporter dataImporter) Register a Data Importer and try to enable to it as well.void
register
(DataImporter dataImporter, boolean tryEnable) Register a Data Importer and optionally try to enable to it as well.
-
Method Details
-
register
Register a Data Importer and optionally try to enable to it as well.- Parameters:
dataImporter
- The Data Importer to register.tryEnable
- Whether to try andDataImporter.enable(Plugin)
the Data Importer.
-
register
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 aDataImporter
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 aDataImporter
based on an importablePlugin
.- Parameters:
plugin
- The plugin you want to import data from.- Returns:
- The
DataImporter
if Data Importer present for that plugin, else null.
-
getEnabledImporterNames
Gets all the Data Importer names that are enabled.- Returns:
- A collection of Data Importer names that are enabled.
-