use of net.aufdemrand.denizencore.scripts.queues.core.TimedQueue in project Denizen-For-Bukkit by DenizenScript.
the class AbstractTrigger method parse.
public boolean parse(dNPC npc, dPlayer player, InteractScriptContainer script, String id, Map<String, dObject> context) {
if (npc == null || player == null || script == null) {
return false;
}
List<ScriptEntry> entries = script.getEntriesFor(this.getClass(), player, npc, id, true);
if (entries.isEmpty()) {
return false;
}
dB.echoDebug(script, DebugElement.Header, "Parsing " + name + " trigger: n@" + npc.getName() + "/p@" + player.getName());
// Create Queue
TimedQueue queue = TimedQueue.getQueue(ScriptQueue.getNextId(script.getName()));
// Add all entries to set it up
queue.addEntries(entries);
// Add context
if (context != null) {
OldEventManager.OldEventContextSource oecs = new OldEventManager.OldEventContextSource();
oecs.contexts = context;
queue.setContextSource(oecs);
}
// Start it
queue.start();
return true;
}
Aggregations