mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-10 20:15:03 +08:00
plugin supporting
This commit is contained in:
parent
ead002d27f
commit
d67a858548
@ -74,7 +74,9 @@ class PluginDescription(
|
||||
lowercaseLine.startsWith("info") || lowercaseLine.startsWith("information") -> {
|
||||
info = line.substringAfter(":").trim()
|
||||
}
|
||||
lowercaseLine.startsWith("path") || lowercaseLine.startsWith("basepath") -> {
|
||||
lowercaseLine.startsWith("main") || lowercaseLine.startsWith("path") || lowercaseLine.startsWith(
|
||||
"basepath"
|
||||
) -> {
|
||||
basePath = line.substringAfter(":").trim()
|
||||
}
|
||||
lowercaseLine.startsWith("version") || lowercaseLine.startsWith("ver") -> {
|
||||
|
Binary file not shown.
15
mirai-plugins/image-sender/image-sender.iml
Normal file
15
mirai-plugins/image-sender/image-sender.iml
Normal file
@ -0,0 +1,15 @@
|
||||
<?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>
|
@ -0,0 +1,15 @@
|
||||
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");
|
||||
}
|
||||
}
|
5
mirai-plugins/image-sender/src/main/resources/plugin.yml
Normal file
5
mirai-plugins/image-sender/src/main/resources/plugin.yml
Normal file
@ -0,0 +1,5 @@
|
||||
name: ImageSender
|
||||
main: net.mamoe.mirai.imageplugin.ImagePluginMain
|
||||
version: 1.0.0
|
||||
author: mamoe
|
||||
info: a demo plugin of mirai
|
12
mirai-plugins/mirai-plugins.iml
Normal file
12
mirai-plugins/mirai-plugins.iml
Normal file
@ -0,0 +1,12 @@
|
||||
<?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>
|
Loading…
Reference in New Issue
Block a user