Skip to content

Commit 8fe579f

Browse files
committed
fix version checker being opposite
1 parent dbc0df4 commit 8fe579f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>me.hsgamer</groupId>
88
<artifactId>bettergui</artifactId>
9-
<version>10.3</version>
9+
<version>10.4</version>
1010
<packaging>jar</packaging>
1111

1212
<name>BetterGUI</name>

src/main/java/me/hsgamer/hscore/bukkit/utils/VersionUtils.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ public static int getPatchVersion() {
8484
* @param minorVersion the minor version
8585
* @param patchVersion the patch version
8686
*
87-
* @return 0 if the versions are the same, -1 if the given version is lower, 1 if the given version is higher
87+
* @return 0 if the versions are the same, negative if the server version is lower, positive if the server version is higher
8888
*/
8989
public static int compare(int majorVersion, int minorVersion, int patchVersion) {
90-
int compare = Integer.compare(majorVersion, MAJOR_VERSION);
90+
int compare = Integer.compare(MAJOR_VERSION, majorVersion);
9191
if (compare == 0) {
92-
compare = Integer.compare(minorVersion, MINOR_VERSION);
92+
compare = Integer.compare(MINOR_VERSION, minorVersion);
9393
}
9494
if (compare == 0) {
95-
compare = Integer.compare(patchVersion, PATCH_VERSION);
95+
compare = Integer.compare(PATCH_VERSION, patchVersion);
9696
}
9797
return compare;
9898
}
@@ -103,7 +103,7 @@ public static int compare(int majorVersion, int minorVersion, int patchVersion)
103103
* @param majorVersion the major version
104104
* @param minorVersion the minor version
105105
*
106-
* @return 0 if the versions are the same, -1 if the given version is lower, 1 if the given version is higher
106+
* @return 0 if the versions are the same, negative if the server version is lower, positive if the server version is higher
107107
*/
108108
public static int compare(int majorVersion, int minorVersion) {
109109
return compare(majorVersion, minorVersion, getPatchVersion());
@@ -114,7 +114,7 @@ public static int compare(int majorVersion, int minorVersion) {
114114
*
115115
* @param majorVersion the major version
116116
*
117-
* @return 0 if the versions are the same, -1 if the given version is lower, 1 if the given version is higher
117+
* @return 0 if the versions are the same, negative if the server version is lower, positive if the server version is higher
118118
*/
119119
public static int compare(int majorVersion) {
120120
return compare(majorVersion, getMinorVersion());

0 commit comments

Comments
 (0)