java.lang.Object
org.bukkit.event.Event
io.eliotesta98.CubeGenerator.Events.ApiEvents.PlaceEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable, org.bukkit.event.Listener

public class PlaceEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable, org.bukkit.event.Listener
This Event is invoked when a player place a generator
See Also:
  • Cancellable
  • Listener
  • Event
  • Nested Class Summary

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

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

    Constructors
    Constructor
    Description
    PlaceEvent(org.bukkit.entity.Player placer, ArrayList<org.bukkit.Location> frameLocations, ArrayList<org.bukkit.Location> internalLocations, int generatorId)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    ArrayList<org.bukkit.Location>
    Returns the locations of generator frame.
    int
    Returns the id of future generator placed
    static org.bukkit.event.HandlerList
    Event List
    org.bukkit.event.HandlerList
    Event List
    ArrayList<org.bukkit.Location>
    Returns the locations breakable inside generator.
    org.bukkit.entity.Player
    Returns the player who place the Cube.
    boolean
    Cancelled event control
    void
    setCancelled(boolean isCancelled)
    Set on true if you want event to be 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

    • PlaceEvent

      public PlaceEvent(org.bukkit.entity.Player placer, ArrayList<org.bukkit.Location> frameLocations, ArrayList<org.bukkit.Location> internalLocations, int generatorId)
      Constructor
      Parameters:
      placer - player who placed the Cube
      frameLocations - list of frame of Cube
      internalLocations - list of internal location of Cube
      generatorId - id of Cube
  • Method Details

    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
      Event List
      Returns:
      a list of events
    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Event List
      Specified by:
      getHandlers in class org.bukkit.event.Event
      Returns:
      a list of events
    • isCancelled

      public boolean isCancelled()
      Cancelled event control
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
      Returns:
      if event is cancelled
    • setCancelled

      public void setCancelled(boolean isCancelled)
      Set on true if you want event to be cancelled
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • getPlacer

      public org.bukkit.entity.Player getPlacer()
      Returns the player who place the Cube.
      Returns:
      the placer.
    • getInternalLocations

      public ArrayList<org.bukkit.Location> getInternalLocations()
      Returns the locations breakable inside generator.
      Returns:
      the internal locations.
    • getFrameLocations

      public ArrayList<org.bukkit.Location> getFrameLocations()
      Returns the locations of generator frame.
      Returns:
      the frame locations.
    • getGeneratorId

      public int getGeneratorId()
      Returns the id of future generator placed
      Returns:
      the generator id