Next, add Player Economy 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.
You can access the Player Economy 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.
Some examples
Here is an example on how to access a economy player by their UUID.
/*
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
*/
PlayerEconomy api = PlayerEconomy.getInstance();
PlayerEconomy.getInstance(api -> { // accessing the instance when its ready.
});
PlayerEconomy.getInstance(api -> {
EPlayer player = api.getEcoPlayer(UUID.randomUUID());
// get their balance
player.getBalance();
});