Guest User

Untitled

a guest
Jul 14th, 2014
30
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @Getter private final NPCFactory    factory = new NPCFactory(Core.getInstance());
  2.     @Getter private NPC              bender;
  3.    
  4.     public void test(final User tester) {
  5.        
  6.         final Location loc = tester.getPlayer().getLocation();
  7.        
  8.         final NPCProfile profile = new NPCProfile(ChatColor.GOLD + "Bender", "bender12");
  9.         Bukkit.getScheduler().runTask(Core.getInstance(), new Runnable() {
  10.            
  11.             @Override
  12.             public void run() {
  13.                 bender = factory.spawnHumanNPC(loc, profile);
  14.                 bender.setYaw(loc.getYaw());
  15.                 bender.getBukkitEntity().teleport(loc);
  16.                 bender.setEntityCollision(false);
  17.                 bender.setGravity(false);
  18.                 bender.playAnimation(NPCAnimation.SWING_ARM);
  19.             }
  20.         });
  21.        
  22.     }
RAW Paste Data