Class ServerTickEndEvent

java.lang.Object
org.bukkit.event.Event
com.destroystokyo.paper.event.server.ServerTickEndEvent

public class ServerTickEndEvent extends Event
Called when the server has finished ticking the main loop
  • Constructor Details

    • ServerTickEndEvent

      @Internal 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 continuously return the updated time remaining value. (return value is not static)

      Returns:
      Amount of nanoseconds remaining before the next tick should start
    • getHandlers

      @NotNull public @NotNull HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      @NotNull public static @NotNull HandlerList getHandlerList()