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

Was this helpful?

  1. Minecraft Plugins
  2. Player Economy
  3. Plugin API

Using Events

Here you can view details on how to listen to events using the Plugin API.

PreviousCreating CommandsNextRest API

Last updated 4 months ago

Was this helpful?

In Player Economy you can listen to events using the API, this will allow you to listen to events that happen in the plugin. It uses the Bukkit event system so you should be familiar with that.

Examples

Here is an example of a listener class, this will let you be able to listen to events that happen in the plugin. Here is a list of events you can listen for Economy .

import com.olziedev.playereconomy.api.player.EPlayer;
import com.olziedev.playereconomy.api.events.player.PlayerEconomyDepositEvent;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;

public class ExampleEvents implements Listener {

    @EventHandler
    public void onEcoDeposit(PlayerEconomyDepositEvent event) {
        EPlayer player = event.getEcoPlayer();
        double amount = event.getAmount();
    }
}
here