Working on bridge commands
This commit is contained in:
parent
c139c3dc17
commit
57ab69a898
|
@ -1,7 +1,7 @@
|
||||||
package matterlink
|
package matterlink
|
||||||
|
|
||||||
import net.minecraftforge.common.config.Configuration
|
import net.minecraftforge.common.config.Configuration
|
||||||
import java.io.File
|
import java.util.regex.Pattern
|
||||||
|
|
||||||
var cfg: MatterLinkConfig? = null
|
var cfg: MatterLinkConfig? = null
|
||||||
|
|
||||||
|
@ -9,10 +9,12 @@ class MatterLinkConfig() {
|
||||||
private val CATEGORY_RELAY_OPTIONS = "relay"
|
private val CATEGORY_RELAY_OPTIONS = "relay"
|
||||||
private val CATEGORY_FORMATTING = "formatting"
|
private val CATEGORY_FORMATTING = "formatting"
|
||||||
private val CATEGORY_CONNECTION = "connection"
|
private val CATEGORY_CONNECTION = "connection"
|
||||||
|
private val CATEGORY_COMMAND = "command"
|
||||||
|
|
||||||
val relay: RelayOptions
|
val relay: RelayOptions
|
||||||
val connect: ConnectOptions
|
val connect: ConnectOptions
|
||||||
val formatting: FormattingOptions
|
val formatting: FormattingOptions
|
||||||
|
//val command: CommandOptions
|
||||||
|
|
||||||
data class RelayOptions(
|
data class RelayOptions(
|
||||||
val systemUser: String,
|
val systemUser: String,
|
||||||
|
@ -33,6 +35,10 @@ class MatterLinkConfig() {
|
||||||
val gateway: String
|
val gateway: String
|
||||||
)
|
)
|
||||||
|
|
||||||
|
data class CommandOptions(
|
||||||
|
val prefix: String
|
||||||
|
)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
MatterLink.logger.info("Reading bridge blueprints...")
|
MatterLink.logger.info("Reading bridge blueprints...")
|
||||||
val config = Configuration()
|
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: " +
|
config.addCustomCategoryComment(CATEGORY_FORMATTING, "Formatting options: " +
|
||||||
"Available variables: {username}, {text}, {gateway}, {channel}, {protocol}, {username:antiping}")
|
"Available variables: {username}, {text}, {gateway}, {channel}, {protocol}, {username:antiping}")
|
||||||
formatting = FormattingOptions(
|
formatting = FormattingOptions(
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
package matterlink.bridge.command
|
||||||
|
|
Loading…
Reference in New Issue