From 36a2e865aaff62e3aa879eb63572902244f53b36 Mon Sep 17 00:00:00 2001 From: PikaMug <2267126+PikaMug@users.noreply.github.com> Date: Tue, 14 Apr 2020 17:37:18 -0400 Subject: [PATCH] Support Denizen 1.1.3+, fixes #1187 --- main/pom.xml | 2 +- .../blackvein/quests/reflect/denizen/DenizenAPI_1_1_1.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/main/pom.xml b/main/pom.xml index bc8ca281e..be5703c35 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -65,7 +65,7 @@ com.denizenscript denizen - 1.1.2-SNAPSHOT + 1.1.3-SNAPSHOT provided diff --git a/main/src/main/java/me/blackvein/quests/reflect/denizen/DenizenAPI_1_1_1.java b/main/src/main/java/me/blackvein/quests/reflect/denizen/DenizenAPI_1_1_1.java index d16a7a0d9..83c2ee3c5 100644 --- a/main/src/main/java/me/blackvein/quests/reflect/denizen/DenizenAPI_1_1_1.java +++ b/main/src/main/java/me/blackvein/quests/reflect/denizen/DenizenAPI_1_1_1.java @@ -23,6 +23,8 @@ import com.denizenscript.denizen.objects.PlayerTag; import com.denizenscript.denizen.utilities.implementation.BukkitScriptEntryData; import com.denizenscript.denizencore.scripts.ScriptRegistry; import com.denizenscript.denizencore.scripts.containers.core.TaskScriptContainer; +import com.denizenscript.denizencore.scripts.queues.ScriptQueue; +import com.denizenscript.denizencore.scripts.queues.core.InstantQueue; import net.citizensnpcs.api.npc.NPC; @@ -62,6 +64,8 @@ public class DenizenAPI_1_1_1 { public static void runTaskScript(String scriptName, Player player) { TaskScriptContainer taskScript = ScriptRegistry.getScriptContainerAs(scriptName, TaskScriptContainer.class); BukkitScriptEntryData entryData = new BukkitScriptEntryData(PlayerTag.mirrorBukkitPlayer(player), null); - taskScript.runTaskScript(entryData, null); + ScriptQueue queue = new InstantQueue(taskScript.getName()) + .addEntries(taskScript.getBaseEntries(entryData.clone())); + queue.start(); } }