diff --git a/build.bat b/build.bat index c6eaf75..298d925 100644 --- a/build.bat +++ b/build.bat @@ -47,7 +47,7 @@ if %errorlevel% neq 0 ( ) :: Define platforms and file types -set "platforms=bukkit fabric neoforge forge" +set "platforms=fabric neoforge forge" set "fileTypes=.jar -javadoc.jar -sources.jar" :: Move and rename files diff --git a/bukkit/build.gradle b/bukkit/build.gradle deleted file mode 100644 index 6a9ed98..0000000 --- a/bukkit/build.gradle +++ /dev/null @@ -1,21 +0,0 @@ -plugins { - id 'multiloader-loader' -} -repositories { - mavenCentral() - maven { - name = 'papermc' - url = 'https://repo.papermc.io/repository/maven-public/' - } -} -dependencies { - compileOnly("io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT") -} -processResources { - def props = [version: version] - inputs.properties props - filteringCharset 'UTF-8' - filesMatching('plugin.yml') { - expand props - } -} \ No newline at end of file diff --git a/bukkit/src/main/java/dev/xdpxi/xdlib/Main.java b/bukkit/src/main/java/dev/xdpxi/xdlib/Main.java deleted file mode 100644 index 84e55d3..0000000 --- a/bukkit/src/main/java/dev/xdpxi/xdlib/Main.java +++ /dev/null @@ -1,22 +0,0 @@ -package dev.xdpxi.xdlib; - -import dev.xdpxi.xdlib.api.Logger; -import org.bukkit.plugin.java.JavaPlugin; - -public final class Main extends JavaPlugin { - @Override - public void onEnable() { - CommonClass.init(); - - Thread updateThread = new Thread(new UpdateCheckerBukkit(), "Update thread"); - updateThread.setDaemon(true); - updateThread.start(); - - Logger.info("[XDLib/Main] - Loaded!"); - } - - @Override - public void onDisable() { - Logger.info("[XDLib/Main] - Disabled!"); - } -} \ No newline at end of file diff --git a/bukkit/src/main/java/dev/xdpxi/xdlib/UpdateCheckerBukkit.java b/bukkit/src/main/java/dev/xdpxi/xdlib/UpdateCheckerBukkit.java deleted file mode 100644 index 7134120..0000000 --- a/bukkit/src/main/java/dev/xdpxi/xdlib/UpdateCheckerBukkit.java +++ /dev/null @@ -1,59 +0,0 @@ -package dev.xdpxi.xdlib; - -import dev.xdpxi.xdlib.api.Logger; -import org.bukkit.plugin.Plugin; -import org.bukkit.plugin.java.JavaPlugin; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.URI; - -public class UpdateCheckerBukkit implements Runnable { - private static String getModVersion() { - Plugin plugin = JavaPlugin.getPlugin(Main.class); - return plugin.getDescription().getVersion(); - } - - public static void checkForUpdate() { - Logger.info("[XDLib/UpdateChecker] - Checking for updates..."); - try { - HttpURLConnection connection = (HttpURLConnection) URI.create("https://api.modrinth.com/v2/project/xdlib/version") - .toURL().openConnection(); - connection.setRequestMethod("GET"); - connection.setRequestProperty("User-Agent", "Mozilla/5.0"); - - try (BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()))) { - StringBuilder response = new StringBuilder(); - String inputLine; - - while ((inputLine = in.readLine()) != null) { - response.append(inputLine); - } - - String latestVersion = UpdateChecker.parseLatestVersion(response.toString()); - String version = getModVersion(); - - Logger.info("[XDLib/UpdateChecker] - Latest Version: " + latestVersion); - Logger.info("[XDLib/UpdateChecker] - Current Version: " + version); - - if (latestVersion != null && UpdateChecker.compareVersions(version, latestVersion) < 0) { - Logger.warn("[XDLib/UpdateChecker] - An update is available! Latest version: " + latestVersion); - } else { - Logger.info("[XDLib/UpdateChecker] - No update available."); - } - } - } catch (Exception e) { - Logger.error("[XDLib/UpdateChecker] - Error checking for updates: " + e.getMessage()); - e.printStackTrace(); - } - } - - /** - * Runs this operation. - */ - @Override - public void run() { - checkForUpdate(); - } -} \ No newline at end of file diff --git a/bukkit/src/main/java/dev/xdpxi/xdlib/platform/BukkitPlatformHelper.java b/bukkit/src/main/java/dev/xdpxi/xdlib/platform/BukkitPlatformHelper.java deleted file mode 100644 index 832f6bb..0000000 --- a/bukkit/src/main/java/dev/xdpxi/xdlib/platform/BukkitPlatformHelper.java +++ /dev/null @@ -1,20 +0,0 @@ -package dev.xdpxi.xdlib.platform; - -import dev.xdpxi.xdlib.platform.services.IPlatformHelper; - -public class BukkitPlatformHelper implements IPlatformHelper { - @Override - public String getPlatformName() { - return "Bukkit"; - } - - @Override - public boolean isModLoaded(String modId) { - return false; - } - - @Override - public boolean isDevelopmentEnvironment() { - return false; - } -} \ No newline at end of file diff --git a/bukkit/src/main/resources/META-INF/services/dev.xdpxi.xdlib.platform.services.IPlatformHelper b/bukkit/src/main/resources/META-INF/services/dev.xdpxi.xdlib.platform.services.IPlatformHelper deleted file mode 100644 index c1d5a3b..0000000 --- a/bukkit/src/main/resources/META-INF/services/dev.xdpxi.xdlib.platform.services.IPlatformHelper +++ /dev/null @@ -1 +0,0 @@ -dev.xdpxi.xdlib.platform.BukkitPlatformHelper \ No newline at end of file diff --git a/bukkit/src/main/resources/plugin.yml b/bukkit/src/main/resources/plugin.yml deleted file mode 100644 index 008df1a..0000000 --- a/bukkit/src/main/resources/plugin.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: XDLib -version: '${version}' -main: dev.xdpxi.xdlib.Main -api-version: '1.21' -prefix: XDLib -load: STARTUP -authors: [ XDPXI ] -description: This is a library for many uses and is included as a player counter for XDPXI's mods and modpacks! -website: https://modrinth.com/plugin/xdlib -folia-support: true \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 1b74b8d..da82242 100644 --- a/settings.gradle +++ b/settings.gradle @@ -47,5 +47,4 @@ rootProject.name = 'XDLib' include('common') include('fabric') include('neoforge') -include('forge') -include('bukkit') \ No newline at end of file +include('forge') \ No newline at end of file