fix achievment/advancement string
This commit is contained in:
parent
00b1969754
commit
e495e588da
|
@ -29,8 +29,8 @@ object EventHandler {
|
||||||
fun progressEvent(e: AchievementEvent) {
|
fun progressEvent(e: AchievementEvent) {
|
||||||
ProgressHandler.handleProgress(
|
ProgressHandler.handleProgress(
|
||||||
name = e.entityPlayer.name,
|
name = e.entityPlayer.name,
|
||||||
display = e.achievement.statName.unformattedText,
|
message = "has earned the achievement",
|
||||||
type = "achievement"
|
display = e.achievement.statName.unformattedText
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,8 +29,8 @@ object EventHandler {
|
||||||
fun progressEvent(e: AchievementEvent) {
|
fun progressEvent(e: AchievementEvent) {
|
||||||
ProgressHandler.handleProgress(
|
ProgressHandler.handleProgress(
|
||||||
name = e.entityPlayer.name,
|
name = e.entityPlayer.name,
|
||||||
display = e.achievement.statName.unformattedText,
|
message = "has earned the achievement",
|
||||||
type = "achievement"
|
display = e.achievement.statName.unformattedText
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,8 @@ object EventHandler {
|
||||||
if (e.advancement.display == null) return
|
if (e.advancement.display == null) return
|
||||||
ProgressHandler.handleProgress(
|
ProgressHandler.handleProgress(
|
||||||
name = e.entityPlayer.name,
|
name = e.entityPlayer.name,
|
||||||
display = e.advancement.displayText.unformattedText,
|
message = "has made the advancement",
|
||||||
type = "advancement"
|
display = e.advancement.displayText.unformattedText
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,12 +7,12 @@ import matterlink.config.cfg
|
||||||
|
|
||||||
object ProgressHandler {
|
object ProgressHandler {
|
||||||
|
|
||||||
fun handleProgress(name: String, display: String, type: String) {
|
fun handleProgress(name: String, message: String, display: String) {
|
||||||
if (!cfg.relay.advancements) return
|
if (!cfg.relay.advancements) return
|
||||||
val usr = name.antiping()
|
val usr = name.antiping()
|
||||||
MessageHandler.transmit(ApiMessage(
|
MessageHandler.transmit(ApiMessage(
|
||||||
username = cfg.relay.systemUser,
|
username = cfg.relay.systemUser,
|
||||||
text = "$usr has earned the $type $display"
|
text = "$usr $message $display"
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue