Class MigrationProcessRunEvent
java.lang.Object
org.bukkit.event.Event
de.marcely.bedwars.api.event.MigrationProcessRunEvent
- All Implemented Interfaces:
Cancellable
Gets called when a process of migration has been started using
MigrationProcess.run().-
Nested Class Summary
Nested classes/interfaces inherited from class Event
Event.Result -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHaltLatch(CountDownLatch latch) Adds a latch which can prevent the migration from proceeding.Returns an unmodifiable collection of all latches that have been added to halt the migration process.static HandlerListReturns the process that has started.booleanvoidsetCancelled(boolean bool) Methods inherited from class Event
getEventName, isAsynchronous
-
Constructor Details
-
MigrationProcessRunEvent
-
-
Method Details
-
getProcess
Returns the process that has started.- Returns:
- The process behind all of this
-
addHaltLatch
Adds a latch which can prevent the migration from proceeding.The process will wait until all latches have been counted down to 0 before it continues. This is used for i.a. player data modification, where we wait for other servers to unload their players.
- Parameters:
latch- The latch to add
-
getHaltLatches
Returns an unmodifiable collection of all latches that have been added to halt the migration process.- Returns:
- All latches that can halt the migration process
-
setCancelled
public void setCancelled(boolean bool) - Specified by:
setCancelledin interfaceCancellable
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceCancellable
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHandlerList
-