Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. if (args[0].equalsIgnoreCase("Summon")) {
  2. Pig pig = (Pig) player.getLocation().getWorld().spawn(player.getLocation().add(2.0D, 0.0D, 0.0D),
  3. Pig.class);
  4. this.p.put(player.getUniqueId(), pig);
  5. ((Pig) this.p.get(player.getUniqueId()))
  6. .addPotionEffect(new PotionEffect(PotionEffectType.HEAL, 1000000000, 1000000000));
  7. ((Pig) this.p.get(player.getUniqueId()))
  8. .addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 1000000000, 1000000000));
  9. ((Pig) this.p.get(player.getUniqueId()))
  10. .addPotionEffect(new PotionEffect(PotionEffectType.HEALTH_BOOST, 1000000000, 1000000000));
  11. ((Pig) this.p.get(player.getUniqueId()))
  12. .addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 1000000000, 1000000000));
  13. ((Pig) this.p.get(player.getUniqueId()))
  14. .setCustomName(getConfig().getString("players." + player.getUniqueId() + ".petName"));
  15. ((Pig) this.p.get(player.getUniqueId())).setBaby();
  16. ((Pig) this.p).setTarget(player);
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement