public class CauldronLevelChangeEvent extends BlockEvent implements Cancellable
Modifier and Type | Class and Description |
---|---|
static class |
CauldronLevelChangeEvent.ChangeReason |
Event.Result
block
Constructor and Description |
---|
CauldronLevelChangeEvent(Block block,
Entity entity,
CauldronLevelChangeEvent.ChangeReason reason,
BlockState newBlock) |
Modifier and Type | Method and Description |
---|---|
Entity |
getEntity()
Get entity which did this.
|
static HandlerList |
getHandlerList() |
HandlerList |
getHandlers() |
int |
getNewLevel()
Deprecated.
not all cauldron contents are Levelled
|
BlockState |
getNewState()
Gets the new state of the cauldron.
|
int |
getOldLevel()
Deprecated.
not all cauldron contents are Levelled
|
CauldronLevelChangeEvent.ChangeReason |
getReason() |
boolean |
isCancelled()
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancelled)
Sets the cancellation state of this event.
|
void |
setNewLevel(int newLevel)
Deprecated.
not all cauldron contents are Levelled
|
getBlock
getEventName, isAsynchronous
public CauldronLevelChangeEvent(@NotNull Block block, @Nullable Entity entity, @NotNull CauldronLevelChangeEvent.ChangeReason reason, @NotNull BlockState newBlock)
@Nullable public Entity getEntity()
@NotNull public CauldronLevelChangeEvent.ChangeReason getReason()
@NotNull public BlockState getNewState()
@Deprecated public int getOldLevel()
BlockEvent.getBlock()
@Deprecated public int getNewLevel()
getNewState()
@Deprecated public void setNewLevel(int newLevel)
newLevel
- new levelgetNewState()
public boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
public void setCancelled(boolean cancelled)
Cancellable
setCancelled
in interface Cancellable
cancelled
- true if you wish to cancel this event@NotNull public HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static HandlerList getHandlerList()
Copyright © 2022. All rights reserved.