存储AuthlibInjectorServerInfo对象而不是url字符串

This commit is contained in:
yushijinhun
2018-06-16 19:15:16 +08:00
parent bfbc4613b9
commit 22732fee6a
6 changed files with 95 additions and 71 deletions

View File

@@ -33,4 +33,19 @@ public class AuthlibInjectorServerInfo {
public String getServerName() {
return serverName;
}
@Override
public int hashCode() {
return serverIp.hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == this)
return true;
if (!(obj instanceof AuthlibInjectorServerInfo))
return false;
AuthlibInjectorServerInfo another = (AuthlibInjectorServerInfo) obj;
return this.serverIp.equals(another.serverIp);
}
}