Really Interested in Making a PLugin.... Where do i start?

Discussion in 'Plugin Development' started by chernobyl360, Jan 19, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    chernobyl360

    Im Sorry if this has been started Before.but Where Exactly Do i Start? I know with Hmod there was an exact guideline to making a plugin...But you needed *Hooks and Listeners*. What Are those exactly?does bukkit even have those?Maybe one of the admins here could give me a quick code to start?

    Plugin Idea:
    Since im 100% NEW to java i want to start small.. *of course*
    I would like to make a plugin that when you type in /ItemList it would give you a whole id list of the Blocks,tools etc....
     
  2. Offline

    Plague

    Since you are new to Java start with Google ;)

    As for bukkit, try the tutorial.

    And finally, listing the names of items is not possible through bukkit AFAIK. Of course you can always just put the whole text into your plugin or read it from a file, but that's not what you had in mind, is it?
     
  3. Offline

    chernobyl360

    Wow ok So Since i cant do that.. what could i try? Maybe a Motd plugin?
     
  4. Lol i love how everyone is linking to tutorial but the tutorial was written by a person who hasn't programmed a plugin in his life be4 (Me!)
     
  5. Offline

    chernobyl360

    Well Currently Im Setting up a *package* But For some reason im getting a error saying *Package name is not a Java Identifier *. What am i doing wrong? Im using Eclipse for a software. rather be using yaldex but that doesnt work with the Bukkit Dev Kit :(
     
  6. Offline

    Lycake

    Some code or more information would be nice
     
  7. Offline

    Archelaus

    Save the file. Eclipse has the problem of the error report not updating.
     
  8. Offline

    chernobyl360

  9. Offline

    Archelaus

    Oh I see, remove < and > from the names. So it looks like this:

    Code:
    com.bukkit.William.HomeXpert
     
  10. Offline

    chernobyl360

    Thanks! It worked. Now Ill just continue till i run into another problem :D

    My New Idea is a *Home Generator*. You Select 2 diagonal spots on the ground and then specify a block hieght and it will create a home. But it wont automatically make it. you need to have the materials to do so... Will Something like this work???
     
  11. Offline

    Archelaus

    It sure would :)
     
  12. Offline

    chernobyl360

    So Now That Im at The Commands/Codes, How Do I start? Is there any discontinued Plugins i could look at for a guide?
     
  13. Offline

    Archelaus

    I'll be writing a guide soon.
    Tell me what you need to know and I'll explain it too you.
     
  14. Offline

    nightcrafter27

    I'd like program plugins too. I am also new to Java, and need all the help I can get [​IMG]
     
  15. Offline

    Archelaus

    Nightcrafter, PM me with any questions you have. I'm happy to help.
     
  16. Offline

    chernobyl360

    Ill just PM you cuase the list will be quite big to what i need help with :D
     
  17. Offline

    Samkio

  18. Offline

    chernobyl360

    Thanks Again!

    Hmm ok im at this point. What is the name for Woodplanks? I typed in WOOD as you can see and it came up blue. So am i correct?

    But i dont understand.... In my plugin i want to be able to set a tool i.e axe to be the main builder tool to create the 2 points. so how would i do something like that? 1st being able to select the tool to build then being able to set the points...

    public void onBlockPlace(BlockPlaceEvent event) {
    //Get the player doing the placing
    Player player = event.getPlayer();
    //Get the block that was placed
    Block block = event.getBlockPlaced();
    //If the block is a torch and the player has the command enabled. Do this.
    if(block.getType() == Material.WOOD && HomeXpertPlayerListener.plugin.enabled(player)){
    player.sendMessage("You Constructed A Building!");
    }
    }
    }

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 6, 2016
  19. Offline

    Novar234

    I think you would need the X/Y/Z coords for block placed and the XYZ coords for the 2nd corner, then you need to have it block fill for each XYZ in between XYZ1, XYZ2, if ( wood count => XYZcount) {then for each XYZ coord plaec a wood block and then count towards XYZ2}
    else {error not enough wood}
    or that's how I would do it, unless there is an easier way.. But this would be the logical way.

    Well, that would do a huge block of wood so you would have to just do some math for a home that's all
     
Thread Status:
Not open for further replies.

Share This Page