mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 06:28:52 +00:00
Sanity clean up
This commit is contained in:
1 parent
ca4406809b
commit
9486e18c4f
47 files changed
+710
-784
No files matched your search
@@ -24,7 +24,10 @@ import net.h31ix.anticheat.manage.User;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
import java.sql.*;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class Database {
|
||||
|
||||
@@ -126,12 +129,12 @@ public class Database {
|
||||
|
||||
connection.setAutoCommit(false);
|
||||
|
||||
eventTask = Bukkit.getScheduler().runTaskTimerAsynchronously(AntiCheat.getPlugin(), new Runnable(){
|
||||
eventTask = Bukkit.getScheduler().runTaskTimerAsynchronously(AntiCheat.getPlugin(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
flushEvents();
|
||||
}
|
||||
}, eventInterval* 60 * 20, eventInterval * 60 * 20);
|
||||
}, eventInterval * 60 * 20, eventInterval * 60 * 20);
|
||||
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
@@ -179,7 +182,7 @@ public class Database {
|
||||
}
|
||||
|
||||
public void cleanEvents() {
|
||||
Bukkit.getScheduler().runTaskAsynchronously(AntiCheat.getPlugin(), new Runnable(){
|
||||
Bukkit.getScheduler().runTaskAsynchronously(AntiCheat.getPlugin(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user