API Events
OreAnnouncer offers a some events that you can listen to. These events can be handled by importing the API into your project.
You can handle a OreAnnouncer event like Bukkit ones:
@EventHandler
public void onPlayerChat(BukkitOreAnnouncerAlertEvent event) {
OABlock block = event.getBlock();
}
Both Bukkit and Bungee events are supported
Due to different event interface between Bungeecord and Bukkit, we must choose which event to handle.
To do that you just need to append Bukkit or Bungee before the event class name, like "BukkitOreAnnouncerAlertEvent" or "BungeeOreAnnouncerAlertEvent".
List of events
Some events are cancellable or editable (editable means that you can edit the values of the event).
This is a list of the supported events:
Event | Cancellable | Editable | Async | Server |
---|---|---|---|---|
_OreAnnouncerAdvancedAlertEvent | ✖ No | ✖ No | ✔ Yes | All |
_OreAnnouncerAlertEvent | ✖ No | ✖ No | ✔ Yes | All |
_OreAnnouncerBlockDestroyEvent | ✖ No | ✖ No | ✔ Yes | All |