diff --git a/bin/siegeCore/CrunchSiegeCore.class b/bin/siegeCore/CrunchSiegeCore.class index f79a23e..38e800f 100644 Binary files a/bin/siegeCore/CrunchSiegeCore.class and b/bin/siegeCore/CrunchSiegeCore.class differ diff --git a/bin/siegeCore/RotationHandler.class b/bin/siegeCore/RotationHandler.class index 3048be3..7503139 100644 Binary files a/bin/siegeCore/RotationHandler.class and b/bin/siegeCore/RotationHandler.class differ diff --git a/src/siegeCore/CrunchSiegeCore.java b/src/siegeCore/CrunchSiegeCore.java index 60b7b11..1ebb279 100644 --- a/src/siegeCore/CrunchSiegeCore.java +++ b/src/siegeCore/CrunchSiegeCore.java @@ -310,9 +310,6 @@ public class CrunchSiegeCore extends JavaPlugin { l.setDirection(player.getFacing().getDirection()); - - // - ItemStack item = new ItemStack(Material.CARVED_PUMPKIN); ItemMeta meta = item.getItemMeta(); String id = ""; @@ -344,7 +341,6 @@ public class CrunchSiegeCore extends JavaPlugin { Entity entity2 = player.getWorld().spawnEntity(l, EntityType.ARMOR_STAND); if (id != "") { entity2.getPersistentDataContainer().set(key, PersistentDataType.STRING, id); - } meta.setCustomModelData(equip.ReadyModelNumber); meta.setDisplayName("§e" + equip.EquipmentName +" spawn item"); diff --git a/src/siegeCore/RotationHandler.java b/src/siegeCore/RotationHandler.java index 2ae56fa..42b2748 100644 --- a/src/siegeCore/RotationHandler.java +++ b/src/siegeCore/RotationHandler.java @@ -23,11 +23,11 @@ import org.bukkit.util.EulerAngle; import org.bukkit.util.Vector; public class RotationHandler implements Listener { - NamespacedKey key = new NamespacedKey(CrunchSiegeCore.plugin, "cannons"); + @EventHandler public void playerMove(PlayerMoveEvent event) { Player player = event.getPlayer(); - + NamespacedKey key = new NamespacedKey(CrunchSiegeCore.plugin, "cannons"); if (CrunchSiegeCore.TrackedStands.containsKey(player.getUniqueId())) { ItemStack itemInHand = player.getInventory().getItemInMainHand(); if (itemInHand != null) { @@ -39,7 +39,9 @@ public class RotationHandler implements Listener { for (Entity ent : CrunchSiegeCore.TrackedStands.get(player.getUniqueId())) { if (ent != null) { SiegeEquipment equipment = CrunchSiegeCore.equipment.get(ent.getUniqueId()); - + if (ent.isDead()) { + continue; + } double distance = player.getLocation().distance(ent.getLocation()); if (distance <= 250) { // player.sendMessage("got id");