Commit d67a8585 authored by jiahua.liu's avatar jiahua.liu

plugin supporting

parent ead002d2
...@@ -74,7 +74,9 @@ class PluginDescription( ...@@ -74,7 +74,9 @@ class PluginDescription(
lowercaseLine.startsWith("info") || lowercaseLine.startsWith("information") -> { lowercaseLine.startsWith("info") || lowercaseLine.startsWith("information") -> {
info = line.substringAfter(":").trim() info = line.substringAfter(":").trim()
} }
lowercaseLine.startsWith("path") || lowercaseLine.startsWith("basepath") -> { lowercaseLine.startsWith("main") || lowercaseLine.startsWith("path") || lowercaseLine.startsWith(
"basepath"
) -> {
basePath = line.substringAfter(":").trim() basePath = line.substringAfter(":").trim()
} }
lowercaseLine.startsWith("version") || lowercaseLine.startsWith("ver") -> { lowercaseLine.startsWith("version") || lowercaseLine.startsWith("ver") -> {
......
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="KotlinJavaRuntime (3)" level="project" />
<orderEntry type="module" module-name="mirai-console_main" />
</component>
</module>
\ No newline at end of file
package net.mamoe.mirai.imageplugin;
import net.mamoe.mirai.plugin.PluginBase;
public class ImagePluginMain extends PluginBase {
@Override
public void onLoad() {
System.out.println("Loaded");
}
@Override
public void onEnable() {
System.out.println("Enabled");
}
}
name: ImageSender
main: net.mamoe.mirai.imageplugin.ImagePluginMain
version: 1.0.0
author: mamoe
info: a demo plugin of mirai
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="KotlinJavaRuntime" level="project" />
</component>
</module>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment