Skip to content

Commit

Permalink
Update Starloade
Browse files Browse the repository at this point in the history
  • Loading branch information
Geolykt committed Mar 8, 2021
1 parent 1f7367b commit be3e80f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 deletions.
9 changes: 6 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -17,15 +20,15 @@ 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 {
publications {
maven(MavenPublication) {
groupId 'de.geolykt'
artifactId 'starloader-api'
version '0.0.1-SNAPSHOT'
version '1.0.0-SNAPSHOT'

from components.java
}
Expand Down
16 changes: 2 additions & 14 deletions src/main/java/de/geolykt/starloader/StarloaderAPIExtension.java
Original file line number Diff line number Diff line change
@@ -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
12 changes: 11 additions & 1 deletion src/main/java/de/geolykt/starloader/api/NamespacedKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.jetbrains.annotations.NotNull;

import net.minestom.server.extensions.Extension;
import de.geolykt.starloader.mod.Extension;

public class NamespacedKey {

Expand All @@ -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;
}
}
}

0 comments on commit be3e80f

Please sign in to comment.