Merge branch 'master' into locale

This commit is contained in:
GJ
2012-04-19 23:32:32 -04:00
2 changed files with 7 additions and 1 deletions

View File

@ -44,8 +44,10 @@ public class McremoveCommand implements CommandExecutor {
//If the server is using MySQL
if(LoadProperties.useMySQL)
{
int userId = mcMMO.database.getInt("SELECT id FROM "+LoadProperties.MySQLtablePrefix+"users WHERE user = '" + playerName + "'");
int userId = 0;
userId = mcMMO.database.getInt("SELECT id FROM "+LoadProperties.MySQLtablePrefix+"users WHERE user = '" + playerName + "'");
if(userId > 0) {
//Remove user from tables
mcMMO.database.write("DELETE FROM "
+LoadProperties.MySQLdbName+"."
@ -73,6 +75,9 @@ public class McremoveCommand implements CommandExecutor {
+LoadProperties.MySQLtablePrefix+"experience.user_id="+userId);
sender.sendMessage("User "+playerName+" removed from MySQL DB!"); //TODO: Needs more locale.
} else {
sender.sendMessage("Unable to find player named "+playerName+" in the database!");
}
} else {
if(removeFlatFileUser(playerName)) {
sender.sendMessage(ChatColor.GREEN+"[mcMMO] It worked! User was removed.");