Solved How to cancel clock

Discussion in 'Spigot Plugin Development' started by Jaffaaaa, Aug 14, 2018.

Thread Status:
Not open for further replies.
  1. I have a boss which regularly spawns mobs with a BukkitRunnable. How do I cancel the bukkit runnable if the boss has died?
     
  2. this.cancel inside the runnable
     
  3. ok so I understand that that's how you cancel the runnable but how does it know when the boss dies? like
    if (boss dies) {
    this.cancel}?
    Entity names are in different classes so I'm not sure.
     
  4. Check if the boss isValid(), if he is not then cancel.
     
  5. But how do I pull the boss? Eh I'm not explaining myself very well sry. Like how do I pull the boss into my class?
     
  6. Make it public static or make a get function.
     
    • Like Like x 1
Thread Status:
Not open for further replies.