diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemPaintballGun.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemPaintballGun.java index a524910f9..3a861f344 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemPaintballGun.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/item/ItemPaintballGun.java @@ -11,8 +11,6 @@ import org.bukkit.entity.Player; import org.bukkit.entity.Projectile; import org.bukkit.event.EventHandler; import org.bukkit.event.entity.ProjectileHitEvent; -import org.bukkit.event.player.PlayerTeleportEvent; -import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; import org.bukkit.util.Vector; import mineplex.core.common.util.C; @@ -31,7 +29,7 @@ import mineplex.core.updater.event.UpdateEvent; public class ItemPaintballGun extends ItemGadget { - private Set _balls = new HashSet<>(); + private final Set _balls = new HashSet<>(); public ItemPaintballGun(GadgetManager manager) { @@ -48,6 +46,7 @@ public class ItemPaintballGun extends ItemGadget public void ActivateCustom(Player player) { Projectile proj = player.launchProjectile(EnderPearl.class); + proj.setShooter(null); proj.setVelocity(proj.getVelocity().multiply(2)); _balls.add(proj); @@ -88,17 +87,6 @@ public class ItemPaintballGun extends ItemGadget UtilParticle.PlayParticle(ParticleType.RED_DUST, loc, 0.2F, 0.2F, 0.2F, 1, 70, ViewDist.LONG, UtilServer.getPlayers()); } - @EventHandler - public void enderPearlTeleport(PlayerTeleportEvent event) - { - if (event.getCause() != TeleportCause.ENDER_PEARL && !isActive(event.getPlayer())) - { - return; - } - - event.setCancelled(true); - } - @EventHandler public void cleanupBalls(UpdateEvent event) {