Class PrepareWeaponShootEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
me.deecaad.weaponmechanics.weapon.weaponevents.WeaponEvent
me.deecaad.weaponmechanics.weapon.weaponevents.PrepareWeaponShootEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
This event is called after
WeaponPreShootEvent but right before WeaponShootEvent.
This can be used to modify mechanics, projectile amount, etc.-
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
weaponTitleFields inherited from class org.bukkit.event.entity.EntityEvent
entity -
Constructor Summary
ConstructorsConstructorDescriptionPrepareWeaponShootEvent(@NotNull String weaponTitle, @NotNull org.bukkit.inventory.ItemStack weaponStack, @NotNull org.bukkit.entity.LivingEntity shooter, @NotNull org.bukkit.inventory.EquipmentSlot hand, @Nullable me.deecaad.core.mechanics.Mechanics shootMechanics, boolean resetFallDistance, @NotNull Projectile projectile, double projectileSpeed, int projectileAmount, @Nullable Spread spread, @Nullable Recoil recoil) -
Method Summary
Modifier and TypeMethodDescriptiondoublestatic org.bukkit.event.HandlerList@NotNull org.bukkit.event.HandlerListintdoubledoubledoubleme.deecaad.core.mechanics.MechanicsbooleanbooleanvoidsetBaseSpread(double baseSpread) voidsetCancelled(boolean cancel) voidsetProjectile(Projectile projectile) voidsetProjectileAmount(int projectileAmount) voidsetProjectileSpeed(double projectileSpeed) voidvoidsetRecoilPitch(double recoilPitch) voidsetRecoilYaw(double recoilYaw) voidsetResetFallDistance(boolean resetFallDistance) voidsetShootMechanics(me.deecaad.core.mechanics.Mechanics shootMechanics) voidMethods inherited from class me.deecaad.weaponmechanics.weapon.weaponevents.WeaponEvent
getHand, getHandData, getShooter, getShooterWrapper, getWeaponStack, getWeaponTitle, isMainHand, isOffHandMethods inherited from class org.bukkit.event.entity.EntityEvent
getEntity, getEntityTypeMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
PrepareWeaponShootEvent
public PrepareWeaponShootEvent(@NotNull @NotNull String weaponTitle, @NotNull @NotNull org.bukkit.inventory.ItemStack weaponStack, @NotNull @NotNull org.bukkit.entity.LivingEntity shooter, @NotNull @NotNull org.bukkit.inventory.EquipmentSlot hand, @Nullable @Nullable me.deecaad.core.mechanics.Mechanics shootMechanics, boolean resetFallDistance, @NotNull @NotNull Projectile projectile, double projectileSpeed, int projectileAmount, @Nullable @Nullable Spread spread, @Nullable @Nullable Recoil recoil)
-
-
Method Details
-
getShootMechanics
public me.deecaad.core.mechanics.Mechanics getShootMechanics() -
setShootMechanics
public void setShootMechanics(me.deecaad.core.mechanics.Mechanics shootMechanics) -
isResetFallDistance
public boolean isResetFallDistance() -
setResetFallDistance
public void setResetFallDistance(boolean resetFallDistance) -
getProjectile
-
setProjectile
-
getProjectileSpeed
public double getProjectileSpeed() -
setProjectileSpeed
public void setProjectileSpeed(double projectileSpeed) -
getProjectileAmount
public int getProjectileAmount() -
setProjectileAmount
public void setProjectileAmount(int projectileAmount) -
getSpread
-
setSpread
-
getBaseSpread
public double getBaseSpread() -
setBaseSpread
public void setBaseSpread(double baseSpread) -
getRecoil
-
setRecoil
-
getRecoilYaw
public double getRecoilYaw() -
setRecoilYaw
public void setRecoilYaw(double recoilYaw) -
getRecoilPitch
public double getRecoilPitch() -
setRecoilPitch
public void setRecoilPitch(double recoilPitch) -
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancel) - Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlersin classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-