Cancellable
public class PortalCreateEvent extends WorldEvent implements Cancellable
Modifier and Type | Class | Description |
---|---|---|
static class |
PortalCreateEvent.CreateReason |
An enum to specify the various reasons for a portal's creation
|
Event.Result
Constructor | Description |
---|---|
PortalCreateEvent(Collection<Block> blocks,
World world,
PortalCreateEvent.CreateReason reason) |
Modifier and Type | Method | Description |
---|---|---|
ArrayList<Block> |
getBlocks() |
Gets an array list of all the blocks associated with the created portal
|
static HandlerList |
getHandlerList() |
|
HandlerList |
getHandlers() |
|
PortalCreateEvent.CreateReason |
getReason() |
Gets the reason for the portal's creation
|
boolean |
isCancelled() |
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel) |
Sets the cancellation state of this event.
|
callEvent, getEventName, isAsynchronous
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getWorld
public PortalCreateEvent(@NotNull Collection<Block> blocks, @NotNull World world, @NotNull PortalCreateEvent.CreateReason reason)
@NotNull public ArrayList<Block> getBlocks()
public boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
public void setCancelled(boolean cancel)
Cancellable
setCancelled
in interface Cancellable
cancel
- true if you wish to cancel this event@NotNull public PortalCreateEvent.CreateReason getReason()
@NotNull public HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static HandlerList getHandlerList()
Copyright © 2020. All rights reserved.