Guest User

Untitled

a guest
Nov 26th, 2014
175
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. else if (args[0].equalsIgnoreCase("create"))
  2. {
  3. if ((sender instanceof Player))
  4. {
  5. Player p = (Player)sender;
  6. if (p.isOp())
  7. {
  8. Location loc = p.getLocation();
  9.  
  10. LivingEntity entity = (LivingEntity)loc.getWorld().spawnEntity(loc, EntityType.PIG_ZOMBIE);
  11. String name = getConfig().getString("mob.name");
  12. entity.setCustomName(name.replaceAll("&", "§"));
  13. entity.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 2147483647, 1000));
  14. entity.setMaxHealth(1.7976931348623157E+308D);
  15. }
  16. else
  17. {
  18. sender.sendMessage("§cYou don't have permission for this command!");
  19. }
  20. }
  21. else
  22. {
  23. sender.sendMessage("You can't do this from console!");
  24. }
  25. }
RAW Paste Data