• Guest, HEROCRAFT PUBLIC RELEASE IS HAPPENING AN HOUR EARLIER! TONIGHT @ 7PM CST GET READY FOR IT! play.hc.to
    Read up on the guides and new systems! Here.
    View the LIVE Map here @ hc.to/map
    Stuck or have a problem? use "/pe create" to to open a ticket with staff (There are some known issues and other hotfixes we will be pushing asap)
  • Guest, Make sure to use our LAUNCHER! Read more here!

Teaching Bukkit to Noobs!

devotedworker

Retired Staff
Max Legacy Supporter
Joined
Oct 20, 2012
Location
Dungeon Heroes Server
This Thread will be all about Teaching the Bukkit ( and I guess Hero's API ) to all of the New Coders or to be coders!
Here is a collection of Links I have gotten learning the Bukkit API and Hero's API.



HERO API
The Hero API JavaDocs : hc.to/javadocs
Example Skill : https://www.irccloud.com/pastebin/378BQIKF

------------------------------------------------------
BUKKIT API

How to Get the Jar Files : http://goo.gl/WO2PZ7 ( Shortened )
The "Spigot" ( Bukkit ) API Javadocs : https://hub.spigotmc.org/javadocs/spigot/
Loading and Using the Default Config : http://goo.gl/BuvStQ ( Shortened )
Creating Custom Inventorys and Opening them : http://goo.gl/82y2iL ( Shortened )
Creating Custom YML Files : http://goo.gl/aZdpdD ( Shortened )
Creating "Custom Recipes" ( Not like my Plugin but using Regular Mechanics ) : http://goo.gl/WO2PZ7 ( Shortened )
A Basic Tutorial with the Basic Plugin Format : http://wiki.bukkit.org/Plugin_Tutorial ( Scroll down a bit )
A More Extensive Tutorial : http://goo.gl/Kr2y6o ( Shortened )

------------------------------------------------------
OTHER COOL STUFF
A cool Online Parser for YML files : http://yaml-online-parser.appspot.com/ ( Thank Kainzo )


@PoisonEdge Who requested this information ^_^
Feel free to post on this Thread to get help with Bukkit or provide more links to add to my Collection ^_^


======== Herocraft Development Info (By Kainzo) =======

Introduction
So you are part of the HeroCraft development team now. Most likely you are ready to get started and are here to find out how to get your development environment setup and get your hands on the code. With that in mind lets get started.

Tools
So first off you are going to need to get accounts and several places. We use a combination of tools that all work together to provide a complete and business class development environment. The following is a list of all the tools and sites that we use.​
Once you get accepted into the team you will need to create an account on the Nexus & Redmine servers and then inform us of your email address & account name. It is suggested to use the same account name and email address across all servers. Once this is done you will be given a Git account on our private git repository and assigned to the proper groups on the servers.
Build Environment
Which IDE you use it completely up to you. The general preference is IntelliJ IDEA as it is a more robust editor and has better designed tools, however, you are free to use whichever you feel most comfortable with. In addition you will need to install the following to
  • Git
  • Maven (There is an excellent guide for setting up Maven here)
  • Java 7 JDK (For now it is also suggested to have Java 6 JDK)
After you have everything setup there are only a few more things left for you to do. At this point you should probably clone the code through git, import it into your favorite editor, and take a look over the following section on Maven (which we use for building all projects).

Maven
For all of our projects we use maven to do our building. Maven allows us to easily manage code dependencies. With this setup there is no need to manually set the build environment in your programming environment, distribute binary dependencies, or constantly be updating dependencies both locally and on the code repository. Everything is done by simply changing a few lines of code in your pom.xml file. To get started there are a few steps you need to take.

First will be to create a special settings file for your local maven install so that it knows how to resolve certain dependencies. In your home folder there should be a .m2 folder. This is usually located at Users\<Name>\.m2 Inside of this folder you will need to create a settings.xml file and put the following information into it:
Code:
<settings>
  <servers>
    <server>
      <id>heroes-repo</id>
      <username>username</username>
      <password>password</password>
    </server>
  </servers>
</settings>

Make sure you substitute the username and password for your Nexus username and password that you created earlier. What this file does is allows your local Maven install to be able to get team build dependencies from our private Nexus install.


Next you will need to edit your projects pom.xml file to tell the project where to deploy the final built artifact. Provided that you are working on an internal project (not one that will be released to the public as open source) add the following:
Code:
<distributionManagement>
        <repository>
            <id>heroes-repo</id>
            <name>Internal Releases</name>
            <url>http://nexus.theyeticave.net/content/repositories/releases/</url>
        </repository>
        <snapshotRepository>
            <id>heroes-repo</id>
            <name>Internal Snapshots</name>
            <url>http://nexus.theyeticave.net/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

What this does is tells the build server when it is performing the build, that once completed deploy the file to one of those two locations based on whether it is a release or a development snapshot.

Another great thing is that with the setup we have, you don't have to search around multiple locations for the dependency's repo. This also makes the pom file cleaner and more concise as you only need to define one remote repo that has most all dependencies that we use. Simply include the following section of code in your pom.xml
Code:
<repositories>
        <repository>
            <id>heroes-repo</id>
            <url>http://nexus.theyeticave.net/content/groups/herocraft/</url>
        </repository>
    </repositories>

The Heroes repo contains all of the Herocraft artifacts, both public and private; as well as most all other dependencies that we use such as Libigot, Spout, and many others. If there is something that is not available through that link please let either TheYeti Kainzo or gabizou know and we can make it available. This even works for external dependencies that are not mavenized or don't have their own dependency storage.
 
Last edited by a moderator:

Kainzo

The Disposable Hero
Staff member
Founder
Adventure Team
Joined
Jan 7, 2011
Location
The 7th Circle of Heaven
Introduction
So you are part of the HeroCraft development team now. Most likely you are ready to get started and are here to find out how to get your development environment setup and get your hands on the code. With that in mind lets get started.

Tools
So first off you are going to need to get accounts and several places. We use a combination of tools that all work together to provide a complete and business class development environment. The following is a list of all the tools and sites that we use.​
Once you get accepted into the team you will need to create an account on the Nexus & Redmine servers and then inform us of your email address & account name. It is suggested to use the same account name and email address across all servers. Once this is done you will be given a Git account on our private git repository and assigned to the proper groups on the servers.
Build Environment
Which IDE you use it completely up to you. The general preference is IntelliJ IDEA as it is a more robust editor and has better designed tools, however, you are free to use whichever you feel most comfortable with. In addition you will need to install the following to
  • Git
  • Maven (There is an excellent guide for setting up Maven here)
  • Java 7 JDK (For now it is also suggested to have Java 6 JDK)
After you have everything setup there are only a few more things left for you to do. At this point you should probably clone the code through git, import it into your favorite editor, and take a look over the following section on Maven (which we use for building all projects).

Maven
For all of our projects we use maven to do our building. Maven allows us to easily manage code dependencies. With this setup there is no need to manually set the build environment in your programming environment, distribute binary dependencies, or constantly be updating dependencies both locally and on the code repository. Everything is done by simply changing a few lines of code in your pom.xml file. To get started there are a few steps you need to take.


First will be to create a special settings file for your local maven install so that it knows how to resolve certain dependencies. In your home folder there should be a .m2 folder. This is usually located at Users\<Name>\.m2 Inside of this folder you will need to create a settings.xml file and put the following information into it:
Code:
<settings>
  <servers>
    <server>
      <id>heroes-repo</id>
      <username>username</username>
      <password>password</password>
    </server>
  </servers>
</settings>

Make sure you substitute the username and password for your Nexus username and password that you created earlier. What this file does is allows your local Maven install to be able to get team build dependencies from our private Nexus install.


Next you will need to edit your projects pom.xml file to tell the project where to deploy the final built artifact. Provided that you are working on an internal project (not one that will be released to the public as open source) add the following:
Code:
<distributionManagement>
        <repository>
            <id>heroes-repo</id>
            <name>Internal Releases</name>
            <url>http://nexus.theyeticave.net/content/repositories/releases/</url>
        </repository>
        <snapshotRepository>
            <id>heroes-repo</id>
            <name>Internal Snapshots</name>
            <url>http://nexus.theyeticave.net/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

What this does is tells the build server when it is performing the build, that once completed deploy the file to one of those two locations based on whether it is a release or a development snapshot.

Another great thing is that with the setup we have, you don't have to search around multiple locations for the dependency's repo. This also makes the pom file cleaner and more concise as you only need to define one remote repo that has most all dependencies that we use. Simply include the following section of code in your pom.xml
Code:
<repositories>
        <repository>
            <id>heroes-repo</id>
            <url>http://nexus.theyeticave.net/content/groups/herocraft/</url>
        </repository>
    </repositories>

The Heroes repo contains all of the Herocraft artifacts, both public and private; as well as most all other dependencies that we use such as Libigot, Spout, and many others. If there is something that is not available through that link please let either TheYeti Kainzo or know and we can make it available. This even works for external dependencies that are not mavenized or don't have their own dependency storage.
 
Top