From 2855f9b6787f280c9cacec83a13e6c3dab015ee9 Mon Sep 17 00:00:00 2001 From: ThisTestUser Date: Mon, 23 Sep 2024 19:11:19 +0000 Subject: [PATCH] Attempt upgrade to 1.20.6 --- .github/workflows/compile.yml | 2 +- README.md | 4 +--- build.gradle.kts | 10 +++++----- .../largeraids/versioned/nms/CraftRaidWrapper.java | 2 +- .../largeraids/versioned/nms/CraftRaiderWrapper.java | 2 +- .../largeraids/versioned/nms/CraftServerWrapper.java | 2 +- .../largeraids/versioned/nms/CraftVexWrapper.java | 2 +- .../largeraids/versioned/nms/CraftWorldWrapper.java | 2 +- 8 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 5e5bc9d..8087fad 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: temurin - java-version: 17 + java-version: 21 - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 diff --git a/README.md b/README.md index db4b021..74d63f5 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,7 @@ This plugin will work for both Spigot and Paper, but the latter is recommended b ## Updating to Later Versions -Updating is usually very simple. First, in build.gradle.kts, change the variable mcVersion to the new version. Then, replace the Bukkit version with the newest one in the source code. For example, the Bukkit version for 1.19.2 is v1_19_R1. Right now, there are 6 instances of this string in the source code. - -Run 'gradlew build' afterwards. If there are still errors, the source code will need to be manually updated to be compatible with the new Minecraft version. +In build.gradle.kts, change the variable mcVersion to the new version. Then run 'gradlew build'. If there are still errors, the source code will need to be manually updated to be compatible with the new Minecraft version. ## Statistics diff --git a/build.gradle.kts b/build.gradle.kts index 0365878..4ad8526 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,11 +10,11 @@ plugins { group = "com.solarrabbit" version = "1.11.1" description = "LargeRaids" -val mcVersion = "1.20.4" +val mcVersion = "1.20.6" java { - // Configure the java toolchain. This allows gradle to auto-provision JDK 17 on systems that only have JDK 8 installed for example. - toolchain.languageVersion.set(JavaLanguageVersion.of(17)) + // Configure the java toolchain. This allows gradle to auto-provision JDK 21 on systems that only have JDK 8 installed for example. + toolchain.languageVersion.set(JavaLanguageVersion.of(21)) } repositories { @@ -30,7 +30,7 @@ dependencies { paperDevBundle(mcVersion + "-R0.1-SNAPSHOT") shadow("org.bstats:bstats-bukkit:3.0.2") implementation("me.clip:placeholderapi:2.11.6") - implementation("io.lumine:Mythic-Dist:5.6.2-SNAPSHOT") + implementation("io.lumine:Mythic-Dist:5.7.1-SNAPSHOT") } tasks { @@ -44,7 +44,7 @@ tasks { // Set the release flag. This configures what version bytecode the compiler will emit, as well as what JDK APIs are usable. // See https://openjdk.java.net/jeps/247 for more information. - options.release.set(17) + options.release.set(21) } javadoc { options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything diff --git a/src/main/java/com/solarrabbit/largeraids/versioned/nms/CraftRaidWrapper.java b/src/main/java/com/solarrabbit/largeraids/versioned/nms/CraftRaidWrapper.java index 8e59383..a912037 100644 --- a/src/main/java/com/solarrabbit/largeraids/versioned/nms/CraftRaidWrapper.java +++ b/src/main/java/com/solarrabbit/largeraids/versioned/nms/CraftRaidWrapper.java @@ -8,7 +8,7 @@ import com.solarrabbit.largeraids.nms.AbstractRaidWrapper; import org.bukkit.Raid; -import org.bukkit.craftbukkit.v1_20_R3.CraftRaid; +import org.bukkit.craftbukkit.CraftRaid; public class CraftRaidWrapper extends AbstractCraftRaidWrapper { private static MethodHandle handle; diff --git a/src/main/java/com/solarrabbit/largeraids/versioned/nms/CraftRaiderWrapper.java b/src/main/java/com/solarrabbit/largeraids/versioned/nms/CraftRaiderWrapper.java index 1758b6a..4cf41f4 100644 --- a/src/main/java/com/solarrabbit/largeraids/versioned/nms/CraftRaiderWrapper.java +++ b/src/main/java/com/solarrabbit/largeraids/versioned/nms/CraftRaiderWrapper.java @@ -2,7 +2,7 @@ import com.solarrabbit.largeraids.nms.AbstractCraftRaiderWrapper; -import org.bukkit.craftbukkit.v1_20_R3.entity.CraftRaider; +import org.bukkit.craftbukkit.entity.CraftRaider; import org.bukkit.entity.Raider; public class CraftRaiderWrapper extends AbstractCraftRaiderWrapper { diff --git a/src/main/java/com/solarrabbit/largeraids/versioned/nms/CraftServerWrapper.java b/src/main/java/com/solarrabbit/largeraids/versioned/nms/CraftServerWrapper.java index ee52726..d461cff 100644 --- a/src/main/java/com/solarrabbit/largeraids/versioned/nms/CraftServerWrapper.java +++ b/src/main/java/com/solarrabbit/largeraids/versioned/nms/CraftServerWrapper.java @@ -3,7 +3,7 @@ import com.solarrabbit.largeraids.nms.AbstractCraftServerWrapper; import org.bukkit.Server; -import org.bukkit.craftbukkit.v1_20_R3.CraftServer; +import org.bukkit.craftbukkit.CraftServer; public class CraftServerWrapper extends AbstractCraftServerWrapper { diff --git a/src/main/java/com/solarrabbit/largeraids/versioned/nms/CraftVexWrapper.java b/src/main/java/com/solarrabbit/largeraids/versioned/nms/CraftVexWrapper.java index 295a962..108922c 100644 --- a/src/main/java/com/solarrabbit/largeraids/versioned/nms/CraftVexWrapper.java +++ b/src/main/java/com/solarrabbit/largeraids/versioned/nms/CraftVexWrapper.java @@ -4,7 +4,7 @@ import net.minecraft.world.entity.Mob; -import org.bukkit.craftbukkit.v1_20_R3.entity.CraftVex; +import org.bukkit.craftbukkit.entity.CraftVex; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Vex; diff --git a/src/main/java/com/solarrabbit/largeraids/versioned/nms/CraftWorldWrapper.java b/src/main/java/com/solarrabbit/largeraids/versioned/nms/CraftWorldWrapper.java index 419293c..e16727e 100644 --- a/src/main/java/com/solarrabbit/largeraids/versioned/nms/CraftWorldWrapper.java +++ b/src/main/java/com/solarrabbit/largeraids/versioned/nms/CraftWorldWrapper.java @@ -3,7 +3,7 @@ import com.solarrabbit.largeraids.nms.AbstractCraftWorldWrapper; import org.bukkit.World; -import org.bukkit.craftbukkit.v1_20_R3.CraftWorld; +import org.bukkit.craftbukkit.CraftWorld; public class CraftWorldWrapper extends AbstractCraftWorldWrapper {