Working on bridge commands

This commit is contained in:
DaMachinator 2018-02-07 23:45:56 -05:00 committed by Arcanitor
parent c139c3dc17
commit 57ab69a898
2 changed files with 20 additions and 1 deletions

View File

@ -1,7 +1,7 @@
package matterlink
import net.minecraftforge.common.config.Configuration
import java.io.File
import java.util.regex.Pattern
var cfg: MatterLinkConfig? = null
@ -9,10 +9,12 @@ class MatterLinkConfig() {
private val CATEGORY_RELAY_OPTIONS = "relay"
private val CATEGORY_FORMATTING = "formatting"
private val CATEGORY_CONNECTION = "connection"
private val CATEGORY_COMMAND = "command"
val relay: RelayOptions
val connect: ConnectOptions
val formatting: FormattingOptions
//val command: CommandOptions
data class RelayOptions(
val systemUser: String,
@ -33,6 +35,10 @@ class MatterLinkConfig() {
val gateway: String
)
data class CommandOptions(
val prefix: String
)
init {
MatterLink.logger.info("Reading bridge blueprints...")
val config = Configuration()
@ -66,6 +72,17 @@ class MatterLinkConfig() {
)
)
/*config.addCustomCategoryComment(CATEGORY_COMMAND,"User commands")
command = CommandOptions(
prefix = config.getString(
"commandPrefix",
CATEGORY_COMMAND,
"!",
"Prefix for MC bridge commands. Accepts a single non-alphanumeric character."
//Pattern.compile("[^0-9A-Za-z/]")
)
)*/
config.addCustomCategoryComment(CATEGORY_FORMATTING, "Formatting options: " +
"Available variables: {username}, {text}, {gateway}, {channel}, {protocol}, {username:antiping}")
formatting = FormattingOptions(

View File

@ -0,0 +1,2 @@
package matterlink.bridge.command