mirror of
https://github.com/BentoBoxWorld/Boxed.git
synced 2024-11-30 12:54:33 +01:00
Fix tests. Revert Paper-specific code.
This commit is contained in:
parent
1fe87fedff
commit
14dee15258
24
pom.xml
24
pom.xml
@ -112,14 +112,14 @@
|
||||
</profiles>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>papermc</id>
|
||||
<url>https://repo.papermc.io/repository/maven-public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<repository>
|
||||
<id>spigot-repo</id>
|
||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>papermc</id>
|
||||
<url>https://repo.papermc.io/repository/maven-public/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>bentoboxworld</id>
|
||||
<url>https://repo.codemc.org/repository/bentoboxworld/</url>
|
||||
@ -144,20 +144,6 @@
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<!-- Paper API -->
|
||||
<dependency>
|
||||
<groupId>io.papermc.paper</groupId>
|
||||
<artifactId>paper-api</artifactId>
|
||||
<version>${paper.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- PaperLib -->
|
||||
<dependency>
|
||||
<groupId>io.papermc</groupId>
|
||||
<artifactId>paperlib</artifactId>
|
||||
<version>1.0.6</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!-- Spigot API -->
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
|
@ -250,11 +250,9 @@ public class AdvancementsManager {
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ import org.eclipse.jdt.annotation.NonNull;
|
||||
|
||||
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());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user