PandacraftUtils/src/net/mc_pandacraft/java/plugin/pandacraftutils/ConfigManager.java

75 lines
2.0 KiB
Java
Raw Normal View History

2014-11-22 17:18:10 +01:00
package net.mc_pandacraft.java.plugin.pandacraftutils;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/*
* Configuration du plugin
*/
public class ConfigManager {
private static ConfigManager instance;
public static ConfigManager getInstance() { return instance; }
@SuppressWarnings("unused")
2014-11-22 17:18:10 +01:00
private PandacraftUtils plugin;
public ConfigManager(File f, PandacraftUtils pl) {
plugin = pl;
instance = this;
initCommandAlias();
}
public int AFK_timeoutAutoAfkMessage = 60*5; // 5 min
public int AFK_timeoutAutoAfkKick = 60*10; // 10 min
public long AntiSpam_timeBeforeResendSameMessage = 30000;// 30 sec
public long AntiSpam_timeBeforeResendSameCommand = 30000;// 30 sec
public long AntiSpam_timePerCaracterForNewMessage = 100;// 0.1 sec
public int AntiSpam_maxViolationLevel = 20;
public int AntiSpam_nbSecondForOneVLDown = 10;
public List<Map<String, String>> CommandAlias_alias;
private void initCommandAlias() {
CommandAlias_alias = new ArrayList<Map<String, String>>();
Map<String, String> alias;
alias = new HashMap<String, String>();
alias.put("initialCommand", "/day");
alias.put("replaceWith", "/ptime day");
alias.put("permissions", "pandacraft.grade.users"); // multiple permission separated with semicolumn
CommandAlias_alias.add(alias);
alias = new HashMap<String, String>();
alias.put("initialCommand", "/night");
alias.put("replaceWith", "/ptime night");
alias.put("permissions", "pandacraft.grade.users");
CommandAlias_alias.add(alias);
alias = new HashMap<String, String>();
alias.put("initialCommand", "/time");
alias.put("replaceWith", "/ptime");
alias.put("permissions", "pandacraft.grade.users");
CommandAlias_alias.add(alias);
/*
Map<String, String> alias = new HashMap<String, String>();
alias.put("initialCommand", "");
alias.put("replaceWith", "");
alias.put("permissions", "");
CommandAlias_alias.add(alias);
*/
}
}