Subcommand perm group

This commit is contained in:
Norbi Peti 2019-04-15 15:37:40 +02:00
parent 87189eb1ad
commit aec9682b2a
4 changed files with 9 additions and 3 deletions

View file

@ -12,7 +12,6 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="ButtonCore (1) (com.github.TBMCPlugins.ButtonCore)" />
<orderEntry type="module" module-name="ButtonCore (1) (com.github.TBMCPlugins.ButtonCore)" />
<orderEntry type="library" name="Maven: org.reflections:reflections:0.9.10" level="project" />
<orderEntry type="library" name="Maven: com.google.code.findbugs:annotations:2.0.1" level="project" />
<orderEntry type="library" name="Maven: org.javassist:javassist:3.20.0-GA" level="project" />

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" version="4">
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />

View file

@ -46,10 +46,17 @@ public abstract class Command2<TC extends ICommand2, TP extends Command2Sender>
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Subcommand {
String MOD_GROUP = "mod";
/**
* Help text to show players. A usage message will be also shown below it.
*/
String[] helpText() default {};
/**
* The main permission which allows using this command (individual access can be still granted with "thorpe.command.X").
* Used to be "tbmc.admin"
*/
String permGroup() default ""; //TODO
}
@Target(ElementType.PARAMETER)

View file

@ -2,7 +2,7 @@ package buttondevteam.lib.chat;
import buttondevteam.lib.architecture.ButtonPlugin;
public class ICommand2MC extends ICommand2<Command2MCSender> {
public abstract class ICommand2MC extends ICommand2<Command2MCSender> {
public ICommand2MC() {
super(ButtonPlugin.getCommand2MC());
}