mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
Moved convertToMySQL() into MmoupdateCommand class
This commit is contained in:
parent
7d70edc0ff
commit
189ae6fcdb
@ -8,9 +8,10 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
import com.gmail.nossr50.Users;
|
||||||
import com.gmail.nossr50.m;
|
|
||||||
import com.gmail.nossr50.mcPermissions;
|
import com.gmail.nossr50.mcPermissions;
|
||||||
|
import com.gmail.nossr50.config.LoadProperties;
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
import com.gmail.nossr50.locale.mcLocale;
|
||||||
|
import com.gmail.nossr50.runnables.SQLConversionTask;
|
||||||
|
|
||||||
public class MmoupdateCommand implements CommandExecutor {
|
public class MmoupdateCommand implements CommandExecutor {
|
||||||
@Override
|
@Override
|
||||||
@ -28,7 +29,7 @@ public class MmoupdateCommand implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
player.sendMessage(ChatColor.GRAY + "Starting conversion...");
|
player.sendMessage(ChatColor.GRAY + "Starting conversion...");
|
||||||
Users.clearUsers();
|
Users.clearUsers();
|
||||||
m.convertToMySQL();
|
convertToMySQL();
|
||||||
for (Player x : Bukkit.getServer().getOnlinePlayers()) {
|
for (Player x : Bukkit.getServer().getOnlinePlayers()) {
|
||||||
Users.addUser(x);
|
Users.addUser(x);
|
||||||
}
|
}
|
||||||
@ -36,4 +37,15 @@ public class MmoupdateCommand implements CommandExecutor {
|
|||||||
|
|
||||||
return true;
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
@ -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.
|
* Check if a skill level is higher than the max bonus level of the ability.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user