Skip to content

Commit

Permalink
Adding %allocationAlias placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
Goksi committed Jan 22, 2023
1 parent 3cd4bc7 commit 4807508
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 4807508

Please sign in to comment.