IItemHandler.java 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * This program is free software: you can redistribute it and/or modify it under
  3. * the terms of the GNU General Public License as published by the Free Software
  4. * Foundation, either version 3 of the License, or (at your option) any later
  5. * version.
  6. *
  7. * This program is distributed in the hope that it will be useful, but WITHOUT
  8. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  9. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  10. * details.
  11. *
  12. * You should have received a copy of the GNU General Public License along with
  13. * this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. package net.sf.l2j.gameserver.handler;
  16. import net.sf.l2j.gameserver.model.L2ItemInstance;
  17. import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
  18. /**
  19. * Mother class of all itemHandlers.<BR><BR>
  20. * an IItemHandler implementation has to be stateless
  21. *
  22. * @version $Revision: 1.1.4.3 $ $Date: 2005/03/27 15:30:09 $
  23. */
  24. public interface IItemHandler
  25. {
  26. /**
  27. * Launch task associated to the item.
  28. * @param activeChar : L2PlayableInstance designating the player
  29. * @param item : L2ItemInstance designating the item to use
  30. */
  31. public void useItem(L2PlayableInstance playable, L2ItemInstance item);
  32. /**
  33. * Returns the list of item IDs corresponding to the type of item.<BR><BR>
  34. * <B><I>Use :</I></U><BR>
  35. * This method is called at initialization to register all the item IDs automatically
  36. * @return int[] designating all itemIds for a type of item.
  37. */
  38. public int[] getItemIds();
  39. }