Page 1 of 1
Command new
Posted: Thu May 28, 2009 7:25 pm
by appolo
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision
Number:
L2JDP Revision
Number:
Hi guys I have made An admin command but he problem is where to put the .java file of the command and how to register it..
Re: Command new
Posted: Thu May 28, 2009 8:17 pm
by appolo
MY PROBLEM IS HOW CAN i REGISTER A COMMAND...
Re: Command new
Posted: Thu May 28, 2009 9:17 pm
by janiii
look at other admin commands how they are registered (look in the admin command files, and then look at MasterHandler). they are now in datapack/data/scripts/handlers/admincommandhanlers .
and turn off your caps lock or buy a new keyboard

Re: Command new
Posted: Thu May 28, 2009 9:27 pm
by appolo
if now I want to add a command , I have to change the datapack?? Big change.. Because I have TownWar wvewnt and the comand isnt work :S ... which is the file in datapack which is like l2jserver.java ?
Re: Command new
Posted: Fri May 29, 2009 7:44 am
by appolo
Re: Command new
Posted: Fri May 29, 2009 7:56 am
by janiii
if you are using eclipse, on forum is a guide how to enable syntax highlighting in datapack project. that will help you to solve these issues as eclipse says what to do (import used class, etc.)
Re: Command new
Posted: Fri May 29, 2009 8:18 am
by Zealar
Re: Command new
Posted: Fri May 29, 2009 8:23 am
by appolo
And what I am going to winwith this because I didnt understand..
Re: Command new
Posted: Fri May 29, 2009 8:29 am
by janiii
eclipse will tell you an error there and will help you fix it (import the missing class)
Re: Command new
Posted: Fri May 29, 2009 8:32 am
by appolo
yeah , It says me that .... Look here :
Code: Select all
AdminCommandHandler.getInstance().registerAdminCommandHandler(new AdminTest()); AdminCommandHandler.getInstance().registerAdminCommandHandler(new [color=#FF0000]AdminTownWar[/color]()); AdminCommandHandler.getInstance().registerAdminCommandHandler(new AdminTvTEvent());
Why? is red.... And i ahve put it on admincomanhanders
Re: Command new
Posted: Fri May 29, 2009 8:51 am
by janiii
eclipse should suggest you to import that class