本文整理匯總了Java中org.bukkit.entity.ArmorStand.remove方法的典型用法代碼示例。如果您正苦於以下問題:Java ArmorStand.remove方法的具體用法?Java ArmorStand.remove怎麽用?Java ArmorStand.remove使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.bukkit.entity.ArmorStand
的用法示例。
在下文中一共展示了ArmorStand.remove方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: placeBlock
import org.bukkit.entity.ArmorStand; //導入方法依賴的package包/類
@Override
public boolean placeBlock(ArmorStand e, Player p) {
//e.setHelmet(new ItemStack(Material.STONE, 1));
if (e.getWorld().getBlockAt(e.getLocation()).getType() != Material.STANDING_BANNER) {
p.sendMessage(ChatColor.RED + "Please place down a banner first!");
e.remove();
}
else {
e.setCustomName("flag");
p.sendMessage(ChatColor.GREEN + "Flag placed");
}
return true;
}
示例2: onBlockBreak
import org.bukkit.entity.ArmorStand; //導入方法依賴的package包/類
@EventHandler(priority = EventPriority.HIGHEST)
public void onBlockBreak(BlockBreakEvent event)
{
if(event.isCancelled()) return;
if(Survival.allowedBlocks.contains(event.getBlock().getType()))
{
ArmorStand drop = dropSeat(event.getBlock(), (Stairs)event.getBlock().getState().getData());
for(Entity e : drop.getNearbyEntities(0.5, 0.5, 0.5))
{
if(e != null && e instanceof ArmorStand && e.getCustomName() == "Chair")
e.remove();
}
drop.remove();
}
}
示例3: removeEntity
import org.bukkit.entity.ArmorStand; //導入方法依賴的package包/類
private boolean removeEntity(ArmorStand entity) {
lines.remove(entity.getCustomName());
entity.remove();
boolean removed = entities.remove(entity);
if (removed && spawned)
update();
return removed;
}
示例4: onDismount
import org.bukkit.entity.ArmorStand; //導入方法依賴的package包/類
@EventHandler(priority = EventPriority.HIGHEST)
public void onDismount(EntityDismountEvent e){
if (e.getEntity() instanceof Player){
if (e.getDismounted() instanceof ArmorStand) {
ArmorStand w = (ArmorStand)e.getDismounted();
e.getEntity().eject();
w.remove();
e.getEntity().teleport(e.getEntity().getLocation().add(0, 4, 0));
if (new Random().nextInt(10) + 1 >= 9) e.getEntity().sendMessage(magic());
}
}
}
示例5: registerHolograms
import org.bukkit.entity.ArmorStand; //導入方法依賴的package包/類
public static void registerHolograms() {
holograms.clear();
for (World w : Bukkit.getWorlds()) {
for (ArmorStand e : w.getEntitiesByClass(ArmorStand.class)) {
if (e.getScoreboardTags().contains("hologram") && !e.getScoreboardTags().contains("dindicator")) {
holograms.add(new Hologram(e));
System.out.println("Hologram Init: " + e.getCustomName());
}
else if (e.getScoreboardTags().contains("dindicator")) {
e.remove();
}
}
}
}
示例6: remove
import org.bukkit.entity.ArmorStand; //導入方法依賴的package包/類
private void remove(PAUser u, ArmorStand as) {
as.eject();
u.getPlayer().eject();
FireworkAPI.spawnFirework(u.getLoc(), FireworkEffect.Type.BALL_LARGE, Color.GRAY, Color.MAROON, 10).detonate();
u.getPlayer().setNoDamageTicks(100);
new Helpers(u).sendToSpawn();
as.remove();
}
示例7: remove__A
import org.bukkit.entity.ArmorStand; //導入方法依賴的package包/類
public void remove__A()
{
for(HashMap<Integer, ArmorStand> car : cars.values())
{
for(ArmorStand as : car.values())
{
as.remove();
}
}
}
示例8: remove
import org.bukkit.entity.ArmorStand; //導入方法依賴的package包/類
public static void remove(Block b)
{
ArmorStand hologram = getArmorStand(b);
hologram.remove();
}
示例9: remove
import org.bukkit.entity.ArmorStand; //導入方法依賴的package包/類
public static void remove(Location l)
{
ArmorStand hologram = getArmorStand(l);
hologram.remove();
}