From 6e79e81df591fe464e1d79c302fbfe9d91345072 Mon Sep 17 00:00:00 2001 From: PikaMug <2267126+PikaMug@users.noreply.github.com> Date: Fri, 30 Jul 2021 05:36:27 -0400 Subject: [PATCH] Remove unused methods from #1758 --- .../main/java/me/blackvein/quests/Quest.java | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/main/src/main/java/me/blackvein/quests/Quest.java b/main/src/main/java/me/blackvein/quests/Quest.java index 349c5d923..d051f0cef 100644 --- a/main/src/main/java/me/blackvein/quests/Quest.java +++ b/main/src/main/java/me/blackvein/quests/Quest.java @@ -55,7 +55,6 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.concurrent.CompletableFuture; -import java.util.function.Consumer; public class Quest implements Comparable { @@ -525,45 +524,6 @@ public class Quest implements Comparable { public void completeQuest(final Quester quester) { completeQuest(quester, true); } - - public void runEvent(Quester quester, Consumer callback) { - if (Bukkit.isPrimaryThread()) { - final QuesterPreCompleteQuestEvent preEvent - = new QuesterPreCompleteQuestEvent(quester, this, false); - plugin.getServer().getPluginManager().callEvent(preEvent); - callback.accept(preEvent.isCancelled()); - } else { - Bukkit.getScheduler().runTaskAsynchronously(plugin, new Runnable() { - - @Override - public void run() { - final QuesterPreCompleteQuestEvent preEvent - = new QuesterPreCompleteQuestEvent(quester, Quest.this, true); - plugin.getServer().getPluginManager().callEvent(preEvent); - callback.accept(preEvent.isCancelled()); - } - }); - } - } - - public CompletableFuture completeEvent(Quester quester) { - CompletableFuture result = new CompletableFuture<>(); - Bukkit.getScheduler().runTaskAsynchronously(plugin, new Runnable() { - - @Override - public void run() { - final QuesterPreCompleteQuestEvent preEvent - = new QuesterPreCompleteQuestEvent(quester, Quest.this, true); - plugin.getServer().getPluginManager().callEvent(preEvent); - result.complete(preEvent.isCancelled()); - } - }); - // do your processes asynchronously - // in the asynchronous process, call "result.complete(theValueOfMoney)" to complete the task - // or if an exception is thrown, you can also "result.completeExceptionally(theException)" - - return result; - } /** * Proceed to finish this quest, issuing applicable rewards