diff --git a/1.10.2/src/main/kotlin/matterlink/EventHandler.kt b/1.10.2/src/main/kotlin/matterlink/EventHandler.kt index e260fc1..0b7600b 100644 --- a/1.10.2/src/main/kotlin/matterlink/EventHandler.kt +++ b/1.10.2/src/main/kotlin/matterlink/EventHandler.kt @@ -60,7 +60,7 @@ object EventHandler { val sender = when { e.sender is DedicatedServer -> cfg.relay.systemUser e.sender is TileEntityCommandBlock -> "CommandBlock" - else -> e.sender.name + else -> e.sender.name } val args = e.parameters.joinToString(" ") val type = when { diff --git a/1.11.2/build.gradle b/1.11.2/build.gradle index 418290a..f410813 100644 --- a/1.11.2/build.gradle +++ b/1.11.2/build.gradle @@ -1,4 +1,3 @@ - buildscript { repositories { jcenter() @@ -24,7 +23,7 @@ sourceCompatibility = targetCompatibility = '1.8' dependencies { compile project(':core') - compile group: "net.shadowfacts", name: "Forgelin", version: project.forgelin_version + compile group: "net.shadowfacts", name: "Forgelin", version: project.forgelin_version } shadowJar { @@ -55,16 +54,16 @@ compileKotlin.doFirst { from("src/templates/kotlin/matterlink/Constants.kt") into(target) } - ant.replaceregexp(match:'@MODVERSION@', replace: project.mod_version, flags:'g', byline:true) { + ant.replaceregexp(match: '@MODVERSION@', replace: project.mod_version, flags: 'g', byline: true) { fileset(dir: target, includes: 'Constants.kt') } - ant.replaceregexp(match:'@MCVERSION@', replace: project.mc_version, flags:'g', byline:true) { + ant.replaceregexp(match: '@MCVERSION@', replace: project.mc_version, flags: 'g', byline: true) { fileset(dir: target, includes: 'Constants.kt') } - ant.replaceregexp(match:'@FORGELIN-VERSION@', replace: project.forgelin_version, flags:'g', byline:true) { + ant.replaceregexp(match: '@FORGELIN-VERSION@', replace: project.forgelin_version, flags: 'g', byline: true) { fileset(dir: target, includes: 'Constants.kt') } - ant.replaceregexp(match:'@FORGE-VERSION@', replace: project.forge_version, flags:'g', byline:true) { + ant.replaceregexp(match: '@FORGE-VERSION@', replace: project.forge_version, flags: 'g', byline: true) { fileset(dir: target, includes: 'Constants.kt') } } @@ -95,7 +94,7 @@ sourceJar { from sourceSets.main.allSource // copy everything else except the mcmod.info - from (project(":core").sourceSets.main.allSource) { + from(project(":core").sourceSets.main.allSource) { exclude 'mcmod.info' } } diff --git a/1.12.2/build.gradle b/1.12.2/build.gradle index 5a90ecf..2e7c70c 100644 --- a/1.12.2/build.gradle +++ b/1.12.2/build.gradle @@ -1,4 +1,3 @@ - buildscript { repositories { jcenter() @@ -81,7 +80,7 @@ sourceJar { from sourceSets.main.allSource // copy everything else except the mcmod.info - from (project(":core").sourceSets.main.allSource) { + from(project(":core").sourceSets.main.allSource) { exclude 'mcmod.info' } } diff --git a/1.7.10/build.gradle b/1.7.10/build.gradle index 87d7310..304edbe 100644 --- a/1.7.10/build.gradle +++ b/1.7.10/build.gradle @@ -1,4 +1,3 @@ - buildscript { repositories { jcenter() @@ -47,16 +46,16 @@ compileKotlin.doFirst { from("src/templates/kotlin/matterlink/Constants.kt") into(target) } - ant.replaceregexp(match:'@MODVERSION@', replace: project.mod_version, flags:'g', byline:true) { + ant.replaceregexp(match: '@MODVERSION@', replace: project.mod_version, flags: 'g', byline: true) { fileset(dir: target, includes: 'Constants.kt') } - ant.replaceregexp(match:'@MCVERSION@', replace: project.mc_version, flags:'g', byline:true) { + ant.replaceregexp(match: '@MCVERSION@', replace: project.mc_version, flags: 'g', byline: true) { fileset(dir: target, includes: 'Constants.kt') } - ant.replaceregexp(match:'@FORGELIN-VERSION@', replace: project.forgelin_version, flags:'g', byline:true) { + ant.replaceregexp(match: '@FORGELIN-VERSION@', replace: project.forgelin_version, flags: 'g', byline: true) { fileset(dir: target, includes: 'Constants.kt') } - ant.replaceregexp(match:'@FORGE-VERSION@', replace: project.forge_version, flags:'g', byline:true) { + ant.replaceregexp(match: '@FORGE-VERSION@', replace: project.forge_version, flags: 'g', byline: true) { fileset(dir: target, includes: 'Constants.kt') } } @@ -82,7 +81,7 @@ processResources { jar { configurations.shade.each { dep -> - from (project.zipTree(dep)) { + from(project.zipTree(dep)) { exclude "META-INF", "META-INF/**" } } diff --git a/build.gradle b/build.gradle index fce83b6..2367c87 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ subprojects { if (project.hasProperty('build_number')) { mod_version += "-build-$build_number" - } else if(!project.hasProperty('release')) { + } else if (!project.hasProperty('release')) { mod_version += "-dev" } @@ -44,7 +44,7 @@ subprojects { project { id = '287323' releaseType = 'beta' - if(project.hasProperty('changelog_file')) { + if (project.hasProperty('changelog_file')) { println("changelog = $changelog_file") changelogType = "markdown" changelog = file(changelog_file) diff --git a/core/build.gradle b/core/build.gradle index 51f784e..8d32838 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -1,4 +1,3 @@ - buildscript { ext.kotlin_version = '1.2.21' repositories { diff --git a/core/src/main/kotlin/matterlink/IMatterLink.kt b/core/src/main/kotlin/matterlink/IMatterLink.kt index 81886f2..4052c64 100644 --- a/core/src/main/kotlin/matterlink/IMatterLink.kt +++ b/core/src/main/kotlin/matterlink/IMatterLink.kt @@ -14,7 +14,7 @@ abstract class IMatterLink { abstract val mcVersion: String abstract val modVersion: String - abstract fun commandSenderFor(user: String, userid: String, server: String): IMinecraftCommandSender + abstract fun commandSenderFor(user: String, userId: String, server: String): IMinecraftCommandSender abstract fun wrappedSendToPlayers(msg: String) diff --git a/core/src/main/kotlin/matterlink/bridge/command/HelpCommand.kt b/core/src/main/kotlin/matterlink/bridge/command/HelpCommand.kt index 84492c1..5c11a7f 100644 --- a/core/src/main/kotlin/matterlink/bridge/command/HelpCommand.kt +++ b/core/src/main/kotlin/matterlink/bridge/command/HelpCommand.kt @@ -8,13 +8,13 @@ object HelpCommand : IBridgeCommand { override val alias: String = "help" override val help: String = "Returns the help string for the given command. Syntax: help " override val permLevel = 0 - override fun execute(user:String, userId:String, server:String, args:String) : Boolean { + override fun execute(user: String, userId: String, server: String, args: String): Boolean { val msg: String = when { args.isEmpty() -> "Available commands: ${BridgeCommandRegistry.getCommandList(IBridgeCommand.getPermLevel(userId, server))}" else -> args.split(" ", ignoreCase = false) .joinToString(separator = "\n") { - "$it: ${ BridgeCommandRegistry.getHelpString(it) }" + "$it: ${BridgeCommandRegistry.getHelpString(it)}" } } MessageHandler.transmit(ApiMessage(text = msg)) diff --git a/core/src/main/kotlin/matterlink/bridge/command/IMinecraftCommandSender.kt b/core/src/main/kotlin/matterlink/bridge/command/IMinecraftCommandSender.kt index e330e5a..9dfaaab 100644 --- a/core/src/main/kotlin/matterlink/bridge/command/IMinecraftCommandSender.kt +++ b/core/src/main/kotlin/matterlink/bridge/command/IMinecraftCommandSender.kt @@ -12,7 +12,7 @@ abstract class IMinecraftCommandSender(val user: String, val userId: String, val val accountName = "$user (id=$userId server=$server)" - fun canExecute(commandName: String) : Boolean { + fun canExecute(commandName: String): Boolean { instance.info("testing $commandName") val command = BridgeCommandRegistry[commandName] ?: return false diff --git a/core/src/main/kotlin/matterlink/config/PermissionConfig.kt b/core/src/main/kotlin/matterlink/config/PermissionConfig.kt index 2383b41..0e9f809 100644 --- a/core/src/main/kotlin/matterlink/config/PermissionConfig.kt +++ b/core/src/main/kotlin/matterlink/config/PermissionConfig.kt @@ -4,7 +4,6 @@ import com.google.gson.Gson import com.google.gson.GsonBuilder import com.google.gson.JsonSyntaxException import com.google.gson.reflect.TypeToken -import com.google.gson.stream.MalformedJsonException import matterlink.instance import java.io.File diff --git a/core/src/main/kotlin/matterlink/handlers/DeathHandler.kt b/core/src/main/kotlin/matterlink/handlers/DeathHandler.kt index a2b35e5..931c793 100644 --- a/core/src/main/kotlin/matterlink/handlers/DeathHandler.kt +++ b/core/src/main/kotlin/matterlink/handlers/DeathHandler.kt @@ -16,8 +16,9 @@ object DeathHandler { ) { if (cfg.death.showDeath) { var msg = deathMessage.replace(player, player.antiping) - if(cfg.death.showDamageType) { - val emojis = cfg.death.damageTypeMapping[damageType]?.split(' ') ?: listOf("\uD83D\uDC7B unknown type '$damageType'") + if (cfg.death.showDamageType) { + val emojis = cfg.death.damageTypeMapping[damageType]?.split(' ') + ?: listOf("\uD83D\uDC7B unknown type '$damageType'") val damageEmoji = emojis[random.nextInt(emojis.size)] msg += " " + damageEmoji } diff --git a/matterbridge-sample.toml b/matterbridge-sample.toml index af6750d..e323875 100644 --- a/matterbridge-sample.toml +++ b/matterbridge-sample.toml @@ -254,11 +254,11 @@ enable=true # key="yourkey" - #[[gateway.inout]] can be used when then channel will be used to receive from - #and send messages to - [[gateway.inout]] - account="irc.freenode" - channel="#matterlink-testing" +# #[[gateway.inout]] can be used when then channel will be used to receive from +# #and send messages to +# [[gateway.inout]] +# account="irc.freenode" +# channel="#matterlink-testing" # #OPTIONAL - only used for IRC protocol at the moment # [gateway.out.options]