Tutorial How to learn bukkit for noobs.

Discussion in 'Resources' started by ChipDev, Nov 24, 2014.

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

    ChipDev

    Step 1) http://www.tutorialspoint.com/java/java_overview.htm
    *Learn Java
    Step 2)
    http://jd.bukkit.org/beta/apidocs/
    *Java docs for bukkit
    And then, we welcome you to us.
    EDIT: Watch BcBroz : PogoStick29Dev, theNewBoston.. A trusted source. BcBroz abuses static which is a TERRIBLE example.
    I hope some people who search how to learn 'Minecraft coding language' or 'Bukkit for noobs'
    somehow land on this page, PLEASE, Please learn simple Java before Bukkit.
    Why?
    • Better automatic knowing of what to do, not being a noob and going to the 'Plugin development' section every time you don't know what to do.. Because you copy pasted all the code from the video's tutorial
    • *Awesomeness of knowing Java, bragging rights!
    • You won't get Yelled at by some of the great people to 'LEARN JAVA'
    • You can create your own plugins without copy pasting, ACHIEVEMENT GET!
    -Also, If you want to learn the Old fashioned way, you can go read a Book from your local library!
    (If your library doesn't have it, go sue dem for not getting good books!! :p)
    -Another thing:
    A basic knowing of Java would be:
    Syntax errors.
    Careless if() errors.
    Static meaning
    void meaning
    boolean meaning
    abstract meaning
    Using ; after your statements
    Strings (Meanings)
    Methods/CREATING
    Integers, adding, etc.
    And a further knowing of Java:

    == vs .equals(object) - Use == for enums, ints/floats/booleans/longs ... Not for strings!
    HashMaps<Value,Key>
    ArrayList<Value, Key>
    Math class.. Yes (Math.cos(int)) etc.
    Implementing API's and using them (Well, This is good to know for bukkit ;P)
    instanceof
    And being a non-noob for Bukkit please!:
    Casting errors.. derp.
    WRONG:
    Code:java
    1. //OnCommand stuff
    2. Player player = (Player) sender;

    "WHY AM I GETTING ERRORS?!?" 'whine wine whine'
    Its because you are not checking if the sender is a Player! It may be the console.
    RIGHT:


    Code:java
    1. if(sender instanceof Player) {
    2.  
    3. Player player = (Player) sender;
    4.  
    5. }else{
    6.  
    7. //Console!
    8.  
    9. }

    Also a common error:
    WRONG:
    Code:java
    1. Logger logger = getServer().getLogger("Minecraft");

    It doesn't cause errors, but Bukkit has already created a logger method for you. Otherwise that logger is unoffical, said here . (Also It may break, anytime!)
    RIGHT:
    Code:java
    1. Logger logger = getServer().getLogger();


    ----------------
    If anyone has any more suggestions, please post Below! :D
    Thanks for reading,
    -Me.
     
    _Filip, Sw_aG, DJSkepter and 2 others like this.
  2. Offline

    Skionz

  3. Offline

    ChipDev

  4. Offline

    DenialMC

    what is boolean?
     
  5. Offline

    ChipDev

    Boolean: True or false.
    if(Booleanname) {}
    if(!Booleanname) {}
    Booleanname = true; etc.
    Also, added knowing the difference of .equals(object) and ==
     
  6. Offline

    Hawktasard

    Just thought you should fix that.
     
  7. Offline

    ChipDev

    oh god.. thanks. xDD
     
  8. Offline

    Garris0n

    if(!yourBoolean)

    ಠ_ಠ
     
  9. Offline

    ChipDev

    As you can see, I forgot. :p
    Also garris0n wins again.
     
  10. Offline

    Sw_aG

    Great tutorial ChipDev (I'm learning bukkit...)
    Heavily appreciate!
     
    ChipDev likes this.
  11. Offline

    Assist

    MisterErwin likes this.
  12. Offline

    Onlineids

    ChipDev I agree with Assist
    Also hasn't the whole "How to learn bukkit for noobs" topic been done over 9000 times?

    You have 5 plugins -_- how do you not understand the concept of Booleans...

    <Edit by online: I know where the edit button is -_->
     
    xTrollxDudex and Skionz like this.
  13. Offline

    Assist

    Onlineids
    He was probably trolling, or wanting to see ChipDev's explanation.
     
  14. Offline

    mrCookieSlime Retired Staff

    Assist Onlineids
    Note here that the Plugins info isn't updated.
    He has 1 plugin without any files.
     
    Assist likes this.
  15. Offline

    Avygeil

    I don't see what in this tutorial cannot be found in other resources. The basic Java knowledge you listed should simply be known if the user has taken the time to read Java tutorials, and the two Bukkit related examples have been in so many threads (well, the more the better you would tell me :)).

    Additionally, I strongly discourage learning coding from videos. The Oracle tutorial is great and does suffice for that, especially when you have thousands of resources on StackOverflow or even here regarding almost everything you would want to do "outside the tutorials" as a beginner.

    It's not like newcomers don't have enough tutorials to learn, but since most learn Java for Bukkit, they either a) want to speed up the process (oh youtube) or b) cba to read javadocs or don't know how to read them because of skipped oriented object tutorial. Which isn't a bad thing in itself, many people would tell you they learnt on the go by making plugins, reading resources one after one after encountering a use case while programming. But what's wrong is to ask help on forums about the most simple thing, as "[URGENT] i dont hef time help plox". If all beginners came here with both a medium Java knowledge and understanding of the docs (and google), there would be less threads like "Q: how can I do basic X -> A: look for method Y in class X and learn java".

    Still more useful than your older tutorial though. :)
     
    TigerHix likes this.
  16. Offline

    Skionz

    ChipDev For HashMap the generics go <Key, Value> not the other way around, and ArrayLists only have one generic type :p
     
    teej107 likes this.
  17. Offline

    teej107

    I doubt "noobs" will come here first to learn Bukkit. I created this thread to tell new developers the dangers of some of their bad coding practices that they may have learned from using poor tutorials and give them advice on how to fix them.
     
  18. Offline

    Skionz

    ChipDev Also you should add something about the try, catch, and finally keywords. throw would also be good to know.
     
  19. Offline

    DenialMC

    I wanted to see what he would say, it succeeded to make my day
     
    ChipDev likes this.
  20. Offline

    AdamQpzm

    Books & the official Oracle tutorials are undoubtedly the best way to learn Java. It's less "old fashioned" more "the better way". To not even mention the Oracle tutorials in a 'Java for noobs' post is really quite disappointing :(

    This isn't a 'further knowing of Java', this is all still very basic stuff. Even suggesting that not knowing this stuff can still qualify someone of having "basic Java knowledge" is misleading and harmful.

    Actually, this is wrong as well. Server's getLogger() method really just returns a Logger that was obtained with Logger.getLogger("Minecraft") anyway. The only real benefit to using Server's getLogger() method is that it is the responsibility of the implementation to change the Logger returned if Logger.getLogger("Minecraft") stops working, thus preventing the need to update the plugin.

    The correct way you were looking for is to use getLogger() from your plugin instance, as this returns the Logger that was made specifically for your plugin.
     
  21. Offline

    chasechocolate

    List<E> :p lists store Elements.
     
    ChipDev likes this.
  22. Offline

    _Filip

    You probably did that xD
     
    ChipDev and Opacification like this.
  23. Offline

    mrCookieSlime Retired Staff

    Cleaned up Thread.
    Please be nice and friendly to each other and remain ontopic.

    Thread locked since this is basic Java Knowledge.
    It is also highly recommended that you learn Java before Bukkit anyway.
    This Thread also got a bit out of control and would probably get even worse.
     
    TigerHix, Dragonphase and ChipDev like this.
Thread Status:
Not open for further replies.

Share This Page