mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 09:01:08 +03:00
Merge branch 'master' of github.com:GravitLauncher/Launcher
This commit is contained in:
commit
35cfccba16
1 changed files with 25 additions and 5 deletions
|
@ -16,6 +16,7 @@ public ClientProfile(String version, String assetIndex, int sortIndex, String ti
|
|||
this.assetIndex = assetIndex;
|
||||
this.sortIndex = sortIndex;
|
||||
this.title = title;
|
||||
this.info = info;
|
||||
this.serverAddress = serverAddress;
|
||||
this.serverPort = serverPort;
|
||||
this.updateFastCheck = updateFastCheck;
|
||||
|
@ -89,6 +90,8 @@ public String toString() {
|
|||
@LauncherAPI
|
||||
private String title;
|
||||
@LauncherAPI
|
||||
private String info;
|
||||
@LauncherAPI
|
||||
private String serverAddress;
|
||||
@LauncherAPI
|
||||
private int serverPort;
|
||||
|
@ -375,6 +378,11 @@ public String getTitle() {
|
|||
return title;
|
||||
}
|
||||
|
||||
@LauncherAPI
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
@LauncherAPI
|
||||
public Version getVersion() {
|
||||
return Version.byName(version);
|
||||
|
@ -396,6 +404,11 @@ public void setTitle(String title) {
|
|||
this.title = title;
|
||||
}
|
||||
|
||||
@LauncherAPI
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
@LauncherAPI
|
||||
public void setVersion(Version version) {
|
||||
this.version = version.name;
|
||||
|
@ -414,6 +427,7 @@ public void verify() {
|
|||
|
||||
// Client
|
||||
VerifyHelper.verify(getTitle(), VerifyHelper.NOT_EMPTY, "Profile title can't be empty");
|
||||
VerifyHelper.verify(getInfo(), VerifyHelper.NOT_EMPTY, "Profile info can't be empty");
|
||||
VerifyHelper.verify(getServerAddress(), VerifyHelper.NOT_EMPTY, "Server address can't be empty");
|
||||
VerifyHelper.verifyInt(getServerPort(), VerifyHelper.range(0, 65535), "Illegal server port: " + getServerPort());
|
||||
|
||||
|
@ -436,6 +450,7 @@ public int hashCode() {
|
|||
result = prime * result + serverPort;
|
||||
result = prime * result + sortIndex;
|
||||
result = prime * result + ((title == null) ? 0 : title.hashCode());
|
||||
result = prime * result + ((info == null) ? 0 : info.hashCode());
|
||||
result = prime * result + ((update == null) ? 0 : update.hashCode());
|
||||
result = prime * result + ((updateExclusions == null) ? 0 : updateExclusions.hashCode());
|
||||
result = prime * result + (updateFastCheck ? 1231 : 1237);
|
||||
|
@ -505,6 +520,11 @@ public boolean equals(Object obj) {
|
|||
if (other.title != null)
|
||||
return false;
|
||||
} else if (!title.equals(other.title))
|
||||
return false;
|
||||
if (info == null) {
|
||||
if (other.info != null)
|
||||
return false;
|
||||
} else if (!info.equals(other.info))
|
||||
return false;
|
||||
if (update == null) {
|
||||
if (other.update != null)
|
||||
|
|
Loading…
Reference in a new issue