mirror of
https://hub.spigotmc.org/stash/scm/spigot/plugin-annotations.git
synced 2025-08-05 16:48:43 +00:00
Update javadocs. Fix some minor formatting issues.
This commit is contained in:
parent
b0b94aee56
commit
1c5f2a077f
18 changed files with 45 additions and 7 deletions
|
@ -15,7 +15,6 @@ import java.lang.annotation.Target;
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
@Repeatable(Commands.class)
|
@Repeatable(Commands.class)
|
||||||
public @interface Command {
|
public @interface Command {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This command's name.
|
* This command's name.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -11,7 +11,6 @@ import java.lang.annotation.Target;
|
||||||
* <p>
|
* <p>
|
||||||
* Represents a list of this plugin's registered command(s).
|
* Represents a list of this plugin's registered command(s).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Documented
|
@Documented
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
|
|
@ -15,5 +15,8 @@ import java.lang.annotation.Target;
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
@Repeatable(DependsOn.class)
|
@Repeatable(DependsOn.class)
|
||||||
public @interface Dependency {
|
public @interface Dependency {
|
||||||
|
/**
|
||||||
|
* A plugin that is required to be present in order for this plugin to load.
|
||||||
|
*/
|
||||||
String plugin();
|
String plugin();
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,5 +16,4 @@ import java.lang.annotation.Target;
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
public @interface DependsOn {
|
public @interface DependsOn {
|
||||||
Dependency[] value() default {};
|
Dependency[] value() default {};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,5 +17,8 @@ import java.lang.annotation.Target;
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
@Repeatable(LoadBeforePlugins.class)
|
@Repeatable(LoadBeforePlugins.class)
|
||||||
public @interface LoadBefore {
|
public @interface LoadBefore {
|
||||||
|
/**
|
||||||
|
* A plugin that should be loaded after your plugin
|
||||||
|
*/
|
||||||
String plugin();
|
String plugin();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defines a list of plugin to load before this plugin
|
* Defines a list of plugin to load after this plugin
|
||||||
*/
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
|
|
|
@ -18,5 +18,8 @@ import java.lang.annotation.Target;
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
@Repeatable(SoftDependsOn.class)
|
@Repeatable(SoftDependsOn.class)
|
||||||
public @interface SoftDependency {
|
public @interface SoftDependency {
|
||||||
|
/**
|
||||||
|
* A plugin that is required in order for this plugin to have full functionality.
|
||||||
|
*/
|
||||||
String plugin();
|
String plugin();
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,6 @@ import java.lang.annotation.Target;
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
public @interface SoftDependsOn {
|
public @interface SoftDependsOn {
|
||||||
|
|
||||||
SoftDependency[] value() default {};
|
SoftDependency[] value() default {};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,14 @@ import java.lang.annotation.Target;
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
public @interface ChildPermission {
|
public @interface ChildPermission {
|
||||||
|
/**
|
||||||
|
* If true, this child node will inherit the parent {@link Permission}'s permission.
|
||||||
|
* If false, this child node inherits the inverse parent permission.
|
||||||
|
*/
|
||||||
boolean inherit() default true;
|
boolean inherit() default true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name of the child permission.
|
||||||
|
*/
|
||||||
String name();
|
String name();
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ public @interface Permission {
|
||||||
PermissionDefault defaultValue() default PermissionDefault.OP;
|
PermissionDefault defaultValue() default PermissionDefault.OP;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This permission's child nodes
|
* This permission's child nodes ({@link ChildPermission})
|
||||||
*/
|
*/
|
||||||
ChildPermission[] children() default {};
|
ChildPermission[] children() default {};
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,6 @@ import java.lang.annotation.Target;
|
||||||
* <p>
|
* <p>
|
||||||
* Represents a list of this plugin's registered name.
|
* Represents a list of this plugin's registered name.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Documented
|
@Documented
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
|
|
|
@ -16,6 +16,9 @@ import java.lang.annotation.Target;
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
public @interface Description {
|
public @interface Description {
|
||||||
|
/**
|
||||||
|
* A human friendly description of the functionality this plugin provides.
|
||||||
|
*/
|
||||||
String desc();
|
String desc();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,5 +18,10 @@ import java.lang.annotation.Target;
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
public @interface LoadOn {
|
public @interface LoadOn {
|
||||||
|
/**
|
||||||
|
* Explicitly state when the plugin should be loaded.
|
||||||
|
* If not defined, will default to {@link PluginLoadOrder#POSTWORLD}.
|
||||||
|
* See {@link PluginLoadOrder}
|
||||||
|
*/
|
||||||
PluginLoadOrder loadOn();
|
PluginLoadOrder loadOn();
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,5 +16,8 @@ import java.lang.annotation.Target;
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
public @interface LogPrefix {
|
public @interface LogPrefix {
|
||||||
|
/**
|
||||||
|
* The name to use when logging to console instead of the plugin's name.
|
||||||
|
*/
|
||||||
String prefix();
|
String prefix();
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,12 @@ import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents the required elements needed to register a Bukkit plugin.
|
||||||
|
* This <i>must</i> be placed in the main class of your plugin
|
||||||
|
* (i.e. the class that extends {@link org.bukkit.plugin.java.JavaPlugin}
|
||||||
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
|
|
|
@ -16,5 +16,8 @@ import java.lang.annotation.Target;
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
public @interface Website {
|
public @interface Website {
|
||||||
|
/**
|
||||||
|
* The url to the website where a user can download this plugin.
|
||||||
|
*/
|
||||||
String url();
|
String url();
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,5 +18,8 @@ import java.lang.annotation.Target;
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
@Repeatable(Authors.class)
|
@Repeatable(Authors.class)
|
||||||
public @interface Author {
|
public @interface Author {
|
||||||
|
/**
|
||||||
|
* The name of the person who developed this plugin.
|
||||||
|
*/
|
||||||
String name();
|
String name();
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,9 @@ import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents a list of author(s) for this plugin.
|
||||||
|
*/
|
||||||
@Documented
|
@Documented
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
|
|
Loading…
Add table
Reference in a new issue