From d51c82e1c0e707f57a8045421b389809c7a47fc2 Mon Sep 17 00:00:00 2001 From: Alessio Colombo <37039432+Sfiguz7@users.noreply.github.com> Date: Wed, 6 Mar 2024 20:59:42 +0100 Subject: [PATCH 1/5] Update dough (#4159) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4949b1f107..2d82162def 100644 --- a/pom.xml +++ b/pom.xml @@ -344,7 +344,7 @@ com.github.baked-libs.dough dough-api - 0130f8d9ce + e99d02a8ff compile From e38e9ec69f05722f44e75a6e2cbe9ad6827f355c Mon Sep 17 00:00:00 2001 From: ybw0014 Date: Thu, 21 Mar 2024 20:45:45 -0400 Subject: [PATCH 2/5] fix: set hover event to null for texts after update warning (#4143) --- .../slimefun4/core/commands/subcommands/VersionsCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/commands/subcommands/VersionsCommand.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/commands/subcommands/VersionsCommand.java index 24abb7364c..34ff1f4a20 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/commands/subcommands/VersionsCommand.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/commands/subcommands/VersionsCommand.java @@ -83,7 +83,7 @@ public void onExecute(@Nonnull CommandSender sender, @Nonnull String[] args) { .append(")").color(ChatColor.GRAY); } - builder.append("\n"); + builder.append("\n").event((HoverEvent) null); // @formatter:on if (Slimefun.getMetricsService().getVersion() != null) { From f4581e4d9e9cde7954d05109f404fa27c632bce1 Mon Sep 17 00:00:00 2001 From: Alessio Colombo <37039432+Sfiguz7@users.noreply.github.com> Date: Thu, 28 Mar 2024 13:58:04 +0100 Subject: [PATCH 3/5] Updated dough to latest (#4165) Co-authored-by: Daniel Walsh --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2d82162def..6c55af4f34 100644 --- a/pom.xml +++ b/pom.xml @@ -344,7 +344,7 @@ com.github.baked-libs.dough dough-api - e99d02a8ff + baf2d79f62 compile From 03e5b9ab1e6b2b5ea6167664e333da07a8ff2a9e Mon Sep 17 00:00:00 2001 From: Daniel Walsh Date: Fri, 5 Apr 2024 20:36:56 +0100 Subject: [PATCH 4/5] Fixes Javadocs build & adds workflow to ensure no more breakages (#4168) --- .github/workflows/javadocs.yml | 37 +++++++++++++++++++ .gitignore | 1 + pom.xml | 2 +- .../core/services/ThreadService.java | 4 +- 4 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/javadocs.yml diff --git a/.github/workflows/javadocs.yml b/.github/workflows/javadocs.yml new file mode 100644 index 0000000000..6e3d668f6e --- /dev/null +++ b/.github/workflows/javadocs.yml @@ -0,0 +1,37 @@ +name: Javadocs + +on: + push: + paths: + - 'src/**' + - 'pom.xml' + +permissions: + contents: read + +jobs: + build: + name: Maven build + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4.0.0 + with: + distribution: 'adopt' + java-version: '17' + java-package: jdk + architecture: x64 + + - name: Cache Maven packages + uses: actions/cache@v4 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + + - name: Build Javadocs + run: mvn javadoc:javadoc diff --git a/.gitignore b/.gitignore index e6f9d7a43c..a6d46cc670 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ /.idea/ /.vscode/ /data-storage/ +/javadocs/ dependency-reduced-pom.xml diff --git a/pom.xml b/pom.xml index 6c55af4f34..1cc216d1f4 100644 --- a/pom.xml +++ b/pom.xml @@ -239,7 +239,7 @@ ${project.basedir} - docs + javadocs Slimefun4 - Javadocs Slimefun4 - Javadocs diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/ThreadService.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/ThreadService.java index 772b65d3fe..a5aa0c58e0 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/ThreadService.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/services/ThreadService.java @@ -39,7 +39,7 @@ public Thread newThread(Runnable r) { * This is a much better alternative to using * {@link BukkitScheduler#runTaskAsynchronously(org.bukkit.plugin.Plugin, Runnable)} * as this will show not only the plugin but a useful name. - * By default, Bukkit will use "Craft Scheduler Thread - - " which is nice to show the plugin but + * By default, Bukkit will use "Craft Scheduler Thread - {@literal } - {@literal }" which is nice to show the plugin but * it's impossible to track exactly what thread that is. * * @param plugin The {@link JavaPlugin} that is creating this thread @@ -60,7 +60,7 @@ public void newThread(JavaPlugin plugin, String name, Runnable runnable) { * This is a much better alternative to using * {@link BukkitScheduler#runTaskTimerAsynchronously(org.bukkit.plugin.Plugin, Runnable, long, long)} * as this will show not only the plugin but a useful name. - * By default, Bukkit will use "Craft Scheduler Thread - - " which is nice to show the plugin but + * By default, Bukkit will use "Craft Scheduler Thread - {@literal } - {@literal }" which is nice to show the plugin but * it's impossible to track exactly what thread that is. * * @param plugin The {@link JavaPlugin} that is creating this thread From 45601c8aefc5f4d964119892043aab9378336c75 Mon Sep 17 00:00:00 2001 From: Alessio Colombo <37039432+Sfiguz7@users.noreply.github.com> Date: Sun, 7 Apr 2024 05:10:14 +0200 Subject: [PATCH 5/5] [ci skip] Actually check if the negative tests do their job (#4054) * Actually check if the negative tests do their job * Changed comments * walshys suggestion --------- Co-authored-by: JustAHuman-xD <65748158+JustAHuman-xD@users.noreply.github.com> --- .../api/events/TestTalismanActivateEvent.java | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/test/java/io/github/thebusybiscuit/slimefun4/api/events/TestTalismanActivateEvent.java b/src/test/java/io/github/thebusybiscuit/slimefun4/api/events/TestTalismanActivateEvent.java index 94b1947cf1..40cfc61fe5 100644 --- a/src/test/java/io/github/thebusybiscuit/slimefun4/api/events/TestTalismanActivateEvent.java +++ b/src/test/java/io/github/thebusybiscuit/slimefun4/api/events/TestTalismanActivateEvent.java @@ -78,23 +78,20 @@ void testEventIsFired() { activateAnvilTalisman(true, true); server.getPluginManager().assertEventFired(TalismanActivateEvent.class, ignored -> true); server.getPluginManager().clearEvents(); + // Assert the normal talisman does not activate in the ender chest activateAnvilTalisman(false, true); - try { - server.getPluginManager().assertEventFired(TalismanActivateEvent.class, ignored -> true); - } catch (AssertionError ignored) { - return; // This is expected; the event should not have fired - } - server.getPluginManager().clearEvents(); + Assertions.assertThrows( + AssertionError.class, + () -> server.getPluginManager().assertEventFired(TalismanActivateEvent.class, ignored -> true) + ); // Assert the ender talisman does not activate in the inventory - try { - activateAnvilTalisman(true, false); - server.getPluginManager().assertEventFired(TalismanActivateEvent.class, ignored -> true); - } catch (AssertionError ignored) { - return; // This is expected; the event should not have fired - } - server.getPluginManager().clearEvents(); + activateAnvilTalisman(true, false); + Assertions.assertThrows( + AssertionError.class, + () -> server.getPluginManager().assertEventFired(TalismanActivateEvent.class, ignored -> true) + ); } @Test