Riizade/config file (#520)
* added POJO + yaml file * made config members public * switched to yaml * modified files to use YamlConfig over ServerConstants * removed constants from ServerConstants * removed unused imports * removed unused import * removed world ini * removed now unused .ini files * fixed docker-launch.sh * added jackson dependency JARs * fixed errors * removed unused server config values, added world defaults * don't use env variables for docker * fixed package imports/specifiers for js files
This commit is contained in:
committed by
Ronan Lana
parent
e169971384
commit
181573dc74
@@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
package client.autoban;
|
||||
|
||||
import client.MapleCharacter;
|
||||
import config.YamlConfig;
|
||||
import constants.ServerConstants;
|
||||
import net.server.Server;
|
||||
import tools.FilePrinter;
|
||||
@@ -84,19 +85,19 @@ public enum AutobanFactory {
|
||||
}
|
||||
|
||||
public void alert(MapleCharacter chr, String reason) {
|
||||
if(ServerConstants.USE_AUTOBAN == true) {
|
||||
if(YamlConfig.config.server.USE_AUTOBAN == true) {
|
||||
if (chr != null && MapleLogger.ignored.contains(chr.getId())){
|
||||
return;
|
||||
}
|
||||
Server.getInstance().broadcastGMMessage((chr != null ? chr.getWorld() : 0), MaplePacketCreator.sendYellowTip((chr != null ? MapleCharacter.makeMapleReadable(chr.getName()) : "") + " caused " + this.name() + " " + reason));
|
||||
}
|
||||
if (ServerConstants.USE_AUTOBAN_LOG) {
|
||||
if (YamlConfig.config.server.USE_AUTOBAN_LOG) {
|
||||
FilePrinter.print(FilePrinter.AUTOBAN_WARNING, (chr != null ? MapleCharacter.makeMapleReadable(chr.getName()) : "") + " caused " + this.name() + " " + reason);
|
||||
}
|
||||
}
|
||||
|
||||
public void autoban(MapleCharacter chr, String value) {
|
||||
if(ServerConstants.USE_AUTOBAN == true) {
|
||||
if(YamlConfig.config.server.USE_AUTOBAN == true) {
|
||||
chr.autoban("Autobanned for (" + this.name() + ": " + value + ")");
|
||||
//chr.sendPolice("You will be disconnected for (" + this.name() + ": " + value + ")");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user