-
-
Notifications
You must be signed in to change notification settings - Fork 51
Developers Getting Started
You can get the latest snapshot releases by going over to JitPack here: https://jitpack.io/#Puharesource/TitleManager, but if you want to get official release go with the following repository and dependencies.
Example for Gradle:
maven {
name 'puharesource-repo'
url 'http://repo.puha.io/repo/'
}Example for Maven:
<repository>
<id>puha-repo</id>
<url>http://repo.puha.io/repo/</url>
</repository>Example for Gradle:
compile group: 'io.puharesource.mc', name: 'TitleManager', version: '2.0.0'Example for Maven
<dependency>
<groupId>io.puharesource.mc</groupId>
<artifactId>TitleManager</artifactId>
<version>2.0.0</version>
</dependency>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]Once you want to use TitleManager's API, you'll need an instance of TitleManagerAPI, which carries all of the methods available for TitleManager. I suggest getting the instance once you load your plugin and store it somewhere easily accessible, for this example I'll however just be storing it locally in the onEnable method.
@Override
public void onEnable() {
TitleManagerAPI api = (TitleManagerAPI) Bukkit.getServer().getPluginManager().getPlugin("TitleManager");
}For kotlin I suggest using the lazy delegate for storing the instance of TitleManager globally.
val titleManagerAPI : TitleManagerAPI by lazy { Bukkit.getServer().pluginManager.getPlugin("TitleManager") }Home | Config | Animations | Permissions | Commands | Placeholders | Scripts