From 997642c7ec83e924c01daa880893d6ac2de99f7f Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 29 Sep 2019 19:08:53 +0100 Subject: [PATCH] Updated for version 2.4. --- pom.xml | 2 +- .../mattstudios/citizenscmd/CitizensCMD.java | 34 +++++++------------ 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/pom.xml b/pom.xml index 0a0388c..975003d 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ me.mattstudios.plugins citizens-cmd - 2.3.3 + 2.4.0 jar CitizensCMD diff --git a/src/main/java/me/mattstudios/citizenscmd/CitizensCMD.java b/src/main/java/me/mattstudios/citizenscmd/CitizensCMD.java index 7519bc7..afd5b84 100644 --- a/src/main/java/me/mattstudios/citizenscmd/CitizensCMD.java +++ b/src/main/java/me/mattstudios/citizenscmd/CitizensCMD.java @@ -126,6 +126,8 @@ public final class CitizensCMD extends JavaPlugin { waitingList = new HashMap<>(); + setShift(getConfig().getBoolean("shift-confirm")); + if (getConfig().contains("cooldown-time-display")) { switch (Objects.requireNonNull(getConfig().getString("cooldown-time-display")).toLowerCase()) { case "short": @@ -154,9 +156,7 @@ public final class CitizensCMD extends JavaPlugin { info(color(TAG + "&b&o" + lang.getUncoloredMessage(Messages.STARTUP_NEW_VERSION))); info(color(TAG + "&b&o" + updater.getResourceURL())); } - } catch (Exception e) { - // If it can't check for an update, tell the user and throw an error. - info("Could not check for updates!"); + } catch (Exception ignored) { } } @@ -280,15 +280,6 @@ public final class CitizensCMD extends JavaPlugin { return lang; } - /** - * Gets if or not should alert player of new update on join - * - * @return Returns update status - */ - public boolean getUpdateStatus() { - return updateStatus; - } - /** * Sets new update status from scheduler * @@ -361,15 +352,6 @@ public final class CitizensCMD extends JavaPlugin { return waitingList; } - /** - * Checks if player needs to shift or not to confirm payment - * - * @return Returns the boolean of whether or not players should shift - */ - public boolean shouldShift() { - return shift; - } - /** * Sets the new shifting rule * @@ -401,10 +383,20 @@ public final class CitizensCMD extends JavaPlugin { return api; } + /** + * Checks if player needs to shift or not to confirm payment + * + * @return Returns the boolean of whether or not players should shift + */ public boolean isShift() { return shift; } + /** + * Gets if or not should alert player of new update on join + * + * @return Returns update status + */ public boolean isUpdateStatus() { return updateStatus; }