Improved pentashot settings

This commit is contained in:
Auxilor 2021-03-04 18:11:02 +00:00
parent b99a894324
commit 3d5e249e3a
3 changed files with 7 additions and 3 deletions

View File

@ -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);

View File

@ -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;
}

View File

@ -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