NullValkyrie

Minecraft 1.19 multipurpose plugin for spigot servers with a lot of features where most modern servers have.
git clone https://codeberg.org/night0721/NullValkyrie
Log | Files | Refs | README | LICENSE

commit fc1d9d76393096c01edb15f4a711c9fdfd02b2cf
parent bc588dac46397b678f43065d42fe4fbba7997050
Author: night0721 <[email protected]>
Date:   Tue, 12 Jul 2022 22:24:02 +0100

slight fix on bows so can shoot on left click too

Diffstat:
Msrc/main/java/com/night/nullvalkyrie/Events/CustomItemEvents.java | 22+++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/src/main/java/com/night/nullvalkyrie/Events/CustomItemEvents.java b/src/main/java/com/night/nullvalkyrie/Events/CustomItemEvents.java @@ -105,7 +105,27 @@ public class CustomItemEvents implements Listener { arrow.setVelocity(arrow.getVelocity().multiply(5)); arrow.setDamage(50); e.setCancelled(true); - + } + } else if (e.getAction().equals(Action.LEFT_CLICK_AIR) || e.getAction().equals(Action.LEFT_CLICK_BLOCK)) { + if (name.equalsIgnoreCase(Rarity.MYTHIC.getColor() + "Terminator")) { + Arrow arrow = player.launchProjectile(Arrow.class, player.getEyeLocation().getDirection()); + arrow.setVelocity(arrow.getVelocity().multiply(5)); + arrow.setPickupStatus(Arrow.PickupStatus.DISALLOWED); + arrow.setDamage(50); + Arrow a1 = player.launchProjectile(Arrow.class, player.getEyeLocation().getDirection()); + a1.setVelocity(arrow.getVelocity().rotateAroundY(Math.toRadians(5)).multiply(5)); + a1.setPickupStatus(Arrow.PickupStatus.DISALLOWED); + a1.setDamage(50); + Arrow a2 = player.launchProjectile(Arrow.class, player.getEyeLocation().getDirection()); + a2.setVelocity(arrow.getVelocity().rotateAroundY(Math.toRadians(-5)).multiply(5)); + a2.setPickupStatus(Arrow.PickupStatus.DISALLOWED); + a2.setDamage(50); + e.setCancelled(true); + } else if(name.equalsIgnoreCase(Rarity.LEGENDARY.getColor() + "Explosive Bow")) { + Arrow arrow = player.launchProjectile(Arrow.class, player.getEyeLocation().getDirection()); + arrow.setVelocity(arrow.getVelocity().multiply(5)); + arrow.setDamage(50); + e.setCancelled(true); } } }