Jump to content

Recommended Posts

Posted (edited)

It is also a requirement for my other share:

Note: Inorder to get a better idea of what is happening check the above share to  see how it works.

 

credits: me.

 

RequestBypassToServer.java

	else if (_command.startsWith("menu_") || _command.startsWith("_menu"))
      {
       UsermenuHandler.getInstance().handleCommands(getClient(), _command);
      }

 

UsermenuHandler.java

package net.sf.l2j.gameserver.custom.usermenu.managers;
 
 
import net.sf.l2j.gameserver.custom.usermenu.menuhandlers.NewsHandler;
 
import net.sf.l2j.gameserver.model.actor.instance.Player;
import net.sf.l2j.gameserver.network.L2GameClient;
 
 
/**
 * @author LordPanic
 *
 */
public class UsermenuHandler
{
	protected UsermenuHandler(){
 
	}
 
	public static UsermenuHandler getInstance()
	{
		return SingletonHolder._instance;
	}
 
 
	public void handleCommands(L2GameClient client, String command)
	{
		final Player activeChar = client.getActiveChar();
		if (activeChar == null)
			return;
 
		if(command.startsWith("_menuNewsPage") || command.startsWith("_menuNewsPost")) {
			NewsHandler.getInstance().parseCmd(command, activeChar);
		}
			else {
			activeChar.sendMessage("The command: " + command + " isn't implemented.");
			activeChar.sendMessage("error KAPPA");
			}
	}
 
	private static class SingletonHolder
	{
		protected static final UsermenuHandler _instance = new UsermenuHandler();
	}
 
}

 

Edited by LordPanic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock