Solved Cancel a delayed task when player moves.

Discussion in 'Plugin Development' started by xItsJ0hny, Dec 18, 2018.

Thread Status:
Not open for further replies.
  1. Offline

    xItsJ0hny

    @timtower Events obviously are outside onCommand. What else you mean? This code applies when player executes /spawn.
     
  2. Offline

    timtower Administrator Administrator Moderator

    What is line 1 to 20 then? Doesn't say where it is located.
     
  3. Offline

    xItsJ0hny

    @timtower Here it is: https://pastebin.com/AjqWmn06. After that a couple more commands follow up. Then after commands are 3 events.
     
  4. Offline

    timtower Administrator Administrator Moderator

    See that it is in the onCommand.
    Why is the if statement there?
     
  5. Offline

    xItsJ0hny

    @timtower Isn't that if statement supposed to check the boolean if it's true or false?
     
  6. Offline

    timtower Administrator Administrator Moderator

    But having that there stops the teleport completely.
     
  7. Offline

    xItsJ0hny

    @timtower Oh I get you. Gotta move it somewhere more specific right?
     
  8. Offline

    timtower Administrator Administrator Moderator

    The if statement should not be there at all when starting the timer.
     
  9. Offline

    xItsJ0hny

    @timtower Right. Only in the player move event, correct?
     
  10. Offline

    timtower Administrator Administrator Moderator

    That is what I have been saying yes.
     
  11. Offline

    xItsJ0hny

    @timtower Thank you very much mate. Got it all working. Truly life saver!
     
Thread Status:
Not open for further replies.

Share This Page