Skip to content

Commit

Permalink
Drop support for 1.17.1
Browse files Browse the repository at this point in the history
  • Loading branch information
md5sha256 committed Feb 25, 2024
1 parent d316f2e commit 89114ee
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 134 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,6 @@ gradle-app.setting
### Gradle Patch ###
**/build/

**/run

# End of https://www.toptal.com/developers/gitignore/api/macos,windows,intellij+all,gradle,maven
1 change: 0 additions & 1 deletion AreaShop/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ dependencies {
runtimeOnly(projects.adapters.plugins.worldedit)
runtimeOnly(projects.adapters.plugins.worldguard)
runtimeOnly(projects.adapters.plugins.fastasyncworldedit)
runtimeOnly(project(":adapters:platform:bukkit-1-17", "reobf"))
runtimeOnly(projects.adapters.platform.bukkitModern)
}
testImplementation("com.github.seeseemelk:MockBukkit-v1.20:3.57.1")
Expand Down
35 changes: 11 additions & 24 deletions AreaShop/src/main/java/me/wiefferink/areashop/AreaShop.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import me.wiefferink.areashop.tools.SpigotPlatform;
import me.wiefferink.areashop.tools.Utils;
import me.wiefferink.areashop.tools.version.Version;
import me.wiefferink.areashop.tools.version.VersionData;
import me.wiefferink.areashop.tools.version.VersionUtil;
import me.wiefferink.bukkitdo.Do;
import me.wiefferink.interactivemessenger.source.LanguageManager;
Expand All @@ -55,7 +54,6 @@
import javax.annotation.Nonnull;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
Expand Down Expand Up @@ -180,31 +178,20 @@ public void onEnable() {

// Setup NMS Impl
Version currentServerVersion = VersionUtil.parseMinecraftVersion(Bukkit.getBukkitVersion());
if (currentServerVersion.versionData().isOlderThan(VersionUtil.MC_1_17_1)) {
error("Unsupported minecraft version: " + currentServerVersion + "! Minimum is 1.17.1");
if (currentServerVersion.versionData().isOlderThan(VersionUtil.MC_1_18_2)) {
error("Unsupported minecraft version: " + currentServerVersion + "! Minimum is 1.18.2");
shutdownOnError();
return;
}
if (currentServerVersion.versionData().equals(VersionUtil.MC_1_17_1)) {
try {
Class<?> adapterImpl = Class.forName("me.wiefferink.areashop.adapters.platform.legacy.LegacyPlatformAdapter");
this.platformAdapter = adapterImpl.asSubclass(PlatformAdapter.class).getConstructor().newInstance();
} catch (ReflectiveOperationException ex) {
ex.printStackTrace();
error("Failed to initialize legacy PlatformAdapter implementation!");
shutdownOnError();
return;
}
} else {
try {
Class<?> adapterImpl = Class.forName("me.wiefferink.areashop.adapters.platform.modern.ModernPlatformAdapter");
this.platformAdapter = adapterImpl.asSubclass(PlatformAdapter.class).getConstructor().newInstance();
} catch (ReflectiveOperationException ex) {
ex.printStackTrace();
error("Failed to initialize modern PlatformAdapter implementation!");
shutdownOnError();
return;
}

try {
Class<?> adapterImpl = Class.forName("me.wiefferink.areashop.adapters.platform.modern.ModernPlatformAdapter");
this.platformAdapter = adapterImpl.asSubclass(PlatformAdapter.class).getConstructor().newInstance();
} catch (ReflectiveOperationException ex) {
ex.printStackTrace();
error("Failed to initialize modern PlatformAdapter implementation!");
shutdownOnError();
return;
}

final MinecraftPlatform platform;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

public class VersionUtil {

public static VersionData MC_1_17_1 = new VersionData(1, 17, 1);
public static VersionData MC_1_18_2 = new VersionData(1, 18, 2);

public static Version parseMinecraftVersion(String minecraftVersion) {
// Expecting 1.X.X-R0.1-SNAPSHOT
Expand Down
24 changes: 0 additions & 24 deletions adapters/platform/bukkit-1-17/build.gradle.kts

This file was deleted.

This file was deleted.

This file was deleted.

34 changes: 15 additions & 19 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ subprojects {
apply {
plugin<JavaPlugin>()
plugin<JavaLibraryPlugin>()
if (project.name != "platform-bukkit-1-17") {
plugin<MavenPublishPlugin>()
}
plugin<IdeaPlugin>()
plugin<EclipsePlugin>()
plugin<MavenPublishPlugin>()
// plugin<SpotBugsPlugin>()
}

Expand Down Expand Up @@ -75,22 +73,20 @@ subprojects {
}
}

if (project.name != "platform-bukkit-1-17") {
publishing {
publications {
create<MavenPublication>(project.name) {
from(components["java"])
pom {
scm {
connection.set("scm:git:git://github.com/md5sha256/AreaShop.git")
developerConnection.set("scm:git:ssh://github.com/md5sha256/AreaShop.git")
url.set("https://github.com/md5sha256/AreaShop/tree/dev/bleeding")
}
licenses {
license {
name.set("GNU General Public License v3.0")
url.set("https://github.com/md5sha256/AreaShop/blob/dev/bleeding/LICENSE")
}
publishing {
publications {
create<MavenPublication>(project.name) {
from(components["java"])
pom {
scm {
connection.set("scm:git:git://github.com/md5sha256/AreaShop.git")
developerConnection.set("scm:git:ssh://github.com/md5sha256/AreaShop.git")
url.set("https://github.com/md5sha256/AreaShop/tree/dev/bleeding")
}
licenses {
license {
name.set("GNU General Public License v3.0")
url.set("https://github.com/md5sha256/AreaShop/blob/dev/bleeding/LICENSE")
}
}
}
Expand Down
4 changes: 0 additions & 4 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ include(":adapters:plugins:worldedit")
include(":adapters:plugins:worldguard")
include(":adapters:plugins:fastasyncworldedit")

if (!providers.environmentVariable("JITPACK").isPresent) {
include(":adapters:platform:bukkit-1-17")
}

include(":adapters:platform:bukkit-modern")


Expand Down

0 comments on commit 89114ee

Please sign in to comment.