From f42c55dd0fefbf6d00c34ba91d6bf62a0804d235 Mon Sep 17 00:00:00 2001 From: Brendan Wilson Date: Fri, 21 Nov 2014 08:04:15 -0500 Subject: [PATCH] Cooldown for MetalClips Made a few changes, but ultimately not working. --- src/com/projectkorra/ProjectKorra/ConfigManager.java | 4 ++-- .../projectkorra/ProjectKorra/earthbending/MetalClips.java | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/com/projectkorra/ProjectKorra/ConfigManager.java b/src/com/projectkorra/ProjectKorra/ConfigManager.java index d76502c9..cdc81455 100644 --- a/src/com/projectkorra/ProjectKorra/ConfigManager.java +++ b/src/com/projectkorra/ProjectKorra/ConfigManager.java @@ -458,11 +458,11 @@ public class ConfigManager { config.addDefault("Abilities.Earth.LavaSurge.SourceCanBeEarth", true); config.addDefault("Abilities.Earth.MetalClips.Enabled", true); - config.addDefault("Abilities.Earth.MetalClips.Description", "Shoot multiple metal clips at your enemy to slowly encase them in metal, allowing you to control their movements. This ability only works on Zombies, Skeletons, and Players. You need iron in your inventory to use this ability."); + config.addDefault("Abilities.Earth.MetalClips.Description", "Shoot multiple metal clips at your enemy to slowly encase them in metal, giving you full control over their movements. This ability only works on Zombies, Skeletons, and Players. You need iron in your inventory to use this ability."); config.addDefault("Abilities.Earth.MetalClips.Damage", 2); config.addDefault("Abilities.Earth.MetalClips.DamageInterval", 500); config.addDefault("Abilities.Earth.MetalClips.MagnetRange", 20); - config.addDefault("Abilities.Earth.MetalClips.Cooldown", 600); + config.addDefault("Abilities.Earth.MetalClips.Cooldown", 1000); config.addDefault("Abilities.Earth.MetalClips.Duration", 10000); diff --git a/src/com/projectkorra/ProjectKorra/earthbending/MetalClips.java b/src/com/projectkorra/ProjectKorra/earthbending/MetalClips.java index 4b7bf8d3..35807a13 100644 --- a/src/com/projectkorra/ProjectKorra/earthbending/MetalClips.java +++ b/src/com/projectkorra/ProjectKorra/earthbending/MetalClips.java @@ -65,7 +65,6 @@ public class MetalClips magnet(); instances.put(player, this); - Methods.getBendingPlayer(player.getName()).addCooldown("MetalClips", cooldown); } public boolean isEligible() @@ -102,6 +101,9 @@ public class MetalClips { ItemStack is = new ItemStack(Material.IRON_INGOT, 1); + if(Methods.getBendingPlayer(player.getName()).isOnCooldown("MetalClips")) + return; + if(!player.getInventory().containsAtLeast(is, 1)) { //ProjectKorra.log.info("Player doesn't have enough ingots!");