本文整理匯總了Java中org.bukkit.entity.ArmorStand.setArms方法的典型用法代碼示例。如果您正苦於以下問題:Java ArmorStand.setArms方法的具體用法?Java ArmorStand.setArms怎麽用?Java ArmorStand.setArms使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.bukkit.entity.ArmorStand
的用法示例。
在下文中一共展示了ArmorStand.setArms方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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: onArmorSpawn
import org.bukkit.entity.ArmorStand; //導入方法依賴的package包/類
@EventHandler
public void onArmorSpawn(CreatureSpawnEvent evt) {
if (evt.getEntityType() != EntityType.ARMOR_STAND || placing == null)
return;
ArmorStand as = (ArmorStand) evt.getEntity();
as.setArms(placing.isArms());
as.setSmall(placing.isSmall());
placing = null;
}