use of net.aufdemrand.denizencore.objects.Duration in project Denizen-For-Bukkit by DenizenScript.
the class WaitCommand method execute.
@Override
public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {
ScriptQueue queue = (ScriptQueue) scriptEntry.getObject("queue");
Duration delay = (Duration) scriptEntry.getObject("delay");
dB.report(scriptEntry, getName(), aH.debugObj("queue", queue.id) + delay.debug());
// Tell the queue to delay
if (queue instanceof Delayable) {
((Delayable) queue).delayFor(delay);
} else {
scriptEntry.setInstant(false);
dB.echoDebug(scriptEntry, "Forcing queue " + queue.id + " into a timed queue...");
queue.forceToTimed(delay);
}
}
Aggregations