public interface ChangeWorldBorderEvent extends Event, Cancellable
Player
or a World
.Modifier and Type | Interface and Description |
---|---|
static interface |
ChangeWorldBorderEvent.TargetPlayer
An event that is fired when a player's world border is changed.
|
static interface |
ChangeWorldBorderEvent.TargetWorld
An event that is fired when a world's border is changed.
|
Modifier and Type | Method and Description |
---|---|
Optional<WorldBorder> |
getNewBorder()
Gets the border that will be used as an
Optional . |
Optional<WorldBorder> |
getPreviousBorder()
Gets the border that was previously used as an
Optional . |
getCause, getContext, getSource
isCancelled, setCancelled
Optional<WorldBorder> getPreviousBorder()
Optional
. There
may be no border set for the target (especially, if it is a player), in
which case, an empty Optional
is returned.Optional<WorldBorder> getNewBorder()
Optional
. For some
targets, the border may be unset and therefore they may not always have a
border. It is in these instances that an empty Optional
is
returned.