Class AbstractArmorTask
java.lang.Object
io.github.thebusybiscuit.slimefun4.implementation.tasks.armor.AbstractArmorTask
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
RadiationTask,RainbowArmorTask,SlimefunArmorTask,SolarHelmetTask
This is a base class for any ArmorTask, it checks every online player
and handles any armor functionality.
- Author:
- TheBusyBiscuit, martinbrom
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidonPlayerTick(Player p, PlayerProfile profile) Method to handle behavior for player's armor as a whole.protected voidonTick()Method to handle things related to the task itself.final voidrun()final voidSchedules thisAbstractArmorTaskto run everytickIntervalticks
-
Constructor Details
-
AbstractArmorTask
public AbstractArmorTask()
-
-
Method Details
-
run
public final void run() -
schedule
Schedules thisAbstractArmorTaskto run everytickIntervalticks- Parameters:
plugin- TheSlimefuntickInterval- 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- ThePlayerwearing the armorprofile- ThePlayer'sPlayerProfile
-