format all the things
This commit is contained in:
parent
6c5a381903
commit
41c8776993
|
@ -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 {
|
||||
|
|
|
@ -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'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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/**"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.2.21'
|
||||
repositories {
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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 <command>"
|
||||
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))
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue