With the zAuctionHouse API, you can create an infinite amount of AuctionEconomy! To do this, you need to create a class that implements the AuctionEconomy interface. Then, simply implement each method in the interface.
Here is an example of an economy with the level of the players:
If you directly imported the jar of the plugin you can use the DefaultEconomy class like that:
publicclassExampleEconomyextendsDefaultEconomy {publicExampleEconomy() { super("example","%price%âŦ","You dont have enough money","e"); } @OverridepubliclonggetMoney(OfflinePlayer offlinePlayer) {return10000; } @OverridepublicvoiddepositMoney(OfflinePlayer offlinePlayer,long l) {// Do Your Stuff } @OverridepublicvoidwithdrawMoney(OfflinePlayer offlinePlayer,long l) {// Do Your Stuff }}
Vous devez ajouter dans votre plugin.yml le loadBefore pour zAuctionHouse. Cela va indiquer a votre serveur que votre plugin doit charger avant zAuctionHouse.
loadbefore: - zAuctionHouseV3
Then you need to create a listener for the event AuctionLoadEconomyEvent, this event will allow to retrieve the EconomyManager interface to register your economy.