Skip to content

Commit

Permalink
update to jdk21 and tablist backend
Browse files Browse the repository at this point in the history
  • Loading branch information
rfresh2 committed Oct 1, 2023
1 parent fcb1d52 commit 8cc256f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
- name: Setup JDK
uses: actions/setup-java@v3
with:
java-version: '20'
distribution: 'temurin'
java-version: '21'
distribution: 'zulu'

- name: Elevate wrapper permissions
run: chmod +x ./mvnw
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<version>1.0</version>

<properties>
<java.version>20</java.version>
<maven.compiler.source>20</maven.compiler.source>
<maven.compiler.target>20</maven.compiler.target>
<java.version>21</java.version>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jackson-version>2.15.2</jackson-version>
<swagger-annotations-version>2.2.16</swagger-annotations-version>
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/vc/commands/TablistCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import org.springframework.stereotype.Component;
import reactor.core.publisher.Mono;
import vc.swagger.vc.handler.TabListApi;
import vc.swagger.vc.model.OnlinePlayers;
import vc.swagger.vc.model.TablistEntry;

import java.util.ArrayList;
import java.util.Formatter;
Expand All @@ -32,10 +32,10 @@ public String getName() {

@Override
public Mono<Message> handle(final ChatInputInteractionEvent event) {
List<OnlinePlayers> onlinePlayers = tabListApi.onlinePlayers();
List<TablistEntry> onlinePlayers = tabListApi.onlinePlayers();
if (isNull(onlinePlayers) || onlinePlayers.isEmpty()) return error(event, "Unable to resolve current tablist");
List<String> playerNames = onlinePlayers.stream()
.map(OnlinePlayers::getPlayerName)
.map(TablistEntry::getPlayerName)
.distinct()
.sorted(String::compareTo)
.toList();
Expand Down

0 comments on commit 8cc256f

Please sign in to comment.