Guest User

Untitled

a guest
Aug 26th, 2017
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.69 KB | None | 0 0
  1.     @Override
  2.     public ArmorStand createArmorStand(Location l, String name, ItemStack i) {
  3.         EntityArmorStand eas = new EntityArmorStand(((CraftWorld) l.getWorld()).getHandle(), l.getX(), l.getY(),
  4.                 l.getZ());
  5.         eas.yaw = l.getYaw();
  6.         eas.pitch = l.getPitch();
  7.         ArmorStand as = (ArmorStand) eas.getBukkitEntity();
  8.         if (name != null) {
  9.             as.setCustomName(name);
  10.             as.setCustomNameVisible(true);
  11.         }
  12.         as.setSmall(true);
  13.         as.setInvulnerable(true);
  14.         as.setVisible(false);
  15.         as.setBasePlate(false);
  16.         as.setHelmet(i);
  17.         as.setAI(false);
  18.         as.setCollidable(false);
  19.         as = ((CraftWorld) l.getWorld()).addEntity(((CraftArmorStand) as).getHandle(), SpawnReason.CUSTOM);
  20.         return as;
  21.     }
Advertisement
Add Comment
Please, Sign In to add comment