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 TypeMethodDescriptionboolean
disable()
Unhook plugin from this Data Importer.protected abstract void
Logic that does the actual importing data.boolean
enable()
Hooks plugin for importing its data.boolean
enable
(org.bukkit.plugin.Plugin importerPlugin) Hooks plugin for importing its data.org.bukkit.plugin.Plugin
boolean
Imports the data from another plugin and disabled it upon success so Multiverse inventories can work without conflicts.boolean
importData
(boolean disableOnSuccess) Imports the data from another plugin and optionally disable it after successful import.boolean
Checks 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, wait
Methods 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:
importData
in 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:
importData
in 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:
enable
in 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:
enable
in interfaceDataImporter
- Returns:
- True if successfully enabled, else false.
-
disable
public boolean disable()Unhook plugin from this Data Importer.- Specified by:
disable
in interfaceDataImporter
- Returns:
- True if successfully disabled, else false.
-
isEnabled
public boolean isEnabled()Checks if this Data Importer has beenDataImporter.enable(Plugin)
successfully.- Specified by:
isEnabled
in interfaceDataImporter
- Returns:
- True if is enabled, else false.
-
getPlugin
public org.bukkit.plugin.Plugin getPlugin()- Specified by:
getPlugin
in interfaceDataImporter
- Returns:
- The plugin associated with this Data Importer, null if not enabled.
-