QuestCreator - Developpers API
Table of contents :
Commands and permissions
Create a quest
Basics : variables
Basics : preconditions
Basics : quest settings
Basics : quest requirements
Basics : quest rewards
Basics : quest flow
Basics : quest flow - tasks
Basics : quest flow - objectives
> Developpers API
This is a general overview of how it works because way I'm too lazy to create an actual documentation.
Note : everything is very intuitive IMO. Just follow your instinct, yes ?
You just need to import the jar file as a lib. You might need to import PyrCore as well.
getGUIManager() - returns the GUIManager (the one that opens with /quest)
getQuests() - returns a list of QuestSettings
getQuest(String id) - return a quest with the specified id, or null if not exists
getActiveQuests(String id) - return a list of active quests with the specified id
getActiveQuest(UUID uuid) - return an active quest (the UUID is the one from the quest, not from a player)
getAwaitingQuest(Player player) - get the awaiting coop quest the playing is waiting for, or null if not exists
The rest of the methods should most likely not be used, except maybe the settings getters or getCommand().addPattern(CommandPattern pattern) if you plan to register any other subcommands.
User.from(OfflinePlayer or UUID).getPluginData(QuestCreatorUser.class) - returns the user data for QuestCreator, you can do plenty of stuff with that
be.pyrrh4.questcreator.util.QuestUtils - contains a lot of useful static methods
That should do it. If you have any question and you reaaally don't find out by yourself, just ask in the plugin thread or PM me.
be.pyrrh4.questcreator.api.event.QuestNextElementEvent - triggered when an element is over in a quest.
be.pyrrh4.questcreator.api.event.QuestPauseEvent - triggered when a quest is paused, most likely when a player disconnects.
be.pyrrh4.questcreator.api.event.QuestResumeEvent, cancellable - triggered when a quest is resumed, most likely when a player reconnects.
be.pyrrh4.questcreator.api.event.QuestStartEvent, cancellable - triggered when a quest is starting, just after all the requirements/preconditions checks.
be.pyrrh4.questcreator.api.event.QuestStopEvent - triggered when a quest is over.