Disable command feedback at startup via config setting

This commit is contained in:
PikaMug 2020-10-11 03:38:56 -04:00
parent e196269ecf
commit 2fce15827e
3 changed files with 12 additions and 1 deletions

View File

@ -562,6 +562,9 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
}
}
loadModules();
if (getSettings().canDisableCommandFeedback()) {
Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "gamerule sendCommandFeedback false");
}
loading = false;
}
}, ticks);

View File

@ -28,6 +28,7 @@ public class Settings {
private boolean allowPranks = true;
private boolean askConfirmation = true;
private int consoleLogging = 1;
private boolean disableCommandFeedback = true;
private boolean genFilesOnJoin = true;
private boolean ignoreLockedQuests = false;
private int killDelay = 0;
@ -82,6 +83,12 @@ public class Settings {
public void setConsoleLogging(final int consoleLogging) {
this.consoleLogging = consoleLogging;
}
public boolean canDisableCommandFeedback() {
return disableCommandFeedback;
}
public void setDisableCommandFeedback(final boolean disableCommandFeedback) {
this.disableCommandFeedback = disableCommandFeedback;
}
public boolean canGenFilesOnJoin() {
return genFilesOnJoin;
}

View File

@ -5,7 +5,8 @@ allow-command-quests-with-npcs: false
allow-pranks: true
allow-quitting: true
ask-confirmation: true
console-logging: 1
console-logging: 2
disable-command-feedback: true
generate-files-on-join: true
ignore-locked-quests: false
kill-delay: 600