Class WorldBorderCenterChangeEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.world.WorldEvent
io.papermc.paper.event.world.border.WorldBorderEvent
io.papermc.paper.event.world.border.WorldBorderCenterChangeEvent
- All Implemented Interfaces:
Cancellable
Called when a world border's center is changed.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Constructor Summary
ConstructorDescriptionWorldBorderCenterChangeEvent(@NotNull World world, @NotNull WorldBorder worldBorder, @NotNull Location oldCenter, @NotNull Location newCenter)
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull HandlerList
Gets the new center location for the world border.Gets the original center location of the world border.boolean
Gets the cancellation state of this event.void
setCancelled(boolean cancel)
Sets the cancellation state of this event.void
setNewCenter(@NotNull Location newCenter)
Sets the new center location for the world border.Methods inherited from class io.papermc.paper.event.world.border.WorldBorderEvent
getWorldBorder
Methods inherited from class org.bukkit.event.world.WorldEvent
getWorld
Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
WorldBorderCenterChangeEvent
-
-
Method Details
-
getOldCenter
Gets the original center location of the world border.- Returns:
- the old center
-
getNewCenter
Gets the new center location for the world border.- Returns:
- the new center
-
setNewCenter
Sets the new center location for the world border. Y coordinate is ignored.- Parameters:
newCenter
- the new center
-
isCancelled
public boolean isCancelled()Description copied from interface:Cancellable
Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins- Specified by:
isCancelled
in interfaceCancellable
- Returns:
- true if this event is cancelled
-
setCancelled
public void setCancelled(boolean cancel)Description copied from interface:Cancellable
Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
setCancelled
in interfaceCancellable
- Parameters:
cancel
- true if you wish to cancel this event
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-