예제 #1
0
 public void startAttacking(final LivingEntity e) {
   if (this.attackingID != -1) this.stopAttacking();
   this.attackingID =
       Bukkit.getScheduler()
           .scheduleSyncRepeatingTask(
               DragonsLairMain.getInstance(), new NPCAttackTask(this, e), 0, 10L);
 }
예제 #2
0
 public void stopAttacking() {
   if (this.attackingID != -1) Bukkit.getScheduler().cancelTask(this.attackingID);
 }