Let's discuss Minecraft, mods and much more!
 
HomeFAQSearchMemberlistUsergroupsRegisterLog in
This scroll bar will keep you up to date with new features to Minecraft!
There is going to be a new mob added soon, Wolves. Watch them here.
Notch has said there will soon be achievements you can unlock!

Share | 
 

 GiveMeGlass Tutorial [Easy]

View previous topic View next topic Go down 
AuthorMessage
Jacob
Administrator
Administrator
avatar

Posts : 39
Join date : 2011-03-19
Age : 20
Location : England

PostSubject: GiveMeGlass Tutorial [Easy]   Fri Mar 25, 2011 3:13 pm

You will need Bukkit for this tutorial.

Also eclipse.

Start up the compiler.

And click File > New > Java Project

Type in GiveMeGlass as the name

Click for image

Click finish.

If you look on the bar on the left, you will see this:

Click the small arrow, and you will see this:



Before we start, we need to reference to Bukkit.

Right click on GiveMeGlass

Go to Properties

This will come up

Click Java Build Path

Look to the right, and you'll find some tabs ()

Click the Libraries tab

Look at the buttons on the side, click Add external jars

Look for and select your file.

Click Ok

Like this.

Right-click on src

Hover over new


Click package

Type in 'com.bukkit.[your name].GiveMeGlass'

Click Finish

Click for image

The side bar should now look like



Right click your package

Goto New

Click Class

Type in GiveMeGlass

Click for image

You are faced with this screen

Click for image


NAO LETZ COED


Look for public class GiveMeGlass

Add extends JavaPlugin to it, it should look like this now:


But oh no, it's underlined in red Sad

Look the the left, and click this icon:

Click Import JavaPlugin

But now there's another error!

Click , again, and then click Add unimplemented methods

That's got some good code going now!

Click inside the onEnable() void, and type in:

Code:
PluginDescriptionFile pdfFile = this.getDescription();
System.out.println(pdfFile.getName() + " is running on version " + pdfFile.getVersion());

That'll make it output some text when it's enabled!

Now below it, add this:

Code:
PluginManager pm = getServer().getPluginManager();
pm.registerEvent(Event.Type.BLOCK_PLACED, blockListener, Event.Priority.Normal, this);

But there's an error there.

So, right below private final GiveMeGlassBlockListener = new GiveMeGlassBlockListener(this);



This is all of the tutorial for now, I will be working on it tomorrow
Back to top Go down
View user profile
Decman
Graphics Artist
Graphics Artist
avatar

Posts : 73
Join date : 2011-03-19

PostSubject: Re: GiveMeGlass Tutorial [Easy]   Sat Mar 26, 2011 5:30 pm

Hey, Can you do normal SSP Mods? If you know how, I would like a tutorial.
Back to top Go down
View user profile
Jacob
Administrator
Administrator
avatar

Posts : 39
Join date : 2011-03-19
Age : 20
Location : England

PostSubject: Re: GiveMeGlass Tutorial [Easy]   Sat Mar 26, 2011 5:49 pm

I'm not sure how to do them ones, I could try finding out for you though Very Happy
Back to top Go down
View user profile
Decman
Graphics Artist
Graphics Artist
avatar

Posts : 73
Join date : 2011-03-19

PostSubject: Re: GiveMeGlass Tutorial [Easy]   Sat Mar 26, 2011 6:19 pm

Ummm, Ill figure it out, And Can you send me a PM with the server IP?
Back to top Go down
View user profile
Short One
Just spawned
Just spawned


Posts : 4
Join date : 2011-03-19

PostSubject: Re: GiveMeGlass Tutorial [Easy]   Sat Apr 09, 2011 7:02 pm

so i'm guessing you run a server. IP?
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: GiveMeGlass Tutorial [Easy]   

Back to top Go down
 
GiveMeGlass Tutorial [Easy]
View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Minecraft Galaxy :: Mods and Plugins :: Modding Tutorials-
Jump to: