Skip to content

Commit

Permalink
add a config option to toggle whether that output is on by default
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Apr 19, 2019
1 parent 3e38085 commit a785eb2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions plugin/src/main/java/net/aufdemrand/denizen/Denizen.java
Original file line number Diff line number Diff line change
Expand Up @@ -1260,6 +1260,9 @@ public boolean onCommand(CommandSender sender, Command cmd, String cmdName, Stri
quiet = true;
entry = entry.substring("-q ".length());
}
if (!Settings.showExDebug()) {
quiet = !quiet;
}

if (entry.length() < 2) {
sender.sendMessage("/ex (-q) <dCommand> (arguments)");
Expand Down
5 changes: 5 additions & 0 deletions plugin/src/main/java/net/aufdemrand/denizen/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ public static boolean showExHelp() {
.getBoolean("Debug.Ex command help", true);
}

public static boolean showExDebug() {
return DenizenAPI.getCurrentInstance().getConfig()
.getBoolean("Debug.Ex command debug", true);
}

public static boolean allowConsoleRedirection() {
return DenizenAPI.getCurrentInstance().getConfig()
.getBoolean("Debug.Allow console redirection", false);
Expand Down
5 changes: 4 additions & 1 deletion plugin/src/main/resources/config.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Denizen config.

# Whether debug information about Denizen should appear in the server console
Debug:
# Whether debug information about Denizen should appear in the server console
Show: true
# Whether the '/ex' command should tell you to check debug when you use it.
Ex command help: true
# Whether the '/ex' command should show debug by default. (if set to false, this inverts the '-q' option)
Ex command debug: true
# The max length of a line of debug output. Shorten this if your console is hard to read.
Line length: 128
# The max length of debug output. After this length, all further output will be cut off.
Expand Down

0 comments on commit a785eb2

Please sign in to comment.