Class CitizenQuestTriggerTemplate
java.lang.Object
com.minecolonies.core.quests.triggers.CitizenQuestTriggerTemplate
- All Implemented Interfaces:
IQuestTriggerTemplate
Random quest trigger.
-
Field Summary
FieldsModifier and TypeFieldDescriptioncom.google.gson.JsonElementThe tag we are trying to match.com.google.gson.JsonElementThe tag we are trying to NOT match. -
Constructor Summary
ConstructorsConstructorDescriptionCitizenQuestTriggerTemplate(com.google.gson.JsonObject tag) Create a new state quest trigger. -
Method Summary
Modifier and TypeMethodDescriptioncanTriggerQuest(IColony colony) Check if the quest trigger condition is fulfilled.static CitizenQuestTriggerTemplatecreateStateTrigger(com.google.gson.JsonObject questTriggerJson) Create a new trigger directly from json.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.minecolonies.api.quests.IQuestTriggerTemplate
canTriggerQuest
-
Field Details
-
matchTag
public com.google.gson.JsonElement matchTagThe tag we are trying to match. -
notMatchTag
public com.google.gson.JsonElement notMatchTagThe tag we are trying to NOT match.
-
-
Constructor Details
-
CitizenQuestTriggerTemplate
public CitizenQuestTriggerTemplate(com.google.gson.JsonObject tag) Create a new state quest trigger.- Parameters:
tag- the state to match.
-
-
Method Details
-
createStateTrigger
public static CitizenQuestTriggerTemplate createStateTrigger(com.google.gson.JsonObject questTriggerJson) Create a new trigger directly from json.- Parameters:
questTriggerJson- the json associated to this trigger.
-
canTriggerQuest
Description copied from interface:IQuestTriggerTemplateCheck if the quest trigger condition is fulfilled.- Specified by:
canTriggerQuestin interfaceIQuestTriggerTemplate- Parameters:
colony- the colony the quest is in.- Returns:
- true if so.
-