Skip to content

Commit

Permalink
Added fix for 1.21 factory
Browse files Browse the repository at this point in the history
  • Loading branch information
r3back committed Nov 17, 2024
1 parent 7701498 commit 5ca10b4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ public TabHandler configureTab() {
* @return {@link MinecraftVersion}
*/
private MinecraftVersion getMcVersion() {
final String version = Bukkit.getServer().getVersion();

if (version.startsWith("1.21")) {
final String nmsVersion = "v1_21_R1";
return MinecraftVersion.byName(nmsVersion);
}

final String nmsVersion = Bukkit.getServer().getClass()
.getPackage()
.getName()
Expand Down
2 changes: 1 addition & 1 deletion test-suite/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3"

services:
test-server:
image: itzg/minecraft-server:java17
image: itzg/minecraft-server:java21
environment:
CFG_SERVER_NAME: "test-server"
ports:
Expand Down
2 changes: 1 addition & 1 deletion test-suite/mc-config/mc.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
TYPE=PAPER
VERSION=1.19.4
VERSION=1.21.1
EULA=TRUE
ONLINE_MODE=TRUE
COPY_CONFIG_DEST=/data
Expand Down

0 comments on commit 5ca10b4

Please sign in to comment.