Moved convertToMySQL() into MmoupdateCommand class

This commit is contained in:
nossr50 2012-03-22 15:32:31 -07:00
parent 7d70edc0ff
commit 189ae6fcdb
2 changed files with 15 additions and 14 deletions

View File

@ -8,9 +8,10 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.gmail.nossr50.Users;
import com.gmail.nossr50.m;
import com.gmail.nossr50.mcPermissions;
import com.gmail.nossr50.config.LoadProperties;
import com.gmail.nossr50.locale.mcLocale;
import com.gmail.nossr50.runnables.SQLConversionTask;
public class MmoupdateCommand implements CommandExecutor {
@Override
@ -28,7 +29,7 @@ public class MmoupdateCommand implements CommandExecutor {
}
player.sendMessage(ChatColor.GRAY + "Starting conversion...");
Users.clearUsers();
m.convertToMySQL();
convertToMySQL();
for (Player x : Bukkit.getServer().getOnlinePlayers()) {
Users.addUser(x);
}
@ -36,4 +37,15 @@ public class MmoupdateCommand implements CommandExecutor {
return true;
}
}
/**
* Convert FlatFile data to MySQL data.
*/
private void convertToMySQL() {
if (!LoadProperties.useMySQL) {
return;
}
Bukkit.getScheduler().scheduleAsyncDelayedTask(Bukkit.getPluginManager().getPlugin("mcMMO"), new SQLConversionTask(), 1);
}
}

View File

@ -265,17 +265,6 @@ public class m {
}
}
/**
* Convert FlatFile data to MySQL data.
*/
public static void convertToMySQL() {
if (!LoadProperties.useMySQL) {
return;
}
Bukkit.getScheduler().scheduleAsyncDelayedTask(Bukkit.getPluginManager().getPlugin("mcMMO"), new SQLConversionTask(), 1);
}
/**
* Check if a skill level is higher than the max bonus level of the ability.
*