Use GENERIC_MAX_HEALTH attribute when setting mount health.
getMaxHealth() is deprecated. Partial fix for #406
This commit is contained in:
@@ -960,7 +960,7 @@ public class ArenaImpl implements Arena
|
|||||||
mount.setTamed(true);
|
mount.setTamed(true);
|
||||||
mount.setOwner(p);
|
mount.setOwner(p);
|
||||||
mount.addPassenger(p);
|
mount.addPassenger(p);
|
||||||
mount.setHealth(mount.getMaxHealth());
|
mount.setHealth(mount.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue());
|
||||||
|
|
||||||
// Add saddle
|
// Add saddle
|
||||||
mount.getInventory().addItem(new ItemStack(Material.SADDLE));
|
mount.getInventory().addItem(new ItemStack(Material.SADDLE));
|
||||||
|
|||||||
Reference in New Issue
Block a user