From 5bd07bf78fb973b1d46f41bffd57349bf0448b21 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Tue, 4 Dec 2018 15:19:18 -0500 Subject: [PATCH] Set final local variables for enclosing scope --- src/main/java/me/blackvein/quests/PlayerListener.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/me/blackvein/quests/PlayerListener.java b/src/main/java/me/blackvein/quests/PlayerListener.java index b61ea983e..cb90ed274 100644 --- a/src/main/java/me/blackvein/quests/PlayerListener.java +++ b/src/main/java/me/blackvein/quests/PlayerListener.java @@ -295,17 +295,17 @@ public class PlayerListener implements Listener { @EventHandler public void onPlayerChat(AsyncPlayerChatEvent evt) { if (plugin.checkQuester(evt.getPlayer().getUniqueId()) == false) { - Quester quester = plugin.getQuester(evt.getPlayer().getUniqueId()); + final Quester quester = plugin.getQuester(evt.getPlayer().getUniqueId()); if (quester.currentQuests.isEmpty() == false) { - for (Quest quest : quester.currentQuests.keySet()) { - Stage currentStage = quester.getCurrentStage(quest); + for (final Quest quest : quester.currentQuests.keySet()) { + final Stage currentStage = quester.getCurrentStage(quest); if (currentStage == null) { plugin.getLogger().severe("currentStage was null for " + quester.id.toString() + " on chat"); continue; } if (currentStage.chatEvents.isEmpty() == false) { String chat = evt.getMessage(); - for (String s : currentStage.chatEvents.keySet()) { + for (final String s : currentStage.chatEvents.keySet()) { if (s.equalsIgnoreCase(chat)) { if (quester.getQuestData(quest).eventFired.get(s) == null || quester.getQuestData(quest).eventFired.get(s) == false) { new BukkitRunnable() {