Class ServerTickEndEvent
java.lang.Object
org.bukkit.event.Event
com.destroystokyo.paper.event.server.ServerTickEndEvent
Called when the server has finished ticking the main loop
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull HandlerList
double
int
long
Amount of nanoseconds remaining before the next tick should start.Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
ServerTickEndEvent
public ServerTickEndEvent(int tickNumber, double tickDuration, long timeRemaining)
-
-
Method Details
-
getTickNumber
public int getTickNumber()- Returns:
- What tick this was since start (first tick = 1)
-
getTickDuration
public double getTickDuration()- Returns:
- Time in milliseconds of how long this tick took
-
getTimeRemaining
public long getTimeRemaining()Amount of nanoseconds remaining before the next tick should start. If this value is negative, then that means the server has exceeded the tick time limit and TPS has been lost. Method will continously return the updated time remaining value. (return value is not static)- Returns:
- Amount of nanoseconds remaining before the next tick should start
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-