From c17693331b053acc4be6ff76983689f9e44b2235 Mon Sep 17 00:00:00 2001 From: Risto Lahtela Date: Sun, 9 Jul 2017 16:13:29 +0300 Subject: [PATCH] 3.5.1 --- Plan/src/main/java/com/djrapitops/plan/Plan.java | 6 +++--- .../com/djrapitops/plan/data/cache/DataCacheHandler.java | 4 ++-- Plan/src/main/resources/plugin.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Plan/src/main/java/com/djrapitops/plan/Plan.java b/Plan/src/main/java/com/djrapitops/plan/Plan.java index 79bcc9747..7a26ef373 100644 --- a/Plan/src/main/java/com/djrapitops/plan/Plan.java +++ b/Plan/src/main/java/com/djrapitops/plan/Plan.java @@ -185,11 +185,11 @@ public class Plan extends RslPlugin { @Override public void onDisable() { // Stop the UI Server - if (Verify.notNull(uiServer)) { + if (uiServer != null) { uiServer.stop(); } Bukkit.getScheduler().cancelTasks(this); - if (Verify.notNull(handler) && Verify.notNull(db)) { + if (Verify.notNull(handler, db)) { Benchmark.start("DataCache OnDisable Save"); // Saves the datacache to the database without Bukkit's Schedulers. Log.info(Phrase.CACHE_SAVE + ""); @@ -262,7 +262,7 @@ public class Plan extends RslPlugin { private void startAnalysisRefreshTask(int everyXMinutes) throws IllegalStateException { Benchmark.start("Enable: Schedule PeriodicAnalysisTask"); - if (!Verify.positive(everyXMinutes)) { + if (everyXMinutes <= 0) { return; } getRunnableFactory().createNew("PeriodicalAnalysisTask", new RslRunnable() { 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 b4eff9ff0..d705fc055 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 @@ -122,7 +122,7 @@ public class DataCacheHandler extends LocationCache { */ public void startAsyncPeriodicSaveTask() throws IllegalArgumentException, IllegalStateException { int minutes = Settings.SAVE_CACHE_MIN.getNumber(); - if (!Verify.positive(minutes)) { + if (minutes <= 0) { minutes = 5; } final int clearAfterXsaves; @@ -420,7 +420,7 @@ public class DataCacheHandler extends LocationCache { */ public void clearFromCache(UUID uuid) { Log.debug(uuid + ": Clear"); - if (Verify.notNull(plugin.fetch().getPlayer(uuid))) { + if (plugin.fetch().isOnline(uuid)) { Log.debug(uuid + ": Online, did not clear"); UserData data = dataCache.get(uuid); if (data != null) { diff --git a/Plan/src/main/resources/plugin.yml b/Plan/src/main/resources/plugin.yml index 816070e02..ddd8bea2b 100644 --- a/Plan/src/main/resources/plugin.yml +++ b/Plan/src/main/resources/plugin.yml @@ -1,7 +1,7 @@ name: Plan author: Rsl1122 main: main.java.com.djrapitops.plan.Plan -version: 3.5.0 +version: 3.5.1 softdepend: - OnTime