Class AbstractDataImporter
java.lang.Object
org.mvplugins.multiverse.inventories.dataimport.AbstractDataImporter
- All Implemented Interfaces:
DataImporter
Abstract implementation of
DataImporter without actual import logic.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandisable()Unhook plugin from this Data Importer.protected abstract voidLogic that does the actual importing data.booleanenable()Hooks plugin for importing its data.booleanenable(org.bukkit.plugin.Plugin importerPlugin) Hooks plugin for importing its data.org.bukkit.plugin.PluginbooleanImports the data from another plugin and disabled it upon success so Multiverse inventories can work without conflicts.booleanimportData(boolean disableOnSuccess) Imports the data from another plugin and optionally disable it after successful import.booleanChecks if this Data Importer has beenDataImporter.enable(Plugin)successfully.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.mvplugins.multiverse.inventories.dataimport.DataImporter
getPluginClass, getPluginName
-
Field Details
-
importer
protected org.bukkit.plugin.Plugin importer
-
-
Constructor Details
-
AbstractDataImporter
public AbstractDataImporter()
-
-
Method Details
-
doDataImport
Logic that does the actual importing data.- Throws:
DataImportException- Errors occurred that caused import to fail.
-
importData
public boolean importData(boolean disableOnSuccess) Imports the data from another plugin and optionally disable it after successful import.- Specified by:
importDatain interfaceDataImporter- Parameters:
disableOnSuccess- Whether to disable the importer plugin after a successful import.- Returns:
- True if data import is successful, else false.
-
importData
public boolean importData()Imports the data from another plugin and disabled it upon success so Multiverse inventories can work without conflicts.- Specified by:
importDatain interfaceDataImporter- Returns:
- True if data import is successful, else false.
-
enable
public boolean enable(org.bukkit.plugin.Plugin importerPlugin) Hooks plugin for importing its data. Needs plugin class ofDataImporter.getPluginClass().- Specified by:
enablein interfaceDataImporter- Parameters:
importerPlugin- The target plugin instance to hook.- Returns:
- True if successfully enabled, else false.
-
enable
public boolean enable()Hooks plugin for importing its data. Needs plugin class ofDataImporter.getPluginClass().- Specified by:
enablein interfaceDataImporter- Returns:
- True if successfully enabled, else false.
-
disable
public boolean disable()Unhook plugin from this Data Importer.- Specified by:
disablein interfaceDataImporter- Returns:
- True if successfully disabled, else false.
-
isEnabled
public boolean isEnabled()Checks if this Data Importer has beenDataImporter.enable(Plugin)successfully.- Specified by:
isEnabledin interfaceDataImporter- Returns:
- True if is enabled, else false.
-
getPlugin
public org.bukkit.plugin.Plugin getPlugin()- Specified by:
getPluginin interfaceDataImporter- Returns:
- The plugin associated with this Data Importer, null if not enabled.
-