Plugin Info File
Getting data from the plugin info file using code is very simple. Use the getPluginInfoFile
method within your main class. Here's an example of setting a namespace variable in the main class:
public class ExamplePlugin extends CottonPlugin {
public static String NAMESPACE;
@Override
public void onInitialize() {
// Plugin startup logic
NAMESPACE = getPluginInfoFile().getNamespace();
}
}
Last updated