Skip to content

Plugin API

If you’re a developer looking to extend your plugin’s functionality with BreweryX, you’ve come to the right place.
On this page, we’ll walk through how to set up BreweryX’s API and start writing your own custom features.

Repository and Dependency

Latest release:

repositories {
maven("https://repo.jsinco.dev/releases")
}
dependencies {
compileOnly("com.dre.brewery:BreweryX:%VERSION%")
}

Usage

We offer a variety of utilities and events within BreweryX’s api package.

Example

PlayerListener.java
// Checking if an item is a BreweryX potion
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
ItemStack item = event.getItem();
if (BreweryApi.isBrew(item)) {
event.getPlayer().sendMessage("This is a BreweryX potion!");
}
}