Addition of admin destroy item commands.
This commit is contained in:
parent
a71fc06246
commit
2b6b397700
@ -96,6 +96,12 @@
|
|||||||
<!-- ADMIN DELETE -->
|
<!-- ADMIN DELETE -->
|
||||||
<admin command="admin_delete" accessLevel="100" />
|
<admin command="admin_delete" accessLevel="100" />
|
||||||
|
|
||||||
|
<!-- ADMIN DESTROY ITEMS -->
|
||||||
|
<admin command="admin_destroy_items" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroy_all_items" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroyitems" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroyallitems" accessLevel="100" confirmDlg="true" />
|
||||||
|
|
||||||
<!-- ADMIN DISCONNECT -->
|
<!-- ADMIN DISCONNECT -->
|
||||||
<admin command="admin_character_disconnect" accessLevel="100" />
|
<admin command="admin_character_disconnect" accessLevel="100" />
|
||||||
|
|
||||||
|
@ -69,6 +69,7 @@ import handlers.admincommandhandlers.AdminClanHall;
|
|||||||
import handlers.admincommandhandlers.AdminCreateItem;
|
import handlers.admincommandhandlers.AdminCreateItem;
|
||||||
import handlers.admincommandhandlers.AdminCursedWeapons;
|
import handlers.admincommandhandlers.AdminCursedWeapons;
|
||||||
import handlers.admincommandhandlers.AdminDelete;
|
import handlers.admincommandhandlers.AdminDelete;
|
||||||
|
import handlers.admincommandhandlers.AdminDestroyItems;
|
||||||
import handlers.admincommandhandlers.AdminDisconnect;
|
import handlers.admincommandhandlers.AdminDisconnect;
|
||||||
import handlers.admincommandhandlers.AdminDoorControl;
|
import handlers.admincommandhandlers.AdminDoorControl;
|
||||||
import handlers.admincommandhandlers.AdminEditChar;
|
import handlers.admincommandhandlers.AdminEditChar;
|
||||||
@ -403,6 +404,7 @@ public class MasterHandler
|
|||||||
AdminCreateItem.class,
|
AdminCreateItem.class,
|
||||||
AdminCursedWeapons.class,
|
AdminCursedWeapons.class,
|
||||||
AdminDelete.class,
|
AdminDelete.class,
|
||||||
|
AdminDestroyItems.class,
|
||||||
AdminDisconnect.class,
|
AdminDisconnect.class,
|
||||||
AdminDoorControl.class,
|
AdminDoorControl.class,
|
||||||
AdminEditChar.class,
|
AdminEditChar.class,
|
||||||
|
@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* 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.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.itemcontainer.PcInventory;
|
||||||
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
|
import com.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class AdminDestroyItems implements IAdminCommandHandler
|
||||||
|
{
|
||||||
|
private static final String[] ADMIN_COMMANDS =
|
||||||
|
{
|
||||||
|
"admin_destroy_items",
|
||||||
|
"admin_destroy_all_items",
|
||||||
|
"admin_destroyitems",
|
||||||
|
"admin_destroyallitems"
|
||||||
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean useAdminCommand(String command, L2PcInstance activeChar)
|
||||||
|
{
|
||||||
|
final PcInventory inventory = activeChar.getInventory();
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
for (L2ItemInstance item : inventory.getItems())
|
||||||
|
{
|
||||||
|
if (item.isEquipped() && !command.contains("all"))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
iu.addRemovedItem(item);
|
||||||
|
inventory.destroyItem("Admin Destroy", item, activeChar, null);
|
||||||
|
}
|
||||||
|
activeChar.sendPacket(iu);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getAdminCommandList()
|
||||||
|
{
|
||||||
|
return ADMIN_COMMANDS;
|
||||||
|
}
|
||||||
|
}
|
@ -96,6 +96,12 @@
|
|||||||
<!-- ADMIN DELETE -->
|
<!-- ADMIN DELETE -->
|
||||||
<admin command="admin_delete" accessLevel="100" />
|
<admin command="admin_delete" accessLevel="100" />
|
||||||
|
|
||||||
|
<!-- ADMIN DESTROY ITEMS -->
|
||||||
|
<admin command="admin_destroy_items" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroy_all_items" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroyitems" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroyallitems" accessLevel="100" confirmDlg="true" />
|
||||||
|
|
||||||
<!-- ADMIN DISCONNECT -->
|
<!-- ADMIN DISCONNECT -->
|
||||||
<admin command="admin_character_disconnect" accessLevel="100" />
|
<admin command="admin_character_disconnect" accessLevel="100" />
|
||||||
|
|
||||||
|
@ -69,6 +69,7 @@ import handlers.admincommandhandlers.AdminClanHall;
|
|||||||
import handlers.admincommandhandlers.AdminCreateItem;
|
import handlers.admincommandhandlers.AdminCreateItem;
|
||||||
import handlers.admincommandhandlers.AdminCursedWeapons;
|
import handlers.admincommandhandlers.AdminCursedWeapons;
|
||||||
import handlers.admincommandhandlers.AdminDelete;
|
import handlers.admincommandhandlers.AdminDelete;
|
||||||
|
import handlers.admincommandhandlers.AdminDestroyItems;
|
||||||
import handlers.admincommandhandlers.AdminDisconnect;
|
import handlers.admincommandhandlers.AdminDisconnect;
|
||||||
import handlers.admincommandhandlers.AdminDoorControl;
|
import handlers.admincommandhandlers.AdminDoorControl;
|
||||||
import handlers.admincommandhandlers.AdminEditChar;
|
import handlers.admincommandhandlers.AdminEditChar;
|
||||||
@ -404,6 +405,7 @@ public class MasterHandler
|
|||||||
AdminCreateItem.class,
|
AdminCreateItem.class,
|
||||||
AdminCursedWeapons.class,
|
AdminCursedWeapons.class,
|
||||||
AdminDelete.class,
|
AdminDelete.class,
|
||||||
|
AdminDestroyItems.class,
|
||||||
AdminDisconnect.class,
|
AdminDisconnect.class,
|
||||||
AdminDoorControl.class,
|
AdminDoorControl.class,
|
||||||
AdminEditChar.class,
|
AdminEditChar.class,
|
||||||
|
@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* 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.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.itemcontainer.PcInventory;
|
||||||
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
|
import com.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class AdminDestroyItems implements IAdminCommandHandler
|
||||||
|
{
|
||||||
|
private static final String[] ADMIN_COMMANDS =
|
||||||
|
{
|
||||||
|
"admin_destroy_items",
|
||||||
|
"admin_destroy_all_items",
|
||||||
|
"admin_destroyitems",
|
||||||
|
"admin_destroyallitems"
|
||||||
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean useAdminCommand(String command, L2PcInstance activeChar)
|
||||||
|
{
|
||||||
|
final PcInventory inventory = activeChar.getInventory();
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
for (L2ItemInstance item : inventory.getItems())
|
||||||
|
{
|
||||||
|
if (item.isEquipped() && !command.contains("all"))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
iu.addRemovedItem(item);
|
||||||
|
inventory.destroyItem("Admin Destroy", item, activeChar, null);
|
||||||
|
}
|
||||||
|
activeChar.sendPacket(iu);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getAdminCommandList()
|
||||||
|
{
|
||||||
|
return ADMIN_COMMANDS;
|
||||||
|
}
|
||||||
|
}
|
@ -96,6 +96,12 @@
|
|||||||
<!-- ADMIN DELETE -->
|
<!-- ADMIN DELETE -->
|
||||||
<admin command="admin_delete" accessLevel="100" />
|
<admin command="admin_delete" accessLevel="100" />
|
||||||
|
|
||||||
|
<!-- ADMIN DESTROY ITEMS -->
|
||||||
|
<admin command="admin_destroy_items" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroy_all_items" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroyitems" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroyallitems" accessLevel="100" confirmDlg="true" />
|
||||||
|
|
||||||
<!-- ADMIN DISCONNECT -->
|
<!-- ADMIN DISCONNECT -->
|
||||||
<admin command="admin_character_disconnect" accessLevel="100" />
|
<admin command="admin_character_disconnect" accessLevel="100" />
|
||||||
|
|
||||||
|
@ -69,6 +69,7 @@ import handlers.admincommandhandlers.AdminClanHall;
|
|||||||
import handlers.admincommandhandlers.AdminCreateItem;
|
import handlers.admincommandhandlers.AdminCreateItem;
|
||||||
import handlers.admincommandhandlers.AdminCursedWeapons;
|
import handlers.admincommandhandlers.AdminCursedWeapons;
|
||||||
import handlers.admincommandhandlers.AdminDelete;
|
import handlers.admincommandhandlers.AdminDelete;
|
||||||
|
import handlers.admincommandhandlers.AdminDestroyItems;
|
||||||
import handlers.admincommandhandlers.AdminDisconnect;
|
import handlers.admincommandhandlers.AdminDisconnect;
|
||||||
import handlers.admincommandhandlers.AdminDoorControl;
|
import handlers.admincommandhandlers.AdminDoorControl;
|
||||||
import handlers.admincommandhandlers.AdminEditChar;
|
import handlers.admincommandhandlers.AdminEditChar;
|
||||||
@ -405,6 +406,7 @@ public class MasterHandler
|
|||||||
AdminCreateItem.class,
|
AdminCreateItem.class,
|
||||||
AdminCursedWeapons.class,
|
AdminCursedWeapons.class,
|
||||||
AdminDelete.class,
|
AdminDelete.class,
|
||||||
|
AdminDestroyItems.class,
|
||||||
AdminDisconnect.class,
|
AdminDisconnect.class,
|
||||||
AdminDoorControl.class,
|
AdminDoorControl.class,
|
||||||
AdminEditChar.class,
|
AdminEditChar.class,
|
||||||
|
@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* 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.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.itemcontainer.PcInventory;
|
||||||
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
|
import com.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class AdminDestroyItems implements IAdminCommandHandler
|
||||||
|
{
|
||||||
|
private static final String[] ADMIN_COMMANDS =
|
||||||
|
{
|
||||||
|
"admin_destroy_items",
|
||||||
|
"admin_destroy_all_items",
|
||||||
|
"admin_destroyitems",
|
||||||
|
"admin_destroyallitems"
|
||||||
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean useAdminCommand(String command, L2PcInstance activeChar)
|
||||||
|
{
|
||||||
|
final PcInventory inventory = activeChar.getInventory();
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
for (L2ItemInstance item : inventory.getItems())
|
||||||
|
{
|
||||||
|
if (item.isEquipped() && !command.contains("all"))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
iu.addRemovedItem(item);
|
||||||
|
inventory.destroyItem("Admin Destroy", item, activeChar, null);
|
||||||
|
}
|
||||||
|
activeChar.sendPacket(iu);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getAdminCommandList()
|
||||||
|
{
|
||||||
|
return ADMIN_COMMANDS;
|
||||||
|
}
|
||||||
|
}
|
@ -96,6 +96,12 @@
|
|||||||
<!-- ADMIN DELETE -->
|
<!-- ADMIN DELETE -->
|
||||||
<admin command="admin_delete" accessLevel="100" />
|
<admin command="admin_delete" accessLevel="100" />
|
||||||
|
|
||||||
|
<!-- ADMIN DESTROY ITEMS -->
|
||||||
|
<admin command="admin_destroy_items" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroy_all_items" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroyitems" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroyallitems" accessLevel="100" confirmDlg="true" />
|
||||||
|
|
||||||
<!-- ADMIN DISCONNECT -->
|
<!-- ADMIN DISCONNECT -->
|
||||||
<admin command="admin_character_disconnect" accessLevel="100" />
|
<admin command="admin_character_disconnect" accessLevel="100" />
|
||||||
|
|
||||||
|
@ -69,6 +69,7 @@ import handlers.admincommandhandlers.AdminClanHall;
|
|||||||
import handlers.admincommandhandlers.AdminCreateItem;
|
import handlers.admincommandhandlers.AdminCreateItem;
|
||||||
import handlers.admincommandhandlers.AdminCursedWeapons;
|
import handlers.admincommandhandlers.AdminCursedWeapons;
|
||||||
import handlers.admincommandhandlers.AdminDelete;
|
import handlers.admincommandhandlers.AdminDelete;
|
||||||
|
import handlers.admincommandhandlers.AdminDestroyItems;
|
||||||
import handlers.admincommandhandlers.AdminDisconnect;
|
import handlers.admincommandhandlers.AdminDisconnect;
|
||||||
import handlers.admincommandhandlers.AdminDoorControl;
|
import handlers.admincommandhandlers.AdminDoorControl;
|
||||||
import handlers.admincommandhandlers.AdminEditChar;
|
import handlers.admincommandhandlers.AdminEditChar;
|
||||||
@ -405,6 +406,7 @@ public class MasterHandler
|
|||||||
AdminCreateItem.class,
|
AdminCreateItem.class,
|
||||||
AdminCursedWeapons.class,
|
AdminCursedWeapons.class,
|
||||||
AdminDelete.class,
|
AdminDelete.class,
|
||||||
|
AdminDestroyItems.class,
|
||||||
AdminDisconnect.class,
|
AdminDisconnect.class,
|
||||||
AdminDoorControl.class,
|
AdminDoorControl.class,
|
||||||
AdminEditChar.class,
|
AdminEditChar.class,
|
||||||
|
@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* 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.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.itemcontainer.PcInventory;
|
||||||
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
|
import com.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class AdminDestroyItems implements IAdminCommandHandler
|
||||||
|
{
|
||||||
|
private static final String[] ADMIN_COMMANDS =
|
||||||
|
{
|
||||||
|
"admin_destroy_items",
|
||||||
|
"admin_destroy_all_items",
|
||||||
|
"admin_destroyitems",
|
||||||
|
"admin_destroyallitems"
|
||||||
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean useAdminCommand(String command, L2PcInstance activeChar)
|
||||||
|
{
|
||||||
|
final PcInventory inventory = activeChar.getInventory();
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
for (L2ItemInstance item : inventory.getItems())
|
||||||
|
{
|
||||||
|
if (item.isEquipped() && !command.contains("all"))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
iu.addRemovedItem(item);
|
||||||
|
inventory.destroyItem("Admin Destroy", item, activeChar, null);
|
||||||
|
}
|
||||||
|
activeChar.sendPacket(iu);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getAdminCommandList()
|
||||||
|
{
|
||||||
|
return ADMIN_COMMANDS;
|
||||||
|
}
|
||||||
|
}
|
@ -96,6 +96,12 @@
|
|||||||
<!-- ADMIN DELETE -->
|
<!-- ADMIN DELETE -->
|
||||||
<admin command="admin_delete" accessLevel="100" />
|
<admin command="admin_delete" accessLevel="100" />
|
||||||
|
|
||||||
|
<!-- ADMIN DESTROY ITEMS -->
|
||||||
|
<admin command="admin_destroy_items" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroy_all_items" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroyitems" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroyallitems" accessLevel="100" confirmDlg="true" />
|
||||||
|
|
||||||
<!-- ADMIN DISCONNECT -->
|
<!-- ADMIN DISCONNECT -->
|
||||||
<admin command="admin_character_disconnect" accessLevel="100" />
|
<admin command="admin_character_disconnect" accessLevel="100" />
|
||||||
|
|
||||||
|
@ -69,6 +69,7 @@ import handlers.admincommandhandlers.AdminClanHall;
|
|||||||
import handlers.admincommandhandlers.AdminCreateItem;
|
import handlers.admincommandhandlers.AdminCreateItem;
|
||||||
import handlers.admincommandhandlers.AdminCursedWeapons;
|
import handlers.admincommandhandlers.AdminCursedWeapons;
|
||||||
import handlers.admincommandhandlers.AdminDelete;
|
import handlers.admincommandhandlers.AdminDelete;
|
||||||
|
import handlers.admincommandhandlers.AdminDestroyItems;
|
||||||
import handlers.admincommandhandlers.AdminDisconnect;
|
import handlers.admincommandhandlers.AdminDisconnect;
|
||||||
import handlers.admincommandhandlers.AdminDoorControl;
|
import handlers.admincommandhandlers.AdminDoorControl;
|
||||||
import handlers.admincommandhandlers.AdminEditChar;
|
import handlers.admincommandhandlers.AdminEditChar;
|
||||||
@ -405,6 +406,7 @@ public class MasterHandler
|
|||||||
AdminCreateItem.class,
|
AdminCreateItem.class,
|
||||||
AdminCursedWeapons.class,
|
AdminCursedWeapons.class,
|
||||||
AdminDelete.class,
|
AdminDelete.class,
|
||||||
|
AdminDestroyItems.class,
|
||||||
AdminDisconnect.class,
|
AdminDisconnect.class,
|
||||||
AdminDoorControl.class,
|
AdminDoorControl.class,
|
||||||
AdminEditChar.class,
|
AdminEditChar.class,
|
||||||
|
@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* 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.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.itemcontainer.PcInventory;
|
||||||
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
|
import com.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class AdminDestroyItems implements IAdminCommandHandler
|
||||||
|
{
|
||||||
|
private static final String[] ADMIN_COMMANDS =
|
||||||
|
{
|
||||||
|
"admin_destroy_items",
|
||||||
|
"admin_destroy_all_items",
|
||||||
|
"admin_destroyitems",
|
||||||
|
"admin_destroyallitems"
|
||||||
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean useAdminCommand(String command, L2PcInstance activeChar)
|
||||||
|
{
|
||||||
|
final PcInventory inventory = activeChar.getInventory();
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
for (L2ItemInstance item : inventory.getItems())
|
||||||
|
{
|
||||||
|
if (item.isEquipped() && !command.contains("all"))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
iu.addRemovedItem(item);
|
||||||
|
inventory.destroyItem("Admin Destroy", item, activeChar, null);
|
||||||
|
}
|
||||||
|
activeChar.sendPacket(iu);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getAdminCommandList()
|
||||||
|
{
|
||||||
|
return ADMIN_COMMANDS;
|
||||||
|
}
|
||||||
|
}
|
@ -96,6 +96,12 @@
|
|||||||
<!-- ADMIN DELETE -->
|
<!-- ADMIN DELETE -->
|
||||||
<admin command="admin_delete" accessLevel="100" />
|
<admin command="admin_delete" accessLevel="100" />
|
||||||
|
|
||||||
|
<!-- ADMIN DESTROY ITEMS -->
|
||||||
|
<admin command="admin_destroy_items" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroy_all_items" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroyitems" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroyallitems" accessLevel="100" confirmDlg="true" />
|
||||||
|
|
||||||
<!-- ADMIN DISCONNECT -->
|
<!-- ADMIN DISCONNECT -->
|
||||||
<admin command="admin_character_disconnect" accessLevel="100" />
|
<admin command="admin_character_disconnect" accessLevel="100" />
|
||||||
|
|
||||||
|
@ -69,6 +69,7 @@ import handlers.admincommandhandlers.AdminClanHall;
|
|||||||
import handlers.admincommandhandlers.AdminCreateItem;
|
import handlers.admincommandhandlers.AdminCreateItem;
|
||||||
import handlers.admincommandhandlers.AdminCursedWeapons;
|
import handlers.admincommandhandlers.AdminCursedWeapons;
|
||||||
import handlers.admincommandhandlers.AdminDelete;
|
import handlers.admincommandhandlers.AdminDelete;
|
||||||
|
import handlers.admincommandhandlers.AdminDestroyItems;
|
||||||
import handlers.admincommandhandlers.AdminDisconnect;
|
import handlers.admincommandhandlers.AdminDisconnect;
|
||||||
import handlers.admincommandhandlers.AdminDoorControl;
|
import handlers.admincommandhandlers.AdminDoorControl;
|
||||||
import handlers.admincommandhandlers.AdminEditChar;
|
import handlers.admincommandhandlers.AdminEditChar;
|
||||||
@ -405,6 +406,7 @@ public class MasterHandler
|
|||||||
AdminCreateItem.class,
|
AdminCreateItem.class,
|
||||||
AdminCursedWeapons.class,
|
AdminCursedWeapons.class,
|
||||||
AdminDelete.class,
|
AdminDelete.class,
|
||||||
|
AdminDestroyItems.class,
|
||||||
AdminDisconnect.class,
|
AdminDisconnect.class,
|
||||||
AdminDoorControl.class,
|
AdminDoorControl.class,
|
||||||
AdminEditChar.class,
|
AdminEditChar.class,
|
||||||
|
@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* 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.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.itemcontainer.PcInventory;
|
||||||
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
|
import com.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class AdminDestroyItems implements IAdminCommandHandler
|
||||||
|
{
|
||||||
|
private static final String[] ADMIN_COMMANDS =
|
||||||
|
{
|
||||||
|
"admin_destroy_items",
|
||||||
|
"admin_destroy_all_items",
|
||||||
|
"admin_destroyitems",
|
||||||
|
"admin_destroyallitems"
|
||||||
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean useAdminCommand(String command, L2PcInstance activeChar)
|
||||||
|
{
|
||||||
|
final PcInventory inventory = activeChar.getInventory();
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
for (L2ItemInstance item : inventory.getItems())
|
||||||
|
{
|
||||||
|
if (item.isEquipped() && !command.contains("all"))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
iu.addRemovedItem(item);
|
||||||
|
inventory.destroyItem("Admin Destroy", item, activeChar, null);
|
||||||
|
}
|
||||||
|
activeChar.sendPacket(iu);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getAdminCommandList()
|
||||||
|
{
|
||||||
|
return ADMIN_COMMANDS;
|
||||||
|
}
|
||||||
|
}
|
@ -96,6 +96,12 @@
|
|||||||
<!-- ADMIN DELETE -->
|
<!-- ADMIN DELETE -->
|
||||||
<admin command="admin_delete" accessLevel="100" />
|
<admin command="admin_delete" accessLevel="100" />
|
||||||
|
|
||||||
|
<!-- ADMIN DESTROY ITEMS -->
|
||||||
|
<admin command="admin_destroy_items" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroy_all_items" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroyitems" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroyallitems" accessLevel="100" confirmDlg="true" />
|
||||||
|
|
||||||
<!-- ADMIN DISCONNECT -->
|
<!-- ADMIN DISCONNECT -->
|
||||||
<admin command="admin_character_disconnect" accessLevel="100" />
|
<admin command="admin_character_disconnect" accessLevel="100" />
|
||||||
|
|
||||||
|
@ -69,6 +69,7 @@ import handlers.admincommandhandlers.AdminClanHall;
|
|||||||
import handlers.admincommandhandlers.AdminCreateItem;
|
import handlers.admincommandhandlers.AdminCreateItem;
|
||||||
import handlers.admincommandhandlers.AdminCursedWeapons;
|
import handlers.admincommandhandlers.AdminCursedWeapons;
|
||||||
import handlers.admincommandhandlers.AdminDelete;
|
import handlers.admincommandhandlers.AdminDelete;
|
||||||
|
import handlers.admincommandhandlers.AdminDestroyItems;
|
||||||
import handlers.admincommandhandlers.AdminDisconnect;
|
import handlers.admincommandhandlers.AdminDisconnect;
|
||||||
import handlers.admincommandhandlers.AdminDoorControl;
|
import handlers.admincommandhandlers.AdminDoorControl;
|
||||||
import handlers.admincommandhandlers.AdminEditChar;
|
import handlers.admincommandhandlers.AdminEditChar;
|
||||||
@ -405,6 +406,7 @@ public class MasterHandler
|
|||||||
AdminCreateItem.class,
|
AdminCreateItem.class,
|
||||||
AdminCursedWeapons.class,
|
AdminCursedWeapons.class,
|
||||||
AdminDelete.class,
|
AdminDelete.class,
|
||||||
|
AdminDestroyItems.class,
|
||||||
AdminDisconnect.class,
|
AdminDisconnect.class,
|
||||||
AdminDoorControl.class,
|
AdminDoorControl.class,
|
||||||
AdminEditChar.class,
|
AdminEditChar.class,
|
||||||
|
@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* 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.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.itemcontainer.PcInventory;
|
||||||
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
|
import com.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class AdminDestroyItems implements IAdminCommandHandler
|
||||||
|
{
|
||||||
|
private static final String[] ADMIN_COMMANDS =
|
||||||
|
{
|
||||||
|
"admin_destroy_items",
|
||||||
|
"admin_destroy_all_items",
|
||||||
|
"admin_destroyitems",
|
||||||
|
"admin_destroyallitems"
|
||||||
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean useAdminCommand(String command, L2PcInstance activeChar)
|
||||||
|
{
|
||||||
|
final PcInventory inventory = activeChar.getInventory();
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
for (L2ItemInstance item : inventory.getItems())
|
||||||
|
{
|
||||||
|
if (item.isEquipped() && !command.contains("all"))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
iu.addRemovedItem(item);
|
||||||
|
inventory.destroyItem("Admin Destroy", item, activeChar, null);
|
||||||
|
}
|
||||||
|
activeChar.sendPacket(iu);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getAdminCommandList()
|
||||||
|
{
|
||||||
|
return ADMIN_COMMANDS;
|
||||||
|
}
|
||||||
|
}
|
@ -92,6 +92,12 @@
|
|||||||
<!-- ADMIN DELETE -->
|
<!-- ADMIN DELETE -->
|
||||||
<admin command="admin_delete" accessLevel="100" />
|
<admin command="admin_delete" accessLevel="100" />
|
||||||
|
|
||||||
|
<!-- ADMIN DESTROY ITEMS -->
|
||||||
|
<admin command="admin_destroy_items" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroy_all_items" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroyitems" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroyallitems" accessLevel="100" confirmDlg="true" />
|
||||||
|
|
||||||
<!-- ADMIN DISCONNECT -->
|
<!-- ADMIN DISCONNECT -->
|
||||||
<admin command="admin_character_disconnect" accessLevel="100" />
|
<admin command="admin_character_disconnect" accessLevel="100" />
|
||||||
|
|
||||||
|
@ -65,6 +65,7 @@ import handlers.admincommandhandlers.AdminClan;
|
|||||||
import handlers.admincommandhandlers.AdminCreateItem;
|
import handlers.admincommandhandlers.AdminCreateItem;
|
||||||
import handlers.admincommandhandlers.AdminCursedWeapons;
|
import handlers.admincommandhandlers.AdminCursedWeapons;
|
||||||
import handlers.admincommandhandlers.AdminDelete;
|
import handlers.admincommandhandlers.AdminDelete;
|
||||||
|
import handlers.admincommandhandlers.AdminDestroyItems;
|
||||||
import handlers.admincommandhandlers.AdminDisconnect;
|
import handlers.admincommandhandlers.AdminDisconnect;
|
||||||
import handlers.admincommandhandlers.AdminDoorControl;
|
import handlers.admincommandhandlers.AdminDoorControl;
|
||||||
import handlers.admincommandhandlers.AdminEditChar;
|
import handlers.admincommandhandlers.AdminEditChar;
|
||||||
@ -365,6 +366,7 @@ public class MasterHandler
|
|||||||
AdminCreateItem.class,
|
AdminCreateItem.class,
|
||||||
AdminCursedWeapons.class,
|
AdminCursedWeapons.class,
|
||||||
AdminDelete.class,
|
AdminDelete.class,
|
||||||
|
AdminDestroyItems.class,
|
||||||
AdminDisconnect.class,
|
AdminDisconnect.class,
|
||||||
AdminDoorControl.class,
|
AdminDoorControl.class,
|
||||||
AdminEditChar.class,
|
AdminEditChar.class,
|
||||||
|
@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* 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.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.itemcontainer.PcInventory;
|
||||||
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
|
import com.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class AdminDestroyItems implements IAdminCommandHandler
|
||||||
|
{
|
||||||
|
private static final String[] ADMIN_COMMANDS =
|
||||||
|
{
|
||||||
|
"admin_destroy_items",
|
||||||
|
"admin_destroy_all_items",
|
||||||
|
"admin_destroyitems",
|
||||||
|
"admin_destroyallitems"
|
||||||
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean useAdminCommand(String command, L2PcInstance activeChar)
|
||||||
|
{
|
||||||
|
final PcInventory inventory = activeChar.getInventory();
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
for (L2ItemInstance item : inventory.getItems())
|
||||||
|
{
|
||||||
|
if (item.isEquipped() && !command.contains("all"))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
iu.addRemovedItem(item);
|
||||||
|
inventory.destroyItem("Admin Destroy", item, activeChar, null);
|
||||||
|
}
|
||||||
|
activeChar.sendPacket(iu);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getAdminCommandList()
|
||||||
|
{
|
||||||
|
return ADMIN_COMMANDS;
|
||||||
|
}
|
||||||
|
}
|
@ -96,6 +96,12 @@
|
|||||||
<!-- ADMIN DELETE -->
|
<!-- ADMIN DELETE -->
|
||||||
<admin command="admin_delete" accessLevel="100" />
|
<admin command="admin_delete" accessLevel="100" />
|
||||||
|
|
||||||
|
<!-- ADMIN DESTROY ITEMS -->
|
||||||
|
<admin command="admin_destroy_items" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroy_all_items" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroyitems" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroyallitems" accessLevel="100" confirmDlg="true" />
|
||||||
|
|
||||||
<!-- ADMIN DISCONNECT -->
|
<!-- ADMIN DISCONNECT -->
|
||||||
<admin command="admin_character_disconnect" accessLevel="100" />
|
<admin command="admin_character_disconnect" accessLevel="100" />
|
||||||
|
|
||||||
|
@ -69,6 +69,7 @@ import handlers.admincommandhandlers.AdminClanHall;
|
|||||||
import handlers.admincommandhandlers.AdminCreateItem;
|
import handlers.admincommandhandlers.AdminCreateItem;
|
||||||
import handlers.admincommandhandlers.AdminCursedWeapons;
|
import handlers.admincommandhandlers.AdminCursedWeapons;
|
||||||
import handlers.admincommandhandlers.AdminDelete;
|
import handlers.admincommandhandlers.AdminDelete;
|
||||||
|
import handlers.admincommandhandlers.AdminDestroyItems;
|
||||||
import handlers.admincommandhandlers.AdminDisconnect;
|
import handlers.admincommandhandlers.AdminDisconnect;
|
||||||
import handlers.admincommandhandlers.AdminDoorControl;
|
import handlers.admincommandhandlers.AdminDoorControl;
|
||||||
import handlers.admincommandhandlers.AdminEditChar;
|
import handlers.admincommandhandlers.AdminEditChar;
|
||||||
@ -405,6 +406,7 @@ public class MasterHandler
|
|||||||
AdminCreateItem.class,
|
AdminCreateItem.class,
|
||||||
AdminCursedWeapons.class,
|
AdminCursedWeapons.class,
|
||||||
AdminDelete.class,
|
AdminDelete.class,
|
||||||
|
AdminDestroyItems.class,
|
||||||
AdminDisconnect.class,
|
AdminDisconnect.class,
|
||||||
AdminDoorControl.class,
|
AdminDoorControl.class,
|
||||||
AdminEditChar.class,
|
AdminEditChar.class,
|
||||||
|
@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* 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.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.itemcontainer.PcInventory;
|
||||||
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
|
import com.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class AdminDestroyItems implements IAdminCommandHandler
|
||||||
|
{
|
||||||
|
private static final String[] ADMIN_COMMANDS =
|
||||||
|
{
|
||||||
|
"admin_destroy_items",
|
||||||
|
"admin_destroy_all_items",
|
||||||
|
"admin_destroyitems",
|
||||||
|
"admin_destroyallitems"
|
||||||
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean useAdminCommand(String command, L2PcInstance activeChar)
|
||||||
|
{
|
||||||
|
final PcInventory inventory = activeChar.getInventory();
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
for (L2ItemInstance item : inventory.getItems())
|
||||||
|
{
|
||||||
|
if (item.isEquipped() && !command.contains("all"))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
iu.addRemovedItem(item);
|
||||||
|
inventory.destroyItem("Admin Destroy", item, activeChar, null);
|
||||||
|
}
|
||||||
|
activeChar.sendPacket(iu);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getAdminCommandList()
|
||||||
|
{
|
||||||
|
return ADMIN_COMMANDS;
|
||||||
|
}
|
||||||
|
}
|
@ -96,6 +96,12 @@
|
|||||||
<!-- ADMIN DELETE -->
|
<!-- ADMIN DELETE -->
|
||||||
<admin command="admin_delete" accessLevel="100" />
|
<admin command="admin_delete" accessLevel="100" />
|
||||||
|
|
||||||
|
<!-- ADMIN DESTROY ITEMS -->
|
||||||
|
<admin command="admin_destroy_items" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroy_all_items" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroyitems" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroyallitems" accessLevel="100" confirmDlg="true" />
|
||||||
|
|
||||||
<!-- ADMIN DISCONNECT -->
|
<!-- ADMIN DISCONNECT -->
|
||||||
<admin command="admin_character_disconnect" accessLevel="100" />
|
<admin command="admin_character_disconnect" accessLevel="100" />
|
||||||
|
|
||||||
|
@ -69,6 +69,7 @@ import handlers.admincommandhandlers.AdminClanHall;
|
|||||||
import handlers.admincommandhandlers.AdminCreateItem;
|
import handlers.admincommandhandlers.AdminCreateItem;
|
||||||
import handlers.admincommandhandlers.AdminCursedWeapons;
|
import handlers.admincommandhandlers.AdminCursedWeapons;
|
||||||
import handlers.admincommandhandlers.AdminDelete;
|
import handlers.admincommandhandlers.AdminDelete;
|
||||||
|
import handlers.admincommandhandlers.AdminDestroyItems;
|
||||||
import handlers.admincommandhandlers.AdminDisconnect;
|
import handlers.admincommandhandlers.AdminDisconnect;
|
||||||
import handlers.admincommandhandlers.AdminDoorControl;
|
import handlers.admincommandhandlers.AdminDoorControl;
|
||||||
import handlers.admincommandhandlers.AdminEditChar;
|
import handlers.admincommandhandlers.AdminEditChar;
|
||||||
@ -405,6 +406,7 @@ public class MasterHandler
|
|||||||
AdminCreateItem.class,
|
AdminCreateItem.class,
|
||||||
AdminCursedWeapons.class,
|
AdminCursedWeapons.class,
|
||||||
AdminDelete.class,
|
AdminDelete.class,
|
||||||
|
AdminDestroyItems.class,
|
||||||
AdminDisconnect.class,
|
AdminDisconnect.class,
|
||||||
AdminDoorControl.class,
|
AdminDoorControl.class,
|
||||||
AdminEditChar.class,
|
AdminEditChar.class,
|
||||||
|
@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* 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.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.itemcontainer.PcInventory;
|
||||||
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
|
import com.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class AdminDestroyItems implements IAdminCommandHandler
|
||||||
|
{
|
||||||
|
private static final String[] ADMIN_COMMANDS =
|
||||||
|
{
|
||||||
|
"admin_destroy_items",
|
||||||
|
"admin_destroy_all_items",
|
||||||
|
"admin_destroyitems",
|
||||||
|
"admin_destroyallitems"
|
||||||
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean useAdminCommand(String command, L2PcInstance activeChar)
|
||||||
|
{
|
||||||
|
final PcInventory inventory = activeChar.getInventory();
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
for (L2ItemInstance item : inventory.getItems())
|
||||||
|
{
|
||||||
|
if (item.isEquipped() && !command.contains("all"))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
iu.addRemovedItem(item);
|
||||||
|
inventory.destroyItem("Admin Destroy", item, activeChar, null);
|
||||||
|
}
|
||||||
|
activeChar.sendPacket(iu);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getAdminCommandList()
|
||||||
|
{
|
||||||
|
return ADMIN_COMMANDS;
|
||||||
|
}
|
||||||
|
}
|
@ -96,6 +96,12 @@
|
|||||||
<!-- ADMIN DELETE -->
|
<!-- ADMIN DELETE -->
|
||||||
<admin command="admin_delete" accessLevel="100" />
|
<admin command="admin_delete" accessLevel="100" />
|
||||||
|
|
||||||
|
<!-- ADMIN DESTROY ITEMS -->
|
||||||
|
<admin command="admin_destroy_items" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroy_all_items" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroyitems" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroyallitems" accessLevel="100" confirmDlg="true" />
|
||||||
|
|
||||||
<!-- ADMIN DISCONNECT -->
|
<!-- ADMIN DISCONNECT -->
|
||||||
<admin command="admin_character_disconnect" accessLevel="100" />
|
<admin command="admin_character_disconnect" accessLevel="100" />
|
||||||
|
|
||||||
|
@ -69,6 +69,7 @@ import handlers.admincommandhandlers.AdminClanHall;
|
|||||||
import handlers.admincommandhandlers.AdminCreateItem;
|
import handlers.admincommandhandlers.AdminCreateItem;
|
||||||
import handlers.admincommandhandlers.AdminCursedWeapons;
|
import handlers.admincommandhandlers.AdminCursedWeapons;
|
||||||
import handlers.admincommandhandlers.AdminDelete;
|
import handlers.admincommandhandlers.AdminDelete;
|
||||||
|
import handlers.admincommandhandlers.AdminDestroyItems;
|
||||||
import handlers.admincommandhandlers.AdminDisconnect;
|
import handlers.admincommandhandlers.AdminDisconnect;
|
||||||
import handlers.admincommandhandlers.AdminDoorControl;
|
import handlers.admincommandhandlers.AdminDoorControl;
|
||||||
import handlers.admincommandhandlers.AdminEditChar;
|
import handlers.admincommandhandlers.AdminEditChar;
|
||||||
@ -405,6 +406,7 @@ public class MasterHandler
|
|||||||
AdminCreateItem.class,
|
AdminCreateItem.class,
|
||||||
AdminCursedWeapons.class,
|
AdminCursedWeapons.class,
|
||||||
AdminDelete.class,
|
AdminDelete.class,
|
||||||
|
AdminDestroyItems.class,
|
||||||
AdminDisconnect.class,
|
AdminDisconnect.class,
|
||||||
AdminDoorControl.class,
|
AdminDoorControl.class,
|
||||||
AdminEditChar.class,
|
AdminEditChar.class,
|
||||||
|
@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* 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.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.itemcontainer.PcInventory;
|
||||||
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
|
import com.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class AdminDestroyItems implements IAdminCommandHandler
|
||||||
|
{
|
||||||
|
private static final String[] ADMIN_COMMANDS =
|
||||||
|
{
|
||||||
|
"admin_destroy_items",
|
||||||
|
"admin_destroy_all_items",
|
||||||
|
"admin_destroyitems",
|
||||||
|
"admin_destroyallitems"
|
||||||
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean useAdminCommand(String command, L2PcInstance activeChar)
|
||||||
|
{
|
||||||
|
final PcInventory inventory = activeChar.getInventory();
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
for (L2ItemInstance item : inventory.getItems())
|
||||||
|
{
|
||||||
|
if (item.isEquipped() && !command.contains("all"))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
iu.addRemovedItem(item);
|
||||||
|
inventory.destroyItem("Admin Destroy", item, activeChar, null);
|
||||||
|
}
|
||||||
|
activeChar.sendPacket(iu);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getAdminCommandList()
|
||||||
|
{
|
||||||
|
return ADMIN_COMMANDS;
|
||||||
|
}
|
||||||
|
}
|
@ -96,6 +96,12 @@
|
|||||||
<!-- ADMIN DELETE -->
|
<!-- ADMIN DELETE -->
|
||||||
<admin command="admin_delete" accessLevel="100" />
|
<admin command="admin_delete" accessLevel="100" />
|
||||||
|
|
||||||
|
<!-- ADMIN DESTROY ITEMS -->
|
||||||
|
<admin command="admin_destroy_items" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroy_all_items" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroyitems" accessLevel="100" confirmDlg="true" />
|
||||||
|
<admin command="admin_destroyallitems" accessLevel="100" confirmDlg="true" />
|
||||||
|
|
||||||
<!-- ADMIN DISCONNECT -->
|
<!-- ADMIN DISCONNECT -->
|
||||||
<admin command="admin_character_disconnect" accessLevel="100" />
|
<admin command="admin_character_disconnect" accessLevel="100" />
|
||||||
|
|
||||||
|
@ -69,6 +69,7 @@ import handlers.admincommandhandlers.AdminClanHall;
|
|||||||
import handlers.admincommandhandlers.AdminCreateItem;
|
import handlers.admincommandhandlers.AdminCreateItem;
|
||||||
import handlers.admincommandhandlers.AdminCursedWeapons;
|
import handlers.admincommandhandlers.AdminCursedWeapons;
|
||||||
import handlers.admincommandhandlers.AdminDelete;
|
import handlers.admincommandhandlers.AdminDelete;
|
||||||
|
import handlers.admincommandhandlers.AdminDestroyItems;
|
||||||
import handlers.admincommandhandlers.AdminDisconnect;
|
import handlers.admincommandhandlers.AdminDisconnect;
|
||||||
import handlers.admincommandhandlers.AdminDoorControl;
|
import handlers.admincommandhandlers.AdminDoorControl;
|
||||||
import handlers.admincommandhandlers.AdminEditChar;
|
import handlers.admincommandhandlers.AdminEditChar;
|
||||||
@ -405,6 +406,7 @@ public class MasterHandler
|
|||||||
AdminCreateItem.class,
|
AdminCreateItem.class,
|
||||||
AdminCursedWeapons.class,
|
AdminCursedWeapons.class,
|
||||||
AdminDelete.class,
|
AdminDelete.class,
|
||||||
|
AdminDestroyItems.class,
|
||||||
AdminDisconnect.class,
|
AdminDisconnect.class,
|
||||||
AdminDoorControl.class,
|
AdminDoorControl.class,
|
||||||
AdminEditChar.class,
|
AdminEditChar.class,
|
||||||
|
@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* 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.actor.instance.L2PcInstance;
|
||||||
|
import com.l2jmobius.gameserver.model.itemcontainer.PcInventory;
|
||||||
|
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||||
|
import com.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class AdminDestroyItems implements IAdminCommandHandler
|
||||||
|
{
|
||||||
|
private static final String[] ADMIN_COMMANDS =
|
||||||
|
{
|
||||||
|
"admin_destroy_items",
|
||||||
|
"admin_destroy_all_items",
|
||||||
|
"admin_destroyitems",
|
||||||
|
"admin_destroyallitems"
|
||||||
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean useAdminCommand(String command, L2PcInstance activeChar)
|
||||||
|
{
|
||||||
|
final PcInventory inventory = activeChar.getInventory();
|
||||||
|
final InventoryUpdate iu = new InventoryUpdate();
|
||||||
|
for (L2ItemInstance item : inventory.getItems())
|
||||||
|
{
|
||||||
|
if (item.isEquipped() && !command.contains("all"))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
iu.addRemovedItem(item);
|
||||||
|
inventory.destroyItem("Admin Destroy", item, activeChar, null);
|
||||||
|
}
|
||||||
|
activeChar.sendPacket(iu);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getAdminCommandList()
|
||||||
|
{
|
||||||
|
return ADMIN_COMMANDS;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user