Skip to content

Commit

Permalink
Merge pull request #18 from Goksi/alias-placeholder
Browse files Browse the repository at this point in the history
Adding %allocationAlias placeholder
  • Loading branch information
Goksi authored Jan 22, 2023
2 parents edfff2a + 4807508 commit 7c7dd6c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
<dependency>
<groupId>com.github.Goksi</groupId>
<artifactId>Pterodactyl4J</artifactId>
<version>3c0200a</version>
<version>0018d33</version>
</dependency>
</dependencies>
</project>
1 change: 1 addition & 0 deletions src/main/kotlin/tech/goksi/pterobot/entities/ServerInfo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ data class ServerInfo(private val server: ClientServer) {
val name: String = server.name
val node: String = server.node
val primaryAllocation: String = server.primaryAllocation.fullAddress
val allocationAlias: String = "${server.primaryAllocation.alias ?: server.primaryAllocation.ip}:${server.primaryAllocation.port}"
private val utilization = try {
server.retrieveUtilization().execute()
} catch (exception: Exception) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/embeds/server_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
{
"name": "Allocation",
"value": "%primaryAllocation",
"value": "%allocationAlias",
"inline": false
},
{
Expand Down

0 comments on commit 7c7dd6c

Please sign in to comment.