fix achievment/advancement string

This commit is contained in:
NikkyAI 2018-02-17 18:30:02 +01:00
parent 00b1969754
commit e495e588da
4 changed files with 8 additions and 8 deletions

View File

@ -29,8 +29,8 @@ object EventHandler {
fun progressEvent(e: AchievementEvent) {
ProgressHandler.handleProgress(
name = e.entityPlayer.name,
display = e.achievement.statName.unformattedText,
type = "achievement"
message = "has earned the achievement",
display = e.achievement.statName.unformattedText
)
}

View File

@ -29,8 +29,8 @@ object EventHandler {
fun progressEvent(e: AchievementEvent) {
ProgressHandler.handleProgress(
name = e.entityPlayer.name,
display = e.achievement.statName.unformattedText,
type = "achievement"
message = "has earned the achievement",
display = e.achievement.statName.unformattedText
)
}

View File

@ -30,8 +30,8 @@ object EventHandler {
if (e.advancement.display == null) return
ProgressHandler.handleProgress(
name = e.entityPlayer.name,
display = e.advancement.displayText.unformattedText,
type = "advancement"
message = "has made the advancement",
display = e.advancement.displayText.unformattedText
)
}

View File

@ -7,12 +7,12 @@ import matterlink.config.cfg
object ProgressHandler {
fun handleProgress(name: String, display: String, type: String) {
fun handleProgress(name: String, message: String, display: String) {
if (!cfg.relay.advancements) return
val usr = name.antiping()
MessageHandler.transmit(ApiMessage(
username = cfg.relay.systemUser,
text = "$usr has earned the $type $display"
text = "$usr $message $display"
))
}
}