Introduction: How to Make a Minecraft Sever Plugin

In this instructable I will show you how to make a Minecraft Plugin!

Step 1: Eclipse

Got to www.eclipse.org/downloads/  and download Eclipse IDE for Java EE Developers. Make sure you get the version for your computer in the upper right corner! Click which processor you have 32 or 64bit. After you click that link it should say thank you for downloading.

Step 2: Getting Setup

Once it's done downloading open Eclipse. It should automatically make a folder called workspace so you can use that or create a folder. After that click x on the welcome window in eclipse and you should get a screen like this. Click file new project then Java Project. Click next and name it whatever you want but, no spaces! Next go to dl.bukkit.org to download the newest version of craftbukkit. After that in eclipse double click on your java project folder. Then right click on the folder and click build path add external Archives. Then choose the craftbukkit you just downloaded. 

Step 3: Building the Program

Right click(control click) the src folder in your java project folder. New>Package and name it what you named the java project folder it has to be exactly right otherwise it gets too confusing! Then right click on the package you just made New>Class and name it the same as your package and Java Project then click finish. Next you should get a screen with the name if your plugin and some other stuff. On the public class line  edit to say public class (the plugin's name) extends JavaPlugin {            After that you should get an error click on the Lightbulb and click import JavaPlugin (org.bukkit.plugin.java).  Your going to be importing a lot of bukkit stuff so make sure you have the craftbukkit. Hit return in between the curly brackets type @Override hit return again. Type public void onEnable (){ hit return and type Logger.getLogger("Minecraft").info("This Plugin is Running!");  Then go out of that curly bracket into blank space between the two. Then hit tab.

Step 4: The Confusing Part.

After you hit tab type in @Override hit return and type public void onDisable (){        Hit return there should be some blank space. Next get out of that Ondisable line and hit return. Type in the blank space between the curly brackets public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){       And then hit return. That whole line should be red/wrong hit return. Next in the blank space in between the two new brackets type   if(cmd.getName().equalsIgnoreCase("ignite")){       Hit return then type Player s = (Player)sender;   Hit return type Player s = (Player)sender;    Hit return type Player target = s.getServer().getPlayer(args[0]);   (Sorry if this is confusing)   Make Sure to import the files from bukkit like .getName and s.getServer and .get player   .       Hit return and type target.setFireTicks(10000);  Make sure to import .getFireTicks   .  Hit return and type return true;    .
   Look at the last photo for this step it is the completed Program and then go between the top bracket on the bottom and the 2nd to top on the bottom once again look at the picture. 

Step 5: Almost Done!!!!

Right click on the Java Project/Folder New>File. Then name that file plugin.yml and open it (open it in text edit for mac). Type name:  (whatever your plugin is called)    hit return type (here's a confusing part) main: name.name (put your Name of the the Package and class which should be the same where name is) hit return. Type description: (your description of that plugin) . Hit return type  version: 1.0 Hit return and type author: (your username)  . Then hit return twice and type commands:   Hit return then hit the space bar once and type ignite:  (leave this blank) . Hit return for the last time and the space bar twice and type description: (this description will show up in minecraft). 

Step 6: Finishing Up!

Make sure you save plugin.yml and then right click the folder/java project and hit refresh (if you don't it won't work). After you save your project right click on the java project/folder and hit export. Then name the plugin and put it into your plugins folder and you're done!! If you have any questions leave a comment!