Skip to content

Commit

Permalink
Bump to Updater v2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gravitylow committed Jan 8, 2014
1 parent 56b4674 commit 2035a9b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>net.gravitydevelopment.updater</groupId>
<artifactId>updater</artifactId>
<version>2.0</version>
<version>2.1</version>
<packaging>jar</packaging>
<name>Updater</name>
<url>http://forums.bukkit.org/threads/updater-2-0-easy-safe-and-policy-compliant-auto-updating-for-your-plugins-new.96681/</url>
Expand Down
16 changes: 9 additions & 7 deletions src/main/java/net/gravitydevelopment/updater/Updater.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* If you are unsure about these rules, please read the plugin submission guidelines: http://goo.gl/8iU5l
*
* @author Gravity
* @version 2.0
* @version 2.1
*/

public class Updater {
Expand Down Expand Up @@ -194,7 +194,7 @@ public Updater(Plugin plugin, int id, File file, UpdateType type, boolean announ
} else {
plugin.getLogger().severe("The updater could not load configuration at " + updaterFile.getAbsolutePath());
}
e.printStackTrace();
plugin.getLogger().log(Level.SEVERE, null, e);
}

if (this.config.getBoolean("disable")) {
Expand Down Expand Up @@ -224,7 +224,7 @@ public Updater(Plugin plugin, int id, File file, UpdateType type, boolean announ
* Get the result of the update process.
*
* @return result of the update process.
* @see net.gravitydevelopment.updater.Updater.UpdateResult
* @see UpdateResult
*/
public Updater.UpdateResult getResult() {
this.waitForThread();
Expand All @@ -235,13 +235,15 @@ public Updater.UpdateResult getResult() {
* Get the latest version's release type.
*
* @return latest version's release type.
* @see net.gravitydevelopment.updater.Updater.ReleaseType
* @see ReleaseType
*/
public ReleaseType getLatestType() {
this.waitForThread();
for (ReleaseType type : ReleaseType.values()) {
if (this.versionType.equals(type.name().toLowerCase())) {
return type;
if (this.versionType != null) {
for (ReleaseType type : ReleaseType.values()) {
if (this.versionType.equals(type.name().toLowerCase())) {
return type;
}
}
}
return null;
Expand Down

0 comments on commit 2035a9b

Please sign in to comment.