Permanent Tasks
Description
Permanent tasks are long-term tasks that can optionally be bound to NPCs, or used without any NPC plugin via commands anywhere.
Example
Description:
The permanent task logic is:
- First create a permanent task as described in example 1.
/plk create NpcTask npc normal - Then bind it to the corresponding NPC with a command.
Suppose we already have a permanent task, as shown in the image, its type is permanent task.
Now let's look at the NPC list of the Citizens plugin.
As you can see there are three NPCs: 0, 1 and 2.
Input command to bind
Command: /plk addNpcTask [task id] [npcId] [permanent task] [completable times] [cooldown] (prerequisite task id)
Example: /plk addNpcTask 23 2 1 0 60
Explanation: binds the task with ID 23 to NPC 2, setting it to 1 means a permanent repeating task, the 0 after it is the number of times the task can be completed (it only takes effect when the previous parameter is set to 0), 60 is the cooldown time. The prerequisite task ID can be omitted, by default there is no prerequisite task, pass the corresponding task ID if you need one.
Effect after the above operations
How to view NPC bound tasks
/plk view npc
Note: clicking delete also removes the corresponding task from the players who accepted it.



