public class PortalCreateEvent extends WorldEvent implements Cancellable
Modifier and Type | Class and Description |
---|---|
static class |
PortalCreateEvent.CreateReason
An enum to specify the various reasons for a portal's creation
|
Event.Result
Constructor and Description |
---|
PortalCreateEvent(List<BlockState> blocks,
World world,
Entity entity,
PortalCreateEvent.CreateReason reason) |
PortalCreateEvent(List<BlockState> blocks,
World world,
PortalCreateEvent.CreateReason reason)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
List<BlockState> |
getBlocks()
Gets an array list of all the blocks associated with the created portal
|
Entity |
getEntity()
Returns the Entity that triggered this portal creation (if available)
|
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.
|
getWorld
callEvent, getEventName, isAsynchronous
@Deprecated public PortalCreateEvent(@NotNull List<BlockState> blocks, @NotNull World world, @NotNull PortalCreateEvent.CreateReason reason)
public PortalCreateEvent(@NotNull List<BlockState> blocks, @NotNull World world, @Nullable Entity entity, @NotNull PortalCreateEvent.CreateReason reason)
@NotNull public List<BlockState> getBlocks()
@Nullable public 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 PortalCreateEvent.CreateReason getReason()
@NotNull public HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static HandlerList getHandlerList()
Copyright © 2022. All rights reserved.