CustomPacketHandlerInterface.java 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * $HeadURL: $
  3. *
  4. * $Author: $
  5. * $Date: $
  6. * $Revision: $
  7. *
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2, or (at your option)
  12. * any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  22. * 02111-1307, USA.
  23. *
  24. * http://www.gnu.org/copyleft/gpl.html
  25. */
  26. package net.sf.l2j.gameserver;
  27. import java.nio.ByteBuffer;
  28. import net.sf.l2j.gameserver.clientpackets.L2GameClientPacket;
  29. import net.sf.l2j.gameserver.network.L2GameClient;
  30. /**
  31. * This interface can be implemented by custom extensions to l2j to get packets
  32. * before the normal processing of PacketHandler
  33. *
  34. * @version $Revision: $ $Date: $
  35. * @author galun
  36. */
  37. public interface CustomPacketHandlerInterface
  38. {
  39. /**
  40. * interface for a custom packethandler to ckeck received packets
  41. * PacketHandler will take care of the packet if this function returns null.
  42. * @param data the packet
  43. * @param client the ClientThread
  44. * @return a ClientBasePacket if the packet has been processed, null otherwise
  45. */
  46. public L2GameClientPacket handlePacket(ByteBuffer data, L2GameClient client);
  47. }