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
  • Java Docs
  • Maven Repository
  • How to access the API
  • Some examples

Was this helpful?

  1. Minecraft Plugins
  2. Player Trade

Plugin API

Here you can view the JavaDocs and how to access/use the Player Trade Plugin API.

PreviousPlugin FeaturesNextRest API

Last updated 4 months ago

Was this helpful?

Java Docs

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

Maven Repository

Do you want to integrate with Player Trade in your plugin? You can use the OlzieDev repo to build against the Player Trade API.

Under repositories in your pom.xml, you need to add a new repository for the repo.

<repositories>
    ...
    <repository>
        <id>olzie-repo</id>
        <url>https://repo.olziedev.com/</url>
    </repository>
</repositories>

Next, add Player Trade 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.

<dependencies>
    ...
    <dependency>
        <groupId>com.olziedev</groupId>
        <artifactId>playertrade-api</artifactId>
        <version>VERSION_HERE</version>
        <scope>provided</scope>
    </dependency>
</dependencies>

How to access the API

You can access the Player Trade 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
*/ 
PlayerTradeAPI api = PlayerTradeAPI.getInstance(); 

PlayerTradeAPI.getInstance(api -> { // accessing the instance when its ready.

});

Some examples

here