|
지금 회원가입하고 더 많은 자료를 공유해보아요.
다운로드하거나 보려면 로그인해야 합니다. 계정이 없으신가요? 회원 가입
×
코드 테스트...
- package com.l2jserver.gameserver.handler.usercommandhandlers;
- import com.l2jserver.gameserver.handler.IUserCommandHandler;
- import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
- import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
- public class UserInfo implements IUserCommandHandler
- {
- private static final int COMMAND_ID = 1001; // ID do comando pode ser qualquer número único.
- @Override
- public boolean useUserCommand(int id, L2PcInstance activeChar)
- {
- if (id != COMMAND_ID)
- return false;
- NpcHtmlMessage html = new NpcHtmlMessage(1);
- html.setHtml("<html><body>" +
- "<center>Informações do Servidor</center>" +
- "<br>" +
- "Bem-vindo ao nosso servidor customizado de Lineage 2!" +
- "<br>" +
- "<a action="bypass -h user_command_home">Voltar</a>" +
- "</body></html>");
- activeChar.sendPacket(html);
- return true;
- }
- @Override
- public int[] getUserCommandList()
- {
- return new int[] { COMMAND_ID };
- }
- }
코드 복사
|
|