From 9a751bcd3a8b9ef554b2af2d185bcad118e63d9e Mon Sep 17 00:00:00 2001 From: Xefir Date: Tue, 8 May 2012 14:29:05 +0200 Subject: [PATCH] Implements getDebug and setDebug --- src/net/crystalyx/bukkit/simplyperms/SimplyAPI.java | 10 ++++++++++ .../crystalyx/bukkit/simplyperms/io/ConfigFile.java | 10 ++++++++++ src/net/crystalyx/bukkit/simplyperms/io/ConfigSQL.java | 10 ++++++++++ .../crystalyx/bukkit/simplyperms/io/PermsConfig.java | 4 ++++ 4 files changed, 34 insertions(+) diff --git a/src/net/crystalyx/bukkit/simplyperms/SimplyAPI.java b/src/net/crystalyx/bukkit/simplyperms/SimplyAPI.java index 1c9b94c..a5f788f 100644 --- a/src/net/crystalyx/bukkit/simplyperms/SimplyAPI.java +++ b/src/net/crystalyx/bukkit/simplyperms/SimplyAPI.java @@ -188,6 +188,16 @@ public class SimplyAPI implements PermsConfig { plugin.config.setDefaultGroup(group); } + @Override + public boolean getDebug() { + return plugin.config.getDebug(); + } + + @Override + public void setDebug(boolean debug) { + plugin.config.setDebug(debug); + } + public void refreshPermissions() { plugin.refreshPermissions(); } diff --git a/src/net/crystalyx/bukkit/simplyperms/io/ConfigFile.java b/src/net/crystalyx/bukkit/simplyperms/io/ConfigFile.java index 895429a..abc2acb 100755 --- a/src/net/crystalyx/bukkit/simplyperms/io/ConfigFile.java +++ b/src/net/crystalyx/bukkit/simplyperms/io/ConfigFile.java @@ -291,4 +291,14 @@ public class ConfigFile implements PermsConfig { plugin.getConfig().set("default", group); } + @Override + public boolean getDebug() { + return plugin.getConfig().getBoolean("debug", false); + } + + @Override + public void setDebug(boolean debug) { + plugin.getConfig().set("debug", debug); + } + } diff --git a/src/net/crystalyx/bukkit/simplyperms/io/ConfigSQL.java b/src/net/crystalyx/bukkit/simplyperms/io/ConfigSQL.java index 2caf9da..8ba365f 100755 --- a/src/net/crystalyx/bukkit/simplyperms/io/ConfigSQL.java +++ b/src/net/crystalyx/bukkit/simplyperms/io/ConfigSQL.java @@ -424,4 +424,14 @@ public class ConfigSQL implements PermsConfig { config.setDefaultGroup(group); } + @Override + public boolean getDebug() { + return config.getDebug(); + } + + @Override + public void setDebug(boolean debug) { + config.setDebug(debug); + } + } diff --git a/src/net/crystalyx/bukkit/simplyperms/io/PermsConfig.java b/src/net/crystalyx/bukkit/simplyperms/io/PermsConfig.java index ace7af3..0f1e862 100755 --- a/src/net/crystalyx/bukkit/simplyperms/io/PermsConfig.java +++ b/src/net/crystalyx/bukkit/simplyperms/io/PermsConfig.java @@ -75,4 +75,8 @@ public interface PermsConfig { public void setDefaultGroup(String group); + public boolean getDebug(); + + public void setDebug(boolean debug); + }