Allow async conversion and use a UUID service where possible

This commit is contained in:
turt2live
2014-08-31 18:45:58 -06:00
parent 7eb269fc8e
commit 57272da0cc
9 changed files with 157 additions and 25 deletions
@@ -1,5 +1,8 @@
package com.drtshock.playervaults.converters;
import com.turt2live.uuid.ServiceProvider;
import org.bukkit.command.CommandSender;
/**
* Represents a simple converter for converting another plugin's content
* to PlayerVaults.
@@ -11,10 +14,13 @@ public interface Converter {
/**
* Converts the other plugin's data.
*
* @param initiator the initiator of the conversion. May be null
* @param uuidProvider the UUID provider to use, cannot be null
*
* @return the number of vaults converted. Returns 0 on none converted
* or -1 if no vaults were converted.
*/
public int doConvert();
public int run(CommandSender initiator, ServiceProvider uuidProvider);
/**
* Determines if this converter is applicable for converting to PlayerVaults.