Server name: Minor naming consistency tweaks

This commit is contained in:
William278 committed 2023-03-24 16:04:04 +00:00
1 parent 173178637e
commit f3d6f86568
1 file changed
+11 -11
@@ -11,9 +11,12 @@ import java.nio.file.Path;
*/ */
@YamlFile(header = """ @YamlFile(header = """
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Server ID cache. Must match ┃ ┃ HuskHomes Server ID config ┃
┃ server name in proxy config. ┃ ┃ Developed by William278 ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛""") ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
┣╸ This file should contain the ID of this server as defined in your proxy config.
┣╸ If you join it using /server alpha, then set it to 'alpha' (case-sensitive)
┗╸ You only need to touch this if you're using cross-server mode.""")
public class Server { public class Server {
/** /**
@@ -29,11 +32,11 @@ public class Server {
} }
} }
@YamlKey("server_name") @YamlKey("name")
private String name = getDefaultServerName(); private String serverName = getDefaultServerName();
public Server(@NotNull String name) { public Server(@NotNull String serverName) {
this.setName(name); this.serverName = serverName;
} }
@SuppressWarnings("unused") @SuppressWarnings("unused")
@@ -54,10 +57,7 @@ public class Server {
*/ */
@NotNull @NotNull
public String getName() { public String getName() {
return name; return serverName;
} }
public void setName(String name) {
this.name = name;
}
} }