當前位置: 首頁>>代碼示例>>Java>>正文


Java ArmorStand.setBasePlate方法代碼示例

本文整理匯總了Java中org.bukkit.entity.ArmorStand.setBasePlate方法的典型用法代碼示例。如果您正苦於以下問題:Java ArmorStand.setBasePlate方法的具體用法?Java ArmorStand.setBasePlate怎麽用?Java ArmorStand.setBasePlate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.bukkit.entity.ArmorStand的用法示例。


在下文中一共展示了ArmorStand.setBasePlate方法的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;
}
 
開發者ID:edasaki,項目名稱:ZentrelaCore,代碼行數:22,代碼來源:RTags.java

示例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;
}
 
開發者ID:edasaki,項目名稱:ZentrelaCore,代碼行數:16,代碼來源:RTags.java

示例3: onCommand

import org.bukkit.entity.ArmorStand; //導入方法依賴的package包/類
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
 if (cmd.getName().equalsIgnoreCase("klotentoren")) {
  sender.sendMessage("ja hoor");
  Player p = (Player) sender;
  ArmorStand armorStand = (ArmorStand) p.getLocation().getWorld().spawn(p.getLocation(), ArmorStand.class);
  ItemStack is = new ItemStack(Material.LAPIS_ORE, 64);
  armorStand.setHelmet(is);
  armorStand.setPassenger((Entity) sender);
  armorStand.setBasePlate(false);
  ArmorStand armorStand2 = (ArmorStand) p.getLocation().getWorld().spawn(p.getLocation(), ArmorStand.class);
  armorStand2.setHelmet(is);
  armorStand2.setBasePlate(false);
  ArmorStand armorStand3 = (ArmorStand) p.getLocation().getWorld().spawn(p.getLocation(), ArmorStand.class);
  armorStand3.setHelmet(is);
  armorStand3.setBasePlate(false);
  ArmorStand armorStand4 = (ArmorStand) p.getLocation().getWorld().spawn(p.getLocation(), ArmorStand.class);
  armorStand4.setHelmet(is);
  armorStand4.setBasePlate(false);
  degree = 0;
  flyingheight = 28;
  direction = false;
  rotating = false;
  uploopcounter = 0;

  Bukkit.getScheduler().scheduleSyncRepeatingTask(main.getPL(), new Runnable() {
   @Override
   public void run() {
    if (rotating == true) {
     degree++;
     degree++;
    }
    if (degree == 360 || degree > 360) {
     degree = 0;
    }
    moveEntity(armorStand, degree + 1 * 90);
    moveEntity(armorStand2, degree + 2 * 90);
    moveEntity(armorStand3, degree + 3 * 90);
    moveEntity(armorStand4, degree + 4 * 90);
   }
  }, 0, 1);

  Bukkit.getScheduler().scheduleSyncRepeatingTask(main.getPL(), new Runnable() {
   @Override
   public void run() {
    if (flyingheight == 60) {
     direction = true;
    } else if (flyingheight == 28 || flyingheight < 35) {
     direction = false;
    }
    if (direction == true) {
     rotating = true;
     flyingheight--;
     //flyingheight--;
    } else {
     smallBittUp();
    }
   }
  }, 90, 1);
 } else {}
 return false;
}
 
開發者ID:Mindgamesnl,項目名稱:UselessCode,代碼行數:62,代碼來源:DumbDropTowerTest.java


注:本文中的org.bukkit.entity.ArmorStand.setBasePlate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。