mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-22 10:36:09 +01:00
+ 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:
parent
66d93293ef
commit
813462e458
@ -82,8 +82,14 @@ public class NpcListener implements Listener {
|
||||
for (Quest q : plugin.getQuests()) {
|
||||
|
||||
if (q.npcStart != null && q.npcStart.getId() == evt.getNPC().getId()) {
|
||||
if (Quests.ignoreLockedQuests) {
|
||||
if (q.testRequirements(quester) && (q.redoDelay <= 0)) {
|
||||
npcQuests.add(q);
|
||||
}
|
||||
} else {
|
||||
npcQuests.add(q);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
@ -336,6 +337,12 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
|
||||
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");
|
||||
}else{
|
||||
|
Loading…
Reference in New Issue
Block a user