Advertisement
ChristianSDM

Recall l2jfrozen

Apr 16th, 2020
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.58 KB | None | 0 0
  1. Index: gameserver/head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminRecallAll.java
  2.  
  3. ===================================================================
  4.  
  5. --- gameserver/head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminRecallAll.java (revision 0)
  6.  
  7. +++ gameserver/head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminRecallAll.java (revision 0)
  8.  
  9. @@ -0,0 +1,56 @@
  10.  
  11. +/* This program is free software; you can redistribute it and/or modify
  12. + * it under the terms of the GNU General Public License as published by
  13. + * the Free Software Foundation; either version 2, or (at your option)
  14. + * any later version.
  15. + *
  16. + * This program is distributed in the hope that it will be useful,
  17. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. + * GNU General Public License for more details.
  20. + *
  21. + * You should have received a copy of the GNU General Public License
  22. + * along with this program; if not, write to the Free Software
  23. + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  24. + * 02111-1307, USA.
  25. + *
  26. + * http://www.gnu.org/copyleft/gpl.html
  27. + */
  28. +package com.l2jfrozen.gameserver.handler.admincommandhandlers;
  29. +
  30. +import com.l2jfrozen.gameserver.handler.IAdminCommandHandler;
  31. +import com.l2jfrozen.gameserver.model.L2World;
  32. +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
  33. +
  34. +
  35. +
  36. +public class AdminRecallAll implements IAdminCommandHandler
  37. +{
  38. + private static final String[] ADMIN_COMMANDS = { "admin_recallall" };
  39. +
  40. + private void teleportTo(L2PcInstance activeChar, int x, int y, int z)
  41. + {
  42. +
  43. + activeChar.teleToLocation(x, y, z, false);
  44. +
  45. + }
  46. + public boolean useAdminCommand(String command, L2PcInstance activeChar)
  47. + {
  48. + int x = 0;
  49. + int y = 0;
  50. + int z = 0;
  51. +
  52. + if (command.startsWith("admin_recallall"))
  53. + {
  54. + for(L2PcInstance players :L2World.getInstance().getAllPlayers())
  55. + {
  56. + teleportTo(players, activeChar.getX(), activeChar.getY(), activeChar.getZ());
  57. + }
  58. + }
  59. + return false;
  60. + }
  61. + public String[] getAdminCommandList()
  62. + {
  63. + return ADMIN_COMMANDS;
  64. + }
  65. +}
  66.  
  67. \ No newline at end of file
  68.  
  69. Index: gameserver/head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java
  70.  
  71. ===================================================================
  72.  
  73. --- gameserver/head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java (revision 909)
  74.  
  75. +++ gameserver/head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java (working copy)
  76.  
  77. @@ -74,11 +75,13 @@
  78.  
  79. import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminPledge;
  80.  
  81. import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminPolymorph;
  82.  
  83. import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminQuest;
  84.  
  85. +import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminRecallAll;
  86.  
  87. import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminReload;
  88.  
  89. import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminRepairChar;
  90.  
  91. import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminRes;
  92.  
  93. @@ -131,6 +134,7 @@
  94.  
  95. registerAdminCommandHandler(new AdminCreateItem());
  96.  
  97. registerAdminCommandHandler(new AdminHeal());
  98.  
  99. registerAdminCommandHandler(new AdminHelpPage());
  100.  
  101. + registerAdminCommandHandler(new AdminRecallAll());
  102.  
  103. registerAdminCommandHandler(new AdminShutdown());
  104.  
  105. registerAdminCommandHandler(new AdminSpawn());
  106.  
  107. registerAdminCommandHandler(new AdminSkill());
  108.  
  109.  
  110.  
  111. depois e so add no banco de dados como sql
  112.  
  113.  
  114.  
  115. INSERT INTO `admin_command_access_rights` VALUES ('admin_recallall', '1');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement