You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: serverhost-runtime/src/main/kotlin/app/simplecloud/droplet/serverhost/runtime/runner/ServerEnvironments.kt
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -31,10 +31,16 @@ class ServerEnvironments(
31
31
default
32
32
)
33
33
34
+
/**
35
+
* Gets the environment a server is running on or null if the server is not running in any environment
36
+
*/
34
37
funof(server:Server): ServerEnvironment? {
35
38
return of(server.uniqueId)
36
39
}
37
40
41
+
/**
42
+
* Gets the environment a server is running on or null if the server is not running in any environment
43
+
*/
38
44
funof(uniqueId:String): ServerEnvironment? {
39
45
return envs.firstOrNull {
40
46
it.getServer(uniqueId)?.let { server ->
@@ -48,6 +54,9 @@ class ServerEnvironments(
48
54
return envs
49
55
}
50
56
57
+
/**
58
+
* Returns the initial environment used for the server
0 commit comments