Queue Command Tester


Author: aufdemrand
Created: 2013-08-18T01:03:44-0400
Edited: 2013-08-18T01:10:09-0400
Denizen Version: 0.9.2+
Views: 9
Downloads: 730
Likes: 0


WGET
Description: Shows basic usage of queue ids and using the queue command to clear any remaining entries on an existing queue.

Just type /testqueue!

# +-----------------------------------
# | Queue Command Tester
# +-----------------------------------

Queue Command tester:
  type: world

  events:
    on testqueue command:
    - narrate "Let's make a queue that stays alive for at least a 30 seconds!"
    - narrate "Use /canceltestqueue to remove the queue, cancelling any remaining entries."
    # Run the script inside the 'test queue' container in a queue called 'test'.
    - run 'test queue' i:test
    # Let bukkit know we handled this command.
    - determine fulfilled

    on canceltestqueue command:
    # Queue requires the 'id' of the queue, in this case 'test'.
    - queue test clear
    - narrate "Cleared 'test' queue!"
    # Let bukkit know we handled this command
    - determine fulfilled

test queue:
  type: task

  script:
  - narrate "Built 'Test' queue..."
  - narrate "<q.stats>"
  - wait 30s
  - narrate "Ending 'test' queue! Looks like you didn't cancel it!"




Comments
No one has posted a comment! Post one below: