Getting started

This is the getting started guide for using the TitleManager API. If you're looking for the JavaDocs they can be found here.

Build tools

Add the TitleManager repository to your project:

<repository>
  <id>puha-repo</id>
  <url>http://repo.puha.io/repo/</url>
</repository>
maven {
    name 'puharesource-repo'
    url 'http://repo.puha.io/repo/'
}
maven {
    name = "puharesource-repo"
    url = uri("http://repo.puha.io/repo/")
}

Add the TitleManager repository to your project:

<dependency>
   <groupId>io.puharesource.mc</groupId>
   <artifactId>TitleManager</artifactId>
   <version>2.2.0</version>
</dependency>
compile group: 'io.puharesource.mc', name: 'TitleManager', version: '2.2.0'
implementation(group = "io.puharesource.mc", name = "TitleManager", version = "2.2.0")

Plugin integration

plugin.yml

If your plugin can't run without TitleManager add the following line to your plugin.yml file:

depend: [TitleManager]

If your plugin can run without TitleManager, then add the following line to your plugin.yml file instead:

soft-depend: [TitleManager]

Getting the API instance

@Override
public void onEnable() {
  TitleManagerAPI api = (TitleManagerAPI) Bukkit.getServer().getPluginManager().getPlugin("TitleManager");
}
override fun onEnable() {
  val api = Bukkit.getServer().pluginManager.getPlugin("TitleManager") as TitleManagerAPI
}