From 521af49010100fbdcbddbfce106e960f292cbd03 Mon Sep 17 00:00:00 2001 From: Jeroen Ketelaar Date: Fri, 14 Feb 2014 03:39:36 +0100 Subject: [PATCH] Another code reformat --- parabotv2/src/org/parabot/core/Core.java | 129 +++++++++++------------ 1 file changed, 63 insertions(+), 66 deletions(-) diff --git a/parabotv2/src/org/parabot/core/Core.java b/parabotv2/src/org/parabot/core/Core.java index 4440b62..81dd517 100644 --- a/parabotv2/src/org/parabot/core/Core.java +++ b/parabotv2/src/org/parabot/core/Core.java @@ -6,16 +6,14 @@ import java.io.BufferedReader; import java.io.IOException; /** - * * The core of parabot - * + * * @author Everel - * */ public class Core { - private static boolean debug = false; - private static boolean verbose = false; + private static boolean debug = false; + private static boolean verbose = false; private static boolean loadLocal = false; //Loads both local and public scripts/servers /** @@ -35,71 +33,70 @@ public class Core { } /** - * Enabled debug mode - * - * @param debug - */ - public static void setDebug(final boolean debug) { - Core.debug = debug; - } + * Enabled debug mode + * + * @param debug + */ + public static void setDebug(final boolean debug) { + Core.debug = debug; + } - /** - * @return if the client is in debug mode. - */ - public static boolean inDebugMode() { - return debug; - } + /** + * @return if the client is in debug mode. + */ + public static boolean inDebugMode() { + return debug; + } - /** - * @return if the client is in verbose mode. - */ - public static boolean inVerboseMode() { - return verbose; - } + /** + * @return if the client is in verbose mode. + */ + public static boolean inVerboseMode() { + return verbose; + } - /** - * Sets verbose mode - * - * @param verbose - * - enabled - */ - public static void setVerbose(final boolean verbose) { - Core.verbose = verbose; - } + /** + * Sets verbose mode + * + * @param verbose - enabled + */ + public static void setVerbose(final boolean verbose) { + Core.verbose = verbose; + } - public static void verbose(final String line) { - if (verbose) { - System.out.println(line); - } - } + public static void verbose(final String line) { + if (verbose) { + System.out.println(line); + } + } - /** - * Checks for updates. - * - * @return true if no update is required, otherwise false. - */ - public static boolean isValid() { - Core.verbose("Checking for updates..."); - BufferedReader br = WebUtil.getReader(Configuration.GET_BOT_VERSION); - try { - double version = Double.parseDouble(br.readLine()); - if (Configuration.BOT_VERSION >= version) { - Core.verbose("No updates available."); - return true; - } - } catch (NumberFormatException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } finally { - try { - br.close(); - } catch (IOException e) { - e.printStackTrace(); - } - } - Core.verbose("Updates available..."); - return false; - } + /** + * Checks for updates. + * + * @return true if no update is required, otherwise false. + */ + public static boolean isValid() { + Core.verbose("Checking for updates..."); + BufferedReader br = WebUtil.getReader(Configuration.GET_BOT_VERSION); + try { + double version = Double.parseDouble(br.readLine()); + if (Configuration.BOT_VERSION >= version) { + Core.verbose("No updates available."); + return true; + } + } catch (NumberFormatException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + try { + br.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + Core.verbose("Updates available..."); + return false; + } }