From 134e0db2e9a04cea24f7b5178e60a8fa80071aae Mon Sep 17 00:00:00 2001 From: GJ Date: Fri, 25 Oct 2013 17:07:56 -0400 Subject: [PATCH] Cleanup more of Riking's mess. --- .../gmail/nossr50/listeners/ScoreboardsListener.java | 11 +---------- src/main/java/com/gmail/nossr50/mcMMO.java | 2 +- .../nossr50/util/scoreboards/ScoreboardManager.java | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/ScoreboardsListener.java b/src/main/java/com/gmail/nossr50/listeners/ScoreboardsListener.java index 548f397ac..65ad07fd0 100644 --- a/src/main/java/com/gmail/nossr50/listeners/ScoreboardsListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/ScoreboardsListener.java @@ -6,21 +6,12 @@ import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerQuitEvent; -import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.events.experience.McMMOPlayerLevelUpEvent; import com.gmail.nossr50.events.experience.McMMOPlayerXpGainEvent; import com.gmail.nossr50.events.skills.abilities.McMMOPlayerAbilityActivateEvent; -import com.gmail.nossr50.util.player.UserManager; import com.gmail.nossr50.util.scoreboards.ScoreboardManager; -import com.gmail.nossr50.util.skills.SkillUtils; public class ScoreboardsListener implements Listener { - private final mcMMO plugin; - - public ScoreboardsListener(final mcMMO plugin) { - this.plugin = plugin; - } - @EventHandler public void onPlayerJoin(PlayerJoinEvent e) { ScoreboardManager.setupPlayer(e.getPlayer()); @@ -43,6 +34,6 @@ public class ScoreboardsListener implements Listener { @EventHandler(priority = EventPriority.MONITOR) public void onAbility(McMMOPlayerAbilityActivateEvent e) { - ScoreboardManager.cooldownUpdate(e.getPlayer(), e.getSkill(), SkillUtils.calculateTimeLeft(e.getAbility(), UserManager.getPlayer(e.getPlayer()).getProfile(), e.getPlayer())); + ScoreboardManager.cooldownUpdate(e.getPlayer(), e.getSkill()); } } diff --git a/src/main/java/com/gmail/nossr50/mcMMO.java b/src/main/java/com/gmail/nossr50/mcMMO.java index 035e116cf..1066b11b3 100644 --- a/src/main/java/com/gmail/nossr50/mcMMO.java +++ b/src/main/java/com/gmail/nossr50/mcMMO.java @@ -384,7 +384,7 @@ public class mcMMO extends JavaPlugin { pluginManager.registerEvents(new EntityListener(this), this); pluginManager.registerEvents(new InventoryListener(this), this); pluginManager.registerEvents(new SelfListener(), this); - pluginManager.registerEvents(new ScoreboardsListener(this), this); + pluginManager.registerEvents(new ScoreboardsListener(), this); pluginManager.registerEvents(new WorldListener(this), this); } diff --git a/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardManager.java b/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardManager.java index 3889febfa..60f93d2e4 100644 --- a/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardManager.java +++ b/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardManager.java @@ -207,7 +207,7 @@ public class ScoreboardManager { } // Called by internal ability event listeners - public static void cooldownUpdate(Player player, SkillType skill, int cooldownSeconds) { + public static void cooldownUpdate(Player player, SkillType skill) { // Selfboards ScoreboardWrapper wrapper = PLAYER_SCOREBOARDS.get(player.getName()); if ((wrapper.isCooldownScoreboard() || wrapper.isSkillScoreboard() && wrapper.targetSkill == skill) && wrapper.isBoardShown()) {