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(@NotNull List<BlockState> blocks,
@NotNull World world,
@NotNull PortalCreateEvent.CreateReason reason) |
Deprecated.
|
PortalCreateEvent(@NotNull List<BlockState> blocks,
@NotNull World world,
@Nullable Entity entity,
@NotNull PortalCreateEvent.CreateReason reason) |
Modifier and Type | Method | Description |
---|---|---|
@NotNull List<BlockState> |
getBlocks() |
Gets an array list of all the blocks associated with the created portal
|
@Nullable Entity |
getEntity() |
Returns the Entity that triggered this portal creation (if available)
|
static @NotNull HandlerList |
getHandlerList() |
|
@NotNull HandlerList |
getHandlers() |
|
@NotNull 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.
|
getEventName, isAsynchronous
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getWorld
@Deprecated public PortalCreateEvent(@NotNull @NotNull List<BlockState> blocks, @NotNull @NotNull World world, @NotNull @NotNull PortalCreateEvent.CreateReason reason)
public PortalCreateEvent(@NotNull @NotNull List<BlockState> blocks, @NotNull @NotNull World world, @Nullable @Nullable Entity entity, @NotNull @NotNull PortalCreateEvent.CreateReason reason)
@NotNull public @NotNull List<BlockState> getBlocks()
@Nullable public @Nullable Entity getEntity()
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 @NotNull PortalCreateEvent.CreateReason getReason()
@NotNull public @NotNull HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2020. All rights reserved.