From 01784ad412f0c58c64867863fa17247a0089a505 Mon Sep 17 00:00:00 2001 From: MistPhizzle Date: Tue, 29 Jul 2014 10:35:33 -0400 Subject: [PATCH] Add config options for OctopusForm --- src/com/projectkorra/ProjectKorra/ConfigManager.java | 3 +++ .../ProjectKorra/waterbending/OctopusForm.java | 7 ++++--- src/config.yml | 3 +++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/com/projectkorra/ProjectKorra/ConfigManager.java b/src/com/projectkorra/ProjectKorra/ConfigManager.java index 49b88d68..bbba3510 100644 --- a/src/com/projectkorra/ProjectKorra/ConfigManager.java +++ b/src/com/projectkorra/ProjectKorra/ConfigManager.java @@ -234,6 +234,9 @@ public class ConfigManager { + "While channeling, the water will form itself around you and has a chance to block incoming attacks. " + "Additionally, you can click while channeling to attack things near you, dealing damage and knocking them back. " + "Releasing shift at any time will dissipate the form."); + config.addDefault("Abilities.Water.OctopusForm.Range", 10); + config.addDefault("Abilities.Water.OctopusForm.Radius", 3); + config.addDefault("Abilities.Water.OctopusForm.Damage", 3); config.addDefault("Abilities.Water.PhaseChange.Enabled", true); config.addDefault("Abilities.Water.PhaseChange.Description", "To use, simply left-click. " diff --git a/src/com/projectkorra/ProjectKorra/waterbending/OctopusForm.java b/src/com/projectkorra/ProjectKorra/waterbending/OctopusForm.java index 324475a7..2129b1ec 100644 --- a/src/com/projectkorra/ProjectKorra/waterbending/OctopusForm.java +++ b/src/com/projectkorra/ProjectKorra/waterbending/OctopusForm.java @@ -13,16 +13,17 @@ import org.bukkit.entity.Player; import org.bukkit.util.Vector; import com.projectkorra.ProjectKorra.Methods; +import com.projectkorra.ProjectKorra.ProjectKorra; import com.projectkorra.ProjectKorra.TempBlock; public class OctopusForm { static ConcurrentHashMap instances = new ConcurrentHashMap(); - private static int range = 10; - private static int damage = 3; + private static int range = ProjectKorra.plugin.getConfig().getInt("Abilities.Water.OctopusForm.Range"); + private static int damage = ProjectKorra.plugin.getConfig().getInt("Abilities.Water.OctopusForm.Damage"); private static long interval = 50; - static double radius = 3; + static double radius = ProjectKorra.plugin.getConfig().getDouble("Abilities.Water.OctopusForm.Radius"); private static final byte full = 0x0; private Player player; diff --git a/src/config.yml b/src/config.yml index 55cadc98..5c313c09 100644 --- a/src/config.yml +++ b/src/config.yml @@ -170,6 +170,9 @@ Abilities: OctopusForm: Enabled: true Description: "This ability allows the waterbender to manipulate a large quantity of water into a form resembling that of an octopus. To use, click to select a water source. Then, hold sneak to channel this ability. While channleing, the water will form itself around you and has a chance to block incoming attacks. Additionally, you can click while channeling to attack things near you, dealing damage and knocking the target back. Releasing shift at any time will dissipate the form." + Range: 10 + Damage: 3 + Radius: 3 PhaseChange: Enabled: true Description: "To use, simply left-click. Any water you are looking at within range will instantly freeze over into solid ice. Provided you stay within range of the ice and do not unbind FreezeMelt, that ice will not thaw. If, however, you do either of those things the ice will instantly thaw. If you sneak (default: shift), anything around where you are looking at will instantly melt. Since this is a more favorable state for these things, they will never re-freeze unless they would otherwise by nature or some other bending ability. Additionally, if you tap sneak while targeting water with FreezeMelt, it will evaporate water around that block that is above sea level."