java.lang.Object
io.github.thebusybiscuit.slimefun4.implementation.tasks.player.InfusedMagnetTask
All Implemented Interfaces:
Runnable

public class InfusedMagnetTask extends Object
This AbstractPlayerTask is run when a Player carries an InfusedMagnet. It manages the automatic pickup of nearby items.
Author:
TheBusyBiscuit
See Also:
  • Field Details

    • p

      protected final Player p
  • Constructor Details

    • InfusedMagnetTask

      public InfusedMagnetTask(@Nonnull Player p, double radius)
      This creates a new InfusedMagnetTask for the given Player with the given pickup radius.
      Parameters:
      p - The Player who items should be teleported to
      radius - The radius in which items should be picked up
  • Method Details

    • executeTask

      protected void executeTask()
    • isValid

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

      public void schedule(long delay)
    • scheduleRepeating

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

      public final void run()
      Specified by:
      run in interface Runnable
    • cancel

      public final void cancel()
      This method cancels this AbstractPlayerTask.