mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-01-07 22:27:34 +01:00
Fixed health abuse bug
This commit is contained in:
parent
8e96b7d613
commit
cc00f8b5b9
@ -41,9 +41,9 @@ public class Thrive extends EcoEnchant {
|
||||
points = 0;
|
||||
}
|
||||
|
||||
if (player.getHealth() >= inst.getValue()) {
|
||||
if (player.getHealth() >= inst.getValue() && player.getHealth() >= 20) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -41,15 +41,11 @@ public class Prosperity extends EcoEnchant {
|
||||
points = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
Fixes health abuse bug
|
||||
|
||||
if (player.getHealth() >= inst.getValue() && player.getHealth() >= 20) {
|
||||
this.getPlugin().getScheduler().runLater(() -> {
|
||||
player.setHealth(Math.min(player.getHealth(), player.getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue()));
|
||||
}, 1);
|
||||
}
|
||||
*/
|
||||
|
||||
inst.setBaseValue(inst.getDefaultValue());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user