🏹MultiShot
Fires multiple arrows that are specified and defined.
Overview
The MultiShot
class provides a method for a player to perform multiple arrow shots simultaneously within a Minecraft Bukkit server environment. This class enhances gameplay dynamics by allowing players to unleash a barrage of arrows with customizable attributes.
Method
create
public static void create(Player player, int arrowAmount, double damage, boolean isCritical)
Initiates a multi-shot action for the specified player, launching multiple arrows in the direction the player is facing.
Parameters
player
: The player initiating the multi-shot action. This must be a valid BukkitPlayer
object.arrowAmount
: The number of arrows to be fired simultaneously. This parameter determines the intensity of the multi-shot attack.damage
: The amount of damage inflicted by each arrow. This value influences the effectiveness of the multi-shot attack.isCritical
: A boolean flag indicating whether the arrows should be critical hits. When set totrue
, arrows have an increased chance of causing critical damage.
Usage Example
// Define the player initiating the multi-shot action
Player player = ...
// Define the number of arrows to be fired simultaneously
int arrowAmount = 5;
// Define the amount of damage inflicted by each arrow
double damage = 8.0;
// Define whether the arrows should be critical hits
boolean isCritical = true;
// Perform the multi-shot action
MultiShot.create(player, arrowAmount, damage, isCritical);
Notes
This method consumes arrows from the player's inventory to perform the multi-shot action.
Each arrow fired inherits the specified damage and critical status parameters.
Players must have a sufficient supply of arrows in their inventory to execute the multi-shot action successfully.
Last updated