public void deactivate() {
   if (Log.loggingDebug)
     log.debug(
         "CollectionQuestState.deactivate: playerOid="
             + getPlayerOid()
             + " questRef="
             + getQuestRef());
   if (sub != null) {
     Engine.getAgent().removeSubscription(sub);
   }
 }
 public void activate() {
   if (Log.loggingDebug) log.debug("in activate: this " + this);
   // subscribe for some messages
   SubjectFilter filter = new SubjectFilter(getPlayerOid());
   filter.addType(InventoryClient.MSG_TYPE_INV_UPDATE);
   filter.addType(QuestClient.MSG_TYPE_CONCLUDE_QUEST);
   sub = Engine.getAgent().createSubscription(filter, this);
   makeDeliveryItems();
   updateQuestLog();
   updateObjectiveStatus();
   // updateQuestObjectives();
   log.debug("QuestPlugin activated");
 }