mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-01-23 00:31:20 +01:00
Fixed prosperity health bug
This commit is contained in:
parent
9ad527ae16
commit
9aab8ff64f
@ -41,9 +41,10 @@ public class Prosperity extends EcoEnchant {
|
|||||||
points = 0;
|
points = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (player.getHealth() >= inst.getValue() && player.getHealth() >= 20) {
|
if (player.getHealth() >= inst.getValue() && player.getHealth() >= 20) {
|
||||||
this.getPlugin().getScheduler().runLater(() -> {
|
this.getPlugin().getScheduler().runLater(() -> {
|
||||||
player.setHealth(player.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue());
|
player.setHealth(Math.min(player.getHealth(), player.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue()));
|
||||||
}, 1);
|
}, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user