Name | Modified | Size | Downloads / Week |
---|---|---|---|
readme.md | 2013-09-18 | 2.0 kB | |
JerooEclipse.zip | 2013-09-17 | 7.6 MB | |
Totals: 2 Items | 7.6 MB | 0 |
Jeroo Modding Api Tutorial
By Paul Lang
Setting up:
The first step you need to do is to import all of the classes into your IDE. In eclipse you make a new Java Project, then right click on the src folder inside the project and choose import > File System then select the jeroo source folder. Import everything inside of that folder.
Alternatively in eclipse go to file > Change workspace folder and select the premade eclipse workspace called "JerooEclipse".
Making your first Command:
So now you are ready to make your first command!
-
To get started, in the default package under the source folder you will find a bunch of classes. (All the classes you will need are in there). Find "Symbols.java"
-
We are going to make a suicide command for the Jeroo. To do this we are going to do the following to the top of "Symbols.java":
public static final Integer SUICIDE = new Integer(80); Add "suicide" inside of the String[] Add SUICIDE inside of the Integer[]
It should now look like the image below: 3. Go to the class called "Jeroo.java". Add the function below to the top of the class:
public void suicide(){
inNet = true;
refresh();
}
4. Run the program! Try running the following in the jeroo environment:
method main(){
Jeroo j = new Jeroo();
j.suicide();
}
Things you need to know:
public static final Integer (Command Name in all caps) = new Integer(80);
Add Command as you want its syntax to be inside of the String[]
Add (Command Name in all caps) inside of the Integer[]
The number at the end of the first line MUST be a unique number above 79. That means Every command that you add must have a separate number!