fix achievment/advancement string
This commit is contained in:
parent
00b1969754
commit
e495e588da
|
@ -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
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -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"
|
||||
))
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue