1
0
mirror of https://github.com/PikaMug/Quests.git synced 2024-12-21 08:37:37 +01:00

Set final local variables for enclosing scope

This commit is contained in:
BuildTools 2018-12-04 15:19:18 -05:00
parent 39032c3af9
commit 5bd07bf78f

View File

@ -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() {