From baabac9d4c52acf297947198dddcbda9080949bd Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Mon, 30 Jan 2017 21:35:38 +0200 Subject: [PATCH] Fix for #4 --- .../plan/data/cache/DataCacheHandler.java | 15 ++++++++------- .../djrapitops/plan/database/databases/SQLDB.java | 5 +++-- Plan/src/main/resources/plugin.yml | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Plan/src/main/java/com/djrapitops/plan/data/cache/DataCacheHandler.java b/Plan/src/main/java/com/djrapitops/plan/data/cache/DataCacheHandler.java index ed418ac4c..5c1dcc3ec 100644 --- a/Plan/src/main/java/com/djrapitops/plan/data/cache/DataCacheHandler.java +++ b/Plan/src/main/java/com/djrapitops/plan/data/cache/DataCacheHandler.java @@ -89,17 +89,18 @@ public class DataCacheHandler { if (timesSaved % clearAfterXsaves == 0) { handler.clearCache(); } + serverData.updatePlayerCount(); + saveServerData(); handler.clearNulls(); timesSaved++; } }).runTaskTimerAsynchronously(plugin, 60 * 20 * minutes, 60 * 20 * minutes); - (new BukkitRunnable() { - @Override - public void run() { - serverData.updatePlayerCount(); - saveServerData(); - } - }).runTaskTimerAsynchronously(plugin, 60 * 20 * sMinutes, 60 * 20 * sMinutes); +// (new BukkitRunnable() { +// @Override +// public void run() { +// +// } +// }).runTaskTimerAsynchronously(plugin, 60 * 20 * sMinutes, 60 * 20 * sMinutes); } /** diff --git a/Plan/src/main/java/com/djrapitops/plan/database/databases/SQLDB.java b/Plan/src/main/java/com/djrapitops/plan/database/databases/SQLDB.java index ef899dd57..180b6030a 100644 --- a/Plan/src/main/java/com/djrapitops/plan/database/databases/SQLDB.java +++ b/Plan/src/main/java/com/djrapitops/plan/database/databases/SQLDB.java @@ -72,7 +72,7 @@ public abstract class SQLDB extends Database { private String ipsColumnIP; private String versionName; - + public SQLDB(Plan plugin, boolean supportsModification) { super(plugin); this.plugin = plugin; @@ -124,7 +124,7 @@ public abstract class SQLDB extends Database { serverdataColumnPlayersOnline = "players_online"; versionName = "plan_version"; - + // Maintains Connection. (new BukkitRunnable() { @Override @@ -409,6 +409,7 @@ public abstract class SQLDB extends Database { } } + @Override public void saveCommandUse(HashMap data) { try { PreparedStatement statement = connection.prepareStatement( diff --git a/Plan/src/main/resources/plugin.yml b/Plan/src/main/resources/plugin.yml index 8e3a6f764..92c04afa7 100644 --- a/Plan/src/main/resources/plugin.yml +++ b/Plan/src/main/resources/plugin.yml @@ -1,7 +1,7 @@ name: Plan author: Rsl1122 main: com.djrapitops.plan.Plan -version: 2.3.0 +version: 2.3.1 commands: plan: