Added config for how often a player's quests are checked for completion.

This commit is contained in:
luisc committed 2022-02-02 07:53:42 -06:00
1 parent 70536de655
commit d3145f4868
2 files changed
+7 -1

No files matched your search

@@ -78,6 +78,9 @@ public class CustomNpcs {
@ConfigProp(info = "Set to true if you want the dialog command option to be able to use op commands like tp etc")
public static boolean NpcUseOpCommands = false;
@ConfigProp(info = "The amount of time that passes before a player's quests are checked for completion in seconds.")
public static int PlayerQuestCheck = 300;
@ConfigProp
public static boolean InventoryGuiEnabled = true;
@@ -177,6 +180,9 @@ public class CustomNpcs {
if(NpcSizeLimit < 1)
NpcSizeLimit = 1;
if(PlayerQuestCheck < 1)
PlayerQuestCheck = 1;
EnchantInterface.load();
CustomItems.load();
@@ -78,7 +78,7 @@ public class ScriptPlayerEventHandler {
playerData.timers.update();
}
if(player.ticksExisted%40 == 0){
if(player.ticksExisted%(20*CustomNpcs.PlayerQuestCheck) == 0){
PlayerQuestData questData = playerData.questData;
for(EnumQuestType e : EnumQuestType.values())
questData.checkQuestCompletion(playerData, e);