mirror of
https://github.com/darksaid98/SiegeEngines.git
synced 2026-12-01 14:38:55 +00:00
.
This commit is contained in:
1 parent
ffc0e58172
commit
54a754b4e7
4 files changed
+5
-7
No files matched your search
Binary file not shown.
Binary file not shown.
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in new issue
Block a user