Skip to content

Commit 412ddf4

Browse files
Add Minestom version info to /version command
1 parent 371e417 commit 412ddf4

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/main/kotlin/com/bluedragonmc/server/command/VersionCommand.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import com.bluedragonmc.server.utils.clickEvent
66
import net.kyori.adventure.text.Component
77
import net.kyori.adventure.text.event.ClickEvent
88
import net.kyori.adventure.text.format.NamedTextColor
9+
import net.minestom.server.Git
910
import java.text.DateFormat
1011
import java.time.Duration
1112

@@ -43,7 +44,11 @@ class VersionCommand(name: String, usageString: String, vararg aliases: String?)
4344
// Uptime
4445
duration.toHoursPart(),
4546
duration.toMinutesPart(),
46-
duration.toSecondsPart()
47+
duration.toSecondsPart(),
48+
Git.group() ?: "?",
49+
Git.artifact() ?: "?",
50+
Git.commit() ?: "?",
51+
Git.branch() ?: "?"
4752
)
4853
)
4954
if (Environment.isDev) {

src/main/resources/lang_en.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ command.list.response=Online players ({0}):
342342
command.time.rate.query=The time rate is {0}
343343
command.time.rate.set=Set the time rate to {0}
344344

345-
command.version.output=This server is running on: {0} version {1}/{2} ({3}). It has been running for {4} hours, {5} minutes, and {6} seconds.
345+
command.version.output=This server is running on: {0} version {1}/{2} ({3}). It has been running for {4} hours, {5} minutes, and {6} seconds. Minestom version: {7}:{8}:{9} ({10})
346346
command.version.development_warning=\u26A0 This is a development version! Keep in mind that this is not representative of any final product and features may change before release.
347347

348348
cosmetic.fastfall.boots=Boots (Decorative)

0 commit comments

Comments
 (0)