Package de.eimmer.ereignis.welt
Class ZeitUeberspringEreignis
java.lang.Object
de.eimmer.ereignis.Ereignis
de.eimmer.ereignis.welt.WeltEreignis
de.eimmer.ereignis.welt.ZeitUeberspringEreignis
- All Implemented Interfaces:
Abbrechbar
Called when the time skips in a welt.
If the ereignis is cancelled the time will not change.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
An enum specifying the reason the time skipped.Nested classes/interfaces inherited from class de.eimmer.ereignis.Ereignis
Ereignis.Result
-
Constructor Summary
ConstructorsConstructorDescriptionZeitUeberspringEreignis
(Welt welt, ZeitUeberspringEreignis.SkipReason skipReason, long skipAmount) -
Method Summary
Modifier and TypeMethodDescriptionstatic HandhaberListe
long
Gets the amount of time that was skipped.Gets the reason why the time has skipped.boolean
Gets the cancellation state of this ereignis.void
setCancelled
(boolean cancel) Sets the cancellation state of this ereignis.void
setSkipAmount
(long skipAmount) Sets the amount of time to skip.Methods inherited from class de.eimmer.ereignis.welt.WeltEreignis
getWorld
Methods inherited from class de.eimmer.ereignis.Ereignis
getEventName, isAsynchronous
-
Constructor Details
-
ZeitUeberspringEreignis
public ZeitUeberspringEreignis(@NotNull Welt welt, @NotNull ZeitUeberspringEreignis.SkipReason skipReason, long skipAmount)
-
-
Method Details
-
getSkipReason
Gets the reason why the time has skipped.- Returns:
- a SkipReason value detailing why the time has skipped
-
getSkipAmount
public long getSkipAmount()Gets the amount of time that was skipped.- Returns:
- Amount of time skipped
-
setSkipAmount
public void setSkipAmount(long skipAmount) Sets the amount of time to skip.- Parameters:
skipAmount
- Amount of time to skip
-
isCancelled
public boolean isCancelled()Description copied from interface:Abbrechbar
Gets the cancellation state of this ereignis. A cancelled ereignis will not be executed in the server, but will still pass to other plugins- Specified by:
isCancelled
in interfaceAbbrechbar
- Returns:
- true if this ereignis is cancelled
-
setCancelled
public void setCancelled(boolean cancel) Description copied from interface:Abbrechbar
Sets the cancellation state of this ereignis. A cancelled ereignis will not be executed in the server, but will still pass to other plugins.- Specified by:
setCancelled
in interfaceAbbrechbar
- Parameters:
cancel
- true if you wish to cancel this ereignis
-
getHandlers
- Specified by:
getHandlers
in classEreignis
-
getHandlerList
-