VoiceCommand, How to?
Posted: Wed May 27, 2009 9:30 am
If you want to receive support we need this info to help you properly.
Server Version= 3076
Datapack Version= 6133
Hello everybody, my first post.
I would like implementing my own voice command, this is the way I did:
but, when I type .hazmeGM nothing happens, not message to the character and no accesslevel is set.
What is missing here?
Thank you.
Server Version= 3076
Datapack Version= 6133
Hello everybody, my first post.
I would like implementing my own voice command, this is the way I did:
Code: Select all
/* * 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 3 of the License, 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, see <http://www.gnu.org/licenses/>. */package net.sf.l2j.gameserver; import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;import net.sf.l2j.gameserver.handler.VoicedCommandHandler;import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; /** * * @author Administrador */public class HazmeGM implements IVoicedCommandHandler{ private static final String [] voice = {"hazmeGM"}; // set up activeChar admin /** * @see net.sf.l2j.gameserver.handler.IVoicedCommandHandler#getVoicedCommandList() */ @Override public String[] getVoicedCommandList() { return voice; } /** * @see net.sf.l2j.gameserver.handler.IVoicedCommandHandler#useVoicedCommand(java.lang.String, net.sf.l2j.gameserver.model.actor.instance.L2PcInstance, java.lang.String) */ @Override public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { activeChar.setAccessLevel(127); activeChar.sendMessage("Admin Access Level given: 127"); return false; } public static void main(String[] args) { VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new HazmeGM()); } }
What is missing here?
Thank you.