Fix fabric ServerProperties binding (#2030)

This commit is contained in:
Antti Koponen 2021-07-24 16:23:18 +03:00 committed by GitHub
parent 90990c1482
commit 75c1e2a39b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View File

@ -28,9 +28,9 @@ import com.djrapitops.plan.settings.theme.PlanColorScheme;
import net.fabricmc.api.DedicatedServerModInitializer;
import net.fabricmc.fabric.api.command.v1.CommandRegistrationCallback;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.dedicated.MinecraftDedicatedServer;
import net.playeranalytics.plan.commands.CommandManager;
import net.playeranalytics.plan.identification.properties.FabricServerProperties;
import net.playeranalytics.plugin.FabricPlatformLayer;
import net.playeranalytics.plugin.PlatformAbstractionLayer;
import net.playeranalytics.plugin.scheduling.RunnableFactory;
@ -92,6 +92,7 @@ public class PlanFabric implements PlanPlugin, DedicatedServerModInitializer {
.plan(this)
.abstractionLayer(abstractionLayer)
.server(server)
.serverProperties(new FabricServerProperties(getServer()))
.build();
try {
@ -166,7 +167,7 @@ public class PlanFabric implements PlanPlugin, DedicatedServerModInitializer {
ServerLifecycleEvents.SERVER_STOPPING.register(server -> onDisable());
}
public MinecraftServer getServer() {
public MinecraftDedicatedServer getServer() {
return server;
}
}

View File

@ -20,8 +20,6 @@ import com.djrapitops.plan.identification.properties.ServerProperties;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.server.dedicated.MinecraftDedicatedServer;
import javax.inject.Inject;
/**
* server.properties fetcher for Fabric
*
@ -29,7 +27,6 @@ import javax.inject.Inject;
*/
public class FabricServerProperties extends ServerProperties {
@Inject
public FabricServerProperties(MinecraftDedicatedServer server) {
super(
"Fabric",