blob: 13d716772a354fc609184d6450590ba066ff4b53 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package io.dico.dicore.command.annotation;
import io.dico.dicore.command.IContextFilter;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* If this annotation is not present, inheriting permissions is default.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface RequirePermissions {
/**
* Any permissions that must be present on the sender
*
* @return an array of permission nodes
*/
String[] value();
/**
* Whether permissions should (also) be inherited from the parent.
* This uses {@link IContextFilter#INHERIT_PERMISSIONS}
* This is true by default.
*
* @return true if permissions should be inherited.
*/
boolean inherit() default true;
}
|