Developer API

Here you can view some examples and usages on how to use the developer API for Player Auctions. You can view the official JavaDocs for Player Auctions here.

Java Docs

Here you can view the Java Docs here for Player Auctions which provides you all the usages and descriptions of the API.

Maven Repository

Do you want to integrate with Player Auctions in your plugin? You can use the OlzieDev repo to build against the Player Auctions API.
Under repositories in your pom.xml, you need to add a new repository for the repo.
Next, add Player Auctions as a dependency under dependencies:
VERSION_HERE would be your exact plugin version, you will not need to update the API version every time a plugin update is out, only when an api update happens.

How to access the API

You can access the Player Auctions API by getting the instance. If the plugin hasn't fully loaded the instance will return null, you can use a callback to access the API when its ready.
Accessing the instance, can return null if not loaded.
This instance can also change when a plugin reload has
happened, so its not advisted to use this
PlayerAuctionsAPI api = PlayerAuctionsAPI.getInstance();
PlayerAuctionsAPI.getInstance(api -> { // accessing the instance when its ready.

Some examples

Here is an example on how to create a player auction.
PlayerAuctionsAPI.getInstance(api -> {
APlayer seller = api.getAuctionPlayer(UUID.randomUUID());
api.createAuctionItem(null, null) // the item in their hand.
auction -> {
// the auctioninstance.
Here is an example on how to access a auction player by their UUID.
PlayerAuctionsAPI.getInstance(api -> {
APlayer player = api.getAuctionPlayer(UUID.randomUUID());
// set all the auctions as expired.
player.getPlayerAuctions().forEach(auction -> auction.setExpireTime(null, null, false));
There are also some events provided by the API, here are some examples.
package example;
import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
public class AuctionEvents implements Listener {
public AuctionEvents() {
Bukkit.getServer().getPluginManager().registerEvents(this, plugin);
public void onAuction(PlayerAuctionSellEvent event) {
Auction auction = event.getPlayerAuction();
if (auction.getPrice() < 10) return;
public void onBuy(PlayerAuctionBuyEvent event) {
Auction auction = event.getPlayerAuction();
if (auction.getAuctionPlayer().getName().equals("Olzie-12")) return;
Last modified 10mo ago