From 39716824c6a8012f6c2911abe965178e43359e02 Mon Sep 17 00:00:00 2001 From: chyzman Date: Fri, 5 Mar 2021 14:33:44 -0500 Subject: [PATCH] updated to 6.9.1 made marksman work with any projectile (hint to future enchants?) --- .../enchantments/ecoenchants/normal/Marksman.java | 9 ++------- gradle.properties | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Marksman.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Marksman.java index 5172a7a0..131827a0 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Marksman.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/ecoenchants/normal/Marksman.java @@ -7,6 +7,7 @@ import com.willfp.ecoenchants.enchantments.util.EnchantChecks; import org.bukkit.entity.Arrow; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; +import org.bukkit.entity.Projectile; import org.bukkit.event.EventHandler; import org.bukkit.event.entity.ProjectileLaunchEvent; import org.jetbrains.annotations.NotNull; @@ -19,9 +20,6 @@ public class Marksman extends EcoEnchant { } @EventHandler public void onMarksmanShoot(@NotNull final ProjectileLaunchEvent event) { - if (event.getEntityType() != EntityType.ARROW) { - return; - } if (!(event.getEntity().getShooter() instanceof Player)) { return; @@ -37,10 +35,7 @@ public class Marksman extends EcoEnchant { return; } - if (!(event.getEntity() instanceof Arrow)) { - return; - } - Arrow a = (Arrow) event.getEntity(); + Projectile a = event.getEntity(); a.setGravity(false); int ticks = this.getConfig().getInt(EcoEnchants.CONFIG_LOCATION + "remove-arrow-after-ticks"); diff --git a/gradle.properties b/gradle.properties index 9ba29b89..a228302d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,2 @@ -version = 6.9.0 +version = 6.9.1 plugin-name = EcoEnchants \ No newline at end of file