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:
turt2live
2014-08-31 17:06:10 -06:00
parent 9741c80014
commit 338d2cb889
7 changed files with 200 additions and 5 deletions
@@ -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();
}