From bb5e0969ca6e3c7b2d394af83c65f6bd85577fa1 Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Mon, 19 Feb 2018 11:34:33 +0200 Subject: [PATCH] Fixed NoClassDefFoundError on PaperSpigot 1.8.X related to TPS (#526) --- .../plan/system/tasks/bukkit/PaperTPSCountTimer.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Plan/src/main/java/com/djrapitops/plan/system/tasks/bukkit/PaperTPSCountTimer.java b/Plan/src/main/java/com/djrapitops/plan/system/tasks/bukkit/PaperTPSCountTimer.java index 695551514..845a22a9d 100644 --- a/Plan/src/main/java/com/djrapitops/plan/system/tasks/bukkit/PaperTPSCountTimer.java +++ b/Plan/src/main/java/com/djrapitops/plan/system/tasks/bukkit/PaperTPSCountTimer.java @@ -13,7 +13,12 @@ public class PaperTPSCountTimer extends BukkitTPSCountTimer { @Override protected TPS getTPS(long diff, long now, double cpuUsage, long usedMemory, int entityCount, int chunksLoaded, int playersOnline) { - double tps = plugin.getServer().getTPS()[0]; + double tps; + try { + tps = plugin.getServer().getTPS()[0]; + } catch (NoSuchMethodError e) { + return super.getTPS(diff, now, cpuUsage, usedMemory, entityCount, chunksLoaded, playersOnline); + } if (tps > 20) { tps = 20;