[TUT] Create a Basic Java Plugin for Bukkit

Discussion in 'Resources' started by Unlucky4ever, Jul 27, 2012.

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


    Watch HD, Full Screen and Enjoy:
    Please Subscribe for more!​

    More Information
    This is a java tutorial on how to create a very basic Java Plugin for Bukkit, what the plugin does is simply send the player a message on command.

    What you will learn
    • How to download JDK
    • How to download Eclipse
    • How to download Bukkit
    • How to create a plugin
    • How to create commands for your plugin
    • How to send players a message

    Again if you liked it, please rate, like, and subscribe! And hopefully there will be more tutorials in the future :)
  2. Offline


    Episode 2 - Configuration Files

    Please Subscribe for more!​

    More Information
    This tutorial shows you how to create basic configuration files for your plugin

    What you will learn
    • How to update bukkit for developing
    • How to create configuration file
    • How to check if the configuration file exists
    • How to get information from configuration files
    • How to create a command to reload configuration
    madmac and anthonyc39 like this.
  3. Offline


    Good tutorials, will be watching the next episode when it's out!
    May I request a tutorial on how to work with blocks? i.e. change what a block is using a command, allowing/denying breaking+building blocks etc.
    anthonyc39 likes this.
  4. Offline


    Episode 3 - Basic Permissions

    Please Subscribe for more!​

    More Information
    This tutorial shows you how to create basic permission nodes for your commands

    What you will learn
    • How to add permissions for specific commands
    • How to add permission nodes to your plugin.yml
  5. Offline


    Episode 4 - Freezing & Healing

    Please Subscribe for more!​

    More Information
    This tutorial shows you how to use HashMaps to freeze players and also how to heal players.

    What you will learn
    • How to freeze yourself and other players
    • How to heal yourself and other players
    • How to configure advanced permission nodes
    • How to check if a player is online
    • How to use HashMaps

    Episode 5 - Giving Items

    Please Subscribe for more!​

    More Information
    A simple tutorial on how to give yourself items and other players items

    What you will learn
    • How to check if a player is online
    • How to spawn a specific amount of items
    • How to convert a String into an int
  6. Offline


    Episode 6 - Block Manipulation

    Please Subscribe for more!​

    More Information
    This tutorial shows you how to display a message stating where you placed or broke a block, and the name of that block

    What you will learn
    • How to check if a user placed/broke a block
    • How to get the name of said block
    • How to get the location of said block
  7. Offline


    I followed the guide to exact precision, yet when I added it to the server, the command didn't exist. I know this is all vague to you haha, but I really want to get into making plugins. Let me know if you can help!
  8. So this is where bad practices come from... :} generally from video tutorials, because written tutorials are in the wiki and they're mostly done by experienced devs, unlike most video tutorials.

    I skipped to a portion of code from episode 6 and I noticed some stuff:
    - Player object in storage... are you aware how much memory leaking that can make if not handled properly ? Which I doubt you're explaining to your viewers.
    - Block for storage, not as bad as using Player but still bad because it holds the reference to the world and prevents it from being unloaded.
    - Comparing commandLabel instead of command.getName() - that removes the ability to use aliases and requires extra code to work.
    - Casting sender to Player without checking, if command is used from console it will fail terribly.
    - Making fields to store the instances of listeners which you'll only use once... why ? Just create the new instance when you call registerEvents().

    The rest is good, even tough indentation and code spacing is kinda bad, not enough.... subtly suggests to viewers that code should contain as few spaces and empty lines as possible which is bad for you and everybody else that reads that code - except for the machine, the machine doesn't care at all (and doesn't affect performance) if you leave 500 empty lines or make your code in one line.
    DxDy likes this.
  9. Offline


    These are just basic tutorials, I'm not really going to go into to much detail of all that you mentioned, but yes, I knew about all of that.
  10. You don't get it, you're teaching bad practice... if you know all that, put it in your tutorials, don't tell people to do unecesary or wrong stuff when you know better :| what's the point of tutorials then ?
    anthonyc39 likes this.
  11. Offline


    Well I would just like to know how you use another plugin like Iconomy with your current plugin. What would I have to do for that?
  12. Jake230599
    It's easy but I recommend you use Vault to support most economy plugins with ease, read how to set it up in its bukkitdev page :}
    anthonyc39 likes this.
  13. Offline


    I love your tutorials and Digi :( Why are you so mean :p
    Unlucky, could you tell us so the /tutoriali dirt gives you dirt? I am trying to make a standalone item spawning plugin... I havent seen a STANDALONE one. Just those garbage essentials and amazing commandbook ones :)
    Thank you!
  14. Odie680
    You're confusing code with magic :p You don't need to know how to do each thing like a spell (series of words in exact order)... what you need to do is understand what each code does and then you could make everything you'd want without any help.
    You should search for basic tutorials about making commands first, then you can convert the first argument to a Material (with Material.matchMaterial or equivalent) and give it to the player (again, searching :p it's been discussed ALOT of times).

    And I'm not being mean, I'm trying to be helpful for new people.
  15. Offline


    He is teaching new people the BASICS of Bukkit API not "Tutorial: Bukkit; How to code like a Digi"
  16. Offline


    Odie680 he's not though... Digi is actually being helpful and 100% correct there.
Thread Status:
Not open for further replies.

Share This Page