How do i create a plugin dependency?

I am trying to create a sub-plugin, however, I cannot figure out how to work the Dependency annotation. However, eclipse keeps giving me an error, “The value for annotation attribute Plugin.dependencies must be some @org.spongepowered.api.plugin.Dependency annotation”

To be honest, I have no idea what this means in the slightest :s

Can anybody help?

Here’s an example from one of my plugins

dependencies = {@Dependency(id = "Updatifier", optional = true), @Dependency(id = "", version = "0.2.5")}

Specifically, add it to your @Plugin annotation, like this:

@Plugin(id = "myplugin", ..., dependencies = {@Dependency(id = "Updatifier", optional = true), @Dependency(id  = "", version = "0.2.5")}
1 Like