Annotation Interface Plugin
Marks a org.bukkit.plugin.java.JavaPlugin subclass or
net.md_5.bungee.api.plugin.Plugin subclass as an plugin.
To define your main class as an plugin simply annotate the class with:
@Plugin(name = "PluginName", version = "1.0.0-SNAPSHOT")
Each attribute in this annotation is mapped to an key in tha yaml file.
Because this annotation can be applied to Spigot and BungeeCord plugins
there are the extension named spigot() and
bungee(). To apply specific values for eg. a Spigot plugin.
To use these apply it like that:
@Plugin(name = "PluginName", version = "1.0.0-SNAPSHOT",
spigot = @Spigot(website = "http://foo.bar"))
The class annotated with @Plugin is automatically used as main-class for
the yaml file. You can also use public static nested classes or a
class that is in any way a child of
org.bukkit.plugin.java.JavaPlugin or
net.md_5.bungee.api.plugin.Plugin.
If you code a plugin that is usable in Spigot and BungeeCord simply
annotate both main classes with @Plugin.- See Also:
-
Nested Class Summary
Nested Classes -
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionBungeeCord specific settings.The dependencies of the plugin.The description of the plugin.Spigot specific settings.The version of the plugin.
-
Element Details
-
name
String nameThe name of the plugin.- Returns:
- The name of the plugin
-
-
-
version
String versionThe version of the plugin.- Returns:
- The version of the plugin
- Default:
- ""
-
description
String descriptionThe description of the plugin.- Returns:
- The description of the plugin
- Default:
- ""
-
dependencies
Dependency[] dependenciesThe dependencies of the plugin.- Returns:
- The dependencies of the plugin
- See Also:
- Default:
- {}
-
spigot
Plugin.Spigot spigotSpigot specific settings.- Returns:
- The specific settings
- Default:
- @eu.hexagonmc.spigot.annotation.plugin.Plugin.Spigot(set=false)
-
bungee
Plugin.Bungee bungeeBungeeCord specific settings.- Returns:
- The specific settings
- Default:
- @eu.hexagonmc.spigot.annotation.plugin.Plugin.Bungee(set=false)
-