Hook into OreAnnouncer

OreAnnouncer offers some API to work with. They are currently in development.

Importing OreAnnouncer





repositories {
    maven {
        name = 'codemc-repo'
        url = 'https://repo.codemc.org/repository/maven-public/'

dependencies {
    compileOnly group: 'com.alessiodp.oreannouncer', name: 'oreannouncer-api', version: '2.3.1'

Implementing OreAnnouncer

Open plugin.yml and insert OreAnnouncer as depend (or soft-depend):

depend: [OreAnnouncer]
soft-depend: [OreAnnouncer]

Before hook into it, be sure its enabled!

if (getServer().getPluginManager().getPlugin("OreAnnouncer") != null) {
    if (getServer().getPluginManager().getPlugin("OreAnnouncer").isEnabled()) {
        // OreAnnouncer is enabled

API Methods

OreAnnouncer offers a class called OreAnnouncerAPI, you can initialize it to call API methods. This is how you can use it:

OreAnnouncerAPI api = OreAnnouncer.getApi();
OAPlayer player = api.getOAPlayer(simplePlayer.getUniqueId()); // Get the player
if (player.haveAlertsOn()) {
  // Alerts enabled
} else {
  // Alers disabled


You can find the Javadoc here.