Example #1
0
 /**
  * Sets a dNPC's ENGAGED status. Engaged NPCs do not respond to Player interaction. Note: Denizen
  * NPC will automatically disengage after the engage_timeout_in_seconds which is set in the
  * Denizen config.yml.
  *
  * @param npc the dNPC affected
  * @param engaged true sets the dNPC engaged, false sets the dNPC as disengaged
  */
 public static void setEngaged(NPC npc, boolean engaged) {
   if (engaged)
     currentlyEngaged.put(
         npc,
         System.currentTimeMillis()
             + (long) (Duration.valueOf(Settings.engageTimeoutInSeconds()).getSeconds()) * 1000);
   if (!engaged) currentlyEngaged.remove(npc);
 }