LordPanic Posted May 10, 2021 Posted May 10, 2021 (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 May 10, 2021 by LordPanic Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.