From 33c4ef8b2574ab2bdcb5f3d6a22a05892c33df16 Mon Sep 17 00:00:00 2001 From: XZot1K Date: Fri, 18 Jun 2021 11:36:16 -0400 Subject: [PATCH] * The "getServerVersion" method from the "DisplayShopsAPI" interface now returns a double in the format XXX.X (For example, v1_17_R1 the returned value would be 117.1 for easier comparison). * Removed the "isOffHandVersion" method from the "DisplayShopsAPI" interface. Signed-off-by: xzot1k --- src/xzot1k/plugins/ds/DisplayShops.java | 15 ++++++--------- src/xzot1k/plugins/ds/DisplayShopsAPI.java | 12 +++--------- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/src/xzot1k/plugins/ds/DisplayShops.java b/src/xzot1k/plugins/ds/DisplayShops.java index 1a90604..0fe159f 100644 --- a/src/xzot1k/plugins/ds/DisplayShops.java +++ b/src/xzot1k/plugins/ds/DisplayShops.java @@ -31,10 +31,12 @@ public static DisplayShops getPluginInstance() { } @Override - public void onEnable() {} + public void onEnable() { + } @Override - public void onDisable() {} + public void onDisable() { + } @Override public void log(Level level, String message) { @@ -107,8 +109,8 @@ public Manager getManager() { } @Override - public String getServerVersion() { - return null; + public double getServerVersion() { + return 0; } @Override @@ -116,11 +118,6 @@ public boolean isPaperSpigot() { return false; } - @Override - public boolean isOffHandVersion() { - return false; - } - @Override public boolean isPrismaInstalled() { return false; diff --git a/src/xzot1k/plugins/ds/DisplayShopsAPI.java b/src/xzot1k/plugins/ds/DisplayShopsAPI.java index 36abf57..c1cdf40 100644 --- a/src/xzot1k/plugins/ds/DisplayShopsAPI.java +++ b/src/xzot1k/plugins/ds/DisplayShopsAPI.java @@ -120,18 +120,14 @@ public interface DisplayShopsAPI { // getters & setters /** - * Returns the manager where most data and API methods are stored. - * - * @return The manager class. + * @return Returns the manager where most data and API methods are stored. */ Manager getManager(); /** - * Returns the server version. - * - * @return Server version. + * @return Server version in the format XXX.X where the decimal digit is the 'R' version. */ - String getServerVersion(); + double getServerVersion(); /** * Checks if paper spigot methods exist. @@ -154,8 +150,6 @@ public interface DisplayShopsAPI { */ void writeToLog(String text); - boolean isOffHandVersion(); - boolean isPrismaInstalled(); Connection getDatabaseConnection();