/* * AntiCheatReloaded for Bukkit and Spigot. * Copyright (c) 2012-2015 AntiCheat Team * Copyright (c) 2016-2020 Rammelkast * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ package com.rammelkast.anticheatreloaded.config.files; import java.util.List; import com.rammelkast.anticheatreloaded.AntiCheatReloaded; import com.rammelkast.anticheatreloaded.config.Configuration; import com.rammelkast.anticheatreloaded.config.ConfigurationFile; public class Config extends ConfigurationFile { public static final String FILENAME = "config.yml"; public ConfigValue logToConsole; public ConfigValue verboseStartup; public ConfigValue silentMode; public ConfigValue exemptOp; public ConfigValue eventChains; public ConfigValue enterprise; public ConfigValue debugMode; public ConfigValue disableBroadcast; public ConfigValue blockChatSpamSpeed; public ConfigValue blockCommandSpamSpeed; public ConfigValue blockChatSpamRepetition; public ConfigValue blockCommandSpamRepetition; public ConfigValue chatSpamActionOne; public ConfigValue chatSpamActionTwo; public ConfigValue commandSpamActionOne; public ConfigValue commandSpamActionTwo; public ConfigValue logToFile; public ConfigValue> disabledWorlds; public ConfigValue notifyEveryVl; public ConfigValue maxSetbackDistance; public Config(AntiCheatReloaded plugin, Configuration config) { super(plugin, config, FILENAME); } @Override public void open() { logToConsole = new ConfigValue("system.log-to-console"); verboseStartup = new ConfigValue("system.verbose-startup"); silentMode = new ConfigValue("system.silent-mode"); exemptOp = new ConfigValue("system.exempt-op"); eventChains = new ConfigValue("system.event-chains"); enterprise = new ConfigValue("system.enterprise"); debugMode = new ConfigValue("system.debug-mode"); disableBroadcast = new ConfigValue("system.disable-broadcast"); blockChatSpamSpeed = new ConfigValue("spam.chat.block-speed"); blockChatSpamRepetition = new ConfigValue("spam.chat.block-repetition"); chatSpamActionOne = new ConfigValue("spam.chat.action-one"); chatSpamActionTwo = new ConfigValue("spam.chat.action-two"); blockCommandSpamSpeed = new ConfigValue("spam.command.block-speed"); blockCommandSpamRepetition = new ConfigValue("spam.command.block-repetition"); commandSpamActionOne = new ConfigValue("spam.command.action-one"); commandSpamActionTwo = new ConfigValue("spam.command.action-two"); logToFile = new ConfigValue("system.log-to-file"); disabledWorlds = new ConfigValue>("disable-in"); notifyEveryVl = new ConfigValue("system.notify-every-vl"); if (notifyEveryVl.getValue() < 1) { notifyEveryVl.setValue(5); } maxSetbackDistance = new ConfigValue("system.max-setback-distance"); if (maxSetbackDistance.getValue() < 5) { maxSetbackDistance.setValue(50); } } }