Files
HuskHomes/common/src/main/java/net/william278/huskhomes/position/Server.java
T
2022-05-20 19:48:32 +01:00

26 lines
560 B
Java

package net.william278.huskhomes.position;
/**
* Represents a server on a proxied network
*/
public class Server {
/**
* Proxy-defined identifier of this server
*/
public String id;
public Server(String id) {
this.id = id;
}
@Override
public boolean equals(Object other) {
if (other instanceof Server server) {
// If the id of this server matches another, the servers are the same.
return server.id.equalsIgnoreCase(this.id);
}
return super.equals(other);
}
}