Merge pull request #109 from gcurtiss/master

Add disable broadcast
This commit is contained in:
Rammelkast authored and GitHub committed 2020-09-15 13:34:58 +02:00
commit 0d9b8707dd
3 files changed
+6 -2

No files matched your search

@@ -36,6 +36,7 @@ public class Config extends ConfigurationFile {
public ConfigValue<Boolean> eventChains;
public ConfigValue<Boolean> enterprise;
public ConfigValue<Boolean> debugMode;
public ConfigValue<Boolean> disableBroadcast;
public ConfigValue<Boolean> blockChatSpamSpeed;
public ConfigValue<Boolean> blockCommandSpamSpeed;
@@ -67,6 +68,7 @@ public class Config extends ConfigurationFile {
eventChains = new ConfigValue<Boolean>("system.event-chains");
enterprise = new ConfigValue<Boolean>("system.enterprise");
debugMode = new ConfigValue<Boolean>("system.debug-mode");
disableBroadcast = new ConfigValue<Boolean>("system.disable-broadcast");
blockChatSpamSpeed = new ConfigValue<Boolean>("spam.chat.block-speed");
blockChatSpamRepetition = new ConfigValue<Boolean>("spam.chat.block-repetition");
@@ -86,7 +88,6 @@ public class Config extends ConfigurationFile {
if (notifyEveryVl.getValue() < 1) {
notifyEveryVl.setValue(5);
}
maxSetbackDistance = new ConfigValue<Integer>("system.max-setback-distance");
if (maxSetbackDistance.getValue() < 5) {
maxSetbackDistance.setValue(50);
@@ -89,6 +89,7 @@ public class LoggingManager {
}
public void logToPlayers(String message) {
if(config.getConfig().disableBroadcast.getValue()) return;
for(Player player : Bukkit.getOnlinePlayers()) {
if (Permission.SYSTEM_NOTICE.get(player)) {
player.sendMessage(message);
@@ -96,7 +97,7 @@ public class LoggingManager {
}
}
private void logToLogs(String message) { // Yo dawg
private void logToLogs(String message) { // Yo dawg, you like logs?
logs.add(ChatColor.stripColor(message));
}
+2
View File
@@ -24,6 +24,8 @@ system:
# If silent mode is on, players will not be stopped when they try to hack, and AntiCheatReloaded will do everything possible to keep them unaware of their rising hack level.
# However, alerts will still be sent to console and to admins online, and events will still take place.
silent-mode: false
# Disable broadcasts about why a player was kicked.
disable-broadcast: false
# Should ops be exempt from all checks?
exempt-op: false
# Should AntiCheatReloaded track plugins in its own registered events?