Class ATMOpenEvent

java.lang.Object
org.bukkit.event.Event
nl.minetopiasdb.api.events.player.ATMOpenEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class ATMOpenEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
This event is thrown when someone opened their ATM.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Constructor Summary

    Constructors
    Constructor
    Description
    ATMOpenEvent(org.bukkit.entity.Player player, org.bukkit.OfflinePlayer openedFor, ATMOpenType openType)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.event.HandlerList
     
    org.bukkit.event.HandlerList
     
    org.bukkit.OfflinePlayer
    Player where the ATM is opened for.
    Get the open type for the ATM
    org.bukkit.entity.Player
    Get the player who opened the ATM
    boolean
     
    void
    setCancelled(boolean cancelled)
     

    Methods inherited from class org.bukkit.event.Event

    getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ATMOpenEvent

      public ATMOpenEvent(org.bukkit.entity.Player player, org.bukkit.OfflinePlayer openedFor, ATMOpenType openType)
  • Method Details

    • getPlayer

      public org.bukkit.entity.Player getPlayer()
      Get the player who opened the ATM
      Returns:
      player who opened ATM
    • getOpenedFor

      public org.bukkit.OfflinePlayer getOpenedFor()
      Player where the ATM is opened for. Will either be getPlayer() or the player given when using /openbank <Player>
      Returns:
      Target player.
    • getOpenType

      public ATMOpenType getOpenType()
      Get the open type for the ATM
      Returns:
      Either ATMOpenType.CLICK_ATM, ATMOpenType.OPENBANK_CMD or ATMOpenType.OPENBANK_ADMINTOOL
    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean cancelled)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable