Should work now
This commit is contained in:
parent
3a9889ead7
commit
f36e77ed31
|
@ -44,4 +44,12 @@ object BridgeCommandRegistry {
|
|||
|
||||
val commandList: String
|
||||
get() = commandMap.keys.joinToString(separator = ", ")
|
||||
|
||||
fun reloadCommands() {
|
||||
commandMap.clear()
|
||||
registerAll(HelpCommand,PlayerListCommand,UptimeCommand)
|
||||
for (key : String in cfg!!.command.commandMapping.keys) {
|
||||
register(PassthroughCommand(key, cfg!!.command.commandMapping.get(key)!!))
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,9 +1,11 @@
|
|||
package matterlink.bridge.command
|
||||
|
||||
class PassthroughCommand(override val name: String) : IBridgeCommand {
|
||||
import matterlink.instance
|
||||
|
||||
class PassthroughCommand(override val name: String, val cmd: String) : IBridgeCommand {
|
||||
|
||||
override fun call(args: String): Boolean {
|
||||
return true
|
||||
return instance.commandSender.execute("$name $args",100)
|
||||
}
|
||||
|
||||
override val help: String = "No help available for this command."
|
||||
|
|
Loading…
Reference in New Issue