diff options
| author | Krakenied <krakenied1@gmail.com> | 2025-05-23 00:03:34 +0200 |
|---|---|---|
| committer | Krakenied <46192742+Krakenied@users.noreply.github.com> | 2025-07-29 00:06:46 +0200 |
| commit | 3efb11c01162744150b788f790a629305108f709 (patch) | |
| tree | ee2357dbefbdcf92c334a7b7191c9aee7314abd6 | |
| parent | a35fd9696136f20a80c510ee7ff773f43385add0 (diff) | |
[ci skip] Update some URLs in dev docs
| -rw-r--r-- | docs/developer/new-task-type.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/developer/new-task-type.md b/docs/developer/new-task-type.md index 3a054984..1bd97e2d 100644 --- a/docs/developer/new-task-type.md +++ b/docs/developer/new-task-type.md @@ -29,7 +29,7 @@ Quests handles the completion of all tasks within a quest and dispatches rewards {: .caution } > Task Types **MUST** be registered before the actual quests from the config are registered. They can be registered in between Quests inital activation and before the server is fully started. For example: you can register new Task Types inside of the `onEnable()` and add Quests to the `depend` or `softdepend` section of your `plugin.yml` to make sure that Quests is ready to accept your registration. > -> Attempting to register a task type after the registration period has closed will throw a `IllegalStateException`. The registration period closes and quests are loaded after every plugin has finished loading (on the first server [tick](https://github.com/LMBishop/Quests/blob/master/src/main/java/com/leonardobishop/quests/Quests.java#L129)). +> Attempting to register a task type after the registration period has closed will throw a `IllegalStateException`. The registration period closes and quests are loaded after every plugin has finished loading (on the first server [tick](https://github.com/LMBishop/Quests/blob/master/bukkit/src/main/java/com/leonardobishop/quests/bukkit/BukkitQuestsPlugin.java#L402)). ## Writing task types Your new Task Type must extend the [`TaskType`](https://github.com/LMBishop/Quests/blob/master/common/src/main/java/com/leonardobishop/quests/common/tasktype/TaskType.java) class. **`BukkitTaskType` implements `Listener` and automatically registers as an event listener if used with the `BukkitTaskTypeManager`.** Your subclass must pass the name of the Task Type into the constructor, and optionally the authors name and a brief description of the task. @@ -80,4 +80,4 @@ The `onDisable()` method is called when the plugin is disabled, or is reloaded. The `validateConfig(String, HashMap<String, Object>)` method is called when each task is loaded. It is used to detect potential configuration issues and can be used to prevent the quest from loading if, for example, a required config option is missing. The first string is the task root (e.g `tasks.mining` in the first example) and the map is the config to check. The return type is a list of `ConfigProblem`, returning a list containing at least one `ConfigProblem` with an `ERROR` type will prevent the quest from loading. ### Modifying progress -You can modify progress by obtaining an instance of a players `QuestProgressFile`, getting the specific `QuestProgress` and then getting the specific `TaskProgress`. You can see an example of this in the [`MiningTaskType`](https://github.com/LMBishop/Quests/blob/master/src/main/java/com/leonardobishop/quests/quest/tasktype/type/MiningTaskType.java) (which contains comments through the file).
\ No newline at end of file +You can modify progress by obtaining an instance of a players `QuestProgressFile`, getting the specific `QuestProgress` and then getting the specific `TaskProgress`. You can see an example of this in the [`MiningTaskType`](https://github.com/LMBishop/Quests/blob/master/bukkit/src/main/java/com/leonardobishop/quests/bukkit/tasktype/type/MiningTaskType.java) (which contains comments through the file).
\ No newline at end of file |
