Advertisement
Guest User

Untitled

a guest
Nov 14th, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. if(cmd.getName().equalsIgnoreCase("ride")) {
  2. p.sendMessage(ChatColor.DARK_AQUA + "[Hub] " + ChatColor.WHITE + "You successfuly mounted a Horse.");
  3. p.removePotionEffect(PotionEffectType.SPEED);
  4. p.removePotionEffect(PotionEffectType.JUMP);
  5. Horse horse = (Horse) p.getWorld().spawnEntity(p.getLocation(), EntityType.HORSE);
  6. HorseInventory horseinv = null;
  7. ItemStack saddle = new ItemStack(Material.SADDLE);
  8. horse.setBreed(true);
  9. horse.setTamed(true);
  10. horse.setCustomName(p.getDisplayName() + ChatColor.GOLD + " Horsie" );
  11. horse.getWorld().playEffect(horse.getLocation(), Effect.MOBSPAWNER_FLAMES, 0);
  12. horseinv.setSaddle(saddle);
  13. horse.setOwner(p);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement