public class WorldBorderBoundsChangeEvent extends WorldBorderEvent implements Cancellable
| Modifier and Type | Class and Description |
|---|---|
static class |
WorldBorderBoundsChangeEvent.Type |
Event.Result| Constructor and Description |
|---|
WorldBorderBoundsChangeEvent(@NotNull World world,
@NotNull WorldBorder worldBorder,
@NotNull WorldBorderBoundsChangeEvent.Type type,
double oldSize,
double newSize,
long duration) |
| Modifier and Type | Method and Description |
|---|---|
long |
getDuration()
Gets the time in milliseconds for the change.
|
static @NotNull HandlerList |
getHandlerList() |
@NotNull HandlerList |
getHandlers() |
double |
getNewSize()
Gets the new size of the world border.
|
double |
getOldSize()
Gets the old size or the world border.
|
@NotNull WorldBorderBoundsChangeEvent.Type |
getType()
Gets if this change is an instant change or over-time change.
|
boolean |
isCancelled()
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel)
Sets the cancellation state of this event.
|
void |
setDuration(long duration)
Sets the time in milliseconds for the change.
|
void |
setNewSize(double newSize)
Sets the new size of the world border.
|
getWorldBordergetWorldcallEvent, getEventName, isAsynchronouspublic WorldBorderBoundsChangeEvent(@NotNull @NotNull World world, @NotNull @NotNull WorldBorder worldBorder, @NotNull @NotNull WorldBorderBoundsChangeEvent.Type type, double oldSize, double newSize, long duration)
@NotNull public @NotNull WorldBorderBoundsChangeEvent.Type getType()
public double getOldSize()
public double getNewSize()
public void setNewSize(double newSize)
newSize - the new sizepublic long getDuration()
public void setDuration(long duration)
getType() to return
WorldBorderBoundsChangeEvent.Type.STARTED_MOVE.duration - the time in milliseconds for the changepublic boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled in interface Cancellablecancel - true if you wish to cancel this event@NotNull public @NotNull HandlerList getHandlers()
getHandlers in class Event@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2021. All rights reserved.