Plugin Development - A HUGE tutorial!

Discussion in 'Plugin Development' started by Adamki11s, Apr 29, 2011.

?

Was this helpful to you?

  1. Yes!

    78.4%
  2. No, but it was a good tutorial :)

    16.1%
  3. No.

    5.5%
Thread Status:
Not open for further replies.
  1. Last edited by a moderator: May 14, 2016
  2. Offline

    lolzrofl

    Google chrome formats it horribly? I think you need to update, Google Chrome displays it just fine! BTW Internet Explorer sucks!
     
  3. Offline

    Redyugi

    No love for the Fox??? FF > Chrome > IE
    Your tutorials have helped me to understand some things I was missing. Thanks :)
     
  4. Offline

    Jayjay110

    FF No longer > Chrome > IE
    its now Chrome > FF > Shit > IE
     
    Walker Crouse likes this.
  5. I love google chrome, I use it all the time. But for the wiki it makes everything smaller and unreadable, especially the code bits.
     
  6. Offline

    SoTD

    Hey,

    i tried to follow your tutorial. When i came to the place where you describe how to name your package.. you say it should contain 3 or more "."'s. But in the example that you give, it has only 2. What's the right way?

    Next problem: - solved
    I add
    "PluginManager pm = this.getServer().getPluginManager();"
    under "onEnable()", then i add
    "pm.registerEvent(Event.Type.BLOCK_BURN, playerListener, Priority.Normal, this);"
    as an example. But i always get "registerEvents" marked as error. "the method registerEvents is not applicable for the arguments"

    greets!
     
  7. Someone must have edited the page, I have changed it back to how it should be.
     
  8. Offline

    SoTD

    Thanks! I just wrote a sample plugin to test things out..is there a list out here where i can found commands bukkit gives me like sending messages to players or other stuff?

    greets!
     
  9. On programming a plugin you can look at bukkit's java docs or your IDE should give you command suggestions.
     
  10. Offline

    SoTD

    Okay. Hopefully for now my last question:

    Where do i have to put OnCommand into? I put it into the main.java, but if i'm in game and try to use my command (/testbukkit), nothing happens:

    public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args){
    if(commandLabel.equalsIgnoreCase("testbukkit")){
    sender.sendMessage("testmessage");
    return true;
    }
    return false;
    }
     
  11. It goes in your main file but you have to make sure your plugin.yml has the command testbukkit assosiated with it as well :p
     
  12. Offline

    SoTD

    Uh, are there different ways of doing that? I looked through the source-code of minecart mania, there is a "plugin.yml" but there are no commands listed. WorldEdit for example does not even have a plugin.yml..and where can i take a look to know how to edit the plugin.yml the right way? I don't know in which format i have to add commands to the plugin.yml.

    greets!
     
  13. Offline

    SoTD

    Great thanks. May i ask where you got the information for the right format from? Do you got this from the Java Docs? (I looked at it, but didn't find it)

    greets!
     
  14. What do you mean the right format? I learn from watching a few java tutorial and then read some of bukkits API and then I got started, I know a hell of lot more now though :)
     
  15. Offline

    SoTD

    What i mean is, where do you got your information about the parameters you need which should be added to the plugin.yml. I looked around in some threads here and in the bukkit java docs, but couldn't find any information about the plugin.yml in combination with commands - only that i need to add them, to get commands to work, but not how to add them.

    Maybe i missed this part in the bukkit java docs, or there other sources i didn't see yet.
     
  16. Oh that, there's a post on the wiki somewhere but it's buried :S I found it but then lost it.
     
  17. Offline

    lolzrofl

    Ya I just noticed that, but I still refuse to use Internet Explorer! :)
     
  18. I hate it as much as the next sane person, try it in firefox/opera/safari whichever is your preference xD
     
  19. Offline

    Ancetras

    Cannot wait for timer tutorial *w*
     
  20. Offline

    neromir

    I included some info on package naming here as well: http://wiki.bukkit.org/Getting_Started_with_IntelliJ#Setting_up_the_packages It seemed like something a lot of people were confused about, so hopefully that helps clarify a bit.
     
  21. Thanks :) It seems someone edited the wiki part about package naming which confused people. I have someone writing an SQLite tutorial at the moment so hopefully I can get that released aswell, I pretty excited about it :D
     
  22. Offline

    lolzrofl

    Lol, btw could you please add those images, and a compiling section? I'm stuck :(
     
  23. Offline

    Lolmewn

    Is an SQL tut going to be in here too? Or at least some kind of link to somewhere :p
    Just some code from anyone who uses SQL is fine too.
    Edit: Lol, answered a few posts above, im soo lazy xD
     
  24. Yes, hopefully my friend will have finished it today :)
    Ok, what IDE are you using?
     
  25. Offline

    lolzrofl

    Eclipse
     
  26. I started work on a pretty cool zombie mini-game plugin but stopped development. Details and source can be found on the wiki, this should help you heap loads :D
     
  27. Offline

    Windwaker

    Added code for TODO:

     
  28. thanks
     
  29. Offline

    Lolmewn

Thread Status:
Not open for further replies.

Share This Page