summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2011-11-04 11:40:18 +0000
committerKHobbits <rob@khobbits.co.uk>2011-11-04 11:40:18 +0000
commit70d1c7d7d7acc97d32ebd83de56c8d476ea1a487 (patch)
treed5ec6190efeec7fa5275cd0f48803f77f40f8686
parent894d956ba1305986fe88df4bad4ea0756624d327 (diff)
parent8890284b3e37b6ee507c46171a5573c32fcbf095 (diff)
downloadEssentials-70d1c7d7d7acc97d32ebd83de56c8d476ea1a487.tar
Essentials-70d1c7d7d7acc97d32ebd83de56c8d476ea1a487.tar.gz
Essentials-70d1c7d7d7acc97d32ebd83de56c8d476ea1a487.tar.lz
Essentials-70d1c7d7d7acc97d32ebd83de56c8d476ea1a487.tar.xz
Essentials-70d1c7d7d7acc97d32ebd83de56c8d476ea1a487.zip
Merge branch 'master' of github.com:essentials/Essentials into essmaster
-rw-r--r--Essentials/src/com/earth2me/essentials/ISettings.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/Settings.java10
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandessentials.java6
3 files changed, 17 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/ISettings.java b/Essentials/src/com/earth2me/essentials/ISettings.java
index 7ffa0c138..49a6ebf23 100644
--- a/Essentials/src/com/earth2me/essentials/ISettings.java
+++ b/Essentials/src/com/earth2me/essentials/ISettings.java
@@ -136,4 +136,6 @@ public interface ISettings extends IConf
boolean getFreezeAfkPlayers();
boolean areDeathMessagesEnabled();
+
+ public void setDebug(boolean debug);
}
diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java
index ca076c272..c19314e24 100644
--- a/Essentials/src/com/earth2me/essentials/Settings.java
+++ b/Essentials/src/com/earth2me/essentials/Settings.java
@@ -378,10 +378,12 @@ public class Settings implements ISettings
return config.getBoolean("protect.disable.warn-on-build-disallow", false);
}
+ private boolean debug = false;
+
@Override
public boolean isDebug()
{
- return config.getBoolean("debug", false);
+ return debug || config.getBoolean("debug", false);
}
@Override
@@ -532,4 +534,10 @@ public class Settings implements ISettings
{
return config.getBoolean("death-messages", true);
}
+
+ @Override
+ public void setDebug(final boolean debug)
+ {
+ this.debug = debug;
+ }
}
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java
index 328a4a8b5..a1a66854f 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandessentials.java
@@ -23,6 +23,12 @@ public class Commandessentials extends EssentialsCommand
@Override
public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
+ if (args.length > 0 && args[0].equalsIgnoreCase("debug"))
+ {
+ ess.getSettings().setDebug(!ess.getSettings().isDebug());
+ sender.sendMessage("Essentials " + ess.getDescription().getVersion() + " debug mode " + (ess.getSettings().isDebug() ? "enabled" : "disabled"));
+ return;
+ }
final Map<String, Byte> noteMap = new HashMap<String, Byte>();
noteMap.put("1F#", (byte)0x0);
noteMap.put("1G", (byte)0x1);