Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(cmd.getName().equalsIgnoreCase("ride")) {
- p.sendMessage(ChatColor.DARK_AQUA + "[Hub] " + ChatColor.WHITE + "You successfuly mounted a Horse.");
- p.removePotionEffect(PotionEffectType.SPEED);
- p.removePotionEffect(PotionEffectType.JUMP);
- Horse horse = (Horse) p.getWorld().spawnEntity(p.getLocation(), EntityType.HORSE);
- HorseInventory horseinv = null;
- ItemStack saddle = new ItemStack(Material.SADDLE);
- horse.setBreed(true);
- horse.setTamed(true);
- horse.setCustomName(p.getDisplayName() + ChatColor.GOLD + " Horsie" );
- horse.getWorld().playEffect(horse.getLocation(), Effect.MOBSPAWNER_FLAMES, 0);
- horseinv.setSaddle(saddle);
- horse.setOwner(p);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement