Fix test compile, upgrade GitHub Actions JVM version

This commit is contained in:
Vankka 2024-08-12 20:38:35 +03:00
parent 780c1d0759
commit 99912dc937
No known key found for this signature in database
GPG Key ID: 62E48025ED4E7EBB
6 changed files with 12 additions and 4 deletions

View File

@ -15,7 +15,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
java-version: 22
cache: 'gradle'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

View File

@ -15,7 +15,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
java-version: 22
cache: 'gradle'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

View File

@ -14,7 +14,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
java-version: 22
cache: 'gradle'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

View File

@ -1,5 +1,5 @@
java {
disableAutoTargetJvm() // Requires Java 17, we target 8
disableAutoTargetJvm() // Requires Java 21, we target 8
}
dependencies {

View File

@ -27,6 +27,7 @@ public final class BungeeComponentUtil {
private BungeeComponentUtil() {}
@SuppressWarnings("deprecation") // Array method
public static Component fromLegacy(String legacy) {
BaseComponent[] components = TextComponent.fromLegacyText(legacy);
return BungeeComponentSerializer.get().deserialize(components);

View File

@ -43,6 +43,7 @@ import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import java.util.Collection;
import java.util.Locale;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
@ -97,6 +98,12 @@ public class MinecraftToDiscordChatMessageTest {
return null;
}
@Override
public void addChatSuggestions(Collection<String> suggestions) {}
@Override
public void removeChatSuggestions(Collection<String> suggestions) {}
@Override
public @Nullable SkinInfo skinInfo() {
return null;