Minecraft Blogs / Tutorial

Bukkit Plugin Tutorial 1: setting up your environment !

  • 977 views, 2 today
  • 13
  • 6
  • 7
evilguy4000's Avatar evilguy4000
Level 33 : Artisan Modder
33
Welcome here dear PMC'ers,

Today I'm going to learn you how you can make your own Bukkit plugins. If you want to start with this tutorial you do not need to have any understandings of Java. I will always give a clear explanation of what everything does. At the end of these courses I really hope you are able to make your own plugins. At the beginning of every lesson I will tell you everything you need to have on your PC or what special code from last lesson you will need to remember. I hope you all enjoy and here we go.


Things you will need this lesson :


1) ECLIPSE (this is very important.).
2) The Java Development Kit.
3) The CraftBukkit server jar file.
4)
Last but not least a big portion of patience.

Setting up the work space:


After you have gotten all these things from the list above, we are going to start with the very basics here. First we are going to set up the programming environment. You need to open your Eclipse and you will get a some screens that are new to you. The things we'll be focusing on are thework-spaceand the coding area.


Click to reveal
LkdYTpng

Click to reveal
WVBXZndpng


Now we are going to make sure you get the right coding environment set up, cause you can't make Bukkit plugins in the regular Java Environment. You need to right click in the work-space your new Java Project and choose Properties.
cHyeHVpng

In the properties tab choose -Resource- Java Build Path -Add External Jars. Now navigate to where you have saved the Craftbukkit server Jar and select that and add that jar. Now you are ready to program for Bukkit.
NwHzCApng


Creating your first Class :


Classes are the files where you write the full code of your plugin. In Eclipse you have a really good advantage because when you use ctrl + Space it gives you all thepossibilitiesfor the code you are writing. We are first going to make a package to set the class file in, this is notnecessarybut its good to keep all the clusters of classes very tidy.




Making the Package. Right click your Java Project and select -New -package. Then give your packages the name you desire. I always use
OjGNIpng

Now we are going to make our first class You need to right click the package we just made and select -New -Classfile. You Can give this file any name you want but it can be really good to name it after your mod.
iHhmIrpng


3. If you have done everything right you should see this screen.
DaIEPTDpng



Now we can officially start coding our First Bukkit Plugin.

This was my first tutorial in the next one we will get into all the basic aspects

of the bukkit plugin and what they do.
I hope you all enjoyed this first tutorial and i hope you read the rest too.



Greetings, evilguy4000
CreditBrennian for helping with the layout
Tags

1 Update Logs

Better layout : by evilguy4000 10/23/2013 8:53:56 amOct 23rd, 2013

Updated Layout with help from : Medieval-Craft

Create an account or sign in to comment.

1
11/19/2013 11:29 am
Level 51 : Grandmaster Modder
SpiderCraftMC
SpiderCraftMC's Avatar
*yay* Fellow Coder ;D
1
10/22/2013 12:52 pm
Level 36 : Artisan Wolf Whisperer
Eeirail
Eeirail's Avatar
Keep this up, you're helping more people than you know.
1
10/22/2013 1:05 pm
Level 33 : Artisan Modder
evilguy4000
evilguy4000's Avatar
Thank you :3 Brennian wants to have a word with you on skype :3
1
10/18/2013 4:18 pm
Level 34 : Artisan Wolf Whisperer
carlmolndalmc
carlmolndalmc's Avatar
I really want to make a plugin. But i need a server :(
1
10/19/2013 2:33 am
Level 33 : Artisan Modder
evilguy4000
evilguy4000's Avatar
Well i'm getting myself a server rack in a year or two and i will be setting up some gaming servers. At the moment i'm still with hosthorde and they are really good for minecraft server hosting
1
10/18/2013 3:59 pm
Level 10 : Journeyman Network
Grid21
Grid21's Avatar
I'm gonna follow these posts, this was welled explained!
1
10/19/2013 2:34 am
Level 33 : Artisan Modder
evilguy4000
evilguy4000's Avatar
Thank you, if you want to learn specific things for Bukkit plugins, just ask away. I hope you enjoy
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome