Add converting framework as well as the converter for Backpack
Adds command /pvconvert <all | plugin name> Adds permission playervaults.convert Adds Converter interface for future converters Adds BackpackConverter - A converter for Backpack (http://dev.bukkit.org/bukkit-plugins/backpack/)
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package com.drtshock.playervaults.converters;
|
||||
|
||||
/**
|
||||
* Represents a simple converter for converting another plugin's content
|
||||
* to PlayerVaults.
|
||||
*
|
||||
* @author turt2live
|
||||
*/
|
||||
public interface Converter {
|
||||
|
||||
/**
|
||||
* Converts the other plugin's data.
|
||||
*
|
||||
* @return the number of vaults converted. Returns 0 on none converted
|
||||
* or -1 if no vaults were converted.
|
||||
*/
|
||||
public int doConvert();
|
||||
|
||||
/**
|
||||
* Determines if this converter is applicable for converting to PlayerVaults.
|
||||
* This may check for the existance of a plugin, plugin folder, or otherwise.
|
||||
*
|
||||
* @return true if this converter can convert, false otherwise
|
||||
*/
|
||||
public boolean canConvert();
|
||||
|
||||
/**
|
||||
* Gets the name of this converter
|
||||
*
|
||||
* @return the converter name
|
||||
*/
|
||||
public String getName();
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user