Delayed tasks

Discussion in 'Plugin Development' started by Irantwomiles, Feb 1, 2017.

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

    Irantwomiles

    I have a new question, does a delayed task cancel itself in like a deathevent. So I check if a player died due to some reason, and then run the task, does that cancel itself after its over? And will it cause tps drops of ran a many times?
     
    Last edited: Feb 2, 2017
  2. Offline

    ipodtouch0218

    Sounds strange that the items disappear, but how are you handling the player's death?
     
  3. Offline

    Irantwomiles

    Nothing special, just a regular death event. checking instanceof player etc.. To be more exact, this is a pvp plugin with arenas and stuff like that. there is a team functionality and when two teams are in a team fight it seems to be the last person that dies before the match is over to have this issue. But I have nothing that would cause anything like this.
     
  4. Offline

    ipodtouch0218

    Instead of a Death Event, maybe you could listen to the PlayerDamageEvent and check if their health <= 0 when subtracted by e.getDamage(). I think the client and the server gets desynced because of the cancelling of the DeathEvent.
     
  5. Offline

    Irantwomiles

    yea, im just going through everything and double checking.

    Bump

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Feb 2, 2017
Thread Status:
Not open for further replies.

Share This Page