You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NJDaeger edited this page Jun 1, 2017
·
2 revisions
Implementing CoalesceCore into your plugin
Adding it as a dependency in your plugin yml
To begin, we will always want to make sure CoalesceCore is inside the plugin.yml to assure the server, and your plugin, that the correct dependencies are loaded.
This is the plugin.yml for our plugin TextToBlock. If you refer down to the "depend" line in the TextToBlock plugin.yml, you will see CoalesceCore. If we were to try to run the server without CoalesceCore installed, then this plugin, and any other plugins that depend on CoalesceCore, would not start.
Unlike a normal Bukkit/Spigot Plugin, a plugin made with CoalesceCore cannot extend JavaPlugin in its main class. Instead of using JavaPlugin, we use CoPlugin.
package com.coalesce.example;
import com.coalesce.plugin.CoPlugin;
public final class Main extends CoPlugin {
}
Rather than the usual onEnable, onDisable, and onLoad; we have onPluginEnable, onPluginDisable, and onPluginLoad. They all function the exact same way as their counterpart.