andreivoinea93

Untitled

May 22nd, 2012
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. /*
  2. * This program is free software; you can redistribute it and/or modify
  3. * it under the terms of the GNU General Public License as published by
  4. * the Free Software Foundation; either version 2, or (at your option)
  5. * any later version.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. * You should have received a copy of the GNU General Public License
  13. * along with this program; if not, write to the Free Software
  14. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  15. * 02111-1307, USA.
  16. *
  17. * http://www.gnu.org/copyleft/gpl.html
  18. */
  19. package handlers.admincommandhandlers;
  20.  
  21. import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
  22. import net.sf.l2j.gameserver.instancemanager.TownWar;
  23. import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  24.  
  25. /**
  26. * This class handles following admin commands: - delete = deletes target
  27. *
  28. * @version $Revision: 1.2.2.1.2.4 $ $Date: 2005/04/11 10:05:56 $
  29. */
  30. public class AdminTownWar implements IAdminCommandHandler
  31. {
  32. private static final String[] ADMIN_COMMANDS =
  33. {
  34. "admin_tw_start",
  35. "admin_tw_end"
  36. };
  37.  
  38. public boolean useAdminCommand(String command, L2PcInstance activeChar)
  39. {
  40.  
  41. if (command.startsWith("admin_tw_start"))
  42. TownWar.getInstance().init(activeChar);
  43. else if (command.startsWith("admin_tw_end"))
  44. TownWar.getInstance().end(activeChar);
  45. return true;
  46. }
  47.  
  48. public String[] getAdminCommandList()
  49. {
  50. return ADMIN_COMMANDS;
  51. }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment