java.lang.Object
io.github.thebusybiscuit.slimefun4.implementation.tasks.armor.AbstractArmorTask
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
RadiationTask, RainbowArmorTask, SlimefunArmorTask, SolarHelmetTask

public abstract class AbstractArmorTask extends Object implements Runnable
This is a base class for any ArmorTask, it checks every online player and handles any armor functionality.
Author:
TheBusyBiscuit, martinbrom
See Also:
  • Constructor Details

    • AbstractArmorTask

      public AbstractArmorTask()
  • Method Details

    • run

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

      public final void schedule(@Nonnull Slimefun plugin, long tickInterval)
      Schedules this AbstractArmorTask to run every tickInterval ticks
      Parameters:
      plugin - The Slimefun
      tickInterval - Delay between two "runs" of this task in ticks
    • onTick

      protected void onTick()
      Method to handle things related to the task itself. Called once per tick (per schedule interval).
    • onPlayerTick

      @ParametersAreNonnullByDefault protected abstract void onPlayerTick(Player p, PlayerProfile profile)
      Method to handle behavior for player's armor as a whole. It is called once per player.
      Parameters:
      p - The Player wearing the armor
      profile - The Player's PlayerProfile