Class WeaponFirearmEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
me.deecaad.weaponmechanics.weapon.weaponevents.WeaponEvent
me.deecaad.weaponmechanics.weapon.weaponevents.WeaponFirearmEvent

public class WeaponFirearmEvent extends WeaponEvent
When a weapon's FirearmState changes.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Field Summary

    Fields inherited from class me.deecaad.weaponmechanics.weapon.weaponevents.WeaponEvent

    weaponTitle

    Fields inherited from class org.bukkit.event.entity.EntityEvent

    entity
  • Constructor Summary

    Constructors
    Constructor
    Description
    WeaponFirearmEvent(String weaponTitle, org.bukkit.inventory.ItemStack weaponStack, org.bukkit.entity.LivingEntity shooter, org.bukkit.inventory.EquipmentSlot hand, FirearmAction action, FirearmState state)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    The config options of the firearm.
    static org.bukkit.event.HandlerList
     
    org.bukkit.event.HandlerList
     
    me.deecaad.core.mechanics.MechanicManager
    The mechanics that will be used (usually for sounds).
    Returns whether the state is OPEN, CLOSE, or READY.
    int
    Returns how long it takes for the firearm action to be completed.
    Returns the firearm type.
    void
    setMechanics(me.deecaad.core.mechanics.MechanicManager mechanics)
    The mechanics that will be used (usually for sounds).
    void
    setTime(int time)
    Sets how long it takes for the firearm action to be completed.
    void
    useMechanics(me.deecaad.core.mechanics.CastData castData, boolean isOpen)
     

    Methods inherited from class me.deecaad.weaponmechanics.weapon.weaponevents.WeaponEvent

    getHand, getHandData, getShooter, getShooterWrapper, getWeaponStack, getWeaponTitle, isMainHand, isOffHand

    Methods inherited from class org.bukkit.event.entity.EntityEvent

    getEntity, getEntityType

    Methods inherited from class org.bukkit.event.Event

    callEvent, getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WeaponFirearmEvent

      public WeaponFirearmEvent(String weaponTitle, org.bukkit.inventory.ItemStack weaponStack, org.bukkit.entity.LivingEntity shooter, org.bukkit.inventory.EquipmentSlot hand, FirearmAction action, FirearmState state)
  • Method Details

    • getAction

      public FirearmAction getAction()
      The config options of the firearm. You probably do not want to modify this value.
      Returns:
      The firearm config options.
    • getType

      public FirearmType getType()
      Returns the firearm type.
      Returns:
      The firearm type.
    • getState

      public FirearmState getState()
      Returns whether the state is OPEN, CLOSE, or READY.
      Returns:
      The firearm state.
    • getMechanics

      public me.deecaad.core.mechanics.MechanicManager getMechanics()
      The mechanics that will be used (usually for sounds).
      Returns:
      The mechanics that will be played after the event.
    • setMechanics

      public void setMechanics(me.deecaad.core.mechanics.MechanicManager mechanics)
      The mechanics that will be used (usually for sounds).
      Parameters:
      mechanics - The mechanics that will be played after the event.
    • getTime

      public int getTime()
      Returns how long it takes for the firearm action to be completed.
      Returns:
      The firearm action time.
    • setTime

      public void setTime(int time)
      Sets how long it takes for the firearm action to be completed.
      Parameters:
      time - The firearm action time.
    • useMechanics

      public void useMechanics(me.deecaad.core.mechanics.CastData castData, boolean isOpen)
    • getHandlers

      @NotNull public org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()