warc222

admindeport

Jan 27th, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.60 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P trunk2
  3. Index: gameserver/head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminDeport.java
  4. ===================================================================
  5. --- gameserver/head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminDeport.java (revision 0)
  6. +++ gameserver/head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminDeport.java (revision 0)
  7. @@ -0,0 +1,40 @@
  8. +package com.l2jfrozen.gameserver.handler.admincommandhandlers;
  9. +
  10. +import com.l2jfrozen.gameserver.handler.IAdminCommandHandler;
  11. +import com.l2jfrozen.gameserver.model.L2Object;
  12. +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
  13. +
  14. +/**
  15. + *
  16. + * @author Elfocrash
  17. + */
  18. +public class AdminDeport implements IAdminCommandHandler
  19. +{
  20. + private static String[] _adminCommands =
  21. + {
  22. + "admin_deport"
  23. + };
  24. +
  25. + @Override
  26. + public boolean useAdminCommand(String command, L2PcInstance activeChar)
  27. + {
  28. +
  29. + L2Object target = activeChar.getTarget();
  30. +
  31. + if(activeChar.getTarget() instanceof L2PcInstance)
  32. + {
  33. + if(command.startsWith("admin_deport"))
  34. + {
  35. + ((L2PcInstance) activeChar.getTarget()).teleToLocation(82698, 148638, -3473);
  36. + }
  37. + }
  38. + return false;
  39. +
  40. + }
  41. +
  42. + @Override
  43. + public String[] getAdminCommandList()
  44. + {
  45. + return _adminCommands;
  46. + }
  47. +}
  48. Index: gameserver/head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java
  49. ===================================================================
  50. --- gameserver/head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java (revision 909)
  51. +++ gameserver/head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java (working copy)
  52. @@ -40,6 +40,7 @@
  53. import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminCursedWeapons;
  54. import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminDMEngine;
  55. import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminDelete;
  56. +import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminDeport;
  57. import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminDonator;
  58. import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminDoorControl;
  59. import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminEditChar;
  60. @@ -173,6 +175,7 @@
  61. registerAdminCommandHandler(new AdminLogin());
  62. registerAdminCommandHandler(new AdminCache());
  63. registerAdminCommandHandler(new AdminLevel());
  64. + registerAdminCommandHandler(new AdminDeport());
  65. registerAdminCommandHandler(new AdminQuest());
  66. registerAdminCommandHandler(new AdminZone());
  67. registerAdminCommandHandler(new AdminCursedWeapons());
Add Comment
Please, Sign In to add comment