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
Section titled “Repository and Dependency”Latest release:
repositories { maven("https://repo.jsinco.dev/releases")}
dependencies { compileOnly("com.dre.brewery:BreweryX:%VERSION%")}
repositories { maven { url "https://repo.jsinco.dev/releases" }}
dependencies { compileOnly "com.dre.brewery:BreweryX:%VERSION%"}
<repositories> <repository> <id>jsinco-repo</id> <url>https://repo.jsinco.dev/releases</url> </repository></repositories>
<dependencies> <dependency> <groupId>com.dre.brewery</groupId> <artifactId>BreweryX</artifactId> <version>%VERSION%</version> <scope>provided</scope> </dependency></dependencies>
We offer a variety of utilities and events within BreweryX’s api
package.
Example
Section titled “Example”// Checking if an item is a BreweryX potion@EventHandlerpublic void onPlayerInteract(PlayerInteractEvent event) { ItemStack item = event.getItem(); if (BreweryApi.isBrew(item)) { event.getPlayer().sendMessage("This is a BreweryX potion!"); }}
// Checking if an item is a BreweryX potion@EventHandlerfun onPlayerInteract(event: PlayerInteractEvent) { val item = event.item if (BreweryApi.isBrew(item)) { event.player.sendMessage("This is a BreweryX potion!") }}