-
Notifications
You must be signed in to change notification settings - Fork 0
ReloadEvent Support
Noah edited this page Aug 24, 2024
·
6 revisions
Inside of your Maven repositories add the following:
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>Then, inside of your Maven dependencies add the following:
<dependency>
<groupId>com.github.amnoah.betterreload</groupId>
<artifactId>api</artifactId>
<version>v1.0.0</version>
<scope>provided</scope>
</dependency>Inside of your Gradle repositories add the following:
maven { url 'https://jitpack.io' }Then, inside of your Gradle dependencies add the following:
implementation 'com.github.amnoah.betterreload:api:v1.0.0'If your plugin relies on BetterReload being present, you should add BetterReload to your depend node.
Example:
depend:
- BetterReloadIf you are only relying on BetterReload if it is present, you should add BetterReload to your softdepend note.
Example:
softdepend:
- BetterReloadIf you are soft-depending, I'd recommend making sure that BetterReload is present before registering any listeners. This can be done like this:
if (Bukkit.getPluginManager().getPlugin("BetterReload") != null)
// Register listener.
}Now you can use the ReloadEvent like you would any other Bukkit event!
To learn how to use Bukkit events, please check the SpigotMC Event API wiki.