36 36 | * @see EntityShootCrossbowEvent To modify the projectiles themselves |
37 37 | * |
38 38 | * @return The integer amount of projectiles to be fired from the crossbow |
39 39 | */ |
40 40 | public int getNumberOfCopies() { |
41 41 | return numberOfCopies; |
42 42 | } |
43 43 | |
44 44 | /** |
45 45 | * Set the number of projectiles to be shot from the crossbow |
46 - | * @param numberOfCopies Set the number of projectiles to be fired. Can be 1-3 |
46 + | * @param numberOfCopies Set the number of projectiles to be fired. Can be 1-3 and will |
47 + | * override values exceeding this range |
47 48 | */ |
48 49 | public void setNumberOfCopies(int numberOfCopies) { |
49 - | this.numberOfCopies = Math.max(numberOfCopies, 1); |
50 + | this.numberOfCopies = Math.min(Math.max(numberOfCopies, 1), 3); |
50 51 | } |
51 52 | |
52 53 | |
53 54 | public boolean isCancelled() { |
54 55 | return cancelled; |
55 56 | } |
56 57 | |
57 58 | |
58 59 | public void setCancelled(boolean cancel) { |
59 60 | cancelled = cancel; |