Question: Using the API
LJack2k opened this issue ยท 2 comments
This is not a feature request or something. I am trying to make my plugin that interacts with BetterQuesting. There are some issues on our server that is running out of hand and only getting worse. Players not being able to leave parties. Quest Progress database growing having almost 1000 players in it, and makes starting the server up a pain in the ass.
So my goal is to make a helper plugin that can clean up the quest progress database and commands that can be used to manage parties. I know you stated on the wiki you don't want to manage parties but I'm having to much issues on the server that makes me edit the json file manualy everytime somebody bugs out and cant leave the party.
So to come to the real question. What is the best way to interact with the BetterQuesting mod? I have checked how BetterQuesting Standard Expansion interacts with BetterQuesting. The depency used is the BetterQuesting-core.jar. But I'm really struggling with how I should do this. I'm not very good with making plugins. I made a few Sponge plugins, but this one is going to be a Bukkit plugin. Can you tell me what the right API's are that I should use? And maybe a small/short example to get me on my way?
Sorry but you're probably going to have a hard time getting a Bukkit plugin talking to a Forge mod API. There is an API jar you can download into your workspace to get all the interfaces and hooks you need. Usually you'd make calls like QuestAPI.getApi(ApiReference.PARTY_DB)
. I can't remember the exact function name but StandardExpansion uses it in task types if you need a reference
I've made some good progress so far. I made a plugin that can kick people from party's when you have the right permissions and a command to show the number lives (first command to see if I can interact at all) from yourself or any other player. I am using the
Integer lives = LifeDatabase.INSTANCE.getLives(playerUUID);
IParty party = PartyManager.INSTANCE.getUserParty(playerUUID);
Wich work awesome. Currently working on the quest progress cleanup. Checking with Essentials the last login time and if that's longer then a certain period of time I will remove all quest progress.