Skip to content

Commit f35adad

Browse files
committed
log chat warnings too
1 parent fdd5c91 commit f35adad

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/main/kotlin/com/lambda/interaction/request/breaking/BrokenBlockHandler.kt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,13 @@ object BrokenBlockHandler : PostActionHandler<BreakInfo>() {
5858
if (!loaded) return@runSafe
5959

6060
if (!info.broken) {
61-
warn("${info.type} ${info::class.simpleName} at ${info.context.blockPos.toShortString()} timed out with cached state ${info.context.cachedState}")
61+
val message = "${info.type} ${info::class.simpleName} at ${info.context.blockPos.toShortString()} timed out with cached state ${info.context.cachedState}"
62+
BreakManager.logger.error(message)
63+
warn(message)
6264
} else if (!TaskFlowModule.ignoreItemDropWarnings) {
63-
warn("${info.type} ${info::class.simpleName}'s item drop at ${info.context.blockPos.toShortString()} timed out")
65+
val message = "${info.type} ${info::class.simpleName}'s item drop at ${info.context.blockPos.toShortString()} timed out"
66+
BreakManager.logger.warn(message)
67+
warn(message)
6468
}
6569

6670
if (!info.broken && info.breakConfig.breakConfirmation != BreakConfirmationMode.AwaitThenBreak) {
@@ -90,7 +94,9 @@ object BrokenBlockHandler : PostActionHandler<BreakInfo>() {
9094
if (pending.type == BreakInfo.BreakType.Rebreak) {
9195
pending.context.cachedState = event.newState
9296
} else {
93-
this@BrokenBlockHandler.warn("Broken block at ${event.pos.toShortString()} was rejected with ${event.newState} instead of ${pending.context.cachedState.emptyState}")
97+
val message = "Broken block at ${event.pos.toShortString()} was rejected with ${event.newState} instead of ${pending.context.cachedState.emptyState}"
98+
BreakManager.logger.error(message)
99+
this@BrokenBlockHandler.warn(message)
94100
pending.stopPending()
95101
}
96102
return@listen

0 commit comments

Comments
 (0)