Developer API
Installation
Events
Map-Ads currently has two events: AdvertCreateEvent
and AdvertReviewEvent
. Both events can be cancelled.
The AdvertCreateEvent
is called when a player tries to create an ad.
The AdvertReviewEvent
is called when a staff member tries to review an ad.
Transitions
Map-Ads allows you to create your own transitions. Just make a new class and implement the Transition
interface:
After that you can register the transition by calling TransitionRegistry.register("my_transition", new MyTransition());
.
I encourage you to take a look at the existing transitions to see how they work.
Services
You can get an instance of the following services using the Bukkit service manager (Bukkit.getServicesManager().getRegistration(ServiceClass.class).getProvider()
- You'll have to replace ServiceClass.class with the class of the service):
AdvertStorage
AdScreenStorage
ImageStorage
DefaultImageController
ImageConverter
ImageRetriever
Last updated