Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: gameserver/head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminRecallAll.java
- ===================================================================
- --- gameserver/head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminRecallAll.java (revision 0)
- +++ gameserver/head-src/com/l2jfrozen/gameserver/handler/admincommandhandlers/AdminRecallAll.java (revision 0)
- @@ -0,0 +1,56 @@
- +/* This program is free software; you can redistribute it and/or modify
- + * it under the terms of the GNU General Public License as published by
- + * the Free Software Foundation; either version 2, or (at your option)
- + * any later version.
- + *
- + * This program is distributed in the hope that it will be useful,
- + * but WITHOUT ANY WARRANTY; without even the implied warranty of
- + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- + * GNU General Public License for more details.
- + *
- + * You should have received a copy of the GNU General Public License
- + * along with this program; if not, write to the Free Software
- + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- + * 02111-1307, USA.
- + *
- + * http://www.gnu.org/copyleft/gpl.html
- + */
- +package com.l2jfrozen.gameserver.handler.admincommandhandlers;
- +
- +import com.l2jfrozen.gameserver.handler.IAdminCommandHandler;
- +import com.l2jfrozen.gameserver.model.L2World;
- +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
- +
- +
- +
- +public class AdminRecallAll implements IAdminCommandHandler
- +{
- + private static final String[] ADMIN_COMMANDS = { "admin_recallall" };
- +
- + private void teleportTo(L2PcInstance activeChar, int x, int y, int z)
- + {
- +
- + activeChar.teleToLocation(x, y, z, false);
- +
- + }
- + public boolean useAdminCommand(String command, L2PcInstance activeChar)
- + {
- + int x = 0;
- + int y = 0;
- + int z = 0;
- +
- + if (command.startsWith("admin_recallall"))
- + {
- + for(L2PcInstance players :L2World.getInstance().getAllPlayers())
- + {
- + teleportTo(players, activeChar.getX(), activeChar.getY(), activeChar.getZ());
- + }
- + }
- + return false;
- + }
- + public String[] getAdminCommandList()
- + {
- + return ADMIN_COMMANDS;
- + }
- +}
- \ No newline at end of file
- Index: gameserver/head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java
- ===================================================================
- --- gameserver/head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java (revision 909)
- +++ gameserver/head-src/com/l2jfrozen/gameserver/handler/AdminCommandHandler.java (working copy)
- @@ -74,11 +75,13 @@
- import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminPledge;
- import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminPolymorph;
- import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminQuest;
- +import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminRecallAll;
- import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminReload;
- import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminRepairChar;
- import com.l2jfrozen.gameserver.handler.admincommandhandlers.AdminRes;
- @@ -131,6 +134,7 @@
- registerAdminCommandHandler(new AdminCreateItem());
- registerAdminCommandHandler(new AdminHeal());
- registerAdminCommandHandler(new AdminHelpPage());
- + registerAdminCommandHandler(new AdminRecallAll());
- registerAdminCommandHandler(new AdminShutdown());
- registerAdminCommandHandler(new AdminSpawn());
- registerAdminCommandHandler(new AdminSkill());
- depois e so add no banco de dados como sql
- INSERT INTO `admin_command_access_rights` VALUES ('admin_recallall', '1');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement