The shoebill-api project is one part of the whole Shoebill project. You can download and browse all the builds from our Jenkins server located at Jenkins or directly download the newest version from here
You should take a look at our Github-Wiki and use our Project Generator
Currently, there are some videos on how to setup a Shoebill server & create your first gamemode. There also is a JavaDoc at Shoebill-API JavaDoc. The videos can be found here:
Setting up a shoebill server:
Creating your first gamemode in IntelliJ IDEA 14:
Creating your first gamemode in Eclipse:
If you want to use the shoebill-api, you will either have to download the dependency from our Jenkins server and add it manually to your game mode (different from IDE to IDE), or better: You use maven, and you just have to add our repository to yours section. The following code is needed, in order to access all shoebill related artifacts:
<repository>
<id>gtaun-public-repo</id>
<name>GTAUN Public Repository</name>
<url>http://repo.gtaun.net/content/groups/public</url>
</repository>
After that, you can add the following dependency into your pom.xml file in the section:
<dependency>
<groupId>net.gtaun</groupId>
<artifactId>shoebill-api</artifactId>
<version>1.2-SNAPSHOT</version>
</dependency>
If you successfully added the shoebill-api to your java 8 project, you can create a new class and let it extend from the class "Gamemode". Implement the needed methods (onEnable, onDisable) and you are ready to go (gamemode.yml must be setup first to run the project). Here is a little example:
public class MyGamemode extends Gamemode {
private Logger logger;
@Override
public void onEnable() {
logger = getLogger(); //you can access different methods from the Gamemode Baseclass
//Do stuff, e.g. load mysql database and create instances of new classes that handle events etc.
logger.info("My gamemode has been loaded!");
}
@Override
public void onDisable() {
logger.info("My gamemode is shutting down...");
//Stop mysql connection, save files etc.
logger.info("My gamemode has been shutted down!");
}
}
Here is another little example:
public class MyGamemode extends Gamemode {
@Override
public void onEnable() {
getEventManager().registerHandler(PlayerConnectEvent.class, (e) -> {
Player player = e.getPlayer();
player.sendMessage(Color.GREEN, "Hello " + player.getName() + ", on my server!");
});
}
//onDisable()...
}