@Override public void setHasGravity(boolean gravity) { as.setGravity(gravity); }
public void createTimedHologram(final Location location, String text, Long timeout) { ArmorStand as = (ArmorStand) location.add(0.5, 1, 0.5).getWorld().spawnEntity(location, EntityType.ARMOR_STAND); //Spawn the ArmorStand as.setVisible(false); //Makes the ArmorStand invisible as.setGravity(false); //Make sure it doesn't fall as.setCanPickupItems(false); //I'm not sure what happens if you leave this as it is, but you might as well disable it as.setCustomName(SavageFactions.plugin.color(text)); //Set this to the text you want as.setCustomNameVisible(true); //This makes the text appear no matter if your looking at the entity or not final ArmorStand armorStand = as; Bukkit.getScheduler().scheduleSyncDelayedTask(SavageFactions.plugin, () -> { armorStand.remove(); getLogger().info("Removing Hologram."); } , timeout * 20); }
as.setArms(false); as.setBasePlate(false); as.setGravity(false); as.setVisible(false); as.setCustomName(generatedName);
as.setArms(false); as.setBasePlate(false); as.setGravity(false); as.setVisible(false); as.setCustomName(generatedName);
as.setArms(false); as.setBasePlate(false); as.setGravity(false); as.setVisible(false); as.setCustomName(line);
as.setArms(false); as.setBasePlate(false); as.setGravity(false); as.setVisible(false); as.setCustomName(line);
armorStand.setGravity(false);
@Override public SpellResult start(CastContext context) { MageController controller = context.getController(); Location location = adjustLocation(sourceLocation.getLocation(context)); ArmorStand armorStand = (ArmorStand)setEntity(controller, CompatibilityUtils.createArmorStand(location)); armorStand.setMarker(armorStandMarker); armorStand.setVisible(!armorStandInvisible); armorStand.setBasePlate(showArmorStandBaseplate); armorStand.setGravity(armorStandGravity); armorStand.setSmall(smallArmorStand); armorStand.setArms(showArmorStandArms); CompatibilityUtils.setSilent(armorStand, true); CompatibilityUtils.setDisabledSlots(armorStand, 2039552); update(armorStand); CompatibilityUtils.addToWorld(location.getWorld(), armorStand, spawnReason); return super.start(context); }
@Override public void apply(Entity entity) { if (!(entity instanceof ArmorStand)) return; ArmorStand armorStand = (ArmorStand)entity; armorStand.setItemInHand(itemInHand); armorStand.setBoots(boots); armorStand.setLeggings(leggings); armorStand.setChestplate(chestplate); armorStand.setHelmet(helmet); if (bodyPose != null) armorStand.setBodyPose(bodyPose); if (leftArmPose != null) armorStand.setLeftArmPose(leftArmPose); if (rightArmPose != null) armorStand.setRightArmPose(rightArmPose); if (leftLegPose != null) armorStand.setLeftLegPose(leftLegPose); if (rightLegPose != null) armorStand.setRightLegPose(rightLegPose); if (headPose != null) armorStand.setHeadPose(headPose); armorStand.setGravity(hasGravity); armorStand.setVisible(isVisible); armorStand.setArms(hasArms); armorStand.setSmall(isSmall); armorStand.setBasePlate(hasBasePlate); armorStand.setMarker(isMarker); CompatibilityUtils.setDisabledSlots(armorStand, disabledSlots); }
asL.setSmall(true); asL.setCustomNameVisible(false); asL.setGravity(false); asL.setVisible(false); asL.setLeftArmPose(new EulerAngle(90 * Math.PI / 180, 60 * Math.PI / 180, 0)); asR.setSmall(true); asR.setCustomNameVisible(false); asR.setGravity(false); asR.setVisible(false); asR.setRightArmPose(new EulerAngle(90 * Math.PI / 180, 300 * Math.PI / 180, 0)); asB.setSmall(true); asB.setCustomNameVisible(false); asB.setGravity(false); asB.setVisible(false); asB.setLeftArmPose(new EulerAngle(90 * Math.PI / 180, 270 * Math.PI / 180, 0));
final ArmorStand as = (ArmorStand) e.getBlockPlaced().getLocation().add(0.5, 1, 0.5).getWorld().spawnEntity(e.getBlockPlaced().getLocation().add(0.5, 1, 0.5), EntityType.ARMOR_STAND); //Spawn the ArmorStand as.setVisible(false); //Makes the ArmorStand invisible as.setGravity(false); //Make sure it doesn't fall as.setCanPickupItems(false); //I'm not sure what happens if you leave this as it is, but you might as well disable it as.setCustomName(SavageFactions.plugin.color(SavageFactions.plugin.getConfig().getString("fbanners.BannerHolo").replace("{Faction}", fme.getTag()))); //Set this to the text you want
this.trap.setGravity(false); } else { this.trap.setGravity(true);