diff --git a/build.gradle b/build.gradle index e72ce83..a8a52e1 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,10 @@ plugins { sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' repositories { - mavenLocal() + maven { + name 'geolykt' + url 'https://geolykt.de/maven' + } maven { name 'sponge' url 'https://repo.spongepowered.org/maven' @@ -17,7 +20,7 @@ repositories { dependencies { compileOnly files("galimulator-desktop.jar") // Galimulator proper - api "de.geolykt:starloader:0.0.1-SNAPSHOT" // The minimalistic starloader base "api" as well all of it's depends + api "de.geolykt:starloader:1.0.0-SNAPSHOT" // The minimalistic starloader base "api" as well all of it's depends } publishing { @@ -25,7 +28,7 @@ publishing { maven(MavenPublication) { groupId 'de.geolykt' artifactId 'starloader-api' - version '0.0.1-SNAPSHOT' + version '1.0.0-SNAPSHOT' from components.java } diff --git a/src/main/java/de/geolykt/starloader/StarloaderAPIExtension.java b/src/main/java/de/geolykt/starloader/StarloaderAPIExtension.java index a670ce4..762bfe7 100644 --- a/src/main/java/de/geolykt/starloader/StarloaderAPIExtension.java +++ b/src/main/java/de/geolykt/starloader/StarloaderAPIExtension.java @@ -1,17 +1,5 @@ package de.geolykt.starloader; -import net.minestom.server.extensions.Extension; +import de.geolykt.starloader.mod.Extension; -public class StarloaderAPIExtension extends Extension { - - @Override - public void initialize() { - // Not needed. Most of the API is static or should be initialised by other code - } - - @Override - public void terminate() { - // Not needed. Most of the API is static - } - -} +public class StarloaderAPIExtension extends Extension {} // Most of the API is static and therefore it doesn't need any initalization diff --git a/src/main/java/de/geolykt/starloader/api/NamespacedKey.java b/src/main/java/de/geolykt/starloader/api/NamespacedKey.java index 06514fb..5caa8c3 100644 --- a/src/main/java/de/geolykt/starloader/api/NamespacedKey.java +++ b/src/main/java/de/geolykt/starloader/api/NamespacedKey.java @@ -2,7 +2,7 @@ import org.jetbrains.annotations.NotNull; -import net.minestom.server.extensions.Extension; +import de.geolykt.starloader.mod.Extension; public class NamespacedKey { @@ -26,4 +26,14 @@ public boolean matches(@NotNull String namespace, @NotNull String key) { public String toString() { return namespaceString + ":" + keyString; } + + @Override + public boolean equals(Object obj) { + if (obj instanceof NamespacedKey) { + return keyString.equals(((NamespacedKey) obj).keyString) + && namespaceString.equals(((NamespacedKey) obj).namespaceString); + } else { + return false; + } + } }