i passed whole code of chaos event and i had 0 errors .then i started event in game message appeard type .joinchaos to join and .leavechaos to leave but nothing happened the command didnt work...
code of commands:
/* 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 2, 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* http://www.gnu.org/copyleft/gpl.html
*/
package com.l2jfrozen.gameserver.handler.voicedcommandhandlers;
import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler;
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
import com.l2jfrozen.gameserver.model.entity.ChaosEvent;
/**
*
* @author Anarchy
*/
public class Chaos implements IVoicedCommandHandler
{
private static final String[] VOICED_COMMANDS = { "joinchaos", "leavechaos" };
@Override
public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
{
ChaosEvent chaos = new ChaosEvent();
if (command.startsWith("joinchaos"))
{
if (ChaosEvent._isChaosActive)
{
chaos.registerToChaos(activeChar);
return true;
}
activeChar.sendMessage("Chaos Event is not currently active.");
return false;
}
if (command.startsWith("leavechaos"))
{
if (ChaosEvent._isChaosActive)
{
chaos.removeFromChaos(activeChar);
return true;
}
activeChar.sendMessage("Chaos Event is not currently active.");
return false;
}
return true;
}
@Override
public String[] getVoicedCommandList()
{
return VOICED_COMMANDS;
}
}
DISCORD :
https://discord.com/users/325653525793210378
utchiha_market
telegram :
https://t.me/utchiha_market
SELLIX STORE :
https://utchihamkt.mysellix.io/
Join our server for more products :
https://discord.gg/uthciha-services
https://campsite.bio/utchihaamkt
Question
aris96
i passed whole code of chaos event and i had 0 errors .then i started event in game message appeard type .joinchaos to join and .leavechaos to leave but nothing happened the command didnt work...
code of commands:
5 answers to this question
Recommended Posts