Give all mounts saddles - not just the normal horses.

This commit is contained in:
Andreas Troelsen
2016-12-30 01:32:16 +01:00
parent fb1a87f71b
commit 788cfefa00
@@ -841,13 +841,14 @@ public class ArenaImpl implements Arena
mount.setPassenger(p);
mount.setHealth(mount.getMaxHealth());
// If normal horse, barding and saddle
// Add saddle
mount.getInventory().addItem(new ItemStack(Material.SADDLE));
// Normal horses may have barding
if (type == EntityType.HORSE) {
Horse horse = (Horse) mount;
horse.getInventory().setSaddle(new ItemStack(Material.SADDLE));
Material barding = bardingFromAmount(amount);
if (barding != null) {
horse.getInventory().setArmor(new ItemStack(barding));
((Horse) mount).getInventory().setArmor(new ItemStack(barding));
}
}