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 uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: 17 java-version: 22
cache: 'gradle' cache: 'gradle'
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v3 uses: gradle/actions/setup-gradle@v3

View File

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

View File

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

View File

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

View File

@ -27,6 +27,7 @@ public final class BungeeComponentUtil {
private BungeeComponentUtil() {} private BungeeComponentUtil() {}
@SuppressWarnings("deprecation") // Array method
public static Component fromLegacy(String legacy) { public static Component fromLegacy(String legacy) {
BaseComponent[] components = TextComponent.fromLegacyText(legacy); BaseComponent[] components = TextComponent.fromLegacyText(legacy);
return BungeeComponentSerializer.get().deserialize(components); 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.Test;
import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtendWith;
import java.util.Collection;
import java.util.Locale; import java.util.Locale;
import java.util.UUID; import java.util.UUID;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
@ -97,6 +98,12 @@ public class MinecraftToDiscordChatMessageTest {
return null; return null;
} }
@Override
public void addChatSuggestions(Collection<String> suggestions) {}
@Override
public void removeChatSuggestions(Collection<String> suggestions) {}
@Override @Override
public @Nullable SkinInfo skinInfo() { public @Nullable SkinInfo skinInfo() {
return null; return null;