CustomPacketHandlerInterface.java 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 it under
  10. * the terms of the GNU General Public License as published by the Free Software
  11. * Foundation, either version 3 of the License, or (at your option) any later
  12. * version.
  13. *
  14. * This program is distributed in the hope that it will be useful, but WITHOUT
  15. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  16. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  17. * details.
  18. *
  19. * You should have received a copy of the GNU General Public License along with
  20. * this program. If not, see <http://www.gnu.org/licenses/>.
  21. */
  22. package com.l2jserver.gameserver;
  23. import java.nio.ByteBuffer;
  24. import com.l2jserver.gameserver.network.L2GameClient;
  25. import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket;
  26. /**
  27. * This interface can be implemented by custom extensions to l2j to get packets
  28. * before the normal processing of PacketHandler
  29. *
  30. * @version $Revision: $ $Date: $
  31. * @author galun
  32. */
  33. public interface CustomPacketHandlerInterface
  34. {
  35. /**
  36. * interface for a custom packethandler to ckeck received packets
  37. * PacketHandler will take care of the packet if this function returns null.
  38. * @param data the packet
  39. * @param client the ClientThread
  40. * @return a ClientBasePacket if the packet has been processed, null otherwise
  41. */
  42. public L2GameClientPacket handlePacket(ByteBuffer data, L2GameClient client);
  43. }