Class MagnetTask

  • All Implemented Interfaces:
    Runnable


    public class MagnetTask
    extends Object
    • Field Detail

      • id

        protected int id
    • Constructor Detail

      • MagnetTask

        public MagnetTask​(Player p)
    • Method Detail

      • executeTask

        public void executeTask​()
      • isValid

        protected boolean isValid​()
        This method checks if this PlayerTask should be continued or cancelled. It will also cancel this PlayerTask if it became invalid.
        Returns:
        Whether this PlayerTask is still valid
      • setID

        public void setID​(int id)
      • schedule

        public void schedule​(long delay)
      • scheduleRepeating

        public void scheduleRepeating​(long delay,
                                      long interval)
      • run

        public void run​()
        Specified by:
        run in interface Runnable