File tree 1 file changed +14
-0
lines changed
controller-api/src/main/kotlin/app/simplecloud/controller/api 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,13 @@ interface ServerApi {
17
17
*/
18
18
fun getAllServers (): CompletableFuture <List <Server >>
19
19
20
+ /* *
21
+ * @return a [CompletableFuture] with the [Server] from the SIMPLECLOUD_UNIQUE_ID environment
22
+ */
23
+ fun thisServer (): CompletableFuture <Server > {
24
+ return getServerById(System .getenv(" SIMPLECLOUD_UNIQUE_ID" ))
25
+ }
26
+
20
27
/* *
21
28
* @param id the id of the server.
22
29
* @return a [CompletableFuture] with the [Server].
@@ -124,6 +131,13 @@ interface ServerApi {
124
131
*/
125
132
suspend fun getAllServers (): List <Server >
126
133
134
+ /* *
135
+ * @return the [Server] from the SIMPLECLOUD_UNIQUE_ID environment
136
+ */
137
+ suspend fun thisServer (): Server {
138
+ return getServerById(System .getenv(" SIMPLECLOUD_UNIQUE_ID" ))
139
+ }
140
+
127
141
/* *
128
142
* @param id the id of the server.
129
143
* @return the [Server].
You can’t perform that action at this time.
0 commit comments