From 7b62e078925a3a9bd78c5c6efd042a192995d82f Mon Sep 17 00:00:00 2001 From: Soper Date: Tue, 25 May 2021 23:31:12 -0400 Subject: [PATCH] MortarHandler can now link a tuner and mortar --- src/xyz/soper/arty/util/MortarHandler.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/xyz/soper/arty/util/MortarHandler.java b/src/xyz/soper/arty/util/MortarHandler.java index 2cf94f9..144dd33 100644 --- a/src/xyz/soper/arty/util/MortarHandler.java +++ b/src/xyz/soper/arty/util/MortarHandler.java @@ -2,11 +2,14 @@ package xyz.soper.arty.util; import org.bukkit.Location; import org.bukkit.Particle; +import org.bukkit.block.Block; import org.bukkit.entity.Arrow; import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; import org.bukkit.projectiles.ProjectileSource; import org.bukkit.util.Vector; import xyz.soper.arty.item.Mortar; +import xyz.soper.arty.item.MortarTuner; import xyz.soper.arty.item.Shell; public class MortarHandler { @@ -47,6 +50,12 @@ public class MortarHandler { ((Player) shooter).sendMessage("DEBUG: Shell fired with a velocity " + shell.baseVelocity); } + public static void linkTuner(Block mortar, ItemStack tuner){ + if(Mortar.isMortar(mortar) && MortarTuner.isTuner(tuner)){ + MortarTuner.updateTunerLocation(tuner, mortar.getLocation()); + } + } + // /** // * Fires a shell projectile from the specified mortar by the specified shooter. // * @param mortar