fix: boot ProjectCapture on Hytale 0.5.9
This commit is contained in:
@@ -30,10 +30,14 @@ public final class ProjectCapturePlugin extends JavaPlugin {
|
||||
stateStore.initialize();
|
||||
contentCatalog = RuntimeContentCatalog.load(getClass().getClassLoader());
|
||||
multiplayerService = new MultiplayerCreatureService(stateStore, contentCatalog);
|
||||
ProjectCaptureCommands.register(this, multiplayerService);
|
||||
return CompletableFuture.completedFuture(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setup() {
|
||||
ProjectCaptureCommands.register(this, multiplayerService);
|
||||
}
|
||||
|
||||
JsonStateStore stateStore() {
|
||||
return stateStore;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"Name": "Christian Schindler"
|
||||
}
|
||||
],
|
||||
"ServerVersion": "0.5.9",
|
||||
"ServerVersion": "=0.5.9",
|
||||
"Dependencies": {},
|
||||
"OptionalDependencies": {},
|
||||
"DisabledByDefault": false,
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package dev.projectcapture.hytale;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
class HytaleManifestTest {
|
||||
@Test
|
||||
void pinsTheExactSupportedServerVersionWithValidSemverRangeSyntax() throws Exception {
|
||||
try (InputStream resource = getClass().getClassLoader().getResourceAsStream("manifest.json")) {
|
||||
assertThat(resource).as("plugin manifest resource").isNotNull();
|
||||
JsonNode manifest = new ObjectMapper().readTree(resource);
|
||||
|
||||
assertThat(manifest.path("ServerVersion").asText()).isEqualTo("=0.5.9");
|
||||
assertThat(manifest.path("IncludesAssetPack").asBoolean()).isTrue();
|
||||
assertThat(manifest.path("Main").asText()).isEqualTo("dev.projectcapture.hytale.ProjectCapturePlugin");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user