Class FullAutoTask
java.lang.Object
org.bukkit.scheduler.BukkitRunnable
me.deecaad.weaponmechanics.weapon.shoot.FullAutoTask
- All Implemented Interfaces:
Runnable
public class FullAutoTask
extends org.bukkit.scheduler.BukkitRunnable
This task handles firing projectiles every
N ticks. 1 of these tasks is created
every time you start firing a fully automatic weapon. The task is cancelled when the user is no
longer shooting.-
Constructor Summary
ConstructorsConstructorDescriptionFullAutoTask(WeaponHandler weaponHandler, EntityWrapper entityWrapper, String weaponTitle, org.bukkit.inventory.ItemStack weaponStack, boolean mainHand, TriggerType triggerType, boolean dualWield, int shotsPerSecond) -
Method Summary
Modifier and TypeMethodDescriptionintintintgetRate()voidrun()voidsetCurrentTick(int currentTick) voidsetPerShot(int perShot) voidsetRate(int rate) Methods inherited from class org.bukkit.scheduler.BukkitRunnable
cancel, getTaskId, isCancelled, runTask, runTaskAsynchronously, runTaskLater, runTaskLaterAsynchronously, runTaskTimer, runTaskTimerAsynchronously
-
Constructor Details
-
FullAutoTask
public FullAutoTask(WeaponHandler weaponHandler, EntityWrapper entityWrapper, String weaponTitle, org.bukkit.inventory.ItemStack weaponStack, boolean mainHand, TriggerType triggerType, boolean dualWield, int shotsPerSecond)
-
-
Method Details
-
getEntityWrapper
-
getHandData
-
getRate
public int getRate() -
setRate
public void setRate(int rate) -
getPerShot
public int getPerShot() -
setPerShot
public void setPerShot(int perShot) -
getCurrentTick
public int getCurrentTick() -
setCurrentTick
public void setCurrentTick(int currentTick) -
run
public void run()
-