コード例 #1
0
ファイル: HumanNPC.java プロジェクト: MiniDigger/Dragons-Lair
 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
ファイル: HumanNPC.java プロジェクト: MiniDigger/Dragons-Lair
 public void stopAttacking() {
   if (this.attackingID != -1) Bukkit.getScheduler().cancelTask(this.attackingID);
 }