ServerTutorialApi
Code (Text):
public class ServerTutorialApi {
/**
* Starts a server tutorial for the defined player.
* Returns true if the tutorial has been started. False in all other cases
* @param id Id of the server tutorial.
* @param player The player.
* @return A boolean that represents if the tutorial has been started.
*/
public boolean startTutorial(String id, Player player){
}
/**
* Returns if the player is currently in a server tutorial.
* @param uuid The players UUID
* @return A boolean
*/
public boolean isInTutorial(UUID uuid){
}
/**
* Get the current servertutorial of a player.
* @param uuid The UUID of the player
* @return The servertutorial or null if not in one.
*/
public ServerTutorial getCurrentTutorial(UUID uuid){
}
/**
* Gets the controller object that manges the players tutorial.
* @param uuid
* @return The controller object. Null if not in a tutorial.
*/
public TutorialController getController(UUID uuid){
}
/**
* This method is used to fetch the API with ease.
* @return An Api Object
*/
public static ServerTutorialApi getApi(){
}
}
To get this class simple use this piece of code:
Code (Text):
ServerTutorialApi stApi = ServerTutorialApi.getApi();
//TODO: Store this somewhere for easy acces.
Events
The API also provides some events you can listen for.
Code (Text):
@EventHandler
public void handlestart(TutorialStartEvent event){
}
@EventHandler
public void handlestop(TutorialEndEvent event){
}
@EventHandler
void handlePlayPoint(TutorialPlayPointEvent event){
}
Javadocs:
http://servertutorialplus.martenm.nl/index
(Note: Only contains objects you should be using when using the API)