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
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
onPlayerTick
(Player p, PlayerProfile profile) Method to handle behavior for player's armor as a whole.protected void
onTick()
Method to handle things related to the task itself.final void
run()
final void
Schedules thisAbstractArmorTask
to run everytickInterval
ticks
-
Constructor Details
-
AbstractArmorTask
public AbstractArmorTask()
-
-
Method Details
-
run
public final void run() -
schedule
Schedules thisAbstractArmorTask
to run everytickInterval
ticks- Parameters:
plugin
- TheSlimefun
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
- ThePlayer
wearing the armorprofile
- ThePlayer
'sPlayerProfile
-