File tree Expand file tree Collapse file tree 2 files changed +32
-21
lines changed
src/main/kotlin/com/lambda/client/gui/hudgui/elements/misc Expand file tree Collapse file tree 2 files changed +32
-21
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ package com.lambda.client.gui.hudgui.elements.misc
2
+
3
+ import com.lambda.client.event.SafeClientEvent
4
+ import com.lambda.client.gui.hudgui.LabelHud
5
+
6
+ internal object ServerInfo : LabelHud(
7
+ name = " ServerInfo" ,
8
+ category = Category .MISC ,
9
+ description = " Brand / type and ip of the server"
10
+ ) {
11
+ private val showBrand by setting(" Show Brand" , true )
12
+ private val showIP by setting(" Show full server ip" , false )
13
+
14
+ override fun SafeClientEvent.updateText () {
15
+ if (mc.isIntegratedServerRunning) {
16
+ displayText.add(" Singleplayer: " + mc.player?.serverBrand)
17
+ } else {
18
+ if (showBrand) {
19
+ val serverBrand = player.serverBrand ? : " Unknown Server Type"
20
+ displayText.add(" Brand" , secondaryColor)
21
+ displayText.addLine(serverBrand, primaryColor)
22
+ }
23
+
24
+ if (showIP) {
25
+ val serverIp = player.connection.networkManager.remoteAddress.toString()
26
+ displayText.add(" IP" , secondaryColor)
27
+ displayText.addLine(serverIp, primaryColor)
28
+ }
29
+ }
30
+ }
31
+
32
+ }
You can’t perform that action at this time.
0 commit comments