Add @YamlKey specification to some fields in spawn and server files, fix #242

This commit is contained in:
William committed 2022-10-02 15:40:38 +01:00
1 parent 8663de2411
commit 98f812bcd9
6 files changed
+35 -19

No files matched your search

@@ -1,6 +1,7 @@
package net.william278.huskhomes.config;
import net.william278.annotaml.YamlFile;
import net.william278.annotaml.YamlKey;
import net.william278.huskhomes.position.Server;
import org.jetbrains.annotations.NotNull;
@@ -14,6 +15,7 @@ public class CachedServer {
/**
* Name of the server (must match proxy config ID)
*/
@YamlKey("server_name")
public String serverName;
public CachedServer(@NotNull String serverName) {
@@ -1,6 +1,7 @@
package net.william278.huskhomes.config;
import net.william278.annotaml.YamlFile;
import net.william278.annotaml.YamlKey;
import net.william278.huskhomes.position.Location;
import net.william278.huskhomes.position.Position;
import net.william278.huskhomes.position.Server;
@@ -25,7 +26,9 @@ public class CachedSpawn {
public double z;
public float yaw;
public float pitch;
@YamlKey("world_name")
public String worldName;
@YamlKey("world_uuid")
public String worldUuid;
/**