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; } 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> CommandAlias_alias; private void initCommandAlias() { CommandAlias_alias = new ArrayList>(); Map alias; alias = new HashMap(); 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(); alias.put("initialCommand", "/night"); alias.put("replaceWith", "/ptime night"); alias.put("permissions", "pandacraft.grade.users"); CommandAlias_alias.add(alias); alias = new HashMap(); alias.put("initialCommand", "/time"); alias.put("replaceWith", "/ptime"); alias.put("permissions", "pandacraft.grade.users"); CommandAlias_alias.add(alias); /* Map alias = new HashMap(); alias.put("initialCommand", ""); alias.put("replaceWith", ""); alias.put("permissions", ""); CommandAlias_alias.add(alias); */ } }