Plugin Development - A HUGE tutorial!

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


Was this helpful to you?

  1. Yes!

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

  3. No.

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


    never heard of auto updateing, i mean like how to update your plugin to the latest bukkit version codeing wise, i never saw it in here so yea :p
  2. I have provided links to the latest bukkit API versions.

  3. Offline


    Why is this always a good practice?
    I've always been firmly on the side of: Functions should never have more than one return statement.
    You should declare a return value at the top of the function ( I normally use retVal) with the "default" value, then return that value at the end.

    public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args){
        boolean retVal = false;
        if(commandLabel.equalsIgnoreCase("basic"){ // If the player typed /basic then do the following...
            retVal = true;
        } //If this has happened the function will break and return true.  if this hasn't happened the a value of false will be returned.
    return retVal;
  4. For most times that is better but when coding plugins you don't want the chance of 2 commands being run which is why I return true so only that 1 command will run. I see your point though.
  5. Offline


    no i mean how to update it in
  6. I don't understand your question.
  7. Offline


    from build 50 to 75 xample
  8. Offline

    Randy Schouten

    He asks how to update a plugin to a newer bukkit version if it breaks.
  9. Offline


    @Adamki11s Good work on this so far; should make for a great wiki entry.
  10. Offline


    Maybe that is your learning style... I learned everything I know by example, class documentation and bits and bobs from the official Oracle(Sun) tutorial.
    Ehm, yeah... It's not that this tutorial teaches more than other tutorials...
    This is a tutorial about developing plugins, not "how do u download files 4 dummis" or "how do u read thred on teh forumz dat telz u if ur plugin is broakz and wut 2 du"
  11. Offline


    They're asking for a tutorial on how to trouble-shoot a plugin if it happens to break during a switch to a new Bukkit version. This would mean developing and/or maintaining the plugin.

    You can be an asshat about it all you want, but what they propose is a fairly legitimate request...
    but eye guess u canz be duche bout et insted of b-in nize n helphul
  12. Offline

    Erwyn LENS

    @ashour how to update what? don't understand the request...
  13. Offline


    There is a "oops I broke your plugins" thread for a reason.
  14. Why are you having a go at everyone? I made this post to help people out, if people want more help I'm happy to add it, if you have a problem please take it elsewhere.

    Want to make a wiki entry but I don't know where to start :p Could you please give me a link or something.

    I might be making a "common errors" part so I'll add it in there.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 14, 2016
    Pim1234 and CheddahYetti like this.
  15. Offline


    And how do you intend to make this "how to update your plugin" section? Seriously, that is NOT how it works. Make a section explaining that people should read changelogs instead.
  16. I would just explain that if a plugin breaks check on bukkit homepage for the latest build and then see if the plugin developer has updated etc... not hard.
  17. Offline


    For the onCommand section:
    the Command object ("cmd") contains all information about a command that you listed in the plugin.yml
    Short API reference:
    abstract boolean execute (CommandSender sender, String commandLabel, String[] args)
    Executes the command, returning its success.

    String getName ()
    Returns the name of this command.

    List< String > getAliases ()
    Returns a list of aliases registered to this command.

    String getDescription ()
    Gets a brief description of this command.

    String getUsage ()
    Gets an example usage of this command.

    Command setAliases (List< String > aliases)
    Sets the list of aliases registered to this command.

    Command setDescription (String description)
    Sets a brief description of this command.

    Command setUsage (String usage)
    Sets the example usage of this command.

    (copied from the bukkit javadocs)

    And for the wiki: Bukkit has a wiki built in, go here:

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 14, 2016
  18. Thanks, I figured out how to make a wiki and I'm moving it all over there now.
  19. Offline


    Perhaps a section on how to make your plugin read a YAML or flat file? Otherwise, this looks like it will come out quite helpful. In my opinion bukkit's documentation on tutorials is horrendous. Don't even get me started on the "Programming a Plugin" page.

    EDIT: Maybe you should request a move to the "Resources" section?
  20. Offline


    I bet that Java is not your first computer language, because that's a awful way to learn your first language but a "good way" for people that already have programing experience

    You are a jadded kid aren't you ? @Adamki11s is trying to help people and you come to the post just to bash on is word and troll other people?
    Pim1234 likes this.
  21. Maybe that too, also Sammy could you please explain YAML files to me so I can make a tutorial on it, I won't forget to credit you :p
  22. Offline


    yea common erros if bukkit is updated
  23. Offline


    @Adamki11s I wouldn't mind creating a detailed "Updating Your Plugins" topic for this tutorial. I'd love to help out aspiring plugin developers/Java coders in any way that I can.

    Anyway, thanks for helping out the community! I wish this post was here when I was learning Java.
  24. Offline


    i guess ur the weird one no? i meant how to update it to the new RB so read my post.
  25. That would be a great help, thank you :D

    Once your done, e-mail it to me and send it in a message and I will add in it :D

    aPunch has kindly offered to make a tutorial so when he's finished I will post it :)

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


  27. Offline


    ok, i know alot of peaple dont know, i saw some peaple saying how to update :p
  28. Offline


    You do NOT have to update anything usually, as plugin-breaking builds are quite rare. And if you have to, a tutorial won't cover anything. You need to read the changelog.
  29. Offline


    hmmmmmmmmmmmmmmmmmmmmmmmmmm ur still not understanding me. some peaple used a tut for makeing a plugin. it broke and they needed help updateing it to work with the newest bukkit version. RB
  30. Offline


    I started off like that, too. Yes, Java wasn't the first one. I played around in Borland C++ builder with GUI components and learned by examples.

    I am not bashing or trolling.

    Seriously... Learn to read... That is exactly what I am talking about.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 14, 2016
Thread Status:
Not open for further replies.

Share This Page