Removed admin debug command.
This commit is contained in:
		| @@ -95,9 +95,6 @@ | ||||
| 	<admin command="admin_cw_add" accessLevel="100" confirmDlg="true" /> | ||||
| 	<admin command="admin_cw_info_menu" accessLevel="100" /> | ||||
|  | ||||
| 	<!-- ADMIN DEBUG --> | ||||
| 	<admin command="admin_debug" accessLevel="100" /> | ||||
|  | ||||
| 	<!-- ADMIN DELETE --> | ||||
| 	<admin command="admin_delete" accessLevel="100" /> | ||||
|  | ||||
|   | ||||
| @@ -68,7 +68,6 @@ import handlers.admincommandhandlers.AdminClan; | ||||
| import handlers.admincommandhandlers.AdminClanHall; | ||||
| import handlers.admincommandhandlers.AdminCreateItem; | ||||
| import handlers.admincommandhandlers.AdminCursedWeapons; | ||||
| import handlers.admincommandhandlers.AdminDebug; | ||||
| import handlers.admincommandhandlers.AdminDelete; | ||||
| import handlers.admincommandhandlers.AdminDisconnect; | ||||
| import handlers.admincommandhandlers.AdminDoorControl; | ||||
| @@ -331,7 +330,6 @@ import handlers.usercommandhandlers.Unstuck; | ||||
| import handlers.voicedcommandhandlers.Banking; | ||||
| import handlers.voicedcommandhandlers.ChangePassword; | ||||
| import handlers.voicedcommandhandlers.ChatAdmin; | ||||
| import handlers.voicedcommandhandlers.Debug; | ||||
| import handlers.voicedcommandhandlers.Lang; | ||||
| import handlers.voicedcommandhandlers.Premium; | ||||
| import handlers.voicedcommandhandlers.StatsVCmd; | ||||
| @@ -400,7 +398,6 @@ public class MasterHandler | ||||
| 			AdminPcCondOverride.class, | ||||
| 			AdminCreateItem.class, | ||||
| 			AdminCursedWeapons.class, | ||||
| 			AdminDebug.class, | ||||
| 			AdminDelete.class, | ||||
| 			AdminDisconnect.class, | ||||
| 			AdminDoorControl.class, | ||||
| @@ -589,7 +586,6 @@ public class MasterHandler | ||||
| 			Config.BANKING_SYSTEM_ENABLED ? Banking.class : null, | ||||
| 			Config.CHAT_ADMIN ? ChatAdmin.class : null, | ||||
| 			Config.MULTILANG_ENABLE && Config.MULTILANG_VOICED_ALLOW ? Lang.class : null, | ||||
| 			Config.DEBUG_VOICE_COMMAND ? Debug.class : null, | ||||
| 			Config.ALLOW_CHANGE_PASSWORD ? ChangePassword.class : null, | ||||
| 			Config.PREMIUM_SYSTEM_ENABLED ? Premium.class : null, | ||||
| 		}, | ||||
|   | ||||
| @@ -1,85 +0,0 @@ | ||||
| /* | ||||
|  * This file is part of the L2J Mobius project. | ||||
|  *  | ||||
|  * 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 3 of the License, 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, see <http://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package handlers.admincommandhandlers; | ||||
|  | ||||
| import com.l2jmobius.gameserver.handler.IAdminCommandHandler; | ||||
| import com.l2jmobius.gameserver.model.L2Object; | ||||
| import com.l2jmobius.gameserver.model.L2World; | ||||
| import com.l2jmobius.gameserver.model.actor.L2Character; | ||||
| import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; | ||||
| import com.l2jmobius.gameserver.network.SystemMessageId; | ||||
|  | ||||
| public class AdminDebug implements IAdminCommandHandler | ||||
| { | ||||
| 	private static final String[] ADMIN_COMMANDS = | ||||
| 	{ | ||||
| 		"admin_debug" | ||||
| 	}; | ||||
| 	 | ||||
| 	@Override | ||||
| 	public final boolean useAdminCommand(String command, L2PcInstance activeChar) | ||||
| 	{ | ||||
| 		final String[] commandSplit = command.split(" "); | ||||
| 		if (ADMIN_COMMANDS[0].equalsIgnoreCase(commandSplit[0])) | ||||
| 		{ | ||||
| 			L2Object target; | ||||
| 			if (commandSplit.length > 1) | ||||
| 			{ | ||||
| 				target = L2World.getInstance().getPlayer(commandSplit[1].trim()); | ||||
| 				if (target == null) | ||||
| 				{ | ||||
| 					activeChar.sendPacket(SystemMessageId.THAT_PLAYER_IS_NOT_ONLINE); | ||||
| 					return true; | ||||
| 				} | ||||
| 			} | ||||
| 			else | ||||
| 			{ | ||||
| 				target = activeChar.getTarget(); | ||||
| 			} | ||||
| 			 | ||||
| 			if (target instanceof L2Character) | ||||
| 			{ | ||||
| 				setDebug(activeChar, (L2Character) target); | ||||
| 			} | ||||
| 			else | ||||
| 			{ | ||||
| 				setDebug(activeChar, activeChar); | ||||
| 			} | ||||
| 		} | ||||
| 		return true; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public final String[] getAdminCommandList() | ||||
| 	{ | ||||
| 		return ADMIN_COMMANDS; | ||||
| 	} | ||||
| 	 | ||||
| 	private final void setDebug(L2PcInstance activeChar, L2Character target) | ||||
| 	{ | ||||
| 		if (target.isDebug()) | ||||
| 		{ | ||||
| 			target.setDebug(null); | ||||
| 			activeChar.sendMessage("Stop debugging " + target.getName()); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			target.setDebug(activeChar); | ||||
| 			activeChar.sendMessage("Start debugging " + target.getName()); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| @@ -59,18 +59,15 @@ public final class ResistSkill extends AbstractEffect | ||||
| 		for (SkillHolder holder : _skills) | ||||
| 		{ | ||||
| 			effected.addIgnoreSkillEffects(holder); | ||||
| 			effected.sendDebugMessage("Applying invul against " + holder.getSkill()); | ||||
| 		} | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public void onExit(BuffInfo info) | ||||
| 	{ | ||||
| 		final L2Character effected = info.getEffected(); | ||||
| 		for (SkillHolder holder : _skills) | ||||
| 		{ | ||||
| 			info.getEffected().removeIgnoreSkillEffects(holder); | ||||
| 			effected.sendDebugMessage("Removing invul against " + holder.getSkill()); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|   | ||||
| @@ -1,59 +0,0 @@ | ||||
| /* | ||||
|  * This file is part of the L2J Mobius project. | ||||
|  *  | ||||
|  * 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 3 of the License, 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, see <http://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package handlers.voicedcommandhandlers; | ||||
|  | ||||
| import com.l2jmobius.gameserver.data.xml.impl.AdminData; | ||||
| import com.l2jmobius.gameserver.handler.IVoicedCommandHandler; | ||||
| import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; | ||||
|  | ||||
| public class Debug implements IVoicedCommandHandler | ||||
| { | ||||
| 	private static final String[] VOICED_COMMANDS = | ||||
| 	{ | ||||
| 		"debug" | ||||
| 	}; | ||||
| 	 | ||||
| 	@Override | ||||
| 	public boolean useVoicedCommand(String command, L2PcInstance activeChar, String params) | ||||
| 	{ | ||||
| 		if (!AdminData.getInstance().hasAccess(command, activeChar.getAccessLevel())) | ||||
| 		{ | ||||
| 			return false; | ||||
| 		} | ||||
| 		 | ||||
| 		if (VOICED_COMMANDS[0].equalsIgnoreCase(command)) | ||||
| 		{ | ||||
| 			if (activeChar.isDebug()) | ||||
| 			{ | ||||
| 				activeChar.setDebug(null); | ||||
| 				activeChar.sendMessage("Debugging disabled."); | ||||
| 			} | ||||
| 			else | ||||
| 			{ | ||||
| 				activeChar.setDebug(activeChar); | ||||
| 				activeChar.sendMessage("Debugging enabled."); | ||||
| 			} | ||||
| 		} | ||||
| 		return true; | ||||
| 	} | ||||
| 	 | ||||
| 	@Override | ||||
| 	public String[] getVoicedCommandList() | ||||
| 	{ | ||||
| 		return VOICED_COMMANDS; | ||||
| 	} | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDev
					MobiusDev