mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-13 06:30:13 +08:00
add Java API
This commit is contained in:
parent
cc4b497286
commit
0968487387
@ -12,7 +12,7 @@ import org.gradle.kotlin.dsl.DependencyHandlerScope
|
||||
object Versions {
|
||||
object Mirai {
|
||||
const val core = "0.32.0"
|
||||
const val console = "0.4.3"
|
||||
const val console = "0.4.4"
|
||||
const val consoleGraphical = "0.0.6"
|
||||
const val consoleWrapper = "0.2.0"
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
package net.mamoe.mirai.console.command;
|
||||
|
||||
public class JCommandManager {
|
||||
|
||||
private JCommandManager() {
|
||||
|
||||
}
|
||||
|
||||
public static CommandManager getInstance() {
|
||||
return CommandManager.INSTANCE;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package net.mamoe.mirai.console.plugins;
|
||||
|
||||
public class ConfigSectionFactory {
|
||||
|
||||
public static ConfigSection create(){
|
||||
return ConfigSection.Companion.create();
|
||||
}
|
||||
|
||||
}
|
@ -74,6 +74,8 @@ object CommandManager : Job by {
|
||||
}
|
||||
}
|
||||
|
||||
fun register(pluginBase:PluginBase, command: Command) = CommandManager.register(pluginBase.asCommandOwner(),command)
|
||||
|
||||
fun unregister(command: Command) {
|
||||
command.alias.forEach {
|
||||
registeredCommand.remove(it)
|
||||
|
@ -14,7 +14,9 @@ package net.mamoe.mirai.console.plugins
|
||||
import kotlinx.coroutines.*
|
||||
import net.mamoe.mirai.console.MiraiConsole
|
||||
import net.mamoe.mirai.console.command.Command
|
||||
import net.mamoe.mirai.console.command.CommandManager
|
||||
import net.mamoe.mirai.console.command.CommandSender
|
||||
import net.mamoe.mirai.console.command.JCommandManager
|
||||
import net.mamoe.mirai.console.events.EventListener
|
||||
import net.mamoe.mirai.console.scheduler.PluginScheduler
|
||||
import net.mamoe.mirai.console.scheduler.SchedulerTaskManagerInstance
|
||||
|
Loading…
Reference in New Issue
Block a user