diff --git a/pom.xml b/pom.xml index 61338fd..062688b 100644 --- a/pom.xml +++ b/pom.xml @@ -112,14 +112,14 @@ - - papermc - https://repo.papermc.io/repository/maven-public/ - - + spigot-repo https://hub.spigotmc.org/nexus/content/repositories/snapshots + + papermc + https://repo.papermc.io/repository/maven-public/ + bentoboxworld https://repo.codemc.org/repository/bentoboxworld/ @@ -144,20 +144,6 @@ - - - io.papermc.paper - paper-api - ${paper.version} - provided - - - - io.papermc - paperlib - 1.0.6 - compile - org.spigotmc diff --git a/src/main/java/world/bentobox/boxed/AdvancementsManager.java b/src/main/java/world/bentobox/boxed/AdvancementsManager.java index b9d2960..d8adc0f 100644 --- a/src/main/java/world/bentobox/boxed/AdvancementsManager.java +++ b/src/main/java/world/bentobox/boxed/AdvancementsManager.java @@ -250,11 +250,9 @@ public int getScore(Advancement a) { } if (advConfig.getBoolean("settings.automatic-scoring")) { if (!a.getKey().getKey().contains("recipes") && a.getDisplay() != null) { - int score = 1; - while (a.getParent() != null) { - score++; - } - return score; + float x = a.getDisplay().getX(); + float y = a.getDisplay().getY(); + return (int) Math.round(Math.sqrt(x * x + y * y)); } else { return 0; } diff --git a/src/test/java/world/bentobox/boxed/mocks/ServerMocks.java b/src/test/java/world/bentobox/boxed/mocks/ServerMocks.java index a4f2f40..9533491 100644 --- a/src/test/java/world/bentobox/boxed/mocks/ServerMocks.java +++ b/src/test/java/world/bentobox/boxed/mocks/ServerMocks.java @@ -24,6 +24,7 @@ public final class ServerMocks { + @SuppressWarnings({ "deprecation", "unchecked" }) public static @NonNull Server newServer() { Server mock = mock(Server.class); @@ -66,7 +67,7 @@ public final class ServerMocks { doReturn(key).when(keyed).getKey(); return keyed; }); - }).when(registry).get(notNull()); + }).when(registry).get((NamespacedKey) notNull()); return registry; })).when(mock).getRegistry(notNull());