Olzie Development
HomeDiscord
  • Introduction
  • Minecraft Plugins
    • Player Auctions
      • Commands & Permissions
      • Configuration
        • Item Configuration
        • Menu Configuration
        • Lang Configuration
      • FAQ
        • Database FAQ
      • Supported Plugins
      • Plugin Features
      • Plugin API
        • Creating expansions
          • Auction Currency
          • Auction Product
          • Auction Converter
        • Creating Commands
        • Using Events
      • Rest API
        • Endpoints
          • GET
            • /api/playerauctions/getPlayerAuctionByID/{id}
            • /api/playerauctions/getRecentAuctionsByUUID/{page}
            • /api/playerauctions/getPlayerAuctions/{page}
            • /api/playerauctions/getAuctionCategoryByName/{categoryname}
            • /api/playerauctions/getAuctionCategories/{page}
            • /api/playerauctions/getAuctionPlayerByUUID/{uuid}
          • DELETE
            • /api/playerauctions/deleteRecentAuctionByID/{id}
        • Events
          • PlayerAuctionSellEvent
          • PlayerAuctionBuyEvent
          • PlayerAuctionBidEvent
          • PlayerAuctionBidWonEvent
          • PlayerAuctionRemoveEvent
          • AuctionExpireUpdateEvent
          • AuctionPlayerUpdateEvent
          • PlayerAuctionUpdateEvent
        • Errors
    • Player Economy
      • Commands & Permissions
      • Configuration
        • Item Configuration
        • Lang Configuration
      • FAQ
        • Database FAQ
      • Supported Plugins
      • Plugin Features
      • Plugin API
        • Creating Commands
        • Using Events
      • Rest API
        • Endpoints
          • GET
          • DELETE
        • Events
        • Errors
    • Player Warps
      • Commands & Permissions
      • Configuration
        • Item Configuration
        • Menu Configuration
        • Lang Configuration
      • FAQ
        • Database FAQ
      • Supported Plugins
      • Plugin Features
      • Plugin API
        • Creating expansions
          • Warp Addon
          • Warp Map Addon
          • Warp Converter
          • Warp Currency
        • Creating Commands
        • Using Events
      • Rest API
        • Endpoints
          • GET
            • /api/playerwarps/getPlayerWarpByName/{warpname}
            • /api/playerwarps/getSponsorWarp/{id}
            • /api/playerwarps/getPlayerWarpByID/{id}
            • /api/playerwarps/getPlayerWarps/{page}
            • /api/playerwarps/getWarpCategoryByName/{categoryname}
            • /api/playerwarps/getWarpCategories/{page}
            • /api/playerwarps/getWarpPlayerByUUID/{uuid}
          • DELETE
            • /api/playerwarps/deletePlayerWarpByName/{warpname}
            • /api/playerwarps/deletePlayerWarpByID/{id}
        • Events
          • PlayerWarpTeleportEvent
          • PlayerWarpSponsorEvent
          • PlayerWarpRentEvent
          • PlayerWarpRemoveEvent
          • PlayerWarpCreateEvent
          • WarpPlayerUpdateEvent
          • PlayerWarpUpdateEvent
        • Errors
    • Player Businesses
      • Commands & Permissions
      • Configuration
        • Item Configuration
        • Menu Configuration
        • Lang Configuration
      • FAQ
      • Supported Plugins
      • Plugin Features
      • Plugin API
      • Rest API
        • Endpoints
          • GET
          • DELETE
        • Events
        • Errors
    • Player Trade
      • Commands & Permissions
      • Configuration
        • Item Configuration
        • Menu Configuration
        • Lang Configuration
      • FAQ
      • Supported Plugins
      • Plugin Features
      • Plugin API
      • Rest API
        • Endpoints
          • GET
          • DELETE
        • Events
        • Errors
    • Player Treasury
      • Commands & Permissions
      • Configuration
        • Lang Configuration
      • FAQ
      • Supported Plugins
      • Plugin Features
      • Plugin API
      • Rest API
        • Endpoints
          • GET
          • DELETE
        • Events
        • Errors
    • Player Elections
      • Commands & Permissions
      • Configuration
        • Lang Configuration
      • FAQ
      • Supported Plugins
      • Plugin Features
      • Plugin API
      • Rest API
        • Endpoints
          • GET
          • DELETE
        • Events
        • Errors
    • Night Market
      • Commands & Permissions
      • Configuration
        • Item Configuration
        • Menu Configuration
        • Lang Configuration
      • FAQ
      • Supported Plugins
      • Plugin Features
      • Plugin API
        • Creating expansions
          • Market Currency
        • Creating Commands
        • Using Events
      • Rest API
        • Endpoints
          • GET
          • DELETE
        • Events
        • Errors
Powered by GitBook
On this page
  • Registering
  • Examples

Was this helpful?

  1. Minecraft Plugins
  2. Player Auctions
  3. Plugin API
  4. Creating expansions

Auction Product

Here you can view details on how to create a product addon using the Expansions Plugin API.

PreviousAuction CurrencyNextAuction Converter

Last updated 4 months ago

Was this helpful?

In Player Auctions you can create a product addon that will allow you to create a new product type. This will allow you to create a new product type that will be able to be sold on the auction house.

Registering

You can go to learn on how to register an expansion.

Examples

Here is an example of a product addon class, this will let you be able to create a new product type.

public class ProductExample extends AProductProvider<String> {
    
    @Override
    public void giveProduct(AProduct<String> aProduct, Player player) {
        
    }

    @Override
    public boolean isInvalidProduct(AProduct<String> product, Player player) {
        return false;
    }

    @Override
    public boolean isDamagedProduct(AProduct<String> product, Player player) {
        return false;
    }

    @Override
    public boolean isCorrect(AProduct<String> product, Player player) {
        return false;
    }

    @Override
    public boolean isSimilarProduct(ASerializableProduct<?> product, ASerializableProduct<?> other) {
        return false;
    }

    @Override
    public void takeProduct(AProduct<String> product, Player player) {

    }

    @Override
    public AProduct<String> setupProduct(Long amount, Player player) {
        return null;
    }

    @Override
    public AProduct<String> setupProduct(Long amount, String s) {
        return null;
    }

    @Override
    public ASerializableProduct<String> getSerializableProduct(byte[] bytes) {
        return null;
    }

    @Override
    public ItemStack getIcon(AProduct<String> product) {
        return null;
    }

    @Override
    public List<ACategory> getCategories(AProduct<String> product) {
        return null;
    }

    @Override
    public List<ACategory> getCategories(String product) {
        return null;
    }

    @Override
    public String getProductName(AProduct<String> product, FileConfiguration configuration, FileConfiguration lang, boolean showDisplayName) {
        return null;
    }

    @Override
    public List<String> getItemLore(Auction auction, ConfigurationSection section) {
        return null;
    }

    @Override
    public boolean isEnabled() {
        return true;
    }

    @Override
    public String getName() {
        return "Example Expansion";
    }

    @Override
    public void onLoad() {

    }
}

A product addon class must extend the AProductProvider class. This class has a generic type that must be the type of the product you are creating. In this example we are creating a product that is a string.

The AProductProvider class has many methods that you must override. These methods are used to handle the product you are creating.

The giveProduct method is called when a player buys the product. This method is used to give the player the product.

The isInvalidProduct method is called when a player tries to buy the product. This method is used to check if the player can buy the product.

The isDamagedProduct method is called when a player tries to buy the product. This method is used to check if the product is damaged.

The isCorrect method is called when a player tries to buy the product. This method is used to check if the product is correct.

The isSimilarProduct method is called when a player tries to buy the product. This method is used to check if the product is similar to another product.

The takeProduct method is called when a player buys the product. This method is used to take the product from the player.

The setupProduct method is called when a player tries to buy the product. This method is used to setup the product.

The getSerializableProduct method is called when a player tries to buy the product. This method is used to get the serializable product.

The getIcon method is called when a player views the product. This method is used to get the icon of the product.

The getCategories method is called when a player views the product. This method is used to get the categories of the product.

The getProductName method is called when a player views the product. This method is used to get the name of the product.

The getItemLore method is called when a player views the product. This method is used to get the lore of the product.

here