本文整理匯總了Java中org.bukkit.entity.ArmorStand.setMarker方法的典型用法代碼示例。如果您正苦於以下問題:Java ArmorStand.setMarker方法的具體用法?Java ArmorStand.setMarker怎麽用?Java ArmorStand.setMarker使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.bukkit.entity.ArmorStand
的用法示例。
在下文中一共展示了ArmorStand.setMarker方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: makeFloatingText
import org.bukkit.entity.ArmorStand; //導入方法依賴的package包/類
public static ArmorStand makeFloatingText(String name, Location loc, double xzOffset, double yMin, double yMax, double durationSec) {
loc.add(-xzOffset / 2 + (Math.random() * (xzOffset)), (Math.random() * (yMax - yMin)) + yMin, -xzOffset / 2 + (Math.random() * (xzOffset)));
final ArmorStand as = (ArmorStand) REntities.createLivingEntity(CustomArmorStand.class, loc);
as.setVisible(false);
as.setSmall(true);
as.setMarker(true);
as.setGravity(false);
as.setArms(false);
as.setBasePlate(false);
as.setCanPickupItems(false);
as.setCustomName(name);
as.setCustomNameVisible(true);
as.setRemoveWhenFarAway(false);
RScheduler.schedule(SakiCore.plugin, new Runnable() {
public void run() {
if (as != null && as.isValid())
as.remove();
}
}, RTicks.seconds(durationSec));
return as;
}
示例2: makeStand
import org.bukkit.entity.ArmorStand; //導入方法依賴的package包/類
public static ArmorStand makeStand(String name, Location loc, boolean marker) {
ArmorStand as = (ArmorStand) REntities.createLivingEntity(CustomArmorStand.class, loc);
as.setVisible(false);
as.setSmall(true);
if (marker)
as.setMarker(true);
as.setGravity(false);
as.setArms(false);
as.setBasePlate(false);
as.setCanPickupItems(false);
as.setCustomName(name);
as.setCustomNameVisible(true);
as.setRemoveWhenFarAway(false);
return as;
}
示例3: placeBlock
import org.bukkit.entity.ArmorStand; //導入方法依賴的package包/類
public ArmorStand placeBlock(Location l) {
ArmorStand block = (ArmorStand) l.getWorld().spawnEntity(l, EntityType.ARMOR_STAND);
block.setSmall(true);
block.setGravity(false);
block.setCustomName("CustomBlock");
block.setCustomNameVisible(false);
block.setInvulnerable(true);
block.setVisible(false);
block.setMarker(true);
block.setSilent(true);
ItemStack a = new ItemStack(Material.LEATHER_BOOTS);
a.setDurability((short) primary.getTexture());
LeatherArmorMeta am = (LeatherArmorMeta) a.getItemMeta();
am.setColor(primary.getColor());
am.setUnbreakable(true);
if (primary.isGlowing()) {
am.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 3, true);
}
a.setItemMeta(am);
block.setHelmet(a);
if (secondary != null) {
ItemStack b = new ItemStack(Material.LEATHER_BOOTS);
b.setDurability((short) secondary.getTexture());
LeatherArmorMeta bm = (LeatherArmorMeta) b.getItemMeta();
bm.setColor(secondary.getColor());
bm.setUnbreakable(true);
if (secondary.isGlowing()) {
System.out.println("H");
bm.addEnchant(Enchantment.PROTECTION_ENVIRONMENTAL, 3, true);
}
b.setItemMeta(bm);
block.getEquipment().setItemInMainHand(b);
}
return block;
}
示例4: Hologram
import org.bukkit.entity.ArmorStand; //導入方法依賴的package包/類
public Hologram(String t, Location l) {
hologram = (ArmorStand) l.getWorld().spawnEntity(l, EntityType.ARMOR_STAND);
hologram.setGravity(false);
hologram.setVisible(false);
hologram.setCustomName(t);
hologram.setCustomNameVisible(true);
hologram.setMarker(true);
hologram.setAI(false);
hologram.addScoreboardTag("hologram");
holograms.add(this);
}