Skip to content

Initializing API

Shane Bee edited this page Apr 4, 2020 · 2 revisions

To get started with using the Virtual Furnace API, we're going to create a new instance of this.
It's pretty easy.

Here is a simple example:

public class TesterPlugin extends JavaPlugin {

    // Create a instance of the API
    private VirtualFurnaceAPI virtualFurnaceAPI;

    @Override
    public void onEnable() {
        // Instantiate that instance of the API in your plugin's onEnable method
        this.virtualFurnaceAPI = new VirtualFurnaceAPI(this);
    }

    // Optionally create a getter, if we wish to use the API elsewhere in your plugin
    public VirtualFurnaceAPI getVirtualFurnaceAPI() {
        return virtualFurnaceAPI;
    }
    
}

Don't get much easier than that!

Clone this wiki locally