Class PlayerTimer

java.lang.Object
org.bukkit.scheduler.BukkitRunnable
net.mathias2246.buildmc.util.PlayerTimer
All Implemented Interfaces:
Runnable

public abstract class PlayerTimer extends org.bukkit.scheduler.BukkitRunnable
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
     
    final @NotNull org.bukkit.entity.Player
     
    final @NotNull org.bukkit.plugin.Plugin
     
    final int
     
    final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    PlayerTimer(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull org.bukkit.entity.Player player, int steps, int ticks)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract void
     
    protected abstract void
     
    abstract void
     
    protected abstract void
     
    void
    run()
     
    protected abstract boolean
     
    void
    start(int tickDelay)
     

    Methods inherited from class org.bukkit.scheduler.BukkitRunnable

    cancel, getTaskId, isCancelled, runTask, runTaskAsynchronously, runTaskLater, runTaskLaterAsynchronously, runTaskTimer, runTaskTimerAsynchronously

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • currentStep

      public int currentStep
    • steps

      public final int steps
    • ticks

      public final int ticks
    • player

      @NotNull public final @NotNull org.bukkit.entity.Player player
    • plugin

      @NotNull public final @NotNull org.bukkit.plugin.Plugin plugin
  • Constructor Details

    • PlayerTimer

      public PlayerTimer(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull org.bukkit.entity.Player player, int steps, int ticks)
  • Method Details

    • start

      public void start(int tickDelay)
    • onExit

      public abstract void onExit()
    • init

      protected abstract void init()
    • shouldCancel

      protected abstract boolean shouldCancel()
    • onCancel

      protected abstract void onCancel()
    • onStep

      protected abstract void onStep()
    • run

      public void run()