Skip to content

Commit

Permalink
Infinity: Add special case for spectral arrows
Browse files Browse the repository at this point in the history
  • Loading branch information
Flo56958 committed Jan 31, 2025
1 parent dbd4dfd commit 9692b89
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
import org.bukkit.Material;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.AbstractArrow;
import org.bukkit.entity.Arrow;
import org.bukkit.entity.Player;
import org.bukkit.entity.Projectile;
import org.bukkit.entity.*;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
Expand Down Expand Up @@ -106,6 +103,7 @@ public void onShoot(final MTProjectileLaunchEvent event) {
Projectile projectile = event.getEvent().getEntity();
if (!(projectile instanceof Arrow arrow)) return;
if (arrow.hasCustomEffects() && !this.worksOnCustomArrows) return;
if (arrow instanceof SpectralArrow && !this.worksOnCustomArrows) return;
if (arrow.getPickupStatus() == AbstractArrow.PickupStatus.CREATIVE_ONLY) return;

final Player player = event.getPlayer();
Expand Down

0 comments on commit 9692b89

Please sign in to comment.