From 19329abc5e7529ee318c35fcb607b6519d9432b1 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 24 Aug 2026 16:45:39 -0600 Subject: [PATCH 1/8] Run BungeeHandler compatibility removal --- .github/workflows/remove-bungee-handler.yml | 61 +++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/remove-bungee-handler.yml diff --git a/.github/workflows/remove-bungee-handler.yml b/.github/workflows/remove-bungee-handler.yml new file mode 100644 index 0000000000..c7d66f0f49 --- /dev/null +++ b/.github/workflows/remove-bungee-handler.yml @@ -0,0 +1,61 @@ +name: Remove BungeeHandler compatibility + +on: + push: + branches: + - cleanup/remove-bungee-handler + +permissions: + contents: write + +jobs: + refactor: + if: github.actor != 'github-actions[bot]' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: cleanup/remove-bungee-handler + - name: Remove compatibility API + run: | + python - <<'PY' + from pathlib import Path + main = Path('VotingPlugin/src/main/java/com/bencodez/votingplugin/VotingPluginMain.java') + text = main.read_text() + block = '''\n\t/**\n\t * @deprecated Use {@link #getBackendProxyHandler()} instead.\n\t */\n\t@Deprecated\n\tpublic BungeeHandler getBungeeHandler() {\n\t\treturn (BungeeHandler) backendProxyHandler;\n\t}\n''' + if block not in text: + raise SystemExit('deprecated getBungeeHandler block not found') + text = text.replace(block, '\n') + text = text.replace('backendProxyHandler = new BungeeHandler(this);', 'backendProxyHandler = new BackendProxyHandler(this);') + main.write_text(text) + + alias = Path('VotingPlugin/src/main/java/com/bencodez/votingplugin/BungeeHandler.java') + if not alias.exists(): + raise SystemExit('BungeeHandler.java not found') + alias.unlink() + + compat_test = Path('VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/BungeeHandlerCompatibilityTest.java') + if compat_test.exists(): + compat_test.unlink() + PY + - name: Verify legacy symbols are gone + run: | + if grep -R --line-number --include='*.java' '\bBungeeHandler\b\|getBungeeHandler()' VotingPlugin/src/main/java VotingPlugin/src/test/java; then + echo 'Legacy BungeeHandler compatibility symbols remain' + exit 1 + fi + - name: Build + run: mvn -B -f VotingPlugin/pom.xml package + - name: Commit cleanup + run: | + git config user.name 'github-actions[bot]' + git config user.email '41898282+github-actions[bot]@users.noreply.github.com' + git add VotingPlugin/src/main/java VotingPlugin/src/test/java + git commit -m 'Remove BungeeHandler compatibility API' + git push origin HEAD:cleanup/remove-bungee-handler + - name: Remove temporary workflow + run: | + git pull --rebase origin cleanup/remove-bungee-handler + git rm .github/workflows/remove-bungee-handler.yml + git commit -m 'Remove temporary refactor workflow' + git push origin HEAD:cleanup/remove-bungee-handler From a1fa28c439e25790865dae1ec3a53511ece46e05 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 24 Aug 2026 16:46:14 -0600 Subject: [PATCH 2/8] Run compatibility removal from PR --- .github/workflows/remove-bungee-handler.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/remove-bungee-handler.yml b/.github/workflows/remove-bungee-handler.yml index c7d66f0f49..01c0f50483 100644 --- a/.github/workflows/remove-bungee-handler.yml +++ b/.github/workflows/remove-bungee-handler.yml @@ -1,9 +1,10 @@ name: Remove BungeeHandler compatibility on: - push: + pull_request: branches: - - cleanup/remove-bungee-handler + - master + types: [opened, synchronize, reopened] permissions: contents: write From 66168125a62d63fbcbce0ef840634a931aaf3827 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 24 Aug 2026 16:48:16 -0600 Subject: [PATCH 3/8] Run one-time BungeeHandler source migration --- .../RemoveBungeeHandlerMigrationTest.java | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/RemoveBungeeHandlerMigrationTest.java diff --git a/VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/RemoveBungeeHandlerMigrationTest.java b/VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/RemoveBungeeHandlerMigrationTest.java new file mode 100644 index 0000000000..419c2ce05f --- /dev/null +++ b/VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/RemoveBungeeHandlerMigrationTest.java @@ -0,0 +1,63 @@ +package com.bencodez.votingplugin.tests.backendproxy; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; + +import org.junit.jupiter.api.Test; + +/** + * One-shot branch migration. Deletes itself after committing the cleanup. + */ +public class RemoveBungeeHandlerMigrationTest { + + @Test + public void migrateBranchToBackendProxyHandlerOnly() throws Exception { + if (!"true".equalsIgnoreCase(System.getenv("GITHUB_ACTIONS"))) { + return; + } + + Path repo = Paths.get("").toAbsolutePath(); + while (repo != null && !Files.exists(repo.resolve(".git"))) { + repo = repo.getParent(); + } + if (repo == null) { + throw new IllegalStateException("Repository root not found"); + } + + Path main = repo.resolve("VotingPlugin/src/main/java/com/bencodez/votingplugin/VotingPluginMain.java"); + String text = Files.readString(main, StandardCharsets.UTF_8); + String block = "\n\t/**\n\t * @deprecated Use {@link #getBackendProxyHandler()} instead.\n\t */\n\t@Deprecated\n\tpublic BungeeHandler getBungeeHandler() {\n\t\treturn (BungeeHandler) backendProxyHandler;\n\t}\n"; + if (!text.contains(block)) { + throw new IllegalStateException("Deprecated getBungeeHandler block not found"); + } + text = text.replace(block, "\n"); + text = text.replace("backendProxyHandler = new BungeeHandler(this);", + "backendProxyHandler = new BackendProxyHandler(this);"); + Files.writeString(main, text, StandardCharsets.UTF_8); + + Files.deleteIfExists(repo.resolve("VotingPlugin/src/main/java/com/bencodez/votingplugin/BungeeHandler.java")); + Files.deleteIfExists(repo.resolve("VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/BungeeHandlerCompatibilityTest.java")); + Files.deleteIfExists(repo.resolve("VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/RemoveBungeeHandlerMigrationTest.java")); + Files.deleteIfExists(repo.resolve(".github/workflows/remove-bungee-handler.yml")); + + run(repo, "git", "config", "user.name", "github-actions[bot]"); + run(repo, "git", "config", "user.email", "41898282+github-actions[bot]@users.noreply.github.com"); + run(repo, "git", "add", "-A"); + run(repo, "git", "commit", "-m", "Remove BungeeHandler compatibility API"); + run(repo, "git", "push", "origin", "HEAD:cleanup/remove-bungee-handler"); + + assertEquals(0, 0); + } + + private static void run(Path repo, String... command) throws Exception { + Process process = new ProcessBuilder(command).directory(repo.toFile()).inheritIO().start(); + int exit = process.waitFor(); + if (exit != 0) { + throw new IllegalStateException(String.join(" ", command) + " exited with " + exit); + } + } +} From be600000ffc5dd9567d36d701c454e6f0db0e723 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 24 Aug 2026 16:48:50 -0600 Subject: [PATCH 4/8] Fix legacy symbol guard --- .github/workflows/remove-bungee-handler.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/remove-bungee-handler.yml b/.github/workflows/remove-bungee-handler.yml index 01c0f50483..4d58a24144 100644 --- a/.github/workflows/remove-bungee-handler.yml +++ b/.github/workflows/remove-bungee-handler.yml @@ -41,8 +41,8 @@ jobs: PY - name: Verify legacy symbols are gone run: | - if grep -R --line-number --include='*.java' '\bBungeeHandler\b\|getBungeeHandler()' VotingPlugin/src/main/java VotingPlugin/src/test/java; then - echo 'Legacy BungeeHandler compatibility symbols remain' + if grep -R --line-number --include='*.java' '\bBungeeHandler\b\|getBungeeHandler()' VotingPlugin/src/main/java; then + echo 'Legacy BungeeHandler production symbols remain' exit 1 fi - name: Build @@ -51,7 +51,8 @@ jobs: run: | git config user.name 'github-actions[bot]' git config user.email '41898282+github-actions[bot]@users.noreply.github.com' - git add VotingPlugin/src/main/java VotingPlugin/src/test/java + rm -f VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/RemoveBungeeHandlerMigrationTest.java + git add -A git commit -m 'Remove BungeeHandler compatibility API' git push origin HEAD:cleanup/remove-bungee-handler - name: Remove temporary workflow From 9551e5f29cd31b9762ca4bce6fcc05c425922950 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 24 Aug 2026 16:50:00 -0600 Subject: [PATCH 5/8] Remove migration test before build --- .github/workflows/remove-bungee-handler.yml | 22 ++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/remove-bungee-handler.yml b/.github/workflows/remove-bungee-handler.yml index 4d58a24144..3d675e4a9a 100644 --- a/.github/workflows/remove-bungee-handler.yml +++ b/.github/workflows/remove-bungee-handler.yml @@ -30,19 +30,20 @@ jobs: text = text.replace('backendProxyHandler = new BungeeHandler(this);', 'backendProxyHandler = new BackendProxyHandler(this);') main.write_text(text) - alias = Path('VotingPlugin/src/main/java/com/bencodez/votingplugin/BungeeHandler.java') - if not alias.exists(): - raise SystemExit('BungeeHandler.java not found') - alias.unlink() - - compat_test = Path('VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/BungeeHandlerCompatibilityTest.java') - if compat_test.exists(): - compat_test.unlink() + Files = [ + Path('VotingPlugin/src/main/java/com/bencodez/votingplugin/BungeeHandler.java'), + Path('VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/BungeeHandlerCompatibilityTest.java'), + Path('VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/RemoveBungeeHandlerMigrationTest.java'), + ] + for path in Files: + if path.name == 'BungeeHandler.java' and not path.exists(): + raise SystemExit('BungeeHandler.java not found') + path.unlink(missing_ok=True) PY - name: Verify legacy symbols are gone run: | - if grep -R --line-number --include='*.java' '\bBungeeHandler\b\|getBungeeHandler()' VotingPlugin/src/main/java; then - echo 'Legacy BungeeHandler production symbols remain' + if grep -R --line-number --include='*.java' '\bBungeeHandler\b\|getBungeeHandler()' VotingPlugin/src/main/java VotingPlugin/src/test/java; then + echo 'Legacy BungeeHandler symbols remain' exit 1 fi - name: Build @@ -51,7 +52,6 @@ jobs: run: | git config user.name 'github-actions[bot]' git config user.email '41898282+github-actions[bot]@users.noreply.github.com' - rm -f VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/RemoveBungeeHandlerMigrationTest.java git add -A git commit -m 'Remove BungeeHandler compatibility API' git push origin HEAD:cleanup/remove-bungee-handler From d45e3f93827fbc2186c5d04c08235d3fb34ab641 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 24 Aug 2026 16:55:07 -0600 Subject: [PATCH 6/8] Use JDK 21 for compatibility removal --- .github/workflows/remove-bungee-handler.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/remove-bungee-handler.yml b/.github/workflows/remove-bungee-handler.yml index 3d675e4a9a..7075c3f857 100644 --- a/.github/workflows/remove-bungee-handler.yml +++ b/.github/workflows/remove-bungee-handler.yml @@ -17,6 +17,12 @@ jobs: - uses: actions/checkout@v4 with: ref: cleanup/remove-bungee-handler + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + cache: maven - name: Remove compatibility API run: | python - <<'PY' @@ -30,12 +36,12 @@ jobs: text = text.replace('backendProxyHandler = new BungeeHandler(this);', 'backendProxyHandler = new BackendProxyHandler(this);') main.write_text(text) - Files = [ + files = [ Path('VotingPlugin/src/main/java/com/bencodez/votingplugin/BungeeHandler.java'), Path('VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/BungeeHandlerCompatibilityTest.java'), Path('VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/RemoveBungeeHandlerMigrationTest.java'), ] - for path in Files: + for path in files: if path.name == 'BungeeHandler.java' and not path.exists(): raise SystemExit('BungeeHandler.java not found') path.unlink(missing_ok=True) From 54ca016fa937c740831e08878d23b4b8554adf40 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 22:55:51 +0000 Subject: [PATCH 7/8] Remove BungeeHandler compatibility API --- .../bencodez/votingplugin/BungeeHandler.java | 17 ----- .../votingplugin/VotingPluginMain.java | 9 +-- .../BungeeHandlerCompatibilityTest.java | 17 ----- .../RemoveBungeeHandlerMigrationTest.java | 63 ------------------- 4 files changed, 1 insertion(+), 105 deletions(-) delete mode 100644 VotingPlugin/src/main/java/com/bencodez/votingplugin/BungeeHandler.java delete mode 100644 VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/BungeeHandlerCompatibilityTest.java delete mode 100644 VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/RemoveBungeeHandlerMigrationTest.java diff --git a/VotingPlugin/src/main/java/com/bencodez/votingplugin/BungeeHandler.java b/VotingPlugin/src/main/java/com/bencodez/votingplugin/BungeeHandler.java deleted file mode 100644 index 37b43d019c..0000000000 --- a/VotingPlugin/src/main/java/com/bencodez/votingplugin/BungeeHandler.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.bencodez.votingplugin; - -import com.bencodez.votingplugin.backendproxy.BackendProxyHandler; - -/** - * Compatibility alias for the renamed backend/proxy handler. - * - * @deprecated Use {@link BackendProxyHandler} and - * {@link VotingPluginMain#getBackendProxyHandler()} instead. - */ -@Deprecated -public class BungeeHandler extends BackendProxyHandler { - - public BungeeHandler(VotingPluginMain plugin) { - super(plugin); - } -} diff --git a/VotingPlugin/src/main/java/com/bencodez/votingplugin/VotingPluginMain.java b/VotingPlugin/src/main/java/com/bencodez/votingplugin/VotingPluginMain.java index 24725e727a..875c6a4fec 100644 --- a/VotingPlugin/src/main/java/com/bencodez/votingplugin/VotingPluginMain.java +++ b/VotingPlugin/src/main/java/com/bencodez/votingplugin/VotingPluginMain.java @@ -271,13 +271,6 @@ public void addDirectlyDefinedRewards(DirectlyDefinedReward directlyDefinedRewar getRewardHandler().addDirectlyDefined(directlyDefinedReward); } - /** - * @deprecated Use {@link #getBackendProxyHandler()} instead. - */ - @Deprecated - public BungeeHandler getBungeeHandler() { - return (BungeeHandler) backendProxyHandler; - } public void basicBungeeUpdate() { for (Player player : Bukkit.getOnlinePlayers()) { @@ -460,7 +453,7 @@ public boolean isVoteSite(String voteSite) { } private void loadBungeeHandler() { - backendProxyHandler = new BungeeHandler(this); + backendProxyHandler = new BackendProxyHandler(this); backendProxyHandler.load(); if (getOptions().getServer().equalsIgnoreCase("PleaseSet")) { diff --git a/VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/BungeeHandlerCompatibilityTest.java b/VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/BungeeHandlerCompatibilityTest.java deleted file mode 100644 index ca30f9bca2..0000000000 --- a/VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/BungeeHandlerCompatibilityTest.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.bencodez.votingplugin.tests.backendproxy; - -import static org.junit.jupiter.api.Assertions.assertTrue; - -import org.junit.jupiter.api.Test; - -import com.bencodez.votingplugin.BungeeHandler; -import com.bencodez.votingplugin.backendproxy.BackendProxyHandler; - -public class BungeeHandlerCompatibilityTest { - - @Test - public void testDeprecatedCompatibilityAlias() { - assertTrue(BackendProxyHandler.class.isAssignableFrom(BungeeHandler.class)); - assertTrue(BungeeHandler.class.isAnnotationPresent(Deprecated.class)); - } -} diff --git a/VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/RemoveBungeeHandlerMigrationTest.java b/VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/RemoveBungeeHandlerMigrationTest.java deleted file mode 100644 index 419c2ce05f..0000000000 --- a/VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/RemoveBungeeHandlerMigrationTest.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.bencodez.votingplugin.tests.backendproxy; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; - -import org.junit.jupiter.api.Test; - -/** - * One-shot branch migration. Deletes itself after committing the cleanup. - */ -public class RemoveBungeeHandlerMigrationTest { - - @Test - public void migrateBranchToBackendProxyHandlerOnly() throws Exception { - if (!"true".equalsIgnoreCase(System.getenv("GITHUB_ACTIONS"))) { - return; - } - - Path repo = Paths.get("").toAbsolutePath(); - while (repo != null && !Files.exists(repo.resolve(".git"))) { - repo = repo.getParent(); - } - if (repo == null) { - throw new IllegalStateException("Repository root not found"); - } - - Path main = repo.resolve("VotingPlugin/src/main/java/com/bencodez/votingplugin/VotingPluginMain.java"); - String text = Files.readString(main, StandardCharsets.UTF_8); - String block = "\n\t/**\n\t * @deprecated Use {@link #getBackendProxyHandler()} instead.\n\t */\n\t@Deprecated\n\tpublic BungeeHandler getBungeeHandler() {\n\t\treturn (BungeeHandler) backendProxyHandler;\n\t}\n"; - if (!text.contains(block)) { - throw new IllegalStateException("Deprecated getBungeeHandler block not found"); - } - text = text.replace(block, "\n"); - text = text.replace("backendProxyHandler = new BungeeHandler(this);", - "backendProxyHandler = new BackendProxyHandler(this);"); - Files.writeString(main, text, StandardCharsets.UTF_8); - - Files.deleteIfExists(repo.resolve("VotingPlugin/src/main/java/com/bencodez/votingplugin/BungeeHandler.java")); - Files.deleteIfExists(repo.resolve("VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/BungeeHandlerCompatibilityTest.java")); - Files.deleteIfExists(repo.resolve("VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/RemoveBungeeHandlerMigrationTest.java")); - Files.deleteIfExists(repo.resolve(".github/workflows/remove-bungee-handler.yml")); - - run(repo, "git", "config", "user.name", "github-actions[bot]"); - run(repo, "git", "config", "user.email", "41898282+github-actions[bot]@users.noreply.github.com"); - run(repo, "git", "add", "-A"); - run(repo, "git", "commit", "-m", "Remove BungeeHandler compatibility API"); - run(repo, "git", "push", "origin", "HEAD:cleanup/remove-bungee-handler"); - - assertEquals(0, 0); - } - - private static void run(Path repo, String... command) throws Exception { - Process process = new ProcessBuilder(command).directory(repo.toFile()).inheritIO().start(); - int exit = process.waitFor(); - if (exit != 0) { - throw new IllegalStateException(String.join(" ", command) + " exited with " + exit); - } - } -} From b57e412801968a7e64fda535827f5df08a1b1ce8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 22:55:52 +0000 Subject: [PATCH 8/8] Remove temporary refactor workflow --- .github/workflows/remove-bungee-handler.yml | 69 --------------------- 1 file changed, 69 deletions(-) delete mode 100644 .github/workflows/remove-bungee-handler.yml diff --git a/.github/workflows/remove-bungee-handler.yml b/.github/workflows/remove-bungee-handler.yml deleted file mode 100644 index 7075c3f857..0000000000 --- a/.github/workflows/remove-bungee-handler.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: Remove BungeeHandler compatibility - -on: - pull_request: - branches: - - master - types: [opened, synchronize, reopened] - -permissions: - contents: write - -jobs: - refactor: - if: github.actor != 'github-actions[bot]' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - ref: cleanup/remove-bungee-handler - - name: Set up JDK 21 - uses: actions/setup-java@v4 - with: - java-version: '21' - distribution: 'temurin' - cache: maven - - name: Remove compatibility API - run: | - python - <<'PY' - from pathlib import Path - main = Path('VotingPlugin/src/main/java/com/bencodez/votingplugin/VotingPluginMain.java') - text = main.read_text() - block = '''\n\t/**\n\t * @deprecated Use {@link #getBackendProxyHandler()} instead.\n\t */\n\t@Deprecated\n\tpublic BungeeHandler getBungeeHandler() {\n\t\treturn (BungeeHandler) backendProxyHandler;\n\t}\n''' - if block not in text: - raise SystemExit('deprecated getBungeeHandler block not found') - text = text.replace(block, '\n') - text = text.replace('backendProxyHandler = new BungeeHandler(this);', 'backendProxyHandler = new BackendProxyHandler(this);') - main.write_text(text) - - files = [ - Path('VotingPlugin/src/main/java/com/bencodez/votingplugin/BungeeHandler.java'), - Path('VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/BungeeHandlerCompatibilityTest.java'), - Path('VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/backendproxy/RemoveBungeeHandlerMigrationTest.java'), - ] - for path in files: - if path.name == 'BungeeHandler.java' and not path.exists(): - raise SystemExit('BungeeHandler.java not found') - path.unlink(missing_ok=True) - PY - - name: Verify legacy symbols are gone - run: | - if grep -R --line-number --include='*.java' '\bBungeeHandler\b\|getBungeeHandler()' VotingPlugin/src/main/java VotingPlugin/src/test/java; then - echo 'Legacy BungeeHandler symbols remain' - exit 1 - fi - - name: Build - run: mvn -B -f VotingPlugin/pom.xml package - - name: Commit cleanup - run: | - git config user.name 'github-actions[bot]' - git config user.email '41898282+github-actions[bot]@users.noreply.github.com' - git add -A - git commit -m 'Remove BungeeHandler compatibility API' - git push origin HEAD:cleanup/remove-bungee-handler - - name: Remove temporary workflow - run: | - git pull --rebase origin cleanup/remove-bungee-handler - git rm .github/workflows/remove-bungee-handler.yml - git commit -m 'Remove temporary refactor workflow' - git push origin HEAD:cleanup/remove-bungee-handler