Auction Product
Here you can view details on how to create a product addon using the Expansions API.
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 here 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.
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.
Last updated