Пример #1
0
 public void begin() {
   drawFlag();
   thread =
       plugin
           .getServer()
           .getScheduler()
           .scheduleSyncRepeatingTask(
               plugin,
               new CellAttackThread(this),
               TownyWarConfig.getTimeBetweenFlagColorChange(),
               TownyWarConfig.getTimeBetweenFlagColorChange());
 }
Пример #2
0
  public void cancel() {
    if (thread != -1) plugin.getServer().getScheduler().cancelTask(thread);

    destroyFlag();
  }