-
Notifications
You must be signed in to change notification settings - Fork 4
Obtaining an API Instance
iso2013 edited this page May 24, 2018
·
2 revisions
Just cast the plugin object to the API instance. For example:
(This is just an example, you should, of course, check to ensure the plugin is loaded.)
public class ExamplePlugin extends JavaPlugin {
private IPacketEntityAPI instance;
public void onEnable() {
instance = (IPacketEntityAPI) Bukkit.getPluginManager().getPlugin("PacketEntityAPI");
}
}