From 018d76838032ad18598801c9e86f46753c2e3521 Mon Sep 17 00:00:00 2001 From: xGinko Date: Sun, 24 Dec 2023 15:54:47 +0100 Subject: [PATCH] improve readability --- .../anarchyexploitfixes/utils/TPSCache.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/AnarchyExploitFixesFolia/src/main/java/me/moomoo/anarchyexploitfixes/utils/TPSCache.java b/AnarchyExploitFixesFolia/src/main/java/me/moomoo/anarchyexploitfixes/utils/TPSCache.java index 771ee8cce..b94711e37 100755 --- a/AnarchyExploitFixesFolia/src/main/java/me/moomoo/anarchyexploitfixes/utils/TPSCache.java +++ b/AnarchyExploitFixesFolia/src/main/java/me/moomoo/anarchyexploitfixes/utils/TPSCache.java @@ -42,22 +42,22 @@ final class Default implements TPSCache { @Override public double getGlobalTPS() { - return getTPS(null); + Double tps = this.cached_tps.getIfPresent(true); + if (tps == null) { + tps = this.server.getTPS()[0]; + this.cached_tps.put(true, tps); + } + return tps; } @Override public double getTPS(final World world, final int chunkX, final int chunkZ) { - return getTPS(null); + return getGlobalTPS(); } @Override public double getTPS(Location location) { - Double tps = this.cached_tps.getIfPresent(true); - if (tps == null) { - tps = this.server.getTPS()[0]; - this.cached_tps.put(true, tps); - } - return tps; + return getGlobalTPS(); } }