MortarHandler can now link a tuner and mortar

master
Soper Aylamo 2021-05-25 23:31:12 -04:00
parent 89ef2eac0d
commit 7b62e07892
Signed by: Soper
GPG Key ID: A27AC885ACC3BEAE
1 changed files with 9 additions and 0 deletions

View File

@ -2,11 +2,14 @@ package xyz.soper.arty.util;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Particle; import org.bukkit.Particle;
import org.bukkit.block.Block;
import org.bukkit.entity.Arrow; import org.bukkit.entity.Arrow;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.projectiles.ProjectileSource; import org.bukkit.projectiles.ProjectileSource;
import org.bukkit.util.Vector; import org.bukkit.util.Vector;
import xyz.soper.arty.item.Mortar; import xyz.soper.arty.item.Mortar;
import xyz.soper.arty.item.MortarTuner;
import xyz.soper.arty.item.Shell; import xyz.soper.arty.item.Shell;
public class MortarHandler { public class MortarHandler {
@ -47,6 +50,12 @@ public class MortarHandler {
((Player) shooter).sendMessage("DEBUG: Shell fired with a velocity " + shell.baseVelocity); ((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. // * Fires a shell projectile from the specified mortar by the specified shooter.
// * @param mortar // * @param mortar