mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2025-02-14 04:47:51 +00:00
HealingWaters - Power
Added HealingWaters power option
This commit is contained in:
parent
9949851300
commit
9c3f45d1d7
2 changed files with 4 additions and 2 deletions
|
@ -265,6 +265,7 @@ public class ConfigManager {
|
|||
+ "be at least partially submerged in water.");
|
||||
config.addDefault("Abilities.Water.HealingWaters.Radius", 5);
|
||||
config.addDefault("Abilities.Water.HealingWaters.Interval", 750);
|
||||
config.addDefault("Abilities.Water.HealingWaters.Power", 1);
|
||||
|
||||
config.addDefault("Abilities.Water.IceBlast.Enabled", true);
|
||||
config.addDefault("Abilities.Water.IceBlast.Damage", 3);
|
||||
|
|
|
@ -19,7 +19,8 @@ public class HealingWaters {
|
|||
|
||||
private static final double range = ProjectKorra.plugin.getConfig().getDouble("Abilities.Water.HealingWaters.Radius");
|
||||
private static final long interval = ProjectKorra.plugin.getConfig().getLong("Abilities.Water.HealingWaters.Interval");
|
||||
|
||||
private static final int power = ProjectKorra.plugin.getConfig().getInt("Abilities.Water.HealingWaters.Power");
|
||||
|
||||
private static long time = 0;
|
||||
|
||||
public static void heal(Server server) {
|
||||
|
@ -85,7 +86,7 @@ public class HealingWaters {
|
|||
private static void applyHealing(Player player) {
|
||||
if (!Methods.isRegionProtectedFromBuild(player, "HealingWaters", player.getLocation()))
|
||||
if(player.getHealth() < player.getMaxHealth()) {
|
||||
player.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 70, 1));
|
||||
player.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 70, power));
|
||||
Methods.breakBreathbendingHold(player);
|
||||
}
|
||||
// for(PotionEffect effect : player.getActivePotionEffects()) {
|
||||
|
|
Loading…
Reference in a new issue