Delete Ground Items from telnet [Edited please look]

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
iamcypher
Posts: 57
Joined: Thu Oct 22, 2009 3:13 pm

Delete Ground Items from telnet [Edited please look]

Post by iamcypher »

L2J Revision 6762:
L2JDP Revision 3668:

Hi mates,
I`m working on a custom command for Game Server`s telnet but i`m a bit lost and i seek some pointers to put me back on the good road. So i need to be able to run ItemsAutoDestroy class from GameStatusThread class. I added

Code: Select all

import net.sf.l2j.gameserver.ItemsAutoDestroy;
in the import list and i changed the access modifier of CheckItemsForDestroy method from protected to public to be able to access it.

Code: Select all

public class CheckItemsForDestroy extends Thread
And here is my Status command i added but it doesn`t work:

Code: Select all

else if (_usrCommand.startsWith("clearitems")) {ItemsAutoDestroy.CheckItemsForDestroy();}
The error that the compiler is giving is:

Code: Select all

cannot find symbol: method CheckItemsForDestroy()location: class net.sf.l2j.status.GameStatusThreadCheckItemsForDestroy();
Please help :( ,
iamcypher
Last edited by iamcypher on Thu Oct 29, 2009 6:38 pm, edited 1 time in total.
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: Delete Ground Items from telnet

Post by janiii »

all you need is to import ItemsAutoDestroy

Code: Select all

import net.sf.l2j.gameserver.ItemsAutoDestroy;
and then use this line of code:

Code: Select all

ItemsAutoDestroy.getInstance().removeItems();
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
iamcypher
Posts: 57
Joined: Thu Oct 22, 2009 3:13 pm

Re: Delete Ground Items from telnet

Post by iamcypher »

Thank you so much for you answer. You guys are the best!

EDIT: Command doesn`t work. It doesn`t delete the items!
Post Reply