Disable test by default, config desc.
#79 Fixed IntelliJ compiler version...
This commit is contained in:
parent
dea1a46f55
commit
34637ac536
7 changed files with 32 additions and 33 deletions
|
@ -9,28 +9,16 @@
|
|||
<outputRelativeToContentRoot value="true" />
|
||||
<processorPath useClasspath="false">
|
||||
<entry name="$PROJECT_DIR$/ButtonProcessor/target/classes" />
|
||||
<entry name="$MAVEN_REPOSITORY$/org/spigotmc/spigot-api/1.12.2-R0.1-SNAPSHOT/spigot-api-1.12.2-R0.1-20180712.012057-156.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/org/yaml/snakeyaml/1.21/snakeyaml-1.21.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/org/spigotmc/spigot-api/1.12.2-R0.1-SNAPSHOT/spigot-api-1.12.2-R0.1-SNAPSHOT.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/commons-lang/commons-lang/2.6/commons-lang-2.6.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/com/google/guava/guava/21.0/guava-21.0.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/net/md-5/bungeecord-chat/1.12-SNAPSHOT/bungeecord-chat-1.12-20180712.114550-97.jar" />
|
||||
</processorPath>
|
||||
<module name="BuildConfigUpdater" />
|
||||
</profile>
|
||||
<profile name="Annotation profile for ButtonProcessor" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<processorPath useClasspath="false">
|
||||
<entry name="$PROJECT_DIR$/ButtonProcessor/target/classes" />
|
||||
<entry name="$MAVEN_REPOSITORY$/org/spigotmc/spigot-api/1.12.2-R0.1-SNAPSHOT/spigot-api-1.12.2-R0.1-20180712.012057-156.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/commons-lang/commons-lang/2.6/commons-lang-2.6.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/net/md-5/bungeecord-chat/1.12-SNAPSHOT/bungeecord-chat-1.12-20180712.114550-97.jar" />
|
||||
</processorPath>
|
||||
<module name="ButtonProcessor" />
|
||||
</profile>
|
||||
<profile name="Annotation profile for ButtonCore Parent" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
|
@ -44,9 +32,11 @@
|
|||
<entry name="$MAVEN_REPOSITORY$/net/bytebuddy/byte-buddy-agent/1.10.1/byte-buddy-agent-1.10.1.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.10/lombok-1.18.10.jar" />
|
||||
<entry name="$PROJECT_DIR$/ButtonProcessor/target/classes" />
|
||||
<entry name="$MAVEN_REPOSITORY$/org/spigotmc/spigot-api/1.12.2-R0.1-SNAPSHOT/spigot-api-1.12.2-R0.1-20180712.012057-156.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/org/yaml/snakeyaml/1.21/snakeyaml-1.21.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/org/spigotmc/spigot-api/1.12.2-R0.1-SNAPSHOT/spigot-api-1.12.2-R0.1-SNAPSHOT.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/commons-lang/commons-lang/2.6/commons-lang-2.6.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/com/google/guava/guava/21.0/guava-21.0.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/com/google/code/gson/gson/2.8.0/gson-2.8.0.jar" />
|
||||
<entry name="$MAVEN_REPOSITORY$/net/md-5/bungeecord-chat/1.12-SNAPSHOT/bungeecord-chat-1.12-20180712.114550-97.jar" />
|
||||
</processorPath>
|
||||
|
@ -54,19 +44,19 @@
|
|||
</profile>
|
||||
</annotationProcessing>
|
||||
<bytecodeTargetLevel>
|
||||
<module name="BuildConfigUpdater" target="1.5" />
|
||||
<module name="BuildConfigUpdater" target="8" />
|
||||
<module name="ButtonCore" target="1.5" />
|
||||
<module name="ButtonCore (1) (com.github.TBMCPlugins.ButtonCore)" target="13" />
|
||||
<module name="ButtonProcessor" target="1.5" />
|
||||
<module name="ButtonCore (1) (com.github.TBMCPlugins.ButtonCore)" target="11" />
|
||||
<module name="ButtonProcessor" target="8" />
|
||||
<module name="ChunkArchive" target="1.8" />
|
||||
<module name="CorePOM" target="13" />
|
||||
<module name="CorePOM" target="11" />
|
||||
<module name="RandomTeleport" target="1.8" />
|
||||
</bytecodeTargetLevel>
|
||||
</component>
|
||||
<component name="JavacSettings">
|
||||
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
||||
<module name="BuildConfigUpdater" options="" />
|
||||
<module name="ButtonCore (1) (com.github.TBMCPlugins.ButtonCore)" options="--enable-preview" />
|
||||
<module name="ButtonCore (1) (com.github.TBMCPlugins.ButtonCore)" options="" />
|
||||
<module name="ButtonProcessor" options="-proc:none" />
|
||||
</option>
|
||||
</component>
|
||||
|
|
|
@ -18,8 +18,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="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" />
|
||||
|
|
|
@ -23,7 +23,10 @@ public class ComponentCommand extends ICommand2MC {
|
|||
getManager().addParamConverter(Plugin.class, arg -> Bukkit.getPluginManager().getPlugin(arg), "Plugin not found!");
|
||||
}
|
||||
|
||||
@Subcommand
|
||||
@Subcommand(helpText = {
|
||||
"Enable component",
|
||||
"Temporarily enables a component. If you want to permanently enable a component, change it's 'enabled' config option.\""
|
||||
})
|
||||
public boolean enable(CommandSender sender, Plugin plugin, String component) {
|
||||
if (plugin instanceof ButtonPlugin)
|
||||
((ButtonPlugin) plugin).justReload();
|
||||
|
@ -32,12 +35,18 @@ public class ComponentCommand extends ICommand2MC {
|
|||
return enable_disable(sender, plugin, component, true);
|
||||
}
|
||||
|
||||
@Subcommand
|
||||
@Subcommand(helpText = {
|
||||
"Disable component",
|
||||
"Temporarily disables a component. If you want to permanently disable a component, change it's 'enabled' config option."
|
||||
})
|
||||
public boolean disable(CommandSender sender, Plugin plugin, String component) {
|
||||
return enable_disable(sender, plugin, component, false);
|
||||
}
|
||||
|
||||
@Subcommand
|
||||
@Subcommand(helpText = {
|
||||
"List components",
|
||||
"Lists all of the registered Chroma components"
|
||||
})
|
||||
public boolean list(CommandSender sender, @Command2.OptionalArg String plugin) {
|
||||
sender.sendMessage("§6List of components:");
|
||||
Component.getComponents().values().stream().filter(c -> plugin == null || c.getPlugin().getName().equalsIgnoreCase(plugin)) //If plugin is null, don't check
|
||||
|
|
|
@ -71,7 +71,7 @@ public class MainPlugin extends ButtonPlugin {
|
|||
}
|
||||
|
||||
public ConfigData<Boolean> test() {
|
||||
return getIConfig().getData("test", true);
|
||||
return getIConfig().getData("test", false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -247,7 +247,7 @@ public abstract class Command2<TC extends ICommand2, TP extends Command2Sender>
|
|||
|
||||
public abstract void registerCommand(TC command);
|
||||
|
||||
protected void registerCommand(TC command, char commandChar) {
|
||||
protected void registerCommand(TC command, @SuppressWarnings("SameParameterValue") char commandChar) {
|
||||
val path = command.getCommandPath();
|
||||
int x = path.indexOf(' ');
|
||||
val mainPath = commandChar + path.substring(0, x == -1 ? path.length() : x);
|
||||
|
@ -277,7 +277,7 @@ public abstract class Command2<TC extends ICommand2, TP extends Command2Sender>
|
|||
if (ht != null) {
|
||||
val subcommand = commandChar + path + //Add command path (class name by default)
|
||||
(method.getName().equals("def") ? "" : " " + method.getName().replace('_', ' ').toLowerCase()); //Add method name, unless it's 'def'
|
||||
ht = getHelpText(method, ht, subcommand);
|
||||
ht = getParameterHelp(method, ht, subcommand);
|
||||
subcommands.put(subcommand, new SubcommandData<>(method, command, ht)); //Result of the above (def) is that it will show the help text
|
||||
scmdHelpList.add(subcommand);
|
||||
nosubs = false;
|
||||
|
@ -299,7 +299,7 @@ public abstract class Command2<TC extends ICommand2, TP extends Command2Sender>
|
|||
}
|
||||
}
|
||||
|
||||
private String[] getHelpText(Method method, String[] ht, String subcommand) {
|
||||
private String[] getParameterHelp(Method method, String[] ht, String subcommand) {
|
||||
val str = method.getDeclaringClass().getResourceAsStream("/commands.yml");
|
||||
if (str == null)
|
||||
TBMCCoreAPI.SendException("Error while getting command data!", new Exception("Resource not found!"));
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<module name="ButtonProcessor" />
|
||||
</modules>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_13_PREVIEW">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
|
|
|
@ -95,10 +95,12 @@
|
|||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<release>13</release>
|
||||
<release>11</release>
|
||||
<!--
|
||||
<compilerArgs>
|
||||
<arg>--enable-preview</arg>
|
||||
<arg>HYPHENHYPHENenable-preview</arg>
|
||||
</compilerArgs>
|
||||
-->
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
|
Loading…
Reference in a new issue