Console ignores delays #142


Open
  • Forge_User_69099516 created this issue Feb 23, 2017

    I wrote a command that shuts down the server after a countdown.

    It works perfectly as long as I run it in game as admin but won't as soon as I do it via console.

    It seems that the console ignores the delays.

     

    serverstop:
     command: /shutdown
     type: RUN_COMMAND
     runcmd:
        - '/bc Server restart required!'
        - '$delay$<200>'
        - '/stop'

     

  • Forge_User_72884478 posted a comment Mar 14, 2017

    I presume you want the delay to be 200 ticks (10s)? Try specifying the delay like this below. You can also try setting the timer to 10 and format to SECONDS.

     

    serverstop:
     command: /shutdown
     type: RUN_COMMAND
     runcmd:
       - '/bc Server restart required!'
       - '$delay$'
       - '/stop'
     delaytimer: 200
     delaytimer_format: TICKS

     


    Edited Mar 14, 2017
  • Forge_User_69099516 posted a comment Mar 14, 2017

    I'm using several timings within the countdown, so a global delaytimer is not an option.

     

    It just doesn't work in the console.

  • Momshroom posted a comment Feb 28, 2018

    I'm doing a different command with delays and having the same issue.  The commands work perfectly when I run them manually, but when run from console the delay is removed.
    Here's one of my commands:

    fly5:
    command: /fly5
    type: RUN_COMMAND
    runcmd:
    - $delay$
    - /ground $arg1
    delaytimer: 300
    register: true
    require_all_arguments: true
    permission-error: 'This command intended for console'
    permission-required: true
    permission-node: ground.admin

    When I run it from console, this happens:
    28.02 12:46:08 [Server] INFO [MyCmd] Removed $delay$ from : $delay$

    28.02 12:46:08 [Server] INFO [me -> ✪Momshroom] Your fly is about to expire. LAND NOW

    28.02 12:46:08 [Server] INFO [MyCmd] Removed $delay$ from : $delay$ 28.02 12:46:08 [Server] INFO Set fly mode disabled for ✪Momshroom.

    All immediately, no delays.  How do we get the console to NOT remove the delay?

    Thanks!


To post a comment, please login or register a new account.