From c1fb4762a4849cf2e8fc2870e95eaeec73ab8355 Mon Sep 17 00:00:00 2001 From: HappyPikachu Date: Tue, 19 Dec 2017 21:04:46 -0500 Subject: [PATCH] Remove unused player kill timer superseded by #60 --- .../java/me/blackvein/quests/QuestData.java | 35 ------------------- .../java/me/blackvein/quests/Quester.java | 29 --------------- 2 files changed, 64 deletions(-) diff --git a/src/main/java/me/blackvein/quests/QuestData.java b/src/main/java/me/blackvein/quests/QuestData.java index 2d5380530..5d6abfff4 100644 --- a/src/main/java/me/blackvein/quests/QuestData.java +++ b/src/main/java/me/blackvein/quests/QuestData.java @@ -5,7 +5,6 @@ import java.util.EnumMap; import java.util.HashMap; import java.util.LinkedList; import java.util.Map; -import java.util.UUID; import org.bukkit.DyeColor; import org.bukkit.Location; @@ -310,40 +309,6 @@ public class QuestData { quester.updateJournal(); } }; - public Map playerKillTimes = new HashMap() { - - private static final long serialVersionUID = 9069594419068019465L; - - @Override - public Long put(UUID key, Long val) { - Long data = super.put(key, val); - if (doJournalUpdate) - quester.updateJournal(); - return data; - } - - @Override - public Long remove(Object key) { - Long i = super.remove(key); - if (doJournalUpdate) - quester.updateJournal(); - return i; - } - - @Override - public void clear() { - super.clear(); - if (doJournalUpdate) - quester.updateJournal(); - } - - @Override - public void putAll(Map m) { - super.putAll(m); - if (doJournalUpdate) - quester.updateJournal(); - } - }; public Map, Integer> itemsEnchanted = new HashMap, Integer>() { private static final long serialVersionUID = 416869352279205852L; diff --git a/src/main/java/me/blackvein/quests/Quester.java b/src/main/java/me/blackvein/quests/Quester.java index 30b895f63..94be68e58 100644 --- a/src/main/java/me/blackvein/quests/Quester.java +++ b/src/main/java/me/blackvein/quests/Quester.java @@ -842,10 +842,8 @@ public class Quester { } public void killMob(Quest quest, Location killedLocation, EntityType e) { - System.out.println("8"); QuestData questData = getQuestData(quest); if (questData.mobsKilled.contains(e) == false) { - System.out.println("9"); return; } Stage currentStage = getCurrentStage(quest); @@ -853,7 +851,6 @@ public class Quester { Integer numberOfSpecificMobKilled = questData.mobNumKilled.get(indexOfMobKilled); Integer numberOfSpecificMobNeedsToBeKilledInCurrentStage = currentStage.mobNumToKill.get(indexOfMobKilled); if (questData.locationsToKillWithin.isEmpty() == false) { - System.out.println("10-1"); Location locationToKillWithin = questData.locationsToKillWithin.get(indexOfMobKilled); double radius = questData.radiiToKillWithin.get(indexOfMobKilled); // Check world #name, not the object @@ -872,30 +869,15 @@ public class Quester { } } if (numberOfSpecificMobKilled < numberOfSpecificMobNeedsToBeKilledInCurrentStage) { - System.out.println("10-2"); Integer newNumberOfSpecificMobKilled = numberOfSpecificMobKilled + 1; questData.mobNumKilled.set(indexOfMobKilled, newNumberOfSpecificMobKilled); if ((newNumberOfSpecificMobKilled).equals(numberOfSpecificMobNeedsToBeKilledInCurrentStage)) { - System.out.println("11"); finishObjective(quest, "killMob", null, null, null, e, null, null, null, null, null, null); } } } public void killPlayer(Quest quest, Player player) { - if (getQuestData(quest).playerKillTimes.containsKey(player.getUniqueId())) { - long killTime = getQuestData(quest).playerKillTimes.get(player.getUniqueId()); - long comparator = plugin.killDelay * 1000; - long currentTime = System.currentTimeMillis(); - if ((currentTime - killTime) < comparator) { - String error = Lang.get("killNotValid"); - error = error.replaceAll("