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]

Go down 
AuthorMessage
Jacob
Administrator
Administrator
Jacob

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

GiveMeGlass Tutorial [Easy] Empty
PostSubject: GiveMeGlass Tutorial [Easy]   GiveMeGlass Tutorial [Easy] Icon_minitimeFri 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: GiveMeGlass Tutorial [Easy] 2011-03-25_1957

Click the small arrow, and you will see this:

GiveMeGlass Tutorial [Easy] 2011-03-25_1959

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 (GiveMeGlass Tutorial [Easy] 2011-03-25_2002)

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

GiveMeGlass Tutorial [Easy] 2011-03-25_2025

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:
GiveMeGlass Tutorial [Easy] 2011-03-25_2048

But oh no, it's underlined in red Sad

Look the the left, and click this icon: GiveMeGlass Tutorial [Easy] 2011-03-25_2054

Click Import JavaPlugin

But now there's another error!

Click GiveMeGlass Tutorial [Easy] 2011-03-25_2054, 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
Decman

Posts : 73
Join date : 2011-03-19

GiveMeGlass Tutorial [Easy] Empty
PostSubject: Re: GiveMeGlass Tutorial [Easy]   GiveMeGlass Tutorial [Easy] Icon_minitimeSat 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
Jacob

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

GiveMeGlass Tutorial [Easy] Empty
PostSubject: Re: GiveMeGlass Tutorial [Easy]   GiveMeGlass Tutorial [Easy] Icon_minitimeSat 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
Decman

Posts : 73
Join date : 2011-03-19

GiveMeGlass Tutorial [Easy] Empty
PostSubject: Re: GiveMeGlass Tutorial [Easy]   GiveMeGlass Tutorial [Easy] Icon_minitimeSat 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
avatar

Posts : 4
Join date : 2011-03-19

GiveMeGlass Tutorial [Easy] Empty
PostSubject: Re: GiveMeGlass Tutorial [Easy]   GiveMeGlass Tutorial [Easy] Icon_minitimeSat 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




GiveMeGlass Tutorial [Easy] Empty
PostSubject: Re: GiveMeGlass Tutorial [Easy]   GiveMeGlass Tutorial [Easy] Icon_minitime

Back to top Go down
 
GiveMeGlass Tutorial [Easy]
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: