Skip to content
This repository was archived by the owner on Dec 10, 2025. It is now read-only.

Commit 21ab317

Browse files
committed
Fix potential NPE in command error handling
1 parent 00a1b35 commit 21ab317

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

surf-cloud-standalone/src/main/kotlin/dev/slne/surf/cloud/standalone/commands/CommandManagerImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class CommandManagerImpl {
115115
} catch (e: CommandSyntaxException) {
116116
source.sendFailure(buildText {
117117
color(Colors.ERROR)
118-
appendText(e.message!!)
118+
appendText(e.message ?: e.javaClass.name)
119119
clickEvent(ClickEvent.suggestCommand("/$label"))
120120
})
121121

0 commit comments

Comments
 (0)