Open HielkeMaps opened 10 months ago
Hey! Currently, you should use ActionQuestExecutor
. The 2nd parameter in constructor is a plugin name.
public class MyCustomQuest extends ActionQuestExecutor {
public MyCustomQuest(JavaPlugin plugin) {
super(plugin, "my_plugin_name");
}
// Event Handlers...
}
@GC-spigot can you update dev docs and add that plugin name parameter into example code?
Also in the dev docs under General API Methods, it says you should use a reward
method, which requires a user. It also mentions that you can obtain that user with CompletableFuture<Optional<User>> getUser(UUID)
, but there is no class provided where you should execute these methods. Even after decompiling, I can't find a getUser
method. I discovered that you can access the user cache with BattlePlugin.getPlugin().getUserCache()
and get or load users from there. However, since this is not documented I wanted to mention that here.
Describe the bug
The Developer API documentation (https://battlepass.advancedplugins.net/developer-api/developer-api-creating-your-own-quest-types) seems to be outdated. When working with the API, the docs say to extend ActionQuestExecuter, but this class seems to be deprecated.
My code:
Firstly the method shown on the website with just a single BattlePlugin parameter doesn't even exist, you need a second string parameter. What does this parameter mean? I have no idea.
Secondly the whole method is deprecated. Which do I use instead? I have no idea.
There is a ActionContainer class that looks promising, then you can call super.executionBuilder() No idea what this all does though. What do the arguments mean? Is this how I create my own Quest?
My code:
All in all, I just want the API documentation to be updated, as well as maybe releasing the JavaDocs so people know how to work with the API.
How to reproduce
.
Screenshots / Videos
No response
Server Log
No response