mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-26 19:17:50 +01:00
Support Denizen 1.1.3+, fixes #1187
This commit is contained in:
parent
58d2030368
commit
36a2e865aa
@ -65,7 +65,7 @@
|
||||
<dependency>
|
||||
<groupId>com.denizenscript</groupId>
|
||||
<artifactId>denizen</artifactId>
|
||||
<version>1.1.2-SNAPSHOT</version>
|
||||
<version>1.1.3-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user