Update changelog & minor formatting fixes

This commit is contained in:
TfT_02 2013-10-06 10:25:28 +02:00
parent 96b54387fe
commit 3f9c98d72e
5 changed files with 16 additions and 9 deletions

View File

@ -8,6 +8,7 @@ Key:
- Removal
Version 1.4.07-dev
+ Added SQL Database can now recover from a dropped connection without losing data. (Thanks Riking!)
+ Added Carrot on a Stick and Flint & Steel to repair.vanilla.yml
+ Added horses to the "Shake" ability
+ Added ability to summon horses via "Call of the Wild" using apples

View File

@ -122,7 +122,8 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
try {
lastPlayed = Long.parseLong(character[37]) * Misc.TIME_CONVERSION_FACTOR;
}
catch (NumberFormatException e) {}
catch (NumberFormatException e) {
}
if (lastPlayed == 0) {
OfflinePlayer player = Bukkit.getOfflinePlayer(name);
lastPlayed = player.getLastPlayed();
@ -406,7 +407,8 @@ public final class FlatfileDatabaseManager implements DatabaseManager {
in.close();
}
}
catch (IOException ignored) {}
catch (IOException e) {
}
}
}

View File

@ -12,7 +12,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.logging.Level;
import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.config.Config;
@ -23,8 +22,8 @@ import com.gmail.nossr50.datatypes.database.PlayerStat;
import com.gmail.nossr50.datatypes.player.PlayerProfile;
import com.gmail.nossr50.datatypes.skills.AbilityType;
import com.gmail.nossr50.datatypes.skills.SkillType;
import com.gmail.nossr50.runnables.database.SQLReconnectTask;
import com.gmail.nossr50.runnables.database.SQLDatabaseKeepaliveTask;
import com.gmail.nossr50.runnables.database.SQLReconnectTask;
import com.gmail.nossr50.util.Misc;
public final class SQLDatabaseManager implements DatabaseManager {
@ -95,7 +94,7 @@ public final class SQLDatabaseManager implements DatabaseManager {
"WHERE ((" + currentTime + " - lastlogin * " + Misc.TIME_CONVERSION_FACTOR + ") > " + PURGE_TIME + ")");
processPurge(usernames);
mcMMO.p.getLogger().info("Purged " + usernames.size() + " users from the database.");;
mcMMO.p.getLogger().info("Purged " + usernames.size() + " users from the database.");
}
public boolean removeUser(String playerName) {
@ -380,7 +379,8 @@ public final class SQLDatabaseManager implements DatabaseManager {
result.close();
return ret;
}
catch (SQLException e) {}
catch (SQLException e) {
}
}
result.close();
}
@ -467,13 +467,15 @@ public final class SQLDatabaseManager implements DatabaseManager {
if (statement != null) {
try {
statement.close();
} catch (SQLException e) {
}
catch (SQLException e) {
// Ignore
}
}
}
}
/**
* Check connection status and re-establish if dead or stale.
*
@ -584,7 +586,8 @@ public final class SQLDatabaseManager implements DatabaseManager {
if (stmt != null) {
try {
stmt.close();
} catch (SQLException e) {
}
catch (SQLException e) {
// Ignore
}
}

View File

@ -178,6 +178,7 @@ public class McMMOPlayer {
private class ApplySuccessfulProfile extends BukkitRunnable {
private final PlayerProfile profile;
private ApplySuccessfulProfile(PlayerProfile profile) {
this.profile = profile;
}

View File

@ -10,7 +10,7 @@ import com.gmail.nossr50.database.SQLDatabaseManager;
* This task is in charge of sending a MySQL ping over the MySQL connection
* every hour to prevent the connection from timing out and losing players'
* data when they join.
* <p>
* <p/>
* A WeakReference is used to keep the database instance, because
* {@link com.gmail.nossr50.commands.database.ConvertDatabaseCommand database
* conversion} may create a SQLDatabaseManager that will be thrown out. If a