+ Added ignore-locked-quests config-option,

when a player tries to take a quest from a npc, if the player can't
	take the quest, then don't display the quest in the list.
This commit is contained in:
Zino 2013-08-31 16:58:49 +02:00
parent 66d93293ef
commit 813462e458
2 changed files with 14 additions and 1 deletions

View File

@ -82,7 +82,13 @@ public class NpcListener implements Listener {
for (Quest q : plugin.getQuests()) {
if (q.npcStart != null && q.npcStart.getId() == evt.getNPC().getId()) {
npcQuests.add(q);
if (Quests.ignoreLockedQuests) {
if (q.testRequirements(quester) && (q.redoDelay <= 0)) {
npcQuests.add(q);
}
} else {
npcQuests.add(q);
}
}
}

View File

@ -77,6 +77,7 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
public static boolean snoop = true;
public static boolean npcEffects = true;
public static boolean broadcastPartyCreation = true;
public static boolean ignoreLockedQuests = false;
public static int maxPartySize = 0;
public static int acceptTimeout = 20;
public static int inviteTimeout = 20;
@ -335,6 +336,12 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
} else {
config.set("language", "en");
}
if (config.contains("ignore-locked-quests")) {
ignoreLockedQuests = config.getBoolean("ignore-locked-quests");
} else {
config.set("ignore-locked-quests", false);
}
if(config.contains("broadcast-party-creation")){
broadcastPartyCreation = config.getBoolean("broadcast-party-creation");