All pastes #990833 Raw Edit

Unnamed

public java v1 · immutable
#990833 ·published 2008-04-20 13:58 UTC
rendered paste body
        if (_text.startsWith(".") && !_text.startsWith("@") &&        		_type == SystemChatChannelId.Chat_Normal)        {        	String [] _commandParams = _text.split(" ");        	String command = _commandParams[0].substring(1);        	String params = "";        	// if entered "command text"        	if (_commandParams.length > 1)        		params = _text.substring(1 + command.length()).trim(); // get all text        	else        		if (activeChar.getTarget()!=null) params=activeChar.getTarget().getName();        	IVoicedCommandHandler vch = VoicedCommandHandler.getInstance().getVoicedCommandHandler(command);        	if (vch != null)         		vch.useVoicedCommand(command, activeChar, params);        	else        		_log.warn("No handler registered for voice command '"+command+"'");        	return;        }        // Some custom implementation to show how to add channels