[Tutorial] How to make a bukkit plugin Episode 2!!

Discussion in 'Resources' started by TheMCBukkitTut, Dec 26, 2013.

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


    Hey guys FrankJeux here also know as Jacobsscoots or Jacob

    i've made a second video after deciding on making another video since my other video gotten nearly 700 views/people learning.

    Please check out this second video (watch it in 1080p) and maybe subscribe for more?

    Thanks for listening - Jacobsscoots aka FrankJeux

    Links to the video:

  2. Offline


    Couple of things:
    • Use command.getName() instead of the commandLabel. Otherwise you're ignoring all the aliases set for the command by Bukkit or other plugins.
    • You were wondering why 1 gave you level 2: In Java almost all indexes start with 0, thus making 0 the lowest amplifier which in-game is rendered as 1. Amplifier 1 will render 2 and so on.
    • There is no need to send out an Enable or Disable message since Bukkit handles this stuff.
    • You're not checking if the sender is a Player so if the console executes the command you'll get a ClassCastException.
    • Returning false for the onCommand void is basically saying to Bukkit that the command didn't execute and will broadcast the usage of the command in plugin.yml if defined. You should return true if the command was successfully executed.
    • The command /speed 1 in the video, might confuse your viewers because you're not doing anything with arguments. The players will always get speed 1, whatever they specify behind the command.
    • Something optional but always nice to put is the @Override tags, since that shows that you're extending a method from a parent class.
    Sorry this may seem a bit harsh, but there are already a lot of people coming to the Bukkit forums asking for help because they learnt something the wrong way :(. I'm just trying to avoid this :p.
    jorisk322 likes this.
  3. Offline


    Moved to resources.
  4. Offline


    Thank you Mr. iroh
  5. Offline


    Ok Thanks for some feedback
    Ivan likes this.
Thread Status:
Not open for further replies.

Share This Page