Skip to content

API Usage

Alessio Gravili edited this page Oct 10, 2021 · 25 revisions

Adding the API to your project

There's a nice tutorial here: https://jitpack.io/#AlessioGr/NotQuests/v1.5.8

Using the API

First, add NotQuests as depend: or softdepend: into you plugin.yml.

Then, access the instance with NotQuests.getInstance() and do whatever you want with it 😄

Registering your own Objectives

You can easily add your own Objectives to NotQuests (either directly or via the API) with, for example, NotQuests.getInstance().getObjectiveManager().registerObjective("jumpobjective", JumpObjective.class);

with JumpObjective extending "Objective" and being similar to all the other objective classes. Just copy the structure.

Only thing which is missing are commands & command completions. At the moment, they would manually need to be added to "ObjectivesAdminCommand".

Clone this wiki locally