mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 06:28:52 +00:00
Correct enterprise logging values, ignore event life of zero.
This commit is contained in:
1 parent
34845dd6db
commit
a08a558bc2
3 files changed
+18
-17
No files matched your search
@@ -182,21 +182,23 @@ public class Database {
|
||||
}
|
||||
|
||||
public void cleanEvents() {
|
||||
Bukkit.getScheduler().runTaskAsynchronously(AntiCheat.getPlugin(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
PreparedStatement statement = connection.prepareStatement(sqlCleanEvents);
|
||||
statement.setInt(1, eventLife);
|
||||
if (eventLife != 0) {
|
||||
Bukkit.getScheduler().runTaskAsynchronously(AntiCheat.getPlugin(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
PreparedStatement statement = connection.prepareStatement(sqlCleanEvents);
|
||||
statement.setInt(1, eventLife);
|
||||
|
||||
statement.executeUpdate();
|
||||
statement.executeUpdate();
|
||||
|
||||
connection.commit();
|
||||
AntiCheat.getPlugin().verboseLog("Cleaned " + statement.getUpdateCount() + " old events from the database");
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
connection.commit();
|
||||
AntiCheat.getPlugin().verboseLog("Cleaned " + statement.getUpdateCount() + " old events from the database");
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user