Class PlaceEvent
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:
-
CancellableListenerEvent
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionPlaceEvent(org.bukkit.entity.Player placer, ArrayList<org.bukkit.Location> frameLocations, ArrayList<org.bukkit.Location> internalLocations, int generatorId) Constructor -
Method Summary
Modifier and TypeMethodDescriptionArrayList<org.bukkit.Location>Returns the locations of generator frame.intReturns the id of future generator placedstatic org.bukkit.event.HandlerListEvent Listorg.bukkit.event.HandlerListEvent ListArrayList<org.bukkit.Location>Returns the locations breakable inside generator.org.bukkit.entity.PlayerReturns the player who place the Cube.booleanCancelled event controlvoidsetCancelled(boolean isCancelled) Set on true if you want event to be cancelledMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
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 CubeframeLocations- list of frame of CubeinternalLocations- list of internal location of CubegeneratorId- 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:
getHandlersin classorg.bukkit.event.Event- Returns:
- a list of events
-
isCancelled
public boolean isCancelled()Cancelled event control- Specified by:
isCancelledin interfaceorg.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:
setCancelledin interfaceorg.bukkit.event.Cancellable
-
getPlacer
public org.bukkit.entity.Player getPlacer()Returns the player who place the Cube.- Returns:
- the placer.
-
getInternalLocations
Returns the locations breakable inside generator.- Returns:
- the internal locations.
-
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
-