mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-02-04 02:31:21 +01:00
Improved pentashot settings
This commit is contained in:
parent
b99a894324
commit
3d5e249e3a
@ -25,11 +25,11 @@ public class Succession extends EcoEnchant {
|
||||
@NotNull final Arrow arrow,
|
||||
final int level,
|
||||
@NotNull final EntityShootBowEvent event) {
|
||||
int number = this.getConfig().getInt(EcoEnchants.CONFIG_LOCATION + "extra-arrows-per-level");
|
||||
int amount = this.getConfig().getInt(EcoEnchants.CONFIG_LOCATION + "extra-arrows-per-level") * level;
|
||||
|
||||
boolean fire = EnchantChecks.mainhand(shooter, Enchantment.ARROW_FIRE);
|
||||
|
||||
for (int i = 1; i <= level*number; i++) {
|
||||
for (int i = 1; i <= amount; i++) {
|
||||
this.getPlugin().getScheduler().runLater(() -> {
|
||||
Arrow arrow1 = shooter.launchProjectile(Arrow.class, event.getProjectile().getVelocity());
|
||||
arrow1.setPickupStatus(AbstractArrow.PickupStatus.DISALLOWED);
|
||||
|
@ -24,7 +24,9 @@ public class Pentashot extends EcoEnchant {
|
||||
@NotNull final Arrow arrow,
|
||||
final int level,
|
||||
@NotNull final EntityShootBowEvent event) {
|
||||
for (int i = -level; i <= level; i += 1) {
|
||||
int bonusPerSide = this.getConfig().getInt(EcoEnchants.CONFIG_LOCATION + "side-arrows-per-level") * level;
|
||||
|
||||
for (int i = -bonusPerSide; i <= bonusPerSide; i += 1) {
|
||||
if (i == 0) {
|
||||
continue;
|
||||
}
|
||||
|
@ -21,6 +21,8 @@ general-config:
|
||||
- succession
|
||||
- tripleshot
|
||||
- buckshot
|
||||
maximum-level: 1
|
||||
|
||||
config:
|
||||
side-arrows-per-level: 2 # If you want to have more levels
|
||||
angle: 11
|
Loading…
Reference in New Issue
Block a user