all i've found so far is
{
long delayInMilliseconds = delayInMinutes * 60000L;
switch (state)
{
case NONE: // Remove Punishments
{
switch (_punishLevel)
{
case CHAT:
{
_punishLevel = state;
stopPunishTask(true);
sendPacket(new EtcStatusUpdate(this));
sendMessage("Your Chat ban has been lifted");
break;
}
case JAIL:
{
_punishLevel = state;
// Open a Html message to inform the player
NpcHtmlMessage htmlMsg = new NpcHtmlMessage(0);
String jailInfos = HtmCache.getInstance().getHtm(getHtmlPrefix(), "data/html/jail_out.htm");
if (jailInfos != null)
htmlMsg.setHtml(jailInfos);
else
htmlMsg.setHtml("<html><body>You are free for now, respect server rules!</body></html>");
sendPacket(htmlMsg);
stopPunishTask(true);
teleToLocation(17836, 170178, -3507, true); // Floran
break;
}
}
break;
}
case CHAT: // Chat Ban
{
// not allow player to escape jail using chat ban
if (_punishLevel == PunishLevel.JAIL)
break;
_punishLevel = state;
_punishTimer = 0;
sendPacket(new EtcStatusUpdate(this));
// Remove the task if any
stopPunishTask(false);
if (delayInMinutes > 0)
{
_punishTimer = delayInMilliseconds;
// start the countdown
_punishTask = ThreadPoolManager.getInstance().scheduleGeneral(new PunishTask(this), _punishTimer);
sendMessage("You are chat banned for "+delayInMinutes+" minutes.");
}
else
sendMessage("You have been chat banned");
break;
}
Any ideas how to change chatban time to 1s ??