This is the API documentation for the QAPlugin. You are required to use the premium plugin as a dependency. There are two ways of using the API:
Hooking into QAPlugin from another plugin
This means you have your own plugin and you want to hook into QAPlugin to add a
question or manipulate the plugin. It is the perfect choice for when you want to add questions to let your users ask for information such as "How many tiers do I have?", "What is my rank?" , etc ...
Creating a plug-and-play module for QAPlugin
This means you want to create a module "JAR" file that the user has to place in the /plugins/QAPlugin/modules/ folder of the plugin. Modules are good if you need
to add functionalities to the QAPlugin that do not require commands and doesn't hook into other plugins.
It is the perfect choice for when you want to add questions that only use online API's, simple Bukkit interaction or when you do not have the ability to change the source code of a plugin you want.
to hook into.
What can you do with the API?
If you are familiar with the plugin you know that there are two main functionalities
Create local questions
Local questions are very simple questions. They work by matching words, counting how many matched and returning a response. The advantages are that they are fast, can have meta information (such as priority, required permission, ...) but are limited in pattern matching.
If you need to create a question that is simple without variable data, it is best to choose this.
Create API.ai questions
These are fancy questions. They are send to an online machine learning framework owned by Google (says enough) and allow for better pattern matching, context related conversations and online training so the questions can be matched better in the future. The disadvantage of this is that it requires a request to be send what can take about 100ms.
It is recommended to prioritize the use of these types of questions.
Get and set player data
This allows you to get and set player data. The plugin has a key-value database for each user to store information like a name, birthday, .. or whatever you can think of.
Get and set global data
This is a bit the same as the player data. The only difference is this is globally for the server. These are usually settings or other things that are not player specific.